:root { --gold: #8A6212; --gold-text: #7A5510; --green: #6FA82A; --green-text: #2F5210; --green-bg: #E4F2CF; --ink: #1A1A1A; --muted: #4A463F; --line: #E2DDD3; --border: #CFC8BA; --bg: #F5F3EF; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: Inter, system-ui, sans-serif; font-size: 15px; line-height: 1.5; }
h1, h2 { font-family: Marcellus, serif; font-weight: 400; margin: 0; line-height: 1.15; }
h1 { font-size: 26px; } h2 { font-size: 22px; }
a { color: var(--gold-text); }
.phone { max-width: 480px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
.screen { flex: 1; padding: 24px 20px 16px; display: flex; flex-direction: column; gap: 14px; }
.wide { max-width: 1100px; margin: 0 auto; padding: 24px 20px 60px; display: flex; flex-direction: column; gap: 20px; }
.logo { display: flex; align-items: baseline; gap: 6px; }
.logo b { font-family: Cinzel, serif; font-size: 24px; color: var(--gold); letter-spacing: 1px; }
.logo span { font-weight: 600; font-size: 20px; color: #4E7F17; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.dark { background: var(--ink); color: var(--bg); border: 0; }
.dark .muted { color: #D5D0C6; }
.label { font-size: 12px; font-weight: 600; letter-spacing: 1.2px; color: var(--muted); text-transform: uppercase; }
.muted { color: var(--muted); font-size: 13px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.wrap { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.big { font-size: 34px; font-weight: 700; }
.btn { display: block; width: 100%; min-height: 50px; border: 0; border-radius: 10px; background: var(--gold); color: #fff; font: inherit; font-weight: 600; font-size: 16px; cursor: pointer; text-align: center; padding: 12px 16px; }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--border); }
.btn.small { width: auto; min-height: 44px; font-size: 14px; padding: 8px 16px; }
.btn.link { background: none; color: var(--gold-text); min-height: 44px; font-size: 14px; white-space: nowrap; flex: none; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs button { flex: 1; min-height: 44px; border-radius: 8px; border: 1px solid var(--border); background: #fff; color: var(--ink); font: inherit; font-weight: 600; font-size: 13px; cursor: pointer; padding: 0 6px; white-space: nowrap; }
.tabs button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.tabs button.join { border-style: dashed; color: #5C574E; }
.pill { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 20px; background: #ECE8DF; color: var(--muted); white-space: nowrap; }
.pill.ok { background: var(--green-bg); color: var(--green-text); }
.bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.bar div { height: 8px; background: var(--green); }
.counts { display: flex; gap: 8px; text-align: center; }
.counts div { flex: 1; background: var(--bg); border-radius: 8px; padding: 10px 4px; }
.counts b { display: block; font-size: 22px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #A8A297; margin-right: 6px; }
.dot.ok { background: var(--green); }
.line { border-top: 1px solid var(--line); padding-top: 9px; }
label { font-size: 13px; font-weight: 600; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
input, select { height: 48px; border-radius: 8px; border: 1px solid var(--border); background: #fff; padding: 0 12px; font: inherit; font-size: 16px; color: var(--ink); width: 100%; }
.choice { display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: left; width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 13px 14px; font: inherit; color: var(--ink); cursor: pointer; }
.choice.on { border: 2px solid var(--gold); }
.price { font-weight: 700; color: var(--gold-text); white-space: nowrap; }
.code { font-family: ui-monospace, monospace; font-size: 20px; font-weight: 700; letter-spacing: 2px; }
nav.bottom { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--line); display: flex; }
nav.bottom button { flex: 1; min-height: 56px; background: none; border: 0; border-top: 3px solid #fff; font: inherit; font-size: 14px; font-weight: 500; color: var(--muted); cursor: pointer; }
nav.bottom button.on { color: var(--gold-text); font-weight: 700; border-top-color: var(--gold); }
.error { background: #FBE9E7; color: #8C1D18; border-radius: 8px; padding: 10px 12px; font-size: 14px; }
.notice { background: var(--green-bg); color: var(--green-text); border-radius: 8px; padding: 10px 12px; font-size: 14px; }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 13px; color: var(--muted); padding: 8px 8px 8px 0; }
td { border-top: 1px solid var(--line); padding: 8px 8px 8px 0; }
td input { width: 100px; height: 40px; font-size: 15px; }
.grid { display: flex; flex-wrap: wrap; gap: 12px; }
.grid > * { flex: 1 1 200px; }
.overlay { position: fixed; inset: 0; background: rgba(26, 26, 26, .55); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 10; }
.overlay .card { max-width: 420px; width: 100%; gap: 14px; padding: 22px; }
.wide .tabs button { white-space: normal; padding: 6px 10px; }

/* ---------- Admin: sidebar layout and dashboard ---------- */
.admin { display: flex; min-height: 100vh; }
.side { width: 248px; flex: none; background: #fff; border-right: 1px solid var(--line); color: var(--ink); display: flex; flex-direction: column; gap: 22px; padding: 24px 14px 18px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side-top { display: flex; flex-direction: column; gap: 8px; padding: 0 10px; }
.side .logo b { font-size: 21px; } .side .logo span { font-size: 17px; }
.side-tag { align-self: flex-start; font-size: 11px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); border: 1px solid var(--border); border-radius: 20px; padding: 2px 10px; }
.side nav { display: flex; flex-direction: column; gap: 18px; flex: 1; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: 11px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); padding: 0 10px 6px; }
.side nav button, .side-foot button { text-align: left; background: none; border: 0; border-left: 3px solid transparent; border-radius: 0 8px 8px 0; color: var(--ink); font: inherit; font-size: 14px; font-weight: 500; padding: 9px 10px; min-height: 40px; cursor: pointer; }
.side nav button:hover, .side-foot button:hover { background: var(--bg); }
.side nav button.on { background: var(--bg); border-left-color: var(--gold); color: var(--gold-text); font-weight: 700; }
.side-foot { display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--line); padding-top: 12px; }
.side-foot .who { font-size: 13px; color: var(--muted); padding: 0 10px 6px; }
.main { flex: 1; min-width: 0; padding: 30px 36px 70px; display: flex; flex-direction: column; gap: 20px; max-width: 1280px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: 34px; margin-top: 4px; }
.main .card { border-radius: 14px; padding: 20px 22px; gap: 12px; box-shadow: 0 1px 2px rgba(26, 26, 26, .04), 0 8px 24px -18px rgba(26, 26, 26, .25); }
.main .card h2 { font-size: 21px; }
.main th { font-size: 11px; font-weight: 700; letter-spacing: 1.1px; text-transform: uppercase; padding: 10px 12px 10px 0; }
.main td { padding: 11px 12px 11px 0; }
.main tr:hover td { background: var(--bg); }
.main input:focus, .main select:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold); }
.main .btn.small { border-radius: 8px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 1px 2px rgba(26, 26, 26, .04), 0 8px 24px -18px rgba(26, 26, 26, .25); }
.kpi b { font-size: 28px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi.gold { background: var(--ink); border-color: var(--ink); color: #fff; }
.kpi.gold .label { color: #D5D0C6; } .kpi.gold .delta { color: #D5D0C6; }
.delta { font-size: 13px; color: var(--muted); }
.delta.up { color: var(--green-text); font-weight: 600; } .delta.down { color: #8C1D18; font-weight: 600; }
.split { display: flex; gap: 16px; flex-wrap: wrap; align-items: stretch; }
.split > .card { flex: 1 1 320px; } .split > .card.grow2 { flex: 2 1 480px; }
.chart { display: flex; align-items: flex-end; gap: 10px; height: 220px; padding-top: 22px; border-bottom: 1px solid var(--line); }
.chart .col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; min-width: 0; }
.chart .stick { width: 100%; max-width: 46px; background: var(--green); border-radius: 6px 6px 0 0; }
.chart .col.now .stick { background: var(--gold); }
.chart .val { font-size: 11px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.chart .when { font-size: 11px; color: var(--muted); white-space: nowrap; padding-bottom: 6px; }
.meter { display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .admin { flex-direction: column; }
  .side { width: auto; height: auto; position: static; padding: 14px 12px 10px; gap: 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .side-top { flex-direction: row; align-items: center; justify-content: space-between; }
  .side nav { flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 4px; }
  .nav-group { flex-direction: row; gap: 4px; } .nav-label { display: none; }
  .side nav button { white-space: nowrap; border-left: 0; border-bottom: 3px solid transparent; border-radius: 8px 8px 0 0; }
  .side nav button.on { border-bottom-color: var(--gold); }
  .side-foot { flex-direction: row; border-top: 0; padding-top: 0; } .side-foot .who { display: none; }
  .main { padding: 20px 16px 60px; } .page-head h1 { font-size: 28px; }
  .kpis { grid-template-columns: 1fr; } .chart { gap: 5px; } .chart .val { display: none; }
}
.main td .btn.small { min-height: 36px; padding: 6px 12px; font-size: 13px; }
