/* =====================================================================
   ServeRouter — Brand Design System v5 "Bold"
   Shared language across auth + utility pages. Bold uppercase Switzer
   display type, a candy accent palette, pill buttons, and a dark brand
   panel. Pairs with the landing page's Tailwind theme.
   ===================================================================== */

@import url('https://api.fontshare.com/v2/css?f[]=switzer@400,500,600,700,800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --ink: #0b0a17;
    --offwhite: #f5f5f2;
    --surface: #ffffff;
    --cream: #fdfae7;

    --lime: #c6ff7c;
    --orange: #ff5f2e;
    --sky: #b4dbff;
    --yellow: #fdf070;
    --lilac: #c7caff;

    --border: #e4e2da;
    --border-strong: #d4d2c8;

    --text: #0b0a17;
    --text-muted: #6d6c6c;
    --text-faint: #9a988f;

    /* legacy aliases */
    --accent: #ff5f2e;
    --accent-hover: #e14a1c;
    --accent-soft: rgba(255,95,46,0.10);
    --bg-base: #f5f5f2;
    --surface-raised: #efeee8;
    --ok: #1f9d63;
    --danger: #d63a2f;

    --sans: 'Switzer','Inter',system-ui,-apple-system,'Segoe UI',sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
    --radius: 22px;
    --radius-sm: 14px;
    --snap: 200ms cubic-bezier(.16,1,.3,1);
}

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

body.sr {
    font-family: var(--sans);
    color: var(--text-muted);
    -webkit-font-smoothing: antialiased;
    background: var(--offwhite);
    min-height: 100vh;
    position: relative;
}

/* ---------- Display + type ---------- */
.sr-h1, .sr-h2 {
    font-family: var(--sans);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 0.98;
    color: var(--text);
}
.sr-h1 { font-size: clamp(2rem, 3.6vw, 3.1rem); }
.sr-h2 { font-size: clamp(1.7rem, 2.6vw, 2.3rem); }
.sr-lead { color: var(--text-muted); font-size: 1.05rem; line-height: 1.6; }
.sr-kicker {
    font-size: 0.8rem; font-weight: 700; letter-spacing: 0.02em;
    color: var(--orange);
}
.sr-eyebrow-mono {
    font-size: 0.82rem; font-weight: 700; letter-spacing: 0.01em;
    color: var(--orange);
}
.sr-gradient-text { color: var(--orange); -webkit-text-fill-color: currentColor; }
.sr-mono { font-family: var(--mono); }

/* ---------- Cards ---------- */
.sr-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(11,10,23,0.05);
}
.sr-card-hover { transition: transform var(--snap); }
.sr-card-hover:hover { transform: translateY(-6px); }

/* ---------- Pill buttons ---------- */
.sr-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
    font-weight: 700; font-size: 0.98rem; line-height: 1;
    padding: 0.95rem 1.6rem;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer; text-decoration: none;
    transition: transform var(--snap), background var(--snap), color var(--snap), border-color var(--snap);
    white-space: nowrap;
}
.sr-btn-primary { background: var(--lime); color: var(--ink); border-color: var(--lime); }
.sr-btn-primary:hover { background: var(--yellow); border-color: var(--yellow); transform: translateY(-2px); }
.sr-btn-primary:active { transform: none; }
.sr-btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--border-strong); }
.sr-btn-ghost:hover { border-color: var(--ink); }
.sr-btn-block { width: 100%; }
.sr-btn-lg { padding: 1.1rem 1.8rem; font-size: 1.02rem; }

/* ---------- Form controls ---------- */
.sr-label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text); margin-bottom: 0.5rem; }
.sr-input {
    width: 100%;
    background: #fbfbf9;
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    color: var(--text);
    padding: 0.9rem 1rem;
    font-size: 0.98rem;
    font-family: inherit;
    transition: border-color var(--snap), box-shadow var(--snap);
}
.sr-input::placeholder { color: var(--text-faint); }
.sr-input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(11,10,23,0.08); background: #fff; }
.sr-input-group { position: relative; }
.sr-input-group .sr-input { padding-left: 2.7rem; }
.sr-input-icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--text-faint); font-size: 0.95rem; pointer-events: none; }
.sr-check { width: 1.05rem; height: 1.05rem; border-radius: 5px; border: 1px solid var(--border-strong); background: #fff; accent-color: var(--ink); }

/* ---------- Alerts ---------- */
.sr-alert { border-radius: 12px; padding: 0.8rem 1rem; font-size: 0.9rem; border: 1px solid transparent; }
.sr-alert-error { background: rgba(214,58,47,0.07); border-color: rgba(214,58,47,0.30); color: #b4291f; }
.sr-alert-ok { background: rgba(31,157,99,0.08); border-color: rgba(31,157,99,0.30); color: #157a4b; }

/* ---------- Links ---------- */
.sr-link { color: var(--orange); font-weight: 700; text-decoration: none; transition: color var(--snap); }
.sr-link:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Auth split layout ---------- */
.sr-auth { display: grid; grid-template-columns: 1fr; min-height: 100vh; position: relative; z-index: 1; }
@media (min-width: 1024px) { .sr-auth { grid-template-columns: 1.02fr 1fr; } }

/* Brand panel: dark, bold, with a lime serve-route motif */
.sr-auth-aside {
    display: none;
    position: relative; overflow: hidden;
    padding: 4rem 3.75rem;
    flex-direction: column; justify-content: space-between;
    background: var(--ink);
}
@media (min-width: 1024px) { .sr-auth-aside { display: flex; } }
.sr-auth-aside .sr-h1 { color: #fff; }
.sr-auth-aside .sr-lead { color: rgba(255,255,255,0.72); }
.sr-auth-aside .sr-eyebrow-mono { color: var(--lime); }
.sr-aside-motif {
    position: absolute; right: -60px; top: 50%; transform: translateY(-50%);
    width: min(78%, 460px); height: auto;
    color: var(--lime); opacity: 0.16; z-index: 0; pointer-events: none;
}

.sr-auth-main { display: flex; align-items: center; justify-content: center; padding: 2rem 1.5rem; position: relative; z-index: 1; background: var(--offwhite); }
.sr-auth-card {
    width: 100%; max-width: 430px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: 0 10px 50px rgba(11,10,23,0.06);
}
@media (max-width: 480px) { .sr-auth-card { padding: 1.75rem 1.5rem; border: none; box-shadow: none; background: transparent; } }

/* feature bullets (if used) */
.sr-feat { display: flex; gap: 0.85rem; align-items: flex-start; }
.sr-feat-ico { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--ink); font-size: 0.95rem; background: var(--lime); }

/* logo lockup */
.sr-logo { height: 34px; width: auto; display: block; }
.sr-lockup { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.sr-lockup img { height: 34px; width: auto; }
.sr-lockup span { font-size: 1.4rem; font-weight: 800; text-transform: uppercase; letter-spacing: -0.02em; color: var(--ink); }
.sr-auth-aside .sr-lockup span { color: #fff; }

@media (min-width: 1024px) { .sr-hide-lg { display: none !important; } }

/* particle chip */
.sr-pill {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .45rem .9rem; border-radius: 9px;
    font-size: .82rem; font-weight: 600;
    color: var(--lime); background: rgba(198,255,124,0.12); border: 1px solid rgba(198,255,124,0.35);
}

.hgi-stroke { display: inline-block; line-height: 1; vertical-align: -0.1em; }
.hgi-spin { animation: hgiSpin 1s linear infinite; }
@keyframes hgiSpin { to { transform: rotate(360deg); } }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--offwhite); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; border: 2px solid var(--offwhite); }
::-webkit-scrollbar-thumb:hover { background: var(--ink); }

/* Safety net for shared pages that used dark utilities */
body.sr .text-white { color: var(--text) !important; }
body.sr .bg-gray-900, body.sr .bg-black { background: var(--offwhite) !important; }
body.sr .bg-gray-800 { background: var(--surface) !important; border-color: var(--border) !important; }
body.sr .text-gray-300, body.sr .text-gray-400 { color: var(--text-muted) !important; }
body.sr .text-gray-500, body.sr .text-gray-600 { color: var(--text-faint) !important; }
/* Light bright text left over from the old dark theme (was near-invisible on white) */
body.sr .text-gray-100, body.sr .text-gray-200 { color: var(--text) !important; }
body.sr .hover\:text-white:hover, body.sr .hover\:text-gray-100:hover, body.sr .hover\:text-gray-200:hover, body.sr .hover\:text-gray-300:hover { color: var(--text) !important; }
/* Control / input / button fills + borders */
body.sr .bg-gray-700, body.sr .bg-gray-600 { background: var(--surface-raised) !important; }
body.sr .hover\:bg-gray-700:hover, body.sr .hover\:bg-gray-600:hover, body.sr .hover\:bg-gray-500:hover { background: var(--border) !important; }
body.sr .border-gray-600, body.sr .border-gray-700 { border-color: var(--border-strong) !important; }
body.sr input, body.sr select, body.sr textarea { color: var(--text); }
body.sr input::placeholder, body.sr textarea::placeholder { color: var(--text-faint) !important; }
body.sr select option { background: var(--surface); color: var(--text); }
body.sr .glass { background: var(--surface) !important; border-color: var(--border) !important; backdrop-filter: none !important; }

body.sr a:focus-visible, body.sr button:focus-visible, body.sr input:focus-visible,
body.sr select:focus-visible, body.sr textarea:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
    body.sr *, body.sr *::before, body.sr *::after { animation: none !important; transition: none !important; }
}
