/* Admin dashboard. Colours and shapes follow the approved mockups. */
:root {
  --bg: #F5F4F8; --ink: #1B1722; --muted: #5F5869; --line: #E3E0EA; --line2: #EFEDF3;
  --brand: #5B2E8C; --brand-d: #3F1D66; --side: #1B1424; --side-ink: #E9E3F0; --side-mute: #9A90A8;
  --side-hover: #2A1F36; --side-on: #3A2950; --pink: #F0A8C8;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink);
  font-family: Manrope, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 15px; }
a { color: var(--brand); } a:hover { color: var(--brand-d); }
.boot { padding: 40px; color: var(--muted); }

.shell { min-height: 100vh; display: flex; flex-wrap: wrap; }
.side { flex: 1 1 250px; max-width: 100%; background: var(--side); color: var(--side-ink); padding: 18px 14px;
  display: flex; flex-direction: column; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.logo { width: 36px; height: 36px; border-radius: 10px; background: var(--brand); color: #fff; display: flex;
  align-items: center; justify-content: center; font-weight: 800; font-size: 14px; flex: none; }
.brand b { font-size: 15px; display: block; } .brand small { font-size: 12px; color: #B3A9C0; }
.switch { display: flex; flex-wrap: wrap; gap: 4px; background: #241A30; border-radius: 10px; padding: 4px; }
.switch button { flex: 1 1 auto; font: inherit; font-size: 13px; font-weight: 700; border: 0; border-radius: 8px;
  padding: 8px 10px; background: transparent; color: var(--side-ink); cursor: pointer; }
.switch button.on { background: var(--brand); color: #fff; }
.switch button:disabled { color: var(--side-mute); cursor: default; }
.switch button small { display: block; font-size: 10px; font-weight: 700; letter-spacing: .4px; }
.navh { font-size: 11px; font-weight: 800; letter-spacing: 1px; color: var(--side-mute); padding: 0 10px; margin-top: 4px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; justify-content: space-between; min-height: 42px; padding: 0 10px;
  border-radius: 8px; color: #D9D1E3; text-decoration: none; font-size: 14px; font-weight: 600; }
.nav a:hover { background: var(--side-hover); color: #fff; } .nav a.on { background: var(--side-on); color: #fff; }
.badge { font-size: 11px; font-weight: 800; background: var(--pink); color: #2A1020; border-radius: 999px; padding: 1px 7px; }
.badge.warn { background: #F2C46B; color: #2E1D00; }
.who { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px;
  border-top: 1px solid #2E2439; }
.who b { font-size: 14px; display: block; } .who small { font-size: 12px; color: #B3A9C0; }
.linkbtn { background: none; border: 0; color: var(--pink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }

.main { flex: 999 1 560px; min-width: 0; padding: 24px 28px 48px; display: flex; flex-direction: column; gap: 18px; }
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px; }
.head h1 { margin: 0; font-size: 26px; font-weight: 800; } .head p { margin: 4px 0 0; }
.muted { color: var(--muted); }
.full { flex-basis: 100%; } .mt { margin-top: 12px; } .card.hl { border-color: #CDB4EA; } .small { font-size: 13px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.card h2 { margin: 0 0 10px; font-size: 16px; font-weight: 800; }
.card.flush { padding: 0; } .card.flush h2 { padding: 14px 18px 4px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
.col { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.tiles { display: flex; flex-wrap: wrap; gap: 12px; }
.tile { flex: 1 1 190px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--ink); }
.tile .k { font-size: 13px; font-weight: 700; color: var(--muted); } .tile .v { font-size: 22px; font-weight: 800; }
.tile .s { font-size: 13px; color: var(--muted); }
.alert { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: #FFF1D6; border: 1px solid #F0D49A;
  border-radius: 12px; padding: 12px 14px; color: #5C3900; font-size: 14px; }
.alert.bad { background: #FBE5E5; border-color: #F0B8B8; color: #7A1616; }
.alert a { margin-left: auto; font-weight: 800; color: inherit; }

.btn { font: inherit; font-size: 14px; font-weight: 700; border-radius: 10px; min-height: 40px; padding: 0 14px; cursor: pointer;
  border: 1px solid #D6D1DF; background: #fff; color: var(--ink); display: inline-flex; align-items: center;
  justify-content: center; gap: 6px; text-decoration: none; }
.btn.p { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.danger { border-color: #E3A3A3; color: #9B2222; } .btn.danger.p { background: #B42828; border-color: #B42828; color: #fff; }
.btn.sm { min-height: 32px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: .55; cursor: default; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.chip { font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 999px; white-space: nowrap; display: inline-block; }
.c-g { background: #E2F3E8; color: #1F6B40; } .c-a { background: #FFF1D6; color: #7A4B00; }
.c-r { background: #FBE5E5; color: #9B2222; } .c-n { background: #EEECF2; color: #4E4858; } .c-p { background: #EFE7F8; color: var(--brand); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { font: inherit; font-size: 13px; font-weight: 700; border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 6px 12px; cursor: pointer; color: var(--ink); }
.chips button.on { background: var(--brand); border-color: var(--brand); color: #fff; }

.tbox { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th { text-align: left; font-size: 12px; font-weight: 800; letter-spacing: .5px; color: var(--muted); padding: 10px 12px;
  border-bottom: 1px solid var(--line); white-space: nowrap; text-transform: uppercase; }
td { padding: 11px 12px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
tr.click { cursor: pointer; } tr.click:hover td { background: #FAF9FC; }
td small, .sub { display: block; font-size: 12px; color: var(--muted); }
.empty { padding: 18px; color: var(--muted); text-align: center; }

form.grid, .grid { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
label.f { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 700; color: var(--muted); flex: 1 1 180px; min-width: 0; }
input, select, textarea { font: inherit; font-size: 15px; color: var(--ink); border: 1px solid #D6D1DF; border-radius: 10px;
  padding: 9px 11px; background: #fff; min-height: 40px; width: 100%; }
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid #CDB4EA; border-color: var(--brand); }
label.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; font-weight: 600; color: var(--ink); }
label.check input { width: 18px; min-height: 18px; margin-top: 2px; flex: none; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.checks label.check { flex: 1 1 200px; }
.prices input { max-width: 120px; }
.msg { font-size: 14px; font-weight: 700; } .msg.err { color: #9B2222; } .msg.ok { color: #1F6B40; }
.secret { font-family: ui-monospace, Menlo, monospace; font-size: 18px; font-weight: 700; background: #F4EFFA;
  border: 1px dashed #CDB4EA; border-radius: 10px; padding: 10px 14px; display: inline-block; user-select: all; }
.list { display: flex; flex-direction: column; } .list > div { padding: 10px 0; border-bottom: 1px solid var(--line2); }
.list > div:last-child { border-bottom: 0; }
pre.json { white-space: pre-wrap; word-break: break-word; font-size: 12px; margin: 4px 0 0; color: var(--muted); }

tr.on td { background: #F4EFFA; }
.gcphoto { max-width: 100%; border-radius: 10px; border: 1px solid var(--line); }
input.tgid { max-width: 150px; }
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login .card { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 14px; padding: 24px; }
.login h1 { margin: 0; font-size: 22px; }
.login label.f { flex: none; }   /* flex-basis would become height in a column */
.sub + .sub { margin-top: 3px; } .list .sub { line-height: 1.45; }
a.rowlink { display: block; color: inherit; text-decoration: none; border-radius: 8px; }
a.rowlink:hover { background: #FAF9FC; }
.self-start { align-self: flex-start; }

@media (max-width: 820px) {
  .side { flex-basis: 100%; padding: 12px; gap: 10px; }
  .nav { flex-direction: row; flex-wrap: wrap; } .nav a { flex: 1 1 140px; min-height: 38px; background: #241A30; }
  .navh { display: none; } .who { margin-top: 0; padding: 8px 4px 0; }
  .main { padding: 16px 16px 40px; } .head h1 { font-size: 22px; }
}
