/* ============================================================
   VERTEX — Professional Stock Terminal
   Design: Deep Navy + Amber-Gold accent · Monospace data
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    --void:           #04070f;
    --base:           #080d18;
    --card:           #0c1221;
    --card-raised:    #101827;
    --sidebar-bg:     #060a14;

    --accent:         #e8a227;
    --accent-dim:     rgba(232, 162, 39, 0.1);
    --accent-border:  rgba(232, 162, 39, 0.25);
    --accent-hover:   #f0b340;
    --accent-glow:    rgba(232, 162, 39, 0.12);

    --gain:           #22c55e;
    --gain-dim:       rgba(34, 197, 94, 0.1);
    --gain-border:    rgba(34, 197, 94, 0.22);
    --loss:           #f43f5e;
    --loss-dim:       rgba(244, 63, 94, 0.1);
    --loss-border:    rgba(244, 63, 94, 0.22);

    --text-primary:   #f0f4fc;
    --text-muted:     #8b99b5;
    --text-dim:       #3d4f6a;

    --border:         rgba(148, 163, 184, 0.08);
    --border-hover:   rgba(148, 163, 184, 0.15);
    --border-focus:   rgba(232, 162, 39, 0.42);

    --font-ui:        'DM Sans', system-ui, -apple-system, sans-serif;
    --font-data:      'JetBrains Mono', 'Fira Code', 'Courier New', monospace;

    --r-sm:   6px;
    --r-md:   10px;
    --r-lg:   14px;
    --r-xl:   18px;
    --r-pill: 999px;

    --shadow-sm: 0 1px 4px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.03);
    --shadow-md: 0 4px 18px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.04);
    --shadow-lg: 0 12px 42px rgba(0,0,0,0.65), 0 0 0 1px rgba(255,255,255,0.05);

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }

body {
    font-family: var(--font-ui);
    background-color: var(--base);
    background-image:
        radial-gradient(ellipse 70% 45% at 15% -5%, rgba(232,162,39,0.05) 0%, transparent 55%),
        radial-gradient(ellipse 55% 40% at 85% 105%, rgba(34,197,94,0.03) 0%, transparent 55%);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-ui);
    font-weight: 600;
    letter-spacing: -0.025em;
    color: var(--text-primary);
    line-height: 1.25;
}

a { color: var(--accent); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--accent-hover); }

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

.hero-card {
    background: var(--card);
    padding: 3rem 3.2rem;
    border-radius: var(--r-xl);
    border: 1px solid var(--border);
    text-align: center;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.hero-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-border), transparent);
}

.hero-logo {
    display: block;
    width: min(100%, 360px);
    height: auto;
    aspect-ratio: 1265 / 375;
    object-fit: contain;
    margin: -0.35rem auto 1.25rem;
}

.form-logo {
    display: block;
    width: min(100%, 250px);
    height: auto;
    aspect-ratio: 1265 / 375;
    object-fit: contain;
    margin: -0.4rem auto 1.15rem;
}

.hero-card h1 { color: var(--accent); font-size: 1.75rem; margin-bottom: 0.6rem; }
.hero-card h2 { color: var(--text-primary); font-size: 1.35rem; margin-bottom: 1.4rem; }
.hero-card p  { color: var(--text-muted); margin-bottom: 2.2rem; font-size: 0.9rem; line-height: 1.65; }

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 22px;
    border-radius: var(--r-md);
    font-family: var(--font-ui);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.18s var(--ease);
    border: 1px solid transparent;
    white-space: nowrap;
    background: var(--accent);
    color: #07090e;
    letter-spacing: 0.01em;
}

.btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(232,162,39,0.28);
    color: #07090e;
}

.btn:active { transform: translateY(0); box-shadow: none; }

.btn-outline {
    background: transparent;
    border-color: var(--accent-border);
    color: var(--accent);
}

.btn-outline:hover {
    background: var(--accent-dim);
    border-color: var(--accent);
    box-shadow: 0 4px 14px rgba(232,162,39,0.15);
    color: var(--accent);
}

.btn-full { width: 100%; margin-top: 6px; padding: 12px; font-size: 0.93rem; border: none; }

.btn-sm {
    padding: 5px 12px;
    font-size: 0.78rem;
    border-radius: var(--r-sm);
    background: var(--accent-dim);
    color: var(--accent);
    border: 1px solid var(--accent-border);
    cursor: pointer;
    font-family: var(--font-ui);
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.15s;
    margin-right: 5px;
}

.btn-sm:hover { background: rgba(232,162,39,0.18); border-color: var(--accent); color: var(--accent); }

.btn-danger {
    padding: 8px 18px;
    font-size: 0.875rem;
    border-radius: var(--r-md);
    border: 1px solid var(--loss-border);
    cursor: pointer;
    background: var(--loss-dim);
    color: var(--loss);
    font-weight: 500;
    font-family: var(--font-ui);
    transition: all 0.15s;
}

.btn-danger:hover { background: rgba(244,63,94,0.18); border-color: var(--loss); }

/* ─── App Layout ─── */
.app-container { display: flex; height: 100vh; overflow: hidden; }

/* ─── Sidebar ─── */
.sidebar {
    width: 240px;
    flex-shrink: 0;
    background: linear-gradient(180deg, #060a14 0%, #07091a 100%);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.brand-lockup {
    display: flex;
    align-items: center;
    padding: 1.1rem 1.15rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    color: inherit;
}

.brand-logo {
    display: block;
    width: 190px;
    max-width: 100%;
    height: auto;
    aspect-ratio: 1265 / 375;
    object-fit: contain;
}

.sidebar nav { padding: 1rem 0.75rem; flex: 1; overflow-y: auto; }

.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    text-decoration: none;
    padding: 10px 14px;
    margin-bottom: 2px;
    border-radius: var(--r-md);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s;
    border: 1px solid transparent;
}

.sidebar nav a:hover { color: var(--text-primary); background: rgba(255,255,255,0.04); }

.sidebar nav a.active,
.featured-link {
    color: var(--accent);
    background: var(--accent-dim);
    border-color: var(--accent-border);
    font-weight: 600;
}

.sidebar-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.2rem 1rem;
    border-top: 1px solid var(--border);
    gap: 8px;
    flex-shrink: 0;
}

.sidebar-pic {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    border: 2px solid var(--accent-border);
    background: var(--card);
    box-shadow: 0 0 0 4px var(--accent-dim);
}

.sidebar-profile span { color: var(--text-muted); font-size: 0.82rem; font-weight: 500; }

/* ─── Main Content ─── */
.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }

/* ─── Topbar ─── */
.topbar {
    background: rgba(8,13,24,0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    gap: 1.5rem;
}

.ticker {
    color: var(--gain);
    font-family: var(--font-data);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 20px;
    overflow: hidden;
}

/* ─── Content Area ─── */
.content-area { padding: 2rem 2.2rem; flex: 1; overflow-y: auto; scroll-behavior: smooth; }

/* ─── Flash Messages ─── */
.flash {
    padding: 11px 16px;
    margin-bottom: 18px;
    border-radius: var(--r-md);
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.flash.success { background: var(--gain-dim); color: var(--gain); border: 1px solid var(--gain-border); }
.flash.danger  { background: var(--loss-dim); color: var(--loss); border: 1px solid var(--loss-border); }

/* ─── Forms ─── */
.form-group { margin-bottom: 18px; text-align: left; }

.form-group label {
    display: block;
    margin-bottom: 7px;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    color: var(--text-primary);
    font-family: var(--font-ui);
    font-size: 0.9rem;
    transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
    outline: none;
    -webkit-appearance: none;
}

.form-control:hover  { border-color: var(--border-hover); background: rgba(255,255,255,0.045); }

.form-control:focus {
    border-color: var(--border-focus);
    background: rgba(232,162,39,0.04);
    box-shadow: 0 0 0 3px rgba(232,162,39,0.1);
}

.form-control::placeholder { color: var(--text-dim); }

input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.6) sepia(1) saturate(3) hue-rotate(10deg);
    cursor: pointer;
}

.mt-3 { margin-top: 1.2rem; color: var(--text-muted); font-size: 0.875rem; text-align: center; }
.mt-3 a { color: var(--accent); font-weight: 500; }
.mt-3 a:hover { color: var(--accent-hover); }

/* ─── Dashboard ─── */
.dashboard-header { margin-bottom: 2rem; }
.dashboard-header h1 { font-size: 1.65rem; font-weight: 700; }

/* ─── Stats Grid ─── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card);
    padding: 1.4rem 1.5rem;
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s var(--ease);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-border), transparent);
    opacity: 0;
    transition: opacity 0.2s;
}

.stat-card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-card:hover::after { opacity: 1; }

.stat-label {
    color: var(--text-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.stat-value {
    font-family: var(--font-data);
    font-size: 1.65rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1;
}

.stat-value.gain { color: var(--gain); }
.stat-value.loss { color: var(--loss); }

/* ─── Cards ─── */
.card {
    background: var(--card);
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s, box-shadow 0.2s;
    margin-bottom: 1.4rem;
}

.card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-md); }

.card-header {
    padding: 1.2rem 1.6rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.015);
}

.card-header h2 { font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; }

.card-body { padding: 1.6rem; }

/* ─── Tables ─── */
.stock-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }

.stock-table th {
    padding: 12px 16px;
    text-align: left;
    color: var(--text-dim);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.stock-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
    vertical-align: middle;
    transition: background 0.12s;
}

.stock-table tbody tr:hover td { background: rgba(255,255,255,0.025); }
.stock-table tbody tr:last-child td { border-bottom: none; }

.symbol {
    font-family: var(--font-data);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--accent);
    letter-spacing: 0.04em;
}

.gain { color: var(--gain); font-family: var(--font-data); font-weight: 500; }
.loss { color: var(--loss); font-family: var(--font-data); font-weight: 500; }

/* ─── Empty State ─── */
.empty-state { padding: 4rem 2rem; text-align: center; }
.empty-state p { margin-bottom: 1.2rem; font-size: 0.9rem; line-height: 1.7; color: var(--text-muted); }

/* ─── Form Container ─── */
.form-container { max-width: 640px; margin: 0 auto; }
.form-row { display: flex; gap: 1rem; }
.form-row .form-group { flex: 1; }
.form-group-submit { display: flex; align-items: flex-end; }

/* ─── Stock Detail ─── */
.detail-header { margin-bottom: 2rem; }
.detail-title { margin-top: 0.75rem; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.detail-title h1 { color: var(--accent); font-size: 2.6rem; font-family: var(--font-data); font-weight: 700; display: inline; letter-spacing: -0.03em; }

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

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 1.2rem; }

.info-item {
    font-size: 0.875rem;
    color: var(--text-muted);
    padding: 12px 14px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    line-height: 1.6;
}

.description-text { color: var(--text-muted); line-height: 1.8; font-size: 0.9rem; }

.divider { border: none; border-top: 1px solid var(--border); margin: 1.6rem 0; }
.inline-form { margin: 0; }

/* ─── Sell Card ─── */
.sell-card { border-color: var(--loss-border) !important; }
.sell-card .card-header { background: var(--loss-dim); }
.sell-card .card-header h2 { color: var(--loss); }
.sell-info { margin-bottom: 1rem; color: var(--text-muted); font-size: 0.875rem; line-height: 1.7; }
.strong-text { color: var(--text-primary); font-weight: 600; font-family: var(--font-data); }

/* ─── Chat ─── */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 54px);
    background: var(--base);
    overflow: hidden;
}

.chat-header {
    background: var(--card);
    padding: 1rem 1.8rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.chat-header h2 {
    font-size: 1rem;
    color: var(--accent);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 9px;
}

.chat-header h2::before {
    content: '';
    width: 7px; height: 7px;
    background: var(--gain);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--gain);
    animation: live-pulse 2.2s infinite;
    display: inline-block;
}

@keyframes live-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.45; transform: scale(0.85); }
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.8rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 14px;
    scroll-behavior: smooth;
}

/* ─── Bubbles ─── */
.message { display: flex; max-width: 78%; }
.user-message { align-self: flex-end; flex-direction: row-reverse; }
.ai-message   { align-self: flex-start; }

.bubble { padding: 13px 18px; border-radius: 16px; line-height: 1.6; font-size: 0.9rem; }

.user-message .bubble {
    background: linear-gradient(135deg, var(--accent) 0%, #cf9120 100%);
    color: #07090e;
    border-bottom-right-radius: 4px;
    font-weight: 500;
    box-shadow: 0 4px 18px rgba(232,162,39,0.22);
}

.ai-message .bubble {
    background: var(--card-raised);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
    box-shadow: var(--shadow-sm);
}

/* Typing */
.typing-dots { display: flex; gap: 5px; padding: 18px !important; align-items: center; }
.typing-dots span {
    width: 7px; height: 7px;
    background: var(--text-dim);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}
.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }
@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); opacity: 0.4; }
    40%           { transform: scale(1); opacity: 1; }
}

/* ─── Chat Input ─── */
.chat-input-area {
    display: flex;
    gap: 10px;
    padding: 1rem 1.8rem;
    background: var(--card);
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.chat-input-area input {
    flex: 1;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 11px 16px;
    color: var(--text-primary);
    font-family: var(--font-ui);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.18s, box-shadow 0.18s;
}

.chat-input-area input:hover { border-color: var(--border-hover); }
.chat-input-area input:focus { border-color: var(--border-focus); box-shadow: 0 0 0 3px rgba(232,162,39,0.1); }
.chat-input-area input::placeholder { color: var(--text-dim); }

/* ─── Quick Chips ─── */
.quick-chips {
    display: flex;
    gap: 8px;
    padding: 10px 1.8rem;
    background: rgba(4,7,15,0.6);
    overflow-x: auto;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    scrollbar-width: none;
}
.quick-chips::-webkit-scrollbar { display: none; }

.chip {
    white-space: nowrap;
    padding: 5px 14px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--r-pill);
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.18s;
    font-family: var(--font-ui);
}
.chip:hover { background: var(--accent-dim); border-color: var(--accent-border); color: var(--accent); }

/* ─── Bubble Markdown ─── */
.bubble h1, .bubble h2, .bubble h3, .bubble h4 {
    color: var(--accent);
    margin-top: 16px; margin-bottom: 8px;
    line-height: 1.3;
}
.bubble h1 { font-size: 1.4rem; }
.bubble h2 { font-size: 1.2rem; }
.bubble h3 { font-size: 1.05rem; }
.bubble p  { margin-bottom: 10px; line-height: 1.7; }
.bubble p:last-child { margin-bottom: 0; }
.bubble ul, .bubble ol { margin: 10px 0; padding-left: 20px; }
.bubble li { margin-bottom: 6px; }
.bubble strong { color: var(--text-primary); font-weight: 600; }
.bubble em { color: var(--accent); font-style: italic; }

.bubble code {
    background: rgba(255,255,255,0.06);
    padding: 2px 7px;
    border-radius: 5px;
    font-family: var(--font-data);
    font-size: 0.85em;
    color: var(--accent);
    border: 1px solid rgba(232,162,39,0.14);
}

.bubble blockquote {
    border-left: 3px solid var(--accent-border);
    padding-left: 14px;
    margin: 12px 0;
    color: var(--text-muted);
    font-style: italic;
}

.bubble hr { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

/* ─── Profile ─── */
.profile-section { display: flex; flex-direction: column; align-items: center; padding: 1rem; }

.profile-pic-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
    padding: 4px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--accent), var(--gain), var(--accent));
}

.profile-pic {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    border: 4px solid var(--base);
    background: var(--card);
    display: block;
}

/* ─── About ─── */
.about-container { max-width: 820px; margin: 0 auto; }

.about-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.2rem;
    margin-top: 2rem;
}

.feature-item {
    background: var(--card);
    padding: 1.5rem;
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s var(--ease);
    position: relative;
    overflow: hidden;
}

.feature-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px; height: 100%;
    background: linear-gradient(180deg, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.2s;
}

.feature-item:hover { border-color: var(--border-hover); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.feature-item:hover::before { opacity: 1; }
.feature-item h3 { margin-bottom: 0.5rem; font-size: 1rem; }
.feature-item p  { color: var(--text-muted); font-size: 0.875rem; line-height: 1.65; }

/* ─── Error ─── */
.error-container { text-align: center; margin-top: 10vh; padding: 2rem; }
.error-code { font-family: var(--font-data); font-size: 7rem; font-weight: 700; color: var(--accent); line-height: 1; letter-spacing: -0.05em; }
.error-container h2 { margin: 1rem 0 0.5rem; font-size: 1.4rem; }
.error-container p  { margin-bottom: 2.2rem; color: var(--text-muted); font-size: 0.95rem; }

/* ─── Scrollbars ─── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: var(--r-pill); }
::-webkit-scrollbar-thumb:hover { background: rgba(148,163,184,0.28); }

/* ─── Responsive ─── */
@media (max-width: 1024px) {
    .sidebar { width: 200px; }
    .content-area { padding: 1.5rem; }
}

@media (max-width: 768px) {
    .sidebar { width: 100%; height: auto; border-right: none; border-bottom: 1px solid var(--border); }
    .app-container { flex-direction: column; height: auto; min-height: 100vh; }
    .main-content { overflow: visible; }
    .content-area { padding: 1.2rem; }
    .topbar { padding: 0 1.2rem; }
    .info-grid { grid-template-columns: 1fr; }
    .form-row { flex-direction: column; gap: 0; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .chat-container { height: calc(100svh - 100px); }
    .chat-messages { padding: 1.2rem; }
    .chat-input-area, .quick-chips { padding: 0.8rem 1rem; }
}
