:root {
    /* Light theme - Black & White Professional */
    --primary: #000000;
    --primary-hover: #1a1a1a;
    --secondary: #ffffff;
    --danger: #000000;
    --success: #000000;
    
    --bg: #fafafa;
    --surface: #ffffff;
    --surface-hover: #f5f5f5;
    --surface-elevated: #ffffff;
    --text: #000000;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --border: #e5e5e5;
    --border-dark: #d4d4d4;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 8px 32px rgba(0, 0, 0, 0.16);
    
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
    :root {
        --primary: #ffffff;
        --primary-hover: #e5e5e5;
        --secondary: #000000;
        --danger: #ffffff;
        --success: #ffffff;
        
        --bg: #0a0a0a;
        --surface: #121212;
        --surface-hover: #1a1a1a;
        --surface-elevated: #1e1e1e;
        --text: #ffffff;
        --text-secondary: #a3a3a3;
        --text-tertiary: #737373;
        --border: #262626;
        --border-dark: #404040;
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
        --shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
        --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.7);
        --shadow-xl: 0 8px 32px rgba(0, 0, 0, 0.8);
    }
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Typography */
h1 { font-size: 2rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
h2 { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
h3 { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
h4 { font-size: 1.125rem; font-weight: 600; line-height: 1.4; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.4375rem 0.875rem;
    border: none;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    background: var(--surface-hover);
    color: var(--text);
    white-space: nowrap;
    user-select: none;
    line-height: 1;
}

.btn i {
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.btn:hover {
    background: var(--border);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--primary);
    color: var(--secondary);
    font-weight: 600;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
}

.btn-outline:hover {
    background: var(--surface-hover);
    border-color: var(--border-dark);
}

.btn-danger {
    background: transparent;
    color: var(--text-secondary);
}

.btn-danger:hover {
    color: var(--danger);
    background: var(--surface-hover);
}

.btn-sm {
    padding: 0.3125rem 0.625rem;
    font-size: 0.75rem;
    gap: 0.25rem;
}

.btn-sm i {
    font-size: 0.8125rem;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-icon {
    width: 1.875rem;
    height: 1.875rem;
    min-width: 1.875rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
}

.btn-icon i {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    line-height: 1;
}

.btn-icon:hover {
    background: var(--surface-hover);
    color: var(--text);
    transform: translateY(-1px);
}

.btn-icon:active {
    transform: translateY(0);
}

.btn-icon-sm {
    width: 1.625rem;
    height: 1.625rem;
    min-width: 1.625rem;
    font-size: 0.75rem;
}

.btn-icon-sm i {
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text);
    font-size: 0.9375rem;
}

.form-group label i {
    margin-right: 0.375rem;
    color: var(--text-secondary);
    width: 1rem;
    display: inline-block;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--surface);
    color: var(--text);
    font-size: 0.875rem;
    transition: var(--transition);
    font-family: inherit;
}

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

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-tertiary);
}

.form-row {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.form-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-section-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: var(--transition);
}

.checkbox-label:hover {
    background: var(--surface-hover);
}

.checkbox-label input[type="checkbox"] {
    width: 1.125rem;
    height: 1.125rem;
    cursor: pointer;
    margin: 0;
}

.checkbox-label span {
    font-size: 0.9375rem;
}

.input-hint {
    display: block;
    margin-top: 0.375rem;
    font-size: 0.8125rem;
    color: var(--text-tertiary);
}

/* Flash Messages */
.flash-messages {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
    max-width: 400px;
}

.flash {
    padding: 1rem 1.25rem;
    margin-bottom: 0.625rem;
    border-radius: 8px;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9375rem;
}

.flash-error {
    border-color: var(--danger);
}

.close-flash {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-secondary);
    line-height: 1;
    padding: 0;
    transition: var(--transition);
}

.close-flash:hover {
    color: var(--text);
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Welcome Page */
.welcome-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 4rem);
}

.welcome-card {
    text-align: center;
    background: var(--surface);
    padding: 4rem 3rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    max-width: 550px;
}

.welcome-card .logo {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.welcome-card h1 {
    margin-bottom: 0.75rem;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.0625rem;
    margin-bottom: 3rem;
}

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 3rem 0;
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.feature i {
    font-size: 1.75rem;
}

.feature span {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Auth Page */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 4rem);
}

.auth-card {
    background: var(--surface);
    padding: 3rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
}

.auth-card .logo {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-card h1 {
    text-align: center;
    margin-bottom: 2.5rem;
}

.back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9375rem;
}

.back-link:hover {
    color: var(--text);
}

/* Admin Page */
.admin-page {
    max-width: 100%;
}

.admin-header {
    background: var(--surface);
    padding: 0.625rem 1.25rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    margin-bottom: 1.25rem;
    position: sticky;
    top: 1rem;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.header-content h1 {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 1.0625rem;
    margin: 0;
    white-space: nowrap;
    line-height: 1;
}

.header-content h1 i {
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
    line-height: 1;
}

.header-actions {
    display: flex;
    gap: 0.375rem;
    align-items: center;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .admin-header {
        padding: 0.5rem 0.875rem;
        position: relative;
        top: 0;
    }
    
    .header-content {
        gap: 0.5rem;
    }
    
    .header-content h1 {
        font-size: 0.9375rem;
    }
    
    .header-content h1 i {
        font-size: 0.875rem;
    }
    
    .header-actions {
        gap: 0.25rem;
    }
}

/* Sessions Grid */
.sessions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(480px, 1fr));
    gap: 1.5rem;
}

.session-card {
    background: var(--surface);
    border-radius: 6px;
    border: 1px solid var(--border);
    padding: 0;
    transition: var(--transition);
    overflow: hidden;
}

.session-card:hover {
    border-color: var(--text-tertiary);
}

.session-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border);
}

.session-info h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.9375rem;
    margin: 0;
}

.session-code {
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    background: var(--surface-hover);
    border-radius: 3px;
    font-weight: 500;
    font-family: 'Monaco', 'Courier New', monospace;
    letter-spacing: 0.025em;
}

.session-status {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

.session-status::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}

.session-status.active {
    color: var(--text);
}

.session-status.inactive {
    color: var(--text-tertiary);
}

.session-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.session-meta {
    padding: 0.75rem 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.meta-item i {
    width: 0.875rem;
    text-align: center;
    font-size: 0.75rem;
}

.session-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 0.5rem;
    text-align: center;
    border-right: 1px solid var(--border);
}

.stat:last-child {
    border-right: none;
}

.stat i {
    font-size: 1rem;
    margin-bottom: 0.375rem;
    color: var(--text-secondary);
}

.stat-value {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.125rem;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.session-uploads {
    padding: 1rem;
}

.session-uploads h4 {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.uploads-list {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.upload-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: var(--surface-hover);
    border-radius: 4px;
    gap: 0.75rem;
    transition: var(--transition);
}

.upload-item:hover {
    background: var(--border);
}

.upload-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

.upload-info i {
    font-size: 0.875rem;
    flex-shrink: 0;
    color: var(--text-secondary);
}

.upload-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.875rem;
}

.upload-size {
    font-size: 0.75rem;
    color: var(--text-secondary);
    flex-shrink: 0;
    font-family: 'Monaco', 'Courier New', monospace;
}

.upload-actions {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
}

.session-footer {
    padding: 0.875rem 1rem;
    border-top: 1px solid var(--border);
}

.session-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem;
    background: var(--primary);
    color: var(--secondary);
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.8125rem;
    transition: var(--transition);
}

.session-link:hover {
    background: var(--primary-hover);
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--surface);
    border-radius: 8px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.empty-state i {
    font-size: 3.5rem;
    color: var(--text-tertiary);
    margin-bottom: 1.5rem;
    opacity: 0.4;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.empty-state h2 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    max-width: 400px;
}

.empty-state .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    min-width: 180px;
    box-shadow: var(--shadow-sm);
}

.empty-state .btn i {
    font-size: 1rem;
    margin: 0;
    opacity: 1;
}

/* Stats Boxes - Compact */
.files-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.625rem;
    margin-bottom: 1.25rem;
}

.stat-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.625rem 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.stat-box i {
    font-size: 1rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.stat-info .stat-value {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.2;
}

.stat-info .stat-label {
    font-size: 0.6875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 999;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: modalIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-small {
    max-width: 450px;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.75rem 2rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    line-height: 1;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--text);
    background: var(--surface-hover);
}

.modal-content form {
    padding: 2rem;
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.qr-container {
    padding: 2.5rem;
    text-align: center;
}

.qr-container img {
    max-width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    background: white;
    margin-bottom: 1.5rem;
}

.qr-container p {
    word-break: break-all;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    padding: 0.75rem;
    background: var(--surface-hover);
    border-radius: 6px;
    font-family: 'Monaco', 'Courier New', monospace;
}

/* Upload Page */
.upload-page {
    display: flex;
    justify-content: center;
    min-height: calc(100vh - 4rem);
}

.upload-card {
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 800px;
    align-self: flex-start;
}

.upload-header {
    text-align: center;
    padding: 2.5rem 2rem 2rem;
    border-bottom: 1px solid var(--border);
}

.upload-header .logo {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.upload-header h1 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.code-badge {
    font-size: 0.875rem;
    padding: 0.375rem 0.875rem;
    background: var(--surface-hover);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-weight: 500;
    font-family: 'Monaco', 'Courier New', monospace;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.alert-error {
    background: var(--surface-hover);
    color: var(--text);
    border: 1px solid var(--border-dark);
}

.alert-info {
    background: var(--surface-hover);
    color: var(--text);
    border: 1px solid var(--border);
}

.alert-warning {
    background: var(--surface-hover);
    color: var(--text);
    border: 1px solid var(--border-dark);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    border-radius: 3px;
    background: var(--surface-hover);
    color: var(--text);
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid var(--border);
}

.badge i {
    font-size: 0.75rem;
}

/* Upload Tabs */
.upload-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border-bottom: 1px solid var(--border);
}

.tab-btn {
    padding: 1rem;
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.tab-btn:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.tab-btn.active {
    background: transparent;
    border-bottom-color: var(--primary);
    color: var(--primary);
}

.tab-content {
    display: none;
    padding: 2rem;
}

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

/* File Drop Zone */
.file-drop-zone {
    border: 2px dashed var(--border);
    border-radius: 6px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    margin-bottom: 1rem;
    transition: var(--transition);
    cursor: pointer;
    background: var(--surface);
}

.file-drop-zone:hover,
.file-drop-zone.drag-over {
    border-color: var(--text);
    background: var(--surface-hover);
}

.file-drop-zone i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    display: block;
    color: var(--text-secondary);
}

.file-drop-zone p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.or-text {
    display: none;
}

.file-list {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    margin-bottom: 1rem;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: var(--surface-hover);
    border-radius: 4px;
    transition: var(--transition);
}

.file-item:hover {
    background: var(--border);
}

.file-item-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

.file-item-info i {
    font-size: 0.875rem;
    flex-shrink: 0;
    color: var(--text-secondary);
}

.file-item-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.875rem;
}

.file-item-size {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-right: 0.5rem;
    font-family: 'Monaco', 'Courier New', monospace;
    flex-shrink: 0;
}

.pin-section {
    padding: 2rem;
    background: var(--surface-hover);
    border-radius: 8px;
    border: 1px solid var(--border);
    margin: 2rem;
}

.uploaded-files {
    padding: 2rem;
    border-top: 1px solid var(--border);
}

.uploaded-files h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    font-size: 1.125rem;
}

/* Session Stats on Upload Page */
.upload-page .session-stats {
    padding: 1.5rem 2rem;
    background: var(--surface-hover);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.upload-page .stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0;
    border: none;
}

.upload-page .stat i {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.upload-page .stat span {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.upload-page .stat small {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .header-content {
        flex-wrap: wrap;
    }
    
    .header-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .sessions-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .session-stats,
    .upload-page .session-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 0;
    }
    
    .stat {
        border-right: 1px solid var(--border);
        border-bottom: none;
        padding: 0.75rem 0.5rem;
    }
    
    .stat:last-child {
        border-right: none;
    }
    
    .features {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .upload-tabs {
        gap: 0.25rem;
    }
    
    .tab-btn {
        font-size: 0.875rem;
        padding: 0.875rem 0.5rem;
    }
    
    .welcome-card,
    .auth-card {
        padding: 2rem 1.5rem;
    }
    
    .modal-content form {
        padding: 1.5rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--text-tertiary);
    border-radius: 50%;
    border-top-color: var(--text);
    animation: spin 0.6s linear infinite;
}

.btn-primary .loading {
    border-color: rgba(255, 255, 255, 0.3);
    border-top-color: white;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    font-size: 0.8125rem;
    font-weight: 500;
    border: 1px solid var(--border);
    background: var(--surface-hover);
}

.badge-primary {
    background: var(--primary);
    color: var(--secondary);
    border-color: var(--primary);
}

/* Tooltip */
[data-tooltip] {
    position: relative;
}

[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 0.75rem;
    background: var(--text);
    color: var(--bg);
    font-size: 0.8125rem;
    white-space: nowrap;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    z-index: 1000;
}

/* Divider */
.divider {
    height: 1px;
    background: var(--border);
    margin: 1.5rem 0;
}

/* Card */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.card-header {
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--surface);
}

::-webkit-scrollbar-thumb {
    background: var(--border-dark);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOut {
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Selection */
::selection {
    background: var(--primary);
    color: var(--secondary);
}

/* 404 Error Page */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.error-content {
    display: flex;
    align-items: center;
    gap: 3rem;
    max-width: 800px;
    animation: fadeIn 0.6s ease-out;
}

.error-code {
    font-size: 10rem;
    font-weight: 700;
    line-height: 1;
    color: var(--text);
    opacity: 0.1;
    user-select: none;
}

.error-divider {
    width: 2px;
    height: 200px;
    background: var(--border);
}

.error-text {
    flex: 1;
}

.error-text h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    color: var(--text);
}

.error-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin: 0 0 2rem 0;
    line-height: 1.6;
}

.error-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.error-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: var(--transition);
    border: 1px solid transparent;
}

.error-actions .btn-primary {
    background: var(--primary);
    color: var(--secondary);
    border-color: var(--primary);
}

.error-actions .btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-2px);
}

.error-actions .btn-secondary {
    background: transparent;
    color: var(--text);
    border-color: var(--border-dark);
}

.error-actions .btn-secondary:hover {
    background: var(--surface-hover);
    border-color: var(--text-secondary);
    transform: translateY(-2px);
}

/* Responsive 404 Page */
@media (max-width: 768px) {
    .error-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
    
    .error-code {
        font-size: 6rem;
    }
    
    .error-divider {
        width: 100px;
        height: 2px;
    }
    
    .error-text h1 {
        font-size: 2rem;
    }
    
    .error-description {
        font-size: 1rem;
    }
    
    .error-actions {
        justify-content: center;
    }
}

