/* WENA HQ — brand: black, silver, gold. Dark by design. */
:root {
  --bg: #09090a;
  --surface: #121214;
  --surface-2: #19191c;
  --surface-3: #222226;
  --line: #2a2a2f;
  --line-2: #36363c;
  --text: #ededef;
  --muted: #9b9ba3;
  --silver: #c9c9ce;
  --gold: #e8b45c;
  --gold-2: #f3c977;
  --gold-ink: #1a1305;
  --gold-soft: rgba(232, 180, 92, .12);
  --ok: #4cc38a;
  --ok-soft: rgba(76, 195, 138, .13);
  --bad: #ef5b5f;
  --bad-soft: rgba(239, 91, 95, .13);
  --info: #6aa5f7;
  --info-soft: rgba(106, 165, 247, .13);
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 12px 40px rgba(0, 0, 0, .45);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Chakra Petch', 'Inter', system-ui, sans-serif;
  --arabic: 'Cairo', 'Noto Kufi Arabic', 'Segoe UI', Tahoma, sans-serif;
  --sidebar: 252px;
  --tabbar: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--display); letter-spacing: .01em; margin: 0; line-height: 1.15; }
h1 { font-size: clamp(1.6rem, 2.4vw + .8rem, 2.25rem); font-weight: 700; }
h2 { font-size: 1.02rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
p { margin: .35rem 0; }
code { font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--silver); background: var(--surface-3); padding: 2px 6px; border-radius: 5px; }
pre { margin: 0; white-space: pre-wrap; word-break: break-word; font: 12px/1.5 ui-monospace, Menlo, monospace; color: var(--silver); background: var(--surface-2); padding: 10px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; inset-inline-start: 8px; top: -100px; z-index: 50; background: var(--gold); color: var(--gold-ink); padding: 8px 12px; border-radius: 8px; }
.skip:focus { top: 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.pre { white-space: pre-wrap; word-break: break-word; unicode-bidi: plaintext; }
.nowrap { white-space: nowrap; }
.link { color: var(--gold); text-decoration: none; font-size: 13px; font-weight: 600; }
.link:hover { text-decoration: underline; }
.eyebrow { color: var(--gold); text-transform: uppercase; letter-spacing: .14em; font-size: 11.5px; font-weight: 700; margin: 0 0 6px; }

.boot { min-height: 100vh; display: grid; place-items: center; }
.boot img { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; transform: scale(.97); } }

/* ---------- layout ---------- */
#app:not(.auth-root):not(.public-root) { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px; padding: 20px 14px; background: #0c0c0e; border-inline-end: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; padding: 4px 8px 10px; }
.brand span { font: 700 22px/1 var(--display); letter-spacing: .32em; color: var(--silver); }
.brand small { display: block; font-size: 10px; letter-spacing: .3em; color: var(--gold); margin-top: 4px; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nav__item { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--muted); font-weight: 500; }
.nav__item:hover { background: var(--surface-2); color: var(--text); }
.nav__item.is-active { background: var(--gold-soft); color: var(--gold-2); }
.nav__item.is-active::before { content: ''; position: absolute; inset-inline-start: -14px; top: 8px; bottom: 8px; width: 3px; border-start-end-radius: 3px; border-end-end-radius: 3px; background: var(--gold); }
.nav__icon { width: 18px; text-align: center; font-size: 13px; }
.nav .count { margin-inline-start: auto; }
.sidebar__foot { border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 10px; }
.who { display: flex; gap: 10px; align-items: center; text-decoration: none; min-width: 0; }
.who span { display: grid; min-width: 0; }
.who small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; justify-content: flex-end; padding: 10px 28px; background: rgba(9, 9, 10, .82); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar__brand { display: none; margin-inline-end: auto; }
.season-switch select { min-width: 220px; }
.page { padding: 28px; max-width: 1280px; width: 100%; outline: none; padding-bottom: 120px; }

.tabbar { display: none; }

/* ---------- primitives ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); font: 600 14px/1 var(--font); text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, transform .05s; white-space: nowrap; }
.btn:hover:not(:disabled) { background: var(--surface-3); border-color: #45454c; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn--primary { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.btn--primary:hover:not(:disabled) { background: var(--gold-2); border-color: var(--gold-2); }
.btn--approve { background: var(--ok); border-color: var(--ok); color: #04150c; }
.btn--approve:hover:not(:disabled) { background: #5fd49a; border-color: #5fd49a; }
.btn--danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn--danger-ghost { background: transparent; border-color: rgba(239, 91, 95, .45); color: #ff8a8d; }
.btn--danger-ghost:hover:not(:disabled) { background: var(--bad-soft); border-color: var(--bad); }
.btn--ghost { background: transparent; }
.btn--sm { min-height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn--block { width: 100%; }
.btn.is-busy { position: relative; color: transparent !important; }
.btn.is-busy::after { content: ''; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-color: var(--text) transparent var(--text) transparent; animation: spin .7s linear infinite; }
.btn--primary.is-busy::after, .btn--approve.is-busy::after { border-color: var(--gold-ink) transparent var(--gold-ink) transparent; }
.phase { font-size: 10px; padding: 2px 5px; border-radius: 4px; background: var(--surface-3); color: var(--muted); letter-spacing: .05em; }
.pill { background: var(--gold-ink); color: var(--gold-2); border-radius: 99px; padding: 2px 8px; font-size: 12px; }
.icon-btn { display: inline-grid; place-items: center; position: relative; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; cursor: pointer; font-size: 15px; }
.icon-btn .count { position: absolute; top: -5px; inset-inline-end: -5px; }
.count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--gold); color: var(--gold-ink); font: 700 11px/20px var(--font); text-align: center; }

.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; vertical-align: middle; }
.badge--gold { background: var(--gold-soft); color: var(--gold-2); }
.badge--ok { background: var(--ok-soft); color: var(--ok); }
.badge--bad { background: var(--bad-soft); color: #ff8a8d; }
.badge--info { background: var(--info-soft); color: var(--info); }
.badge--muted { background: var(--surface-3); color: var(--muted); }

.avatar { flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #2b2b31, #1b1b1f); border: 1px solid var(--line-2); color: var(--silver); font: 700 12px/1 var(--display); letter-spacing: .05em; }
.avatar--lg { width: 48px; height: 48px; font-size: 15px; border-radius: 12px; }
.avatar--xl { width: 72px; height: 72px; font-size: 22px; border-radius: 18px; border-color: rgba(232, 180, 92, .5); color: var(--gold-2); }

input, select, textarea { width: 100%; min-height: 42px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); font: 15px/1.4 var(--font); }
textarea { resize: vertical; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-inline-end: 32px; }
[dir=rtl] select { background-position: 12px 50%, 17px 50%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
[aria-invalid="true"] { border-color: var(--bad); }

.form { display: grid; gap: 14px; }
.form--narrow { max-width: 760px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--silver); }
.field__hint { color: var(--muted); font-size: 12px; }
.field__err, .form__error { color: #ff8a8d; font-size: 12.5px; min-height: 0; margin: 0; }
.form__error:empty, .field__err:empty { display: none; }
.form__actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.grid2 { align-items: start; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; min-width: 0; }
.card--accent { border-color: rgba(232, 180, 92, .35); background: linear-gradient(180deg, rgba(232, 180, 92, .06), transparent 120px), var(--surface); }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card > h2 { margin-bottom: 4px; }

/* ---------- page heads ---------- */
.page__head, .hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 22px; }
.page__head .muted { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hero { padding: 24px; border-radius: 18px; border: 1px solid var(--line); background: radial-gradient(1200px 260px at 0% 0%, rgba(232, 180, 92, .14), transparent 60%), linear-gradient(135deg, #141416, #0e0e10); }
.quick { display: flex; flex-wrap: wrap; gap: 8px; }
.back { display: inline-block; color: var(--muted); text-decoration: none; margin-bottom: 14px; font-size: 14px; }
.back:hover { color: var(--text); }

/* ---------- dashboard ---------- */
.dash { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.dash--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dash__approvals { grid-column: span 2; grid-row: span 2; }
.dash__activity, .dash__wide { grid-column: 1 / -1; }
.dash--2 .dash__wide { grid-column: 1 / -1; }
.big { font: 700 34px/1 var(--display); color: var(--gold-2); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat { display: grid; gap: 2px; padding: 12px; border-radius: 10px; background: var(--surface-2); text-decoration: none; border: 1px solid transparent; }
a.stat:hover { border-color: var(--line-2); }
.stat__value { font: 700 26px/1.1 var(--display); }
.stat__label { color: var(--muted); font-size: 12px; }
.games { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.games span { font-size: 12px; padding: 3px 9px; border-radius: 99px; background: var(--surface-2); color: var(--muted); }
.games b { color: var(--text); }
.ghost-metrics { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 1px; }
.ghost-metrics li { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--line); color: var(--muted); font-size: 13.5px; }
.ghost-metrics span { color: #55555c; }
.later { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; color: var(--muted); padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.later__tag { flex: none; font: 700 10.5px/1 var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--gold); background: var(--gold-soft); padding: 5px 7px; border-radius: 6px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface); color: var(--muted); font: 500 13px/1 var(--font); text-decoration: none; cursor: pointer; }
.chip b { color: var(--text); font-weight: 700; }
.chip:hover { color: var(--text); }
.chip--on { border-color: var(--gold); color: var(--gold-2); background: var(--gold-soft); }
.chip--on b { color: var(--gold-2); }
.chip--later { opacity: .55; cursor: default; border-style: dashed; }
.chip--later b { font-size: 10px; color: var(--muted); }

.timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.timeline li { display: grid; grid-template-columns: 92px 1fr; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.timeline li:last-child { border-bottom: 0; }
.timeline time { color: var(--gold); font: 600 13px/1.3 var(--display); display: grid; }
.timeline time small { color: var(--muted); font: 400 11px var(--font); }

.rows { list-style: none; margin: 0; padding: 0; }
.rows > li { border-bottom: 1px solid var(--line); }
.rows > li:last-child { border-bottom: 0; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; text-decoration: none; }
a.row:hover strong, a.row:hover > span:first-child { color: var(--gold-2); }

/* ---------- approvals ---------- */
.req-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.req { display: flex; align-items: stretch; gap: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); overflow: hidden; }
.req__main { flex: 1; min-width: 0; display: grid; gap: 6px; padding: 14px 16px; text-decoration: none; }
.req__main:hover { background: var(--surface-3); }
.req__type { font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--gold); font-weight: 700; }
.req__who { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.req__change { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.arrow { color: var(--gold); }
.req__meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; flex-wrap: wrap; }
.req__actions { display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 12px; border-inline-start: 1px solid var(--line); }
.req__actions .btn { min-width: 110px; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; align-items: center; }
.tabs { display: inline-flex; padding: 4px; gap: 2px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); overflow-x: auto; max-width: 100%; }
.tab { border: 0; background: transparent; color: var(--muted); padding: 8px 14px; border-radius: 9px; font: 600 13.5px/1 var(--font); cursor: pointer; white-space: nowrap; }
.tab.is-active { background: var(--surface-3); color: var(--text); }
.filters input[type=search] { max-width: 340px; }
.filters select { width: auto; min-width: 170px; }

.req-detail { display: grid; gap: 16px; max-width: 860px; }
.req-detail__head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.req-detail__head .eyebrow { width: 100%; margin: 0; }
.req-summary { display: grid; gap: 14px; }
.req-summary__who { display: flex; align-items: center; gap: 12px; }
.req-summary__who div { display: grid; }
.req-summary__who strong { font: 700 22px/1.1 var(--display); }
.req-summary__change { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px; border-radius: 10px; background: var(--surface-2); font-size: 16px; }
.req-summary__change .arrow { font-size: 20px; }
.req-summary__change strong { color: var(--gold-2); }
.notice { padding: 10px 12px; border-radius: 10px; background: var(--info-soft); color: #b9d4fb; font-size: 13.5px; }
.notice--bad { background: var(--bad-soft); color: #ffb4b6; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 10px 16px; margin: 0; }
.kv dt { color: var(--muted); font-size: 13px; }
.kv dd { margin: 0; min-width: 0; }
.thread { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.thread__msg { padding: 12px 14px; border-radius: 10px; background: var(--surface-2); border-inline-start: 3px solid var(--line-2); }
.thread__msg header { font-size: 13px; color: var(--muted); }
.thread__msg header strong { color: var(--text); }
.thread__msg--info_request { border-inline-start-color: var(--info); }
.thread__msg--decision { border-inline-start-color: var(--gold); }
.decision-bar { position: sticky; bottom: 16px; z-index: 5; display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; padding: 12px; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(18, 18, 20, .92); backdrop-filter: blur(10px); box-shadow: var(--shadow); max-width: 860px; }
.decision-bar .btn { min-width: 120px; min-height: 46px; }

.picked { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.suggest { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 2px; }
.suggest:empty { display: none; }
.suggest button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); text-align: start; cursor: pointer; font: inherit; }
.suggest button:hover:not(:disabled) { border-color: var(--gold); }
.suggest button:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: start; font: 600 11.5px/1 var(--font); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr[data-href] { cursor: pointer; }
.table tbody tr:hover td { background: var(--surface-2); }
.cell-user { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.cell-user span { display: grid; min-width: 0; }
.cell-user small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.pager .muted { margin-inline-end: auto; font-size: 13px; }

/* ---------- teams ---------- */
.group { margin-bottom: 24px; }
.group__title { color: var(--muted); margin-bottom: 10px; font-size: 13px; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.team-card { display: grid; gap: 4px; padding: 18px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(160deg, #18181b, #111113); text-decoration: none; justify-items: start; }
.team-card:hover { border-color: rgba(232, 180, 92, .5); }
.team-card__name { font: 700 19px/1.2 var(--display); }
.team-card__meta { color: var(--muted); font-size: 13px; }
.roster { list-style: none; margin: 0; padding: 0; }
.roster__row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.roster__row:last-child { border-bottom: 0; }
.roster__tags, .roster__actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.roster__tags a { text-decoration: none; }

/* ---------- profile ---------- */
.profile-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; }
.profile-head > div:nth-child(2) { flex: 1; min-width: 200px; }
.profile-head__actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- seasons ---------- */
.lifecycle { list-style: none; display: flex; gap: 0; padding: 0; margin: 0 0 18px; counter-reset: s; flex-wrap: wrap; }
.lifecycle li { counter-increment: s; font-size: 12.5px; color: var(--muted); padding: 6px 14px 6px 10px; }
.lifecycle li::before { content: counter(s); display: inline-grid; place-items: center; width: 18px; height: 18px; margin-inline-end: 6px; border-radius: 50%; background: var(--surface-3); font-size: 10.5px; color: var(--text); }
.lifecycle li + li::before { box-shadow: -14px 0 0 -8px var(--line-2); }
.season-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.season { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.season h2 { text-transform: none; letter-spacing: .01em; font-size: 18px; }
.season__side { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- notifications ---------- */
.notif-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 6px; }
.notif { display: grid; grid-template-columns: 10px 1fr auto; gap: 12px; align-items: start; padding: 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; }
.notif:hover { border-color: var(--line-2); }
.notif__dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; background: transparent; }
.notif.is-unread { background: var(--surface-2); }
.notif.is-unread .notif__dot { background: var(--gold); }
.notif__body { display: grid; gap: 2px; min-width: 0; }

/* ---------- states ---------- */
.state { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 40px 16px; color: var(--muted); }
.state strong { color: var(--text); font-size: 16px; }
.state--loading { grid-auto-flow: column; justify-content: center; align-items: center; gap: 10px; }
.state__icon { font-size: 26px; color: var(--gold); opacity: .6; }
.state--error strong { color: #ff8a8d; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--gold); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- modal & toast ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .65); backdrop-filter: blur(3px); }
.modal__panel { position: relative; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: var(--shadow); animation: rise .18s ease-out; }
.modal__panel--wide { width: min(820px, 100%); }
.modal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.modal__head h2 { text-transform: none; letter-spacing: .01em; font-size: 18px; }
.modal__body { padding: 18px; }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } }
.toasts { position: fixed; z-index: 80; inset-inline-end: 20px; bottom: 20px; display: grid; gap: 8px; }
.toast { padding: 12px 16px; border-radius: 12px; background: var(--surface-3); border: 1px solid var(--line-2); border-inline-start: 4px solid var(--ok); box-shadow: var(--shadow); max-width: 380px; font-size: 14px; animation: rise .2s ease-out; transition: opacity .4s, transform .4s; }
.toast--bad { border-inline-start-color: var(--bad); }
.toast.out { opacity: 0; transform: translateY(6px); }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 22px; padding: 32px 16px; background: radial-gradient(800px 400px at 50% -10%, rgba(232, 180, 92, .14), transparent 70%); }
.auth__brand img { border-radius: 50%; box-shadow: 0 0 0 1px var(--line), 0 20px 60px rgba(232, 180, 92, .12); }
.auth__card { width: min(520px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 28px; }
.auth__card h1 { font-size: 26px; }
.auth__card > .muted { margin-bottom: 18px; }
.auth__foot { text-align: center; color: var(--muted); margin-top: 16px; }
.auth__foot a { color: var(--gold); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .dash { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash__approvals { grid-column: 1 / -1; grid-row: auto; }
}

@media (max-width: 820px) {
  #app:not(.auth-root):not(.public-root) { display: block; }
  .sidebar { display: none; }
  .topbar { padding: 8px 16px; padding-top: max(8px, env(safe-area-inset-top)); justify-content: flex-start; }
  .topbar__brand { display: block; }
  .season-switch { margin-inline-start: auto; }
  .season-switch select { min-width: 0; max-width: 46vw; min-height: 38px; font-size: 13px; }
  .page { padding: 18px 16px calc(var(--tabbar) + var(--safe-b) + 100px); }
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; height: calc(var(--tabbar) + var(--safe-b)); padding-bottom: var(--safe-b); background: rgba(12, 12, 14, .96); backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
  .tabbar a { position: relative; display: grid; place-items: center; align-content: center; gap: 3px; color: var(--muted); text-decoration: none; font-size: 16px; }
  .tabbar small { font-size: 10.5px; font-weight: 600; letter-spacing: .02em; }
  .tabbar a.is-active { color: var(--gold-2); }
  .tabbar .count { position: absolute; top: 6px; inset-inline-start: calc(50% + 6px); }
  .dash, .dash--2 { grid-template-columns: 1fr; }
  .grid2 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { padding: 18px; }
  .hero .quick { width: 100%; }
  .page__head > .btn, .page__head > .quick { width: 100%; }
  .page__head > .btn { justify-content: center; }
  .quick .btn:disabled { display: none; }
  .req { flex-direction: column; }
  .req__actions { flex-direction: row; border-inline-start: 0; border-top: 1px solid var(--line); padding: 10px; }
  .req__actions .btn { flex: 1; min-height: 48px; font-size: 15px; }
  .decision-bar { position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar) + var(--safe-b)); margin: 0; border-radius: 16px 16px 0 0; border-bottom: 0; max-width: none; }
  .decision-bar .btn { flex: 1; min-width: 0; padding: 0 8px; min-height: 50px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 10px; }
  .hide-sm { display: none; }
  .filters input[type=search], .filters select { max-width: none; width: 100%; }
  .roster__row { grid-template-columns: minmax(0, 1fr) auto; }
  .roster__actions { grid-column: 1 / -1; justify-content: flex-start; }
  .timeline li { grid-template-columns: 64px 1fr; gap: 10px; }
  .toasts { left: 16px; right: 16px; bottom: calc(var(--tabbar) + var(--safe-b) + 12px); }
  .toast { max-width: none; }
  .modal { align-items: end; padding: 0; }
  .modal__panel { width: 100%; border-radius: 18px 18px 0 0; max-height: 92vh; }
  .auth__card { padding: 22px 18px; }
}

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

/* ---------- language & RTL ---------- */
.lang-switch select { width: auto; min-width: 0; min-height: 38px; font-size: 13px; }
.auth__lang { position: absolute; top: 16px; inset-inline-end: 16px; }
.auth { position: relative; }
:lang(ar) body { font-family: var(--arabic); }
:lang(ar) h1, :lang(ar) h2, :lang(ar) h3, :lang(ar) .stat__value, :lang(ar) .big, :lang(ar) .team-card__name,
:lang(ar) .req-summary__who strong, :lang(ar) .timeline time { font-family: 'Chakra Petch', var(--arabic); }
/* Arabic letters must stay joined: no tracking, no forced casing */
:lang(ar) h2, :lang(ar) .eyebrow, :lang(ar) .req__type, :lang(ar) .table th, :lang(ar) .later__tag, :lang(ar) .lifecycle li, :lang(ar) .tabbar small { letter-spacing: 0; text-transform: none; }
:lang(ar) h2 { font-size: 1.08rem; }
[dir=rtl] .arrow { display: inline-block; transform: scaleX(-1); }
[dir=rtl] .lifecycle li + li::before { box-shadow: 14px 0 0 -8px var(--line-2); }
[dir=rtl] .hero { background: radial-gradient(1200px 260px at 100% 0%, rgba(232, 180, 92, .14), transparent 60%), linear-gradient(225deg, #141416, #0e0e10); }
@media (max-width: 820px) {
  .topbar .lang-switch select { max-width: 92px; }
  .season-switch select { max-width: 38vw; }
}

/* =====================================================================
   PHASE 2 & 3
   ===================================================================== */

:root { --k-match: #e8b45c; --k-training: #5fb8a0; --k-event: #8f8ff0; --k-tournament: #e4708a; }
.nav__title { margin: 14px 12px 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #6c6c74; }
:lang(ar) .nav__title { letter-spacing: 0; font-size: 12px; }
.sub { margin: 14px 0 6px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
:lang(ar) .sub { letter-spacing: 0; }
.cap { text-transform: capitalize; }
.lead { font-size: 16px; color: var(--silver); max-width: 760px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px 14px; margin: 0; }
.fieldset legend { padding: 0 6px; font-size: 13px; font-weight: 600; color: var(--silver); }
.fieldset:disabled { opacity: .55; }
.stats--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; }
.row--wrap { flex-wrap: wrap; }
.row--stack { flex-direction: column; align-items: stretch; gap: 6px; }
.row-total td { border-top: 1px solid var(--line-2); }
.count--static { position: static; }
.table-wrap--flat { border: 0; background: transparent; }
.kv--card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.tagchip { display: inline-block; font: 700 11px/1 var(--display); padding: 3px 6px; border-radius: 5px; background: var(--surface-3); color: var(--gold-2); margin-inline-end: 6px; vertical-align: middle; }
.tabs--page { margin: 6px 0 16px; }

/* mobile menu sheet */
.tabbar button { all: unset; position: relative; display: grid; place-items: center; align-content: center; gap: 3px; color: var(--muted); font-size: 16px; cursor: pointer; }
.tabbar button small { font-size: 10.5px; font-weight: 600; }
.sheet { position: fixed; inset: 0; z-index: 70; }
.sheet[hidden] { display: none; }
.sheet__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); }
.sheet__panel { position: absolute; inset-inline: 0; bottom: 0; max-height: 86vh; overflow: auto; background: var(--surface); border-radius: 18px 18px 0 0; border: 1px solid var(--line-2); padding: 14px 16px calc(16px + var(--safe-b)); animation: rise .18s ease-out; }
.sheet__head { display: flex; align-items: center; gap: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.sheet__head span { display: grid; flex: 1; min-width: 0; }
.sheet__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.sheet__item { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; background: var(--surface-2); text-decoration: none; font-weight: 600; font-size: 14px; position: relative; }
.sheet__item.is-active { background: var(--gold-soft); color: var(--gold-2); }
.sheet__item .count { margin-inline-start: auto; }
.sheet .btn--block { margin-top: 14px; }

/* public frame */
.public-root { display: block; }
.public__bar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 24px; background: rgba(9, 9, 10, .85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.public__bar .brand { padding: 0; }
.public__nav { display: flex; align-items: center; gap: 10px; }
.page--public { margin: 0 auto; }

/* segmented buttons (availability, attendance) */
.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.seg__btn { position: relative; display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--muted); font: 600 13px/1 var(--font); cursor: pointer; }
.seg__btn input { position: absolute; opacity: 0; pointer-events: none; }
.seg__btn:hover { color: var(--text); }
.seg__btn.is-on, .seg__btn:has(input:checked) { color: var(--text); }
.seg__btn--ok.is-on, .seg__btn--ok:has(input:checked) { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.seg__btn--bad.is-on, .seg__btn--bad:has(input:checked) { background: var(--bad-soft); border-color: var(--bad); color: #ff8a8d; }
.seg__btn--gold.is-on, .seg__btn--gold:has(input:checked) { background: var(--gold-soft); border-color: var(--gold); color: var(--gold-2); }
.seg__btn--info.is-on, .seg__btn--info:has(input:checked) { background: var(--info-soft); border-color: var(--info); color: var(--info); }
.seg__btn:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
.avail-mini { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--silver); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-inline-start: 6px; }
.dot--ok { background: var(--ok); } .dot--gold { background: var(--gold); } .dot--bad { background: var(--bad); } .dot--muted { background: #55555c; }

/* fixtures (matches, trainings, tournament matches) */
.fixtures { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 8px; }
.fixture { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; }
a.fixture:hover { border-color: var(--line-2); background: var(--surface-2); }
.fixture__date { display: grid; font-size: 13px; }
.fixture__date strong { font-family: var(--display); }
.fixture__date small { color: var(--muted); }
.fixture__teams { display: flex; flex-wrap: wrap; gap: 2px 6px; align-items: baseline; min-width: 0; }
.fixture__teams small { width: 100%; font-size: 12px; }
.fixture__teams .win { color: var(--gold-2); }
.fixture__side { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.fixture--staff .fixture__teams { flex-direction: column; align-items: flex-start; }
.ck { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.score { font: 700 18px/1 var(--display); padding: 4px 10px; border-radius: 8px; background: var(--surface-3); }
.score--win { color: var(--ok); } .score--loss { color: #ff8a8d; } .score--draw { color: var(--gold-2); }
.match-hero { padding: 22px; border-radius: 18px; border: 1px solid var(--line); background: linear-gradient(135deg, #151517, #0e0e10); margin-bottom: 16px; text-align: center; }
.match-hero--win { border-color: rgba(76, 195, 138, .4); } .match-hero--loss { border-color: rgba(239, 91, 95, .35); }
.match-hero__line { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; font: 700 clamp(1.3rem, 2vw + .8rem, 2rem)/1.2 var(--display); margin: 6px 0; }
.match-hero__score { color: var(--gold-2); min-width: 90px; }
.score-input { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: end; }
.score-input input { font: 700 26px var(--display); text-align: center; min-height: 56px; }
.score-input__sep { font: 700 26px var(--display); padding-bottom: 12px; color: var(--muted); }

/* calendar */
.legend { display: flex; flex-wrap: wrap; gap: 12px; margin: 6px 0 0; font-size: 12.5px; color: var(--muted); }
.legend span::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 6px; vertical-align: -1px; background: var(--kc); }
.k-match { --kc: var(--k-match); } .k-training { --kc: var(--k-training); } .k-event { --kc: var(--k-event); } .k-tournament { --kc: var(--k-tournament); }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 20px; }
.cal__wd { background: var(--surface); padding: 8px; font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
:lang(ar) .cal__wd { letter-spacing: 0; }
.cal__day { background: var(--surface); min-height: 108px; padding: 6px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal__day.is-out { background: #0e0e10; }
.cal__day.is-out .cal__num { color: #4a4a50; }
.cal__day.is-today { box-shadow: inset 0 0 0 2px var(--gold); }
.cal__num { font: 600 13px var(--display); color: var(--silver); }
.cal__more { font-size: 11.5px; color: var(--muted); }
.cal-item { all: unset; box-sizing: border-box; display: flex; align-items: baseline; gap: 6px; padding: 6px 8px; border-radius: 7px; background: var(--surface-2); border-inline-start: 3px solid var(--kc); font-size: 13px; cursor: pointer; text-decoration: none; min-width: 0; width: 100%; }
.cal-item:hover { background: var(--surface-3); }
.cal-item:focus-visible { outline: 2px solid var(--gold); }
.cal-item__time { color: var(--kc); font: 600 12px var(--display); flex: none; }
.cal-item__title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.cal-item__kind { flex: none; font-size: 11px; color: var(--muted); }
.cal-item--compact { padding: 3px 5px; font-size: 11.5px; }
.cal-item--compact .cal-item__time { font-size: 10.5px; }
.cal-item.is-cancelled .cal-item__title { text-decoration: line-through; color: var(--muted); }
.agenda { display: none; }
.agenda__day { margin-bottom: 16px; display: grid; gap: 6px; }
.agenda__day h2 { font-size: 13px; color: var(--muted); }
.agenda__day.is-today h2 { color: var(--gold); }
.agenda-mini { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }

/* progress, ratings, chart */
.progress { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; flex: 1; min-width: 60px; }
.progress span { display: block; height: 100%; border-radius: 99px; background: var(--gold); }
.meter-inline { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.meter-inline > span:last-child { font: 600 13px var(--display); min-width: 34px; text-align: end; }
.rating { font: 700 15px var(--display); padding: 3px 8px; border-radius: 7px; background: var(--surface-3); margin-inline-start: auto; }
.rating--hi { color: var(--ok); } .rating--lo { color: #ff8a8d; }
.chart { position: relative; margin: 0; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart__grid { stroke: var(--line); stroke-width: 1; }
.chart__axis { fill: var(--muted); font: 11px var(--font); }
.chart__line { fill: none; stroke: var(--gold); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart__dot { fill: var(--gold); stroke: var(--surface); stroke-width: 2; }
.chart__hit { fill: transparent; cursor: pointer; }
.chart__pt:hover .chart__dot { r: 6; }
.chart__tip { position: absolute; transform: translate(-50%, -100%); background: var(--surface-3); border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 9px; font-size: 12.5px; white-space: nowrap; pointer-events: none; }
.sliders { display: grid; gap: 10px; }
.slider { display: grid; grid-template-columns: minmax(0, 1fr) 160px 30px; align-items: center; gap: 12px; font-size: 14px; }
.slider--wide { grid-template-columns: 90px minmax(0, 1fr) 46px; }
.slider input[type=range] { accent-color: var(--gold); min-height: 0; padding: 0; background: none; border: 0; }
.slider output { font: 700 15px var(--display); color: var(--gold-2); text-align: end; }
.evals { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.eval { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); }
.eval header { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13.5px; }
.eval__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.eval__grid span { display: grid; gap: 2px; padding: 6px; border-radius: 8px; background: var(--surface); text-align: center; }
.eval__grid small { font-size: 10.5px; line-height: 1.2; }
.eval__grid b { font: 700 16px var(--display); }
.eval__notes { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--silver); font-size: 14px; }

/* objectives */
.obj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.obj { display: grid; gap: 8px; align-content: start; }
.obj__head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.obj__progress { display: flex; align-items: center; gap: 10px; }
.obj__progress b { font: 700 14px var(--display); min-width: 40px; text-align: end; }
.obj__foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.obj__foot .btn { margin-inline-start: auto; }

/* tournaments */
.t-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-top: 12px; }
.t-card { display: grid; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); text-decoration: none; transition: border-color .15s, transform .15s; }
.t-card:hover { border-color: rgba(232, 180, 92, .5); transform: translateY(-2px); }
.t-card__banner { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; height: 92px; padding: 12px 14px; background: radial-gradient(260px 120px at 85% 0%, rgba(232, 180, 92, .35), transparent 70%), linear-gradient(135deg, #1c1c20, #0b0b0c); }
.t-card__game { font: 700 12px var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--silver); }
.t-card__body { display: grid; gap: 6px; padding: 14px; }
.t-card__name { font: 700 19px/1.2 var(--display); }
.t-card__meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 13px; color: var(--silver); align-items: center; }
.t-card__champ { font-size: 13px; color: var(--gold-2); font-weight: 600; }
.t-hero { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; padding: 28px; border-radius: 20px; border: 1px solid rgba(232, 180, 92, .3); margin-bottom: 18px;
  background: radial-gradient(700px 300px at 10% 0%, rgba(232, 180, 92, .22), transparent 65%), radial-gradient(500px 300px at 100% 100%, rgba(228, 112, 138, .12), transparent 60%), linear-gradient(135deg, #17171a, #0b0b0c); }
.t-hero__art { width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center; background: #000; box-shadow: 0 0 0 1px var(--line-2), 0 20px 60px rgba(232, 180, 92, .18); }
.t-hero__body { display: grid; gap: 10px; min-width: 0; }
.t-hero__meta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; color: var(--silver); margin: 0; }
.t-hero__prize { color: var(--gold-2); font-weight: 700; }
.t-hero__champ { display: inline-flex; flex-direction: column; padding: 10px 16px; border-radius: 12px; background: var(--gold-soft); border: 1px solid rgba(232, 180, 92, .4); width: fit-content; margin: 0; }
.t-hero__champ span { font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--gold); font-weight: 700; }
.t-hero__champ strong { font: 700 22px var(--display); }
.countdown { display: flex; gap: 8px; }
.countdown span { display: grid; justify-items: center; min-width: 62px; padding: 8px 6px; border-radius: 12px; background: rgba(0, 0, 0, .35); border: 1px solid var(--line-2); }
.countdown b { font: 700 26px/1 var(--display); color: var(--gold-2); }
.countdown small { font-size: 11px; color: var(--muted); margin-top: 4px; }
.live-dot { display: inline-flex; align-items: center; gap: 8px; color: #ff8a8d; font-weight: 700; margin: 0; }
.live-dot::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--bad); animation: pulse 1.2s infinite; }
.t-actions:empty { display: none; }
.t-actions { margin-bottom: 8px; }
.t-panel { min-height: 120px; }
.team-card.is-me, .bm__team.is-me { outline: 2px solid var(--gold); outline-offset: -2px; }
.checkin { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.checkin__open { font: 700 11.5px var(--font); letter-spacing: .1em; color: var(--ok); padding: 4px 8px; border-radius: 6px; background: var(--ok-soft); animation: pulse 1.6s infinite; }
:lang(ar) .checkin__open { letter-spacing: 0; }

/* bracket */
.bracket { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 18px; overflow-x: auto; padding-bottom: 10px; }
.bracket__round { display: flex; flex-direction: column; min-width: 0; }
.bracket__round h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 10px; }
:lang(ar) .bracket__round h3 { letter-spacing: 0; }
.bracket__matches { display: flex; flex-direction: column; justify-content: space-around; gap: 12px; flex: 1; }
.bm { border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); overflow: hidden; }
.bm--bye { opacity: .55; }
.bm__team { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.bm__name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.bm__score { font: 700 15px var(--display); min-width: 22px; text-align: end; }
.bm__team.is-win { background: rgba(232, 180, 92, .1); }
.bm__team.is-win .bm__name, .bm__team.is-win .bm__score { color: var(--gold-2); }
.bm__team.is-lose { color: var(--muted); }
.bm__meta { padding: 5px 10px; font-size: 11.5px; color: var(--muted); background: var(--surface-2); }
.table--standings tr.is-lead td { background: rgba(232, 180, 92, .08); }

@media (max-width: 1100px) { .stats--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .eval__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 820px) {
  .cal { display: none; }
  .agenda { display: block; }
  .fixture { grid-template-columns: 70px minmax(0, 1fr); }
  .fixture__side { grid-column: 1 / -1; justify-content: flex-start; }
  .t-hero { grid-template-columns: 1fr; padding: 20px; text-align: start; }
  .t-hero__art { width: 84px; height: 84px; }
  .t-hero__art img { width: 64px; height: auto; }
  .countdown span { min-width: 54px; }
  .grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .slider { grid-template-columns: minmax(0, 1fr) 30px; }
  .slider input { grid-column: 1 / -1; grid-row: 2; }
  .eval__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .public__bar { padding: 8px 16px; }
  .score-input input { font-size: 22px; }
}
.row--stack .progress, .obj__progress .progress { flex: 1 0 8px; min-height: 8px; }
.row--stack .progress { flex: none; width: 100%; }

/* ---------------------------------------------------------------- security */
.banner { padding: 14px 16px; border-radius: 12px; margin-bottom: 16px; border: 1px solid var(--line-2); background: var(--surface); }
.banner p { margin: 4px 0 0; }
.banner--warn { border-color: var(--gold); background: var(--gold-soft); }
.banner--warn strong { color: var(--gold-2); }
.badge--warn { background: var(--gold-soft); color: var(--gold-2); }
.stat--bad .stat__value { color: #ff8a8d; }
.section-title { margin: 28px 0 12px; font-size: 18px; }
.card--wide { grid-column: 1 / -1; }
.qr { display: grid; place-items: center; margin: 8px 0; }
.qr svg { width: min(240px, 70vw); height: auto; border-radius: 10px; }
.setup-key { display: grid; gap: 4px; text-align: center; }
.setup-key code, .codes code { font: 600 14px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .06em; direction: ltr; unicode-bidi: isolate; }
.setup-key code { padding: 8px 10px; background: var(--surface-2); border-radius: 8px; word-break: break-all; user-select: all; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.codes code { padding: 8px; text-align: center; border: 1px dashed var(--line-2); border-radius: 8px; user-select: all; }
.steps { margin: 0 0 8px; padding-inline-start: 20px; color: var(--muted); display: grid; gap: 4px; }
.auth__link { background: none; border: 0; padding: 0; color: var(--gold); font: inherit; cursor: pointer; text-decoration: underline; }
.mfa-hint { font-size: 13px; }

/* ---------------------------------------------------------------- public home (landing) */
.page--landing { max-width: none; padding: 0 0 0; }
.page.page--landing { padding-bottom: 0; }
.main .page--landing { padding: 0; }
.btn--lg { min-height: 50px; padding: 0 24px; font-size: 15.5px; border-radius: 12px; }
.btn--glass { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .16); backdrop-filter: blur(8px); }
.btn--glass:hover { background: rgba(255, 255, 255, .12); }
.page__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.public__link { color: var(--silver); text-decoration: none; font-weight: 600; font-size: 14px; padding: 6px 8px; border-radius: 8px; }
.public__link:hover { color: var(--gold-2); }

.lp { --lp-max: 1180px; }
.lp-eyebrow { color: var(--gold); text-transform: uppercase; letter-spacing: .22em; font: 700 12px/1.4 var(--display); margin: 0 0 10px; }
.lp-hero { position: relative; overflow: hidden; min-height: min(92vh, 860px); display: grid; place-items: center; text-align: center; padding: 72px 20px 96px;
  background:
    radial-gradient(900px 480px at 50% -10%, rgba(232, 180, 92, .22), transparent 65%),
    radial-gradient(600px 400px at 0% 100%, rgba(232, 180, 92, .08), transparent 70%),
    radial-gradient(600px 400px at 100% 100%, rgba(201, 201, 206, .07), transparent 70%),
    linear-gradient(180deg, #0d0d0f 0%, #09090a 100%);
  border-bottom: 1px solid var(--line); }
.lp-hero::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image: linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 56px 56px; mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%); }
.lp-hero__glow { position: absolute; width: 520px; height: 520px; border-radius: 50%; top: 8%; left: 50%; transform: translateX(-50%);
  background: radial-gradient(circle, rgba(232, 180, 92, .28), transparent 60%); filter: blur(30px); animation: lpPulse 6s ease-in-out infinite; }
@keyframes lpPulse { 0%, 100% { opacity: .55; transform: translateX(-50%) scale(1); } 50% { opacity: .9; transform: translateX(-50%) scale(1.08); } }
.lp-hero__inner { position: relative; max-width: 860px; display: grid; justify-items: center; gap: 6px; animation: lpRise .8s ease-out both; }
@keyframes lpRise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.lp-hero__logo { width: clamp(110px, 18vw, 168px); height: auto; border-radius: 50%; box-shadow: 0 0 0 1px rgba(232, 180, 92, .35), 0 20px 80px rgba(232, 180, 92, .25); margin-bottom: 18px; }
.lp-hero__title { margin: 0; font: 700 clamp(44px, 9vw, 104px)/.95 var(--display); letter-spacing: .04em; color: var(--silver); }
.lp-hero__title span { background: linear-gradient(180deg, #ffe3a8, var(--gold) 55%, #b9832f); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-hero__tag { margin: 14px 0 0; font-size: clamp(16px, 2.2vw, 21px); color: var(--silver); max-width: 620px; }
.lp-hero__cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 30px; }
.lp-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 44px 0 0; width: min(680px, 100%);
  background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.lp-stats div { background: rgba(18, 18, 20, .85); padding: 16px 10px; display: flex; flex-direction: column-reverse; gap: 2px; }
.lp-stats dt { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; }
.lp-stats dd { margin: 0; font: 700 30px/1 var(--display); color: var(--text); }
.lp-hero__down { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); background: none; border: 1px solid var(--line-2); color: var(--silver);
  width: 42px; height: 42px; border-radius: 50%; cursor: pointer; font-size: 20px; line-height: 1; animation: lpBob 2.4s ease-in-out infinite; }
@keyframes lpBob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 6px); } }

.lp-subnav { position: sticky; top: 57px; z-index: 5; display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; padding: 10px 16px;
  background: rgba(9, 9, 10, .88); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.main .lp-subnav { top: 61px; }
.lp-subnav button { background: none; border: 1px solid transparent; color: var(--silver); font: 600 13.5px var(--font); padding: 7px 14px; border-radius: 99px; cursor: pointer; }
.lp-subnav button:hover { border-color: var(--line-2); color: var(--gold-2); }

.lp-section { max-width: var(--lp-max); margin: 0 auto; padding: 72px 24px 8px; scroll-margin-top: 110px; }
#lp-next { scroll-margin-top: 110px; }
.lp-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.lp-head .lp-eyebrow { width: 100%; margin-bottom: 4px; }
.lp-head h2 { margin: 0; font: 700 clamp(28px, 4vw, 40px)/1.1 var(--display); letter-spacing: .02em; }
.lp-more { color: var(--gold-2); text-decoration: none; font-weight: 600; }
.lp-empty { padding: 28px; border: 1px dashed var(--line-2); border-radius: 16px; color: var(--muted); text-align: center; }

.lp-matches { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.lp-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.lp-panel h3 { margin: 0 0 10px; font: 700 15px var(--display); text-transform: uppercase; letter-spacing: .12em; color: var(--silver); }
.lp-list { list-style: none; margin: 0; padding: 0; display: grid; }
.lp-match { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.lp-match:first-child { border-top: 0; }
.lp-match__date { display: grid; min-width: 74px; font-size: 13px; }
.lp-match__date small { color: var(--muted); }
.lp-match__teams { flex: 1; display: grid; gap: 2px; min-width: 0; }
.lp-match__teams small { font-size: 12px; }
.lp-res { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font: 700 14px var(--display); flex: none; }
.lp-res--ok { background: var(--ok-soft); color: var(--ok); }
.lp-res--bad { background: var(--bad-soft); color: #ff8a8d; }
.lp-res--muted { background: var(--surface-3); color: var(--silver); }
.lp-score { font: 700 20px var(--display); white-space: nowrap; }
.lp-score i { font-style: normal; color: var(--muted); margin: 0 3px; }

.lp-teams { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.lp-team { position: relative; overflow: hidden; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); }
.lp-team__head { padding: 22px 20px 18px; background: radial-gradient(320px 140px at 100% 0%, rgba(232, 180, 92, .25), transparent 70%), linear-gradient(135deg, #1b1b1f, #0e0e10); border-bottom: 1px solid var(--line); }
.lp-team__game { font: 700 11.5px var(--display); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.lp-team__head h3 { margin: 6px 0 0; font: 700 24px/1.15 var(--display); }
.lp-roster { list-style: none; margin: 0; padding: 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.lp-roster li { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; background: var(--surface-2); min-width: 0; }
.lp-roster li span:last-child { display: grid; min-width: 0; }
.lp-roster strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-roster small { color: var(--muted); font-size: 12px; }
.lp-roster li.is-sub { opacity: .75; }
.lp-roster__av { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; font: 700 12px var(--display); color: var(--gold-ink); background: linear-gradient(135deg, var(--gold-2), #b9832f); }
.lp-team > .muted { padding: 16px 20px; margin: 0; }

.lp-shop { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.lp-product { display: grid; grid-template-rows: auto 1fr; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); transition: transform .15s, border-color .15s; }
.lp-product:hover { transform: translateY(-3px); border-color: rgba(232, 180, 92, .5); }
.lp-product__img { position: relative; aspect-ratio: 1; background: radial-gradient(circle at 50% 40%, #232328, #0f0f11); display: grid; place-items: center; }
.lp-product__img img { width: 100%; height: 100%; object-fit: cover; }
.lp-product__img img.is-placeholder { width: 40%; height: auto; object-fit: contain; opacity: .5; }
.shop-img img.is-placeholder, .shop-item img.is-placeholder { object-fit: contain; padding: 14%; opacity: .5; }
.lp-product__cat { position: absolute; top: 10px; inset-inline-start: 10px; padding: 4px 9px; border-radius: 99px; font: 700 10.5px var(--display); letter-spacing: .12em; text-transform: uppercase; background: rgba(9, 9, 10, .75); color: var(--gold-2); }
.lp-product__body { display: grid; gap: 6px; padding: 14px; align-content: start; }
.lp-product__body h3 { margin: 0; font: 700 17px/1.25 var(--display); }
.lp-product__body p { margin: 0; }
.lp-product__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.lp-price { font: 700 19px var(--display); color: var(--gold-2); }
.lp-soon { font-size: 12.5px; color: var(--muted); }

.lp-join { padding-bottom: 72px; }
.lp-join__box { display: flex; justify-content: space-between; align-items: center; gap: 28px; flex-wrap: wrap; padding: 36px; border-radius: 24px; border: 1px solid rgba(232, 180, 92, .35);
  background: radial-gradient(500px 260px at 100% 0%, rgba(232, 180, 92, .22), transparent 70%), linear-gradient(135deg, #18181b, #0d0d0f); }
.lp-join__box h2 { margin: 0; font: 700 clamp(28px, 4vw, 40px)/1.1 var(--display); }
.lp-join__text { color: var(--silver); max-width: 560px; margin: 10px 0 0; }
.lp-join__cta { display: flex; gap: 10px; flex-wrap: wrap; }

.lp-foot { border-top: 1px solid var(--line); padding: 32px 24px 40px; display: grid; justify-items: center; gap: 14px; text-align: center; background: #070708; }
.lp-foot__brand { display: flex; align-items: center; gap: 10px; font: 700 20px var(--display); letter-spacing: .2em; }
.lp-foot__brand small { color: var(--gold); font-size: 11px; letter-spacing: .3em; }
.lp-social { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.lp-social a { display: inline-flex; gap: 6px; align-items: center; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--silver); text-decoration: none; font-weight: 600; font-size: 13.5px; }
.lp-social a:hover { border-color: var(--gold); color: var(--gold-2); }
.lp-foot a { color: var(--silver); }

/* shop admin */
.shop-admin { display: grid; gap: 10px; }
.shop-item { display: flex; align-items: center; gap: 14px; padding: 10px; border-radius: 14px; background: var(--surface-2); }
.shop-item img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; background: #0f0f11; }
.shop-item > div:nth-child(2) { flex: 1; display: grid; gap: 4px; min-width: 0; justify-items: start; }
.shop-item.is-hidden { opacity: .6; }
.shop-item__actions { display: flex; gap: 6px; flex-wrap: wrap; }
.shop-img { display: flex; align-items: center; gap: 16px; margin-bottom: 6px; }
.shop-img img { width: 120px; height: 120px; object-fit: cover; border-radius: 14px; background: #0f0f11; border: 1px solid var(--line); }
.shop-img__actions { display: grid; gap: 8px; justify-items: start; }

@media (max-width: 760px) {
  .public__link { display: none; }
  .lp-hero { min-height: auto; padding: 56px 16px 84px; }
  .lp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-section { padding: 52px 16px 4px; }
  .lp-subnav { top: 53px; justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; }
  .main .lp-subnav { top: 57px; }
  .lp-roster { grid-template-columns: 1fr; }
  .lp-join__box { padding: 24px; }
  .lp-matches { grid-template-columns: 1fr; }
  .lp-shop { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .lp-product__body { padding: 10px; }
  .lp-product__foot { flex-direction: column; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) { .lp-hero__glow, .lp-hero__inner, .lp-hero__down { animation: none; } }
.lp-vs { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.lp-vs em { font-style: normal; color: var(--muted); font-size: 12px; text-transform: uppercase; }
@media (max-width: 520px) {
  .public__bar .brand span { display: none; }
  .public__nav { gap: 6px; }
  .public__join { display: none; }
  .lp-hero__title { font-size: 46px; }
}
