/* ==========================================================
   GrowthPilot — Workforce Growth OS
   Light theme default, dark theme via [data-theme="dark"]
   Typography: Sora (Google Fonts) + Inter fallback
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

/* ---------- Tokens ---------- */
:root {
    --gp-brand-1: #1a3a8a;
    --gp-brand-2: #0aa6a0;
    --gp-brand-3: #7dd3c0;

    --gp-bg: #f8fafc;
    --gp-bg-elev: #ffffff;
    --gp-bg-soft: #f1f5f9;
    --gp-bg-hover: #f1f5f9;

    --gp-text: #0f172a;
    --gp-text-soft: #475569;
    --gp-text-muted: #94a3b8;

    --gp-border: #e2e8f0;
    --gp-border-strong: #cbd5e1;

    --gp-primary: #1a3a8a;
    --gp-primary-hover: #142f72;
    --gp-primary-soft: #e8eefb;
    --gp-accent: #0aa6a0;
    --gp-accent-hover: #08847f;
    --gp-accent-soft: #e0f5f3;

    --gp-success: #10b981;
    --gp-warning: #f59e0b;
    --gp-danger: #ef4444;
    --gp-info: #0ea5e9;

    --gp-radius: 12px;
    --gp-radius-sm: 8px;
    --gp-radius-lg: 18px;

    --gp-shadow-sm: 0 1px 2px rgba(15,23,42,0.05);
    --gp-shadow: 0 4px 12px rgba(15,23,42,0.06);
    --gp-shadow-lg: 0 12px 32px rgba(15,23,42,0.10);

    --gp-sidebar-w: 264px;
    --gp-topbar-h: 64px;

    --gp-font: 'Sora', 'Inter', system-ui, -apple-system, sans-serif;
    --gp-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

[data-theme="dark"] {
    --gp-bg: #0b1220;
    --gp-bg-elev: #111a2e;
    --gp-bg-soft: #1a2440;
    --gp-bg-hover: #1f2c4d;

    --gp-text: #e2e8f0;
    --gp-text-soft: #94a3b8;
    --gp-text-muted: #64748b;

    --gp-border: #1f2c4d;
    --gp-border-strong: #334069;

    --gp-primary: #4f8af0;
    --gp-primary-hover: #6ea0f5;
    --gp-primary-soft: #1a2a52;
    --gp-accent: #2ec5b6;
    --gp-accent-hover: #44d9c7;
    --gp-accent-soft: #15302d;

    --gp-shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --gp-shadow: 0 4px 12px rgba(0,0,0,0.35);
    --gp-shadow-lg: 0 12px 32px rgba(0,0,0,0.5);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
    font-family: var(--gp-font);
    font-size: 14px;
    line-height: 1.55;
    color: var(--gp-text);
    background: var(--gp-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
img, svg { max-width: 100%; vertical-align: middle; }
a { color: var(--gp-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1,h2,h3,h4,h5 { font-family: var(--gp-font); font-weight: 700; letter-spacing: -0.01em; margin: 0 0 0.6rem; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
h4 { font-size: 0.95rem; }
p { margin: 0 0 0.8rem; }
code { font-family: var(--gp-font-mono); font-size: 0.85em; background: var(--gp-bg-soft); padding: 1px 5px; border-radius: 4px; }
hr { border: none; border-top: 1px solid var(--gp-border); margin: 1.5rem 0; }

/* ---------- Layout ---------- */
.app-shell {
    display: grid;
    grid-template-columns: var(--gp-sidebar-w) 1fr;
    grid-template-rows: var(--gp-topbar-h) 1fr;
    grid-template-areas:
      "sidebar topbar"
      "sidebar main";
    min-height: 100vh;
}
.app-sidebar { grid-area: sidebar; background: var(--gp-bg-elev); border-right: 1px solid var(--gp-border); position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 30; }
.app-topbar { grid-area: topbar; background: var(--gp-bg-elev); border-bottom: 1px solid var(--gp-border); display: flex; align-items: center; padding: 0 1.5rem; gap: 1rem; position: sticky; top: 0; z-index: 20; }
.app-main { grid-area: main; padding: 1.75rem 2rem; max-width: 1400px; width: 100%; }

@media (max-width: 920px) {
    .app-shell { grid-template-columns: 1fr; grid-template-areas: "topbar" "main"; }
    .app-sidebar { position: fixed; left: -100%; width: 280px; transition: left 0.25s; box-shadow: var(--gp-shadow-lg); }
    .app-sidebar.open { left: 0; }
    .app-main { padding: 1rem; }
}

/* ---------- Sidebar ---------- */
.sidebar-brand { display: flex; align-items: center; gap: 0.6rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--gp-border); }
.sidebar-brand img { width: 32px; height: 32px; }
.sidebar-brand .brand-text { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.02em; }
.sidebar-brand .brand-text span { color: var(--gp-accent); }

.sidebar-nav { padding: 0.75rem 0.6rem; }
.sidebar-section { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; color: var(--gp-text-muted); letter-spacing: 1.4px; padding: 1rem 0.7rem 0.4rem; }
.sidebar-link {
    display: flex; align-items: center; gap: 0.65rem;
    padding: 0.55rem 0.75rem; border-radius: var(--gp-radius-sm);
    color: var(--gp-text-soft); font-weight: 500; font-size: 0.9rem;
    margin-bottom: 2px; cursor: pointer; transition: all 0.12s;
}
.sidebar-link:hover { background: var(--gp-bg-hover); color: var(--gp-text); text-decoration: none; }
.sidebar-link.active { background: var(--gp-primary-soft); color: var(--gp-primary); font-weight: 600; }
.sidebar-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-link .badge { margin-left: auto; }

/* ---------- Topbar ---------- */
.topbar-search { flex: 1; max-width: 480px; position: relative; }
.topbar-search input {
    width: 100%; padding: 0.5rem 0.75rem 0.5rem 2.25rem;
    border: 1px solid var(--gp-border); border-radius: var(--gp-radius-sm);
    background: var(--gp-bg-soft); color: var(--gp-text); font-size: 0.9rem;
}
.topbar-search input:focus { outline: 2px solid var(--gp-primary); outline-offset: -1px; border-color: transparent; }
.topbar-search svg { position: absolute; left: 0.7rem; top: 50%; transform: translateY(-50%); width: 16px; color: var(--gp-text-muted); }

.topbar-actions { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; }
.topbar-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid transparent; background: transparent; color: var(--gp-text-soft); cursor: pointer; position: relative; }
.topbar-btn:hover { background: var(--gp-bg-soft); color: var(--gp-text); }
.topbar-btn .dot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; background: var(--gp-danger); border-radius: 50%; border: 2px solid var(--gp-bg-elev); }

.user-chip { display: flex; align-items: center; gap: 0.6rem; padding: 0.3rem 0.4rem 0.3rem 0.7rem; border-radius: 999px; cursor: pointer; }
.user-chip:hover { background: var(--gp-bg-soft); }
.user-chip .avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--gp-brand-1), var(--gp-brand-2)); color: white; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 0.8rem; }
.user-chip .name { font-weight: 600; font-size: 0.85rem; }
.user-chip .role { font-size: 0.7rem; color: var(--gp-text-muted); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
    padding: 0.5rem 1rem; font-family: var(--gp-font); font-weight: 600; font-size: 0.875rem;
    border-radius: var(--gp-radius-sm); border: 1px solid var(--gp-border-strong);
    background: var(--gp-bg-elev); color: var(--gp-text); cursor: pointer;
    text-decoration: none; transition: all 0.15s; white-space: nowrap;
}
.btn:hover { background: var(--gp-bg-soft); text-decoration: none; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--gp-primary); border-color: var(--gp-primary); color: white; }
.btn-primary:hover { background: var(--gp-primary-hover); border-color: var(--gp-primary-hover); }
.btn-accent { background: var(--gp-accent); border-color: var(--gp-accent); color: white; }
.btn-accent:hover { background: var(--gp-accent-hover); border-color: var(--gp-accent-hover); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--gp-bg-soft); }
.btn-danger { background: var(--gp-danger); border-color: var(--gp-danger); color: white; }
.btn-danger:hover { filter: brightness(0.9); }
.btn-lg { padding: 0.75rem 1.4rem; font-size: 0.95rem; }
.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.8rem; }
.btn-block { display: flex; width: 100%; }

/* ---------- Forms ---------- */
label { display: block; font-weight: 600; font-size: 0.8rem; color: var(--gp-text-soft); margin-bottom: 0.3rem; margin-top: 0.85rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="date"], input[type="datetime-local"], input[type="search"], input[type="url"],
input[type="tel"], select, textarea {
    width: 100%; padding: 0.55rem 0.75rem;
    border: 1px solid var(--gp-border-strong); border-radius: var(--gp-radius-sm);
    background: var(--gp-bg-elev); color: var(--gp-text);
    font-family: var(--gp-font); font-size: 0.9rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--gp-primary);
    box-shadow: 0 0 0 3px var(--gp-primary-soft);
}
textarea { min-height: 90px; resize: vertical; font-family: var(--gp-font); }

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }
.row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.85rem; }
@media (max-width: 600px) { .row-2, .row-3 { grid-template-columns: 1fr; } }

.form-help { font-size: 0.78rem; color: var(--gp-text-muted); margin-top: 0.25rem; }

.checkbox { display: inline-flex; align-items: center; gap: 0.4rem; cursor: pointer; }
.checkbox input { width: 16px; height: 16px; accent-color: var(--gp-primary); }

.toggle { position: relative; display: inline-block; width: 40px; height: 22px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle .slider { position: absolute; inset: 0; background: var(--gp-border-strong); border-radius: 22px; cursor: pointer; transition: 0.2s; }
.toggle .slider::before { content: ""; position: absolute; height: 16px; width: 16px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: 0.2s; }
.toggle input:checked + .slider { background: var(--gp-accent); }
.toggle input:checked + .slider::before { transform: translateX(18px); }

/* ---------- Cards ---------- */
.card {
    background: var(--gp-bg-elev); border: 1px solid var(--gp-border);
    border-radius: var(--gp-radius); padding: 1.25rem;
    box-shadow: var(--gp-shadow-sm);
}
.card-pad-lg { padding: 1.75rem; }
.card-flush { padding: 0; }
.card-header { padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--gp-border); display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.card-header h3 { margin: 0; font-size: 1rem; }
.card-body { padding: 1.25rem; }

/* ---------- Stats / Widgets ---------- */
.stat-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-bottom: 1.5rem; }
.stat {
    background: var(--gp-bg-elev); border: 1px solid var(--gp-border);
    border-radius: var(--gp-radius); padding: 1.1rem 1.25rem;
    box-shadow: var(--gp-shadow-sm);
}
.stat .stat-label { font-size: 0.75rem; color: var(--gp-text-muted); text-transform: uppercase; letter-spacing: 0.6px; font-weight: 600; }
.stat .stat-value { font-size: 1.85rem; font-weight: 700; line-height: 1.1; margin-top: 0.35rem; letter-spacing: -0.02em; }
.stat .stat-meta { font-size: 0.78rem; color: var(--gp-text-soft); margin-top: 0.45rem; }
.stat.brand { background: linear-gradient(135deg, var(--gp-brand-1), var(--gp-brand-2)); color: white; border-color: transparent; }
.stat.brand .stat-label, .stat.brand .stat-meta { color: rgba(255,255,255,0.85); }

/* ---------- Tables ---------- */
.gp-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.gp-table th { text-align: left; font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.6px; color: var(--gp-text-muted); padding: 0.7rem 0.85rem; border-bottom: 1px solid var(--gp-border); background: var(--gp-bg-soft); }
.gp-table td { padding: 0.7rem 0.85rem; border-bottom: 1px solid var(--gp-border); vertical-align: middle; }
.gp-table tbody tr:hover { background: var(--gp-bg-soft); }
.gp-table .actions { white-space: nowrap; text-align: right; }

/* ---------- Pills/badges ---------- */
.badge {
    display: inline-flex; align-items: center; gap: 0.3rem;
    padding: 0.15rem 0.55rem; border-radius: 999px;
    font-size: 0.72rem; font-weight: 600;
    background: var(--gp-bg-soft); color: var(--gp-text-soft);
    border: 1px solid var(--gp-border);
}
.badge-success { background: rgba(16,185,129,0.12); color: #047857; border-color: rgba(16,185,129,0.3); }
.badge-warning { background: rgba(245,158,11,0.14); color: #b45309; border-color: rgba(245,158,11,0.35); }
.badge-danger { background: rgba(239,68,68,0.13); color: #b91c1c; border-color: rgba(239,68,68,0.3); }
.badge-info { background: rgba(14,165,233,0.13); color: #0369a1; border-color: rgba(14,165,233,0.3); }
.badge-primary { background: var(--gp-primary-soft); color: var(--gp-primary); border-color: rgba(26,58,138,0.2); }
.badge-accent { background: var(--gp-accent-soft); color: var(--gp-accent); border-color: rgba(10,166,160,0.25); }
[data-theme="dark"] .badge-success { color: #6ee7b7; }
[data-theme="dark"] .badge-warning { color: #fbbf24; }
[data-theme="dark"] .badge-danger { color: #fca5a5; }
[data-theme="dark"] .badge-info { color: #7dd3fc; }

/* ---------- Alerts ---------- */
.alert { padding: 0.75rem 1rem; border-radius: var(--gp-radius-sm); border: 1px solid; margin-bottom: 1rem; font-size: 0.88rem; }
.alert-error { background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.3); color: #b91c1c; }
.alert-success { background: rgba(16,185,129,0.08); border-color: rgba(16,185,129,0.3); color: #047857; }
.alert-info { background: rgba(14,165,233,0.08); border-color: rgba(14,165,233,0.3); color: #0369a1; }
.alert-warning { background: rgba(245,158,11,0.08); border-color: rgba(245,158,11,0.3); color: #b45309; }
[data-theme="dark"] .alert-error { color: #fca5a5; }
[data-theme="dark"] .alert-success { color: #6ee7b7; }
[data-theme="dark"] .alert-info { color: #7dd3fc; }
[data-theme="dark"] .alert-warning { color: #fbbf24; }

/* ---------- Progress ---------- */
.progress { width: 100%; height: 8px; background: var(--gp-bg-soft); border-radius: 99px; overflow: hidden; }
.progress > .bar { height: 100%; background: linear-gradient(90deg, var(--gp-brand-1), var(--gp-brand-2)); transition: width 0.5s; }
.progress-ring { width: 56px; height: 56px; }
.progress-ring circle { fill: none; stroke-width: 6; transform: rotate(-90deg); transform-origin: 50% 50%; }
.progress-ring .track { stroke: var(--gp-bg-soft); }
.progress-ring .bar { stroke: var(--gp-accent); stroke-linecap: round; transition: stroke-dashoffset 0.5s; }

/* ---------- Page header ---------- */
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.page-header h1 { margin: 0 0 0.25rem; font-size: 1.5rem; }
.page-header .subtitle { color: var(--gp-text-soft); font-size: 0.9rem; margin: 0; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--gp-border); margin-bottom: 1.25rem; overflow-x: auto; }
.tab { padding: 0.65rem 1rem; font-weight: 500; color: var(--gp-text-soft); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; font-size: 0.9rem; }
.tab:hover { color: var(--gp-text); text-decoration: none; }
.tab.active { color: var(--gp-primary); border-bottom-color: var(--gp-primary); font-weight: 600; }

/* ---------- Modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,0.45); display: none; align-items: center; justify-content: center; z-index: 100; backdrop-filter: blur(4px); padding: 1rem; }
.modal-backdrop.open { display: flex; }
.modal { background: var(--gp-bg-elev); border-radius: var(--gp-radius-lg); width: 100%; max-width: 540px; max-height: 90vh; overflow-y: auto; box-shadow: var(--gp-shadow-lg); }
.modal-lg { max-width: 800px; }
.modal-xl { max-width: 1100px; }
.modal-header { padding: 1.1rem 1.5rem; border-bottom: 1px solid var(--gp-border); display: flex; align-items: center; justify-content: space-between; }
.modal-header h3 { margin: 0; }
.modal-body { padding: 1.5rem; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--gp-border); display: flex; gap: 0.5rem; justify-content: flex-end; }

/* ---------- Companion-specific ---------- */
.companion-shell { max-width: 720px; margin: 0 auto; padding: 1rem; padding-bottom: 6rem; }
.hero-card {
    background: linear-gradient(135deg, var(--gp-brand-1), var(--gp-brand-2));
    color: white; border-radius: var(--gp-radius-lg); padding: 1.5rem;
    margin-bottom: 1.25rem; box-shadow: var(--gp-shadow);
}
.hero-card .greeting { font-size: 0.9rem; opacity: 0.9; }
.hero-card .name { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; margin-top: 0.2rem; }
.hero-card .next-action { background: rgba(255,255,255,0.15); border-radius: var(--gp-radius-sm); padding: 0.75rem 1rem; margin-top: 1rem; backdrop-filter: blur(8px); }

.task-card {
    display: flex; align-items: center; gap: 0.85rem;
    padding: 0.85rem 1rem; background: var(--gp-bg-elev);
    border: 1px solid var(--gp-border); border-radius: var(--gp-radius);
    margin-bottom: 0.6rem; cursor: pointer; transition: all 0.15s;
}
.task-card:hover { border-color: var(--gp-primary); box-shadow: var(--gp-shadow); text-decoration: none; }
.task-card .icon { width: 40px; height: 40px; border-radius: 10px; background: var(--gp-primary-soft); color: var(--gp-primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.task-card .meta { flex: 1; min-width: 0; }
.task-card .title { font-weight: 600; color: var(--gp-text); margin: 0; }
.task-card .sub { font-size: 0.78rem; color: var(--gp-text-muted); }
.task-card .arrow { color: var(--gp-text-muted); }

.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--gp-bg-elev); border-top: 1px solid var(--gp-border);
    display: flex; justify-content: space-around; padding: 0.5rem;
    z-index: 30; box-shadow: 0 -2px 12px rgba(15,23,42,0.05);
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
}
.bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0.4rem 0.7rem; color: var(--gp-text-muted); font-size: 0.7rem; font-weight: 500; border-radius: var(--gp-radius-sm); }
.bottom-nav a:hover { text-decoration: none; }
.bottom-nav a.active { color: var(--gp-primary); }
.bottom-nav a svg { width: 22px; height: 22px; }

/* ---------- Chat ---------- */
.chat-shell { display: flex; flex-direction: column; height: calc(100vh - var(--gp-topbar-h) - 4rem); border: 1px solid var(--gp-border); border-radius: var(--gp-radius); background: var(--gp-bg-elev); }
.chat-messages { flex: 1; overflow-y: auto; padding: 1rem 1.5rem; display: flex; flex-direction: column; gap: 0.85rem; }
.chat-message { display: flex; gap: 0.65rem; max-width: 85%; }
.chat-message.user { align-self: flex-end; flex-direction: row-reverse; }
.chat-message .bubble { padding: 0.7rem 1rem; border-radius: 14px; background: var(--gp-bg-soft); color: var(--gp-text); font-size: 0.9rem; line-height: 1.5; }
.chat-message.user .bubble { background: var(--gp-primary); color: white; }
.chat-message .avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--gp-accent-soft); color: var(--gp-accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.chat-message.user .avatar { background: var(--gp-primary-soft); color: var(--gp-primary); }
.chat-sources { margin-top: 0.5rem; font-size: 0.75rem; }
.chat-sources a { display: inline-block; margin-right: 0.4rem; padding: 0.15rem 0.5rem; border: 1px solid var(--gp-border); border-radius: 99px; color: var(--gp-text-soft); }
.chat-input { display: flex; gap: 0.5rem; padding: 0.75rem; border-top: 1px solid var(--gp-border); background: var(--gp-bg-elev); }
.chat-input textarea { flex: 1; min-height: 40px; max-height: 140px; resize: none; }
.chat-typing { font-size: 0.8rem; color: var(--gp-text-muted); padding: 0 1.5rem 0.5rem; }

/* ---------- Install screen ---------- */
.install-body { background: linear-gradient(135deg, #f8fafc, #e0f5f3); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.install-shell { max-width: 520px; width: 100%; }
.install-brand { text-align: center; margin-bottom: 1.75rem; }
.install-brand .install-logo { width: 64px; height: 64px; }
.install-brand h1 { font-size: 2rem; margin: 0.5rem 0 0.2rem; }
.install-brand .tagline { color: var(--gp-text-soft); margin: 0; font-size: 0.95rem; }
.install-card { background: white; border-radius: var(--gp-radius-lg); padding: 2rem; box-shadow: var(--gp-shadow-lg); }
.install-steps { display: flex; gap: 1rem; margin-bottom: 1.5rem; }
.install-steps .step { flex: 1; text-align: center; padding: 0.5rem; font-size: 0.8rem; font-weight: 600; color: var(--gp-text-muted); border-bottom: 2px solid var(--gp-border); }
.install-steps .step.active { color: var(--gp-primary); border-bottom-color: var(--gp-primary); }
.install-footer { text-align: center; margin-top: 1.5rem; color: var(--gp-text-muted); font-size: 0.78rem; }

/* ---------- Login screen ---------- */
.login-body { background: linear-gradient(135deg, #f8fafc, #e0f5f3); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; }
[data-theme="dark"] .login-body, [data-theme="dark"] .install-body { background: linear-gradient(135deg, #0b1220, #15302d); }
.login-card { background: var(--gp-bg-elev); border-radius: var(--gp-radius-lg); padding: 2.25rem; max-width: 420px; width: 100%; box-shadow: var(--gp-shadow-lg); }
.login-brand { text-align: center; margin-bottom: 1.75rem; }
.login-brand img { height: 52px; }
.login-brand p { color: var(--gp-text-soft); font-size: 0.85rem; margin: 0.5rem 0 0; }

/* ---------- Landing page ---------- */
.landing-body { background: var(--gp-bg); }
.landing-nav { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 2rem; max-width: 1200px; margin: 0 auto; }
.landing-hero { max-width: 1200px; margin: 0 auto; padding: 4rem 2rem; text-align: center; }
.landing-hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.1; letter-spacing: -0.03em; }
.landing-hero h1 .grad { background: linear-gradient(135deg, var(--gp-brand-1), var(--gp-brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.landing-hero .lead { font-size: 1.15rem; color: var(--gp-text-soft); max-width: 620px; margin: 1rem auto 2rem; }
.landing-features { max-width: 1200px; margin: 0 auto; padding: 2rem; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.landing-feature { background: var(--gp-bg-elev); padding: 1.5rem; border-radius: var(--gp-radius); border: 1px solid var(--gp-border); }
.landing-feature .ico { width: 40px; height: 40px; background: var(--gp-primary-soft); color: var(--gp-primary); border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 0.75rem; }

/* ---------- Misc ---------- */
.muted { color: var(--gp-text-muted); }
.text-soft { color: var(--gp-text-soft); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.flex-gap { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.gap-1 { gap: 0.5rem; } .gap-2 { gap: 1rem; }
.mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.hide { display: none !important; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
@media (max-width: 720px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.empty-state { text-align: center; padding: 3rem 1.5rem; color: var(--gp-text-muted); }
.empty-state svg { width: 48px; height: 48px; opacity: 0.4; margin-bottom: 1rem; }

.skeleton { background: linear-gradient(90deg, var(--gp-bg-soft), var(--gp-bg-hover), var(--gp-bg-soft)); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--gp-radius-sm); }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

/* Print friendly */
@media print {
    .app-sidebar, .app-topbar, .bottom-nav, .btn, .topbar-actions { display: none !important; }
    .app-shell { grid-template-columns: 1fr; grid-template-areas: "main"; }
    .app-main { padding: 0; }
}

/* Toast */
#gp-toasts { position: fixed; top: 1rem; right: 1rem; display: flex; flex-direction: column; gap: 0.5rem; z-index: 200; }
.gp-toast { background: var(--gp-bg-elev); border: 1px solid var(--gp-border); border-left: 4px solid var(--gp-primary); padding: 0.75rem 1rem; border-radius: var(--gp-radius-sm); box-shadow: var(--gp-shadow-lg); min-width: 240px; font-size: 0.88rem; animation: slideIn 0.25s; }
.gp-toast.success { border-left-color: var(--gp-success); }
.gp-toast.error { border-left-color: var(--gp-danger); }
.gp-toast.warning { border-left-color: var(--gp-warning); }
@keyframes slideIn { from { transform: translateX(120%); } to { transform: translateX(0); } }

/* Visual journey graph */
.journey-tree { display: flex; flex-direction: column; gap: 0.5rem; }
.journey-node { background: var(--gp-bg-elev); border: 1px solid var(--gp-border); border-radius: var(--gp-radius); padding: 0.85rem 1rem; display: flex; align-items: center; gap: 0.85rem; }
.journey-node.completed { border-color: var(--gp-success); background: rgba(16,185,129,0.05); }
.journey-node.in-progress { border-color: var(--gp-primary); }
.journey-node.locked { opacity: 0.55; }
.journey-node .seq { width: 32px; height: 32px; border-radius: 50%; background: var(--gp-primary-soft); color: var(--gp-primary); display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; font-size: 0.85rem; }
.journey-node.completed .seq { background: var(--gp-success); color: white; }

.skill-bar { display: grid; grid-template-columns: 200px 1fr 50px; gap: 0.85rem; align-items: center; padding: 0.5rem 0; border-bottom: 1px dashed var(--gp-border); }
.skill-bar:last-child { border-bottom: none; }
.skill-bar .name { font-size: 0.85rem; }
.skill-bar .pct { text-align: right; font-weight: 600; font-size: 0.85rem; }

/* --- Scrollbar (subtle) --- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gp-border-strong); border-radius: 99px; border: 2px solid var(--gp-bg); }
::-webkit-scrollbar-thumb:hover { background: var(--gp-text-muted); }
