/* ==========================================================================
   VIP Networking — foundation stylesheet (design tokens + base components)
   Owned by the foundation slice. Two looks:
     .theme-public    → premium editorial (dark, serif headlines, gold accent)
     .theme-dashboard → utilitarian app (light content, navy sidebar, gold accent,
                         full light + dark support)
   Tokens ported from IGG source (SPEC §2.3), expressed as HSL channel triplets so
   components can build rgba()/alpha variants with hsl(var(--x) / a).
   ========================================================================== */

/* ---------- Design tokens ------------------------------------------------- */
:root {
    /* Brand (shared) — graphite + teal. Rebranded 2026-07-31 off the acquired site's navy+gold
       (IGG ran navy #1D2330 / gold #F3A216 and VIP mirrored it); see Views/Public/_PublicStyles. */
    --primary: 214 11% 12%;          /* ink  #1C1F23 */
    --primary-fg: 0 0% 100%;
    --accent: 174 83% 27%;           /* teal #0C7F73 */
    --accent-fg: 0 0% 100%;          /* white on teal */

    /* Neutral surfaces (dashboard light defaults) */
    --background: 220 20% 97%;
    --foreground: 220 25% 15%;
    --surface: 0 0% 100%;
    --surface-2: 220 20% 98%;
    --muted: 220 15% 45%;
    --border: 220 16% 88%;
    --ring: 174 83% 27%;

    /* Sidebar (ink family) */
    --sidebar: 214 11% 12%;
    --sidebar-accent: 214 13% 8%;
    --sidebar-fg: 210 30% 92%;
    --sidebar-muted: 210 20% 72%;

    /* Status */
    --success: 152 55% 40%;
    --warning: 38 90% 52%;
    --danger: 0 70% 52%;
    --info: 210 70% 55%;

    /* Type */
    --font-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Playfair Display', 'Georgia', 'Times New Roman', serif;

    /* Shape / depth */
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 2px hsl(222 40% 12% / .08);
    --shadow: 0 6px 24px hsl(222 40% 12% / .10);
    --shadow-lg: 0 24px 60px hsl(222 40% 12% / .22);

    --container: 1120px;
}

/* NOTE: the dashboard (.theme-dashboard) theme — tokens, dark mode, shared
   component overrides and the app shell — is owned by css/dashboard.css, loaded
   after this file on the authed side only. This file owns the PUBLIC theme and
   the shared component base. */

/* Public editorial fallback = dark "the table". Note: Views/Public/_PublicStyles.cshtml loads after
   this file and overrides these with the LIGHT graphite+teal palette on body.public; this block only
   applies to a public-themed page that doesn't pull in that partial. */
.theme-public {
    --background: 214 13% 8%;
    --foreground: 180 10% 93%;
    --surface: 214 11% 12%;
    --surface-2: 214 10% 16%;
    --muted: 200 8% 66%;
    --border: 180 10% 88% / 0; /* replaced by hairline below */
    --hairline: 180 10% 93%;
}

/* ---------- Reset / base -------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font-ui);
    color: hsl(var(--foreground));
    background: hsl(var(--background));
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; font-weight: 700; }
p { margin: 0 0 1rem; }
:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 2px; }

.display { font-family: var(--font-display); font-weight: 700; letter-spacing: -.01em; }
.lede { font-size: 1.15rem; color: hsl(var(--muted)); }
.eyebrow {
    font-size: .72rem; letter-spacing: .18em; text-transform: uppercase;
    color: hsl(var(--accent)); font-weight: 600;
}
.container { max-width: var(--container); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }

/* ---------- Buttons ------------------------------------------------------- */
.btn {
    --btn-bg: var(--primary);
    --btn-fg: var(--primary-fg);
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    font: inherit; font-weight: 600; line-height: 1;
    padding: .72rem 1.15rem; border-radius: var(--radius-sm);
    border: 1px solid transparent; cursor: pointer;
    background: hsl(var(--btn-bg)); color: hsl(var(--btn-fg));
    transition: transform .12s ease, filter .15s ease, background .15s ease;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn--accent { --btn-bg: var(--accent); --btn-fg: var(--accent-fg); }
.btn--ghost {
    background: transparent; color: hsl(var(--foreground));
    border-color: hsl(var(--border));
}
.btn--ghost:hover { background: hsl(var(--foreground) / .06); filter: none; }
.btn--outline {
    background: transparent; color: hsl(var(--accent));
    border-color: hsl(var(--accent) / .6);
}
.btn--danger { --btn-bg: var(--danger); --btn-fg: 0 0% 100%; }
.btn--sm { padding: .45rem .75rem; font-size: .85rem; }
.btn--lg { padding: .95rem 1.6rem; font-size: 1.05rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- Cards --------------------------------------------------------- */
.card {
    background: hsl(var(--surface));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.25rem;
}
.card__title { font-size: 1rem; font-weight: 700; margin: 0 0 .35rem; }
.card__meta { color: hsl(var(--muted)); font-size: .85rem; }

.stat-card { display: flex; flex-direction: column; gap: .35rem; }
.stat-card__value { font-size: 1.9rem; font-weight: 800; font-family: var(--font-display); }
.stat-card__label { color: hsl(var(--muted)); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }

.card-grid {
    display: grid; gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

/* ---------- Badges / chips ------------------------------------------------ */
.badge {
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .2rem .6rem; border-radius: 999px;
    font-size: .72rem; font-weight: 600; letter-spacing: .02em; white-space: nowrap;
    background: hsl(var(--muted) / .15); color: hsl(var(--foreground));
}
.badge--success { background: hsl(var(--success) / .16); color: hsl(var(--success)); }
.badge--warning { background: hsl(var(--warning) / .18); color: hsl(38 90% 38%); }
.badge--danger  { background: hsl(var(--danger) / .16);  color: hsl(var(--danger)); }
.badge--open    { background: hsl(var(--accent) / .16);  color: hsl(38 90% 40%); }
.badge--info    { background: hsl(210 70% 52% / .15); color: hsl(210 70% 44%); }

/* ---------- Tables -------------------------------------------------------- */
.table-wrap { width: 100%; overflow-x: auto; border-radius: var(--radius); border: 1px solid hsl(var(--border)); }
table.data {
    width: 100%; border-collapse: collapse; background: hsl(var(--surface)); font-size: .92rem;
}
table.data thead th {
    text-align: left; font-weight: 600; font-size: .76rem; letter-spacing: .04em; text-transform: uppercase;
    color: hsl(var(--muted)); padding: .7rem .9rem;
    border-bottom: 1px solid hsl(var(--border)); position: sticky; top: 0; background: hsl(var(--surface-2));
}
table.data tbody td { padding: .7rem .9rem; border-bottom: 1px solid hsl(var(--border)); }
table.data tbody tr:hover { background: hsl(var(--primary) / .04); }
table.data tbody tr:last-child td { border-bottom: 0; }

/* ---------- Forms --------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.field > label { font-size: .85rem; font-weight: 600; color: hsl(var(--foreground)); }
.input, .select, .textarea {
    font: inherit; color: hsl(var(--foreground)); background: hsl(var(--surface));
    border: 1px solid hsl(var(--border)); border-radius: var(--radius-sm);
    padding: .6rem .75rem; width: 100%;
}
.input:focus, .select:focus, .textarea:focus { border-color: hsl(var(--accent)); outline: none; box-shadow: 0 0 0 3px hsl(var(--accent) / .18); }
.field__error { color: hsl(var(--danger)); font-size: .8rem; }

/* ---------- Modals -------------------------------------------------------- */
.modal-backdrop {
    position: fixed; inset: 0; background: hsl(222 45% 6% / .6);
    display: flex; align-items: center; justify-content: center; padding: 1rem; z-index: 60;
}
.modal {
    background: hsl(var(--surface)); color: hsl(var(--foreground));
    border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
    width: min(560px, 100%); max-height: 90vh; overflow: auto;
    border: 1px solid hsl(var(--border));
}
.modal__header { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.35rem; border-bottom: 1px solid hsl(var(--border)); }
.modal__title { font-size: 1.1rem; font-weight: 700; margin: 0; }
.modal__body { padding: 1.35rem; }
.modal__footer { padding: 1rem 1.35rem; border-top: 1px solid hsl(var(--border)); display: flex; gap: .6rem; justify-content: flex-end; }
.modal__close { background: none; border: 0; font-size: 1.4rem; line-height: 1; cursor: pointer; color: hsl(var(--muted)); }
[hidden] { display: none !important; }

/* ==========================================================================
   PUBLIC EDITORIAL SHELL
   ========================================================================== */
.pub-header { position: sticky; top: 0; z-index: 30; backdrop-filter: blur(8px); background: hsl(var(--background) / .8); border-bottom: 1px solid hsl(var(--hairline) / .1); }
.pub-header__inner { max-width: var(--container); margin-inline: auto; padding: 1rem clamp(1rem, 4vw, 2rem); display: flex; align-items: center; justify-content: space-between; }
.pub-wordmark { display: inline-flex; align-items: baseline; gap: .45rem; }
.pub-wordmark__mark { font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; letter-spacing: .14em; color: hsl(var(--accent)); }
.pub-wordmark__sub { font-size: .82rem; letter-spacing: .28em; text-transform: uppercase; color: hsl(var(--muted)); }
.pub-nav { display: flex; align-items: center; gap: 1.4rem; font-size: .9rem; }
.pub-nav a { color: hsl(var(--muted)); transition: color .15s ease; }
.pub-nav a:hover { color: hsl(var(--foreground)); }
.pub-nav__cta { color: hsl(var(--accent)) !important; font-weight: 600; }

.pub-main { min-height: 60vh; }

.pub-footer { border-top: 1px solid hsl(var(--hairline) / .12); margin-top: 4rem; }
.pub-footer__inner { max-width: var(--container); margin-inline: auto; padding: 3rem clamp(1rem, 4vw, 2rem) 1.5rem; display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; }
.pub-footer__tagline { font-family: var(--font-display); font-style: italic; color: hsl(var(--muted)); margin-top: .6rem; }
.pub-footer__links { display: flex; gap: 1.4rem; }
.pub-footer__links a { color: hsl(var(--muted)); }
.pub-footer__links a:hover { color: hsl(var(--foreground)); }
.pub-footer__legal { max-width: var(--container); margin-inline: auto; padding: 1.2rem clamp(1rem, 4vw, 2rem); display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; font-size: .8rem; color: hsl(var(--muted)); border-top: 1px solid hsl(var(--hairline) / .08); }
.pub-footer__legal-links { display: flex; gap: 1rem; }

/* Marquee scaffold (public "OPEN SEAT" category ticker — SPEC §6). Public slice fills content. */
.marquee { overflow: hidden; white-space: nowrap; border-block: 1px solid hsl(var(--hairline) / .12); padding: .9rem 0; }
.marquee__track { display: inline-flex; gap: 2.5rem; animation: marquee 40s linear infinite; }
.marquee__item { color: hsl(var(--muted)); font-size: .95rem; letter-spacing: .04em; }
.marquee__item--open { color: hsl(var(--accent)); font-weight: 600; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }

/* Error page */
.error-page { display: grid; place-items: center; min-height: 70vh; padding: 2rem; }
.error-panel { text-align: center; max-width: 420px; }
.error-panel__code { font-family: var(--font-display); font-size: 4rem; font-weight: 800; color: hsl(var(--accent)); display: block; }

/* Dashboard shell responsive rules live in css/dashboard.css. */
