/* ================================================================
   DASHBOARD + AUTH — built on the "Signal" tokens from signal.css
   (warm graphite panel × copper conductor × teal trace). Nothing here
   redefines a colour: every value below is a var() from that system, so
   a palette change there carries through automatically.
   ================================================================ */

/* ── shared shell ── */
.dash-main, .auth-main {
    min-height: 70vh;
    padding: 3rem 1.5rem 5rem;
}

.dash-wrap { max-width: 1080px; margin: 0 auto; }
.auth-wrap { max-width: 420px; margin: 0 auto; }

/* ── sign-in ── */
.auth-card {
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: var(--panel-radius);
    padding: 2.25rem 2rem;
    box-shadow: var(--shadow-md);
}

.auth-title {
    font-family: var(--font-display);
    font-variation-settings: 'wdth' 112;
    font-size: 1.6rem;
    letter-spacing: -0.01em;
    margin-bottom: 0.5rem;
}

.auth-sub {
    color: var(--ink-dim);
    font-size: 0.92rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.auth-field { margin-bottom: 1rem; }

.auth-field label {
    display: block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-dim);
    margin-bottom: 0.4rem;
}

.auth-optional { text-transform: none; letter-spacing: 0; color: var(--ink-faint); }

.auth-field input {
    width: 100%;
    padding: 0.7rem 0.85rem;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.auth-field input:focus {
    outline: none;
    border-color: var(--border-hi);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.auth-submit { width: 100%; margin-top: 0.5rem; }

.btn-google {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 0.7rem 1rem;
    background: var(--ink);
    color: var(--bg-deep);
    border: 1px solid transparent;
    border-radius: 4px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-google:hover:not(:disabled) { background: #fff; transform: translateY(-1px); }
.btn-google:disabled { opacity: 0.55; cursor: not-allowed; }
.g-mark { width: 18px; height: 18px; flex: none; }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.4rem 0;
    color: var(--ink-faint);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.auth-footnote {
    margin-top: 1.5rem;
    color: var(--ink-faint);
    font-size: 0.82rem;
    line-height: 1.6;
    text-align: center;
}

.login-status {
    min-height: 1.4rem;
    margin-top: 0.9rem;
    font-size: 0.88rem;
    color: var(--ink-dim);
}

.login-status-ok  { color: var(--success); }
.login-status-err { color: var(--danger); }

.verify-email {
    font-family: var(--font-mono);
    color: var(--ink);
    overflow-wrap: anywhere;
}

/* ── dashboard header ── */
.dash-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding-bottom: 1.25rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.dash-h1 {
    font-family: var(--font-display);
    font-variation-settings: 'wdth' 112;
    font-size: 1.75rem;
    letter-spacing: -0.01em;
}

.dash-email { color: var(--ink-faint); font-family: var(--font-mono); font-size: 0.82rem; }

.dash-head-right { display: flex; align-items: center; gap: 1rem; }

.badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.badge-pro     { background: var(--primary); color: var(--bg-deep); }
.badge-daypass { background: var(--trace); color: var(--bg-deep); }
.badge-free    { background: var(--bg-deep); color: var(--ink-faint); border: 1px solid var(--border); }

/* ── layout: sidebar + panel ── */
.dash-body {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2.5rem;
    align-items: start;
}

.dash-nav ul { list-style: none; position: sticky; top: 5rem; }

.dash-nav a {
    display: block;
    padding: 0.55rem 0.8rem;
    margin-bottom: 0.15rem;
    color: var(--ink-dim);
    text-decoration: none;
    font-size: 0.9rem;
    border-left: 2px solid transparent;
    border-radius: 0 3px 3px 0;
    transition: var(--transition-fast);
}

.dash-nav a:hover { color: var(--ink); background: var(--bg-raised); }

.dash-nav a.is-active {
    color: var(--primary-hi);
    border-left-color: var(--primary);
    background: var(--bg-raised);
    font-weight: 600;
}

.dash-panel { min-width: 0; }  /* lets wide tables scroll instead of blowing out the grid */

/* ── cards ── */
.card {
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: var(--panel-radius);
    padding: 1.5rem 1.6rem;
    margin-bottom: 1.25rem;
}

.card-status { border-left: 3px solid var(--primary); }
.card-danger { border-color: oklch(0.62 0.21 25 / 0.35); }

.card-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.card-h2 {
    font-family: var(--font-display);
    font-variation-settings: 'wdth' 108;
    font-size: 1.05rem;
    letter-spacing: 0.01em;
    margin-bottom: 0.6rem;
}

.card-head .card-h2 { margin-bottom: 0; }

.card-lead { color: var(--ink-dim); font-size: 0.92rem; line-height: 1.65; }
.card-lead strong { color: var(--ink); }

.card-more {
    font-size: 0.82rem;
    color: var(--trace);
    text-decoration: none;
    white-space: nowrap;
}

.card-more:hover { text-decoration: underline; }

.note {
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--border);
    color: var(--ink-faint);
    font-size: 0.82rem;
    line-height: 1.6;
}

.note.warn { color: var(--warning); border-top-color: oklch(0.78 0.15 80 / 0.3); }

.empty { color: var(--ink-faint); font-size: 0.9rem; font-style: italic; }

/* ── stats ── */
.stat-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.stat {
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: var(--panel-radius);
    padding: 1.1rem 1.2rem;
}

.stat-label {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-faint);
    margin-bottom: 0.3rem;
}

.stat-value {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    color: var(--primary-hi);
}

/* ── tables ── */
.table-scroll { overflow-x: auto; }

.dash-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.dash-table th {
    text-align: left;
    padding: 0 0.75rem 0.6rem 0;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--ink-faint);
    font-weight: 600;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.dash-table td {
    padding: 0.7rem 0.75rem 0.7rem 0;
    border-bottom: 1px solid oklch(0.74 0.15 55 / 0.07);
    color: var(--ink-dim);
    vertical-align: top;
}

.dash-table tbody tr:last-child td { border-bottom: none; }
.dash-table .ta-r { text-align: right; padding-right: 0; }
.dash-table .mono { font-family: var(--font-mono); font-size: 0.82rem; color: var(--ink); }
.dash-table .muted { color: var(--ink-faint); }

.dash-table .ua {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.78rem;
}

/* ── lists ── */
.mini-list { list-style: none; }

.mini-list li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid oklch(0.74 0.15 55 / 0.07);
    font-size: 0.88rem;
}

.mini-list li:last-child { border-bottom: none; }
.mini-list .mono { font-family: var(--font-mono); font-size: 0.82rem; color: var(--ink); overflow-wrap: anywhere; }
.mini-list .muted { color: var(--ink-faint); font-size: 0.8rem; white-space: nowrap; }

.kv { list-style: none; }

.kv li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid oklch(0.74 0.15 55 / 0.07);
    font-size: 0.9rem;
}

.kv li:last-child { border-bottom: none; }
.kv li > span:first-child { color: var(--ink-faint); }

/* ── destructive actions ── */
.btn-danger {
    background: transparent;
    color: var(--danger);
    border: 1px solid oklch(0.62 0.21 25 / 0.45);
    padding: 0.6rem 1.1rem;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-danger:hover:not(:disabled) { background: oklch(0.62 0.21 25 / 0.12); border-color: var(--danger); }
.btn-danger:disabled { opacity: 0.5; cursor: not-allowed; }

.link-danger { color: var(--danger); }

.danger-confirm {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    font-size: 0.88rem;
    color: var(--ink-dim);
}

.danger-confirm input {
    padding: 0.5rem 0.7rem;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--ink);
    font-family: var(--font-mono);
    width: 8rem;
}

.dash-status {
    min-height: 1.4rem;
    margin-top: 1rem;
    font-size: 0.88rem;
    color: var(--ink-dim);
}

.dash-status-ok  { color: var(--success); }
.dash-status-err { color: var(--danger); }

/* ── responsive ── */
@media (max-width: 820px) {
    .dash-body { grid-template-columns: 1fr; gap: 1.5rem; }

    .dash-nav ul {
        position: static;
        display: flex;
        gap: 0.25rem;
        overflow-x: auto;
        border-bottom: 1px solid var(--border);
        padding-bottom: 0.25rem;
    }

    .dash-nav a {
        white-space: nowrap;
        border-left: none;
        border-bottom: 2px solid transparent;
        border-radius: 3px 3px 0 0;
    }

    .dash-nav a.is-active { border-left: none; border-bottom-color: var(--primary); }

    .stat-row { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
    .dash-main, .auth-main { padding: 2rem 1rem 3.5rem; }
    .card { padding: 1.25rem 1.1rem; }
    .dash-table .ua { display: none; }
}
