/* Min90 Admin. No external fonts or scripts: the CSP allows only this origin. */
:root {
  --bg: #f5f7f5;
  --surface: #ffffff;
  --surface-2: #f0f3f0;
  --text: #0f1a12;
  --muted: #5b6b60;
  --border: #dde4de;
  --brand: #166534;
  --brand-ink: #ffffff;
  --accent: #65a30d;
  --side: #0c2416;
  --side-text: #d7e7dc;
  --side-muted: #7f9a88;
  --side-active: #1b3d27;
  --ok-bg: #e8f5ec;
  --ok-text: #14532d;
  --err-bg: #fdecec;
  --err-text: #9b1c1c;
  --warn: #b45309;
  --bar-a: #65a30d;
  --bar-b: #0f766e;
  --bar-c: #1d4ed8;
  --radius: 12px;
  --shadow: 0 1px 2px rgb(16 24 18 / 6%), 0 1px 1px rgb(16 24 18 / 4%);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b110d;
    --surface: #121a15;
    --surface-2: #18221b;
    --text: #e6efe8;
    --muted: #93a598;
    --border: #243128;
    --brand: #22c55e;
    --brand-ink: #062411;
    --side: #070c09;
    --side-active: #15241a;
    --ok-bg: #0f2a19;
    --ok-text: #86efac;
    --err-bg: #2c1212;
    --err-text: #fca5a5;
    --warn: #fbbf24;
    --bar-a: #a3e635;
    --bar-b: #2dd4bf;
    --bar-c: #60a5fa;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Arabic", sans-serif;
}
a { color: var(--brand); }
h1, h2 { margin: 0; line-height: 1.25; }
h1 { font-size: 1.5rem; font-weight: 700; }
h2 { font-size: .95rem; font-weight: 600; }
.muted { color: var(--muted); }
.lead { margin: 0 0 20px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em; }
.small { font-size: .8rem; }
.nowrap { white-space: nowrap; }

/* shell */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--side);
  color: var(--side-text);
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 700; font-size: 1.05rem; padding: 0 8px 18px; }
.brand small { font-weight: 500; color: var(--side-muted); }
.logo {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: 9px;
  background: #14532d; color: #bef264; font-weight: 800; font-size: .95rem; letter-spacing: -.02em;
}
nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { margin: 16px 8px 4px; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--side-muted); }
nav a, .nav-soon { padding: 8px 10px; border-radius: 8px; color: var(--side-text); text-decoration: none; }
nav a:hover { background: var(--side-active); }
nav a.active { background: var(--side-active); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 #a3e635; }
.nav-soon { color: var(--side-muted); display: flex; justify-content: space-between; }
.nav-soon em { font-style: normal; font-size: .7rem; border: 1px solid #2c4434; border-radius: 99px; padding: 0 7px; }
.me { margin-top: auto; padding: 14px 8px 0; border-top: 1px solid #1d3325; display: flex; flex-direction: column; gap: 2px; font-size: .9rem; }
.me .muted { color: var(--side-muted); font-size: .8rem; }
.me form { margin-top: 8px; }
.me .btn-quiet { color: var(--side-text); border-color: #2c4434; width: 100%; }

.content { padding: 28px 32px 48px; max-width: 1200px; width: 100%; }
.page-head { margin-bottom: 6px; }

/* cards and grids */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 16px; }
.grid { display: grid; gap: 16px; margin-bottom: 16px; }
.grid .card { margin-bottom: 0; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.kpi h2 { color: var(--muted); font-weight: 500; }
.kpi .big { font-size: 2rem; font-weight: 700; margin: 6px 0 4px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi p { margin: 0; font-size: .85rem; }
.checklist { list-style: none; margin: 10px 0 0; padding: 0; }
.checklist li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--border); }
.checklist li:first-child { border-top: 0; }
.checklist strong { font-variant-numeric: tabular-nums; }
.warn { color: var(--warn); }

/* tables */
.table-wrap { overflow-x: auto; margin-top: 10px; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: start; font-weight: 600; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px; border-bottom: 1px solid var(--border); }
td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--surface-2); }
.ua { max-width: 360px; overflow-wrap: anywhere; }
.bar-cell { display: inline-flex; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; }
.bar-cell svg { background: var(--surface-2); border-radius: 2px; }
.bar-a { fill: var(--bar-a); }
.bar-b { fill: var(--bar-b); }
.bar-c { fill: var(--bar-c); }
.pill { display: inline-block; padding: 1px 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); font-size: .75rem; white-space: nowrap; }
.pill-warn { color: var(--warn); }
.pager { display: flex; justify-content: space-between; margin-top: 12px; }

/* forms and buttons */
label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: 14px; }
input {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px;
  font: inherit; font-weight: 400; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
}
input:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: transparent; }
.btn { display: inline-block; font: inherit; font-weight: 600; font-size: .9rem; padding: 9px 16px; border-radius: 8px; border: 1px solid transparent; cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-quiet { background: transparent; color: var(--text); border-color: var(--border); }
.btn-quiet:hover { background: var(--surface-2); }
.btn-danger { background: transparent; color: var(--err-text); border-color: currentColor; }
.btn-danger:hover { background: var(--err-bg); }
.btn-block { width: 100%; padding: 11px; margin-top: 4px; }
.actions { margin-top: 16px; }
.alert { padding: 10px 14px; border-radius: 8px; margin: 0 0 16px; font-size: .9rem; }
.alert-ok { background: var(--ok-bg); color: var(--ok-text); }
.alert-error { background: var(--err-bg); color: var(--err-text); }

/* lists and filters */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin: 4px 0 16px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filters input, .filters select { width: auto; margin: 0; }
.filters input[type=search] { min-width: 240px; }
.toolbar-actions { display: flex; gap: 8px; }
select {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px; padding: 9px 10px; margin-top: 6px; width: 100%;
}
textarea {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px; resize: vertical;
  font: inherit; font-weight: 400; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px;
}
textarea:focus, select:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: transparent; }
.qtext { max-width: 460px; }
.qtext a, .qlink { color: var(--text); text-decoration: none; }
.qtext a:hover, .qlink:hover { color: var(--brand); text-decoration: underline; }
.status-published { color: var(--ok-text); background: var(--ok-bg); border-color: transparent; }
.status-suspended { color: var(--err-text); background: var(--err-bg); border-color: transparent; }
.status-reviewed { color: var(--bar-c); }
.diff-legendary { color: var(--warn); }
.details div + div { margin-top: 2px; }
.details .was { text-decoration: line-through; color: var(--muted); }

/* forms */
.form-layout { grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); align-items: start; }
.form { margin-bottom: 0; }
.row2, .row3 { display: grid; gap: 12px; }
.row2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.row3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hint { display: block; color: var(--muted); font-size: .78rem; font-weight: 400; margin-top: 6px; }
fieldset { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px 4px; margin: 0 0 14px; }
legend { font-weight: 600; font-size: .85rem; padding: 0 6px; }
.clubs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.club-step { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.club-step input { margin-top: 0; }
.step { flex: none; width: 24px; height: 24px; border-radius: 99px; display: grid; place-items: center; background: var(--surface-2); font-size: .75rem; }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
form.inline { display: inline; margin: 0; }
.reports { list-style: none; padding: 0; margin: 10px 0 0; }
.reports li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--border); }
.reports li:first-child { border-top: 0; }
.reports li.resolved { opacity: .55; }
.report-head { display: flex; justify-content: space-between; gap: 16px; }
.report-head p { margin: 6px 0 0; }
.report-head .count { font-size: 1.6rem; }
.qlink { font-weight: 600; font-size: 1.02rem; }
details summary { cursor: pointer; font-weight: 600; }
pre.code { background: var(--surface-2); border-radius: 8px; padding: 12px; overflow-x: auto; font-size: .8rem; white-space: pre; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em; }
@media (max-width: 860px) {
  .form-layout, .row2, .row3, .clubs { grid-template-columns: 1fr; }
}

/* sign-in */
.center { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login { width: 100%; max-width: 380px; padding: 28px; }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.login-brand .logo { width: 44px; height: 44px; font-size: 1.15rem; border-radius: 11px; }
.login-brand h1 { font-size: 1.2rem; }
.login-brand p { margin: 0; font-size: .85rem; }
.fineprint { color: var(--muted); font-size: .78rem; margin: 16px 0 0; }
.narrow { max-width: 480px; }

/* small screens */
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; padding: 14px 16px; }
  nav { flex-direction: row; flex-wrap: wrap; }
  .nav-label, .nav-soon { display: none; }
  .me { flex-direction: row; align-items: center; gap: 8px; border-top: 0; padding: 10px 0 0; }
  .me form { margin: 0 0 0 auto; }
  .me .btn-quiet { width: auto; }
  .content { padding: 20px 16px 40px; }
}
