/* Base look of the staff/manager app: same warm palette as the guest page, big readable text and buttons, soft transitions. */
:root {
  --paper: oklch(97.5% 0.018 95); --paper-2: oklch(94% 0.025 92); --card: oklch(99.5% 0.006 95);
  --ink: oklch(19% 0.012 70); --ink-soft: oklch(44% 0.02 70); --rule: oklch(25% 0.02 50 / .13); --rule-strong: oklch(25% 0.02 50 / .7);
  --orange: oklch(62% 0.145 60); --orange-dark: oklch(56% 0.145 60); --yellow: oklch(89% 0.08 88);
  --wine: oklch(38% 0.11 18); --teal: oklch(42% 0.07 195); --blue: oklch(33% 0.04 60);
  --s-new: var(--orange); --s-prep: var(--blue); --s-ready: var(--teal); --s-served: var(--ink-soft); --s-cancel: var(--wine);
  --display: 'Instrument Serif', Georgia, serif; --body: Geist, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r-sm: 10px; --r-md: 16px; --ease: cubic-bezier(.22, 1, .36, 1); --ease-io: cubic-bezier(.45, 0, .2, 1); --dur: 380ms; --dur-fast: 220ms;
  --gutter: clamp(16px, 2.6vw, 40px); --rail: 0px;
  --tabbar: 68px; --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; overflow-x: clip; }
body { font: 400 18px/1.45 var(--body); font-variant-numeric: tabular-nums; color: var(--ink); background: var(--paper); min-height: 100vh; padding-bottom: calc(var(--tabbar) + var(--safe-b)); }
/* One clear sans font for everything staff works with; the decorative serif is only for the login brand. */
h1, h2, h3 { font-family: var(--body); font-weight: 700; line-height: 1.15; margin: 0; letter-spacing: -.015em; }
h1 { font-size: 1.9rem; } h2 { font-size: 1.35rem; } h3 { font-size: 1.3rem; }
p { margin: .5em 0; }
a { color: var(--orange-dark); }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
button:disabled { opacity: .45; cursor: default; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
[hidden] { display: none !important; }
.muted { color: var(--ink-soft); }
.err { color: var(--wine); font-weight: 600; }
.fine { font-size: .9rem; color: var(--ink-soft); }
.pad { padding: 20px 16px; }
.row { display: flex; gap: 10px; align-items: center; }
.row > label { flex: 1; }
.row:has(> label) { align-items: flex-end; } /* inputs line up even when one label wraps */
.row.wrap { flex-wrap: wrap; margin-top: 14px; }
.row.end { justify-content: flex-end; margin-top: 16px; }
.code { font: 500 .85rem ui-monospace, monospace; word-break: break-all; color: var(--ink-soft); }

/* Header */
.top { position: sticky; top: 0; z-index: 40; background: var(--paper); border-bottom: 1px solid var(--rule-strong); padding-top: var(--safe-t); }
.bar { display: flex; align-items: center; gap: 14px; min-height: 58px; padding: 6px var(--gutter); }
.venue { display: flex; align-items: baseline; gap: 10px; min-width: 0; text-align: left; }
.logo { font-weight: 750; font-size: 1.35rem; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.role { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
/* Right side of the header: shift, then who is signed in. */
.shift-now { margin-left: auto; padding: 4px 12px; border-radius: 999px; background: var(--paper-2); font-weight: 600; font-size: .9rem; white-space: nowrap; }
.who { display: grid; text-align: right; line-height: 1.2; font-weight: 650; font-size: .95rem; white-space: nowrap; } .who small { font-weight: 500; font-size: .82rem; color: var(--ink-soft); }
.shift-now:empty { display: none; }
@media (max-width: 640px) { .who, .shift-now .chg { display: none; } }
.live-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--rule-strong); transition: background var(--dur); }
.live-dot.on { background: var(--teal); box-shadow: 0 0 0 4px oklch(52% 0.06 150 / .18); }

/* Screens */
/* Full width on every screen; the gutter grows a little with the window instead of a centred column. */
.view { padding: 14px var(--gutter) 24px; }
/* Screen change: content fades up softly, one block after another. Removed after the first draw so live updates stay still. */
.view.enter > * { animation: fadein 360ms var(--ease-io) both; }
.view.enter > * > * { animation: rise 560ms var(--ease) both; }
.view.enter > * > :nth-child(2) { animation-delay: 40ms; } .view.enter > * > :nth-child(3) { animation-delay: 80ms; } .view.enter > * > :nth-child(4) { animation-delay: 120ms; } .view.enter > * > :nth-child(n+5) { animation-delay: 160ms; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes fadein { from { opacity: 0; } }
.head-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.head-row h1 { margin-right: auto; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 18px; border-radius: var(--r-sm); font-weight: 650; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--rule-strong), 0 3px 0 var(--rule-strong); transition: transform 160ms var(--ease), box-shadow 160ms var(--ease), background var(--dur); }
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: inset 0 0 0 1.5px var(--rule-strong), 0 0 0 var(--rule-strong); }
.btn.primary { background: var(--orange); color: #fff; box-shadow: 0 4px 0 var(--orange-dark); }
.btn.primary:active:not(:disabled) { box-shadow: 0 0 0 transparent; transform: translateY(4px); }
.btn.ghost { background: transparent; box-shadow: none; color: var(--ink-soft); }
.btn.danger { color: var(--wine); }
.btn.danger-fill { background: var(--wine); color: #fff; box-shadow: 0 4px 0 oklch(36% 0.1 15); }
.btn.big { width: 100%; min-height: 58px; font-size: 1.1rem; margin-top: 8px; }
.icon-btn { width: 44px; height: 44px; border-radius: var(--r-sm); font-size: 1.2rem; color: var(--ink-soft); }
.icon-btn:active { background: var(--paper-2); }

/* Forms */
label { display: block; margin: 12px 0 0; font-weight: 600; font-size: .95rem; }
input:not([type=checkbox]), select, textarea { display: block; width: 100%; margin-top: 6px; padding: 14px; font: inherit; font-weight: 500; color: var(--ink); background: var(--card); border: 1.5px solid var(--rule-strong); border-radius: var(--r-sm); }
textarea { resize: vertical; }
label.check { display: flex; align-items: center; gap: 12px; font-weight: 500; }
label.check input { width: 24px; height: 24px; accent-color: var(--orange); }
details { margin-top: 12px; } summary { font-weight: 600; cursor: pointer; }
.msg { min-height: 1.4em; font-weight: 600; font-size: .95rem; }
.msg.err { color: var(--wine); }

/* Lists (Više, Tim, profile) */
.list { display: grid; gap: 10px; margin: 16px 0; }
.list-row { display: grid; gap: 2px; width: 100%; padding: 14px 16px; text-align: left; background: var(--card); border: 1px solid var(--rule); border-radius: var(--r-md); color: inherit; text-decoration: none; transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease-io); }
.list-row:active { transform: scale(.99); }
.list-row b { font-size: 1.1rem; }
.list-row span { color: var(--ink-soft); font-size: 1rem; }
.list-row.big { padding: 18px; } .list-row.big b { font-size: 1.25rem; }
.list-row.split { display: flex; align-items: center; gap: 10px; }
.list-row .grow { flex: 1; min-width: 0; display: grid; gap: 2px; text-align: left; }
.list-row.off { opacity: .55; }
.danger-zone { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--rule); }
.danger-zone h2 { font-size: 1rem; color: var(--wine); text-transform: uppercase; letter-spacing: .05em; }
.danger-zone p { color: var(--ink-soft); font-size: .95rem; }

/* Bottom tab bar */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: flex; justify-content: center; background: var(--card); border-top: 1px solid var(--rule-strong); padding-bottom: var(--safe-b); }
.tab { position: relative; flex: 1; max-width: 180px; height: var(--tabbar); display: grid; place-items: center; align-content: center; gap: 2px; color: var(--ink-soft); font-weight: 600; font-size: .82rem; transition: color var(--dur) var(--ease-io), background-color var(--dur) var(--ease-io); }
.tab .ti { display: grid; line-height: 0; transition: transform var(--dur) var(--ease); }
.tab.on { color: var(--orange-dark); font-weight: 750; background: oklch(62% 0.145 60 / .12); }
.tab.on .ti { color: var(--orange-dark); transform: translateY(-2px); }
.tab.on::before { content: ""; position: absolute; top: 0; left: 25%; right: 25%; height: 3px; border-radius: 0 0 3px 3px; background: var(--orange); animation: grow var(--dur) var(--ease) both; }
@keyframes grow { from { transform: scaleX(0); } }
.badge { position: absolute; top: 6px; left: calc(50% + 8px); min-width: 24px; height: 24px; padding: 0 7px; display: grid; place-items: center; border-radius: 999px; background: var(--orange); color: #fff; font-size: .85rem; font-weight: 700; }

/* Toast, sheet, offline */
.toast { position: fixed; left: 50%; top: calc(10px + var(--safe-t)); z-index: 80; max-width: calc(100% - 32px); padding: 14px 20px; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 600; transform: translate(-50%, -150%); transition: transform var(--dur) var(--ease); }
.toast.show { transform: translate(-50%, 0); }
.toast.ink { background: var(--orange); }
.toast.err { background: var(--wine); }
.sheet { position: fixed; inset: 0; z-index: 60; visibility: hidden; }
.sheet.open { visibility: visible; }
.sheet-bg { position: absolute; inset: 0; background: oklch(25% 0.02 50 / .45); opacity: 0; transition: opacity var(--dur) var(--ease-io); }
.sheet.open .sheet-bg { opacity: 1; }
.sheet-card { position: absolute; left: 0; right: 0; bottom: 0; max-height: 92vh; overflow-y: auto; padding: 22px 18px calc(24px + var(--safe-b)); background: var(--paper); border-radius: 22px 22px 0 0; transform: translateY(105%); transition: transform 460ms var(--ease); }
.sheet.open .sheet-card { transform: none; }
.sheet-card > h2 { padding-right: 52px; margin-bottom: 8px; }
.sheet-card .x { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: var(--r-sm); box-shadow: inset 0 0 0 1.5px var(--rule-strong); font-size: 1.1rem; }
body.sheet-open { overflow: hidden; }
@media (min-width: 700px) {
  .sheet-card { left: 50%; right: auto; bottom: auto; top: 50%; width: min(560px, 92vw); border-radius: 22px; transform: translate(-50%, -48%) scale(.98); opacity: 0; transition: transform 460ms var(--ease), opacity var(--dur) var(--ease-io); }
  .sheet.open .sheet-card { transform: translate(-50%, -50%); opacity: 1; }
}
.offline { position: fixed; left: 50%; bottom: calc(var(--tabbar) + 12px + var(--safe-b)); z-index: 50; transform: translateX(-50%); padding: 10px 16px; border-radius: 999px; background: var(--wine); color: #fff; font-weight: 600; }

/* Hover feedback on computers (phones only get the press). */
@media (hover: hover) {
  .list-row:hover { transform: translateY(-2px); border-color: var(--rule-strong); box-shadow: 0 10px 24px -14px oklch(25% 0.02 50 / .35); }
  .tab:hover:not(.on) { color: var(--ink); }
}

/* Computers, big tablets and phones turned sideways: the tab bar becomes a rail on the left, so the screens use the whole height and width. */
@media (min-width: 1000px), (min-width: 640px) and (max-height: 520px) and (orientation: landscape) {
  :root { --rail: 200px; }
  body { padding-bottom: 0; padding-left: var(--rail); }
  .tabbar { top: 0; right: auto; width: var(--rail); flex-direction: column; justify-content: flex-start; gap: 4px; padding: calc(70px + var(--safe-t)) 0 16px; border-top: 0; border-right: 1px solid var(--rule-strong); }
  .tabbar { padding-left: 10px; padding-right: 10px; }
  .tab { flex: none; max-width: none; width: 100%; height: 60px; display: flex; align-items: center; justify-content: flex-start; gap: 12px; padding: 0 14px; border-radius: 12px; font-size: 1.05rem; }
  .tab.on { background: var(--orange); color: #fff; }
  .tab.on .ti { color: #fff; transform: none; }
  .tab.on::before { display: none; }
  .tab.on .badge { background: #fff; color: var(--orange-dark); }
  @keyframes growy { from { transform: scaleY(0); } }
  .badge { position: static; margin-left: auto; }
  .offline { bottom: 16px; left: calc(50% + var(--rail) / 2); }
  .toast { left: calc(50% + var(--rail) / 2); }
  .sheet-card { left: calc(50% + var(--rail) / 2); }
  /* Lists of choices sit side by side instead of one long column. */
  .list { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
}
/* Smaller computers / sideways phones: narrower rail so the order board keeps room for three columns. */
@media (min-width: 1000px) and (max-width: 1279px), (min-width: 640px) and (max-height: 520px) and (orientation: landscape) {
  :root { --rail: 168px; }
  .tabbar { padding-left: 8px; padding-right: 8px; }
  .tab { gap: 8px; padding: 0 8px; font-size: .92rem; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .tabbar { padding-top: calc(62px + var(--safe-t)); gap: 2px; } .tab { height: 48px; }
  .bar { min-height: 52px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: opacity 150ms linear !important; } }

/* ---- Fuka look: black header with gold lettering and a tile-floor strip ---- */
.top { background: #16120e; color: #fffee4; border-bottom: 0; }
.top::after { content: ""; display: block; height: 6px; background: repeating-conic-gradient(#d88326 0 25%, #16120e 0 50%) 0 0 / 12px 12px; }
.top .logo { color: #f0b44a; }
.top .shift-now { background: oklch(100% 0 0 / .12); color: #fffee4; }
.top .who small { color: oklch(85% 0.03 90); }
