:root {
  --bg: #0b1226;
  --bg2: #111b38;
  --card: rgba(20, 31, 64, 0.82);
  --line: rgba(224, 179, 84, 0.18);
  --line2: rgba(255, 255, 255, 0.08);
  --text: #eef0f6;
  --muted: #9aa3bd;
  --gold: #e0b354;
  --gold2: #f3d58d;
  --green: #3fb68b;
  --red: #e5675f;
  --r1: #8b95ad;   /* average */
  --r2: #5b8def;   /* intermediate */
  --r3: #e0b354;   /* pro */
  --radius: 16px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--text); background: var(--bg);
  font: 16px/1.5 "Outfit", system-ui, sans-serif;
  display: flex; flex-direction: column;
}
/* night-stadium background: moonlit sky, stars, floodlights, faint pitch */
.sky {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
  background:
    radial-gradient(60vmax 40vmax at 85% -5%, rgba(224,179,84,.20), transparent 60%),
    conic-gradient(from 200deg at 0% 0%, transparent 0deg, rgba(255,240,200,.05) 12deg, transparent 24deg),
    conic-gradient(from 130deg at 100% 0%, transparent 0deg, rgba(255,240,200,.05) 12deg, transparent 24deg),
    radial-gradient(70vmax 30vmax at 50% 110%, rgba(47,158,107,.22), transparent 70%),
    linear-gradient(180deg, #070d1d 0%, var(--bg) 45%, #0d2030 100%);
}
.sky .stars {
  position: absolute; inset: 0 0 35% 0; opacity: .7;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 18%, #fff, transparent),
    radial-gradient(1px 1px at 28% 8%, #fff, transparent),
    radial-gradient(1.4px 1.4px at 44% 26%, #ffe9b0, transparent),
    radial-gradient(1px 1px at 61% 12%, #fff, transparent),
    radial-gradient(1.3px 1.3px at 73% 30%, #fff, transparent),
    radial-gradient(1px 1px at 91% 20%, #fff, transparent),
    radial-gradient(1px 1px at 6% 40%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 35% 45%, #fff, transparent),
    radial-gradient(1px 1px at 82% 48%, #ffe9b0, transparent),
    radial-gradient(1px 1px at 55% 5%, #fff, transparent);
  background-size: 420px 300px;
  animation: twinkle 6s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .45; } to { opacity: .8; } }
.sky .emblem { position: absolute; width: min(58vmax, 720px); top: -6vmax; inset-inline-end: -10vmax; opacity: .07; filter: blur(.5px); transform: rotate(-8deg); }
.sky .field { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 34vh; color: rgba(255,255,255,.07); }
a { color: var(--gold2); }
h1, h2, h3 { font-family: "Reem Kufi", "Outfit", sans-serif; font-weight: 700; line-height: 1.2; margin: 0 0 .6em; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
.muted { color: var(--muted); font-weight: 400; }
.small { font-size: .9rem; }

/* header */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 20px; max-width: 1180px; width: 100%; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 600; min-width: 0; }
.brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logo { width: 38px; height: 38px; flex: none; filter: drop-shadow(0 0 10px rgba(224,179,84,.45)); }
.hero-logo { width: 110px; height: 110px; display: block; margin: 0 auto 14px; filter: drop-shadow(0 0 24px rgba(224,179,84,.45)); animation: float 6s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-6px) rotate(3deg); } }
.top nav a.lang { border: 1px solid var(--line); border-radius: 99px; padding: 3px 12px; color: var(--gold2); }
.top nav a.lang:lang(ar) { font-family: "Tajawal", sans-serif; }
.top nav { display: flex; align-items: center; gap: 16px; flex: none; }
.top nav a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.top nav a:hover { color: var(--text); }

main { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px 40px; flex: 1; }
.foot { text-align: center; color: var(--muted); padding: 24px; font-size: .9rem; }

/* hero */
.hero { position: relative; text-align: center; padding: 48px 0 28px; max-width: 640px; margin: 0 auto; }
.hero.small { padding: 24px 0 16px; }
.hero h1 { font-size: clamp(2rem, 6vw, 3.1rem); background: linear-gradient(180deg, var(--gold2), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: .78rem; color: var(--gold); margin: 0 0 10px; }
.lede { color: var(--muted); font-size: 1.08rem; margin: 0 auto 22px; max-width: 520px; }
.stats { display: inline-flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.stats div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 18px; min-width: 130px; }
.stats strong { display: block; font-size: 1.4rem; color: var(--gold2); font-variant-numeric: tabular-nums; }
.stats span { color: var(--muted); font-size: .85rem; }

.lanterns { position: absolute; inset: 0 -60px auto; height: 0; pointer-events: none; }
.lantern { position: absolute; top: -40px; width: 34px; animation: sway 5s ease-in-out infinite; transform-origin: top center; }
.lantern line { stroke: var(--gold); stroke-width: 1; opacity: .6; }
.lantern .cap { fill: var(--gold); }
.lantern .body { fill: rgba(224,179,84,.18); stroke: var(--gold); stroke-width: 1.5; }
.lantern .glow { fill: #ffd98a; opacity: .75; filter: blur(1.5px); animation: flicker 3s ease-in-out infinite; }
.lantern.l0 { left: 0; }
.lantern.l1 { right: 20px; top: -20px; width: 26px; animation-delay: -2s; }
.lantern.l2 { right: -20px; top: -55px; width: 22px; animation-delay: -3.5s; }
@keyframes sway { 0%,100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes flicker { 0%,100% { opacity: .75; } 50% { opacity: .5; } }
@media (max-width: 760px) { .lanterns { display: none; } }

/* cards & forms */
.card { background: var(--card); border: 1px solid var(--line2); border-radius: var(--radius); padding: 22px; margin: 0 auto 20px; backdrop-filter: blur(8px); box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.form-card { max-width: 520px; border-color: var(--line); }
.narrow { max-width: 380px; margin-top: 60px; }
form { display: grid; gap: 18px; }
label { display: grid; gap: 6px; font-weight: 500; font-size: .95rem; }
input[type=text], input[type=email], input:not([type]), input[type=number], input[type=password], input[type=datetime-local] {
  width: 100%; font: inherit; color: var(--text); background: rgba(0,0,0,.25);
  border: 1px solid var(--line2); border-radius: 10px; padding: 12px 14px; color-scheme: dark;
}
input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(224,179,84,.2); }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 500; font-size: .95rem; margin-bottom: 6px; padding: 0; }
.positions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (max-width: 460px) { .positions { grid-template-columns: repeat(2, 1fr); } }
.pos { display: block; cursor: pointer; }
.pos input { position: absolute; opacity: 0; pointer-events: none; }
.pos span { display: grid; place-items: center; text-align: center; gap: 2px; padding: 12px 6px; border-radius: 10px; border: 1px solid var(--line2); background: rgba(0,0,0,.2); font-size: .8rem; color: var(--muted); transition: .15s; }
.pos span b { font-size: 1.05rem; color: var(--text); }
.pos input:checked + span { border-color: var(--gold); background: rgba(224,179,84,.14); color: var(--gold2); }
.pos input:focus-visible + span { box-shadow: 0 0 0 3px rgba(224,179,84,.3); }
.hp { position: absolute; left: -9999px; }

.btn {
  font: inherit; font-weight: 600; cursor: pointer; border: 0; border-radius: 10px; padding: 11px 18px;
  background: linear-gradient(180deg, var(--gold2), var(--gold)); color: #241a05; text-decoration: none; display: inline-block; text-align: center;
  transition: transform .1s, opacity .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.btn.ghost { background: transparent; color: var(--gold2); border: 1px solid var(--line); }
.btn.wide { width: 100%; padding: 14px; font-size: 1.05rem; }
.btn.big { padding: 12px 22px; }
.linklike { background: none; border: 0; color: var(--gold2); font: inherit; padding: 0; cursor: pointer; text-decoration: underline; }

.errors { background: rgba(229,103,95,.12); border: 1px solid rgba(229,103,95,.4); color: #ffb4ae; border-radius: 10px; padding-block: 10px; padding-inline: 30px 14px; margin: 0 0 16px; }
.success, .closed { text-align: center; padding: 12px 0; }
.success svg { width: 56px; height: 56px; stroke: var(--green); stroke-width: 2.5; fill: none; stroke-linecap: round; stroke-linejoin: round; background: rgba(63,182,139,.14); border-radius: 50%; padding: 12px; margin-bottom: 8px; }
.success p, .closed p { color: var(--muted); }

/* admin */
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.row-between h2 { margin: 0; }
.pill { font-size: .8rem; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: rgba(255,255,255,.08); color: var(--muted); }
.pill.open { background: rgba(63,182,139,.16); color: #7fe0bb; }
.pill.closed { background: rgba(229,103,95,.16); color: #ffa39c; }
.settings { display: flex; gap: 14px; align-items: end; flex-wrap: wrap; }
.settings label { flex: 1 1 260px; }
.settings-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.bell { position: relative; background: none; border: 0; cursor: pointer; padding: 4px; color: var(--muted); }
.bell svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.bell.ringing { color: var(--gold2); animation: ring 2.4s ease-in-out infinite; }
.bell span { position: absolute; top: -2px; right: -4px; background: var(--red); color: white; font-size: .7rem; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; }
@keyframes ring { 0%,80%,100% { transform: rotate(0); } 85% { transform: rotate(14deg); } 90% { transform: rotate(-12deg); } 95% { transform: rotate(6deg); } }

.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font: inherit; font-size: .85rem; background: rgba(255,255,255,.05); color: var(--muted); border: 1px solid var(--line2); border-radius: 99px; padding: 5px 12px; cursor: pointer; }
.chip.active { background: rgba(224,179,84,.15); color: var(--gold2); border-color: var(--line); }
.tally { display: flex; gap: 14px; flex-wrap: wrap; font-size: .88rem; color: var(--muted); margin-bottom: 14px; align-items: center; }
.tally b { color: var(--text); }
.tally i { width: 1px; height: 16px; background: var(--line2); }
.tally .r3 b { color: var(--r3); } .tally .r2 b { color: var(--r2); }

.players { display: grid; gap: 8px; }
.prow { display: grid; grid-template-columns: 44px 1fr auto 36px; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: rgba(0,0,0,.18); border: 1px solid var(--line2); }
.prow.unseen { border-color: rgba(224,179,84,.5); background: rgba(224,179,84,.07); }
.prow .who { min-width: 0; }
.prow .who b { margin-right: 6px; }
.prow .who small { display: block; color: var(--muted); }
.badge { font-size: .65rem; font-weight: 700; letter-spacing: .06em; background: var(--gold); color: #241a05; padding: 1px 6px; border-radius: 4px; vertical-align: 2px; }
.num { display: inline-grid; place-items: center; min-width: 34px; height: 34px; border-radius: 9px; background: rgba(255,255,255,.07); font-weight: 700; font-variant-numeric: tabular-nums; }
.rate { display: inline-flex; border: 1px solid var(--line2); border-radius: 10px; overflow: hidden; }
.rate button { font: inherit; font-size: .82rem; background: transparent; color: var(--muted); border: 0; padding: 7px 11px; cursor: pointer; border-right: 1px solid var(--line2); }
.rate button:last-child { border-right: 0; }
.rate button:hover { color: var(--text); background: rgba(255,255,255,.05); }
.rate .r1.on { background: var(--r1); color: #0b1226; }
.rate .r2.on { background: var(--r2); color: white; }
.rate .r3.on { background: var(--r3); color: #241a05; }
.prow.unrated .rate { border-color: rgba(224,179,84,.45); }
.del { background: none; border: 0; cursor: pointer; padding: 6px; border-radius: 8px; color: var(--muted); }
.del svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.del:hover, .del.confirm { color: var(--red); background: rgba(229,103,95,.12); }
.empty { text-align: center; padding: 24px 0; }
@media (max-width: 640px) {
  .prow { grid-template-columns: 40px 1fr 36px; }
  .prow .rate { grid-column: 1 / -1; order: 3; display: grid; grid-template-columns: repeat(3, 1fr); }
  .card { padding: 16px; }
  main { padding: 0 16px 32px; }
  .top { padding: 12px 16px; }
  .top nav { gap: 12px; }
}

.toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 10; max-width: calc(100vw - 32px); }
.toast { background: #1b2750; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; box-shadow: 0 10px 30px rgba(0,0,0,.4); animation: slide .25s ease-out; transition: opacity .5s, transform .5s; }
.toast.new { border-color: var(--gold); }
.toast.err { border-color: var(--red); }
.toast.out { opacity: 0; transform: translateY(8px); }
@keyframes slide { from { opacity: 0; transform: translateY(12px); } }

/* teams */
.fair { background: rgba(255,255,255,.04); border: 1px solid var(--line2); border-radius: 12px; padding: 12px 14px; margin: 6px 0 16px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fair b { color: var(--text); }
.fair.good b { color: #7fe0bb; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-bottom: 20px; }
.team { background: var(--card); border: 1px solid var(--line2); border-top: 3px solid var(--team); border-radius: 14px; padding: 14px; }
.team header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.team h3 { margin: 0; flex: 1; }
.team .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--team); box-shadow: 0 0 10px var(--team); }
.team .score { font-weight: 700; color: var(--gold2); font-size: 1.15rem; }
.team .bar { height: 6px; background: rgba(255,255,255,.06); border-radius: 3px; overflow: hidden; margin-bottom: 8px; }
.team .bar i { display: block; height: 100%; background: var(--team); border-radius: 3px; }
.mix { font-size: .8rem; color: var(--muted); margin: 0 0 10px; }
.mix span { margin-right: 6px; font-weight: 600; }
.mix .r3 { color: var(--r3); } .mix .r2 { color: var(--r2); } .mix .r1 { color: var(--r1); }
.team ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.team li { display: flex; align-items: center; gap: 10px; font-size: .93rem; }
.team li .num { min-width: 28px; height: 26px; font-size: .82rem; border-radius: 7px; }
.pname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { font-size: .7rem; font-weight: 600; letter-spacing: .04em; color: var(--muted); border: 1px solid var(--line2); border-radius: 5px; padding: 1px 5px; }
.rdot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.rdot.r1 { background: var(--r1); } .rdot.r2 { background: var(--r2); } .rdot.r3 { background: var(--r3); }
.res-h { margin-top: 4px; }
.reserve-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.reserve-list li { display: flex; align-items: center; gap: 8px; background: rgba(0,0,0,.2); border: 1px solid var(--line2); border-radius: 10px; padding: 5px 10px 5px 5px; }
.reserve-list .num { min-width: 26px; height: 26px; font-size: .8rem; }

/* ---------- pitch position picker ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pitch {
  position: relative; width: 100%; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; margin-top: 4px;
  background: repeating-linear-gradient(180deg, #1f7a46 0 10%, #1b6e3f 10% 20%);
  box-shadow: inset 0 0 60px rgba(0,0,0,.35), 0 8px 30px rgba(0,0,0,.3);
}
.pitch-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.spot { position: absolute; transform: translate(-50%, -50%); display: block; cursor: pointer; z-index: 1; }
.spot input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.spot .shirt { position: relative; display: grid; place-items: center; width: 50px; height: 46px; transition: transform .15s; }
.spot .shirt svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: rgba(11,18,38,.55); stroke: rgba(255,255,255,.7); stroke-width: 1.5; transition: .15s; }
.spot .shirt b { position: relative; top: 3px; font-size: .72rem; letter-spacing: .02em; color: #fff; }
.spot:hover .shirt { transform: scale(1.08); }
.spot input:focus-visible + .shirt svg { stroke: var(--gold2); stroke-width: 2.5; }
.spot input:checked + .shirt { transform: scale(1.18); }
.spot input:checked + .shirt svg { fill: var(--gold); stroke: #fff6dc; filter: drop-shadow(0 0 10px rgba(224,179,84,.8)); }
.spot input:checked + .shirt b { color: #241a05; font-size: .9rem; }
.pitch-caption { text-align: center; color: var(--muted); margin: 10px 0 0; font-size: .95rem; }
.pitch-caption.on b { color: var(--gold2); }
@media (max-width: 400px) { .spot .shirt { width: 42px; height: 39px; } .spot .shirt b { font-size: .64rem; } }

/* ---------- admin tabs ---------- */
.tabs { display: flex; gap: 4px; margin: 4px 0 18px; border-bottom: 1px solid var(--line2); }
.tab { font: inherit; font-weight: 600; background: none; border: 0; color: var(--muted); padding: 10px 16px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; display: flex; gap: 8px; align-items: center; }
.tab.active { color: var(--gold2); border-bottom-color: var(--gold); }
.tab .count { font-size: .75rem; background: rgba(255,255,255,.08); border-radius: 99px; padding: 1px 8px; }
.tab .count.alert { background: var(--red); color: #fff; }
.panel[hidden] { display: none; }
.email { color: var(--muted); font-size: .85rem; word-break: break-all; }

/* ---------- team editor ---------- */
.editbar { position: sticky; top: 8px; z-index: 5; display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  background: #1b2750; border: 1px solid var(--gold); border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.editbar[hidden] { display: none; }
.help { font-size: .88rem; color: var(--muted); margin: 0 0 12px; }
.team.drop, .reserves.drop { outline: 2px dashed var(--gold); outline-offset: 2px; }
.team li.mv, .reserves li.mv { cursor: grab; border-radius: 8px; padding: 2px 4px; margin: 0 -4px; transition: background .12s; }
.team li.mv:hover, .reserves li.mv:hover { background: rgba(255,255,255,.06); }
.team li.picked, .reserves li.picked { background: rgba(224,179,84,.2) !important; outline: 1px solid var(--gold); }
.team li.dragging { opacity: .4; }
.team .head-name { font-family: "Reem Kufi", "Outfit", sans-serif; font-weight: 700; font-size: 1.1rem; background: transparent; border: 1px solid transparent; color: var(--text); border-radius: 6px; padding: 2px 6px; margin-inline-start: -6px; flex: 1; min-width: 0; width: 100%; }
.team .head-name:hover, .team .head-name:focus { border-color: var(--line2); outline: none; background: rgba(0,0,0,.2); }
.movehere { display: none; font: inherit; font-size: .8rem; font-weight: 600; width: 100%; margin-top: 8px; padding: 6px; border-radius: 8px; border: 1px dashed var(--gold); background: rgba(224,179,84,.08); color: var(--gold2); cursor: pointer; }
.picking .movehere { display: block; }
.team .count-warn { font-size: .75rem; color: #ffa39c; }
.reserves { background: rgba(0,0,0,.15); border: 1px solid var(--line2); border-radius: 14px; padding: 14px; }
.reserves ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; }
.reserves li { display: flex; align-items: center; gap: 8px; background: rgba(0,0,0,.2); border: 1px solid var(--line2); border-radius: 10px; padding: 4px 10px 4px 4px; }
.reserves li .num { min-width: 26px; height: 26px; font-size: .8rem; }
.empty-state { text-align: center; padding: 30px 10px; color: var(--muted); }
.team .ar { font-family: "Reem Kufi", sans-serif; color: var(--muted); font-size: .95rem; }
.team .names { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.team .sub { color: var(--muted); font-size: .82rem; }
.team .names .ar { font-size: .85rem; padding-left: 0; }
.pname[dir="auto"] { text-align: left; }
[dir="rtl"] .pname[dir="auto"] { text-align: right; }

/* ---------- Arabic / right-to-left ---------- */
[dir="rtl"] body, html[dir="rtl"] body { font-family: "Tajawal", "Outfit", system-ui, sans-serif; }
html[dir="rtl"] .eyebrow { letter-spacing: 0; }
html[dir="rtl"] .toasts { right: auto; left: 16px; }
html[dir="rtl"] .lanterns .l0 { left: auto; right: 0; }
html[dir="rtl"] .lanterns .l1 { right: auto; left: 20px; }
html[dir="rtl"] .lanterns .l2 { right: auto; left: -20px; }
html[dir="rtl"] input[type=number], html[dir="rtl"] input[type=datetime-local] { text-align: right; }
html[dir="rtl"] .rate button { border-right: 0; border-left: 1px solid var(--line2); }
html[dir="rtl"] .rate button:last-child { border-left: 0; }
html[dir="rtl"] .team .names h3 { font-size: 1.05rem; }
.team .names h3 { margin: 0; }

/* ---------- fixtures & standings ---------- */
.fixtures { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin-bottom: 20px; }
.fixture { background: var(--card); border: 1px solid var(--line2); border-radius: 14px; padding: 12px 14px; }
.fixture.played { border-color: rgba(63,182,139,.35); }
.fx-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: .82rem; margin-bottom: 8px; }
.fx-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.fx-team { display: flex; align-items: center; gap: 8px; min-width: 0; }
.fx-team b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-team.away { justify-content: flex-end; text-align: end; }
.fx-score { font-weight: 700; font-size: 1.15rem; color: var(--gold2); min-width: 56px; text-align: center; font-variant-numeric: tabular-nums; }
.fx-loc { font-size: .85rem; color: var(--muted); margin-top: 8px; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--team); box-shadow: 0 0 8px var(--team); flex: none; }
.table-wrap { overflow-x: auto; }
.standings { width: 100%; border-collapse: collapse; font-size: .92rem; font-variant-numeric: tabular-nums; }
.standings th, .standings td { padding: 8px 6px; text-align: center; border-bottom: 1px solid var(--line2); }
.standings th { color: var(--muted); font-weight: 500; font-size: .8rem; }
.standings .tl { text-align: start; white-space: nowrap; }
.standings tbody tr:first-child td { color: var(--gold2); }

/* ---------- admin matches ---------- */
.mrow { display: grid; grid-template-columns: 1.2fr 1.2fr 1fr 1.4fr auto; gap: 8px; align-items: center; padding: 10px; border: 1px solid var(--line2); border-radius: 12px; background: rgba(0,0,0,.18); }
.mrow + .mrow { margin-top: 8px; }
.mrow .teams { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mrow .teams span { display: flex; align-items: center; gap: 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mrow .lbl { font-size: .75rem; color: var(--muted); }
.mrow input, .add-match input, .add-match select, .gen select { font: inherit; font-size: .9rem; color: var(--text); background: rgba(0,0,0,.25); border: 1px solid var(--line2); border-radius: 8px; padding: 7px 8px; width: 100%; color-scheme: dark; }
.mrow .scores { display: flex; gap: 4px; align-items: center; }
.mrow .scores input { width: 52px; text-align: center; }
.mrow .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.btn.sm { padding: 7px 11px; font-size: .85rem; }
.btn.ok { background: rgba(63,182,139,.18); color: #7fe0bb; border: 1px solid rgba(63,182,139,.4); }
.btn.warn { background: rgba(229,103,95,.14); color: #ffa39c; border: 1px solid rgba(229,103,95,.4); }
.add-match, .gen { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; align-items: end; }
.add-match label, .gen label { font-size: .85rem; }
.email-card .row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.email-card input { font: inherit; color: var(--text); background: rgba(0,0,0,.25); border: 1px solid var(--line2); border-radius: 8px; padding: 8px 10px; min-width: 220px; }
.notice { border-radius: 10px; padding: 10px 14px; font-size: .9rem; margin-bottom: 12px; background: rgba(224,179,84,.1); border: 1px solid var(--line); color: var(--gold2); }
.mgroup-h { font-size: .85rem; color: var(--muted); margin: 18px 0 8px; text-transform: uppercase; letter-spacing: .08em; }
@media (max-width: 820px) { .mrow { grid-template-columns: 1fr 1fr; } .mrow .teams { grid-column: 1 / -1; } .mrow .acts { grid-column: 1 / -1; justify-content: flex-start; } }
