/* Follows ../DESIGN.md (from FuelOne). Plain CSS with the same Tailwind values. */
@font-face { font-family: Geist; src: url(fonts/geist.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url(fonts/geist-mono.woff2) format('woff2'); font-weight: 400 600; font-display: swap; }
:root {
  /* the accent: change it here only */
  --brand-50: #eef2ff; --brand-200: #c7d2fe; --brand-300: #a5b4fc; --brand-500: #6366f1; --brand-600: #4f46e5; --brand-700: #4338ca;
  --s50: #f8fafc; --s100: #f1f5f9; --s200: #e2e8f0; --s300: #cbd5e1; --s400: #94a3b8; --s500: #64748b;
  --s600: #475569; --s700: #334155; --s800: #1e293b; --s900: #0f172a;
  --page: #f6f7f9; --ink: #14181f; --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / .05);
}
* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { margin: 0; background: var(--page); color: var(--ink); font: 14px/1.45 Geist, ui-sans-serif, system-ui, sans-serif; }
.hidden { display: none !important; }
.tnum { font-variant-numeric: tabular-nums; }
.mono { font-family: 'Geist Mono', ui-monospace, monospace; }
.muted, .hint { color: var(--s500); font-size: 12px; }
p { margin: 0 0 12px; }
h1, h2, h3 { margin: 0; }

/* shell */
.shell { display: flex; min-height: 100dvh; }
.sidebar { width: 224px; flex: none; background: var(--s900); border-right: 1px solid var(--s800); color: var(--s300);
  position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; padding: 16px 12px; }
.sidebar .app-name { color: #fff; font-size: 14px; font-weight: 600; padding: 0 12px; }
.sidebar .app-sub { color: var(--s400); font-size: 12px; padding: 0 12px 16px; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.sidebar nav a { border-radius: 6px; padding: 8px 12px; font-size: 14px; font-weight: 500; color: var(--s300); text-decoration: none; }
.sidebar nav a:hover { background: var(--s800); color: #fff; }
.sidebar nav a[aria-current=page] { background: rgb(99 102 241 / .15); color: var(--brand-300); }
.sidebar .foot { font-size: 11px; color: var(--s500); padding: 12px 12px 0; }
.col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { background: #fff; border-bottom: 1px solid var(--s200); padding: 10px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.topbar .name { font-size: 14px; font-weight: 600; }
.topbar .sub { font-size: 12px; color: var(--s500); }
.topbar .right { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--s600); }
main { padding: 24px; width: 100%; max-width: 1280px; margin: 0 auto; }
@media (min-width: 1536px) { main { max-width: 1600px; } }
.page-head { margin-bottom: 20px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.page-head h1 { font-size: 20px; font-weight: 600; color: var(--s900); }
.page-head .sub { margin-top: 2px; font-size: 14px; color: var(--s500); }
.page-head .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
@media (max-width: 767px) {
  .shell { flex-direction: column; }
  .sidebar { width: auto; height: auto; position: static; flex-direction: row; align-items: center; padding: 8px; overflow-x: auto; }
  .sidebar .app-sub, .sidebar .foot { display: none; }
  .sidebar .app-name { white-space: nowrap; }
  .sidebar nav { flex-direction: row; }
  .sidebar nav a { white-space: nowrap; }
  main { padding: 16px; }
}

/* card, stat, grids */
.card { background: #fff; border: 1px solid var(--s200); border-radius: 8px; box-shadow: var(--shadow-xs); }
.card-head { border-bottom: 1px solid var(--s200); padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card-head h2 { font-size: 14px; font-weight: 600; color: var(--s700); }
.card-body { padding: 16px; }
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.stat { padding: 12px 16px; }
.stat .v { font-size: 18px; font-weight: 600; color: var(--s800); margin-top: 2px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat.head .v { font-size: 20px; color: var(--s900); }
.lbl, th, .stat .l { font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .025em; color: var(--s500); }
.cards { display: grid; gap: 20px; margin-top: 20px; }
.cards.c3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
@media (min-width: 1024px) { .cards.split { grid-template-columns: 2fr 1fr; } }
.section-title { font-size: 14px; font-weight: 600; color: var(--s700); margin: 24px 0 10px; }
.section-title:first-child { margin-top: 0; }

/* stations */
.stations { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.station { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.station.over { border-color: #fda4af; }
.station .top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 600; color: var(--s800); }
.timer { font-size: 24px; font-weight: 600; color: var(--s900); font-variant-numeric: tabular-nums; }
.left { font-size: 12px; color: var(--s500); }
.over .left { color: #be123c; font-weight: 500; }
.station .row { margin-top: 4px; }

/* badges: light fill, dark text, inset ring */
.badge { display: inline-flex; align-items: center; gap: 4px; border-radius: 99px; padding: 2px 8px; font-size: 12px; font-weight: 500; white-space: nowrap;
  background: var(--s100); color: var(--s600); box-shadow: inset 0 0 0 1px var(--s200); }
.badge.green { background: #ecfdf5; color: #047857; box-shadow: inset 0 0 0 1px #a7f3d0; }
.badge.amber { background: #fffbeb; color: #b45309; box-shadow: inset 0 0 0 1px #fde68a; }
.badge.red { background: #fff1f2; color: #be123c; box-shadow: inset 0 0 0 1px #fecdd3; }
.badge.blue { background: #f0f9ff; color: #0369a1; box-shadow: inset 0 0 0 1px #bae6fd; }

/* buttons */
button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 6px; padding: 8px 12px; min-height: 36px;
  font: 500 14px/1.2 inherit; font-family: inherit; cursor: pointer; text-decoration: none; white-space: nowrap;
  border: 1px solid var(--s300); background: #fff; color: var(--s700); box-shadow: var(--shadow-xs); }
button:hover, .btn:hover { background: var(--s50); }
button.primary { background: var(--brand-600); border-color: var(--brand-600); color: #fff; padding: 8px 14px; }
button.primary:hover { background: var(--brand-700); }
button.danger { border-color: #fda4af; color: #be123c; }
button.danger:hover { background: #fff1f2; }
button.quiet { border-color: transparent; background: none; box-shadow: none; color: var(--s600); padding: 6px 8px; min-height: 32px; }
button.quiet:hover { background: var(--s100); }
button.quiet.danger { color: #be123c; }
button.sm { min-height: 32px; padding: 5px 10px; font-size: 13px; }
button:disabled { opacity: .5; cursor: default; }
button:focus-visible, .btn:focus-visible, a:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--brand-200); border-color: var(--brand-500); }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions-end { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 16px; }
.seg { display: inline-flex; gap: 4px; border: 1px solid var(--s200); background: #fff; border-radius: 6px; padding: 4px; }
.seg button { border: 0; box-shadow: none; min-height: 30px; padding: 6px 12px; border-radius: 4px; color: var(--s700); }
.seg button[aria-pressed=true] { background: var(--s900); color: #fff; }

/* fields */
.field { display: flex; flex-direction: column; margin-bottom: 14px; }
.field .lbl { margin-bottom: 4px; }
.field .hint { margin-top: 4px; }
.check { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 14px; color: var(--s700); }
.check input { width: 16px; height: 16px; accent-color: var(--brand-600); }
input, select, textarea { width: 100%; border: 1px solid var(--s300); background: #fff; color: var(--ink); border-radius: 6px; padding: 8px 12px;
  font: 14px/1.2 inherit; font-family: inherit; min-height: 36px; box-shadow: var(--shadow-xs); outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--brand-500); box-shadow: 0 0 0 2px var(--brand-200); }
input:disabled, select:disabled { background: var(--s100); color: var(--s500); }
.grid2 { display: grid; gap: 0 16px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.inline-fields { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.inline-fields .field { margin-bottom: 0; }

/* tables */
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; padding: 8px 12px; background: var(--s50); border-bottom: 1px solid var(--s200); white-space: nowrap; }
td { padding: 8px 12px; border-top: 1px solid var(--s100); color: var(--s700); vertical-align: top; }
tbody tr:first-child td { border-top: 0; }
tbody tr:hover { background: var(--s50); }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.off td { color: var(--s400); }
.pager { border-top: 1px solid var(--s200); padding: 8px 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.pager button { min-height: 32px; padding: 4px 10px; font-size: 13px; }
.pager button[aria-current=page] { background: var(--s900); color: #fff; border-color: var(--s900); }
.empty { text-align: center; padding: 56px 16px; }
.empty .what { font-size: 14px; font-weight: 500; color: var(--s700); }
.empty .hint { font-size: 14px; margin-top: 2px; }

/* totals */
.totals > div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-variant-numeric: tabular-nums; }
.totals .grand { font-size: 16px; font-weight: 600; color: var(--s900); border-top: 1px solid var(--s200); margin-top: 6px; padding-top: 8px; }

/* bars (dashboard) */
.bars > div { display: grid; grid-template-columns: 80px 1fr auto; gap: 10px; align-items: center; padding: 6px 0; font-size: 13px; }
.bars .track { height: 8px; background: var(--s100); border-radius: 99px; overflow: hidden; }
.bars .fill { height: 100%; border-radius: 99px; }

/* notes and toast */
.note { border: 1px solid; border-radius: 6px; padding: 8px 12px; font-size: 14px; margin-bottom: 12px; }
.note.warn { border-color: #fde68a; background: #fffbeb; color: #b45309; }
.note.error { border-color: #fecdd3; background: #fff1f2; color: #be123c; }
.note.saved { border-color: #a7f3d0; background: #ecfdf5; color: #047857; }
.note.info { border-color: var(--s200); background: var(--s50); color: var(--s700); }
#banner .note { margin: 12px 24px 0; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 20; max-width: calc(100% - 32px); box-shadow: 0 10px 15px -3px rgb(0 0 0 / .1); }

/* dialog */
dialog { margin: auto; width: min(28rem, calc(100vw - 2rem)); border: 1px solid var(--s200); border-radius: 8px; background: #fff; padding: 0;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1); color: var(--ink); }
dialog.wide { width: min(48rem, calc(100vw - 2rem)); }
dialog::backdrop { background: rgb(15 23 42 / .4); }
.dlg-head { border-bottom: 1px solid var(--s200); padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; }
.dlg-head h2 { font-size: 14px; font-weight: 600; color: var(--s800); }
.dlg-body { padding: 16px; }

/* login */
.login { display: flex; min-height: 100dvh; align-items: center; justify-content: center; padding: 16px; }
.login .card { width: 100%; max-width: 360px; padding: 24px; }
.login h1 { font-size: 20px; font-weight: 600; color: var(--s900); }
.login p { color: var(--s500); margin: 4px 0 20px; }

/* receipt: black on white, no accent */
.receipt { background: #fff; color: #000; font: 12px/1.45 'Geist Mono', ui-monospace, monospace; padding: 14px; width: 300px; max-width: 100%;
  margin: 0 auto; border: 1px solid var(--s200); }
.receipt .c { text-align: center; } .receipt hr { border: 0; border-top: 1px dashed #000; }
.receipt .l2 { display: flex; justify-content: space-between; gap: 8px; }
.print-only { display: none; }
@media print {
  body { background: #fff; } .no-print, #app, #modal, #login, .toast { display: none !important; }
  .print-only { display: block; } .receipt { width: 72mm; padding: 0; border: 0; }
  @page { margin: 4mm; }
}
.cards.c2 { grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); }
@media (max-width: 480px) { .cards.c2, .cards.c3 { grid-template-columns: 1fr; } }

/* POS till: layout from FuelOne's shop till */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.till { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr) 22rem; align-items: start; }
@media (min-width: 1280px) { .till { grid-template-columns: minmax(0, 1fr) 26rem; } }
@media (max-width: 767px) { .till { grid-template-columns: 1fr; } }
.till-left { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.till-left > div:empty { display: none; }
.ptiles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); }
.ptile { position: relative; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; text-align: left;
  min-height: 112px; padding: 12px; border-radius: 8px; border: 1px solid var(--s200); background: #fff; white-space: normal; font-weight: 400; }
.ptile:hover { border-color: var(--s300); background: var(--s50); }
.ptile.on { border-color: var(--s900); box-shadow: 0 0 0 1px var(--s900); }
.ptile.busy { background: var(--s50); }
.ptile.over { border-color: #fda4af; background: #fff1f2; }
.pname { font-size: 14px; font-weight: 500; color: var(--s800); padding-right: 28px; }
.pcode { font-family: 'Geist Mono', ui-monospace, monospace; font-size: 11px; color: var(--s500); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pfoot { margin-top: auto; padding-top: 12px; display: flex; justify-content: space-between; align-items: flex-end; gap: 4px 8px; flex-wrap: wrap; }
.pprice { font-size: 14px; font-weight: 600; color: var(--s900); } .pprice.none { color: #b45309; }
.pcount { position: absolute; right: 8px; top: 8px; min-width: 24px; border-radius: 99px; background: var(--s900); color: #fff; font-size: 12px; font-weight: 600; text-align: center; padding: 2px 6px; }
.timer.xs { font-size: 16px; }
.ptile .left { font-size: 12px; margin-top: 2px; }
.till-wait { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border: 1px solid #fde68a; background: #fffbeb; border-radius: 6px; padding: 8px 12px; }
.till-sale { position: sticky; top: 16px; display: flex; flex-direction: column; }
@media (max-width: 767px) { .till-sale { position: static; max-height: none; } }
.till-lines { list-style: none; margin: 0; padding: 0; flex: 1; min-height: 0; overflow-y: auto; }
.tline { padding: 12px 16px; border-top: 1px solid var(--s100); display: flex; flex-direction: column; gap: 8px; }
.tline:first-child { border-top: 0; }
.tline select { min-height: 32px; padding: 5px 10px; font-size: 13px; }
.tctl .lbl { font-size: 11px; }
.stepper { display: inline-flex; align-items: stretch; height: 32px; border: 1px solid var(--s300); border-radius: 6px; overflow: hidden; box-shadow: var(--shadow-xs); background: #fff; }
.stepper button { border: 0; border-radius: 0; box-shadow: none; min-height: 0; width: 32px; padding: 0; color: var(--s600); }
.stepper button:first-child { border-right: 1px solid var(--s300); }
.stepper button:last-child { border-left: 1px solid var(--s300); }
.stepper button:disabled { opacity: .4; }
.stepper > span { min-width: 56px; display: flex; align-items: center; justify-content: center; font-size: 13px; padding: 0 6px; }
.till-foot { border-top: 1px solid var(--s200); padding: 16px; flex: none; }
.till-total { display: flex; justify-content: space-between; align-items: flex-end; border-top: 1px solid var(--s100); padding-top: 12px; }
#tillTotal { font-size: 24px; font-weight: 600; color: var(--s900); }
.till-go { width: 100%; min-height: 48px; font-size: 16px; margin-top: 12px; }
.till-bar { display: none; }
@media (max-width: 767px) { .till-bar:not(:empty) { display: flex; position: sticky; bottom: 0; margin: 16px -16px -16px; justify-content: space-between;
  align-items: center; gap: 12px; border-top: 1px solid var(--s200); background: #fff; padding: 12px 16px; } }

/* Hidden figures (FuelOne admin overview): stars until an eye sets data-show-numbers on <html>. */
html:not([data-show-numbers]) .secret-value, html:not([data-show-numbers]) .eye-open,
html[data-show-numbers] .secret-mask, html[data-show-numbers] .eye-shut { display: none; }
.eye { border: 0; background: none; box-shadow: none; min-height: 0; padding: 2px; color: var(--s400); }
.eye:hover { background: none; color: var(--s600); }
.stat .lrow { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
input[readonly] { background: var(--s50); color: var(--s700); }

/* Keyboard: a visible focus ring everywhere, and key hints */
button:focus-visible, .btn:focus-visible, a:focus-visible, .ptile:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; }
h1:focus { outline: none; }
kbd { font: 500 11px/1 'Geist Mono', ui-monospace, monospace; border: 1px solid var(--s300); border-bottom-width: 2px; border-radius: 4px;
  padding: 2px 4px; background: #fff; color: var(--s600); white-space: nowrap; }
button.primary kbd { background: transparent; border-color: rgb(255 255 255 / .4); color: #fff; }
.sidebar nav a { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sidebar kbd { background: transparent; border-color: var(--s700); color: var(--s500); font-size: 10px; }
@media (max-width: 767px) { .sidebar kbd { display: none; } }
