:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --success-color: #22c55e;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --background: #f8fafc;
    --card-background: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    color: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

.btn-logout {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
}

.tab-button {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.tab-button:hover {
    color: var(--primary-color);
}

.tab-button.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.card {
    background: var(--card-background);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.card h2 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #475569;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #16a34a;
    transform: translateY(-1px);
}

.upload-zone {
    text-align: center;
    padding: 20px;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
}

.upload-status {
    margin-top: 10px;
    color: var(--text-secondary);
}

.info-box {
    background: #eff6ff;
    border-left: 4px solid var(--primary-color);
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.info-box ul {
    margin-left: 20px;
    margin-top: 10px;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: var(--border-color);
    border-radius: 15px;
    overflow: hidden;
    margin: 20px 0;
}

#progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #3b82f6);
    width: 0%;
    transition: width 0.3s ease;
}

#progress-text {
    text-align: center;
    color: var(--text-secondary);
    margin-top: 10px;
}

.results-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.result-stat {
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.result-stat.total {
    background: #f1f5f9;
}

.result-stat.success {
    background: #dcfce7;
}

.result-stat.error {
    background: #fee2e2;
}

.result-stat .number {
    font-size: 2rem;
    font-weight: bold;
    display: block;
}

.result-stat .label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

.results-details {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.result-item {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item.success {
    background: #f0fdf4;
}

.result-item.error {
    background: #fef2f2;
}

.result-info {
    flex: 1;
}

.result-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
}

.result-status.success {
    background: var(--success-color);
    color: white;
}

.result-status.error {
    background: var(--error-color);
    color: white;
}

.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    background: var(--success-color);
    color: white;
}

.toast.error {
    background: var(--error-color);
    color: white;
}

.toast.warning {
    background: var(--warning-color);
    color: white;
}

footer {
    text-align: center;
    padding: 30px;
    color: var(--text-secondary);
    margin-top: 40px;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }

    .tabs {
        flex-direction: column;
    }

    .card {
        padding: 20px;
    }

    .results-summary {
        grid-template-columns: 1fr;
    }
}
