/* LandStep admin panel. No framework: tokens, a sidebar layout, cards, tables, forms. */
:root {
  --bg: #f5f6f3;
  --surface: #ffffff;
  --surface-2: #f0f2ee;
  --border: #dfe3dc;
  --text: #1c211d;
  --muted: #5f6b62;
  --brand: #1f6f4a;
  --brand-ink: #ffffff;
  --brand-soft: #e3f1e9;
  --gold: #b8860b;
  --gold-soft: #fbf1d6;
  --danger: #b42318;
  --danger-soft: #fdeceb;
  --warn: #9a6700;
  --warn-soft: #fff4d6;
  --ok: #1a7f37;
  --ok-soft: #e6f4ea;
  --shadow: 0 1px 2px rgb(16 24 20 / 6%), 0 2px 8px rgb(16 24 20 / 5%);
  --radius: 12px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111513;
    --surface: #181d1a;
    --surface-2: #1f2522;
    --border: #2c3430;
    --text: #e7ece8;
    --muted: #9aa69e;
    --brand: #3fa877;
    --brand-ink: #08130d;
    --brand-soft: #173326;
    --gold: #f2c14e;
    --gold-soft: #3a2f12;
    --danger: #ff7b72;
    --danger-soft: #3b1715;
    --warn: #e3b341;
    --warn-soft: #3a2e10;
    --ok: #56d364;
    --ok-soft: #12301a;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: 22px; font-weight: 650; }
h2 { font-size: 16px; font-weight: 650; }
h3 { font-size: 14px; font-weight: 650; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
svg { width: 18px; height: 18px; flex: none; }
dl { margin: 0; }

/* layout */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side { background: var(--surface); border-right: 1px solid var(--border); padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; font-weight: 700; font-size: 15px; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--brand); display: grid; place-items: center; }
.brand-mark svg { width: 20px; height: 20px; }
.brand small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text); font-weight: 520; }
.nav a:hover { background: var(--surface-2); text-decoration: none; }
.nav a.active { background: var(--brand-soft); color: var(--brand); }
.nav svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.nav .soon { margin-left: auto; font-size: 10.5px; font-weight: 600; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 1px 7px; }
.nav-sep { height: 1px; background: var(--border); margin: 10px 6px; }
.side-foot { margin-top: auto; padding: 10px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--muted); display: grid; gap: 6px; }
.side-foot .who { color: var(--text); font-weight: 560; overflow: hidden; text-overflow: ellipsis; }
.main { padding: 26px 32px 60px; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.stack { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.split-wide { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); align-items: start; }
.grid.split-narrow { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); align-items: start; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }

/* cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-body { padding: 18px; }
.card-head { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-head p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }
.stat { padding: 16px 18px; }
.stat .label { color: var(--muted); font-size: 12.5px; font-weight: 520; }
.stat .value { font-size: 24px; font-weight: 680; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat .hint { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* banners & badges */
.banner { border-radius: 10px; padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; border: 1px solid transparent; }
.banner svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.banner.info { background: var(--brand-soft); color: var(--text); border-color: color-mix(in srgb, var(--brand) 25%, transparent); }
.banner.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.banner.danger { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.gold { background: var(--gold-soft); color: var(--gold); }
.badge.brand { background: var(--brand-soft); color: var(--brand); }
/* Players page filters: chips closed with ×, then "+ Add filter" */
.filter-bar { padding: 10px 18px; border-bottom: 1px solid var(--border); color: var(--muted); gap: 8px; }
.filter-chip { padding-right: 3px; }
.filter-chip button { padding: 0 3px; min-height: 0; height: 18px; color: inherit; }
.filter-bar select { width: auto; }
.elim-row { padding: 10px 0; border-bottom: 1px solid var(--border); flex-wrap: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

/* buttons & forms */
button, .btn { font: inherit; font-weight: 600; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 8px 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; line-height: 1.2; }
button:hover, .btn:hover { background: var(--surface-2); text-decoration: none; }
button:disabled { opacity: .55; cursor: not-allowed; }
button.primary, .btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
button.primary:hover, .btn.primary:hover { filter: brightness(1.06); background: var(--brand); }
button.danger { color: var(--danger); }
button.danger.solid { background: var(--danger); border-color: var(--danger); color: #fff; }
button.ghost { border-color: transparent; background: transparent; }
button.small { padding: 5px 10px; font-size: 12.5px; }
button svg, .btn svg { width: 16px; height: 16px; }
.btn { color: var(--text); text-decoration: none; }
.nav .count { margin-left: auto; font-size: 11px; font-weight: 700; color: #fff; background: var(--danger); border-radius: 999px; padding: 1px 7px; }
.quote { margin: 0; padding: 10px 14px; border-left: 3px solid var(--border); background: var(--surface-2); border-radius: 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.report-item { display: grid; gap: 8px; padding: 12px 0; border-top: 1px solid var(--border); }
.clip { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
label.field { display: grid; gap: 6px; align-content: start; font-weight: 560; font-size: 13px; }
label.field .help { font-weight: 400; color: var(--muted); font-size: 12px; }
input, select, textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; width: 100%; min-width: 0; }
textarea { resize: vertical; min-height: 72px; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid color-mix(in srgb, var(--brand) 60%, transparent); outline-offset: 1px; }
input[aria-invalid="true"] { border-color: var(--danger); }
.input-group { display: flex; }
.input-group input { border-radius: 8px 0 0 8px; }
.input-group button { border-radius: 0 8px 8px 0; border-left: 0; }
.search { position: relative; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }
.search input { padding-left: 34px; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 560; }
.switch input { appearance: none; width: 40px; height: 22px; border-radius: 999px; background: var(--border); position: relative; padding: 0; border: 0; cursor: pointer; flex: none; transition: background .15s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgb(0 0 0 / 25%); }
.switch input:checked { background: var(--danger); }
.switch input:checked::after { transform: translateX(18px); }
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
.actions { display: flex; gap: 10px; justify-content: flex-end; align-items: center; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 14px; overflow-x: auto; }
.tabs button { white-space: nowrap; flex: none; border: 0; border-radius: 8px 8px 0 0; background: transparent; color: var(--muted); padding: 8px 12px; border-bottom: 2px solid transparent; }
.tabs button.active { color: var(--brand); border-bottom-color: var(--brand); }
.tabs button .tick { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); display: inline-block; }

/* tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--surface-2); }
.empty { padding: 36px 18px; text-align: center; color: var(--muted); }
.empty svg { width: 34px; height: 34px; opacity: .55; display: block; margin: 0 auto 10px; }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12.5px; }

/* player */
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; flex: none; }
.avatar.lg { width: 56px; height: 56px; font-size: 20px; }
.who-cell { display: flex; align-items: center; gap: 10px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.amount.plus { color: var(--ok); }
.amount.minus { color: var(--danger); }
/* player activity */
.feed-day { padding: 14px 18px 6px; font-size: 12px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.feed-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 18px; border-top: 1px solid var(--border); }
.feed-day + .feed-row { border-top: 0; }
.feed-icon { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.feed-icon svg { width: 16px; height: 16px; }
.feed-icon.ok { background: var(--ok-soft); color: var(--ok); }
.feed-icon.warn { background: var(--warn-soft); color: var(--warn); }
.feed-icon.danger { background: var(--danger-soft); color: var(--danger); }
.feed-icon.gold { background: var(--gold-soft); color: var(--gold); }
.feed-icon.brand { background: var(--brand-soft); color: var(--brand); }
.feed-text { min-width: 0; overflow-wrap: anywhere; }
.feed-who { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; color: var(--text); vertical-align: middle; }
.gold-text { color: var(--gold); }
.avatar.sm { width: 22px; height: 22px; font-size: 11px; }
.copy { border: 0; background: none; padding: 2px; color: var(--muted); cursor: pointer; }
.copy svg { width: 14px; height: 14px; }

/* events preview */
.phone { width: 300px; max-width: 100%; border-radius: 28px; border: 1px solid var(--border); background: linear-gradient(180deg, #2b5e47, #173a2b); padding: 16px 14px 22px; color: #fff; box-shadow: var(--shadow); }
.phone .bar { height: 5px; width: 90px; background: rgb(255 255 255 / 30%); border-radius: 999px; margin: 0 auto 16px; }
.event-card { background: rgb(255 255 255 / 12%); border: 1px solid rgb(255 255 255 / 18%); border-radius: 16px; padding: 14px; backdrop-filter: blur(6px); }
.event-card .kicker { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #f2c14e; display: flex; gap: 6px; align-items: center; }
.event-card h3 { font-size: 16px; margin: 6px 0 4px; color: #fff; }
.event-card p { margin: 0; font-size: 13px; color: rgb(255 255 255 / 85%); }
.event-card .when { margin-top: 10px; font-size: 12px; color: rgb(255 255 255 / 70%); }
.event-card[dir="rtl"] { text-align: right; }

/* sign-in */
.signin { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.signin .card { width: 380px; max-width: 100%; text-align: center; }
.signin .card-body { padding: 32px 28px; display: grid; gap: 16px; justify-items: center; }
.google-btn { width: 100%; justify-content: center; padding: 11px 14px; font-size: 14.5px; }
.google-btn svg { width: 18px; height: 18px; }

/* dialogs & toasts */
dialog { border: 1px solid var(--border); border-radius: 14px; padding: 0; background: var(--surface); color: var(--text); width: 440px; max-width: calc(100vw - 32px); box-shadow: 0 20px 50px rgb(0 0 0 / 25%); }
dialog::backdrop { background: rgb(10 14 12 / 45%); }
dialog .card-body { display: grid; gap: 12px; }
#toasts { position: fixed; right: 18px; bottom: 18px; display: grid; gap: 8px; z-index: 50; }
.toast { background: var(--text); color: var(--surface); padding: 10px 14px; border-radius: 10px; box-shadow: var(--shadow); max-width: 380px; font-weight: 520; animation: rise .18s ease-out; }
.toast.error { background: var(--danger); color: #fff; }
@keyframes rise { from { transform: translateY(6px); opacity: 0; } }
.skeleton { height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2), var(--border), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.spin { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1000px) {
  .grid.split-narrow { grid-template-columns: minmax(0, 1fr); }
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; padding: 10px; gap: 2px; border-right: 0; border-bottom: 1px solid var(--border); }
  .brand { padding: 4px 8px; width: 100%; }
  .nav { display: flex; flex-wrap: wrap; gap: 2px; }
  .nav-sep, .side-foot { display: none; }
  .main { padding: 18px 16px 48px; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4, .grid.split-wide, .grid.split-narrow, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat .value { font-size: 20px; }
}

/* announcements */
.mascot-sm { width: 34px; height: 34px; object-fit: contain; display: block; }
.mascot-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.mascot-pick button { padding: 4px; border-radius: 10px; }
.mascot-pick button.active { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand); }
.counter { font-variant-numeric: tabular-nums; }
.counter.over, .danger-text { color: var(--danger); }
.ann-phone { padding-bottom: 28px; }
.ann-card { position: relative; overflow: hidden; background: #fff; color: #1c211d; border-radius: 22px; padding: 18px 16px 14px; display: grid; gap: 8px; justify-items: center; text-align: center; box-shadow: 0 10px 30px rgb(0 0 0 / 25%); }
.ann-card .mascot { width: 112px; height: 112px; object-fit: contain; position: relative; }
.ann-card h3 { font-size: 18px; font-weight: 750; margin: 0; overflow-wrap: anywhere; position: relative; }
.ann-card .ann-body { font-size: 13.5px; color: #4a554d; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 9.5em; overflow-y: auto; width: 100%; position: relative; }
.ann-card .ann-btn { width: 100%; border-radius: 999px; padding: 10px; font-weight: 650; color: #1f6f4a; position: relative; }
.ann-card .ann-btn.primary { background: #1f6f4a; color: #fff; }
.ann-card[dir="rtl"] { direction: rtl; }
.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti i { position: absolute; width: 7px; height: 11px; border-radius: 2px; transform: rotate(25deg); opacity: .9; }
.confetti i:nth-child(odd) { transform: rotate(-35deg); width: 6px; height: 6px; border-radius: 50%; }
.confetti .c0 { background: #f2c14e; } .confetti .c1 { background: #3fa877; } .confetti .c2 { background: #e5534b; }
.confetti .c3 { background: #4c8df6; } .confetti .c4 { background: #b36ae2; } .confetti .c5 { background: #ff9f43; }
