@font-face{font-family:'Barlow';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/barlow-400-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}
@font-face{font-family:'Barlow';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/barlow-400-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:'Barlow';font-style:normal;font-weight:500;font-display:swap;src:url(fonts/barlow-500-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}
@font-face{font-family:'Barlow';font-style:normal;font-weight:500;font-display:swap;src:url(fonts/barlow-500-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:'Barlow';font-style:normal;font-weight:600;font-display:swap;src:url(fonts/barlow-600-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}
@font-face{font-family:'Barlow';font-style:normal;font-weight:600;font-display:swap;src:url(fonts/barlow-600-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:'Barlow Semi Condensed';font-style:normal;font-weight:500;font-display:swap;src:url(fonts/barlowsemicondensed-500-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}
@font-face{font-family:'Barlow Semi Condensed';font-style:normal;font-weight:500;font-display:swap;src:url(fonts/barlowsemicondensed-500-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:'Barlow Semi Condensed';font-style:normal;font-weight:600;font-display:swap;src:url(fonts/barlowsemicondensed-600-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}
@font-face{font-family:'Barlow Semi Condensed';font-style:normal;font-weight:600;font-display:swap;src:url(fonts/barlowsemicondensed-600-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:'Barlow Semi Condensed';font-style:normal;font-weight:700;font-display:swap;src:url(fonts/barlowsemicondensed-700-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}
@font-face{font-family:'Barlow Semi Condensed';font-style:normal;font-weight:700;font-display:swap;src:url(fonts/barlowsemicondensed-700-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}

/* ================= QCatering ERP =================
   Kuhinja, ne kancelarija: čelično siva podloga, bosiljak za radnje,
   paradajz samo za manjak, šafran samo za ono što čeka.
   Jedini ukras su oznake dana (boje kao nalepnice za hranu). */

:root {
  color-scheme: light;
  --bg: #eceeed;
  --surface: #ffffff;
  --surface-2: #f5f6f6;
  --ink: #1d2426;
  --ink-2: #465154;
  --ink-3: #616b6d;
  --rule: #d3d8d7;
  --rule-strong: #a3acab;
  --basil: #2e5b43;
  --basil-hover: #234834;
  --basil-tint: #e2ebe5;
  --tomato: #b3342a;
  --tomato-tint: #f8e4e1;
  --saffron: #7d5a00;
  --saffron-fill: #f0c43c;
  --saffron-tint: #fbf0cf;
  --d1: #2f6db5; /* ponedeljak, plava */
  --d2: #e5bf1b; /* utorak, žuta */
  --d3: #c8372d; /* sreda, crvena */
  --d4: #3a8a48; /* četvrtak, zelena */
  --d5: #85572a; /* petak, braon */
  --d6: #dd7424; /* subota, narandžasta */
  --d7: #1d2426; /* nedelja, crna */
  --r: 4px;
  --font: 'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --cond: 'Barlow Semi Condensed', 'Barlow', 'Arial Narrow', system-ui, sans-serif;
  --side-w: 236px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.5 var(--font);
  font-variant-numeric: tabular-nums;
}
h1, h2, h3 { font-family: var(--cond); line-height: 1.15; margin: 0 0 .5rem; }
h1 { font-size: 1.85rem; font-weight: 600; letter-spacing: -.01em; }
h2 { font-size: 1.25rem; font-weight: 600; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 .75rem; }
a { color: var(--basil); text-underline-offset: 2px; }
a:hover { color: var(--basil-hover); }
img { max-width: 100%; }
small, .small { font-size: .875rem; }
.muted { color: var(--ink-3); }
.num { text-align: right; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.neg { color: var(--tomato); }
.pos { color: var(--basil); }
.strong { font-weight: 600; }
.inline { display: inline; }
.mt { margin-top: 1.25rem !important; }
.mb0 { margin-bottom: 0; }
.hidden, [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible { outline: 2px solid var(--basil); outline-offset: 2px; }

/* ---------- okvir za admina ---------- */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.side {
  background: var(--surface);
  border-right: 1px solid var(--rule);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand {
  display: flex; align-items: center; gap: .6rem;
  font-family: var(--cond); font-weight: 600; font-size: 1.15rem;
  color: var(--ink); text-decoration: none;
  padding: 1.1rem 1.1rem 1rem;
}
.brand-mark {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; border-radius: var(--r);
  background: var(--basil); color: #fff;
  font-family: var(--cond); font-weight: 700; font-size: 1.1rem;
}
.brand-mark-lg { width: 56px; height: 56px; font-size: 2rem; border-radius: 8px; }
.side-nav { flex: 1; padding: 0 .6rem 1rem; }
.side-nav ul { list-style: none; margin: 0 0 .4rem; padding: 0; }
.side-group {
  font-family: var(--cond); font-weight: 600; font-size: .85rem;
  color: var(--ink-3); margin: .9rem .6rem .25rem;
}
.side-nav a {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .42rem .6rem; border-radius: var(--r);
  color: var(--ink); text-decoration: none;
  border-left: 3px solid transparent;
}
.side-nav a:hover { background: var(--surface-2); color: var(--ink); }
.side-nav a[aria-current="page"] { background: var(--basil-tint); border-left-color: var(--basil); color: var(--basil-hover); font-weight: 600; }
.count {
  min-width: 1.5rem; padding: 0 .4rem; border-radius: 999px;
  background: var(--saffron-fill); color: var(--ink);
  font: 700 .78rem/1.35rem var(--cond); text-align: center;
}
.count-low { background: var(--tomato); color: #fff; }
.side-user {
  border-top: 1px solid var(--rule);
  padding: .8rem 1.1rem 1rem;
  display: flex; justify-content: space-between; align-items: center; gap: .5rem;
  font-size: .9rem;
}
.side-user a { color: var(--ink); font-weight: 500; text-decoration: none; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; }
.content { padding: 1.6rem 2rem 3rem; max-width: 1280px; width: 100%; }

@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side {
    position: fixed; z-index: 30; left: 0; top: 0; bottom: 0; width: min(82vw, 290px);
    transform: translateX(-100%); transition: transform .18s ease-out;
    box-shadow: 0 0 0 100vmax rgba(29, 36, 38, 0);
  }
  .side.open { transform: none; box-shadow: 0 0 0 100vmax rgba(29, 36, 38, .35); }
  .topbar {
    display: flex; align-items: center; gap: .5rem;
    position: sticky; top: 0; z-index: 20;
    background: var(--surface); border-bottom: 1px solid var(--rule);
    padding: .25rem .75rem; padding-top: calc(.25rem + env(safe-area-inset-top, 0px));
  }
  .topbar .brand { padding: .5rem; }
  .content { padding: 1.1rem 1rem 3rem; }
  h1 { font-size: 1.55rem; }
}
.menu-toggle {
  font: 600 .95rem var(--cond); background: none; border: 1px solid var(--rule-strong);
  border-radius: var(--r); padding: .4rem .75rem; color: var(--ink); cursor: pointer;
}

/* ---------- zaglavlje strane ---------- */
.page-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.page-head h1 { margin: 0; }
.page-head .lead { color: var(--ink-2); margin: .3rem 0 0; max-width: 70ch; }
.back { display: inline-block; font-size: .9rem; color: var(--ink-3); margin-bottom: .2rem; text-decoration: none; }
.back::before { content: "‹ "; }
.back:hover { color: var(--ink); }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ---------- dugmad ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  font: 600 .98rem/1.2 var(--cond);
  padding: .55rem .95rem; min-height: 40px;
  border: 1px solid var(--rule-strong); border-radius: var(--r);
  background: var(--surface); color: var(--ink);
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); color: var(--ink); border-color: var(--ink-3); }
.btn-primary { background: var(--basil); border-color: var(--basil); color: #fff; }
.btn-primary:hover { background: var(--basil-hover); border-color: var(--basil-hover); color: #fff; }
.btn-danger { color: var(--tomato); border-color: #d9a39e; }
.btn-danger:hover { background: var(--tomato-tint); color: var(--tomato); border-color: var(--tomato); }
.btn-sm { min-height: 32px; padding: .3rem .6rem; font-size: .9rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.linkbtn {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; color: var(--ink-3); text-decoration: underline; text-underline-offset: 2px;
}
.linkbtn:hover { color: var(--ink); }
.linkbtn-danger { color: var(--tomato); }

/* ---------- forme ---------- */
.form { display: grid; gap: .9rem; }
.form > *, .grid-2 > *, .grid-3 > *, .grid-4 > *, .split > * { min-width: 0; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: .9rem 1rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.span-all { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.field > label { font: 500 .92rem var(--cond); color: var(--ink-2); }
.field-check > label { display: flex; align-items: center; gap: .5rem; font: 400 1rem var(--font); color: var(--ink); cursor: pointer; }
input[type=text], input[type=password], input[type=email], input[type=tel], input[type=number],
input[type=date], input[type=time], input[type=datetime-local], input[type=month], input[type=search],
input[type=file], select, textarea {
  width: 100%; min-width: 0;
  font: 400 1rem/1.3 var(--font);
  padding: .5rem .6rem; min-height: 40px;
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--rule-strong); border-radius: var(--r);
}
input[type=file] { padding: .4rem; }
textarea { min-height: 5.5rem; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--basil); box-shadow: 0 0 0 3px var(--basil-tint); }
input[type=checkbox], input[type=radio] { width: 1.15rem; height: 1.15rem; accent-color: var(--basil); margin: 0; }
input[readonly] { background: var(--surface-2); }
.help { color: var(--ink-3); font-size: .85rem; }
.form-actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; padding-top: .3rem; }
.form-actions .spacer { flex: 1; }
.req::after { content: " *"; color: var(--tomato); }
fieldset { border: 0; padding: 0; margin: 0; }

/* ---------- paneli i liste ---------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1.15rem 1.25rem;
  margin-bottom: 1.25rem;
}
.panel > h2:first-child, .panel-head h2 { margin-top: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; flex-wrap: wrap; margin-bottom: .75rem; }
.panel-head h2 { margin: 0; }
.panel-flush { padding: 0; }
.panel-flush > .panel-head { padding: 1rem 1.25rem 0; }
.narrow { max-width: 580px; }
.medium { max-width: 860px; }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.25rem; align-items: start; }
.split > .panel { margin-bottom: 0; }
.stack > * + * { margin-top: 1.25rem; }

.kv { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: .45rem 1rem; margin: 0; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; overflow-wrap: anywhere; }

/* ---------- tabele ---------- */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tbl th {
  text-align: left; font: 500 .88rem var(--cond); color: var(--ink-2);
  padding: .55rem .7rem; border-bottom: 1px solid var(--rule-strong); white-space: nowrap;
  background: var(--surface);
}
.tbl td { padding: .55rem .7rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.tbl tbody tr:hover td { background: var(--surface-2); }
.tbl tfoot td { font-weight: 600; border-bottom: 0; border-top: 1px solid var(--rule-strong); }
.tbl .num { text-align: right; }
.tbl th.num { text-align: right; }
.tbl a.rowlink { color: var(--ink); font-weight: 600; text-decoration: none; }
.tbl a.rowlink:hover { color: var(--basil); text-decoration: underline; }
.tbl .sub { display: block; color: var(--ink-3); font-size: .85rem; }
.tbl .row-actions { text-align: right; white-space: nowrap; }
.tbl .row-actions > * + * { margin-left: .35rem; }
.tbl tr.is-low td:first-child { box-shadow: inset 3px 0 0 var(--tomato); }
.tbl tr.is-done td { color: var(--ink-3); }
.panel .tbl th { background: transparent; }
.panel-flush .tbl th:first-child, .panel-flush .tbl td:first-child { padding-left: 1.25rem; }
.panel-flush .tbl th:last-child, .panel-flush .tbl td:last-child { padding-right: 1.25rem; }

/* ---------- oznake ---------- */
.badge {
  display: inline-block; white-space: nowrap;
  font: 600 .8rem/1.2 var(--cond);
  padding: .16rem .45rem; border-radius: 3px;
  border: 1px solid transparent;
}
.badge-low { background: var(--tomato-tint); color: var(--tomato); border-color: #efc2bd; }
.badge-pending { background: var(--saffron-tint); color: var(--saffron); border-color: #edd894; }
.badge-ok { background: var(--basil-tint); color: var(--basil-hover); border-color: #bfd3c6; }
.badge-muted { background: var(--surface-2); color: var(--ink-2); border-color: var(--rule); }
.badge-ink { background: var(--ink); color: #fff; }

/* ---------- poruke ---------- */
.flash {
  background: var(--surface); border: 1px solid var(--rule); border-left: 4px solid var(--ink-3);
  border-radius: var(--r); padding: .7rem .9rem; margin-bottom: 1rem;
}
.flash p { margin: 0; }
.flash ul { margin: .35rem 0 0; padding-left: 1.2rem; }
.flash-ok { border-left-color: var(--basil); }
.flash-err { border-left-color: var(--tomato); background: #fdf6f5; }
.flash-info { border-left-color: var(--saffron-fill); background: #fffbef; }

.empty {
  border: 1px dashed var(--rule-strong); border-radius: 6px;
  padding: 1.5rem 1.25rem; color: var(--ink-2); background: var(--surface);
}
.empty p { margin: 0 0 .75rem; }
.empty p:last-child { margin: 0; }
.panel .empty { background: var(--surface-2); }

/* ---------- filteri, kartice, straničenje ---------- */
.filters {
  display: flex; flex-wrap: wrap; gap: .6rem .75rem; align-items: flex-end;
  margin-bottom: 1rem;
}
.filters .field { flex: 1 1 170px; max-width: 280px; }
.filters .field-check { flex: 0 0 auto; padding-bottom: .55rem; }
.filters .btn { flex: 0 0 auto; }
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--rule-strong); margin-bottom: 1.25rem; overflow-x: auto; }
.tabs a {
  padding: .55rem .85rem; color: var(--ink-2); text-decoration: none; white-space: nowrap;
  font: 600 1rem var(--cond); border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--basil-hover); border-bottom-color: var(--basil); }
.pager { display: flex; gap: 1rem; align-items: center; justify-content: flex-end; padding: .9rem 0 0; font-size: .92rem; }
.pager .off { color: var(--ink-3); }
.panel-flush .pager { padding: .8rem 1.25rem 1rem; }

/* ---------- brojke ---------- */
.figures { display: flex; flex-wrap: wrap; gap: 0; margin: 0 0 1.25rem; background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; }
.figure { flex: 1 1 180px; padding: .85rem 1.2rem; border-right: 1px solid var(--rule); }
.figure:last-child { border-right: 0; }
.figure dt { color: var(--ink-2); font-size: .9rem; }
.figure dd { margin: .15rem 0 0; font: 700 1.6rem/1.15 var(--cond); }
.figure dd small { font: 500 .9rem var(--font); color: var(--ink-3); }
@media (max-width: 640px) {
  .figure { border-right: 0; border-bottom: 1px solid var(--rule); }
  .figure:last-child { border-bottom: 0; }
  .tbl .hide-sm { display: none; }
}

/* ---------- oznake dana i raspored ---------- */
.daydot {
  display: inline-grid; place-items: center; flex: none;
  width: 2.3rem; height: 2.3rem; border-radius: 50%;
  font: 700 .8rem/1 var(--cond); color: #fff; background: var(--ink);
}
.daydot.d1 { background: var(--d1); }
.daydot.d2 { background: var(--d2); color: var(--ink); }
.daydot.d3 { background: var(--d3); }
.daydot.d4 { background: var(--d4); }
.daydot.d5 { background: var(--d5); }
.daydot.d6 { background: var(--d6); color: var(--ink); }
.daydot.d7 { background: var(--d7); }
.daydate { font: 600 .95rem var(--cond); color: var(--ink-2); }

.weeknav { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.weeknav .range { font: 600 1.1rem var(--cond); margin: 0 .5rem; }
.week { display: grid; grid-template-columns: repeat(7, minmax(160px, 1fr)); gap: .6rem; overflow-x: auto; padding-bottom: .5rem; }
.day { background: var(--surface-2); border: 1px solid var(--rule); border-radius: 6px; padding: .6rem; min-height: 9rem; display: flex; flex-direction: column; gap: .5rem; }
.day-head { display: flex; align-items: center; gap: .5rem; }
.day.is-today { background: var(--surface); border-color: var(--basil); box-shadow: inset 0 3px 0 var(--basil); }
.day.is-past { opacity: .72; }
.day .add { margin-top: auto; font-size: .9rem; }
.ticket {
  display: block; background: var(--surface); color: var(--ink); text-decoration: none;
  border: 1px solid var(--rule); border-top: 3px solid var(--ink);
  border-radius: 2px 2px 0 0; padding: .45rem .55rem .5rem;
  border-bottom: 1px dashed var(--rule-strong);
}
a.ticket:hover { border-color: var(--ink-3); color: var(--ink); }
.ticket.d1 { border-top-color: var(--d1); }
.ticket.d2 { border-top-color: var(--d2); }
.ticket.d3 { border-top-color: var(--d3); }
.ticket.d4 { border-top-color: var(--d4); }
.ticket.d5 { border-top-color: var(--d5); }
.ticket.d6 { border-top-color: var(--d6); }
.ticket.d7 { border-top-color: var(--d7); }
.ticket-kind { font: 600 .8rem var(--cond); color: var(--ink-3); display: block; }
.ticket-name { font: 600 1.02rem/1.2 var(--cond); display: block; }
.ticket-meta { font-size: .85rem; color: var(--ink-2); display: block; margin-top: .15rem; }
.ticket-portions { font: 700 1rem var(--cond); }
.rail { display: flex; gap: .6rem; overflow-x: auto; padding-bottom: .25rem; }
.rail .ticket { flex: 0 0 200px; }

.daylist { list-style: none; margin: 0; padding: 0; }
.daylist > li { display: grid; grid-template-columns: auto 1fr; gap: .75rem; padding: .8rem 0; border-bottom: 1px solid var(--rule); }
.daylist > li:last-child { border-bottom: 0; }
.daylist .tickets { display: grid; gap: .5rem; }

/* ---------- obaveze (čeklista) ---------- */
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; gap: .75rem; align-items: flex-start; padding: .65rem 0; border-bottom: 1px solid var(--rule); }
.checklist li:last-child { border-bottom: 0; }
.checkbtn {
  flex: none; width: 1.6rem; height: 1.6rem; margin-top: .05rem;
  border: 2px solid var(--rule-strong); border-radius: 5px; background: var(--surface);
  cursor: pointer; display: grid; place-items: center; padding: 0; color: #fff;
}
.checkbtn:hover { border-color: var(--basil); }
.checkbtn.on { background: var(--basil); border-color: var(--basil); }
.checkbtn.on::after { content: ""; width: .45rem; height: .8rem; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: translate(0, -1px) rotate(45deg); }
.check-body { flex: 1; min-width: 0; }
.check-title { font-weight: 500; overflow-wrap: anywhere; }
.is-done .check-title { text-decoration: line-through; color: var(--ink-3); }
.check-meta { font-size: .87rem; color: var(--ink-3); }
.check-meta .late { color: var(--tomato); font-weight: 600; }
.check-meta .due-today { color: var(--saffron); font-weight: 600; }
.quickadd { display: flex; gap: .5rem; flex-wrap: wrap; }
.quickadd input[type=text] { flex: 1 1 260px; }
.quickadd input[type=date] { flex: 0 0 170px; }

/* ---------- stavke (nabavka, trebovanje, receptura) ---------- */
.lines { width: 100%; border-collapse: collapse; }
.lines th { text-align: left; font: 500 .88rem var(--cond); color: var(--ink-2); padding: .3rem .35rem; border-bottom: 1px solid var(--rule-strong); white-space: nowrap; }
.lines td { padding: .35rem; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.lines .rb { width: 2.5rem; color: var(--ink-3); text-align: right; font-weight: 600; }
.lines .unit { width: 3.5rem; color: var(--ink-2); white-space: nowrap; }
.lines td.num input { text-align: right; }
.lines .w-qty { width: 8.5rem; }
.lines .w-money { width: 9.5rem; }
.lines .w-x { width: 4.5rem; text-align: right; }
.lines tfoot td { border-bottom: 0; font-weight: 600; padding-top: .6rem; }
.lines .hint { display: block; font-size: .8rem; color: var(--ink-3); margin-top: .15rem; }
.lines .hint.warn { color: var(--tomato); }
@media (max-width: 640px) {
  .lines, .lines tbody, .lines tr, .lines td { display: block; width: 100%; }
  .lines thead { display: none; }
  .lines tr { border: 1px solid var(--rule); border-radius: 6px; padding: .5rem; margin-bottom: .6rem; background: var(--surface); position: relative; }
  .lines td { border: 0; padding: .25rem 0; }
  .lines td[data-label]::before { content: attr(data-label); display: block; font: 500 .85rem var(--cond); color: var(--ink-2); margin-bottom: .15rem; }
  .lines .rb { position: absolute; right: .6rem; top: .5rem; width: auto; }
  .lines .unit { width: auto; }
  .lines .w-qty, .lines .w-money, .lines .w-x { width: 100%; text-align: left; }
  .lines tfoot tr { border: 0; background: none; padding: 0; }
}

/* ---------- traka napretka ---------- */
.meter { height: .55rem; background: var(--surface-2); border: 1px solid var(--rule); border-radius: 999px; overflow: hidden; min-width: 120px; }
.meter > span { display: block; height: 100%; background: var(--basil); }
.meter.is-err > span { background: var(--tomato); }

/* ---------- dijalog ---------- */
dialog {
  border: 1px solid var(--rule-strong); border-radius: 8px; padding: 0;
  width: min(560px, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem);
  color: var(--ink); background: var(--surface);
}
dialog::backdrop { background: rgba(29, 36, 38, .45); }
.dlg-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.25rem .5rem; }
.dlg-head h2 { margin: 0; }
.dlg-body { padding: .25rem 1.25rem 1.25rem; }
.dlg-close { background: none; border: 0; font: 600 1rem var(--cond); color: var(--ink-3); cursor: pointer; padding: .3rem; }
.dlg-close:hover { color: var(--ink); }

/* ---------- prijava ---------- */
.guest { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem 1rem; }
.login { width: 100%; max-width: 380px; }
.login-brand { display: flex; align-items: center; gap: .9rem; margin-bottom: 1.25rem; }
.login-name { font: 600 1.6rem var(--cond); margin: 0; }
.login-form { background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 1.4rem; display: grid; gap: .9rem; }
.login-form h1 { font-size: 1.35rem; margin: 0; }
.public-note { max-width: 520px; background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 1.5rem; }

/* ---------- radnički deo (telefon) ---------- */
.wshell { min-height: 100vh; padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }
.wtop {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  background: var(--surface); border-bottom: 1px solid var(--rule);
  padding: .1rem .5rem .1rem 0; padding-top: env(safe-area-inset-top, 0px);
  position: sticky; top: 0; z-index: 10;
}
.wtop .brand { padding: .6rem .9rem; }
.wtop-user { display: flex; gap: .75rem; align-items: center; font-size: .92rem; padding-right: .5rem; }
.wtop-user a { color: var(--ink); text-decoration: none; font-weight: 500; }
.wcontent { max-width: 760px; margin: 0 auto; padding: 1rem 1rem 2rem; }
.wtabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--surface); border-top: 1px solid var(--rule-strong);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.wtabs a {
  display: grid; place-items: center; min-height: 64px;
  font: 600 1.05rem var(--cond); color: var(--ink-2); text-decoration: none;
  border-top: 3px solid transparent;
}
.wtabs a[aria-current="page"] { color: var(--basil-hover); border-top-color: var(--basil); background: var(--basil-tint); }
.clock { font: 700 3.4rem/1 var(--cond); letter-spacing: -.02em; margin: .25rem 0 .1rem; }
.clock-date { color: var(--ink-2); margin-bottom: 1rem; }
.bigbtn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; min-height: 96px; border-radius: 8px; border: 0; cursor: pointer;
  font: 700 1.6rem/1.1 var(--cond); color: #fff; background: var(--basil);
}
.bigbtn small { font: 500 .95rem var(--font); opacity: .9; margin-top: .3rem; }
.bigbtn:hover { background: var(--basil-hover); }
.bigbtn-out { background: var(--ink); }
.bigbtn-out:hover { background: #000; }
.status-line { display: flex; align-items: center; gap: .6rem; margin: .25rem 0 1rem; font-size: 1.05rem; }
.dot { width: .7rem; height: .7rem; border-radius: 50%; background: var(--rule-strong); flex: none; }
.dot-on { background: var(--basil); box-shadow: 0 0 0 4px var(--basil-tint); }

/* ---------- grafikon (finansije) ---------- */
.chart { width: 100%; overflow-x: auto; }
.chart svg { display: block; min-width: 560px; width: 100%; height: auto; }
.legend { display: flex; gap: 1.1rem; flex-wrap: wrap; font-size: .9rem; color: var(--ink-2); margin: 0 0 .5rem; padding: 0; list-style: none; }
.legend i { display: inline-block; width: .8rem; height: .8rem; border-radius: 2px; margin-right: .35rem; vertical-align: -1px; }

/* ---------- štampa ---------- */
@media print {
  body { background: #fff; }
  .side, .topbar, .wtabs, .wtop, .actions, .filters, .no-print, .pager, .tabs, .row-actions, .btn { display: none !important; }
  .shell { display: block; }
  .content { padding: 0; max-width: none; }
  .panel { border: 0; padding: 0; }
  .tbl td, .tbl th { padding: .3rem .4rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
