/* ========================================
   CSS Variables & Reset
   ======================================== */
:root {
    /* Color Palette */
    --primary-color: #3A92A0;
    /* Teal */
    --primary-dark: #2d7a86;
    --secondary-color: #0D3D70;
    /* Navy Blue */

    --success-color: #28a745;
    /* @import removed */
    --warning-color: #ffca28;
    --danger-color: #dc3545;

    --bg-primary: #F5F7FA;
    /* Light Grey Background */
    --bg-secondary: #FFFFFF;
    /* White */
    --bg-tertiary: #E8ECEF;
    /* Divider/Light Bg */
    --bg-hover: #F0F4F7;

    --text-primary: #333333;
    --text-secondary: #666666;
    --text-tertiary: #999999;

    --border-color: #dddfe2;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);

    --border-radius-sm: 4px;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --border-radius-pill: 50px;

    --transition: all 0.2s ease-in-out;

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
}

/* ========================================
   Header
   ======================================== */
.header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}



.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--secondary-color);
    letter-spacing: -0.5px;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: var(--border-radius-pill);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-family);
    justify-content: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-sm);
}

.btn-secondary {
    background: white;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

.btn-danger {
    background: white;
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}

.btn-danger:hover {
    background: var(--danger-color);
    color: white;
}

/* ========================================
   Main Content
   ======================================== */
.main {
    padding: 2rem 0;
    min-height: calc(100vh - 70px);
}

/* ========================================
   Controls Section
   ======================================== */
.controls-section {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: flex-end;
}

.search-bar {
    position: relative;
    flex: 2;
    min-width: 300px;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 0.625rem 1rem 0.625rem 2.75rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: var(--font-family);
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(58, 146, 160, 0.15);
}

.filters {
    display: flex;
    gap: 1rem;
    flex: 3;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
}

.filter-group label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
}

.filter-select {
    padding: 0.625rem 1rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: var(--font-family);
    cursor: pointer;
    transition: var(--transition);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(58, 146, 160, 0.15);
}

/* ========================================
   Signals Section
   ======================================== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-header h2 {
    font-size: 1.5rem;
    color: var(--secondary-color);
    font-weight: 700;
}

.signal-count {
    color: var(--bg-secondary);
    font-size: 0.85rem;
    padding: 0.25rem 0.75rem;
    background: var(--text-secondary);
    border-radius: var(--border-radius-pill);
    font-weight: 600;
}

.signals-grid {
    display: grid;
    gap: 1rem;
}

/* Signal Card (List View style) */
.signal-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.25rem;
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.signal-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.signal-card-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.signal-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.signal-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

.signal-status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--border-radius-pill);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-processing {
    background: #cce5ff;
    color: #004085;
}

.status-completed {
    background: #d4edda;
    color: #155724;
}

.status-failed {
    background: #f8d7da;
    color: #721c24;
}


/* ========================================
   Empty & Loading States
   ======================================== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-secondary);
    border: 1px dashed var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
}

.empty-state svg {
    color: var(--border-color);
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.loading-state {
    text-align: center;
    padding: 4rem 2rem;
}

.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 1rem;
    border: 3px solid var(--bg-tertiary);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ========================================
   Modal
   ======================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 61, 112, 0.4);
    /* Navy overlay */
    backdrop-filter: blur(2px);
    z-index: 1000;
    animation: fadeIn 0.2s;
    /* Ensure centering persists when active class is removed but display is still flex */
    align-items: center;
    justify-content: center;
}

.modal.active {
    /* display: flex is handled by JS openModal now to ensure correct centering behavior */
    opacity: 1;
    /* Explicitly handle opacity if needed for fades, though animation handles fadeIn */
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    width: 90%;
    max-width: 550px;
    max-height: 90vh;
    /* Constrain height */
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-content.modal-large {
    max-width: 900px;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
}

.modal-close:hover {
    color: var(--danger-color);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    /* Enable scrolling */
    flex: 1;
    /* Allow body to take remaining space */
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    /* Right align actions */
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--bg-tertiary);
}

/* ========================================
   Form Elements
   ======================================== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: var(--font-family);
    transition: var(--transition);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(58, 146, 160, 0.15);
}

/* File Upload */
.file-upload-area {
    position: relative;
    cursor: pointer;
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

/* File Upload Content */
.file-upload-content {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    background: var(--bg-primary);
}

.file-upload-area:hover .file-upload-content {
    border-color: var(--primary-color);
    background: #f0fbfc;
}

.file-upload-content svg {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* ========================================
   Login Page Specifics
   ======================================== */
.login-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 3rem;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.login-title {
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
}

.login-logo {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

/* ========================================
   Toast Notification
   ======================================== */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    border-left: 4px solid var(--primary-color);
    color: var(--text-primary);
}

.toast.success {
    border-left-color: var(--success-color);
}

.toast.error {
    border-left-color: var(--danger-color);
}

/* ========================================
   File List Styles (Merged)
   ======================================== */
.file-list-container {
    margin-top: 1rem;
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-primary);
    padding: 0.5rem;
    cursor: pointer;
    /* Indicate it is clickable */
}

.file-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
    width: 100%;
    /* Ensure full width */
}

.file-list-item:last-child {
    border-bottom: none;
}

.file-list-item:hover {
    background: var(--bg-hover);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.file-info svg {
    color: var(--primary-color);
    flex-shrink: 0;
}

.file-name {
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin-left: 0.5rem;
    flex-shrink: 0;
}

.remove-file-btn {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 0.5rem;
    /* Larger hit area */
    border-radius: var(--border-radius-pill);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    /* Push to far right */
}

.remove-file-btn:hover {
    color: var(--danger-color);
    background: rgba(220, 53, 69, 0.1);
}

/* Dashboard Stats */
.stats-dashboard {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    flex: 1;
    min-width: 150px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background-color: #fafafa;
}

.stat-card.active {
    background-color: var(--bg-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}


.stat-value {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Status colors for cards */


.stat-card.new {
    border-bottom: 3px solid var(--warning-color);
}

.stat-card.ready {
    border-bottom: 3px solid var(--success-color);
}

.stat-card.reviewed {
    border-bottom: 3px solid var(--info-color);
}

.stat-card.error {
    border-bottom: 3px solid var(--danger-color);
}

/* Error Popup */
.error-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 3000;
    text-align: center;
    border-left: 6px solid var(--danger-color);
    min-width: 300px;
    animation: slideUpFade 0.3s ease-out;
}

@keyframes slideUpFade {
    from {
        transform: translate(-50%, -40%);
        opacity: 0;
    }

    to {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

/* ========================================
   New Dashboard Header
   ======================================== */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.dashboard-header h2 {
    font-size: 1.75rem;
    color: var(--text-primary);
    font-weight: 400;
    /* Regular weight per screenshot */
}

.dashboard-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Compact Search */
.search-container {
    position: relative;
    width: 250px;
}

.compact-search-input {
    width: 100%;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-pill);
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: var(--transition);
}

.compact-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(58, 146, 160, 0.1);
}

.search-container .search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
}

/* Filter Button */
.filter-container {
    position: relative;
}

.btn-outline-secondary {
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-outline-secondary:hover,
.btn-outline-secondary.active {
    background: var(--bg-hover);
    border-color: var(--text-primary);
    color: var(--text-primary);
}

.compact-btn {
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-pill);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.chevron-down {
    color: var(--text-tertiary);
}

/* Filter Popover */
.filter-popover {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    /* Align right to button */
    width: 320px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    animation: fadeIn 0.2s ease-out;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.filter-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.close-filter {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-tertiary);
}

.filter-body {
    padding: 1rem;
    max-height: 400px;
    overflow-y: auto;
}

.filter-item {
    margin-bottom: 1.25rem;
}

.filter-item label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* Range Inputs */
.range-inputs {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.number-input {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-pill);
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
    color: var(--text-tertiary);
    flex: 1;
    justify-content: space-between;
}

.stepper {
    display: flex;
    gap: 2px;
}

.step-btn {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: none;
    background: var(--bg-hover);
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.filter-footer .btn {
    flex: 1;
}

/* Updated Signal Card Layout */
.signal-card {
    /* Reset from previous styles if needed */
    flex-direction: row;
    /* Ensure row layout */
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1rem 1.5rem;
}

/* Specific overrides for signal elements */
.signal-header {
    flex: 2;
    min-width: 200px;
    margin-bottom: 0 !important;
    /* Remove bottom margin from old layout */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.signal-info {
    flex: 3;
    display: flex;
    gap: 2rem;
    margin-top: 0 !important;
}

.signal-status-badge {
    position: absolute;
    /* Optional: if we want to float it, but let's stick to inline */
    /* Adjust based on need */
}

/* Specific modification to map current HTML structure to new visual layout */
/* Current HTML structure in JS render:
   .signal-header (Title + Date + Status)
   .signal-info (Type + Size + Desc)
   .signal-actions (Buttons)
*/

/* Force the specific layout requested:
   Left: Title/Date/Status
   Middle: Metadata
   Right: Actions
*/

/* Helper to align actions to right */
.signal-actions {
    margin-left: auto;
    display: flex;
    gap: 0.75rem;
}

/* Forced Layout Fixes */
/* Forced Layout Fixes */
.signal-card {
    display: flex;
    /* Removed !important to allow toggling visibility */
    flex-direction: row !important;
    /* Force row layout */
    align-items: center !important;
    justify-content: flex-start !important;
    /* Let children flow */
    padding: 1rem 1.5rem !important;
    flex-wrap: nowrap !important;
    /* Prevent wrapping */
}

/* Indentation for grouped signals */
.grouped-signal {
    margin-left: 2rem !important;
    /* Indent to show hierarchy */
    width: auto !important;
    /* Adjust width to fit */
    border-left: 4px solid var(--primary-color) !important;
    /* Optional: visual marker */
    background: #f9f9f9;
    /* Slightly darker background */
}



/* Header: Title, Date, Status */
.signal-header {
    flex: 0 0 250px !important;
    /* Fixed width for consistency */
    display: flex !important;
    flex-direction: column !important;
    border-bottom: none !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Info: Type, Size, Count */
.signal-info {
    flex: 1 1 auto !important;
    /* Take remaining space */
    display: flex !important;
    flex-direction: row !important;
    /* Ensure horizontal items */
    gap: 2rem !important;
    margin-top: 0 !important;
    align-items: center !important;
    justify-content: flex-start !important;
}

/* Actions: Buttons */
.signal-actions {
    flex: 0 0 auto !important;
    margin-left: auto !important;
    /* Push to right */
}

/* Stats Box Styles */
.stats-section {
    display: flex;
    background: #FFFAFA;
    /* Very light background or match container */
    padding: 1rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    /* Optional separator */
    gap: 2rem;
}

.stat-card {
    display: flex;
    flex-direction: column;
    padding-right: 2rem;
    border-right: 1px solid var(--border-color);
    min-width: 120px;
    cursor: pointer;
    /* Clickable */
    transition: opacity 0.2s;
}

.stat-card:hover {
    opacity: 0.7;
}

.stat-card:last-child {
    border-right: none;
}

.stat-card.active {
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 1rem;
    margin-bottom: -1rem;
}

/* Specific overrides can be removed or merged */

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

/* Remove old absolute positioning if any */
.signal-status-badge {
    position: static !important;
}

/* ========================================
   Upload Progress Container
   ======================================== */
.upload-progress-container {
    margin-top: 1.25rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.25rem;
    animation: fadeIn 0.3s ease-out;
}

.upload-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.upload-progress-header h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.upload-progress-status {
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.2rem 0.6rem;
    border-radius: var(--border-radius-pill);
}

.upload-progress-status.status-uploading {
    background: #cce5ff;
    color: #004085;
}

.upload-progress-status.status-success {
    background: #d4edda;
    color: #155724;
}

.upload-progress-status.status-error {
    background: #f8d7da;
    color: #721c24;
}

.upload-progress-status.status-partial {
    background: #fff3cd;
    color: #856404;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #4db8c7);
    border-radius: 4px;
    width: 0%;
    transition: width 0.4s ease-out;
    position: relative;
}

.progress-fill.uploading {
    background: linear-gradient(90deg, var(--primary-color), #4db8c7);
    animation: progressPulse 1.5s ease-in-out infinite;
}

.progress-fill.success {
    background: linear-gradient(90deg, #28a745, #48c76c);
    animation: none;
}

.progress-fill.error {
    background: linear-gradient(90deg, #dc3545, #e8606d);
    animation: none;
}

.progress-fill.partial {
    background: linear-gradient(90deg, #ffca28, #ffd95c);
    animation: none;
}

@keyframes progressPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.progress-text {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin: 0 0 0.75rem 0;
}

/* Upload File Results List */
.upload-file-results {
    max-height: 220px;
    overflow-y: auto;
    border-top: 1px solid var(--border-color);
    padding-top: 0.75rem;
}

.upload-file-result-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.75rem;
    border-radius: var(--border-radius-sm);
    margin-bottom: 0.35rem;
    font-size: 0.88rem;
    transition: background 0.2s;
    animation: slideIn 0.25s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-8px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.upload-file-result-item:hover {
    background: var(--bg-hover);
}

.upload-file-result-item .result-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 700;
}

.upload-file-result-item .result-icon.success {
    background: #d4edda;
    color: #155724;
}

.upload-file-result-item .result-icon.error {
    background: #f8d7da;
    color: #721c24;
}

.upload-file-result-item .result-icon.pending {
    background: #e2e3e5;
    color: #6c757d;
}

.upload-file-result-item .result-icon.uploading {
    background: #cce5ff;
    color: #004085;
    animation: spin 1s linear infinite;
}

.upload-file-result-item .result-filename {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
    font-weight: 500;
}

.upload-file-result-item .result-filesize {
    font-size: 0.78rem;
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.upload-file-result-item .result-status-text {
    font-size: 0.78rem;
    font-weight: 600;
    flex-shrink: 0;
    min-width: 70px;
    text-align: right;
}

.upload-file-result-item .result-status-text.success {
    color: #28a745;
}

.upload-file-result-item .result-status-text.error {
    color: #dc3545;
}

.upload-file-result-item .result-status-text.pending {
    color: #6c757d;
}

.upload-file-result-item .result-status-text.uploading {
    color: #007bff;
}

/* Upload Summary */
.upload-summary {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.88rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.upload-summary.all-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.upload-summary.has-errors {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.upload-summary.all-failed {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}