/* ════════════════════════════════════════════════
   FactureAI v3 — Design System
   ════════════════════════════════════════════════ */

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

:root {
    --primary:        #5B5FED;
    --primary-dark:   #4347D9;
    --primary-light:  #EFF0FF;
    --accent:         #FF6B6B;

    --gray-50:  #FAFBFC;
    --gray-100: #F4F5F7;
    --gray-200: #E4E7EB;
    --gray-300: #CBD2D9;
    --gray-400: #9AA5B1;
    --gray-500: #7B8794;
    --gray-600: #616E7C;
    --gray-700: #3E4C59;
    --gray-800: #1F2933;
    --gray-900: #0B1015;

    --success: #10B981;
    --warning: #F59E0B;
    --danger:  #EF4444;

    --radius-sm: 6px;
    --radius:    10px;
    --radius-lg: 16px;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow:    0 4px 12px rgba(0,0,0,0.06);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.08);
}

html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--gray-800);
    background: white;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* BUTTONS */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 10px 20px; border-radius: var(--radius);
    font-weight: 600; font-size: 14px;
    border: none; cursor: pointer; transition: all 0.15s ease;
    text-decoration: none; white-space: nowrap;
    font-family: inherit;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover {
    background: var(--primary-dark); color: white;
    transform: translateY(-1px); box-shadow: 0 6px 16px rgba(91,95,237,0.3);
}
.btn-outline { background: white; color: var(--gray-800); border: 1.5px solid var(--gray-200); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: transparent; color: var(--gray-700); }
.btn-ghost:hover { background: var(--gray-100); color: var(--gray-900); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #DC2626; transform: translateY(-1px); }
.btn-large { padding: 14px 28px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #0F9F73; }
.btn:disabled {
    opacity: 0.6; cursor: not-allowed; transform: none !important; box-shadow: none !important;
}

/* LANDING */
.landing { background: white; }

.navbar {
    border-bottom: 1px solid var(--gray-100);
    padding: 16px 0; position: sticky; top: 0;
    background: rgba(255,255,255,0.85); backdrop-filter: blur(12px);
    z-index: 100;
}
.nav-content { display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; color: var(--gray-900); }
.logo-icon { font-size: 24px; }
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a { color: var(--gray-700); font-weight: 500; font-size: 14px; }
.nav-links a:hover { color: var(--gray-900); }

.hero { padding: 100px 0 80px; text-align: center; background: linear-gradient(180deg, white 0%, var(--gray-50) 100%); }
.hero-badge { display: inline-block; padding: 6px 14px; background: var(--primary-light); color: var(--primary); border-radius: 100px; font-size: 13px; font-weight: 600; margin-bottom: 24px; }
.hero-title { font-size: 64px; font-weight: 800; line-height: 1.1; color: var(--gray-900); margin-bottom: 24px; letter-spacing: -2px; }
.gradient-text { background: linear-gradient(135deg, #5B5FED 0%, #FF6B6B 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-subtitle { font-size: 20px; color: var(--gray-600); max-width: 640px; margin: 0 auto 40px; line-height: 1.5; }
.hero-cta { display: flex; gap: 12px; justify-content: center; margin-bottom: 60px; }
.hero-stats { display: flex; justify-content: center; gap: 80px; margin-top: 40px; }
.stat-number { font-size: 36px; font-weight: 800; color: var(--gray-900); }
.stat-label { color: var(--gray-500); font-size: 14px; margin-top: 4px; }

.section-title { font-size: 40px; font-weight: 800; text-align: center; color: var(--gray-900); margin-bottom: 60px; letter-spacing: -1px; }

.features { padding: 100px 0; background: white; }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card { padding: 32px; border: 1px solid var(--gray-100); border-radius: var(--radius-lg); transition: all 0.2s; }
.feature-card:hover { border-color: var(--primary-light); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.feature-icon { font-size: 36px; margin-bottom: 16px; }
.feature-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; color: var(--gray-900); }
.feature-card p { color: var(--gray-600); font-size: 15px; }

.pricing { padding: 100px 0; background: var(--gray-50); }
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: 980px; margin: 0 auto; }
.pricing-card { background: white; border: 1.5px solid var(--gray-100); border-radius: var(--radius-lg); padding: 32px; position: relative; text-align: left; }
.pricing-card.featured { border-color: var(--primary); box-shadow: 0 12px 40px rgba(91,95,237,0.15); transform: scale(1.03); }
.badge-popular { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--primary); color: white; padding: 4px 12px; border-radius: 100px; font-size: 12px; font-weight: 600; }
.plan-name { font-size: 14px; color: var(--gray-500); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
.plan-price { font-size: 48px; font-weight: 800; color: var(--gray-900); margin: 12px 0; }
.plan-price span { font-size: 16px; color: var(--gray-500); font-weight: 500; }
.plan-desc { color: var(--gray-600); margin-bottom: 24px; }
.plan-features { list-style: none; margin-bottom: 32px; }
.plan-features li { padding: 8px 0; color: var(--gray-700); font-size: 14px; }

.footer { padding: 32px 0; border-top: 1px solid var(--gray-100); text-align: center; color: var(--gray-500); font-size: 14px; }

/* APP — LOGIN */
.app-body { background: var(--gray-50); min-height: 100vh; }

.login-screen { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px; background: linear-gradient(135deg, var(--primary-light) 0%, white 100%); }
.login-card { background: white; border-radius: var(--radius-lg); padding: 40px; box-shadow: var(--shadow-lg); width: 100%; max-width: 420px; }

.login-header { text-align: center; margin-bottom: 32px; }
.login-header .logo-icon { font-size: 48px; display: block; margin-bottom: 12px; }
.login-header h1 { font-size: 28px; font-weight: 800; color: var(--gray-900); margin-bottom: 4px; }
.login-header p { color: var(--gray-500); font-size: 14px; }

.tabs { display: flex; gap: 4px; background: var(--gray-100); padding: 4px; border-radius: var(--radius); margin-bottom: 24px; }
.tab { flex: 1; padding: 10px; border: none; background: transparent; border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; color: var(--gray-600); transition: all 0.15s; font-family: inherit; }
.tab.active { background: white; color: var(--gray-900); box-shadow: var(--shadow-sm); }

.auth-form .field { margin-bottom: 16px; }
.auth-form label { display: block; font-size: 13px; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
.auth-form input { width: 100%; padding: 12px 14px; border: 1.5px solid var(--gray-200); border-radius: var(--radius); font-size: 14px; font-family: inherit; transition: all 0.15s; }
.auth-form input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }

.form-error { color: var(--danger); font-size: 13px; margin-top: 12px; text-align: center; }
.form-success { color: var(--success); font-size: 13px; margin-top: 12px; text-align: center; }

.verification-box {
    margin-top: 16px; padding: 16px; background: var(--primary-light);
    border-radius: var(--radius); border-left: 4px solid var(--primary);
}
.verification-box p { font-size: 13px; color: var(--gray-700); margin-bottom: 8px; }
.verification-box a {
    display: inline-block; margin-top: 8px; color: var(--primary);
    font-weight: 600; text-decoration: underline;
}

/* APP — DASHBOARD */
.app-screen { display: flex; min-height: 100vh; }

.sidebar {
    width: 240px; background: white; border-right: 1px solid var(--gray-100);
    display: flex; flex-direction: column;
    position: fixed; height: 100vh; left: 0; top: 0;
}

.sidebar-header { padding: 24px; display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; color: var(--gray-900); border-bottom: 1px solid var(--gray-100); }
.sidebar-nav { flex: 1; padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; }

.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border: none; background: transparent;
    border-radius: var(--radius); color: var(--gray-700); font-weight: 500; font-size: 14px;
    cursor: pointer; text-align: left; transition: all 0.1s; font-family: inherit;
}
.nav-item:hover { background: var(--gray-100); color: var(--gray-900); }
.nav-item.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.nav-icon { font-size: 18px; }

.sidebar-footer { padding: 16px; border-top: 1px solid var(--gray-100); }
.user-info { margin-bottom: 12px; }
.user-email { font-size: 13px; color: var(--gray-700); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-plan { display: inline-block; margin-top: 4px; padding: 2px 8px; background: var(--primary-light); color: var(--primary); border-radius: 100px; font-size: 11px; font-weight: 700; letter-spacing: 0.5px; }

.btn-logout {
    width: 100%; padding: 8px; background: transparent;
    border: 1px solid var(--gray-200); border-radius: var(--radius);
    color: var(--gray-600); font-size: 13px; font-weight: 500;
    cursor: pointer; transition: all 0.15s; font-family: inherit;
}
.btn-logout:hover { background: var(--danger); color: white; border-color: var(--danger); }

.main-content { flex: 1; margin-left: 240px; padding: 40px 48px; max-width: calc(100vw - 240px); }

.demo-banner {
    background: #FEF3C7; color: #92400E;
    padding: 12px 20px; border-radius: var(--radius);
    margin-bottom: 24px; font-size: 14px;
    border-left: 4px solid var(--warning);
}
.demo-banner code {
    background: white; padding: 2px 6px; border-radius: 4px;
    font-family: ui-monospace, monospace; font-size: 13px;
}

.page-header { margin-bottom: 32px; }
.page-header-row { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 32px; gap: 16px; flex-wrap: wrap; }
.page-header h1, .page-header-row h1 { font-size: 28px; font-weight: 700; color: var(--gray-900); margin-bottom: 4px; }
.page-subtitle { color: var(--gray-500); font-size: 15px; }
.header-actions { display: flex; gap: 8px; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }
.stat-card { background: white; border-radius: var(--radius-lg); padding: 20px 24px; border: 1px solid var(--gray-100); position: relative; transition: all 0.15s; }
.stat-card:hover { border-color: var(--gray-200); box-shadow: var(--shadow); }
.stat-card-label { font-size: 13px; color: var(--gray-500); font-weight: 500; margin-bottom: 8px; }
.stat-card-value { font-size: 28px; font-weight: 700; color: var(--gray-900); }
.stat-card-icon { position: absolute; top: 20px; right: 24px; font-size: 24px; opacity: 0.6; }

.card { background: white; border-radius: var(--radius-lg); border: 1px solid var(--gray-100); padding: 24px; margin-bottom: 24px; }
.card-header { margin-bottom: 16px; }
.card-header h2 { font-size: 18px; font-weight: 600; color: var(--gray-900); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

.quota-text { font-size: 14px; color: var(--gray-700); margin-bottom: 12px; }
.progress-bar { height: 8px; background: var(--gray-100); border-radius: 100px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%); border-radius: 100px; transition: width 0.3s; }

.anomalies-list { display: flex; flex-direction: column; gap: 8px; }
.anomaly-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--gray-50); border-radius: var(--radius); font-size: 14px; }
.anomaly-icon { font-size: 16px; }
.anomaly-file { font-weight: 600; color: var(--gray-900); }
.anomaly-desc { color: var(--gray-600); }

.empty-state { padding: 32px; text-align: center; color: var(--gray-500); font-size: 14px; }

.upload-zone {
    background: white; border: 2px dashed var(--gray-200);
    border-radius: var(--radius-lg); padding: 80px 32px; text-align: center;
    cursor: pointer; transition: all 0.2s; margin-bottom: 24px;
}
.upload-zone:hover, .upload-zone.dragover { border-color: var(--primary); background: var(--primary-light); }
.upload-icon { font-size: 64px; margin-bottom: 16px; opacity: 0.6; }
.upload-text { font-size: 18px; font-weight: 600; color: var(--gray-900); margin-bottom: 6px; }
.upload-hint { color: var(--gray-500); font-size: 14px; }

.processing-status { display: flex; align-items: center; gap: 16px; }
.spinner { width: 32px; height: 32px; border: 3px solid var(--gray-200); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.processing-title { font-weight: 600; color: var(--gray-900); margin-bottom: 4px; }
.processing-subtitle { font-size: 14px; color: var(--gray-500); }

.result-card { background: white; border-radius: var(--radius-lg); border: 1px solid var(--gray-100); padding: 32px; margin-bottom: 16px; }
.result-success { border-left: 4px solid var(--success); }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-bottom: 24px; }
.result-section h3 { font-size: 13px; text-transform: uppercase; color: var(--gray-500); letter-spacing: 0.5px; margin-bottom: 12px; font-weight: 600; }
.result-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--gray-100); font-size: 14px; }
.result-row:last-child { border-bottom: none; }
.result-label { color: var(--gray-600); }
.result-value { color: var(--gray-900); font-weight: 500; }
.result-actions { display: flex; gap: 8px; margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--gray-100); }

.totals-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 24px 0; padding: 20px; background: var(--gray-50); border-radius: var(--radius); }
.total-item { text-align: center; }
.total-label { font-size: 12px; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.5px; }
.total-value { font-size: 22px; font-weight: 700; color: var(--gray-900); margin-top: 4px; }

.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; font-size: 14px; display: flex; align-items: flex-start; gap: 10px; }
.alert-warning { background: #FEF3C7; color: #92400E; border: 1px solid #FDE68A; }
.alert-success { background: #D1FAE5; color: #065F46; border: 1px solid #A7F3D0; }
.alert-danger { background: #FEE2E2; color: #991B1B; border: 1px solid #FECACA; }
.alert-info { background: var(--primary-light); color: var(--primary-dark); border: 1px solid #C7D2FE; }
.alert code { background: rgba(0,0,0,0.05); padding: 2px 6px; border-radius: 4px; font-family: ui-monospace, monospace; font-size: 13px; }

.filters-bar { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.search-input, .filter-select {
    padding: 10px 14px; border: 1.5px solid var(--gray-200);
    border-radius: var(--radius); font-size: 14px; font-family: inherit;
    background: white;
}
.search-input { flex: 1; min-width: 200px; }
.search-input:focus, .filter-select:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.data-table { width: 100%; border-collapse: collapse; }
.data-table th { text-align: left; padding: 12px 16px; font-size: 12px; font-weight: 600; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--gray-100); }
.data-table td { padding: 14px 16px; border-bottom: 1px solid var(--gray-100); font-size: 14px; color: var(--gray-700); }
.data-table tr:hover { background: var(--gray-50); }
.data-table input[type="checkbox"] { cursor: pointer; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 100px; font-size: 12px; font-weight: 600; }
.badge-success { background: #D1FAE5; color: #065F46; }
.badge-error   { background: #FEE2E2; color: #991B1B; }
.badge-pending { background: #FEF3C7; color: #92400E; }
.badge-tag     { background: var(--primary-light); color: var(--primary); }
.badge-duplicate { background: #FED7AA; color: #9A3412; }

.btn-icon { background: none; border: none; cursor: pointer; color: var(--gray-500); padding: 4px 8px; border-radius: var(--radius-sm); font-size: 16px; margin: 0 2px; transition: all 0.15s; }
.btn-icon:hover { background: var(--gray-100); }
.btn-icon.btn-icon-danger:hover { background: #FEE2E2; color: var(--danger); }
.btn-icon.btn-icon-primary:hover { background: var(--primary-light); color: var(--primary); }

.bars-chart {
    display: flex; align-items: flex-end; gap: 12px;
    height: 200px; padding: 16px 0;
}
.bar-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.bar {
    width: 100%; min-height: 4px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: all 0.3s;
}
.bar:hover { opacity: 0.8; }
.bar-label { font-size: 11px; color: var(--gray-500); }
.bar-value { font-size: 11px; color: var(--gray-700); font-weight: 600; }

.list-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 0; border-bottom: 1px solid var(--gray-100);
    font-size: 14px;
}
.list-item:last-child { border-bottom: none; }
.list-item-name { color: var(--gray-700); font-weight: 500; }
.list-item-count {
    color: var(--gray-500); background: var(--gray-100);
    padding: 2px 10px; border-radius: 100px; font-size: 12px; font-weight: 600;
}

.setting-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 0; border-bottom: 1px solid var(--gray-100);
}
.setting-row:last-child { border-bottom: none; }
.setting-label { font-size: 13px; color: var(--gray-500); margin-bottom: 4px; }
.setting-value { color: var(--gray-900); font-weight: 500; }

.danger-zone { border-color: #FECACA; background: #FEF2F2; }

/* ════════════════════════════════════════════════
   PAGE BILLING
   ════════════════════════════════════════════════ */

.current-plan-card {
    background: linear-gradient(135deg, var(--primary-light) 0%, white 100%);
    border-color: var(--primary);
}
.current-plan-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}
.current-plan-name {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
    margin: 4px 0;
    letter-spacing: -0.5px;
}
.current-plan-status {
    color: var(--gray-600);
    font-size: 14px;
}
.current-plan-status.active {
    color: var(--success);
    font-weight: 600;
}
.current-plan-status.trialing {
    color: var(--warning);
    font-weight: 600;
}
.current-plan-status.past_due, .current-plan-status.canceled {
    color: var(--danger);
    font-weight: 600;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 16px;
}
.plan-card {
    background: white;
    border: 2px solid var(--gray-100);
    border-radius: var(--radius-lg);
    padding: 28px;
    position: relative;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
}
.plan-card:hover {
    border-color: var(--gray-200);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}
.plan-card.popular {
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(91,95,237,0.12);
}
.plan-card.current {
    background: var(--gray-50);
    border-color: var(--success);
}
.plan-card-popular-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 3px 12px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.plan-card-current-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--success);
    color: white;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.plan-card-name {
    font-size: 13px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 8px;
}
.plan-card-price {
    font-size: 40px;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 16px;
    letter-spacing: -1px;
}
.plan-card-price small {
    font-size: 14px;
    color: var(--gray-500);
    font-weight: 500;
}
.plan-card-features {
    list-style: none;
    margin-bottom: 24px;
    flex: 1;
}
.plan-card-features li {
    padding: 6px 0;
    color: var(--gray-700);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.plan-card-features li::before {
    content: "✓";
    color: var(--success);
    font-weight: 700;
}

.faq-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--gray-100);
}
.faq-item:last-child { border-bottom: none; }
.faq-q {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 6px;
    font-size: 15px;
}
.faq-a {
    color: var(--gray-600);
    font-size: 14px;
    line-height: 1.5;
}

/* Toast */
#toast-container {
    position: fixed; top: 24px; right: 24px;
    z-index: 9999; display: flex; flex-direction: column; gap: 8px;
}
.toast {
    padding: 14px 20px; border-radius: var(--radius);
    background: white; box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--primary);
    display: flex; align-items: center; gap: 12px;
    font-size: 14px; min-width: 280px;
    animation: slideInRight 0.3s ease;
}
.toast-success { border-left-color: var(--success); }
.toast-error { border-left-color: var(--danger); }
.toast-warning { border-left-color: var(--warning); }
@keyframes slideInRight {
    from { transform: translateX(400px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Responsive */
@media (max-width: 900px) {
    .features-grid, .pricing-grid, .plans-grid { grid-template-columns: 1fr; }
    .hero-title { font-size: 40px; }
    .hero-stats { flex-direction: column; gap: 24px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .grid-2, .result-grid { grid-template-columns: 1fr; }
    .sidebar { width: 100%; position: relative; height: auto; }
    .main-content { margin-left: 0; padding: 24px; max-width: 100%; }
}
