/* ZeroPOS Cloud — control-plane design system (ZeroBO visual language, Inter). */
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/assets/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/assets/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --ink: #14171a; --ink-2: #1d2126; --ink-soft: #5b6470; --ink-faint: #9aa3ad;
  --line: #e4e7ea; --input-line: #d7dbe0;
  --accent: #4f46e5; --accent-soft: #eef2ff;
  --green: #16a34a; --red: #dc2626; --amber: #d97706;
  --bg-soft: #f6f7f8; --sidebar: #0f1216; --sidebar-w: 236px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font-sans); background: #fff; color: var(--ink); -webkit-font-smoothing: antialiased; font-size: 14px; }
img { max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; }

/* ── Shell ── */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-w); flex-shrink: 0; background: var(--sidebar); color: #fff; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 20px 14px; font-size: 14px; font-weight: 700; letter-spacing: 0.01em; }
.brand .badge-cloud { font-size: 9px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #a5b4fc; background: rgba(99,102,241,0.18); padding: 2px 6px; border-radius: 5px; }
.sidebar nav { flex: 1; padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.sidebar nav .group { font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.3); padding: 16px 10px 6px; }
.sidebar nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: rgba(255,255,255,0.62); text-decoration: none; font-size: 13px; font-weight: 500; }
.sidebar nav a svg { opacity: 0.8; flex-shrink: 0; }
.sidebar nav a:hover { color: #fff; background: rgba(255,255,255,0.06); }
.sidebar nav a.active { color: #fff; background: rgba(99,102,241,0.22); }
.sidebar .foot { padding: 14px 18px; border-top: 1px solid rgba(255,255,255,0.08); }
.sidebar .foot .user { font-size: 12px; font-weight: 600; }
.sidebar .foot .role { font-size: 11px; color: rgba(255,255,255,0.4); margin-top: 1px; text-transform: capitalize; }
.sidebar .foot button { margin-top: 10px; width: 100%; background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.75); border: none; padding: 8px 0; border-radius: 7px; font-size: 12px; font-weight: 600; cursor: pointer; }
.sidebar .foot button:hover { background: rgba(255,255,255,0.14); color: #fff; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.content { flex: 1; max-width: 1240px; width: 100%; margin: 0 auto; padding: 32px 32px 80px; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head .kicker { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 4px; }
.page-head h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.page-head .desc { font-size: 13px; color: var(--ink-soft); margin-top: 5px; max-width: 640px; }
.page-actions { display: flex; gap: 8px; }

/* ── Metric tiles ── */
.metrics { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-bottom: 22px; }
.tile { border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; background: #fff; }
.tile .label { font-size: 11px; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.07em; display: flex; align-items: center; gap: 7px; }
.tile .value { font-size: 30px; font-weight: 800; margin-top: 8px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.tile .value small { font-size: 15px; font-weight: 600; color: var(--ink-faint); }
.tile .sub { font-size: 12px; color: var(--ink-faint); margin-top: 3px; }
.tile.accent { background: linear-gradient(160deg, #eef2ff, #fff); border-color: #dfe3ff; }
.tile.warn .value { color: var(--amber); }
.tile.good .value { color: var(--green); }
.tile.bad .value { color: var(--red); }

/* ── Panels & tables ── */
.panel { border: 1px solid var(--line); border-radius: 14px; margin-bottom: 20px; overflow: hidden; background: #fff; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--bg-soft); }
.panel-head h3 { font-size: 13px; font-weight: 700; }
.panel-head .hint { font-size: 12px; color: var(--ink-faint); margin-top: 1px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 11px; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.06em; padding: 11px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr.clickable { cursor: pointer; }
.tbl tr.clickable:hover td { background: var(--bg-soft); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-faint); }
.mono { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 12px; }

/* ── Status pills & dots ── */
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; vertical-align: middle; }
.dot.on { background: var(--green); box-shadow: 0 0 0 3px rgba(22,163,74,0.15); }
.dot.off { background: #cbd0d6; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; border: 1px solid var(--line); color: var(--ink-soft); background: var(--bg-soft); white-space: nowrap; }
.pill.green { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }
.pill.grey { background: #f3f4f6; border-color: #e5e7eb; color: #6b7280; }
.pill.blue { background: #eef2ff; border-color: #c7d2fe; color: #4338ca; }
.pill.amber { background: #fffbeb; border-color: #fde68a; color: #b45309; }
.pill.red { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.kind { font-size: 10px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; padding: 2px 7px; border-radius: 5px; background: #eef2ff; color: #4338ca; }
.kind.till { background: #ecfdf5; color: #047857; }
.kind.smp { background: #eff6ff; color: #1d4ed8; }
.kind.bo { background: #fdf4ff; color: #a21caf; }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 16px; border-radius: 9px; font-size: 13px; font-weight: 600; cursor: pointer; border: none; background: var(--accent); color: #fff; text-decoration: none; }
.btn:hover { filter: brightness(1.08); }
.btn:disabled { background: var(--ink-faint); cursor: default; }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--input-line); }
.btn.ghost:hover { border-color: var(--ink-soft); filter: none; }
.btn.sm { height: 31px; padding: 0 11px; font-size: 12px; border-radius: 7px; }

/* ── Version bars ── */
.vbars { display: flex; flex-direction: column; gap: 10px; }
.vbar { display: grid; grid-template-columns: 80px 1fr 44px; align-items: center; gap: 12px; font-size: 12px; }
.vbar .track { height: 10px; border-radius: 6px; background: var(--bg-soft); overflow: hidden; }
.vbar .fill { height: 100%; background: var(--accent); border-radius: 6px; }
.vbar .fill.current { background: var(--green); }
.vbar .v { font-weight: 600; font-variant-numeric: tabular-nums; }
.vbar .c { text-align: right; color: var(--ink-faint); font-variant-numeric: tabular-nums; }

/* ── Login (ZeroBO split-screen layout) ── */
.auth { min-height: 100vh; display: flex; background: #fff; }
.auth-brand { width: 44%; flex-shrink: 0; background: #14171a; color: #fff; padding: 52px 56px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-brand .b-top { display: flex; align-items: center; gap: 11px; font-size: 14px; font-weight: 600; }
.auth-brand .b-top .cloud-tag { font-size: 9px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #a5b4fc; background: rgba(99,102,241,0.18); padding: 2px 6px; border-radius: 5px; }
.auth-brand h1 { font-size: 38px; font-weight: 800; letter-spacing: -0.03em; margin-top: 30px; line-height: 1.05; }
.auth-brand h1 .dim { color: rgba(255,255,255,0.55); }
.auth-brand .tagline { margin-top: 16px; font-size: 13.5px; color: rgba(255,255,255,0.5); max-width: 34ch; line-height: 1.65; }
.auth-brand .chips { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px; }
.auth-brand .chips span { padding: 6px 12px; border-radius: 7px; font-size: 11px; font-weight: 500; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.09); color: rgba(255,255,255,0.6); }
.auth-brand .b-foot { font-size: 11px; color: rgba(255,255,255,0.28); }
.auth-form { flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px; }
.auth-card { width: 100%; max-width: 360px; animation: authfade 0.4s ease; }
@keyframes authfade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.auth-card .mobile-brand { display: none; align-items: center; gap: 10px; margin-bottom: 30px; font-weight: 700; font-size: 16px; }
.auth-card .mobile-brand .z { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 11px; background: #14171a; color: #fff; }
.auth-card h2 { font-size: 21px; font-weight: 800; letter-spacing: -0.02em; }
.auth-card .sub { color: var(--ink-soft); font-size: 13px; margin: 5px 0 26px; }
.pw-wrap { position: relative; }
.pw-wrap button { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--ink-faint); cursor: pointer; display: flex; padding: 2px; }
.pw-wrap button:hover { color: var(--ink-soft); }
.pw-wrap input { padding-right: 42px; }
.auth-card .btn { width: 100%; height: 46px; justify-content: center; font-size: 14px; margin-top: 8px; }
.login-err { color: var(--red); font-size: 13px; min-height: 18px; text-align: center; margin-top: 12px; }
.auth-foot { text-align: center; font-size: 11px; color: var(--ink-faint); margin-top: 34px; }
@media (max-width: 900px) { .auth-brand { display: none; } .auth-card .mobile-brand { display: flex; } }

/* ── Toast ── */
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 60; background: var(--ink); color: #fff; font-size: 13px; padding: 11px 18px; border-radius: 10px; opacity: 0; transition: opacity 0.25s; pointer-events: none; max-width: 88vw; }
.toast.show { opacity: 1; }

/* ── Modal & forms ── */
.modal-back { position: fixed; inset: 0; background: rgba(15,18,22,0.45); z-index: 70; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 460px; max-height: 90vh; overflow-y: auto; box-shadow: 0 24px 60px rgba(0,0,0,0.28); }
.modal-head { padding: 20px 24px 0; }
.modal-head h2 { font-size: 18px; font-weight: 800; }
.modal-head .kicker { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); }
.modal-body { padding: 16px 24px 20px; }
.modal-body .desc { font-size: 13px; color: var(--ink-soft); line-height: 1.55; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 0 24px 22px; }
.mf { margin-bottom: 13px; }
.mf label { display: block; font-size: 11px; font-weight: 600; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.mf input, .mf select, .mf textarea { width: 100%; height: 42px; padding: 0 12px; font-size: 14px; color: var(--ink); border: 1px solid var(--input-line); border-radius: 10px; outline: none; background: #fff; font-family: inherit; }
.mf textarea { height: auto; min-height: 70px; padding: 10px 12px; resize: vertical; }
.mf input:focus, .mf select:focus, .mf textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.keybox { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 15px; font-weight: 600; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.empty { padding: 28px 16px; text-align: center; color: var(--ink-faint); font-size: 13px; }
.coming { border: 1px dashed var(--line); border-radius: 14px; padding: 40px; text-align: center; color: var(--ink-faint); }
.coming h3 { color: var(--ink-soft); font-size: 15px; margin-bottom: 6px; }

@media (max-width: 860px) { .sidebar { display: none; } .content { padding: 20px 16px 60px; } }
