/* ============================================================================
   MedExtract AI - Modern Medical Data Extraction UI
   A stunning, jaw-dropping interface with depth and sophistication
   ============================================================================ */

   :root {
    /* Color System - Deep Medical Blue with Vibrant Accents */
    --color-bg: #0a0e17;
    --color-bg-elevated: #111827;
    --color-bg-card: #1a2234;
    --color-bg-hover: #243049;
    --color-surface: #1e293b;
    
    --color-primary: #06b6d4;
    --color-primary-glow: rgba(6, 182, 212, 0.4);
    --color-primary-soft: rgba(6, 182, 212, 0.15);
    
    --color-accent: #8b5cf6;
    --color-accent-glow: rgba(139, 92, 246, 0.4);
    
    --color-success: #10b981;
    --color-success-soft: rgba(16, 185, 129, 0.15);
    
    --color-warning: #f59e0b;
    --color-warning-soft: rgba(245, 158, 11, 0.15);
    
    --color-error: #ef4444;
    --color-error-soft: rgba(239, 68, 68, 0.15);
    
    --color-text: #f1f5f9;
    --color-text-secondary: #94a3b8;
    --color-text-muted: #64748b;
    
    --color-border: #334155;
    --color-border-subtle: #1e293b;
    
    /* Typography */
    --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* Spacing */
    --sidebar-width: 260px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px var(--color-primary-glow);
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

/* ============================================================================
   Base Styles
   ============================================================================ */

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
}

/* Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(6, 182, 212, 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(139, 92, 246, 0.1), transparent);
    pointer-events: none;
    z-index: -1;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-text);
}

/* ============================================================================
   Layout
   ============================================================================ */

.app-container {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem 3rem;
    max-width: calc(100vw - var(--sidebar-width));
    animation: fadeIn 0.4s ease-out;
}

.main-content.full-width {
    margin-left: 0;
    max-width: 100vw;
}

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

/* ============================================================================
   Sidebar Navigation
   ============================================================================ */

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--color-bg-elevated);
    border-right: 1px solid var(--color-border-subtle);
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--color-border-subtle);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px var(--color-primary-glow);
}

.logo-icon svg {
    width: 22px;
    height: 22px;
    color: white;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-text), var(--color-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-section {
    padding: 1.5rem 1rem;
}

.nav-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    padding: 0 0.75rem;
    margin-bottom: 0.75rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    color: var(--color-text-secondary);
    transition: all var(--transition-fast);
    margin-bottom: 0.25rem;
}

.nav-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.nav-link:hover {
    background: var(--color-bg-hover);
    color: var(--color-text);
}

.nav-link.active {
    background: var(--color-primary-soft);
    color: var(--color-primary);
}

.sidebar-footer {
    margin-top: auto;
    padding: 1.5rem;
    border-top: 1px solid var(--color-border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 500;
    font-size: 0.875rem;
}

.user-role {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.logout-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    color: var(--color-text-muted);
    transition: all var(--transition-fast);
}

.logout-btn:hover {
    background: var(--color-error-soft);
    color: var(--color-error);
}

.logout-btn svg {
    width: 18px;
    height: 18px;
}

/* ============================================================================
   Flash Messages
   ============================================================================ */

.flash-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.flash-message {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
    min-width: 300px;
    animation: slideIn 0.3s ease-out;
    cursor: pointer;
}

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

.flash-message svg {
    width: 16px;
    height: 16px;
    opacity: 0.5;
    flex-shrink: 0;
}

.flash-success {
    border-color: var(--color-success);
    background: var(--color-success-soft);
}

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

.flash-warning, .flash-info {
    border-color: var(--color-warning);
    background: var(--color-warning-soft);
}

/* ============================================================================
   Auth Pages (Login/Register)
   ============================================================================ */

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    animation: scaleIn 0.4s ease-out;
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    box-shadow: var(--shadow-glow);
}

.auth-logo svg {
    width: 32px;
    height: 32px;
    color: white;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--color-text-secondary);
    font-size: 0.9375rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

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

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-family: inherit;
    font-size: 0.9375rem;
    transition: all var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-soft);
}

.form-input::placeholder {
    color: var(--color-text-muted);
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-checkbox input {
    width: 18px;
    height: 18px;
    accent-color: var(--color-primary);
}

.form-checkbox label {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), #0891b2);
    color: white;
    box-shadow: 0 4px 15px var(--color-primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px var(--color-primary-glow);
}

.btn-secondary {
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background: var(--color-bg-hover);
    border-color: var(--color-text-muted);
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-md);
}

.auth-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.auth-footer a {
    font-weight: 500;
}

/* ============================================================================
   Dashboard / Index
   ============================================================================ */

.page-header {
    margin-bottom: 2rem;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: var(--color-text-secondary);
}

.upload-zone {
    background: var(--color-bg-card);
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-xl);
    padding: 3rem;
    text-align: center;
    transition: all var(--transition-base);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.upload-zone::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--color-primary-soft), var(--color-accent-glow));
    opacity: 0;
    transition: opacity var(--transition-base);
}

.upload-zone:hover::before,
.upload-zone.dragover::before {
    opacity: 1;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--color-primary);
    transform: scale(1.01);
}

.upload-zone-content {
    position: relative;
    z-index: 1;
}

.upload-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: var(--shadow-glow);
}

.upload-icon svg {
    width: 36px;
    height: 36px;
    color: white;
}

.upload-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.upload-text {
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
}

.upload-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    pointer-events: none;
}

.upload-input.active {
    pointer-events: auto;
}

.file-info {
    display: none;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-lg);
    margin-top: 1.5rem;
}

.file-info.visible {
    display: flex;
}

.file-icon {
    width: 48px;
    height: 48px;
    background: var(--color-error-soft);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-error);
}

.file-details {
    flex: 1;
    text-align: left;
}

.file-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.file-size {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

/* Recent Extractions */
.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.extraction-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.extraction-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
}

.extraction-card:hover {
    background: var(--color-bg-hover);
    border-color: var(--color-border);
    transform: translateX(4px);
}

.extraction-icon {
    width: 44px;
    height: 44px;
    background: var(--color-primary-soft);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
}

.extraction-icon svg {
    width: 22px;
    height: 22px;
}

.extraction-info {
    flex: 1;
}

.extraction-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.extraction-meta {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.extraction-status {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-completed {
    background: var(--color-success-soft);
    color: var(--color-success);
}

.status-failed {
    background: var(--color-error-soft);
    color: var(--color-error);
}

.ctas-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.ctas-1 { background: #dc2626; color: white; }
.ctas-2 { background: #ea580c; color: white; }
.ctas-3 { background: #ca8a04; color: white; }
.ctas-4 { background: #16a34a; color: white; }
.ctas-5 { background: #2563eb; color: white; }

/* ============================================================================
   Result Page
   ============================================================================ */

.result-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.result-actions {
    display: flex;
    gap: 0.75rem;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.result-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    animation: cardIn 0.4s ease-out backwards;
}

.result-card:nth-child(1) { animation-delay: 0.05s; }
.result-card:nth-child(2) { animation-delay: 0.1s; }
.result-card:nth-child(3) { animation-delay: 0.15s; }
.result-card:nth-child(4) { animation-delay: 0.2s; }
.result-card:nth-child(5) { animation-delay: 0.25s; }
.result-card:nth-child(6) { animation-delay: 0.3s; }

@keyframes cardIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.card-header {
    padding: 1rem 1.25rem;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border-subtle);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-icon {
    width: 32px;
    height: 32px;
    background: var(--color-primary-soft);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
}

.card-icon svg {
    width: 18px;
    height: 18px;
}

.card-title {
    font-weight: 600;
    font-size: 0.9375rem;
}

.card-body {
    padding: 1.25rem;
}

.card-body pre {
    font-family: var(--font-sans);
    white-space: pre-wrap;
    word-wrap: break-word;
    color: var(--color-text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin: 0;
}

.demographics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.demo-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.demo-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
}

.demo-value {
    font-weight: 500;
    color: var(--color-text);
}

.json-section {
    margin-top: 2rem;
}

.json-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.json-block {
    background: #0d1117;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    line-height: 1.6;
    max-height: 500px;
    overflow: auto;
    color: #e6edf3;
}

/* ============================================================================
   History Page
   ============================================================================ */

.history-table {
    width: 100%;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.history-table th,
.history-table td {
    padding: 1rem 1.25rem;
    text-align: left;
}

.history-table th {
    background: var(--color-surface);
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    border-bottom: 1px solid var(--color-border-subtle);
}

.history-table td {
    border-bottom: 1px solid var(--color-border-subtle);
}

.history-table tr:last-child td {
    border-bottom: none;
}

.history-table tr:hover td {
    background: var(--color-bg-hover);
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.pagination a,
.pagination span {
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
}

.pagination a {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text);
}

.pagination a:hover {
    background: var(--color-bg-hover);
}

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

/* ============================================================================
   Admin Dashboard
   ============================================================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.stat-card.primary::before { background: var(--color-primary); }
.stat-card.accent::before { background: var(--color-accent); }
.stat-card.success::before { background: var(--color-success); }
.stat-card.warning::before { background: var(--color-warning); }

.stat-label {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-text), var(--color-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-change {
    font-size: 0.8125rem;
    margin-top: 0.5rem;
}

.stat-change.positive { color: var(--color-success); }
.stat-change.negative { color: var(--color-error); }

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.chart-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.chart-title {
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    height: 200px;
}

.bar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.bar {
    width: 100%;
    background: linear-gradient(to top, var(--color-primary), var(--color-accent));
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: height var(--transition-slow);
    min-height: 4px;
}

.bar-label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.list-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-lg);
}

.list-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border-subtle);
    font-weight: 600;
}

.list-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border-subtle);
}

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

.list-rank {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-muted);
}

.list-rank.top {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: white;
}

.list-content {
    flex: 1;
}

.list-title {
    font-weight: 500;
    font-size: 0.9375rem;
}

.list-subtitle {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.list-value {
    font-weight: 600;
    color: var(--color-primary);
}

/* ============================================================================
   Empty States
   ============================================================================ */

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-icon {
    width: 80px;
    height: 80px;
    background: var(--color-surface);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--color-text-muted);
}

.empty-icon svg {
    width: 36px;
    height: 36px;
}

.empty-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-text {
    color: var(--color-text-secondary);
    max-width: 400px;
    margin: 0 auto;
}

/* ============================================================================
   Loading States
   ============================================================================ */

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 23, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1.5rem;
}

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

.loading-text {
    color: var(--color-text-secondary);
    font-size: 1.125rem;
}

/* ============================================================================
   Responsive
   ============================================================================ */

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
        max-width: 100vw;
        padding: 1.5rem;
    }
    
    .result-grid {
        grid-template-columns: 1fr;
    }
    
    .result-header {
        flex-direction: column;
    }
    
    .result-actions {
        width: 100%;
    }
    
    .result-actions .btn {
        flex: 1;
    }
}

/* ============================================================================
   Scrollbar
   ============================================================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

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

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