/* ============================================================
   SANK — Dizajn sistem
   Moderan, topao, profesionalan izgled za ugostiteljstvo.
   ============================================================ */

:root {
  /* Brend boje — sve se izvode iz --brand (može se menjati po lokalu)
     Waiter default: topli bakar (uz espresso pozadine i amber akcente) */
  --brand:        #b1662c;
  --brand-600:    color-mix(in srgb, var(--brand), #000 14%);
  --brand-700:    color-mix(in srgb, var(--brand), #000 28%);
  --brand-soft:   color-mix(in srgb, var(--brand), #fff 84%);
  --accent:       #f59e0b;   /* amber – akcenti, pazar */
  --accent-soft:  #fef3c7;

  /* Semantika */
  --ok:      #16a34a;
  --ok-soft: #dcfce7;
  --warn:    #d97706;
  --warn-soft:#fef3c7;
  --danger:  #dc2626;
  --danger-soft:#fee2e2;
  --info:    #2563eb;
  --info-soft:#dbeafe;

  /* Neutralne */
  --bg:        #f4f6f8;
  --surface:   #ffffff;
  --surface-2: #f8fafc;
  --border:    #e5e8ec;
  --text:      #0f172a;
  --text-2:    #475569;
  --text-3:    #94a3b8;

  /* Sidebar (espresso — uz Waiter brend) */
  --side-bg:   #15100c;
  --side-bg-2: #1e1712;
  --side-text: #d6cdc4;
  --side-muted:#7d7166;
  --side-active: var(--brand);

  /* Sistem */
  --radius:    14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --shadow:    0 1px 2px rgba(16,24,40,.05), 0 8px 24px rgba(16,24,40,.06);
  --shadow-sm: 0 1px 2px rgba(16,24,40,.06);
  --shadow-lg: 0 12px 40px rgba(16,24,40,.12);
  --ring:      0 0 0 3px rgba(13,148,136,.18);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* ---------------- Dark tema ---------------- */
:root[data-theme="dark"] {
  --bg:        #0b1116;
  --surface:   #141d27;
  --surface-2: #0f1720;
  --border:    #26333f;
  --text:      #e6edf3;
  --text-2:    #9fb0bd;
  --text-3:    #64757f;
  --shadow:    0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.35);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.5);
  --side-bg:   #0a1017;
  --side-bg-2: #0f1822;
}
:root[data-theme="dark"] .table th { background: var(--surface-2); }
:root[data-theme="dark"] .input,
:root[data-theme="dark"] .select,
:root[data-theme="dark"] textarea.input { background: var(--surface-2); color: var(--text); }
:root[data-theme="dark"] .modal { background: var(--surface); }

* { box-sizing: border-box; }
.ico { display: inline-block; vertical-align: -.15em; flex-shrink: 0; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }

h1,h2,h3,h4 { margin: 0 0 .4em; font-weight: 700; letter-spacing: -.01em; color: var(--text); }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }

/* ---------------- App layout ---------------- */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 264px;
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--side-bg-2), var(--side-bg));
  color: var(--side-text);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 22px 18px;
}
.sidebar__logo {
  width: 40px; height: 40px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 20px;
  box-shadow: 0 6px 16px rgba(13,148,136,.35);
}
.sidebar__logo-img { width: 40px; height: 40px; border-radius: 11px; object-fit: cover; box-shadow: 0 6px 16px rgba(0,0,0,.35); background:#fff; }
.sidebar__name { font-size: 1.2rem; font-weight: 800; color: #fff; letter-spacing: -.02em; }
.sidebar__sub  { font-size: .72rem; color: var(--side-muted); margin-top: -2px; }

.nav { padding: 8px 12px; flex: 1; overflow-y: auto; }
.nav__label {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--side-muted); padding: 16px 12px 6px; font-weight: 700;
}
.nav__item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; margin: 2px 0;
  border-radius: var(--radius-sm);
  color: var(--side-text); font-weight: 500; font-size: .92rem;
  transition: background .15s, color .15s;
}
.nav__item:hover { background: rgba(255,255,255,.06); text-decoration: none; color: #fff; }
.nav__item.is-active {
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 30%, transparent), color-mix(in srgb, var(--brand) 14%, transparent));
  color: #fff;
  box-shadow: inset 3px 0 0 var(--side-active);
}
.nav__item svg { width: 19px; height: 19px; flex-shrink: 0; opacity: .9; }

.sidebar__foot { padding: 14px; border-top: 1px solid rgba(255,255,255,.06); }
.userbox { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-700));
  color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .9rem;
  flex-shrink: 0;
}
.userbox__name { color: #fff; font-weight: 600; font-size: .88rem; }
.userbox__role { color: var(--side-muted); font-size: .72rem; }

/* ---------------- Main ---------------- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: 66px; background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; position: sticky; top: 0; z-index: 20;
}
.topbar__title { font-size: 1.15rem; font-weight: 700; }
.topbar__right { display: flex; align-items: center; gap: 14px; }
.iconbtn {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-2); cursor: pointer;
  display: grid; place-items: center; transition: all .15s;
}
.iconbtn:hover { background: var(--surface-2); color: var(--text); }
.iconbtn svg { width: 19px; height: 19px; }
.iconbtn .moon { display: none; }
:root[data-theme="dark"] .iconbtn .sun { display: none; }
:root[data-theme="dark"] .iconbtn .moon { display: block; }

.content { padding: 28px; max-width: 1280px; width: 100%; margin: 0 auto; }

/* ---------------- Cards ---------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card__head {
  padding: 18px 22px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.card__title { font-size: 1.02rem; font-weight: 700; }
.card__body { padding: 22px; }

/* ---------------- Stat tiles ---------------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 18px; }
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
}
.stat__icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center; margin-bottom: 14px;
}
.stat__icon svg { width: 22px; height: 22px; }
.stat__label { color: var(--text-2); font-size: .82rem; font-weight: 600; }
.stat__value { font-size: 1.85rem; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; }
.stat__delta { font-size: .78rem; font-weight: 600; margin-top: 6px; }
.stat__delta.up { color: var(--ok); }
.stat__delta.down { color: var(--danger); }

.i-teal   { background: var(--brand-soft); color: var(--brand-700); }
.i-amber  { background: var(--accent-soft); color: var(--warn); }
.i-blue   { background: var(--info-soft); color: var(--info); }
.i-green  { background: var(--ok-soft); color: var(--ok); }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: .9rem; cursor: pointer;
  border: 1px solid transparent; transition: all .15s; white-space: nowrap;
  font-family: inherit;
}
.btn svg { width: 17px; height: 17px; }
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(13,148,136,.25); }
.btn--primary:hover { background: var(--brand-600); }
.btn--ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn--ghost:hover { background: var(--surface-2); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { background: #b91c1c; }
.btn--sm { padding: 7px 12px; font-size: .82rem; }
.btn--block { width: 100%; justify-content: center; }

/* ---------------- Forms ---------------- */
.field { margin-bottom: 16px; }
.label { display: block; font-weight: 600; font-size: .84rem; margin-bottom: 6px; color: var(--text); }
.input, .select, textarea.input {
  width: 100%; padding: 11px 13px; font-size: .92rem; font-family: inherit;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); transition: border .15s, box-shadow .15s;
}
.input:focus, .select:focus, textarea.input:focus {
  outline: none; border-color: var(--brand); box-shadow: var(--ring);
}
.input::placeholder { color: var(--text-3); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.help { font-size: .78rem; color: var(--text-3); margin-top: 5px; }

/* ---------------- Badges ---------------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 600;
}
.badge--ok { background: var(--ok-soft); color: #15803d; }
.badge--warn { background: var(--warn-soft); color: #b45309; }
.badge--danger { background: var(--danger-soft); color: #b91c1c; }
.badge--info { background: var(--info-soft); color: #1d4ed8; }
.badge--muted { background: #f1f5f9; color: var(--text-2); }
.badge--teal { background: var(--brand-soft); color: var(--brand-700); }

/* ---------------- Table ---------------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th {
  text-align: left; font-weight: 600; color: var(--text-2);
  font-size: .76rem; text-transform: uppercase; letter-spacing: .04em;
  padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2);
}
.table td { padding: 13px 16px; border-bottom: 1px solid var(--border); }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: none; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

/* ---------------- Flash ---------------- */
.flash { padding: 13px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-weight: 500; font-size: .9rem; display:flex; gap:10px; align-items:center;}
.flash--success { background: var(--ok-soft); color: #166534; }
.flash--error { background: var(--danger-soft); color: #991b1b; }
.flash--info { background: var(--info-soft); color: #1e40af; }

/* ---------------- Helpers ---------------- */
.muted { color: var(--text-2); }
.mt-0{margin-top:0}.mb-0{margin-bottom:0}
.mt-2{margin-top:1rem}.mb-2{margin-bottom:1rem}.mt-3{margin-top:1.5rem}
.flex { display: flex; } .items-center{align-items:center;} .justify-between{justify-content:space-between;}
.gap-2{gap:.5rem;}.gap-3{gap:1rem;}
.grid-2 { display:grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.text-right{text-align:right;}
.page-head { display:flex; align-items:center; justify-content:space-between; margin-bottom: 22px; gap: 16px; flex-wrap: wrap;}
.page-head p { color: var(--text-2); margin: 4px 0 0; }
.empty { text-align:center; padding: 48px 20px; color: var(--text-3); }
.empty svg { width: 46px; height: 46px; opacity:.4; margin-bottom: 12px; }

/* ---------------- Auth / Login ---------------- */
.auth {
  min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr;
}
.auth__aside {
  background: linear-gradient(150deg, var(--brand-700), var(--brand) 55%, var(--accent) 140%);
  color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.auth__aside::after {
  content:''; position:absolute; right:-120px; bottom:-120px;
  width: 380px; height: 380px; border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.auth__brand { display:flex; align-items:center; gap:14px; font-size:1.5rem; font-weight:800; }
.auth__brand .sidebar__logo { width:46px; height:46px; font-size:24px; }
.auth__pitch h1 { color:#fff; font-size: 2.4rem; line-height:1.15; }
.auth__pitch p { color: rgba(255,255,255,.85); font-size:1.05rem; max-width: 440px; }
.auth__features { display:flex; flex-direction:column; gap:14px; margin-top:26px; }
.auth__feature { display:flex; align-items:center; gap:12px; color:rgba(255,255,255,.92); font-weight:500;}
.auth__feature .dot { width:34px;height:34px;border-radius:10px;background:rgba(255,255,255,.15);display:grid;place-items:center;flex-shrink:0;}
.auth__feature svg{width:18px;height:18px;}

.auth__main { display:grid; place-items:center; padding: 40px; }
.auth__form { width: 100%; max-width: 380px; }
.auth__form h2 { font-size:1.7rem; }
.auth__form .muted { margin-bottom: 28px; }

/* ---------------- Modal (dialog) ---------------- */
.modal {
  border: none; border-radius: var(--radius-lg); padding: 0;
  max-width: 640px; width: 94%; box-shadow: var(--shadow-lg); color: var(--text);
}
.modal--wide { max-width: 880px; }
.modal::backdrop { background: rgba(15,23,42,.45); backdrop-filter: blur(2px); }
.modal__foot {
  padding: 16px 22px; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 10px; background: var(--surface-2);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.modal__section-title { color: var(--brand-700); font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing:.04em; margin: 20px 0 12px; }
.modal__section-title:first-child { margin-top: 0; }

/* ---------------- Toolbar / filteri ---------------- */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar .input, .toolbar .select { width: auto; }
.toolbar__search { position: relative; flex: 1; min-width: 200px; max-width: 340px; }
.toolbar__search .input { width: 100%; padding-left: 38px; }
.toolbar__search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--text-3); }
.spacer { flex: 1; }

/* ---------------- Tabs (segmented) ---------------- */
.tabs { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; gap: 2px; }
.tabs a { padding: 7px 14px; border-radius: 8px; font-size: .86rem; font-weight: 600; color: var(--text-2); }
.tabs a:hover { text-decoration: none; color: var(--text); }
.tabs a.is-active { background: var(--surface); color: var(--brand-700); box-shadow: var(--shadow-sm); }

/* ---------------- Progress ---------------- */
.progress { height: 6px; background: var(--border); border-radius: 999px; overflow: hidden; min-width: 80px; }
.progress > span { display: block; height: 100%; background: var(--ok); border-radius: 999px; }

/* ---------------- Stavke fakture (editable) ---------------- */
.stavke { width: 100%; border-collapse: collapse; }
.stavke th { font-size:.72rem; text-transform:uppercase; color:var(--text-2); text-align:left; padding:6px 8px; font-weight:600;}
.stavke td { padding: 4px; }
.stavke .input { padding: 8px 10px; font-size:.86rem; }
.stavke .btn-del { background:var(--danger-soft); color:var(--danger); border:none; border-radius:8px; width:32px;height:32px; cursor:pointer; font-size:1rem;}

/* iznos boje */
.in  { color: var(--ok); font-weight:700; }
.out { color: var(--danger); font-weight:700; }

.dot-cat { display:inline-block; width:8px;height:8px;border-radius:50%;margin-right:6px;vertical-align:middle; }

@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth__aside { display: none; }
  .form-row, .grid-2 { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: -280px; z-index: 100; transition: left .2s; }
  .sidebar.is-open { left: 0; }
}

/* ---------------- Mreža artikala (touch / POS) ---------------- */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 14px; }
.ptile {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; transition: transform .12s, box-shadow .12s; text-align: left;
  display: flex; flex-direction: column; box-shadow: var(--shadow-sm); padding: 0;
}
.ptile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.ptile:active { transform: translateY(0); }
.ptile__top {
  height: 96px; position: relative; display: grid; place-items: center;
  background-size: cover; background-position: center; color: #fff;
}
.ptile__initial { font-size: 2rem; font-weight: 800; opacity: .95; text-shadow: 0 2px 8px rgba(0,0,0,.25); }
.ptile__cat { position: absolute; top: 8px; left: 8px; font-size: .68rem; font-weight: 700;
  background: rgba(0,0,0,.35); color: #fff; padding: 2px 8px; border-radius: 999px; backdrop-filter: blur(4px); }
.ptile__body { padding: 10px 12px; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.ptile__name { font-weight: 700; font-size: .9rem; line-height: 1.2; }
.ptile__price { font-weight: 800; color: var(--brand-700); font-size: 1rem; margin-top: auto; }
.ptile__sub { font-size: .74rem; color: var(--text-3); }
:root[data-theme="dark"] .ptile__price { color: color-mix(in srgb, var(--brand), #fff 30%); }

/* ---------------- POS terminal shell ---------------- */
.kasa-body { background: var(--bg); }
.kasa-top {
  height: 60px; background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; padding: 0 18px;
  position: sticky; top: 0; z-index: 30;
}
.kasa-top__brand { display: flex; align-items: center; gap: 10px; }
.kasa-top__right { display: flex; align-items: center; gap: 10px; }
.kasa-main { padding: 20px; max-width: 1200px; margin: 0 auto; }

/* Aktivacija / PIN centrirani ekran */
.kasa-center { min-height: calc(100vh - 60px); display: grid; place-items: center; padding: 20px; }
.kasa-box { width: 100%; max-width: 360px; text-align: center; }
.kasa-box h2 { font-size: 1.5rem; }

.pin-dots { display: flex; justify-content: center; gap: 12px; margin: 22px 0; height: 18px; }
.pin-dots i { width: 15px; height: 15px; border-radius: 50%; background: var(--border); transition: background .15s; }
.pin-dots i.on { background: var(--brand); }
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pinpad button {
  height: 66px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface);
  font-size: 1.5rem; font-weight: 700; color: var(--text); cursor: pointer; transition: all .1s; font-family: inherit;
}
.pinpad button:hover { background: var(--surface-2); }
.pinpad button:active { transform: scale(.96); background: var(--brand-soft); }
.pinpad button.wide { grid-column: span 1; font-size: 1rem; }

/* ---------------- POS / Kasa ---------------- */
.pos-layout { display: grid; grid-template-columns: 360px 1fr; gap: 18px; align-items: start; }
.pos-cart { position: sticky; top: 84px; display: flex; flex-direction: column; max-height: calc(100vh - 110px); }
.pos-cart__items { flex: 1; overflow-y: auto; padding: 6px 10px; min-height: 120px; }
.pos-cart__foot { padding: 16px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.cart-row { display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 8px; padding: 9px 4px; border-bottom: 1px solid var(--border); }
.cart-row__name { font-weight: 600; font-size: .9rem; }
.cart-row__price { font-size: .76rem; }
.cart-row__qty { display: flex; align-items: center; gap: 6px; }
.cart-row__qty button { width: 28px; height: 28px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 1.1rem; cursor: pointer; line-height: 1; }
.cart-row__qty button:hover { background: var(--brand-soft); }
.cart-row__qty span { min-width: 22px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.cart-row__sum { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 74px; text-align: right; font-size: .88rem; }
.cart-row__del { background: none; border: none; color: var(--text-3); cursor: pointer; font-size: 1.1rem; padding: 0 2px; }
.cart-row__del:hover { color: var(--danger); }
.cart-row__qty span { cursor: pointer; }
.cart-row__act { display: flex; align-items: center; gap: 2px; }
.cart-row__note { background: none; border: none; color: var(--text-3); cursor: pointer; padding: 2px; display: grid; place-items: center; border-radius: 6px; }
.cart-row__note:hover { color: var(--brand-700); background: var(--brand-soft); }
.cart-sent { color: var(--ok); font-size: .6rem; vertical-align: middle; }

.stolovi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px,1fr)); gap: 12px; }
.sto-card {
  position: relative; width: 100%; aspect-ratio: 1.3; border-radius: var(--radius); cursor: pointer;
  border: 2px solid var(--ok); background: var(--ok-soft); color: #166534;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-family: inherit; transition: transform .12s;
}
.sto-card:hover { transform: translateY(-3px); }
.sto-card.is-busy { border-color: var(--warn); background: var(--warn-soft); color: #b45309; }
.sto-card__name { font-weight: 800; font-size: 1.05rem; }
.sto-card__status { font-size: .8rem; font-weight: 600; opacity: .9; }
.sto-card__del { position: absolute; top: 4px; right: 8px; font-size: 1.1rem; opacity: .4; }
.sto-card__del:hover { opacity: 1; color: var(--danger); }
:root[data-theme="dark"] .sto-card { color: #86efac; }
:root[data-theme="dark"] .sto-card.is-busy { color: #fcd34d; }

@media (max-width: 820px) { .pos-layout { grid-template-columns: 1fr; } .pos-cart { position: static; max-height: none; } }

/* ---------------- Mapa lokala (tlocrt) ---------------- */
.floor {
  position: relative; width: 100%; aspect-ratio: 16/9; min-height: 440px;
  border-radius: 20px; border: 1.5px dashed var(--border); overflow: hidden; touch-action: none;
  background:
    radial-gradient(1000px 500px at 50% -20%, color-mix(in srgb, var(--brand) 6%, transparent), transparent 60%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
}
.floor.is-edit { border-color: var(--brand); border-style: solid; background: color-mix(in srgb, var(--brand) 5%, var(--surface)); }
.floor-table {
  position: absolute; transform: translate(-50%,-50%); width: 96px; height: 96px; border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--ok) 50%, var(--border));
  background: linear-gradient(160deg, color-mix(in srgb, var(--ok) 16%, var(--surface)), var(--surface));
  box-shadow: 0 10px 24px -14px color-mix(in srgb, var(--ok) 60%, transparent);
  display: grid; place-items: center; text-align: center; gap: 2px; cursor: pointer; user-select: none;
  transition: transform .12s, box-shadow .12s; color: #166534;
}
.floor-table.is-square { border-radius: 16px; }
.floor-table.is-busy { border-color: color-mix(in srgb, var(--warn) 55%, var(--border));
  background: linear-gradient(160deg, color-mix(in srgb, var(--warn) 18%, var(--surface)), var(--surface));
  box-shadow: 0 10px 24px -14px color-mix(in srgb, var(--warn) 60%, transparent); color: #b45309; }
.floor-table:hover { transform: translate(-50%,-50%) scale(1.05); }
.floor.is-edit .floor-table { cursor: move; }
.floor-table.dragging { box-shadow: var(--shadow-lg); transform: translate(-50%,-50%) scale(1.1); z-index: 6; }
.floor-table__name { font-weight: 800; font-size: 1.02rem; }
.floor-table__st { font-size: .72rem; font-weight: 700; opacity: .9; }
.floor-table__del { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--danger); color: #fff; display: none; place-items: center; box-shadow: var(--shadow); }
.floor.is-edit .floor-table__del { display: grid; }
:root[data-theme="dark"] .floor-table { color: #86efac; }
:root[data-theme="dark"] .floor-table.is-busy { color: #fcd34d; }

/* ============================================================
   POS PREMIUM — cakum pakum redizajn
   ============================================================ */
.kasa-body {
  background:
    radial-gradient(1200px 600px at 100% -10%, color-mix(in srgb, var(--brand) 14%, transparent), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%),
    var(--bg);
  min-height: 100vh;
}
.kasa-top {
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  box-shadow: 0 1px 0 rgba(255,255,255,.03);
}
.kasa-main { padding: 22px; }

/* ---- Layout ---- */
.pos-layout { gap: 22px; }

/* ---- Kategorije kao pilule ---- */
.pos-products .tabs {
  background: transparent; border: none; padding: 0; gap: 8px;
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  display: flex; flex-wrap: nowrap; padding-bottom: 4px;
}
.pos-products .tabs::-webkit-scrollbar { display: none; }
.pos-products .tabs a {
  flex: 0 0 auto; padding: 10px 18px; border-radius: 999px; font-size: .92rem; font-weight: 700;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-2);
  box-shadow: var(--shadow-sm); transition: transform .12s, box-shadow .12s, background .12s, color .12s;
}
.pos-products .tabs a:hover { transform: translateY(-1px); color: var(--text); }
.pos-products .tabs a.is-active {
  background: linear-gradient(135deg, var(--brand), var(--brand-600));
  color: #fff; border-color: transparent;
  box-shadow: 0 8px 20px -6px color-mix(in srgb, var(--brand) 60%, transparent);
}

/* ---- Proizvodi (touch pločice) ---- */
.pos-products .pgrid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.pos-products .ptile {
  border-radius: 18px; border: 1px solid var(--border);
  box-shadow: 0 2px 4px rgba(16,24,40,.04), 0 12px 28px -18px rgba(16,24,40,.5);
  transition: transform .14s cubic-bezier(.2,.8,.2,1), box-shadow .14s;
  position: relative; overflow: hidden; animation: tileIn .35s both;
}
.pos-products .ptile::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: inset 0 0 0 2px transparent; transition: box-shadow .14s; pointer-events: none;
}
.pos-products .ptile:hover { transform: translateY(-4px); box-shadow: 0 4px 8px rgba(16,24,40,.06), 0 22px 40px -20px rgba(16,24,40,.6); }
.pos-products .ptile:active { transform: translateY(-1px) scale(.975); }
.pos-products .ptile:active::after { box-shadow: inset 0 0 0 2px var(--brand); }
.pos-products .ptile__top { height: 92px; position: relative; }
.pos-products .ptile__top::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.28));
}
.pos-products .ptile__body { padding: 11px 13px 13px; }
.pos-products .ptile__name { font-size: .92rem; font-weight: 700; letter-spacing: -.01em; }
.pos-products .ptile__price {
  display: inline-block; margin-top: 6px; padding: 3px 10px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-700); font-weight: 800; font-size: .92rem;
}
:root[data-theme="dark"] .pos-products .ptile__price { background: color-mix(in srgb, var(--brand) 26%, transparent); color: #fff; }
@keyframes tileIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---- Korpa (premium panel) ---- */
.pos-cart {
  border-radius: 20px; border: 1px solid var(--border); overflow: hidden;
  box-shadow: 0 2px 6px rgba(16,24,40,.05), 0 30px 60px -30px rgba(16,24,40,.55);
  top: 90px;
}
.pos-cart .card__head {
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 12%, var(--surface)), var(--surface));
  border-bottom: 1px solid var(--border);
}
.pos-cart__items { padding: 8px 12px; }
.cart-row { padding: 11px 6px; border-bottom: 1px dashed var(--border); animation: rowIn .25s both; }
@keyframes rowIn { from { opacity: 0; transform: translateX(6px); } to { opacity: 1; transform: none; } }
.cart-row__name { font-weight: 700; }
.cart-row__qty button {
  border-radius: 9px; width: 30px; height: 30px; font-weight: 800; border: 1px solid var(--border);
  background: var(--surface-2); transition: transform .1s, background .1s;
}
.cart-row__qty button:hover { background: var(--brand-soft); color: var(--brand-700); }
.cart-row__qty button:active { transform: scale(.9); }
.cart-row__sum { font-weight: 800; }

.pos-cart__foot { padding: 18px; background: linear-gradient(180deg, var(--surface), var(--surface-2)); }
.pos-cart__line { display: flex; align-items: center; justify-content: space-between; font-size: .92rem; color: var(--text-2); margin-bottom: 6px; }
.pos-cart__total { display: flex; align-items: baseline; justify-content: space-between; margin: 10px 0 16px; }
.pos-cart__total span:first-child { font-size: 1rem; font-weight: 700; color: var(--text-2); }
.pos-cart__total .amt {
  font-size: 2rem; font-weight: 900; letter-spacing: -.02em; font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, var(--brand-700), var(--brand)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
:root[data-theme="dark"] .pos-cart__total .amt { background: linear-gradient(135deg, #fff, color-mix(in srgb, var(--brand) 60%, #fff)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.pos-pay { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pos-pay .btn { height: 52px; font-size: 1rem; border-radius: 14px; font-weight: 800; }
.pos-pay__split { grid-column: 1 / -1; height: 56px; font-size: 1.05rem; border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-600)); color: #fff; border: none;
  box-shadow: 0 12px 26px -10px color-mix(in srgb, var(--brand) 65%, transparent); font-weight: 800;
}
.pos-pay__split:active { transform: translateY(1px); }
.pos-cart__total .amt { display: inline-block; }
.pos-cart__total .amt.bump { animation: amtBump .32s cubic-bezier(.2,.8,.2,1); }
@keyframes amtBump { 0%{transform:scale(1)} 35%{transform:scale(1.09)} 100%{transform:scale(1)} }

/* ---- Mapa stolova (gorgeous) ---- */
.stolovi-grid { gap: 14px; }
.sto-card {
  border-radius: 18px; border: 1.5px solid color-mix(in srgb, var(--ok) 45%, var(--border));
  background: linear-gradient(160deg, color-mix(in srgb, var(--ok) 14%, var(--surface)), var(--surface));
  box-shadow: 0 10px 24px -16px color-mix(in srgb, var(--ok) 60%, transparent);
  aspect-ratio: 1.25;
}
.sto-card:hover { transform: translateY(-4px); box-shadow: 0 16px 34px -18px color-mix(in srgb, var(--ok) 70%, transparent); }
.sto-card:active { transform: scale(.97); }
.sto-card.is-busy {
  border-color: color-mix(in srgb, var(--warn) 55%, var(--border));
  background: linear-gradient(160deg, color-mix(in srgb, var(--warn) 18%, var(--surface)), var(--surface));
  box-shadow: 0 10px 24px -14px color-mix(in srgb, var(--warn) 65%, transparent);
}
.sto-card__name { font-size: 1.15rem; font-weight: 900; letter-spacing: -.01em; }
.sto-card__status { font-size: .82rem; font-weight: 700; }

/* ---- PIN / aktivacija (premium lock) ---- */
.kasa-center { min-height: calc(100vh - 60px); }
.kasa-box {
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  border-radius: 24px; padding: 34px 30px; box-shadow: 0 40px 80px -40px rgba(0,0,0,.55);
  max-width: 380px;
}
.kasa-box .sidebar__logo { box-shadow: 0 16px 34px -12px color-mix(in srgb, var(--brand) 60%, transparent); }
.pin-dots i { width: 16px; height: 16px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 25%, transparent); }
.pin-dots i.on { box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--brand) 70%, transparent); transform: scale(1.06); }
.pinpad button {
  height: 70px; border-radius: 18px; font-size: 1.6rem; font-weight: 800;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  box-shadow: 0 8px 18px -12px rgba(0,0,0,.5); transition: transform .08s, background .12s, box-shadow .12s;
}
.pinpad button:active { transform: scale(.92); background: var(--brand-soft); color: var(--brand-700); box-shadow: 0 4px 10px -6px color-mix(in srgb, var(--brand) 60%, transparent); }

/* PIN ekran — levo hero + sat, desno pinpad */
.pin-screen {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 0;
  min-height: calc(100vh - 100px); margin: -20px; border-radius: 0;
  overflow: hidden;
}
.pin-hero {
  background: linear-gradient(150deg, var(--brand-700), var(--brand) 55%, var(--accent) 165%);
  color: #fff; display: flex; flex-direction: column; justify-content: space-between;
  padding: 50px 46px; position: relative; overflow: hidden;
}
.pin-hero::after { content:''; position:absolute; right:-140px; bottom:-140px; width:420px; height:420px; border-radius:50%; background:rgba(255,255,255,.08); }
.pin-hero::before { content:''; position:absolute; left:-90px; top:-90px; width:260px; height:260px; border-radius:50%; background:rgba(255,255,255,.06); }
.pin-hero__top { display:flex; align-items:center; gap:14px; position:relative; z-index:1; }
.pin-hero__logo { width:56px; height:56px; border-radius:15px; object-fit:cover; background:rgba(255,255,255,.2); display:grid; place-items:center; font-weight:800; font-size:26px; }
.pin-hero__name { font-size:1.5rem; font-weight:800; }
.pin-hero__mid { position:relative; z-index:1; }
.pin-clock { font-size:5rem; font-weight:900; letter-spacing:-.03em; line-height:1; font-variant-numeric:tabular-nums; }
.pin-date { font-size:1.15rem; opacity:.9; margin-top:8px; text-transform:capitalize; }
.pin-hero__foot { position:relative; z-index:1; opacity:.7; font-size:.85rem; }
.pin-side { display:grid; place-items:center; padding:40px 30px; background:var(--surface); }
.pin-side__box { width:100%; max-width:300px; text-align:center; }
.kasa-clock { font-weight:700; font-variant-numeric:tabular-nums; color:var(--text-2); font-size:.95rem; }

@media (max-width: 820px) {
  .pin-screen { grid-template-columns: 1fr; min-height:auto; }
  .pin-hero { padding: 28px; }
  .pin-clock { font-size: 3.4rem; }
}

/* ============================================================
   SANK UI KIT — toast, dijalozi, loading/odobreno
   ============================================================ */
.uk-toasts { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 4000; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; width: max-content; max-width: 92vw; }
.uk-toast {
  pointer-events: auto; display: flex; align-items: center; gap: 11px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-radius: 14px; padding: 12px 16px 12px 13px; box-shadow: var(--shadow-lg);
  font-weight: 600; font-size: .92rem; min-width: 260px; max-width: 92vw;
  opacity: 0; transform: translateY(-14px) scale(.96); transition: opacity .28s, transform .28s cubic-bezier(.2,.9,.2,1);
}
.uk-toast.in { opacity: 1; transform: none; }
.uk-toast.out { opacity: 0; transform: translateY(-10px) scale(.98); }
.uk-toast__ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; }
.uk-toast__ic svg { width: 17px; height: 17px; }
.uk-toast--success .uk-toast__ic { background: var(--ok-soft); color: #15803d; }
.uk-toast--error   .uk-toast__ic { background: var(--danger-soft); color: #b91c1c; }
.uk-toast--info    .uk-toast__ic { background: var(--info-soft); color: #1d4ed8; }
:root[data-theme="dark"] .uk-toast--success .uk-toast__ic,
:root[data-theme="dark"] .uk-toast--error .uk-toast__ic,
:root[data-theme="dark"] .uk-toast--info .uk-toast__ic { background: color-mix(in srgb, currentColor 20%, transparent); }

.uk-overlay { position: fixed; inset: 0; z-index: 3900; background: rgba(15,23,42,.5); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); display: grid; place-items: center; padding: 20px; opacity: 0; transition: opacity .2s; }
.uk-overlay.in { opacity: 1; }
.uk-dialog {
  width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 26px 24px 20px; box-shadow: var(--shadow-lg); text-align: center;
  transform: translateY(12px) scale(.96); opacity: 0; transition: transform .24s cubic-bezier(.2,.9,.2,1), opacity .24s;
}
.uk-dialog.in { transform: none; opacity: 1; }
.uk-dialog__ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; margin: 0 auto 14px; }
.uk-dialog__ic svg { width: 30px; height: 30px; }
.uk-dialog__ic.is-brand { background: var(--brand-soft); color: var(--brand-700); }
.uk-dialog__ic.is-danger { background: var(--danger-soft); color: #b91c1c; }
.uk-dialog__title { font-size: 1.2rem; margin: 0 0 6px; }
.uk-dialog__text { color: var(--text-2); margin: 0 0 20px; font-size: .95rem; line-height: 1.5; }
.uk-dialog__input { text-align: left; margin-bottom: 18px; }
.uk-dialog__actions { display: flex; gap: 10px; }
.uk-dialog__actions .btn { flex: 1; height: 46px; justify-content: center; font-weight: 700; }

.uk-overlay--busy { background: rgba(15,23,42,.55); }
.uk-loader { background: var(--surface); border-radius: 22px; padding: 30px 40px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; align-items: center; gap: 16px; min-width: 200px; }
.uk-loader__msg { font-weight: 700; color: var(--text); }
.uk-spinner { width: 48px; height: 48px; border-radius: 50%; border: 4px solid var(--border); border-top-color: var(--brand); animation: ukSpin .7s linear infinite; }
@keyframes ukSpin { to { transform: rotate(360deg); } }

.uk-check { width: 62px; height: 62px; }
.uk-check svg { width: 62px; height: 62px; }
.uk-check__c { stroke: var(--ok); stroke-width: 3; stroke-dasharray: 150; stroke-dashoffset: 150; animation: ukDraw .5s cubic-bezier(.65,0,.45,1) forwards; }
.uk-check__p { stroke: var(--ok); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 48; stroke-dashoffset: 48; animation: ukDraw .35s .45s cubic-bezier(.65,0,.45,1) forwards; }
.uk-check.is-fail { color: var(--danger); display: grid; place-items: center; }
.uk-check.is-fail svg { width: 44px; height: 44px; }
@keyframes ukDraw { to { stroke-dashoffset: 0; } }

/* ---------------- Javni QR meni ---------------- */
.meni { max-width: 640px; margin: 0 auto; padding-bottom: 40px; }
.meni__head {
  display: flex; align-items: center; gap: 14px; padding: 28px 20px 22px;
  background: linear-gradient(140deg, var(--brand-700), var(--brand) 70%, var(--accent) 160%); color: #fff;
  border-radius: 0 0 26px 26px; box-shadow: 0 12px 30px -16px color-mix(in srgb, var(--brand) 70%, transparent);
}
.meni__logo { width: 56px; height: 56px; border-radius: 15px; object-fit: cover; background: #fff; flex-shrink: 0; }
.meni__logo--txt { display: grid; place-items: center; font-weight: 800; font-size: 26px; background: rgba(255,255,255,.18); }
.meni__title { color: #fff; font-size: 1.5rem; margin: 0; }
.meni__sub { color: rgba(255,255,255,.85); font-size: .85rem; }
.meni__sec { padding: 8px 16px; }
.meni__cat { font-size: 1.05rem; color: var(--brand-700); margin: 18px 4px 8px; padding-bottom: 6px; border-bottom: 2px solid var(--brand-soft); }
:root[data-theme="dark"] .meni__cat { color: color-mix(in srgb, var(--brand), #fff 35%); }
.meni__item { display: flex; align-items: center; gap: 14px; padding: 12px 6px; border-bottom: 1px solid var(--border); }
.meni__img { width: 60px; height: 60px; border-radius: 14px; background-size: cover; background-position: center; flex-shrink: 0; box-shadow: var(--shadow-sm); }
.meni__img--c { opacity: .9; }
.meni__info { flex: 1; min-width: 0; }
.meni__name { font-weight: 700; font-size: 1rem; }
.meni__desc { color: var(--text-2); font-size: .84rem; margin-top: 2px; }
.meni__price { font-weight: 800; color: var(--brand-700); font-size: 1.05rem; white-space: nowrap; }
:root[data-theme="dark"] .meni__price { color: color-mix(in srgb, var(--brand), #fff 30%); }
.meni__foot { text-align: center; color: var(--text-3); font-size: .8rem; padding: 26px 16px 10px; }

/* ---------------- Print / PDF ---------------- */
@media print {
  .sidebar, .topbar, .no-print, button, .btn { display: none !important; }
  .app, .main { display: block; }
  .content { padding: 0; max-width: 100%; }
  .print-title { display: block !important; margin-bottom: 16px; }
  body { background: #fff; font-size: 12px; }
  .card, .stat { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
  .stats { display: grid; }
  a { color: #000; text-decoration: none; }
}

/* ============================================================
   WAITER PREMIUM 2.0 — optimizovane teme, dugmad, animacije
   (override sloj — ide POSLE svih ranijih pravila)
   ============================================================ */

/* ---- Optimizovana SVETLA tema ---- */
:root {
  --bg: #f3f5f9;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --border: #e3e8ef;
  --shadow-sm: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.04);
  --shadow: 0 2px 4px rgba(16,24,40,.04), 0 10px 28px -8px rgba(16,24,40,.1);
  --shadow-lg: 0 20px 50px -16px rgba(16,24,40,.22);
}
body {
  background:
    radial-gradient(900px 420px at 85% -10%, color-mix(in srgb, var(--brand) 7%, transparent), transparent 60%),
    var(--bg);
}

/* ---- Optimizovana TAMNA tema ---- */
:root[data-theme="dark"] {
  --bg: #0a0f16;
  --surface: #121a24;
  --surface-2: #0d141d;
  --border: #223041;
  --text: #eef3f8;
  --text-2: #a6b4c2;
  --text-3: #5d6c7c;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow: 0 2px 6px rgba(0,0,0,.35), 0 14px 34px -12px rgba(0,0,0,.55);
  --shadow-lg: 0 26px 60px -18px rgba(0,0,0,.75);
  --brand-soft: color-mix(in srgb, var(--brand) 22%, #0d141d);
  --ok-soft: rgba(22,163,74,.16);
  --danger-soft: rgba(220,38,38,.16);
  --warn-soft: rgba(217,119,6,.16);
  --info-soft: rgba(37,99,235,.16);
  --accent-soft: rgba(245,158,11,.16);
}
:root[data-theme="dark"] body {
  background:
    radial-gradient(900px 420px at 85% -10%, color-mix(in srgb, var(--brand) 10%, transparent), transparent 60%),
    var(--bg);
}
:root[data-theme="dark"] .badge--ok { color:#4ade80; } 
:root[data-theme="dark"] .badge--danger { color:#f87171; }
:root[data-theme="dark"] .badge--warn { color:#fbbf24; }
:root[data-theme="dark"] .badge--info { color:#60a5fa; }
:root[data-theme="dark"] .badge--teal { color: color-mix(in srgb, var(--brand), #fff 45%); }
:root[data-theme="dark"] .badge--muted { background:#1c2836; color:var(--text-2); }
:root[data-theme="dark"] .flash--success { background:rgba(22,163,74,.14); color:#6ee7a0; }
:root[data-theme="dark"] .flash--error { background:rgba(220,38,38,.14); color:#fca5a5; }
:root[data-theme="dark"] .flash--info { background:rgba(37,99,235,.14); color:#93c5fd; }

/* ---- Premium dugmad ---- */
.btn {
  border-radius: 12px;
  transition: transform .14s cubic-bezier(.2,.8,.2,1), box-shadow .14s, background .14s, border-color .14s;
  will-change: transform;
}
.btn--primary {
  background: linear-gradient(140deg, color-mix(in srgb, var(--brand), #fff 10%), var(--brand) 45%, var(--brand-600));
  box-shadow: 0 2px 5px -1px color-mix(in srgb, var(--brand) 55%, transparent),
              0 10px 22px -8px color-mix(in srgb, var(--brand) 65%, transparent),
              inset 0 1px 0 rgba(255,255,255,.22);
}
.btn--primary:hover { transform: translateY(-1.5px);
  box-shadow: 0 4px 8px -2px color-mix(in srgb, var(--brand) 55%, transparent),
              0 16px 30px -10px color-mix(in srgb, var(--brand) 70%, transparent),
              inset 0 1px 0 rgba(255,255,255,.25); }
.btn--primary:active { transform: translateY(0) scale(.98); }
.btn--ghost:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); border-color: color-mix(in srgb, var(--brand) 35%, var(--border)); }
.btn--ghost:active { transform: scale(.98); }
.btn--danger { box-shadow: 0 8px 20px -8px rgba(220,38,38,.5), inset 0 1px 0 rgba(255,255,255,.18); }
.btn:focus-visible, .input:focus-visible, .select:focus-visible, .iconbtn:focus-visible {
  outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 30%, transparent);
}

/* ---- Ulazna animacija sadržaja ---- */
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.content > * { animation: pageIn .34s cubic-bezier(.2,.8,.2,1) both; }
.content > *:nth-child(2) { animation-delay: .04s; }
.content > *:nth-child(3) { animation-delay: .08s; }
.content > *:nth-child(4) { animation-delay: .12s; }
.content > *:nth-child(n+5) { animation-delay: .16s; }
.kasa-main > * { animation: pageIn .3s cubic-bezier(.2,.8,.2,1) both; }

/* ---- Kartice i statovi ---- */
.card { transition: box-shadow .18s, transform .18s; }
.stat { transition: transform .16s, box-shadow .16s; }
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
a.stat:hover { border-color: color-mix(in srgb, var(--brand) 30%, var(--border)); }

/* ---- Sidebar fino ---- */
.nav__item { border-radius: 11px; }
.nav__item svg { transition: transform .15s; }
.nav__item:hover svg { transform: scale(1.12); }
.nav__item.is-active { box-shadow: inset 3px 0 0 var(--side-active), 0 4px 14px -6px color-mix(in srgb, var(--brand) 50%, transparent); }

/* ---- Modali (dialog) animacija ---- */
dialog.modal { opacity: 0; transform: translateY(14px) scale(.97); transition: opacity .2s, transform .2s; }
dialog.modal[open] { opacity: 1; transform: none; animation: pageIn .26s cubic-bezier(.2,.8,.2,1); }
dialog.modal::backdrop { background: rgba(10,15,22,.5); backdrop-filter: blur(3px); }
:root[data-theme="dark"] dialog.modal { background: var(--surface); color: var(--text); border: 1px solid var(--border); }

/* ---- Tabele ---- */
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: color-mix(in srgb, var(--brand) 4%, var(--surface-2)); }

/* ---- Inputi ---- */
.input, .select { border-radius: 11px; transition: border-color .15s, box-shadow .15s, background .15s; }
.input:hover, .select:hover { border-color: color-mix(in srgb, var(--brand) 25%, var(--border)); }

/* ---- Scrollbar (WebKit) ---- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--text-3) 40%, transparent); border-radius: 99px; border: 2.5px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--brand) 55%, transparent); }

/* ---- Selekcija teksta ---- */
::selection { background: color-mix(in srgb, var(--brand) 28%, transparent); }

/* ---- Toolbar tabovi fino ---- */
.tabs a { transition: background .14s, color .14s, box-shadow .14s, transform .12s; }
.tabs a:active { transform: scale(.97); }

/* ---- KDS (kuhinjski ekran) ---- */
.kds { max-width: 1400px; margin: 0 auto; }
.kds__head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.kds__head h1 { margin: 0; font-size: 1.3rem; display: flex; align-items: center; gap: 10px; }
.kds__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 16px; }
.kds-card {
  background: var(--surface); border: 1.5px solid var(--border); border-radius: 18px;
  overflow: hidden; box-shadow: var(--shadow-sm); animation: pageIn .3s both;
}
.kds-card__head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; font-size: 1.05rem;
  background: color-mix(in srgb, var(--brand) 10%, var(--surface)); border-bottom: 1px solid var(--border);
}
.kds-card__time { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text-2); }
.kds-card.is-warn { border-color: var(--warn); }
.kds-card.is-warn .kds-card__head { background: var(--warn-soft); }
.kds-card.is-warn .kds-card__time { color: #b45309; }
.kds-card.is-late { border-color: var(--danger); animation: kdsPulse 1.6s infinite; }
.kds-card.is-late .kds-card__head { background: var(--danger-soft); }
.kds-card.is-late .kds-card__time { color: #b91c1c; }
@keyframes kdsPulse { 0%,100%{box-shadow:0 0 0 0 rgba(220,38,38,.28)} 50%{box-shadow:0 0 0 7px rgba(220,38,38,0)} }
.kds-item { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px dashed var(--border); }
.kds-item:last-child { border-bottom: none; }
.kds-item__txt { flex: 1; font-weight: 700; font-size: 1.06rem; }
.kds-item__qty { color: var(--brand-700); font-weight: 800; }
:root[data-theme="dark"] .kds-item__qty { color: color-mix(in srgb, var(--brand), #fff 35%); }
.kds-item__note { font-size: .86rem; font-weight: 600; color: var(--warn); margin-top: 2px; }
.kds-item__done {
  border: none; border-radius: 11px; padding: 10px 16px; font-weight: 800; cursor: pointer; font-family: inherit;
  background: linear-gradient(140deg, var(--ok), #15803d); color: #fff;
  box-shadow: 0 8px 18px -8px rgba(22,163,74,.6); transition: transform .12s;
}
.kds-item__done:active { transform: scale(.94); }

/* ---- Waiter brend slike (logo + pozadine) ---- */
.only-dark { display: none !important; }
:root[data-theme="dark"] .only-dark { display: inline-block !important; }
:root[data-theme="dark"] .only-light { display: none !important; }

.brand-full { height: 34px; width: auto; display: block; }
.brand-glyph { height: 60px; width: auto; }

/* BO login — leva strana sa bo_bg fotkom */
.auth__aside {
  background:
    linear-gradient(165deg, rgba(24,15,9,.88), rgba(24,15,9,.55) 45%, rgba(90,45,15,.35)),
    url('/img/bo_bg.png') center/cover no-repeat;
}
.auth__aside::after, .auth__aside::before { display: none; }
.auth__logo { height: 52px; width: auto; }
.auth__main {
  background:
    radial-gradient(700px 400px at 100% 0%, color-mix(in srgb, var(--brand) 8%, transparent), transparent 60%),
    var(--surface);
}

/* POS lock ekran — pos_bg fotka iza hero panela */
.pin-hero {
  background:
    linear-gradient(120deg, rgba(18,11,7,.72), rgba(18,11,7,.35) 55%, rgba(18,11,7,.55)),
    url('/img/pos_bg.png') center/cover no-repeat;
}
.pin-hero::before, .pin-hero::after { display: none; }
.pin-hero__top { justify-content: flex-end; }
.pin-hero__lokal {
  display: inline-flex; align-items: center; gap: 9px;
  background: rgba(0,0,0,.4); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.16); border-radius: 999px; padding: 8px 16px;
  font-weight: 700; color: #fff;
}
.pin-hero__lokal img { width: 26px; height: 26px; border-radius: 7px; object-fit: cover; background: #fff; }
.pin-clock { text-shadow: 0 4px 24px rgba(0,0,0,.5); }
.pin-date { text-shadow: 0 2px 12px rgba(0,0,0,.5); }
.pin-hero__foot { opacity: .85; text-shadow: 0 2px 8px rgba(0,0,0,.6); }
.pin-side {
  background:
    radial-gradient(500px 300px at 50% 0%, color-mix(in srgb, var(--brand) 7%, transparent), transparent 70%),
    var(--surface);
}

/* Sidebar — Waiter full logo za administraciju */
.sidebar__brandimg { height: 30px; width: auto; display: block; }

/* ---- POS LOCK — čist full screen (samo bg + sat + pinpad levo) ---- */
.pin-lock {
  position: fixed; inset: 0; z-index: 60;
  background: url('/img/pos_bg.png') center/cover no-repeat #15100c;
}
.pin-lock__col {
  position: absolute; left: 33vw; top: 28vh; transform: translateX(-50%);
  width: min(330px, 86vw);
  display: flex; flex-direction: column; gap: 20px;
}
.pin-lock__clock {
  font-size: clamp(3rem, 6vw, 4.6rem); font-weight: 900; letter-spacing: -.03em;
  line-height: 1; color: #fff; font-variant-numeric: tabular-nums;
  text-shadow: 0 4px 28px rgba(0,0,0,.65); text-align: center;
}
.pin-lock__date { color: rgba(255,255,255,.82); font-size: 1.05rem; margin-top: 6px; text-transform: capitalize; text-shadow: 0 2px 12px rgba(0,0,0,.6); text-align: center; }
.pin-dots--left { justify-content: center; margin: 0; }
.pin-dots--left i { background: rgba(255,255,255,.28); box-shadow: none; }
.pin-dots--left i.on { background: #fff; box-shadow: 0 0 14px rgba(255,255,255,.55); }
.pinpad--glass button {
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.18);
  color: #fff; height: 64px; font-size: 1.45rem;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 20px -10px rgba(0,0,0,.6);
}
.pinpad--glass button:hover { background: rgba(255,255,255,.16); }
.pinpad--glass button:active { transform: scale(.93); background: color-mix(in srgb, var(--brand) 55%, rgba(255,255,255,.15)); color: #fff; }
@media (max-width: 700px) {
  .pin-lock { background-position: 30% center; }
  .pin-lock__col { top: 24vh; left: 50%; transform: translateX(-50%); align-items: center; }
  .pin-lock__clock { text-align: center; }
  .pin-dots--left { justify-content: center; }
}

/* ---- Šarene sekcije i brze akcije (manje monotono, i dalje logično) ---- */
.nav__dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 7px; vertical-align: middle; opacity: .9; }
.page-head h1 { position: relative; padding-bottom: 8px; }
.page-head h1::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 46px; height: 4px; border-radius: 99px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}
.qa-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.qa-tile {
  display: flex; align-items: center; gap: 11px; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 15px;
  font-weight: 700; color: var(--text); text-decoration: none; box-shadow: var(--shadow-sm);
  transition: transform .14s, box-shadow .14s, border-color .14s;
}
.qa-tile:hover { transform: translateY(-3px); text-decoration: none; box-shadow: var(--shadow);
  border-color: color-mix(in srgb, var(--qa) 45%, var(--border)); }
.qa-tile:active { transform: scale(.97); }
.qa-tile__ic {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0;
  background: color-mix(in srgb, var(--qa) 15%, var(--surface)); color: var(--qa);
}
.qa-tile__ic svg { width: 20px; height: 20px; }
:root[data-theme="dark"] .qa-tile__ic { background: color-mix(in srgb, var(--qa) 24%, var(--surface)); }

/* ---- Offline indikator ---- */
.net-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px color-mix(in srgb, var(--ok) 60%, transparent); }
.net-dot.off { background: var(--danger); box-shadow: 0 0 8px rgba(220,38,38,.6); animation: netBlink 1.2s infinite; }
@keyframes netBlink { 50% { opacity: .35; } }

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
