/* =============================================================================
   Urban Intelligence — Civic Terminal additions
   Layers on top of styles/app.css. Loaded after the base sheet so vars resolve.
   ============================================================================= */

/* ── Live ticker (top band) ─────────────────────────────────────────────────── */
.ticker {
    height: 28px;
    background: #0a0a0a;
    color: #fafaf9;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 12px;
    overflow: hidden;
    font-family: var(--font-mono);
    font-size: 11.5px;
    position: relative;
    min-width: 0;
    width: 100%;
}
.ticker-label {
    color: var(--primary);
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-size: 10px;
    padding-right: 12px;
    border-right: 1px solid #292524;
    height: 100%;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.ticker-label .dot.live {
    background: #fb923c;
    box-shadow: 0 0 0 3px rgba(251,146,60,0.2);
    margin-right: 7px;
    width: 6px; height: 6px;
}
.ticker-track {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    position: relative;
    height: 100%;
}
.ticker-rail {
    display: inline-flex;
    align-items: center;
    gap: 28px;
    height: 100%;
    animation: ticker-scroll 72s linear infinite;
    white-space: nowrap;
    padding-right: 28px;
}
.ticker-item {
    color: #d6d3c8;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.ticker-item .ticker-time { color: #78716c; }
.ticker-item .ticker-arrow { color: #44403c; }
.ticker-item .ticker-sector { color: var(--primary); }
.ticker-item .ticker-zone { color: #a78bfa; font-weight: 500; }
.ticker-item .ticker-status-err { color: #f87171; }
.ticker-item .ticker-status-ok { color: #34d399; }
.ticker-item .ticker-dur { color: #fbbf24; }
@keyframes ticker-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
.ticker:hover .ticker-rail { animation-play-state: paused; }

/* ── Hairline decoration ────────────────────────────────────────────────────── */
.hairline {
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border-strong), transparent);
    margin: var(--sp-3) 0;
}

/* ── Section eyebrow (subtle) ──────────────────────────────────────────────– */
.section-eyebrow {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--text-sub);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.section-eyebrow::before, .section-eyebrow::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}
.section-eyebrow.left::before { display: none; }
.section-eyebrow.left { justify-content: flex-start; }
.section-eyebrow.left::after { display: none; }

/* ── Stat dial (donut with serif center) ───────────────────────────────────── */
.stat-dial-num {
    font-family: var(--font-display);
    font-weight: 400;
    letter-spacing: -0.02em;
}

/* ── Pricing tier — terminal style ─────────────────────────────────────────── */
.tier.current::before {
    content: '';
    position: absolute;
    inset: -1px;
    border: 1px solid var(--primary);
    border-radius: var(--radius-lg);
    pointer-events: none;
}

/* ── Mark (display italic for emphasis) ────────────────────────────────────── */
.mark-italic { font-style: italic; font-weight: 600; color: var(--primary); }

/* ── Login chrome ──────────────────────────────────────────────────────────── */
.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--bg);
}
.auth-aside {
    background: #0a0a0a;
    color: #fafaf9;
    padding: 48px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}
.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
}
.auth-card {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.auth-eyebrow {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.auth-title {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.025em;
}
.auth-aside-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
}
.auth-aside-brand-mark {
    width: 36px; height: 36px;
    background: var(--primary);
    display: flex; align-items: center; justify-content: center;
    border-radius: 6px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
}
.auth-aside-brand-name {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.auth-aside-brand-sub {
    font-family: var(--font-mono);
    font-size: 10px;
    color: #a8a29e;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
.auth-grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(251,146,60,0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(251,146,60,0.06) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(ellipse at 30% 60%, black, transparent 70%);
    pointer-events: none;
}
.auth-headline {
    font-family: var(--font-display);
    font-size: 40px;
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -0.025em;
    max-width: 460px;
    margin-top: auto;
    margin-bottom: 24px;
    position: relative;
}
.auth-sub {
    font-size: 14px;
    color: #a8a29e;
    max-width: 380px;
    margin-bottom: 32px;
    position: relative;
    line-height: 1.6;
}
.auth-quotes {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: auto;
    padding-top: 24px;
    border-top: 1px solid #292524;
    font-family: var(--font-mono);
    font-size: 11px;
    color: #78716c;
    letter-spacing: 0.02em;
    position: relative;
}
.auth-quotes .row-tight { display: flex; align-items: center; gap: 10px; }
.auth-quotes .ok { color: #34d399; }
.auth-quotes .warn { color: #fbbf24; }

/* ── Onboarding ────────────────────────────────────────────────────────────── */
.onboard-shell {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 500;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
.onboard-top {
    padding: 20px 32px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-card);
    display: flex;
    align-items: center;
    gap: 24px;
}
.onboard-body {
    flex: 1;
    max-width: 760px;
    width: 100%;
    margin: 0 auto;
    padding: 48px 32px;
}
.onboard-step-dot {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--bg-sec);
    border: 1px solid var(--border-strong);
    color: var(--text-sub);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-family: var(--font-mono);
    font-weight: 500;
    flex-shrink: 0;
}
.onboard-step-dot.done { background: var(--primary); border-color: var(--primary); color: #fff; }
.onboard-step-dot.active { background: var(--bg-card); border-color: var(--primary); color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.onboard-step-line { flex: 1; height: 1px; background: var(--border); }
.onboard-step-line.done { background: var(--primary); }
.onboard-step-label {
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-sub);
}
.onboard-step-label.active { color: var(--text); }

/* ── Card with quiet ornament ──────────────────────────────────────────────── */
.card.serif-h h3, .card.serif-h .card-title-h {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 15px;
}

/* ── Topbar refinements for terminal ───────────────────────────────────────── */
.topbar { backdrop-filter: blur(6px); }
.topbar-search {
    font-family: var(--font-mono);
    font-size: 11.5px;
    letter-spacing: 0.02em;
}
.topbar-avatar-name { font-family: var(--font-body); }
.topbar-avatar-role {
    font-family: var(--font-mono);
    font-size: 9.5px;
    letter-spacing: 0.14em;
}

/* ── Numerics globally ─────────────────────────────────────────────────────── */
.txt-num, .num {
    font-variant-numeric: tabular-nums lining-nums;
}

/* ── Avatar dropdown ────────────────────────────────────────────────────────── */
.avatar-menu {
    position: relative;
}
.avatar-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 176px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 200;
    overflow: hidden;
    animation: fade-in 0.12s ease;
}
.avatar-menu-item {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 9px 14px;
    font-size: 13px;
    font-family: var(--font-body);
    color: var(--text);
    background: transparent;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.12s;
}
.avatar-menu-item:hover {
    background: var(--border);
}
.avatar-menu-item.danger { color: var(--danger); }
.avatar-menu-divider {
    height: 1px;
    background: var(--border);
    margin: 3px 0;
}
.avatar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 199;
}
@keyframes fade-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}
