.app-header { display:flex; align-items:flex-start; justify-content:space-between; padding:16px 24px; background:#ffffff; position: sticky; top:0; z-index: 500; }
.header-left { display:flex; flex-direction:column; gap:6px; }
.logo-row { display:flex; align-items:center; gap:12px; }
.logo-text { font-size:36px; font-weight:800; color:#2563eb; margin:0; }
.tagline { font-size:16px; color:#6b7280; margin:0 0 0 44px; }
/* Ensure header user container is always visible */
#headerUserContainer {
    display: flex !important;
    align-items: center !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-width: 100px;
}
/* ===== UPLOAD ZONE COMPONENT ===== */
.upload-zone {
    border: 3px dashed var(--secondary-blue);
    border-radius: 16px;
    padding: 25px 15px;
    text-align: center;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(255, 255, 255, 0.95));
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.upload-zone::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(59, 130, 246, 0.05), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.upload-zone:hover::before {
    opacity: 1;
    transform: rotate(45deg) translate(50%, 50%);
}

.upload-zone:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(255, 255, 255, 0.98));
    border-color: var(--accent-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.upload-zone.dragover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.22), rgba(255, 255, 255, 0.98));
    border-color: var(--accent-blue);
    transform: scale(1.02);
}

/* ===== FILE LIST COMPONENT ===== */
.file-list {
    margin: 25px 0;
}

.file-item {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--neutral-300);
    border-radius: 12px;
    padding: 16px 20px;
    margin: 12px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    gap: 12px;
}

.file-item:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-md);
}

.file-item.selected { border-color: var(--secondary-blue); background: var(--ultra-light-blue); }
.file-item.uploading { border-color: var(--warning-orange); background: rgba(245, 158, 11, 0.1); }
.file-item.uploaded { border-color: var(--success-green); background: rgba(16, 185, 129, 0.1); }
.file-item.processing { border-color: var(--accent-blue); background: var(--glass-blue); }
.file-item.completed { border-color: var(--success-green); background: rgba(16, 185, 129, 0.1); }
.file-item.error { border-color: var(--error-red); background: rgba(239, 68, 68, 0.1); }

.file-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.file-name {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 2px;
}

.file-error {
    font-size: 12px;
    color: #dc2626;
    margin-top: 2px;
}

.file-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.file-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.file-delete-btn {
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 6px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.file-delete-btn:hover {
    background: #b91c1c;
    transform: scale(1.05);
}

.status-selected { background: var(--secondary-blue); color: white; }
.status-uploading { background: var(--warning-orange); color: white; }
.status-uploaded { background: var(--success-green); color: white; }
.status-processing { background: var(--accent-blue); color: white; }
.status-completed { background: var(--success-green); color: white; }
.status-error { background: var(--error-red); color: white; }

/* ===== CONTROLS COMPONENT ===== */
.controls {
    display: flex;
    gap: 20px;
    align-items: center;
    margin: 25px 0;
    flex-wrap: wrap;
}

.controls label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-weight: 600;
    color: var(--neutral-700);
}

.controls input, .controls select {
    padding: 12px 16px;
    border: 2px solid var(--neutral-200);
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.controls input:focus, .controls select:focus {
    outline: none;
    border-color: var(--secondary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ===== BUTTON COMPONENT ===== */
.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary { 
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue)); 
    color: white; 
}
.btn-success { 
    background: linear-gradient(135deg, var(--success-green), #059669); 
    color: white; 
}
.btn-info { 
    background: linear-gradient(135deg, var(--accent-blue), var(--light-blue)); 
    color: white; 
}
.btn-danger { 
    background: linear-gradient(135deg, var(--error-red), #dc2626); 
    color: white; 
}
.btn-secondary {
    background: linear-gradient(135deg, var(--neutral-600), var(--neutral-700));
    color: white;
}

/* ===== PROGRESS BAR COMPONENT ===== */
.progress-section {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    backdrop-filter: blur(15px);
    padding: 8px !important;
    margin: 10px 0 !important;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: var(--neutral-200);
    border-radius: 10px;
    overflow: hidden;
    margin: 12px 0;
    transition: opacity 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-blue), var(--secondary-blue), var(--light-blue));
    width: 0%;
    transition: width 0.5s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ===== MODAL COMPONENT ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-xl);
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--neutral-600);
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--error-red);
}

/* ===== CARD COMPONENT ===== */
.card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--neutral-300);
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    border-bottom: 1px solid var(--neutral-200);
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.card-title {
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0;
}

.card-content {
    color: var(--neutral-700);
    line-height: 1.6;
}

/* ===== LOADING OVERLAY COMPONENT ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.loading-text {
    margin-top: 20px;
    color: var(--neutral-600);
    font-weight: 500;
}

/* ===== COST DISPLAY COMPONENT ===== */
.cost-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.cost-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
    min-width: 150px;
    flex: 1;
}

.cost-value {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
}

.cost-label {
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    font-weight: 500;
}

/* ===== RESPONSIVE COMPONENTS ===== */
@media (max-width: 768px) {
    .controls {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        flex-wrap: wrap;
    }
    
    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .cost-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 20px;
        max-width: calc(100% - 40px);
    }
}

/* ===== DUPLICATE WARNING MODAL ===== */
.duplicate-warning-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.duplicate-warning-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
}

.duplicate-warning-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.duplicate-warning-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.close-modal:hover {
    background: #f3f4f6;
    color: #374151;
}

.duplicate-warning-body {
    padding: 20px 24px;
}

.duplicate-warning-body p {
    margin: 0 0 12px 0;
    color: #374151;
    line-height: 1.5;
}

.duplicate-warning-body p:last-child {
    margin-bottom: 0;
}

.existing-file-info {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
}

.existing-file-info h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.existing-file-info p {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #6b7280;
}

.existing-file-info p:last-child {
    margin-bottom: 0;
}

.duplicate-warning-actions {
    display: flex;
    gap: 12px;
    padding: 16px 24px 20px;
    border-top: 1px solid #e5e7eb;
    justify-content: flex-end;
}

.duplicate-warning-actions button {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-skip {
    background: #f3f4f6;
    color: #374151;
    border-color: #d1d5db;
}

.btn-skip:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

.btn-overwrite {
    background: #fef3c7;
    color: #92400e;
    border-color: #fbbf24;
}

.btn-overwrite:hover {
    background: #fde68a;
    border-color: #f59e0b;
}

.btn-rename {
    background: #dbeafe;
    color: #1e40af;
    border-color: #3b82f6;
}

.btn-rename:hover {
    background: #bfdbfe;
    border-color: #2563eb;
}

.btn-cancel {
    background: #f3f4f6;
    color: #374151;
    border-color: #d1d5db;
}

.btn-cancel:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

.btn-confirm {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

.btn-confirm:hover {
    background: #059669;
    border-color: #047857;
}

.filename-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    margin-top: 8px;
    transition: border-color 0.2s ease;
}

.filename-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive design */
@media (max-width: 640px) {
    .duplicate-warning-content {
        width: 95%;
        margin: 20px;
    }
    
    .duplicate-warning-actions {
        flex-direction: column;
    }
    
    .duplicate-warning-actions button {
        width: 100%;
    }
}

/* ===== FILE LIST DUPLICATE INDICATORS ===== */
.file-item.duplicate {
    border-left: 4px solid #f59e0b;
    background-color: #fffbeb;
}

.file-item.skipped {
    border-left: 4px solid #6b7280;
    background-color: #f9fafb;
    opacity: 0.7;
}

.duplicate-badge {
    display: inline-block;
    background: #f59e0b;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    margin-left: 8px;
    text-transform: uppercase;
}

.duplicate-info {
    margin-top: 4px;
    padding: 4px 8px;
    background: #fef3c7;
    border-radius: 4px;
    border-left: 3px solid #f59e0b;
}

.duplicate-info small {
    display: block;
    color: #92400e;
    font-size: 12px;
    line-height: 1.3;
}

.duplicate-info small:first-child {
    font-weight: 500;
}

.duplicate-info small:last-child {
    margin-top: 2px;
    color: #a16207;
}

/* Status-specific styling */
.file-item.skipped .file-status {
    background: #6b7280;
    color: white;
}

.file-item.duplicate .file-status {
    background: #f59e0b;
    color: white;
} 