/* TTA Shop Time Clock — shared styles. Big targets, readable at arm's length, TTA blue. */
:root {
  color-scheme: light dark;
  --bg: light-dark(#eef1f4, #0d1216);
  --panel: light-dark(#ffffff, #161e25);
  --ink: light-dark(#11171c, #e8edf1);
  --mute: light-dark(#56636e, #9aa7b2);
  --line: light-dark(#d3dbe2, #27323c);
  --hi: light-dark(#f4f7f9, #1c252d);
  --soft: light-dark(#e2f0f9, #102c3b);
  --blue: light-dark(#0a7fc0, #2c9fdc);
  --red: light-dark(#c8341f, #e0533e);
  --green: #1aa363;
  --amber: #d99500;
}
* { box-sizing: border-box; min-width: 0; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 17px/1.45 Barlow, system-ui, -apple-system, "Segoe UI", sans-serif; }
h1, h2, h3, .cond { font-family: "Barlow Condensed", Barlow, system-ui, sans-serif; font-weight: 700; line-height: 1.08; margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; border-radius: 12px; min-height: 48px; padding: 0 18px; background: var(--hi); border: 2px solid var(--line); font-weight: 600; }
button:disabled { opacity: .5; cursor: default; }
button.primary { background: var(--blue); border-color: transparent; color: #fff; }
button.danger { background: var(--red); border-color: transparent; color: #fff; }
button.link { background: none; border: 0; color: var(--blue); text-decoration: underline; min-height: 44px; padding: 0 6px; }
input, select { min-height: 48px; border-radius: 10px; border: 2px solid var(--line); background: var(--panel); padding: 0 12px; font-size: 16px; width: 100%; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.mute { color: var(--mute); }
.small { font-size: 14px; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grow { flex: 1; }
.hidden { display: none !important; }

/* big action buttons */
.big { min-height: 84px; font: 700 23px/1.1 "Barlow Condensed", Barlow, sans-serif; padding: 10px 16px; }
.acts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }

/* status card */
.stat { background: var(--soft); border-radius: 16px; padding: 16px 18px; border-left: 8px solid var(--blue); }
.stat.brk { border-color: var(--amber); }
.stat.off { border-color: var(--line); background: var(--hi); }
.stat small { color: var(--mute); font-weight: 700; font-size: 13px; letter-spacing: .02em; }
.stat h3 { font-size: 28px; margin: 2px 0; }
.stat p { margin: 0; }

/* tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.tile { text-align: left; padding: 12px 14px; min-height: 84px; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.tile b { font: 700 21px/1.1 "Barlow Condensed", Barlow, sans-serif; }
.tile small { color: var(--mute); font-size: 13px; font-weight: 500; }
.lbl { font-weight: 700; color: var(--mute); font-size: 13px; letter-spacing: .03em; margin: 16px 0 8px; }

/* PIN pad */
.pinv { text-align: center; font: 700 44px/1 "Barlow Condensed", sans-serif; letter-spacing: 14px; min-height: 52px; margin: 8px 0 14px; }
.pad { display: grid; grid-template-columns: repeat(3, minmax(0, 96px)); gap: 10px; justify-content: center; }
.pad button { min-height: 72px; font: 700 30px "Barlow Condensed", sans-serif; }

/* today list */
table.today { width: 100%; border-collapse: collapse; font-size: 16px; }
table.today td { padding: 8px 4px; border-top: 1px solid var(--line); vertical-align: top; }
table.today td:last-child { text-align: right; }
table.today tr.total td { font-weight: 700; }

/* messages */
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--red); color: #fff; padding: 12px 20px;
  border-radius: 12px; font-weight: 600; z-index: 50; max-width: 90vw; box-shadow: 0 10px 30px -10px #0008; }
.toast.ok { background: var(--green); }
.envbar { background: #c8341f; color: #fff; text-align: center; font-weight: 700; font-size: 14px; padding: 4px; letter-spacing: .04em; }
.update { position: fixed; top: 0; left: 0; right: 0; background: var(--blue); color: #fff; text-align: center; padding: 10px; z-index: 60; font-weight: 600; }
.update button { min-height: 36px; margin-left: 10px; background: #fff; color: var(--blue); border: 0; }

/* camera */
.cam { position: relative; border-radius: 16px; overflow: hidden; background: #000; aspect-ratio: 3 / 4; max-height: 60vh; margin: 0 auto; width: 100%; }
.cam video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam::after { content: ""; position: absolute; inset: 18%; border: 4px solid #ffffffd0; border-radius: 18px; box-shadow: 0 0 0 999px #0006; }

.done { display: grid; place-items: center; text-align: center; gap: 10px; min-height: 60vh; }
.donechk { width: 104px; height: 104px; border-radius: 50%; background: var(--green); display: grid; place-items: center; animation: pop .3s ease-out; }
@keyframes pop { from { transform: scale(.6); } to { transform: scale(1); } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
a { color: var(--blue); }
a > button { color: var(--ink); }
a > button.primary { color: #fff; }
