/* ============================================================
   AGENA SPORTS — UI  ·  v0.4.0
   GENERATED BUNDLE — DO NOT EDIT BY HAND.
   Sources: tokens/tokens.json + src/css/**. Run: npm run build
   ============================================================ */

/* ============================================================
   AGENA SPORTS — Design Tokens  ·  v0.4.0
   GENERATED FROM tokens/tokens.json — DO NOT EDIT BY HAND.
   Edit the JSON, then run: npm run build
   ============================================================ */

:root {
  --linen: #F7F6F0;                   /* Page ground, every section. */
  --paper: #FFFFFF;                   /* Panels that hold something: forms, cards, tables. */
  --ink: #15150F;                   /* Warm near-black: text, rules, primary action. */
  --graphite: #6F6E5C;                   /* Secondary text. */
  --label: #6E7230;                   /* Olive eyebrow / small-caps labels. */
  --yellow: #FAF185;                   /* The ball. A fill carrying ink text, never text or a thin line on light. */
  --yellow-hover: #F7F283;
  --olive: #3D3F18;                   /* Footer and auth backdrop. */
  --black: #111111;                   /* The one dark panel per page. */
  --on-dark-muted: #B0AE9C;                   /* Secondary text on black / olive. */
  --white: #FFFFFF;
  --off-white: #F7F6F0;                   /* Alias of --linen (v0.1 name). */
  --brand: #555725;                   /* Shop olive: selected chips. No longer the nav or primary button. */
  --brand-dark: #3D3F18;                   /* Alias of --olive (v0.1 name). */
  --brand-mid: #6E7230;                   /* Alias of --label (v0.1 name). */
  --accent: #FAF185;                   /* Alias of --yellow (v0.1 name). */
  --accent-dark: #F7F283;                   /* Alias of --yellow-hover (v0.1 name). */
  --surface: #FFFFFF;
  --surface2: #F7F6F0;
  --surface3: #EDECD8;
  --border: #CDCCC2;                   /* Hairlines and input borders. */
  --border-soft: rgba(10,10,10,.08);        /* Row dividers inside a panel. */
  --border-mid: #B0AE9C;
  --text: #15150F;
  --text-mid: #44453A;                   /* The shop's body text. */
  --text-muted: #6F6E5C;
  --green: #0F7A52;                   /* Success: the shop's 'In stock' green. */
  --orange: #925F10;                   /* Warning. */
  --red: #B3261E;                   /* Error. */
  --green-bg: #FFFFFF;                   /* Deprecated: no tinted grounds. Kept so v0.1 app CSS resolves. */
  --orange-bg: #FFFFFF;                   /* Deprecated. */
  --red-bg: #FFFFFF;                   /* Deprecated. */
  --blue: #15150F;                   /* Deprecated: the shop has no blue. Maps to ink. */
  --blue-bg: #EDECD8;                   /* Deprecated. */
  --purple: #6E7230;                   /* Deprecated: maps to olive label. */
  --purple-bg: #FFFFFF;                   /* Deprecated. */
  --teal: #3D3F18;                   /* Deprecated: maps to olive. */
  --teal-bg: #EDECD8;                   /* Deprecated. */

  --font-d: 'Aventa', 'Inter', 'Helvetica Neue', Arial, sans-serif; /* Aventa Bold (700 only): headings, codes, big figures. */
  --font-b: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; /* Body, nav, buttons, labels. */
  --font-m: 'JetBrains Mono', ui-monospace, Menlo, monospace; /* The data layer: IDs, numbers, statuses, table heads. */

  --r: 0px;
  --r-lg: 0px;
  --r-xl: 0px;

  --sp-xs: 4px;
  --sp-sm: 8px;
  --sp-md: 16px;
  --sp-lg: 24px;
  --sp-xl: 32px;
  --sp-2xl: 48px;
  --sp-3xl: 72px;
  --sp-4xl: 120px;

  --t: 0.2s ease;

  --nav-h: 64px;
  --container: 1200px;
  --control-h: 44px;                      /* Default button and input height in tools. The shop's 50px is .btn-lg. */

  --shadow-sm: none;
  --shadow: none;
  --shadow-lg: none;

}


/* ===== src/css/00-fonts.css ===== */
/* ── FONTS ────────────────────────────────────────────────────── */
/* Aventa Bold is the shop's own headline file, self-hosted beside this bundle.
   Inter and JetBrains Mono load from Google Fonts (tokens.json → font.googleImport). */
@font-face {
  font-family: "Aventa";
  src: url("fonts/agena-aventa-bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}


/* ===== src/css/00-reset.css ===== */
/* ── RESET ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; -webkit-text-size-adjust: 100%; }
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; border-radius: 0; }
input, select, textarea { font-family: inherit; border-radius: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
[hidden] { display: none !important; }


/* ===== src/css/01-base.css ===== */
/* ── BASE ─────────────────────────────────────────────────────── */
/* "The Court": linen ground, white panels, warm ink. 0 radius, no shadows.
   Yellow is a fill on light grounds, never text or a thin line. */
body {
  background: var(--linen);
  color: var(--ink);
  font-family: var(--font-b);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-d); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; font-synthesis-weight: none; }
code, kbd, pre, .mono { font-family: var(--font-m); letter-spacing: .02em; font-variant-numeric: tabular-nums; }

/* Olive small-caps label, exactly like the shop's eyebrows */
.eyebrow { font: 600 11px/1.4 var(--font-b); letter-spacing: .2em; text-transform: uppercase; color: var(--label); }
.link { font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }

/* ── LAYOUT ───────────────────────────────────────────────────── */
.main { max-width: var(--container); margin: 0 auto; padding: 2.5rem 1.5rem; }
.main-auth { display: flex; min-height: 100vh; background: var(--linen); }

/* The one dark panel per page. Yellow may be text here. */
.panel-dark { background: var(--black); color: var(--linen); padding: 2rem; }
.panel-dark .eyebrow { color: var(--yellow); }
.panel-dark p { color: var(--on-dark-muted); }
.panel-dark :focus-visible { outline-color: var(--yellow); }


/* ===== src/css/components/auth.css ===== */
/* ── AUTH (split-pane login) ──────────────────────────────────── */
/* The brand pane is the shop's olive footer colour; the form sits on linen in a white panel. */
.auth-brand { width: 340px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.5rem; background: var(--olive); padding: 3rem 2rem; }
.auth-brand-mark { height: 110px; width: auto; filter: brightness(0) invert(1); opacity: .9; }
.auth-brand-tagline { font: 600 11px/1.4 var(--font-b); color: var(--yellow); text-transform: uppercase; letter-spacing: .2em; text-align: center; }
.auth-brand :focus-visible { outline-color: var(--yellow); }

.auth-form-pane { flex: 1; display: flex; align-items: center; justify-content: center; padding: 3rem 2rem; background: var(--linen); }
.auth-card { background: var(--paper); border: 1px solid var(--border); border-top-color: var(--ink); border-radius: 0; padding: 2.5rem 2rem; width: 100%; max-width: 400px; }
.auth-logo { display: flex; align-items: center; gap: .75rem; margin-bottom: 2rem; }
.auth-title { font: 700 22px/1.1 var(--font-d); letter-spacing: -.01em; color: var(--ink); }
.auth-subtitle { font-size: 13px; color: var(--graphite); margin-top: 4px; }
.auth-footer { margin-top: 1.5rem; font-size: 12px; color: var(--graphite); text-align: center; }

@media (max-width: 640px) {
  .main-auth { flex-direction: column; }
  .auth-brand { width: 100%; padding: 2rem; }
  .auth-brand-mark { height: 70px; }
}


/* ===== src/css/components/badge.css ===== */
/* ── BADGES / STATUS ──────────────────────────────────────────── */
/* Mono, uppercase, square. Semantic states are a small square mark plus text
   (like the shop's "In stock"); the rest are flat tags in shop colours. */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 0; font: 500 10px/1 var(--font-m); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }

.badge-green, .badge-orange, .badge-red, .badge-gray { padding-left: 0; padding-right: 0; background: transparent; }
.badge-green::before, .badge-orange::before, .badge-red::before, .badge-gray::before { content: ""; width: 8px; height: 8px; flex-shrink: 0; background: currentColor; }
.badge-green  { color: var(--green); }
.badge-orange { color: var(--orange); }
.badge-red    { color: var(--red); }
.badge-gray   { color: var(--graphite); }
.badge-gray::before { background: transparent; outline: 1px solid var(--graphite); outline-offset: -1px; }

.badge-yellow { background: var(--yellow);   color: var(--ink); }
.badge-olive  { background: var(--olive);    color: var(--linen); }
.badge-blue   { background: var(--ink);      color: var(--linen); }
.badge-teal   { background: var(--surface3); color: var(--ink); }
.badge-purple { background: transparent;     color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }

/* Status mark: green square = live/open; hollow graphite square = not yet */
.status { display: inline-flex; align-items: center; gap: 8px; color: var(--green); font: 400 12px/1 var(--font-m); letter-spacing: .04em; text-transform: uppercase; }
.status::before { content: ""; width: 8px; height: 8px; background: var(--green); }
.status-soon { color: var(--graphite); }
.status-soon::before { background: transparent; outline: 1px solid var(--graphite); outline-offset: -1px; }

/* Chips: square outline choices; the selected one is the shop's olive */
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px; border: 1px solid var(--ink); font: 600 13px/1 var(--font-b); color: var(--ink); background: transparent; transition: background-color var(--t), color var(--t); }
a.chip:hover, button.chip:hover { background: var(--ink); color: var(--linen); }
.chip.chip-on, .chip.chip-on:hover { background: var(--brand); border-color: var(--brand); color: var(--linen); }
.chip-soon { border-style: dashed; border-color: var(--graphite); color: var(--graphite); }


/* ===== src/css/components/buttons.css ===== */
/* ── BUTTONS ──────────────────────────────────────────────────── */
/* The shop's shape: square, 1px border, Inter 700. Tools default to --control-h;
   .btn-lg is the shop's full 50px / 0 26px button. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--control-h); padding: 0 20px; border-radius: 0;
  border: 1px solid var(--ink); background: transparent; color: var(--ink);
  font: 700 14px/1.2 var(--font-b); letter-spacing: .02em;
  cursor: pointer; white-space: nowrap;
  transition: background-color var(--t), color var(--t), border-color var(--t);
}
.btn:hover { background: var(--ink); color: var(--linen); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .35; pointer-events: none; }

/* Primary: ink fill that inverts to outline on hover */
.btn-primary, .btn-brand { background: var(--ink); color: var(--linen); }
.btn-primary:hover, .btn-brand:hover { background: transparent; color: var(--ink); }

/* Secondary: ink outline that fills on hover (the base .btn) */
.btn-secondary { background: transparent; color: var(--ink); }

/* The shop's yellow button: anything that leads to the shop, and the one accent action */
.btn-accent, .btn-shop { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.btn-accent:hover, .btn-shop:hover { background: var(--yellow-hover); border-color: var(--yellow-hover); color: var(--ink); }

.btn-danger { background: var(--red); border-color: var(--red); color: var(--paper); }
.btn-danger:hover { background: transparent; color: var(--red); }

/* On the dark panel or the olive footer */
.btn-light { background: var(--linen); border-color: var(--linen); color: var(--ink); }
.btn-light:hover { background: transparent; color: var(--linen); border-color: var(--linen); }

.btn-ghost { background: transparent; color: var(--graphite); font: 600 13px/1.2 var(--font-b); padding: 8px 10px; white-space: nowrap; transition: color var(--t); }
.btn-ghost:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

.btn-link { background: none; border: none; color: var(--ink); cursor: pointer; font: 600 14px/1.4 var(--font-b); padding: 0; text-decoration: underline; text-underline-offset: 4px; }
.btn-link:hover { color: var(--label); }
.btn-link-danger, .btn-link-danger:hover { color: var(--red); }

.btn-sm { min-height: 36px; padding: 0 14px; font-size: 13px; }
.btn-lg { min-height: 50px; padding: 0 26px; }
.btn .arrow, .link .arrow { font-family: var(--font-m); font-weight: 400; }


/* ===== src/css/components/card.css ===== */
/* ── CARD ─────────────────────────────────────────────────────── */
/* A white panel on linen, separated by a hairline. No radius, no shadow. */
.card { background: var(--paper); border: 1px solid var(--border); border-radius: 0; padding: 1.75rem; }
.form-card { max-width: 660px; }

.form-section { margin-bottom: 2rem; }
.form-section h2 {
  font: 600 11px/1.4 var(--font-b); letter-spacing: .2em; text-transform: uppercase; color: var(--label);
  border-bottom: 1px solid var(--ink); padding-bottom: .6rem; margin-bottom: 1.25rem;
}

/* Page header */
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.75rem; }
.page-header h1 { font-size: clamp(26px, 3vw, 36px); letter-spacing: -.02em; line-height: 1.05; color: var(--ink); }

/* Stat cards: a scoreboard row under one ink rule */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0; margin-bottom: 1.5rem; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--border); background: var(--paper); }
.stat-card { padding: 1.1rem 1.25rem 1.25rem; border-right: 1px solid var(--border); }
.stat-label { font: 400 11px/1.4 var(--font-m); text-transform: uppercase; letter-spacing: .06em; color: var(--graphite); margin-bottom: .6rem; }
.stat-value { font: 700 2.4rem/1 var(--font-d); letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--ink); }

/* KPI tiles: the richer stat. A label, an Aventa figure, a sub-line and an optional delta.
   A tile may be a link. */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0; margin-bottom: 1.5rem; border-top: 1px solid var(--ink); border-left: 1px solid var(--border); background: var(--paper); }
.kpi { display: block; padding: 1.1rem 1.25rem 1.25rem; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); color: var(--ink); transition: background-color var(--t); }
a.kpi:hover { background: var(--linen); }
.kpi-label { font: 400 11px/1.4 var(--font-m); text-transform: uppercase; letter-spacing: .06em; color: var(--graphite); }
.kpi-value { font: 700 2.4rem/1 var(--font-d); letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin-top: 10px; }
.kpi-unit { font: 400 14px/1 var(--font-b); letter-spacing: 0; color: var(--graphite); margin-left: 4px; }
.kpi-sub { font-size: 13px; color: var(--graphite); margin-top: 8px; }
.kpi-delta { display: inline-block; font: 500 11px/1 var(--font-m); letter-spacing: .04em; color: var(--graphite); margin-right: 6px; }
.kpi-delta.up { color: var(--green); }
.kpi-delta.down { color: var(--red); }

/* Empty state: says what is missing and what to do next. A hollow square, like "not yet". */
.empty-state { padding: 48px 24px; text-align: center; color: var(--graphite); font-size: 15px; background: var(--paper); border: 1px dashed var(--border-mid); }
.empty-state::before { content: ""; display: block; width: 10px; height: 10px; margin: 0 auto 16px; outline: 1px solid var(--graphite); outline-offset: -1px; }
.empty-state-title { font: 700 20px/1.1 var(--font-d); letter-spacing: -.01em; color: var(--ink); margin-bottom: 6px; }
.empty-state .btn { margin-top: 18px; }


/* ===== src/css/components/flash.css ===== */
/* ── FLASH / ALERTS ───────────────────────────────────────────── */
/* A 1px border in the semantic colour, a mono label, and plain ink copy. */
.flash-wrap { margin-bottom: 1.25rem; display: flex; flex-direction: column; gap: .5rem; }
.flash { display: flex; align-items: baseline; gap: 12px; padding: 12px 14px; border: 1px solid var(--ink); border-radius: 0; background: var(--paper); color: var(--ink); font-size: 14px; }
.flash::before { content: "Info"; flex-shrink: 0; min-width: 44px; font: 500 11px/1.4 var(--font-m); letter-spacing: .08em; text-transform: uppercase; }
.flash-success { border-color: var(--green); }
.flash-success::before { content: "Done"; color: var(--green); }
.flash-danger, .flash-error { border-color: var(--red); }
.flash-danger::before, .flash-error::before { content: "Error"; color: var(--red); }
.flash-warning { border-color: var(--orange); }
.flash-warning::before { content: "Note"; color: var(--orange); }


/* ===== src/css/components/forms.css ===== */
/* ── FORMS ────────────────────────────────────────────────────── */
/* Inputs: a white box with a hairline border and an ink bottom border, like a court line. */
.field { margin-bottom: 1.1rem; }
.req { color: var(--red); }

.label, .field label {
  display: block; font: 600 13px/1.4 var(--font-b); color: var(--ink);
  margin-bottom: 8px;
}

.input,
.field input, .field select, .field textarea {
  width: 100%; min-height: var(--control-h); padding: 10px 14px;
  border: 1px solid var(--border); border-bottom-color: var(--ink); border-radius: 0;
  font: 400 15px/1.4 var(--font-b);
  background: var(--paper); color: var(--ink);
}
.field textarea, textarea.input { min-height: 96px; resize: vertical; }
.input::placeholder, .field input::placeholder, .field textarea::placeholder { color: var(--graphite); opacity: 1; }
.input:focus-visible,
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--ink); outline-offset: 0; }
.field small { display: block; margin-top: 6px; font-size: 13px; color: var(--graphite); font-weight: 400; }

/* Error: the bottom border and the hint turn to error, and the hint states the fix */
.field-error input, .field-error select, .field-error textarea, .input-error { border-bottom-color: var(--red); }
.field-error small { color: var(--red); }

label.checkbox-label {
  display: flex; align-items: center; gap: .5rem; cursor: pointer;
  font: 400 15px/1.4 var(--font-b); color: var(--ink); margin-bottom: 0;
}
.checkbox-label input[type="checkbox"], .checkbox-label input[type="radio"] { flex-shrink: 0; width: 16px; height: 16px; min-height: 0; margin: 0; padding: 0; cursor: pointer; accent-color: var(--ink); }
.store-checkboxes { display: flex; flex-direction: column; gap: .5rem; padding-left: 1.25rem; margin-top: .5rem; }

.form-actions { display: flex; gap: .75rem; margin-top: .25rem; }

/* Search bar */
.search-bar { display: flex; gap: .5rem; margin-bottom: 1.25rem; max-width: 380px; }
.search-bar input { flex: 1; min-height: var(--control-h); padding: 10px 14px; border: 1px solid var(--border); border-bottom-color: var(--ink); border-radius: 0; font: 400 15px/1.4 var(--font-b); background: var(--paper); color: var(--ink); }
.search-bar input:focus-visible { outline: 2px solid var(--ink); outline-offset: 0; }


/* ===== src/css/components/landing.css ===== */
/* ── LANDING / APP GRID ───────────────────────────────────────── */
.landing-wrap { display: flex; flex-direction: column; align-items: center; padding: 3.5rem 1rem 4rem; gap: 2.5rem; }
.landing-header { text-align: center; }
.landing-greeting { font: 700 clamp(30px, 3.4vw, 48px)/1.05 var(--font-d); letter-spacing: -.02em; color: var(--ink); margin-bottom: .6rem; }
.landing-sub { font-size: 16px; color: var(--graphite); }

/* App tiles: square white panels with hairlines; hover shows the ball mark */
.app-cards { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; max-width: 880px; }
.app-card { background: var(--paper); border: 1px solid var(--border); border-top-color: var(--ink); border-radius: 0; padding: 2rem 1.75rem; min-width: 180px; flex: 1; max-width: 220px; transition: border-color var(--t); position: relative; }
.app-card::before { content: ''; position: absolute; top: 14px; right: 14px; width: 10px; height: 10px; background: var(--yellow); outline: 1px solid var(--ink); opacity: 0; transition: opacity var(--t); }
.app-card:hover { border-color: var(--ink); }
.app-card:hover::before { opacity: 1; }

.card-icon-wrap { width: 44px; height: 44px; border-radius: 0; border: 1px solid var(--ink); display: flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 1.1rem; background: transparent; }
.card-label { font: 700 20px/1.1 var(--font-d); letter-spacing: -.01em; margin-bottom: .35rem; color: var(--ink); }
.card-role { font: 400 11px/1.4 var(--font-m); letter-spacing: .06em; color: var(--graphite); text-transform: uppercase; }

.no-access-msg { color: var(--graphite); font-size: 15px; text-align: center; padding: 2rem; background: var(--paper); border: 1px dashed var(--graphite); border-radius: 0; max-width: 360px; }


/* ===== src/css/components/nav.css ===== */
/* ── NAV ──────────────────────────────────────────────────────── */
/* Light, like the shop's header: linen, ink text, a 1px rule instead of a shadow. */
.nav { position: sticky; top: 0; z-index: 100; height: var(--nav-h); background: var(--linen); color: var(--ink); border-bottom: 1px solid var(--border); }
.nav-inner { max-width: var(--container); margin: 0 auto; height: 100%; display: flex; align-items: center; gap: .75rem; padding: 0 1.5rem; }

.nav-brand { display: flex; align-items: center; }
.brand-logo { height: 18px; width: auto; filter: brightness(0); }
.brand-text { font: 700 17px/1 var(--font-d); color: var(--ink); letter-spacing: -.01em; }
.nav-divider { color: var(--border); margin: 0 .25rem; font-weight: 400; font-size: 1.1rem; }

.nav-links { display: flex; gap: 20px; flex: 1; margin-left: 12px; align-self: stretch; }
.nav-link { display: inline-flex; align-items: center; color: var(--text-mid); font-size: 15px; font-weight: 400; border-top: 2px solid transparent; border-bottom: 2px solid transparent; transition: color var(--t), border-color var(--t); white-space: nowrap; }
.nav-link:hover { color: var(--ink); border-bottom-color: var(--border); }
.nav-link.active { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }

.nav-user { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.nav-user-name { font-size: 14px; color: var(--graphite); }

/* App switcher (shared across all Agena apps) */
.app-switcher { position: relative; }
.app-switcher summary { list-style: none; cursor: pointer; color: var(--ink); min-width: 36px; min-height: 36px; display: flex; align-items: center; justify-content: center; border: 1px solid transparent; font-size: 16px; line-height: 1; user-select: none; transition: border-color var(--t); }
.app-switcher summary::-webkit-details-marker { display: none; }
.app-switcher summary:hover { border-color: var(--ink); }
.app-switcher[open] summary { background: var(--ink); color: var(--linen); }
.switcher-dropdown { position: absolute; top: calc(100% + 6px); left: 0; background: var(--paper); border: 1px solid var(--ink); border-radius: 0; padding: 0; min-width: 200px; z-index: 200; }
.switcher-dropdown a { display: flex; align-items: center; gap: 8px; padding: 12px 14px; color: var(--ink); font-size: 14px; border-bottom: 1px solid var(--border-soft); transition: background-color var(--t); }
.switcher-dropdown a:last-child { border-bottom: 0; }
.switcher-dropdown a:hover { background: var(--linen); }
.switcher-dropdown a.current { background: var(--yellow); font-weight: 600; }
.switcher-sep { height: 1px; background: var(--ink); margin: 0; }

/* Footer: the shop's olive, yellow labels, linen text */
.footer { background: var(--olive); color: var(--linen); padding: 48px 1.5rem 24px; font-size: 14px; }
.footer .eyebrow, .footer h2 { font: 600 11px/1.4 var(--font-b); letter-spacing: .2em; text-transform: uppercase; color: var(--yellow); }
.footer a { color: var(--border); }
.footer a:hover { color: var(--linen); }
.footer :focus-visible { outline-color: var(--yellow); }

@media (max-width: 768px) {
  .nav { height: auto; }
  .nav-inner { flex-wrap: wrap; gap: 8px; padding-top: 10px; }
  .nav-links { overflow-x: auto; white-space: nowrap; flex: 0 0 100%; order: 3; margin-left: 0; }
  .nav-link { padding: 10px 0; }
}


/* ===== src/css/components/overlay.css ===== */
/* ── MODAL · TOAST · LOADING ──────────────────────────────────── */
/* Modal: a white square panel with an ink border over a dimmed page. No shadow.
   Works as <div class="modal-backdrop"><div class="modal"> or as <dialog class="modal">. */
.modal-backdrop { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(17, 17, 17, .55); }
.modal { width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow-y: auto; padding: 28px; background: var(--paper); color: var(--ink); border: 1px solid var(--ink); border-radius: 0; }
dialog.modal { margin: auto; }
dialog.modal::backdrop { background: rgba(17, 17, 17, .55); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.modal-title { font: 700 22px/1.1 var(--font-d); letter-spacing: -.01em; }
.modal-close { min-width: 32px; min-height: 32px; margin: -6px -8px 0 0; color: var(--graphite); font: 400 16px/1 var(--font-m); border: 1px solid transparent; }
.modal-close:hover { color: var(--ink); border-color: var(--ink); }
.modal-body { color: var(--text-mid); font-size: 15px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }

/* Toast: the one floating element. Ink, with a mono label like the alerts. */
.toast-wrap { position: fixed; right: 16px; bottom: 16px; z-index: 400; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.toast { display: flex; align-items: baseline; gap: 12px; padding: 12px 16px; background: var(--ink); color: var(--linen); border: 1px solid var(--ink); font-size: 14px; }
.toast::before { content: "Done"; flex-shrink: 0; font: 500 11px/1.4 var(--font-m); letter-spacing: .08em; text-transform: uppercase; color: var(--yellow); }
.toast-error::before { content: "Error"; }
.toast-info::before { content: "Info"; }
.toast :focus-visible { outline-color: var(--yellow); }

/* Loading: a line, not a spinner. An ink segment travels along a hairline. */
.loading-bar { position: relative; height: 2px; overflow: hidden; background: var(--border); }
.loading-bar::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 30%; background: var(--ink); animation: agena-load 1.2s ease-in-out infinite; }
@keyframes agena-load { from { transform: translateX(-100%); } to { transform: translateX(334%); } }
.skeleton { display: block; min-height: 14px; background: var(--surface3); color: transparent; animation: agena-pulse 1.4s ease-in-out infinite; }
@keyframes agena-pulse { 50% { opacity: .5; } }

/* Page loader — "the rally": a linen screen, and the ball square crossing a court line.
   Prefer a .skeleton shell when the destination layout is known; reach for this when it isn't.
   The app adds .is-done when loading finishes, then hides the node on a timeout — not on
   transitionend, which never fires under reduced motion because the transition is off. */
.page-loader { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; padding: var(--sp-lg); background: var(--linen); color: var(--ink); transition: opacity 160ms ease; }
.page-loader.is-done { opacity: 0; pointer-events: none; }
.loader-body { display: grid; gap: var(--sp-md); width: min(clamp(240px, 36vw, 420px), 100%); }
.loader-text { display: grid; gap: var(--sp-sm); }
.loader-label { margin: 0; font: 600 11px/1.2 var(--font-b); letter-spacing: .2em; text-transform: uppercase; color: var(--label); }
.loader-title { margin: 0; font: 700 clamp(26px, 3vw, 36px)/1.05 var(--font-d); letter-spacing: -.02em; color: var(--ink); }
.loader-note { margin: 0; font: 400 11px/1.4 var(--font-m); letter-spacing: .06em; text-transform: uppercase; font-variant-numeric: tabular-nums; color: var(--graphite); }

/* The court line: a hairline, an ink fill for determinate progress, and the 10px ball. */
.loader-line { --loader-progress: 0%; position: relative; height: 1px; margin: 5px 0; background: var(--border); }
.loader-line::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--loader-progress); background: var(--ink); }
.loader-line::after { content: ""; position: absolute; inset: 0; background: var(--ink); opacity: 0; }
/* The track is (line - ball) wide, so translating it by its own 100% carries the ball end to end. */
.loader-ball-track { position: absolute; top: -5px; left: 0; width: calc(100% - 10px); height: 10px; animation: agena-rally 1.6s cubic-bezier(.45, 0, .55, 1) infinite alternate; }
.loader-ball { position: absolute; top: 0; left: 0; width: 10px; height: 10px; background: var(--yellow); outline: 1px solid var(--ink); }
@keyframes agena-rally { from { transform: translateX(0); } to { transform: translateX(100%); } }

/* Determinate: add .is-determinate and set --loader-progress on .loader-line. The fill is ink,
   never yellow, and the ball parks at its head. Only ever a real, checkable fraction. */
.page-loader.is-determinate .loader-ball-track { width: 100%; transform: none; animation: none; }
.page-loader.is-determinate .loader-ball { left: var(--loader-progress); transform: translateX(-100%); transition: left var(--t); }
.page-loader.is-determinate .loader-line::before { transition: width var(--t); }

/* Inset: one white panel reloading, not the page. */
.page-loader-inset { position: relative; inset: auto; z-index: auto; display: block; padding: var(--sp-lg); background: var(--paper); border: 1px solid var(--border); }
.page-loader-inset .loader-body { width: 100%; }
.page-loader-inset .loader-title { font-size: 20px; }

/* .is-reduced renders the reduced-motion state on demand (the preview uses it). */
.page-loader.is-reduced .loader-ball-track { animation: none; transform: none; }
.page-loader.is-reduced .loader-line::after { opacity: .35; }

@media (prefers-reduced-motion: reduce) {
  .loading-bar::after { animation: none; width: 100%; opacity: .35; }
  .skeleton { animation: none; }
  .loader-ball-track { animation: none; transform: none; }
  .loader-line::after { opacity: .35; }
  .page-loader, .loader-line::before, .loader-ball { transition: none; }
}


/* ===== src/css/components/sidebar.css ===== */
/* ── SIDEBAR + APP SHELL ──────────────────────────────────────── */
/* For tools with more destinations than a top bar can hold. Linen, a hairline on the
   right, and the active link sits on an ink line, like the top nav's. */
.app-shell { display: flex; align-items: flex-start; min-height: calc(100vh - var(--nav-h)); }
.app-main { flex: 1; min-width: 0; padding: 2rem 1.75rem 3rem; }

.sidebar { flex: 0 0 232px; position: sticky; top: var(--nav-h); align-self: flex-start; height: calc(100vh - var(--nav-h)); overflow-y: auto; scrollbar-width: thin; padding: 16px 0 24px; background: var(--linen); border-right: 1px solid var(--border); }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 16px 12px; }
.sidebar-title { font: 700 17px/1 var(--font-d); letter-spacing: -.01em; color: var(--ink); }
.sidebar-toggle { color: var(--graphite); font: 400 14px/1 var(--font-m); min-width: 28px; min-height: 28px; border: 1px solid transparent; }
.sidebar-toggle:hover { color: var(--ink); border-color: var(--ink); }
.sidebar-group { font: 600 11px/1.4 var(--font-b); letter-spacing: .2em; text-transform: uppercase; color: var(--label); padding: 18px 16px 8px; }
.sidebar-link { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 6px 16px 6px 14px; border-left: 2px solid transparent; color: var(--text-mid); font-size: 14px; transition: color var(--t), background-color var(--t); }
.sidebar-link:hover { color: var(--ink); background: var(--paper); }
.sidebar-link.active, .sidebar-link[aria-current="page"] { color: var(--ink); font-weight: 600; border-left-color: var(--ink); background: var(--paper); }
.sidebar-ico { width: 16px; flex: 0 0 auto; display: inline-flex; justify-content: center; }
.sidebar-ico svg { width: 16px; height: 16px; display: block; }
.sidebar-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-badge { margin-left: auto; min-width: 20px; padding: 3px 5px; background: var(--yellow); color: var(--ink); font: 500 10px/1 var(--font-m); text-align: center; }

/* Collapsed: icons only. Toggle .is-collapsed on .sidebar from the app's own script. */
.sidebar.is-collapsed { flex-basis: 56px; }
.sidebar.is-collapsed .sidebar-text, .sidebar.is-collapsed .sidebar-title, .sidebar.is-collapsed .sidebar-group, .sidebar.is-collapsed .sidebar-badge { display: none; }
.sidebar.is-collapsed .sidebar-link { justify-content: center; padding: 6px 0; }
.sidebar.is-collapsed .sidebar-head { justify-content: center; padding: 4px 0 12px; }

@media (max-width: 768px) {
  .app-shell { flex-direction: column; }
  .app-main { padding: 1.5rem 1rem 2.5rem; width: 100%; }
  .sidebar, .sidebar.is-collapsed { position: static; flex: 0 0 auto; width: 100%; height: auto; display: flex; overflow-x: auto; padding: 0 8px; border-right: 0; border-bottom: 1px solid var(--border); }
  .sidebar-head, .sidebar-group { display: none; }
  .sidebar-link, .sidebar.is-collapsed .sidebar-link { flex: 0 0 auto; min-height: 44px; padding: 0 10px; border-left: 0; border-bottom: 2px solid transparent; }
  .sidebar-link.active, .sidebar-link[aria-current="page"] { border-bottom-color: var(--ink); background: transparent; }
  .sidebar.is-collapsed .sidebar-text { display: inline; }
}


/* ===== src/css/components/table.css ===== */
/* ── TABLE ────────────────────────────────────────────────────── */
/* Rows, not cards: a board under one ink rule, hairlines between rows, mono heads. */
.table-wrap { background: var(--paper); border: 1px solid var(--border); border-top-color: var(--ink); border-radius: 0; overflow: hidden; }
.table { width: 100%; border-collapse: collapse; }
.table th {
  padding: 12px 16px; text-align: left; font: 400 11px/1.4 var(--font-m);
  color: var(--graphite); text-transform: uppercase; letter-spacing: .06em;
  background: transparent; border-bottom: 1px solid var(--border);
}
/* Sortable heads: the app sets aria-sort; the arrow is drawn here */
.table th.sortable, .table th[aria-sort] { cursor: pointer; user-select: none; white-space: nowrap; }
.table th.sortable:hover, .table th[aria-sort]:hover { color: var(--ink); }
.table th.sortable::after, .table th[aria-sort]::after { content: "\2195"; margin-left: 6px; color: var(--border-mid); }
.table th[aria-sort="ascending"], .table th[aria-sort="descending"] { color: var(--ink); }
.table th[aria-sort="ascending"]::after { content: "\2191"; color: var(--ink); }
.table th[aria-sort="descending"]::after { content: "\2193"; color: var(--ink); }
.table td { padding: 14px 16px; font-size: 14px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; color: var(--text-mid); }
.table tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background-color var(--t); }
.table tbody tr:hover { background: var(--linen); }
.table tbody tr.is-active { background: linear-gradient(90deg, rgba(250, 241, 133, .45), rgba(250, 241, 133, 0) 70%); }
.row-inactive td { color: var(--graphite); }
.table td.actions { white-space: nowrap; }
.table td.actions > * + * { margin-left: .75rem; }
.empty { text-align: center; color: var(--graphite); padding: 3rem !important; font-size: 14px; }

/* User cell: the avatar is the ball mark, a yellow square carrying ink */
.user-cell { display: flex; align-items: center; gap: .75rem; }
.user-cell-avatar { width: 32px; height: 32px; border-radius: 0; background: var(--yellow); display: flex; align-items: center; justify-content: center; font: 500 11px/1 var(--font-m); letter-spacing: .04em; color: var(--ink); flex-shrink: 0; text-transform: uppercase; }
.user-cell-name  { font-weight: 600; font-size: 14px; color: var(--ink); }
.user-cell-email { font-size: 12px; color: var(--graphite); margin-top: 1px; }

@media (max-width: 768px) {
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}


/* ===== src/css/components/tabs.css ===== */
/* ── TABS · FILTER BAR · PAGINATION ───────────────────────────── */
/* Tabs: text on a hairline; the current one sits on an ink line. */
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--border); margin-bottom: 1.25rem; overflow-x: auto; }
.tab { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; border-bottom: 2px solid transparent; color: var(--text-mid); font: 400 15px/1.2 var(--font-b); white-space: nowrap; background: none; transition: color var(--t), border-color var(--t); }
.tab:hover { color: var(--ink); border-bottom-color: var(--border); }
.tab.active, .tab[aria-current], .tab[aria-selected="true"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }
.tab-count { font: 500 11px/1 var(--font-m); color: var(--graphite); }
.tab.active .tab-count, .tab[aria-current] .tab-count, .tab[aria-selected="true"] .tab-count { background: var(--yellow); color: var(--ink); padding: 3px 5px; }

/* Filter bar: mono labels and compact controls between two hairlines, above a table. */
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 12px 0; margin-bottom: 1.25rem; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--linen); }
.filter-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filter-group-end { margin-left: auto; }
.filter-lbl { font: 400 11px/1.4 var(--font-m); letter-spacing: .06em; text-transform: uppercase; color: var(--graphite); }
.filter-bar select, .filter-bar input { min-height: 36px; padding: 6px 12px; border: 1px solid var(--border); border-bottom-color: var(--ink); background: var(--paper); color: var(--ink); font: 400 14px/1.4 var(--font-b); }
.filter-bar select:focus-visible, .filter-bar input:focus-visible { outline: 2px solid var(--ink); outline-offset: 0; }

/* Pagination: square mono cells sharing borders; the current page is ink. */
.pagination { display: flex; align-items: center; margin-top: 1.25rem; }
.pagination-info { margin-right: auto; font: 400 12px/1.4 var(--font-m); letter-spacing: .02em; color: var(--graphite); }
.page { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; min-height: 36px; padding: 0 10px; margin-left: -1px; border: 1px solid var(--border); background: var(--paper); color: var(--ink); font: 400 12px/1 var(--font-m); transition: background-color var(--t), color var(--t); }
a.page:hover { background: var(--ink); border-color: var(--ink); color: var(--linen); position: relative; }
.page.active, .page[aria-current] { background: var(--ink); border-color: var(--ink); color: var(--linen); position: relative; }
.page.disabled, .page[aria-disabled="true"] { color: var(--border-mid); pointer-events: none; }


/* ===== src/css/components/utilities.css ===== */
/* ── UTILITIES ────────────────────────────────────────────────── */
.text-muted { color: var(--text-muted); }
.text-mid { color: var(--text-mid); }
.text-brand { color: var(--label); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mono { font-family: var(--font-m); }
.display { font-family: var(--font-d); }

.w-full { width: 100%; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: .25rem; } .gap-2 { gap: .5rem; } .gap-3 { gap: .75rem; } .gap-4 { gap: 1rem; }

.mt-1 { margin-top: .25rem; } .mt-2 { margin-top: .5rem; } .mt-4 { margin-top: 1rem; } .mt-8 { margin-top: 2rem; }
.mb-1 { margin-bottom: .25rem; } .mb-2 { margin-bottom: .5rem; } .mb-4 { margin-bottom: 1rem; } .mb-8 { margin-bottom: 2rem; }

.hidden { display: none; }

