/* ============================================================
   Myaronium POS cloud panel — one stylesheet, no framework.
   Same visual language as the desktop till so the shopkeeper
   recognises it: dark surfaces, orange accent, tabular numbers.
   ============================================================ */
:root {
  --bg:#0A0A0C; --surface:#101015; --surface-2:#16161C; --surface-3:#1D1D24; --hover:#23232B;
  --border:rgba(255,255,255,.08); --border-strong:rgba(255,255,255,.14);
  --text:#F4F4F6; --muted:#8B8B95; --muted-2:#5E5E68;
  --accent:#FF7A18; --accent-press:#E96A0C; --accent-soft:rgba(255,122,24,.14); --accent-line:rgba(255,122,24,.35);
  --green:#28C57E; --green-soft:rgba(40,197,126,.14);
  --red:#FF5A5A; --red-soft:rgba(255,90,90,.14);
  --amber:#F2B23E; --amber-soft:rgba(242,178,62,.14);
  --blue:#4D8DFF; --blue-soft:rgba(77,141,255,.14);
  --r:10px; --r-md:12px; --r-lg:16px;
  --shadow:0 10px 34px rgba(0,0,0,.45);
  --ui:'Segoe UI',system-ui,-apple-system,Roboto,Helvetica,Arial,sans-serif;
  --mono:ui-monospace,'SF Mono',Menlo,Consolas,monospace;
}
* { box-sizing:border-box; margin:0; padding:0; }
[hidden] { display:none !important; }
body { font-family:var(--ui); background:var(--bg); color:var(--text); font-size:14px; line-height:1.5; -webkit-font-smoothing:antialiased; }
a { color:var(--accent); text-decoration:none; }
a:hover { text-decoration:underline; }
code { font-family:var(--mono); font-size:12.5px; background:var(--surface-2); padding:2px 6px; border-radius:5px; }
.mono, td.num, th.num { font-family:var(--mono); font-variant-numeric:tabular-nums; }

/* ---------- auth / installer ---------- */
.auth-page { display:flex; align-items:center; justify-content:center; min-height:100vh; padding:24px; }
.auth-card { width:100%; max-width:420px; background:var(--surface); border:1px solid var(--border); border-radius:var(--r-lg); padding:28px; box-shadow:var(--shadow); }
.auth-card.wide { max-width:640px; }
.auth-brand { display:flex; align-items:center; gap:12px; margin-bottom:22px; }
.auth-brand .mark { width:38px; height:38px; border-radius:11px; background:linear-gradient(135deg,var(--accent),#FFB05A); flex:0 0 auto; }
.auth-brand b { display:block; font-size:16px; font-weight:800; }
.auth-brand span { font-size:12.5px; color:var(--muted); }

.form h2 { font-size:12px; text-transform:uppercase; letter-spacing:.7px; color:var(--muted-2); margin:18px 0 8px; }
.form h2:first-child { margin-top:0; }
label { display:block; font-size:12px; font-weight:700; color:var(--muted); margin-bottom:12px; }
input, select, textarea { width:100%; height:42px; margin-top:5px; padding:0 12px; border-radius:var(--r); background:var(--surface-2); border:1px solid var(--border); color:var(--text); font-size:14px; font-family:inherit; outline:none; }
textarea { height:auto; padding:10px 12px; resize:vertical; }
input:focus, select:focus, textarea:focus { border-color:var(--accent-line); }
/* No native number spinners — matches the desktop app (see index.html). The
   admin panel is a separate document, so it needs its own copy of the rule. */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance:none; appearance:none; margin:0; }
input[type="number"] { -moz-appearance:textfield; appearance:textfield; }
.row { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
@media (max-width:560px) { .row { grid-template-columns:1fr; } }
.hint { font-size:12.5px; color:var(--muted-2); margin-bottom:10px; }

.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; height:42px; padding:0 18px; border-radius:var(--r); font-size:13.5px; font-weight:700; background:var(--surface-3); color:var(--text); border:1px solid var(--border); cursor:pointer; font-family:inherit; transition:background .15s, transform .1s; }
.btn:hover { background:var(--hover); }
.btn:active { transform:scale(.98); }
.btn.accent { background:var(--accent); color:#150a02; border-color:transparent; }
.btn.accent:hover { background:var(--accent-press); }
.btn.ghost { background:var(--surface-2); }
.btn.danger { background:var(--red-soft); color:var(--red); border-color:transparent; }
.btn.block { width:100%; margin-top:8px; }
.btn.sm { height:34px; padding:0 12px; font-size:12.5px; }

.alert { padding:12px 14px; border-radius:var(--r); font-size:13px; margin-bottom:14px; line-height:1.5; }
.alert.ok { background:var(--green-soft); color:var(--green); }
.alert.bad { background:var(--red-soft); color:var(--red); }
.alert.warn { background:var(--amber-soft); color:var(--amber); }
.alert b { display:block; margin-bottom:2px; }
.alert p { color:inherit; opacity:.9; }
.keys { width:100%; border-collapse:collapse; margin-bottom:16px; }
.keys th { text-align:left; padding:8px 10px 8px 0; font-size:12px; color:var(--muted); white-space:nowrap; vertical-align:top; }
.keys td { padding:8px 0; word-break:break-all; }
.steps { margin:0 0 18px 18px; font-size:13px; color:var(--muted); line-height:1.8; }
.steps b { color:var(--text); }

/* ---------- app shell ---------- */
.shell { display:flex; min-height:100vh; }
.side { flex:0 0 232px; background:var(--surface); border-right:1px solid var(--border); padding:18px 14px; display:flex; flex-direction:column; position:sticky; top:0; height:100vh; }
.side .brand { display:flex; align-items:center; gap:11px; padding:0 8px 18px; }
.side .brand .mark { width:34px; height:34px; border-radius:10px; background:linear-gradient(135deg,var(--accent),#FFB05A); }
.side .brand b { display:block; font-size:14.5px; font-weight:800; }
.side .brand span { font-size:11.5px; color:var(--muted-2); }
.nav { display:flex; flex-direction:column; gap:2px; }
.nav a { display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:var(--r); color:var(--muted); font-size:13.5px; font-weight:600; text-decoration:none; }
.nav a:hover { background:var(--hover); color:var(--text); text-decoration:none; }
.nav a.on { background:var(--accent-soft); color:var(--accent); }
.side .foot { margin-top:auto; padding-top:14px; border-top:1px solid var(--border); font-size:12px; color:var(--muted-2); }
.side .foot b { display:block; color:var(--text); font-size:13px; }

.main { flex:1 1 auto; min-width:0; padding:22px 26px 40px; }
.head { display:flex; align-items:center; gap:16px; flex-wrap:wrap; margin-bottom:20px; }
.head h1 { font-size:21px; font-weight:800; letter-spacing:-.4px; }
.head p { font-size:13px; color:var(--muted); margin-top:2px; }
.head .actions { margin-left:auto; display:flex; gap:9px; align-items:center; flex-wrap:wrap; }
.head .actions select, .head .actions input { height:38px; width:auto; margin-top:0; }

.kpis { display:grid; grid-template-columns:repeat(auto-fit,minmax(168px,1fr)); gap:12px; margin-bottom:20px; }
.kpi { background:var(--surface); border:1px solid var(--border); border-radius:var(--r-md); padding:14px 16px; }
.kpi .l { font-size:10.5px; font-weight:800; text-transform:uppercase; letter-spacing:.5px; color:var(--muted-2); }
.kpi .v { font-size:23px; font-weight:800; font-family:var(--mono); letter-spacing:-.6px; margin-top:5px; }
.kpi .s { font-size:11.5px; color:var(--muted); margin-top:2px; }
.kpi.acc .v { color:var(--accent); } .kpi.good .v { color:var(--green); }
.kpi.warn .v { color:var(--amber); } .kpi.bad .v { color:var(--red); }

.card { background:var(--surface); border:1px solid var(--border); border-radius:var(--r-md); padding:18px; margin-bottom:16px; }
.card h3 { font-size:14.5px; font-weight:800; margin-bottom:3px; }
.card .sub { font-size:12.5px; color:var(--muted-2); margin-bottom:14px; }
.grid2 { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
@media (max-width:980px) { .grid2 { grid-template-columns:1fr; } .shell { flex-direction:column; } .side { position:static; height:auto; flex:0 0 auto; width:100%; } .nav { flex-direction:row; overflow-x:auto; } }

table.data { width:100%; border-collapse:collapse; font-size:13px; }
table.data th { text-align:left; font-size:10.5px; font-weight:800; text-transform:uppercase; letter-spacing:.5px; color:var(--muted-2); padding:9px 10px; border-bottom:1px solid var(--border); }
table.data td { padding:9px 10px; border-bottom:1px solid var(--border); }
table.data tr:last-child td { border-bottom:0; }
table.data tbody tr:hover { background:var(--surface-2); }
table.data td.num, table.data th.num { text-align:right; white-space:nowrap; }
table.data input, table.data select { height:32px; margin-top:0; font-size:13px; }
.empty { text-align:center; color:var(--muted); padding:40px 10px; font-size:13.5px; }

.pill { display:inline-block; font-size:10.5px; font-weight:800; padding:2px 9px; border-radius:99px; text-transform:uppercase; letter-spacing:.4px; }
.pill.ok { background:var(--green-soft); color:var(--green); }
.pill.warn { background:var(--amber-soft); color:var(--amber); }
.pill.bad { background:var(--red-soft); color:var(--red); }
.pill.info { background:var(--blue-soft); color:var(--blue); }

.chart { width:100%; }
.chart svg { display:block; width:100%; height:auto; }
.bar { height:6px; border-radius:99px; background:var(--surface-3); overflow:hidden; min-width:70px; }
.bar i { display:block; height:100%; background:var(--accent); border-radius:99px; }

.pager { display:flex; gap:8px; align-items:center; justify-content:flex-end; margin-top:14px; font-size:12.5px; color:var(--muted); }
.toolbar { display:flex; gap:9px; margin-bottom:14px; flex-wrap:wrap; }
.toolbar input, .toolbar select { height:38px; margin-top:0; width:auto; min-width:180px; }
