/* Suniylash Business — portal. The same brand as the shop dashboard: red
   light out of near-black, one spacing scale, nothing that is not a fact. */

:root {
  color-scheme: dark;
  --brand: #890103;
  --brand-lit: #c11226;
  --brand-text: #ff6b76;
  --bg: #07080c;
  --grid: rgb(255 255 255 / 2.6%);
  --surface: rgb(20 14 18 / 72%);
  --surface-2: rgb(38 24 29 / 60%);
  --text: #f4eef0;
  --muted: #a1919a;
  --line: rgb(255 255 255 / 16%);
  --line-soft: rgb(255 255 255 / 8%);
  --ok: #3ddc9a;
  --ok-bg: rgb(61 220 154 / 10%);
  --warn: #ffb44d;
  --warn-bg: rgb(255 180 77 / 10%);
  --bad: #ff5f6d;
  --bad-bg: rgb(255 95 109 / 12%);
  --attention: rgb(137 1 3 / 14%);
  --radius: 4px;
  --s1: 6px; --s2: 10px; --s3: 14px; --s4: 20px; --s5: 28px; --s6: 40px;
  --font-mono: "Cascadia Mono", Consolas, ui-monospace, monospace;
  --font-body: "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Bahnschrift", "DIN Alternate", "Arial Narrow", sans-serif;
  font-family: var(--font-body);
}

* { box-sizing: border-box; }

body {
  margin: 0; min-height: 100vh; color: var(--text); background-color: var(--bg);
  font-size: 14px; line-height: 1.5;
  background-image:
    radial-gradient(58vw 46vh at 82% -8%, rgb(193 18 38 / 30%), transparent 60%),
    radial-gradient(44vw 52vh at 4% 12%, rgb(137 1 3 / 26%), transparent 62%),
    radial-gradient(64vw 44vh at 50% 112%, rgb(137 1 3 / 22%), transparent 58%),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: auto, auto, auto, 32px 32px, 32px 32px;
  background-attachment: fixed;
}

h1, h2, h3 { margin: 0; line-height: 1.15; }
h1 {
  font-family: var(--font-display); font-weight: 600; text-transform: uppercase;
  font-size: clamp(24px, 2.6vw, 32px);
}
h2 {
  display: flex; align-items: center; gap: 8px; font-family: var(--font-mono);
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
}
h2::before { content: ""; width: 3px; height: 13px; border-radius: 2px; background: var(--brand); }

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: var(--font-mono); }

.topbar {
  display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap;
  padding: var(--s2) var(--s4); border-bottom: 1px solid var(--line-soft);
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px);
  position: sticky; top: 0; z-index: 5;
}
.brand {
  font-family: var(--font-mono); font-weight: 700; font-size: 13px;
  letter-spacing: 0.12em; text-transform: uppercase;
}
.brand span { color: var(--muted); padding-left: var(--s2); margin-left: var(--s2);
  border-left: 1px solid var(--line-soft); font-weight: 500; }
.account { margin-left: auto; display: flex; align-items: center; gap: var(--s2); }

.view { max-width: 1180px; margin: 0 auto; padding: var(--s5) var(--s4) var(--s6); }
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s3);
  flex-wrap: wrap; margin-bottom: var(--s4); padding-bottom: var(--s3);
  border-bottom: 1px solid var(--line-soft); position: relative;
}
.page-head::after {
  content: ""; position: absolute; left: 0; bottom: -1px; width: 72px; height: 2px;
  background: linear-gradient(90deg, var(--brand), transparent);
}
.page-head p { margin: var(--s1) 0 0; color: var(--muted); font-size: 13px; }

.panel {
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius);
  margin-bottom: var(--s4); backdrop-filter: blur(14px);
}
.panel-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s3);
  flex-wrap: wrap; padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line-soft);
}
.panel-head p { margin: var(--s1) 0 0; }
.panel > p { margin: var(--s3) 0 0; padding: 0 var(--s4) var(--s4); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: var(--s3); margin-bottom: var(--s4); }
.stat { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: var(--s3) var(--s3) var(--s4); backdrop-filter: blur(14px); }
.stat-value { font-family: var(--font-display); font-size: 32px; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--muted); font-family: var(--font-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.07em; margin-top: var(--s1); }

table { width: 100%; border-collapse: collapse; }
.table-wrap { overflow-x: auto; }
th, td { padding: var(--s2) var(--s3); text-align: left; }
th:first-child, td:first-child { padding-left: var(--s4); }
th:last-child, td:last-child { padding-right: var(--s4); }
th {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted); white-space: nowrap;
  background: var(--surface-2); border-bottom: 1px solid var(--line-soft);
}
td { border-bottom: 1px solid var(--line-soft); }
tbody tr:last-child td { border-bottom: none; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover td { background: var(--attention); }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }

.badge {
  display: inline-block; padding: 2px 7px; border-radius: var(--radius);
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap;
  color: var(--muted); border: 1px solid var(--line-soft);
}
.badge.ok { color: var(--ok); border-color: currentColor; background: var(--ok-bg); }
.badge.warn { color: var(--warn); border-color: currentColor; background: var(--warn-bg); }
.badge.bad { color: var(--bad); border-color: currentColor; background: var(--bad-bg); }

.btn {
  font-family: var(--font-mono); font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; border-radius: var(--radius); padding: 8px 14px; line-height: 1.2;
  border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer;
}
.btn:hover { border-color: var(--brand); color: var(--brand-text); background: var(--attention); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff3f4; }
.btn.primary:hover { background: var(--brand-lit); border-color: var(--brand-lit); color: #fff3f4; }
.btn.small { padding: 5px 9px; font-size: 11px; }
.btn.ghost { border-color: transparent; color: var(--muted); }

input {
  font: inherit; color: var(--text); background: var(--surface-2); width: 100%;
  border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 9px 11px;
}
input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--attention); }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: var(--s3); }
.field span {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em;
}

.sign-in { max-width: 380px; margin: 12vh auto; padding: var(--s5) var(--s4); }
.error { color: var(--bad); font-size: 13px; margin: 0 0 var(--s2); }

/* A day's bar, drawn from the numbers themselves — no chart library. */
/* One day is a bar, not a wall: the columns stop growing at 48px so a shop
   with a single day reported does not get a block across the whole panel. */
.bars { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(18px, 48px);
  justify-content: start; gap: 4px; align-items: end;
  padding: var(--s3) var(--s4) var(--s2); height: 150px; }
.bar { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; gap: 4px; }
.bar i { display: block; background: var(--brand); border-radius: 2px 2px 0 0; min-height: 2px; }
.bar b { font-family: var(--font-mono); font-size: 9px; font-weight: 400; color: var(--muted);
  text-align: center; writing-mode: vertical-rl; justify-self: center; }
.legend { display: flex; gap: var(--s3); padding: 0 var(--s4) var(--s3);
  font-family: var(--font-mono); font-size: 10.5px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.06em; }

.empty { border: 1px dashed var(--line-soft); border-radius: var(--radius);
  padding: var(--s6) var(--s4); text-align: center; color: var(--muted); }

@media (max-width: 760px) {
  .view { padding: var(--s4) var(--s3) var(--s5); }
  .topbar { gap: var(--s2); padding: var(--s2) var(--s3); }
}
