/* ==========================================================================
   Radno Vreme – dizajn sistem
   Svetla i tamna tema, prilagođeno telefonu, štampi i kiosku.
   ========================================================================== */

:root {
  color-scheme: light;
  --bg: #f4f5fa;
  --bg-tint: radial-gradient(1200px 520px at 100% -10%, rgba(99, 102, 241, .07), transparent 60%), radial-gradient(900px 420px at -10% 0%, rgba(168, 85, 247, .05), transparent 60%);
  --surface: #ffffff;
  --surface-2: #f7f8fc;
  --surface-3: #eff1f7;
  --glass: rgba(255, 255, 255, .72);
  --border: #e6e8f0;
  --border-strong: #d5d9e5;
  --text: #0d0f1e;
  --text-2: #3b3f57;
  --muted: #6b7088;
  --faint: #9a9eb4;

  --primary: #5b4ff5;
  --primary-2: #8b5cf6;
  --primary-hover: #4b3fe6;
  --primary-soft: #efeefe;
  --primary-text: #4a3fd9;
  --ring: rgba(91, 79, 245, .28);
  --grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 55%, #a855f7 100%);

  --success: #10b981;
  --success-soft: #e8f8f1;
  --success-text: #047857;
  --warning: #f59e0b;
  --warning-soft: #fef5e4;
  --warning-text: #b45309;
  --danger: #f43f5e;
  --danger-soft: #feecef;
  --danger-text: #be123c;
  --info: #0ea5e9;
  --info-soft: #e6f5fd;
  --info-text: #0369a1;

  --row-flag: #fffaf0;
  --row-block: #fff5f6;

  --sidebar-bg: #0b0c14;
  --sidebar-2: #12131f;
  --sidebar-text: #a4a8c3;
  --sidebar-border: rgba(255, 255, 255, .07);

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --shadow-xs: 0 1px 2px rgba(16, 18, 40, .05);
  --shadow-sm: 0 1px 2px rgba(16, 18, 40, .04), 0 2px 6px rgba(16, 18, 40, .04);
  --shadow: 0 1px 2px rgba(16, 18, 40, .04), 0 6px 20px -4px rgba(16, 18, 40, .07);
  --shadow-lg: 0 2px 6px rgba(16, 18, 40, .05), 0 24px 48px -12px rgba(16, 18, 40, .18);
  --shadow-primary: 0 1px 1px rgba(255, 255, 255, .25) inset, 0 6px 16px -4px rgba(91, 79, 245, .55);

  --font: "Inter Variable", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Plus Jakarta Sans Variable", "Inter Variable", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #08090f;
  --bg-tint: radial-gradient(1200px 520px at 100% -10%, rgba(99, 102, 241, .10), transparent 60%), radial-gradient(900px 420px at -10% 0%, rgba(168, 85, 247, .07), transparent 60%);
  --surface: #11131d;
  --surface-2: #161925;
  --surface-3: #1d2130;
  --glass: rgba(17, 19, 29, .72);
  --border: #232738;
  --border-strong: #2f3448;
  --text: #eceef8;
  --text-2: #c4c7da;
  --muted: #8d91ab;
  --faint: #62667f;
  --primary: #7c72ff;
  --primary-2: #a78bfa;
  --primary-hover: #8d84ff;
  --primary-soft: rgba(124, 114, 255, .14);
  --primary-text: #b3acff;
  --ring: rgba(124, 114, 255, .38);
  --success: #34d399;
  --success-soft: rgba(52, 211, 153, .12);
  --success-text: #6ee7b7;
  --warning: #fbbf24;
  --warning-soft: rgba(251, 191, 36, .12);
  --warning-text: #fcd34d;
  --danger: #fb7185;
  --danger-soft: rgba(251, 113, 133, .12);
  --danger-text: #fda4af;
  --info: #38bdf8;
  --info-soft: rgba(56, 189, 248, .12);
  --info-text: #7dd3fc;
  --row-flag: rgba(251, 191, 36, .05);
  --row-block: rgba(251, 113, 133, .06);
  --sidebar-bg: #07080d;
  --sidebar-2: #0f111a;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px -6px rgba(0, 0, 0, .5);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .4), 0 24px 60px -12px rgba(0, 0, 0, .7);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #08090f;
    --bg-tint: radial-gradient(1200px 520px at 100% -10%, rgba(99, 102, 241, .10), transparent 60%), radial-gradient(900px 420px at -10% 0%, rgba(168, 85, 247, .07), transparent 60%);
    --surface: #11131d;
    --surface-2: #161925;
    --surface-3: #1d2130;
    --glass: rgba(17, 19, 29, .72);
    --border: #232738;
    --border-strong: #2f3448;
    --text: #eceef8;
    --text-2: #c4c7da;
    --muted: #8d91ab;
    --faint: #62667f;
    --primary: #7c72ff;
    --primary-2: #a78bfa;
    --primary-hover: #8d84ff;
    --primary-soft: rgba(124, 114, 255, .14);
    --primary-text: #b3acff;
    --ring: rgba(124, 114, 255, .38);
    --success: #34d399;
    --success-soft: rgba(52, 211, 153, .12);
    --success-text: #6ee7b7;
    --warning: #fbbf24;
    --warning-soft: rgba(251, 191, 36, .12);
    --warning-text: #fcd34d;
    --danger: #fb7185;
    --danger-soft: rgba(251, 113, 133, .12);
    --danger-text: #fda4af;
    --info: #38bdf8;
    --info-soft: rgba(56, 189, 248, .12);
    --info-text: #7dd3fc;
    --row-flag: rgba(251, 191, 36, .05);
    --row-block: rgba(251, 113, 133, .06);
    --sidebar-bg: #07080d;
    --sidebar-2: #0f111a;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px -6px rgba(0, 0, 0, .5);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, .4), 0 24px 60px -12px rgba(0, 0, 0, .7);
  }
}

/* ---------- Osnova ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font); font-size: 14.5px; line-height: 1.55; color: var(--text);
  background: var(--bg-tint), var(--bg); background-attachment: fixed;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01", "ss03";
}
::selection { background: var(--primary-soft); color: var(--primary-text); }
a { color: var(--primary-text); text-decoration: none; transition: color .15s; }
a:hover { color: var(--primary); }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.2; font-family: var(--font-display); color: var(--text); }
h1 { font-size: 1.75rem; font-weight: 750; letter-spacing: -.025em; }
h2 { font-size: 1.08rem; font-weight: 700; letter-spacing: -.012em; }
h3 { font-size: .98rem; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 .75rem; }
small, .muted { color: var(--muted); }
.faint { color: var(--faint); }
b, strong { font-weight: 650; }
.icon { width: 18px; height: 18px; flex-shrink: 0; vertical-align: -3.5px; }
.icon.sm { width: 15px; height: 15px; vertical-align: -2.5px; }
.icon.lg { width: 24px; height: 24px; }
.icon.xl { width: 44px; height: 44px; }
code, .mono { font-family: var(--mono); font-size: .86em; }
code { background: var(--surface-3); padding: .1em .4em; border-radius: 6px; color: var(--text-2); }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.25rem 0; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
.tnum { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ==========================================================================
   Raspored aplikacije (vlasnik / admin)
   ========================================================================== */
.app { display: flex; min-height: 100vh; min-height: 100dvh; }

.sidebar {
  width: 268px; flex-shrink: 0; position: sticky; top: 0; height: 100vh; height: 100dvh;
  display: flex; flex-direction: column; color: var(--sidebar-text);
  background:
    radial-gradient(420px 260px at 0% 0%, rgba(99, 102, 241, .22), transparent 70%),
    radial-gradient(360px 300px at 100% 100%, rgba(168, 85, 247, .12), transparent 70%),
    linear-gradient(180deg, var(--sidebar-2), var(--sidebar-bg));
  border-right: 1px solid var(--sidebar-border);
  z-index: 60;
}
.brand { display: flex; align-items: center; gap: .75rem; padding: 1.3rem 1.25rem 1.1rem; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.logo {
  width: 36px; height: 36px; border-radius: 11px; color: #fff; display: grid; place-items: center; flex-shrink: 0; position: relative; overflow: hidden;
  background: radial-gradient(120% 90% at 20% 0%, rgba(255, 255, 255, .34), transparent 55%), linear-gradient(140deg, #4f46e5 0%, #7c3aed 55%, #c026d3 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .4) inset, 0 -2px 6px rgba(0, 0, 0, .16) inset, 0 8px 20px -6px rgba(124, 58, 237, .75);
}
.logo .icon { width: 23px; height: 23px; }
.logo.lg { width: 52px; height: 52px; border-radius: 15px; }
.logo.lg .icon { width: 32px; height: 32px; }
.bn-accent { background: linear-gradient(120deg, #6366f1, #a855f7 60%, #d946ef); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sidebar .bn-accent, .m-head .bn-accent, .kiosk .bn-accent { background-image: linear-gradient(120deg, #a5b4fc, #d8b4fe 60%, #f0abfc); }
:root[data-theme="dark"] .bn-accent { background-image: linear-gradient(120deg, #a5b4fc, #d8b4fe 60%, #f0abfc); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bn-accent { background-image: linear-gradient(120deg, #a5b4fc, #d8b4fe 60%, #f0abfc); } }
.brand-name { font-family: var(--font-display); font-weight: 750; font-size: 1.06rem; letter-spacing: -.02em; line-height: 1.15; }
.brand-sub { display: block; font-weight: 500; color: #7f839f; font-size: .76rem; letter-spacing: 0; margin-top: 1px; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nav { padding: .5rem .8rem 1rem; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; scrollbar-width: thin; scrollbar-color: #2a2d40 transparent; }
.nav a {
  position: relative; display: flex; align-items: center; gap: .75rem; padding: .56rem .8rem; border-radius: 10px;
  color: var(--sidebar-text); font-weight: 520; font-size: .9rem; transition: background .15s, color .15s;
}
.nav a .icon { width: 18px; height: 18px; opacity: .85; transition: opacity .15s, transform .2s var(--spring); }
.nav a:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.nav a:hover .icon { opacity: 1; transform: scale(1.06); }
.nav a.active { color: #fff; background: linear-gradient(90deg, rgba(124, 114, 255, .26), rgba(124, 114, 255, .08)); box-shadow: inset 0 0 0 1px rgba(139, 132, 255, .22); }
.nav a.active .icon { opacity: 1; color: #c7c2ff; }
.nav a.active::before { content: ""; position: absolute; left: -.8rem; top: 22%; bottom: 22%; width: 3px; border-radius: 0 3px 3px 0; background: linear-gradient(180deg, #8b84ff, #c084fc); box-shadow: 0 0 12px #8b84ff; }
.nav .badge { margin-left: auto; }
.nav-section { padding: 1.1rem .8rem .35rem; font-size: .67rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: #5d6180; }

.sidebar-foot { padding: .85rem; border-top: 1px solid var(--sidebar-border); }
.me { display: flex; align-items: center; gap: .65rem; padding: .55rem; border-radius: 12px; background: rgba(255, 255, 255, .035); border: 1px solid var(--sidebar-border); }
.me .avatar { width: 34px; height: 34px; font-size: .78rem; }
.me .who { color: #fff; font-weight: 600; font-size: .86rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me .mail { color: #7f839f; font-size: .74rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me > div { min-width: 0; flex: 1; }
.icon-btn {
  width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 10px; border: 0; background: transparent;
  color: inherit; cursor: pointer; transition: background .15s, color .15s, transform .15s; flex-shrink: 0; position: relative; padding: 0;
}
.icon-btn:hover { background: rgba(127, 131, 159, .14); }
.icon-btn:active { transform: scale(.94); }
.sidebar .icon-btn { color: #8a8eab; }
.sidebar .icon-btn:hover { color: #fff; background: rgba(255, 255, 255, .07); }

.theme-switch { display: flex; gap: 2px; padding: 3px; border-radius: 11px; background: rgba(255, 255, 255, .04); border: 1px solid var(--sidebar-border); margin-top: .6rem; }
.theme-switch button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: .35rem; padding: .35rem; border: 0; border-radius: 8px; background: transparent; color: #7f839f; font: inherit; font-size: .75rem; font-weight: 550; cursor: pointer; transition: all .15s; }
.theme-switch button .icon { width: 14px; height: 14px; }
.theme-switch button:hover { color: #fff; }
.theme-switch button.on { background: rgba(255, 255, 255, .09); color: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: .75rem;
  padding: .7rem 2.25rem; min-height: 60px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.topbar .crumbs { display: flex; align-items: center; gap: .45rem; font-size: .86rem; color: var(--muted); min-width: 0; }
.topbar .crumbs b { color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .crumbs .icon { width: 14px; height: 14px; color: var(--faint); }
.topbar .spacer { flex: 1; }
.topbar .live-clock { font-variant-numeric: tabular-nums; font-weight: 600; font-size: .86rem; color: var(--text-2); padding: .32rem .7rem; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); display: inline-flex; align-items: center; gap: .45rem; box-shadow: var(--shadow-xs); }
.topbar .live-clock .pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 0 var(--success); animation: pulse 2s infinite; }
.topbar .icon-btn { color: var(--text-2); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-xs); }
.topbar .icon-btn:hover { background: var(--surface-2); color: var(--text); }
.topbar .icon-btn .badge.count { position: absolute; top: -6px; right: -6px; }
.topbar .mobile-only { display: none; }
.topbar .brand-mini { display: none; align-items: center; gap: .55rem; font-family: var(--font-display); font-weight: 750; color: var(--text); letter-spacing: -.02em; }
.topbar .brand-mini .logo { width: 30px; height: 30px; border-radius: 9px; }
.topbar .brand-mini .logo .icon { width: 18px; height: 18px; }

.content { padding: 1.6rem 2rem 4rem; width: 100%; animation: fadeUp .45s var(--ease) both; }
/* kartice srodnih stranica (npr. Evidencija: Dolasci | Skeniranja | Zahtevi | Upozorenja) */
.page-tabs {
  display: flex; gap: .25rem; padding: .3rem; margin: 0 0 1.5rem; width: max-content; max-width: 100%; overflow-x: auto; scrollbar-width: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: 15px; box-shadow: var(--shadow-xs);
}
.page-tabs::-webkit-scrollbar { display: none; }
.page-tabs a {
  position: relative; display: inline-flex; align-items: center; gap: .5rem; padding: .55rem 1rem; border-radius: 11px; white-space: nowrap;
  color: var(--muted); font-weight: 600; font-size: .88rem; transition: color .15s, background .15s;
}
.page-tabs a .icon { width: 17px; height: 17px; }
.page-tabs a:hover { color: var(--text); background: var(--surface-2); }
.page-tabs a.on { color: #fff; background: var(--grad); box-shadow: var(--shadow-primary); }
.page-tabs a.on .badge.count { background: #fff; color: var(--primary-text); }
.page-tabs .badge { margin-left: .1rem; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem 1.5rem; margin-bottom: 1.6rem; flex-wrap: wrap; }
.page-head > div:first-child { min-width: 0; }
.page-head .actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.page-head p { margin: .35rem 0 0; color: var(--muted); font-size: .94rem; }
.page-head h1 { margin: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: .4rem; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--primary-text); margin-bottom: .45rem; }
.eyebrow .icon { width: 14px; height: 14px; }
.backdrop { display: none; }
.bottom-nav { display: none; }

@media (max-width: 960px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-104%); transition: transform .32s var(--ease); box-shadow: 0 0 60px rgba(0, 0, 0, .45); }
  .sidebar.open { transform: none; }
  .backdrop { display: block; position: fixed; inset: 0; background: rgba(5, 6, 12, .5); backdrop-filter: blur(3px); z-index: 55; opacity: 0; pointer-events: none; transition: opacity .3s; }
  .backdrop.show { opacity: 1; pointer-events: auto; }
  .topbar { padding: .6rem 1rem; padding-top: max(.6rem, env(safe-area-inset-top)); }
  .topbar .mobile-only { display: inline-grid; }
  .topbar .brand-mini { display: inline-flex; }
  .topbar .crumbs, .topbar .live-clock { display: none; }
  .content { padding: 1.1rem 1rem 6.5rem; }
  .page-tabs { width: 100%; margin-bottom: 1.1rem; }
  .page-tabs a { padding: .5rem .8rem; }
  h1 { font-size: 1.45rem; }
  .page-head { margin-bottom: 1.2rem; align-items: flex-start; }
  .page-head .actions { width: 100%; }
  .bottom-nav {
    display: flex; position: fixed; left: .6rem; right: .6rem; bottom: max(.6rem, env(safe-area-inset-bottom)); z-index: 45;
    background: var(--glass); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px);
    border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-lg); padding: .35rem;
  }
  .bottom-nav a, .bottom-nav button {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: .45rem .2rem .4rem; border-radius: 14px;
    color: var(--muted); font-size: .66rem; font-weight: 600; background: none; border: 0; font-family: inherit; cursor: pointer; position: relative;
  }
  .bottom-nav .icon { width: 21px; height: 21px; }
  .bottom-nav a.active { color: var(--primary-text); background: var(--primary-soft); }
  .bottom-nav .badge.count { position: absolute; top: 2px; left: calc(50% + 5px); }
}

/* ==========================================================================
   Komponente
   ========================================================================== */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow); padding: 1.35rem 1.4rem; margin-bottom: 1.25rem; position: relative;
}
.card > h2:first-child, .card > h3:first-child { margin-bottom: 1rem; }
.card h2 .icon, .card h3 .icon { color: var(--primary-text); margin-right: .15rem; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; margin-bottom: 1rem; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; display: flex; align-items: center; gap: .5rem; }
.card-head .sub { font-size: .82rem; color: var(--muted); margin-top: .15rem; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush > .card-head { padding: 1.1rem 1.4rem .95rem; margin: 0; border-bottom: 1px solid var(--border); }
.card.soft { background: var(--surface-2); box-shadow: none; }
.card.danger-zone { border-color: color-mix(in srgb, var(--danger) 30%, var(--border)); background: linear-gradient(180deg, color-mix(in srgb, var(--danger-soft) 60%, var(--surface)), var(--surface)); }
.card.danger-zone h3 { color: var(--danger-text); }
.card.hero {
  border: 0; color: #fff; overflow: hidden; isolation: isolate;
  background: radial-gradient(500px 240px at 90% -20%, rgba(255, 255, 255, .22), transparent 60%), var(--grad);
  box-shadow: 0 20px 40px -18px rgba(91, 79, 245, .7);
}
.card.hero h2, .card.hero h3 { color: #fff; }
.card.hero .muted { color: rgba(255, 255, 255, .78); }
.card-title-ico { width: 34px; height: 34px; border-radius: 10px; display: inline-grid; place-items: center; background: var(--primary-soft); color: var(--primary-text); flex-shrink: 0; }
.card-title-ico .icon { width: 18px; height: 18px; margin: 0 !important; }
.sticky-side { position: sticky; top: 76px; }

.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-side { grid-template-columns: minmax(0, 1.9fr) minmax(300px, 1fr); align-items: start; }
.stats { margin-bottom: 1.4rem; }
@media (max-width: 1180px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-side { grid-template-columns: 1fr; } .sticky-side { position: static; } }
@media (max-width: 720px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .grid-4 { grid-template-columns: 1fr 1fr; gap: .7rem; } .grid { gap: .9rem; } }

/* ---------- Statistika ---------- */
.stat {
  --tone: var(--primary); --tone-soft: var(--primary-soft); --tone-text: var(--primary-text);
  position: relative; overflow: hidden; display: block; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 1.1rem 1.2rem 1.15rem; box-shadow: var(--shadow); transition: transform .25s var(--ease), box-shadow .25s, border-color .2s;
}
.stat::after { content: ""; position: absolute; right: -40px; top: -40px; width: 130px; height: 130px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--tone) 16%, transparent), transparent 70%); pointer-events: none; }
a.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--tone) 35%, var(--border)); color: var(--text); }
.stat-top { display: flex; align-items: center; gap: .6rem; }
.stat-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--tone-soft); color: var(--tone-text); flex-shrink: 0; }
.stat-ico .icon { width: 18px; height: 18px; }
.stat .label { color: var(--muted); font-size: .8rem; font-weight: 600; line-height: 1.25; }
.stat .value { font-family: var(--font-display); font-size: 1.95rem; font-weight: 750; letter-spacing: -.035em; margin-top: .7rem; line-height: 1.05; font-variant-numeric: tabular-nums; }
.stat .value.md { font-size: 1.4rem; letter-spacing: -.025em; }
.stat .value small { font-size: .55em; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.stat .sub { font-size: .78rem; color: var(--muted); margin-top: .35rem; }
.stat.success { --tone: var(--success); --tone-soft: var(--success-soft); --tone-text: var(--success-text); }
.stat.warning { --tone: var(--warning); --tone-soft: var(--warning-soft); --tone-text: var(--warning-text); }
.stat.danger { --tone: var(--danger); --tone-soft: var(--danger-soft); --tone-text: var(--danger-text); }
.stat.info { --tone: var(--info); --tone-soft: var(--info-soft); --tone-text: var(--info-text); }
.stat.alarm { border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.stat.alarm .value { color: var(--danger-text); }
@media (max-width: 520px) { .stat { padding: .9rem .95rem; } .stat .value { font-size: 1.55rem; margin-top: .55rem; } .stat .value.md { font-size: 1.12rem; } .stat-ico { width: 30px; height: 30px; } }

/* ---------- Dugmad ---------- */
.btn {
  --b-bg: var(--surface); --b-fg: var(--text); --b-bd: var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .56rem 1rem; min-height: 38px;
  border-radius: 10px; border: 1px solid var(--b-bd); background: var(--b-bg); color: var(--b-fg);
  font: inherit; font-weight: 600; font-size: .88rem; line-height: 1.2; cursor: pointer; white-space: nowrap; user-select: none;
  box-shadow: var(--shadow-xs); transition: background .15s, border-color .15s, box-shadow .2s, transform .12s, color .15s;
  -webkit-tap-highlight-color: transparent; text-decoration: none;
}
.btn:hover { background: var(--surface-2); border-color: var(--border-strong); color: var(--b-fg); }
.btn:active { transform: translateY(1px) scale(.985); }
.btn:focus-visible { outline: 0; box-shadow: 0 0 0 4px var(--ring); }
.btn .icon { width: 17px; height: 17px; }
.btn.primary { --b-fg: #fff; --b-bd: transparent; background: var(--grad); box-shadow: var(--shadow-primary); }
.btn.primary:hover { filter: brightness(1.07) saturate(1.05); color: #fff; }
.btn.success { --b-fg: #fff; --b-bd: transparent; background: linear-gradient(135deg, #10b981, #059669); box-shadow: 0 1px 1px rgba(255, 255, 255, .25) inset, 0 6px 16px -4px rgba(16, 185, 129, .5); }
.btn.success:hover { filter: brightness(1.06); color: #fff; }
.btn.danger { --b-fg: #fff; --b-bd: transparent; background: linear-gradient(135deg, #f43f5e, #e11d48); box-shadow: 0 1px 1px rgba(255, 255, 255, .2) inset, 0 6px 16px -4px rgba(244, 63, 94, .5); }
.btn.danger:hover { filter: brightness(1.06); color: #fff; }
.btn.danger-ghost { --b-fg: var(--danger-text); }
.btn.danger-ghost:hover { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.btn.ghost { --b-bg: transparent; --b-bd: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--surface-3); }
.btn.soft { --b-bg: var(--primary-soft); --b-fg: var(--primary-text); --b-bd: transparent; box-shadow: none; }
.btn.soft:hover { background: color-mix(in srgb, var(--primary) 18%, transparent); color: var(--primary-text); }
.btn.sm { padding: .32rem .65rem; min-height: 30px; font-size: .8rem; border-radius: 8px; gap: .35rem; }
.btn.sm .icon { width: 15px; height: 15px; }
.btn.lg { padding: .85rem 1.4rem; min-height: 50px; font-size: 1rem; border-radius: 14px; }
.btn.xl { padding: 1.05rem 1.5rem; min-height: 60px; font-size: 1.06rem; border-radius: 18px; font-weight: 700; }
.btn.lg .icon, .btn.xl .icon { width: 20px; height: 20px; }
.btn.block { width: 100%; }
.btn.icon-only { padding: 0; width: 38px; }
.btn.sm.icon-only { width: 30px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; filter: grayscale(.3); }
.btn.loading { pointer-events: none; }
.btn.loading::after { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.btn-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
form.inline { display: inline; }

/* ---------- Oznake ---------- */
.badge {
  --t: var(--muted); --ts: var(--surface-3);
  display: inline-flex; align-items: center; gap: .32rem; padding: .17rem .6rem; border-radius: 99px;
  font-size: .73rem; font-weight: 650; line-height: 1.45; white-space: nowrap; background: var(--ts); color: var(--t);
  border: 1px solid color-mix(in srgb, var(--t) 14%, transparent);
}
.badge .icon { width: 13px; height: 13px; stroke-width: 2.4; }
.badge.success { --t: var(--success-text); --ts: var(--success-soft); }
.badge.warning { --t: var(--warning-text); --ts: var(--warning-soft); }
.badge.danger { --t: var(--danger-text); --ts: var(--danger-soft); }
.badge.info { --t: var(--info-text); --ts: var(--info-soft); }
.badge.primary { --t: var(--primary-text); --ts: var(--primary-soft); }
.badge.solid { background: var(--t); color: #fff; border: 0; }
.badge.count { background: linear-gradient(135deg, #fb7185, #e11d48); color: #fff; border: 0; min-width: 19px; height: 19px; padding: 0 .38rem; justify-content: center; font-size: .68rem; box-shadow: 0 2px 8px -2px rgba(225, 29, 72, .7); }
.badge.lg { font-size: .82rem; padding: .3rem .8rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: currentColor; flex-shrink: 0; }
.dot.success { background: var(--success); }
.dot.live { background: var(--success); animation: pulse 2s infinite; box-shadow: 0 0 0 0 var(--success); }
.badge .dot { width: 6px; height: 6px; }

/* ---------- Poruke ---------- */
.flash {
  --t: var(--info-text); --ts: var(--info-soft); --tc: var(--info);
  padding: .85rem 1rem; border-radius: var(--r); margin-bottom: 1rem; display: flex; gap: .75rem; align-items: flex-start;
  background: var(--ts); color: var(--text-2); border: 1px solid color-mix(in srgb, var(--tc) 22%, transparent);
  font-size: .9rem; animation: fadeUp .35s var(--ease) both;
}
.flash > .icon { color: var(--tc); margin-top: 1px; width: 19px; height: 19px; }
.flash b { color: var(--text); }
.flash a { font-weight: 600; }
.flash.success { --t: var(--success-text); --ts: var(--success-soft); --tc: var(--success); }
.flash.error { --t: var(--danger-text); --ts: var(--danger-soft); --tc: var(--danger); }
.flash.info { --t: var(--primary-text); --ts: var(--primary-soft); --tc: var(--primary); }
.flash.warning { --t: var(--warning-text); --ts: var(--warning-soft); --tc: var(--warning); }
.flash .x { margin-left: auto; background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0; line-height: 0; }

.banner { padding: .65rem 2.25rem; font-size: .87rem; display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; font-weight: 550; border-bottom: 1px solid transparent; }
.banner .icon { width: 17px; height: 17px; }
.banner.warning { background: var(--warning-soft); color: var(--warning-text); border-color: color-mix(in srgb, var(--warning) 25%, transparent); }
.banner.danger { background: var(--danger-soft); color: var(--danger-text); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.banner.info { background: linear-gradient(90deg, var(--primary-soft), color-mix(in srgb, var(--primary-2) 12%, transparent)); color: var(--primary-text); border-color: color-mix(in srgb, var(--primary) 22%, transparent); }
.banner form { margin-left: auto; }
@media (max-width: 960px) { .banner { padding: .6rem 1rem; } }

/* ---------- Tabele ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .875rem; }
th, td { padding: .8rem 1rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
th:first-child, td:first-child { padding-left: 1.4rem; }
th:last-child, td:last-child { padding-right: 1.4rem; }
th { font-size: .7rem; text-transform: uppercase; letter-spacing: .075em; color: var(--muted); font-weight: 700; background: var(--surface-2); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.flagged { background: var(--row-flag); }
tr.flagged td:first-child { box-shadow: inset 3px 0 0 var(--warning); }
tr.blocked { background: var(--row-block); }
tr.blocked td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
tfoot td { font-weight: 700; background: var(--surface-2); border-top: 1px solid var(--border); border-bottom: 0; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.cell-sub { font-size: .76rem; color: var(--muted); margin-top: 1px; }
.time-big { font-family: var(--font-display); font-weight: 700; font-size: .98rem; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.table-actions { display: flex; gap: .3rem; justify-content: flex-end; }
.row-link { color: var(--text); font-weight: 600; }
.row-link:hover { color: var(--primary-text); }

/* ---------- Prazno stanje ---------- */
.empty { padding: 3rem 1.25rem; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: .35rem; }
.empty > .icon, .empty-ico { width: 60px; height: 60px; padding: 16px; border-radius: 20px; color: var(--primary-text); background: var(--primary-soft); margin-bottom: .6rem; box-shadow: 0 0 0 8px color-mix(in srgb, var(--primary-soft) 45%, transparent); }
.empty h3 { margin: .2rem 0 0; }
.empty p { max-width: 380px; margin: 0 auto .5rem; }
.empty .btn { margin-top: .6rem; }
.empty.sm { padding: 1.5rem 1rem; }
.empty.sm > .icon { width: 44px; height: 44px; padding: 11px; border-radius: 14px; box-shadow: none; }

/* ---------- Forme ---------- */
label { display: block; font-weight: 600; font-size: .83rem; margin-bottom: .38rem; color: var(--text-2); }
.field { margin-bottom: 1.05rem; }
.field .hint { font-size: .77rem; color: var(--muted); margin-top: .35rem; line-height: 1.4; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=tel], input[type=search], input[type=url], select, textarea {
  width: 100%; padding: .62rem .8rem; min-height: 42px; border: 1px solid var(--border-strong); border-radius: 10px;
  font: inherit; font-size: .92rem; background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs);
  transition: border-color .15s, box-shadow .2s, background .15s; -webkit-appearance: none; appearance: none;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--primary) 30%, var(--border-strong)); }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 4px var(--ring); }
input[readonly] { background: var(--surface-2); }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238d91ab' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .7rem center; background-size: 16px; padding-right: 2.2rem; cursor: pointer; }
input[type=date], input[type=time] { font-variant-numeric: tabular-nums; }
input[type=date]::-webkit-calendar-picker-indicator, input[type=time]::-webkit-calendar-picker-indicator { opacity: .55; cursor: pointer; }
:root[data-theme="dark"] input[type=date]::-webkit-calendar-picker-indicator, :root[data-theme="dark"] input[type=time]::-webkit-calendar-picker-indicator { filter: invert(1); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) input[type=date]::-webkit-calendar-picker-indicator, :root:not([data-theme="light"]) input[type=time]::-webkit-calendar-picker-indicator { filter: invert(1); } }
textarea { min-height: 84px; resize: vertical; line-height: 1.5; }
.input-icon { position: relative; }
.input-icon > .icon { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; width: 17px; height: 17px; }
.input-icon input { padding-left: 2.4rem; }
.input-icon .reveal { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); color: var(--muted); }

/* prekidač (checkbox) i radio */
.check { display: flex; gap: .7rem; align-items: flex-start; font-weight: 520; cursor: pointer; font-size: .9rem; color: var(--text); margin-bottom: 0; line-height: 1.45; }
.check + .check { margin-top: .75rem; }
.check small { display: block; font-weight: 450; margin-top: .1rem; }
/* čekboks u dizajnu aplikacije */
input[type=checkbox] {
  -webkit-appearance: none; appearance: none; flex-shrink: 0; width: 21px; height: 21px; border-radius: 7px; margin: 0; cursor: pointer; position: relative;
  background: var(--surface); border: 1.5px solid var(--border-strong); box-shadow: var(--shadow-xs);
  transition: background-color .2s, border-color .2s, box-shadow .2s, transform .15s;
}
input[type=checkbox]:hover { border-color: color-mix(in srgb, var(--primary) 55%, var(--border-strong)); }
input[type=checkbox]:active { transform: scale(.9); }
input[type=checkbox]::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 13px; height: 13px; background: #fff; transform: scale(0); transition: transform .3s var(--spring);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}
input[type=checkbox]:checked { background: var(--grad); border-color: transparent; box-shadow: 0 4px 12px -4px rgba(99, 102, 241, .7); }
input[type=checkbox]:checked::after { transform: scale(1); }
input[type=checkbox]:focus-visible { outline: 0; box-shadow: 0 0 0 4px var(--ring); }
.check > input[type=checkbox] { margin-top: 1px; }
/* prekidač (podešavanja): <label class="check switch"> */
.switch input[type=checkbox] { width: 40px; height: 24px; border-radius: 99px; border: 0; background: var(--border-strong); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .12); }
.switch input[type=checkbox]::after {
  -webkit-mask: none; mask: none; inset: auto; margin: 0; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transform: none; transition: transform .3s var(--spring);
}
.switch input[type=checkbox]:checked { background: var(--grad); box-shadow: 0 4px 12px -4px rgba(99, 102, 241, .7); }
.switch input[type=checkbox]:checked::after { transform: translateX(16px); }
.check input[type=radio] {
  -webkit-appearance: none; appearance: none; flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%; margin: 1px 0 0; cursor: pointer;
  border: 2px solid var(--border-strong); background: var(--surface); transition: all .2s; display: grid; place-items: center;
}
.check input[type=radio]::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; transform: scale(0); transition: transform .25s var(--spring); }
.check input[type=radio]:checked { border-color: var(--primary); background: var(--primary); }
.check input[type=radio]:checked::after { transform: scale(1); }
.choice { display: flex; gap: .85rem; padding: 1rem 1.1rem; border: 1.5px solid var(--border); border-radius: var(--r); cursor: pointer; transition: border-color .2s, background .2s, box-shadow .2s; margin: 0 0 .65rem; background: var(--surface); }
.choice:hover { border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); }
.choice:has(input:checked) { border-color: var(--primary); background: color-mix(in srgb, var(--primary-soft) 55%, var(--surface)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ring) 45%, transparent); }
.choice .c-title { display: flex; font-weight: 650; display: flex; gap: .45rem; align-items: center; flex-wrap: wrap; }
.choice .c-sub { display: block; font-size: .82rem; color: var(--muted); font-weight: 450; margin-top: .15rem; }
.choice input[type=radio] {
  -webkit-appearance: none; appearance: none; flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%; margin: 1px 0 0; cursor: pointer;
  border: 2px solid var(--border-strong); background: var(--surface); transition: all .2s; display: grid; place-items: center;
}
.choice input[type=radio]::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; transform: scale(0); transition: transform .25s var(--spring); }
.choice input[type=radio]:checked { border-color: var(--primary); background: var(--primary); }
.choice input[type=radio]:checked::after { transform: scale(1); }

.form-row { display: grid; gap: 0 1rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.form-section { padding-top: 1.1rem; margin-top: .3rem; border-top: 1px dashed var(--border); }
.filters {
  display: flex; gap: .7rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: 1.25rem; padding: .9rem 1rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
}
.filters .field { margin: 0; min-width: 140px; }
.filters .field.grow { flex: 1; min-width: 200px; }
.filters .check { min-height: 42px; align-items: center; }
.filters .btn { min-height: 42px; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 11px; background: var(--surface-3); border: 1px solid var(--border); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg a { padding: .4rem .8rem; font-size: .82rem; color: var(--muted); font-weight: 600; border-radius: 8px; white-space: nowrap; transition: all .15s; display: inline-flex; align-items: center; gap: .35rem; }
.seg a:hover { color: var(--text); }
.seg a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--border); }
.seg.lg a { padding: .5rem 1rem; font-size: .86rem; }
.toolbar { display: flex; gap: .75rem; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 1rem; }

/* raspored – dani u nedelji */
.week { display: grid; gap: .5rem; }
.day-row { display: grid; grid-template-columns: 170px 1fr 1fr; gap: .75rem; align-items: center; padding: .55rem .7rem; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); transition: all .2s; }
.day-row:has(input[type=checkbox]:checked) { background: var(--surface); border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); box-shadow: var(--shadow-xs); }
.day-row:not(:has(input[type=checkbox]:checked)) input[type=time] { opacity: .45; }
.day-row .check { align-items: center; font-weight: 600; }
.day-row input[type=time] { min-height: 38px; }
@media (max-width: 560px) { .day-row { grid-template-columns: 1fr 1fr; } .day-row .check { grid-column: 1 / -1; } }

/* ---------- Ljudi, avatari ---------- */
.avatar {
  --h: 240; width: 38px; height: 38px; border-radius: 12px; object-fit: cover; flex-shrink: 0;
  display: inline-grid; place-items: center; font-weight: 700; font-size: .8rem; letter-spacing: .01em;
  background: linear-gradient(135deg, hsl(var(--h) 85% 93%), hsl(calc(var(--h) + 30) 80% 89%)); color: hsl(var(--h) 45% 32%);
  box-shadow: inset 0 0 0 1px hsl(var(--h) 50% 50% / .12);
}
:root[data-theme="dark"] .avatar { background: linear-gradient(135deg, hsl(var(--h) 45% 24%), hsl(calc(var(--h) + 30) 40% 19%)); color: hsl(var(--h) 85% 84%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .avatar { background: linear-gradient(135deg, hsl(var(--h) 45% 24%), hsl(calc(var(--h) + 30) 40% 19%)); color: hsl(var(--h) 85% 84%); } }
img.avatar { background: var(--surface-3); }
.avatar.sm { width: 30px; height: 30px; border-radius: 9px; font-size: .7rem; }
.avatar.lg { width: 76px; height: 76px; border-radius: 22px; font-size: 1.45rem; }
.avatar.xl { width: 104px; height: 104px; border-radius: 30px; font-size: 2rem; }
.avatar.round { border-radius: 50%; }
.person { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.person .name { font-weight: 620; line-height: 1.25; }
.person .name a { color: var(--text); }
.person .name a:hover { color: var(--primary-text); }
.person .meta { font-size: .77rem; color: var(--muted); line-height: 1.3; }
.avatar-wrap { position: relative; display: inline-flex; }
.avatar-wrap .presence { position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%; background: var(--success); border: 2px solid var(--surface); }

.thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; border: 1px solid var(--border); cursor: zoom-in; background: var(--surface-3); transition: transform .2s var(--spring), box-shadow .2s; }
.thumb:hover { transform: scale(1.08); box-shadow: var(--shadow); }
.photos { display: flex; gap: .3rem; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .55rem 1.25rem; font-size: .89rem; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 550; min-width: 0; overflow-wrap: anywhere; }
.kv.total dt, .kv.total dd { font-size: 1rem; font-weight: 750; color: var(--text); }
.reasons { margin: .35rem 0 0; padding: 0; list-style: none; font-size: .77rem; display: flex; flex-direction: column; gap: .15rem; }
.reasons li { color: var(--warning-text); display: flex; gap: .35rem; align-items: baseline; line-height: 1.35; }
.reasons li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex-shrink: 0; transform: translateY(-1px); }
.reasons li.block { color: var(--danger-text); font-weight: 650; }
.qr-box { background: #fff; padding: .9rem; border-radius: 16px; border: 1px solid var(--border); display: inline-block; box-shadow: var(--shadow); position: relative; }
.qr-box svg { width: 210px; height: 210px; display: block; }
.qr-box::before, .qr-box::after { content: ""; position: absolute; width: 22px; height: 22px; border: 3px solid var(--primary); }
.qr-box::before { top: -6px; left: -6px; border-right: 0; border-bottom: 0; border-radius: 10px 0 0 0; }
.qr-box::after { bottom: -6px; right: -6px; border-left: 0; border-top: 0; border-radius: 0 0 10px 0; }
.copy { display: flex; gap: .4rem; }
.copy input { font-family: var(--mono); font-size: .78rem; min-width: 0; }

.list-row { display: flex; justify-content: space-between; align-items: center; padding: .75rem 0; border-bottom: 1px solid var(--border); font-size: .9rem; gap: .75rem; }
.list-row:last-child { border-bottom: 0; padding-bottom: 0; }
.list-row:first-child { padding-top: 0; }
.list-row.tight { padding: .42rem 0; font-size: .85rem; }

/* ---------- Upozorenja ---------- */
.alert-item { display: flex; gap: 1rem; padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--border); align-items: flex-start; position: relative; transition: background .15s; }
.alert-item:last-child { border-bottom: 0; }
.alert-item:hover { background: var(--surface-2); }
.alert-item.unread { background: linear-gradient(90deg, color-mix(in srgb, var(--primary-soft) 70%, transparent), transparent 60%); }
.alert-item.unread::before { content: ""; position: absolute; left: .55rem; top: 1.55rem; width: 7px; height: 7px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 3px var(--ring); }
.ico-chip { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; background: var(--surface-3); color: var(--muted); }
.ico-chip .icon { width: 19px; height: 19px; }
.ico-chip.danger { background: var(--danger-soft); color: var(--danger-text); }
.ico-chip.warning { background: var(--warning-soft); color: var(--warning-text); }
.ico-chip.info { background: var(--info-soft); color: var(--info-text); }
.ico-chip.success { background: var(--success-soft); color: var(--success-text); }
.ico-chip.primary { background: var(--primary-soft); color: var(--primary-text); }
.ico-chip.sm { width: 32px; height: 32px; border-radius: 10px; }
.ico-chip.sm .icon { width: 16px; height: 16px; }
.alert-item .body { flex: 1; min-width: 0; }
.alert-item .title { font-weight: 650; line-height: 1.35; }
.alert-item .msg { font-size: .86rem; color: var(--text-2); margin-top: .2rem; }
.alert-item .when { font-size: .76rem; color: var(--muted); margin-top: .3rem; }
.alert-item .selfie { width: 68px; height: 68px; border-radius: 14px; }
.mini-alert { display: flex; gap: .7rem; align-items: flex-start; padding: .7rem 0; border-bottom: 1px solid var(--border); color: var(--text); }
.mini-alert:last-child { border-bottom: 0; padding-bottom: 0; }
.mini-alert:first-child { padding-top: 0; }
.mini-alert:hover { color: var(--text); }
.mini-alert:hover .t { color: var(--primary-text); }
.mini-alert .t { font-weight: 600; font-size: .86rem; line-height: 1.35; transition: color .15s; }
.mini-alert .w { font-size: .75rem; color: var(--muted); }

/* ---------- Grafikoni ---------- */
.chart { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding-top: 1.4rem; position: relative; }
.chart .col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; min-width: 0; }
.chart .bar {
  width: 100%; max-width: 34px; min-height: 3px; border-radius: 7px 7px 3px 3px; position: relative;
  background: linear-gradient(180deg, var(--primary-2), var(--primary)); opacity: .9;
  transform-origin: bottom; animation: grow .8s var(--ease) both; transition: opacity .15s, filter .15s;
}
.chart .col.zero .bar { background: var(--surface-3); opacity: 1; }
.chart .col.today .bar { background: linear-gradient(180deg, #34d399, #10b981); }
.chart .col:hover .bar { opacity: 1; filter: brightness(1.1); }
.chart .lbl { font-size: .66rem; color: var(--faint); margin-top: .45rem; font-weight: 600; white-space: nowrap; }
.chart .col.today .lbl { color: var(--success-text); }
.chart .tip { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translate(-50%, 4px); background: var(--text); color: var(--surface); font-size: .72rem; font-weight: 600; padding: .3rem .5rem; border-radius: 7px; white-space: nowrap; opacity: 0; pointer-events: none; transition: all .15s; z-index: 2; line-height: 1.35; text-align: center; }
.chart .col:hover .tip { opacity: 1; transform: translate(-50%, 0); }
.chart .warn-dot { position: absolute; top: -12px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.chart-legend { display: flex; gap: 1rem; font-size: .76rem; color: var(--muted); flex-wrap: wrap; }
.chart-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.chart-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; background: var(--grad); }
.chart-legend i.g { background: var(--success); }
.chart-legend i.r { background: var(--danger); border-radius: 50%; }
@media (max-width: 520px) { .chart { gap: 3px; height: 140px; } .chart .lbl { font-size: .58rem; } }

.ring { position: relative; display: inline-grid; place-items: center; }
.ring svg { transform: rotate(-90deg); display: block; }
.ring .track { stroke: var(--surface-3); }
.ring .val { stroke: url(#ringGrad); stroke-linecap: round; transition: stroke-dashoffset 1.2s var(--ease); animation: ringIn 1.2s var(--ease) both; }
.ring .center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring .big { font-family: var(--font-display); font-weight: 800; font-size: 1.9rem; letter-spacing: -.04em; line-height: 1; }
.ring .small { font-size: .72rem; color: var(--muted); font-weight: 600; margin-top: .2rem; }

.progress { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress > div { height: 100%; border-radius: 99px; background: var(--grad); }
.progress.success > div { background: linear-gradient(90deg, #34d399, #10b981); }
.progress.warning > div { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.progress.danger > div { background: linear-gradient(90deg, #fb7185, #f43f5e); }

/* ---------- Vremenska linija (danas) ---------- */
.tl { --tl-from: 0; --tl-span: 1440; }
.tl-head, .tl-row { display: grid; grid-template-columns: minmax(170px, 230px) 1fr minmax(120px, 150px); gap: 1rem; align-items: center; padding: .62rem 1.4rem; }
.tl-head { padding-top: .7rem; padding-bottom: .5rem; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.tl-row { border-bottom: 1px solid var(--border); transition: background .12s; }
.tl-row:last-child { border-bottom: 0; }
.tl-row:hover { background: var(--surface-2); }
.tl-row.flagged { background: var(--row-flag); }
.tl-scale { position: relative; height: 16px; font-size: .66rem; color: var(--faint); font-weight: 600; }
.tl-scale span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.tl-track { position: relative; height: 30px; border-radius: 9px; background: repeating-linear-gradient(90deg, transparent 0 calc(100% / 12 - 1px), var(--border) calc(100% / 12 - 1px) calc(100% / 12)); background-color: var(--surface-2); overflow: hidden; }
.tl-sched { position: absolute; top: 4px; bottom: 4px; border-radius: 7px; border: 1.5px dashed color-mix(in srgb, var(--primary) 55%, transparent); background: color-mix(in srgb, var(--primary-soft) 70%, transparent); }
.tl-work { position: absolute; top: 8px; bottom: 8px; border-radius: 5px; background: var(--grad); box-shadow: 0 2px 8px -2px rgba(91, 79, 245, .6); animation: growX .9s var(--ease) both; transform-origin: left; }
.tl-work.open { background: linear-gradient(90deg, #10b981, #34d399); box-shadow: 0 2px 8px -2px rgba(16, 185, 129, .6); }
.tl-work.open::after { content: ""; position: absolute; right: -4px; top: 50%; width: 9px; height: 9px; border-radius: 50%; background: #10b981; transform: translateY(-50%); box-shadow: 0 0 0 0 rgba(16, 185, 129, .6); animation: pulse 1.8s infinite; }
.tl-work.flag { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.tl-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--danger); z-index: 2; border-radius: 2px; }
.tl-now::before { content: ""; position: absolute; top: -1px; left: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.tl-scale .now-lbl { color: var(--danger-text); font-weight: 700; }
.tl-status { display: flex; flex-direction: column; align-items: flex-end; gap: .2rem; text-align: right; }
.tl-status .tm { font-size: .76rem; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .tl-head { display: none; }
  .tl-row { grid-template-columns: 1fr auto; padding: .8rem 1rem; gap: .55rem .75rem; }
  .tl-row .tl-track { grid-column: 1 / -1; grid-row: 2; height: 24px; }
  .tl-row .tl-status { grid-row: 1; grid-column: 2; }
}

/* ---------- Ostalo ---------- */
.map { height: 340px; border-radius: 14px; border: 1px solid var(--border); z-index: 0; overflow: hidden; }
:root[data-theme="dark"] .leaflet-tile { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.88) saturate(.7); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .leaflet-tile { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.88) saturate(.7); } }
.leaflet-container { font-family: var(--font) !important; background: var(--surface-3) !important; }
.lightbox { position: fixed; inset: 0; background: rgba(5, 6, 12, .86); backdrop-filter: blur(8px); display: grid; place-items: center; z-index: 300; cursor: zoom-out; padding: 1.25rem; opacity: 0; pointer-events: none; transition: opacity .25s; }
.lightbox.show { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: 100%; max-height: 88vh; border-radius: 18px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); transform: scale(.94); transition: transform .35s var(--spring); }
.lightbox.show img { transform: none; }
.text-danger { color: var(--danger-text) !important; }
.text-success { color: var(--success-text) !important; }
.text-warning { color: var(--warning-text) !important; }
.text-primary { color: var(--primary-text) !important; }
.mt-0 { margin-top: 0 !important; } .mb-0 { margin-bottom: 0 !important; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; }
.right { text-align: right; }
.center { text-align: center; }
.small { font-size: .82rem; }
.xsmall { font-size: .75rem; }
.flex { display: flex; gap: .75rem; align-items: center; }
.flex.between { justify-content: space-between; }
.flex.wrap { flex-wrap: wrap; }
.flex.top { align-items: flex-start; }
.grow { flex: 1; min-width: 0; }
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; overflow-x: auto; }
.tabs a { padding: .6rem .9rem; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.active { color: var(--primary-text); border-color: var(--primary); }
details summary { cursor: pointer; font-weight: 600; list-style: none; display: inline-flex; align-items: center; gap: .35rem; color: var(--text-2); font-size: .86rem; user-select: none; }
details summary::-webkit-details-marker { display: none; }
details summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .2s; margin-right: .2rem; opacity: .6; }
details[open] summary::before { transform: rotate(45deg) translate(-2px, -1px); }
.disclose { border: 1px solid var(--border); border-radius: var(--r); padding: .7rem .9rem; background: var(--surface-2); }
.disclose[open] { background: var(--surface); }
.disclose > *:not(summary) { margin-top: .9rem; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; position: relative; padding-left: 2.4rem; margin-bottom: .85rem; line-height: 1.45; min-height: 1.7rem; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -1px; width: 1.65rem; height: 1.65rem; border-radius: 9px; background: var(--grad); color: #fff; font-weight: 750; font-size: .78rem; display: grid; place-items: center; box-shadow: 0 4px 10px -3px rgba(91, 79, 245, .6); }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: calc(.825rem - 1px); top: 1.8rem; bottom: -.75rem; width: 2px; background: linear-gradient(var(--primary-soft), transparent); }
.feature-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.feature-list li { display: flex; gap: .6rem; align-items: flex-start; font-size: .88rem; line-height: 1.45; }
.feature-list li > .icon { color: var(--success); margin-top: 1px; width: 17px; height: 17px; stroke-width: 2.4; }
.feature-list li.off > .icon { color: var(--faint); }
.feature-list li.off { color: var(--muted); }
.shield-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .75rem; }
.shield { display: flex; gap: .75rem; padding: .9rem 1rem; border-radius: var(--r); border: 1px solid var(--border); background: var(--surface-2); align-items: flex-start; }
.shield .t { font-weight: 650; font-size: .88rem; }
.shield .s { font-size: .8rem; color: var(--muted); }
.shield.on { background: color-mix(in srgb, var(--success-soft) 55%, var(--surface)); border-color: color-mix(in srgb, var(--success) 25%, var(--border)); }
.shield.off { opacity: .85; }
.pill-group { display: flex; flex-wrap: wrap; gap: .4rem; }
.kbd-num { font-family: var(--font-display); font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.divider-label { display: flex; align-items: center; gap: .75rem; color: var(--faint); font-size: .76rem; font-weight: 600; margin: 1.1rem 0; text-transform: uppercase; letter-spacing: .08em; }
.divider-label::before, .divider-label::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.loc-card { display: flex; flex-direction: column; gap: .9rem; transition: transform .25s var(--ease), box-shadow .25s; }
.loc-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.loc-card .loc-top { display: flex; gap: .9rem; align-items: flex-start; }
.loc-card .loc-ico { width: 46px; height: 46px; border-radius: 14px; background: var(--grad); color: #fff; display: grid; place-items: center; flex-shrink: 0; box-shadow: 0 8px 18px -8px rgba(91, 79, 245, .8); }
.loc-card h2 a { color: var(--text); }
.loc-card h2 a:hover { color: var(--primary-text); }
.loc-card .btn-row { margin-top: auto; padding-top: .9rem; border-top: 1px solid var(--border); }
.mini-map { height: 120px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: var(--surface-3); position: relative; }

/* Obaveštenje (toast) */
.toasts { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 400; display: flex; flex-direction: column; gap: .6rem; max-width: min(380px, calc(100vw - 2rem)); }
.toast {
  display: flex; gap: .75rem; align-items: flex-start; padding: .9rem 1rem; border-radius: 16px; color: var(--text);
  background: var(--glass); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px);
  border: 1px solid var(--border); box-shadow: var(--shadow-lg); animation: toastIn .45s var(--spring) both; font-size: .88rem;
}
.toast:hover { color: var(--text); }
.toast .t { font-weight: 650; }
.toast .s { color: var(--muted); font-size: .8rem; }
.toast.out { animation: toastOut .3s var(--ease) both; }
@media (max-width: 960px) { .toasts { right: .75rem; left: .75rem; bottom: calc(5.6rem + env(safe-area-inset-bottom)); max-width: none; } }

/* ==========================================================================
   Prijava (login), greške
   ========================================================================== */
/* ---------- Prijava (centrirana kartica, animirana pozadina) ---------- */
.lx {
  --lx-bg: #eef0fb; --lx-a1: #818cf8; --lx-a2: #c084fc; --lx-a3: #22d3ee; --lx-a4: #f472b6;
  --lx-card: rgba(255, 255, 255, .78); --lx-card-bd: rgba(255, 255, 255, .9); --lx-line: rgba(79, 70, 229, .09);
  --lx-orbit: rgba(99, 102, 241, .16); --lx-float: rgba(255, 255, 255, .72); --lx-float-bd: rgba(255, 255, 255, .95); --lx-star: rgba(99, 102, 241, .45);
  min-height: 100vh; min-height: 100dvh; background: var(--lx-bg); overflow-x: hidden;
}
:root[data-theme="dark"] .lx {
  --lx-bg: #05060d; --lx-a1: #4f46e5; --lx-a2: #9333ea; --lx-a3: #0891b2; --lx-a4: #db2777;
  --lx-card: rgba(17, 19, 32, .66); --lx-card-bd: rgba(255, 255, 255, .1); --lx-line: rgba(255, 255, 255, .045);
  --lx-orbit: rgba(165, 180, 252, .13); --lx-float: rgba(22, 24, 40, .62); --lx-float-bd: rgba(255, 255, 255, .1); --lx-star: rgba(199, 210, 254, .7);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .lx {
    --lx-bg: #05060d; --lx-a1: #4f46e5; --lx-a2: #9333ea; --lx-a3: #0891b2; --lx-a4: #db2777;
    --lx-card: rgba(17, 19, 32, .66); --lx-card-bd: rgba(255, 255, 255, .1); --lx-line: rgba(255, 255, 255, .045);
    --lx-orbit: rgba(165, 180, 252, .13); --lx-float: rgba(22, 24, 40, .62); --lx-float-bd: rgba(255, 255, 255, .1); --lx-star: rgba(199, 210, 254, .7);
  }
}
.lx-bg { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.lx-aurora { position: absolute; inset: -15%; filter: blur(70px) saturate(150%); opacity: .85; }
.lx-aurora i { position: absolute; border-radius: 50%; animation: lxDrift 22s ease-in-out infinite; }
.lx-aurora i:nth-child(1) { width: 48vmax; height: 48vmax; left: 4%; top: 2%; background: var(--lx-a1); }
.lx-aurora i:nth-child(2) { width: 40vmax; height: 40vmax; right: 2%; top: 14%; background: var(--lx-a2); animation-delay: -7s; animation-duration: 26s; }
.lx-aurora i:nth-child(3) { width: 34vmax; height: 34vmax; left: 30%; bottom: -6%; background: var(--lx-a3); animation-delay: -13s; animation-duration: 30s; opacity: .7; }
.lx-aurora i:nth-child(4) { width: 22vmax; height: 22vmax; right: 22%; bottom: 8%; background: var(--lx-a4); animation-delay: -4s; animation-duration: 19s; opacity: .45; }
.lx-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--lx-line) 1px, transparent 1px), linear-gradient(90deg, var(--lx-line) 1px, transparent 1px);
  background-size: 56px 56px; animation: lxGrid 40s linear infinite;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, #000 25%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, #000 25%, transparent 75%);
}
.lx-orbits { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.lx-orbits span { position: absolute; left: 50%; top: 50%; border-radius: 50%; border: 1px dashed var(--lx-orbit); animation: spin linear infinite; }
.lx-orbits span i { position: absolute; left: 50%; top: -5px; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; background: linear-gradient(135deg, #818cf8, #e879f9); box-shadow: 0 0 14px #a78bfa, 0 0 2px #fff; }
.lx-orbits span i:nth-child(2) { top: auto; bottom: -5px; background: #22d3ee; box-shadow: 0 0 14px #22d3ee; }
.lx-orbits .o1 { width: 620px; height: 620px; margin: -310px; animation-duration: 38s; }
.lx-orbits .o2 { width: 860px; height: 860px; margin: -430px; animation-duration: 60s; animation-direction: reverse; border-style: solid; opacity: .7; }
.lx-orbits .o3 { width: 1140px; height: 1140px; margin: -570px; animation-duration: 90s; }
.lx-stars i { position: absolute; left: var(--x); bottom: -10px; width: var(--s); height: var(--s); border-radius: 50%; background: var(--lx-star); animation: lxRise var(--d) linear var(--l) infinite; }
.lx-float {
  position: absolute; display: flex; align-items: center; gap: .7rem; padding: .7rem 1rem .7rem .7rem; border-radius: 16px; min-width: 230px;
  background: var(--lx-float); border: 1px solid var(--lx-float-bd); backdrop-filter: blur(16px) saturate(160%); -webkit-backdrop-filter: blur(16px) saturate(160%);
  box-shadow: 0 24px 50px -18px rgba(15, 12, 50, .45); color: var(--text); animation: lxIn .9s var(--ease) both, floatY 7s ease-in-out infinite;
}
.lx-float b { display: block; font-size: .86rem; font-weight: 650; }
.lx-float small { display: block; font-size: .75rem; color: var(--muted); }
.lx-float .fi { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; color: #fff; }
.lx-float .fi .icon { width: 18px; height: 18px; }
.lx-float .fi.ok { background: linear-gradient(135deg, #34d399, #059669); box-shadow: 0 6px 16px -6px #10b981; }
.lx-float .fi.bad { background: linear-gradient(135deg, #fb7185, #e11d48); box-shadow: 0 6px 16px -6px #f43f5e; }
.lx-float .fi.info { background: linear-gradient(135deg, #818cf8, #7c3aed); box-shadow: 0 6px 16px -6px #6366f1; }
.lx-float.l1 { left: 7%; top: 18%; animation-delay: .5s, 0s; }
.lx-float.l2 { left: 11%; bottom: 20%; animation-delay: .8s, -3s; }
.lx-float.r1 { right: 8%; top: 24%; animation-delay: .65s, -1.5s; }
.lx-float.r2 { right: 12%; bottom: 16%; animation-delay: .95s, -4.5s; }

.lx-theme { position: fixed; top: 1.1rem; right: 1.1rem; z-index: 5; background: var(--lx-float); border: 1px solid var(--lx-float-bd); backdrop-filter: blur(12px); color: var(--text); width: 40px; height: 40px; border-radius: 12px; }
.lx-wrap { position: relative; z-index: 2; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2.5rem 1rem 1.5rem; }
.lx-card {
  width: 100%; max-width: 430px; padding: 2.4rem 2.2rem 1.6rem; border-radius: 30px; text-align: left; position: relative;
  background: var(--lx-card); border: 1px solid var(--lx-card-bd);
  backdrop-filter: blur(26px) saturate(170%); -webkit-backdrop-filter: blur(26px) saturate(170%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 40px 90px -30px rgba(40, 20, 120, .55), 0 0 0 1px rgba(124, 92, 246, .06);
  animation: lxCard .9s var(--ease) both;
}
.lx-card::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, rgba(167, 139, 250, .8), transparent 35%, transparent 65%, rgba(34, 211, 238, .55));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: .7; }
.lx-card > * { animation: fadeUp .7s var(--ease) both; }
.lx-card > :nth-child(2) { animation-delay: .12s; } .lx-card > :nth-child(3) { animation-delay: .18s; } .lx-card > :nth-child(4) { animation-delay: .24s; }
.lx-card > :nth-child(5) { animation-delay: .3s; } .lx-card > :nth-child(6) { animation-delay: .36s; } .lx-card > :nth-child(7) { animation-delay: .42s; } .lx-card > :nth-child(8) { animation-delay: .48s; }
.lx-logo { position: relative; width: 76px; height: 76px; margin: 0 auto 1rem; }
.lx-logo .logo.xl { width: 76px; height: 76px; border-radius: 23px; position: relative; z-index: 1; animation: pop .7s var(--spring) .1s both; }
.lx-logo .logo.xl .icon { width: 46px; height: 46px; }
.lx-halo { position: absolute; inset: -14px; border-radius: 32px; background: conic-gradient(from 0deg, #6366f1, #a855f7, #ec4899, #22d3ee, #6366f1); filter: blur(18px); opacity: .55; animation: spin 6s linear infinite; }
.lx-mark path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .7s var(--ease) forwards; }
.lx-mark .p1 { animation-delay: .45s; } .lx-mark .p2 { animation-delay: .6s; animation-duration: .9s; } .lx-mark .p3 { animation-delay: 1.1s; }
.lx-brand { text-align: center; font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; color: var(--text); margin-bottom: 1.4rem; }
.lx-card h1 { text-align: center; font-size: 2rem; letter-spacing: -.035em; margin-bottom: .3rem; }
.lx-lead { text-align: center; color: var(--muted); margin-bottom: 1.6rem; }
.lx-card .field { margin-bottom: 1.05rem; }
.lx-card input { height: 48px; border-radius: 14px; background: color-mix(in srgb, var(--surface) 82%, transparent); }
.lx-submit { height: 52px; border-radius: 15px; margin-top: .5rem; position: relative; overflow: hidden; font-size: 1rem; }
.lx-submit::before { content: ""; position: absolute; top: 0; bottom: 0; width: 45%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .38), transparent); transform: skewX(-20deg); animation: lxShine 3.6s ease-in-out 1.6s infinite; }
.lx-submit .icon { transition: transform .25s var(--spring); }
.lx-submit:hover .icon { transform: translateX(4px); }
.lx-trust { display: flex; justify-content: center; flex-wrap: wrap; gap: .35rem .9rem; margin: 1.3rem 0 1.1rem; font-size: .76rem; color: var(--muted); font-weight: 550; }
.lx-trust span { display: inline-flex; align-items: center; gap: .3rem; }
.lx-trust .icon { color: var(--primary); }
.lx-worker { display: flex; align-items: center; gap: .75rem; padding: .75rem .85rem; border-radius: 16px; border: 1px solid var(--border); background: color-mix(in srgb, var(--surface-2) 70%, transparent); color: var(--text-2); font-size: .86rem; transition: border-color .2s, transform .2s var(--ease), background .2s; }
.lx-worker:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); color: var(--text); transform: translateY(-1px); }
.lx-worker .ico { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-text); flex-shrink: 0; }
.lx-worker > .icon:last-child { margin-left: auto; color: var(--faint); }
.lx-copy { margin-top: 1.5rem; font-size: .76rem; color: var(--muted); text-align: center; animation: fadeUp .8s var(--ease) .6s both; }
@media (max-width: 1100px) { .lx-float { display: none; } }
@media (max-width: 520px) { .lx-card { padding: 2rem 1.35rem 1.35rem; border-radius: 26px; } .lx-card h1 { font-size: 1.7rem; } .lx-orbits .o1 { width: 440px; height: 440px; margin: -220px; } }
@media (prefers-reduced-motion: reduce) { .lx *, .lx *::before { animation-duration: .01s !important; animation-iteration-count: 1 !important; } }
@keyframes lxDrift { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(7%, -5%) scale(1.1); } 66% { transform: translate(-6%, 7%) scale(.92); } }
@keyframes lxGrid { to { background-position: 56px 56px; } }
@keyframes lxRise { 0% { transform: translateY(0); opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { transform: translateY(-105vh); opacity: 0; } }
@keyframes lxIn { from { opacity: 0; transform: translateY(24px) scale(.94); } }
@keyframes lxCard { from { opacity: 0; transform: translateY(26px) scale(.96); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes lxShine { 0% { left: -60%; } 45%, 100% { left: 130%; } }
.solo { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 1.5rem; position: relative; overflow: hidden; isolation: isolate; }
.solo-card { width: 100%; max-width: 440px; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: 26px; padding: 2.5rem 2rem; box-shadow: var(--shadow-lg); animation: fadeUp .5s var(--ease) both; }
.solo-card .code { font-family: var(--font-display); font-size: 4.5rem; font-weight: 800; letter-spacing: -.06em; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: .5rem; }
.solo .blob { position: absolute; width: 480px; height: 480px; border-radius: 50%; filter: blur(90px); opacity: .25; z-index: -1; }
.solo .blob.a { background: #6366f1; top: -160px; left: -120px; }
.solo .blob.b { background: #a855f7; bottom: -180px; right: -140px; }

/* ==========================================================================
   Mobilna aplikacija radnika
   ========================================================================== */
.m-body { min-height: 100vh; min-height: 100dvh; background: var(--bg); position: relative; overflow-x: hidden; }
.m-sky {
  position: absolute; left: 0; right: 0; top: 0; height: 320px; z-index: 0; overflow: hidden; isolation: isolate;
  background: #07080e; border-radius: 0 0 36px 36px;
}
.m-sky .aurora { inset: -40% -20% -20%; opacity: .95; }
.m-sky .grain { opacity: .6; }
.m-wrap { position: relative; z-index: 1; max-width: 480px; margin: 0 auto; padding: max(1rem, env(safe-area-inset-top)) 1rem calc(3rem + env(safe-area-inset-bottom)); }
.m-head { color: #fff; display: flex; align-items: center; gap: .7rem; padding: .35rem 0 1.4rem; }
.m-head .brand { padding: 0; }
.m-head .brand-sub { color: rgba(255, 255, 255, .62); }
.m-head .spacer { flex: 1; }
.m-head button, .m-head a.m-link {
  color: rgba(255, 255, 255, .85); background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14); font: inherit; font-size: .8rem; font-weight: 600;
  cursor: pointer; padding: .42rem .8rem; border-radius: 99px; display: inline-flex; align-items: center; gap: .35rem; backdrop-filter: blur(10px);
}
.m-head button .icon, .m-head a.m-link .icon { width: 15px; height: 15px; }
.m-title { color: #fff; margin: -.2rem 0 1.25rem; }
.m-title h1 { color: #fff; font-size: 1.65rem; margin: 0; }
.m-title p { color: rgba(255, 255, 255, .7); margin: .25rem 0 0; font-size: .92rem; }
.m-card {
  background: var(--surface); border-radius: 24px; padding: 1.35rem; margin-bottom: .9rem; position: relative;
  border: 1px solid var(--border); box-shadow: 0 1px 2px rgba(16, 18, 40, .04), 0 12px 32px -12px rgba(16, 18, 40, .14);
  animation: fadeUp .5s var(--ease) both;
}
.m-card:nth-of-type(2) { animation-delay: .06s; }
.m-card:nth-of-type(3) { animation-delay: .12s; }
.m-card:nth-of-type(4) { animation-delay: .18s; }
.m-card h2, .m-card h3 { display: flex; align-items: center; gap: .5rem; }
.m-hero { text-align: center; padding-top: 1.6rem; }
.m-status { display: inline-flex; align-items: center; gap: .5rem; padding: .42rem .95rem; border-radius: 99px; font-weight: 650; font-size: .84rem; }
.m-status.in { background: var(--success-soft); color: var(--success-text); }
.m-status.out { background: var(--surface-3); color: var(--muted); }
.m-ring { margin: .5rem auto 1rem; }
.m-ring .big { font-size: 2.35rem; }
.m-today { display: flex; justify-content: center; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; }
.m-today .chip { display: inline-flex; align-items: center; gap: .4rem; font-size: .82rem; font-weight: 600; padding: .4rem .75rem; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
.m-today .chip .icon { width: 15px; height: 15px; color: var(--primary-text); }
.scan-cta { display: flex; gap: 1rem; align-items: center; }
.scan-cta .qr-anim { width: 58px; height: 58px; border-radius: 18px; background: var(--grad); color: #fff; display: grid; place-items: center; flex-shrink: 0; position: relative; overflow: hidden; box-shadow: 0 10px 24px -10px rgba(91, 79, 245, .9); }
.scan-cta .qr-anim .icon { width: 28px; height: 28px; }
.scan-cta .qr-anim::after { content: ""; position: absolute; left: 10%; right: 10%; height: 2px; background: #fff; box-shadow: 0 0 10px 2px rgba(255, 255, 255, .8); animation: scanline 2.2s ease-in-out infinite; }
.scan-cta b { font-size: .98rem; display: block; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .55rem; text-align: center; }
.mini-stats > div { background: var(--surface-2); border: 1px solid var(--border); border-radius: 16px; padding: .85rem .3rem .75rem; }
.mini-stats b { display: block; font-family: var(--font-display); font-size: 1.3rem; font-weight: 750; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.mini-stats span { font-size: .7rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.day-item { display: flex; gap: .85rem; align-items: center; padding: .8rem 0; border-bottom: 1px solid var(--border); }
.day-item:last-child { border-bottom: 0; padding-bottom: 0; }
.day-item:first-child { padding-top: 0; }
.day-item .date-chip { width: 46px; height: 50px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; line-height: 1.05; }
.day-item .date-chip b { font-family: var(--font-display); font-size: 1.15rem; font-weight: 750; }
.day-item .date-chip span { font-size: .62rem; text-transform: uppercase; font-weight: 700; color: var(--muted); letter-spacing: .05em; }
.day-item.warn .date-chip { background: var(--warning-soft); border-color: transparent; }
.day-item.bad .date-chip { background: var(--danger-soft); border-color: transparent; }
.day-item.info .date-chip { background: var(--info-soft); border-color: transparent; }
.day-item .di-main { flex: 1; min-width: 0; }
.day-item .di-main .t { font-weight: 650; font-size: .92rem; font-variant-numeric: tabular-nums; }
.day-item .di-main .s { font-size: .78rem; color: var(--muted); }
.day-item .di-dur { font-family: var(--font-display); font-weight: 700; font-size: .92rem; font-variant-numeric: tabular-nums; text-align: right; }
.month-nav { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: 1rem; }
.month-nav h2 { margin: 0; text-transform: capitalize; font-size: 1.1rem; }
.month-nav .btn { width: 40px; padding: 0; border-radius: 12px; }

/* koraci prijave */
.flow-top { display: flex; align-items: center; gap: .9rem; margin-bottom: 1rem; }
.flow-top .loc-ico { width: 46px; height: 46px; border-radius: 15px; background: var(--grad); color: #fff; display: grid; place-items: center; flex-shrink: 0; box-shadow: 0 8px 18px -8px rgba(91, 79, 245, .8); }
.flow-top h2 { margin: 0; font-size: 1.05rem; }
.cd-ring { position: relative; width: 50px; height: 50px; flex-shrink: 0; margin-left: auto; }
.cd-ring svg { transform: rotate(-90deg); }
.cd-ring circle { fill: none; stroke-width: 4; }
.cd-ring .tr { stroke: var(--surface-3); }
.cd-ring .vl { stroke: var(--primary); stroke-linecap: round; transition: stroke-dashoffset 1s linear, stroke .3s; }
.cd-ring.low .vl { stroke: var(--danger); }
.cd-ring span { position: absolute; inset: 0; display: grid; place-items: center; font-size: .72rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.stepper { position: relative; }
.step { display: flex; gap: .9rem; align-items: center; padding: .7rem 0; position: relative; }
.step:not(:last-child)::after { content: ""; position: absolute; left: 21px; top: calc(50% + 24px); height: calc(100% - 48px); width: 2px; background: var(--border); border-radius: 2px; transition: background .3s; }
.step.done:not(:last-child)::after { background: linear-gradient(var(--success), color-mix(in srgb, var(--success) 25%, transparent)); }
.step .s-ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2); color: var(--faint); flex-shrink: 0; transition: all .35s var(--spring); border: 1px solid var(--border); position: relative; }
.step .s-ico .icon { width: 20px; height: 20px; }
.step.active .s-ico { background: var(--primary-soft); color: var(--primary-text); border-color: color-mix(in srgb, var(--primary) 35%, transparent); box-shadow: 0 0 0 0 var(--ring); animation: ringPulse 1.8s infinite; }
.step.done .s-ico { background: var(--success); color: #fff; border-color: transparent; transform: scale(1.02); box-shadow: 0 6px 14px -6px rgba(16, 185, 129, .8); }
.step.fail .s-ico { background: var(--danger-soft); color: var(--danger-text); border-color: color-mix(in srgb, var(--danger) 30%, transparent); animation: shake .45s; }
.step .s-title { font-weight: 650; font-size: .95rem; }
.step .s-sub { font-size: .8rem; color: var(--muted); }
.step.done .s-sub { color: var(--success-text); }
.step.fail .s-sub { color: var(--danger-text); }
.step .s-sub a { font-weight: 650; }

.cam { position: relative; border-radius: 22px; overflow: hidden; background: #05060a; aspect-ratio: 3 / 4; margin: 0 0 1rem; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.cam video, .cam img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scaleX(-1); }
.cam img { transform: none; animation: flashIn .5s var(--ease); }
.cam .oval { position: absolute; inset: 11% 17% 17%; border-radius: 50%; pointer-events: none; box-shadow: 0 0 0 999px rgba(5, 6, 12, .45); border: 2.5px solid rgba(255, 255, 255, .85); }
.cam .oval::after { content: ""; position: absolute; left: 12%; right: 12%; height: 2px; top: 10%; background: linear-gradient(90deg, transparent, #a5b4fc, transparent); box-shadow: 0 0 14px 3px rgba(165, 180, 252, .6); animation: scanline 2.6s ease-in-out infinite; }
.cam.shot .oval { border-color: #34d399; }
.cam.shot .oval::after { display: none; }
.cam .cam-hint { position: absolute; left: 0; right: 0; bottom: 4.5%; text-align: center; color: #fff; font-size: .82rem; font-weight: 600; text-shadow: 0 1px 6px rgba(0, 0, 0, .6); }
.cam .cam-badge { position: absolute; top: .8rem; left: .8rem; display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .6rem; border-radius: 99px; background: rgba(5, 6, 12, .55); color: #fff; font-size: .7rem; font-weight: 700; letter-spacing: .04em; backdrop-filter: blur(8px); }
.cam .cam-badge i { width: 7px; height: 7px; border-radius: 50%; background: #f43f5e; animation: blink 1.2s infinite; }
.shutter-row { display: flex; align-items: center; justify-content: center; gap: 1rem; }
.shutter { width: 76px; height: 76px; border-radius: 50%; border: 4px solid var(--border-strong); background: var(--surface); padding: 5px; cursor: pointer; transition: transform .15s; -webkit-tap-highlight-color: transparent; }
.shutter span { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: var(--grad); color: #fff; box-shadow: 0 8px 20px -6px rgba(91, 79, 245, .9); }
.shutter span .icon { width: 26px; height: 26px; }
.shutter:active { transform: scale(.92); }
.shutter:disabled { opacity: .5; }

.bio-btn { position: relative; isolation: isolate; overflow: visible; }
.bio-btn:not(:disabled)::before { content: ""; position: absolute; inset: -4px; border-radius: 22px; background: var(--grad); opacity: .35; z-index: -1; filter: blur(10px); animation: glow 2.4s ease-in-out infinite; }
.m-msg { margin: .8rem 0 0; font-size: .88rem; text-align: center; min-height: 1.3em; }

/* rezultat */
.result { text-align: center; padding: 1.25rem 0 .5rem; }
.r-ico { width: 104px; height: 104px; margin: 0 auto 1.25rem; position: relative; display: grid; place-items: center; }
.r-ico::before, .r-ico::after { content: ""; position: absolute; inset: 0; border-radius: 50%; }
.result.ok .r-ico::before { background: var(--success-soft); animation: pop .6s var(--spring) both; }
.result.ok .r-ico::after { border: 2px solid var(--success); opacity: 0; animation: ripple 1.6s .3s ease-out 2; }
.result.bad .r-ico::before { background: var(--danger-soft); animation: pop .6s var(--spring) both; }
.result.bad .r-ico { animation: shake .5s .35s; }
.r-ico svg.mark { position: relative; z-index: 1; width: 62px; height: 62px; }
.r-ico svg.mark circle { fill: none; stroke-width: 3; }
.r-ico svg.mark path { fill: none; stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .55s .35s var(--ease) forwards; }
.result.ok svg.mark { color: var(--success); }
.result.bad svg.mark { color: var(--danger); }
.r-ico svg.mark * { stroke: currentColor; }
.result .r-kind { font-size: .78rem; font-weight: 750; text-transform: uppercase; letter-spacing: .12em; color: var(--success-text); }
.result.bad .r-kind { color: var(--danger-text); }
.result .r-time { font-family: var(--font-display); font-size: 4rem; font-weight: 800; letter-spacing: -.055em; line-height: 1; margin: .35rem 0 .45rem; font-variant-numeric: tabular-nums; animation: fadeUp .5s .25s var(--ease) both; }
.result h2 { justify-content: center; font-size: 1.25rem; }
.result .r-who { display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .8rem .35rem .4rem; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); font-weight: 600; font-size: .86rem; }
.result .r-who .avatar { width: 26px; height: 26px; border-radius: 50%; font-size: .62rem; }
.r-detail { margin-top: 1.25rem; display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; text-align: left; }
.r-detail > div { padding: .8rem .9rem; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border); }
.r-detail span { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--muted); display: block; }
.r-detail b { font-size: .95rem; font-family: var(--font-display); }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: inherit; }
.confetti i { position: absolute; top: 28%; left: 50%; width: 8px; height: 12px; border-radius: 2px; opacity: 0; animation: confetti 1.4s var(--ease) forwards; }

/* ==========================================================================
   Kiosk
   ========================================================================== */
.kiosk { min-height: 100vh; min-height: 100dvh; background: #06070c; color: #fff; position: relative; overflow: hidden; isolation: isolate; display: grid; place-items: center; padding: 2rem 1.25rem; }
.kiosk .aurora { opacity: .55; }
.kiosk-inner { display: grid; grid-template-columns: 1fr auto; gap: clamp(2rem, 6vw, 6rem); align-items: center; width: 100%; max-width: 1200px; }
.kiosk-info .brand { padding: 0; margin-bottom: 2.5rem; }
.kiosk .clock { font-family: var(--font-display); font-size: clamp(3.5rem, 9vw, 7.5rem); font-weight: 800; letter-spacing: -.055em; line-height: .95; font-variant-numeric: tabular-nums; }
.kiosk .clock .sec { color: rgba(255, 255, 255, .35); font-size: .45em; letter-spacing: -.02em; margin-left: .15em; }
.kiosk .date { color: rgba(255, 255, 255, .55); margin: .75rem 0 2.25rem; font-size: clamp(1rem, 1.6vw, 1.3rem); font-weight: 500; }
.kiosk .date::first-letter { text-transform: uppercase; }
.kiosk h1 { font-size: clamp(1.4rem, 2.6vw, 2.2rem); color: #fff; margin: 0 0 .5rem; letter-spacing: -.03em; }
.kiosk .hint { color: rgba(255, 255, 255, .6); font-size: clamp(.95rem, 1.4vw, 1.1rem); max-width: 480px; line-height: 1.5; }
.kiosk .k-steps { display: flex; gap: .6rem; margin-top: 1.75rem; flex-wrap: wrap; }
.kiosk .k-steps span { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .85rem; border-radius: 99px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); font-size: .85rem; color: rgba(255, 255, 255, .8); font-weight: 550; }
.kiosk .k-steps .icon { width: 16px; height: 16px; color: #a5b4fc; }
.qr-stage { --p: 1; position: relative; padding: 14px; border-radius: 34px; width: min(80vw, 62vh, 470px); aspect-ratio: 1; background: conic-gradient(from 0deg, #818cf8, #c084fc calc(var(--p) * 100%), rgba(255, 255, 255, .08) 0); box-shadow: 0 30px 90px -20px rgba(129, 140, 248, .55); transition: box-shadow .3s; }
.qr-stage.low { background: conic-gradient(from 0deg, #fb7185, #f43f5e calc(var(--p) * 100%), rgba(255, 255, 255, .08) 0); }
.qr-stage .qr { background: #fff; border-radius: 22px; padding: 7%; width: 100%; height: 100%; position: relative; overflow: hidden; }
.qr-stage .qr svg { width: 100%; height: 100%; display: block; transition: opacity .25s; }
.qr-stage .qr.swap svg { animation: qrSwap .5s var(--ease); }
.qr-stage .qr .err { color: #be123c; display: grid; place-items: center; height: 100%; text-align: center; font-weight: 650; font-size: 1.1rem; padding: 1rem; }
.qr-stage .qr-logo { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 17%; aspect-ratio: 1; border-radius: 24%; background: var(--grad); display: grid; place-items: center; border: 5px solid #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, .2); }
.qr-stage .qr-logo .icon { width: 58%; height: 58%; color: #fff; stroke-width: 2.6; }
.qr-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 1.1rem; color: rgba(255, 255, 255, .55); font-size: .88rem; font-weight: 550; }
.qr-meta b { color: #fff; font-variant-numeric: tabular-nums; }
.qr-meta .live { display: inline-flex; align-items: center; gap: .45rem; }
.qr-meta .live i { width: 8px; height: 8px; border-radius: 50%; background: #34d399; animation: pulse 2s infinite; box-shadow: 0 0 0 0 #34d399; }
.kiosk-feed { position: fixed; left: 50%; bottom: 2rem; transform: translateX(-50%); display: flex; flex-direction: column; gap: .6rem; align-items: center; z-index: 5; width: min(560px, calc(100vw - 2rem)); }
.kiosk-feed .k-toast { display: flex; gap: .85rem; align-items: center; padding: .9rem 1.4rem .9rem .9rem; border-radius: 99px; background: rgba(16, 185, 129, .16); border: 1px solid rgba(52, 211, 153, .35); backdrop-filter: blur(16px); font-size: 1.15rem; font-weight: 650; animation: toastIn .5s var(--spring) both; box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .6); }
.kiosk-feed .k-toast .ki { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #10b981; flex-shrink: 0; }
.kiosk-feed .k-toast.bad { background: rgba(244, 63, 94, .16); border-color: rgba(251, 113, 133, .35); }
.kiosk-feed .k-toast.bad .ki { background: #f43f5e; }
.kiosk-feed .k-toast.out { animation: toastOut .4s var(--ease) both; }
.kiosk .fs-btn { position: fixed; top: 1.25rem; right: 1.25rem; color: rgba(255, 255, 255, .6); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); border-radius: 12px; padding: .5rem .8rem; font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; display: inline-flex; gap: .4rem; align-items: center; transition: all .2s; }
.kiosk .fs-btn:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.kiosk.idle .fs-btn { opacity: 0; }
@media (max-width: 860px), (orientation: portrait) {
  .kiosk-inner { grid-template-columns: 1fr; text-align: center; justify-items: center; gap: 1.75rem; }
  .kiosk-info .brand { justify-content: center; margin-bottom: 1.25rem; }
  .kiosk .date { margin-bottom: 0; }
  .kiosk .k-steps, .kiosk .hint-wrap { display: none; }
  .kiosk-loc { order: 3; }
}

/* ==========================================================================
   Animacije
   ========================================================================== */
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, .55); } 70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); } 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); } }
@keyframes ringPulse { 0% { box-shadow: 0 0 0 0 var(--ring); } 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes growX { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes ringIn { from { stroke-dashoffset: var(--len, 400); } }
@keyframes float { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(8%, -6%) scale(1.08); } 66% { transform: translate(-6%, 8%) scale(.94); } }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes scanline { 0%, 100% { top: 12%; } 50% { top: 84%; } }
@keyframes blink { 50% { opacity: .2; } }
@keyframes glow { 0%, 100% { opacity: .25; transform: scale(.98); } 50% { opacity: .55; transform: scale(1.02); } }
@keyframes shake { 10%, 90% { transform: translateX(-1px); } 20%, 80% { transform: translateX(3px); } 30%, 50%, 70% { transform: translateX(-6px); } 40%, 60% { transform: translateX(6px); } }
@keyframes pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes ripple { from { transform: scale(1); opacity: .7; } to { transform: scale(1.7); opacity: 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes flashIn { from { filter: brightness(2.2); } to { filter: none; } }
@keyframes confetti { 0% { opacity: 1; transform: translate(-50%, 0) rotate(0); } 100% { opacity: 0; transform: translate(calc(-50% + var(--x)), var(--y)) rotate(var(--r)); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px) scale(.97); } }
@keyframes qrSwap { 0% { opacity: .2; transform: scale(.97); filter: blur(3px); } 100% { opacity: 1; transform: none; filter: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ==========================================================================
   Štampa
   ========================================================================== */
@media print {
  :root { --bg: #fff; --surface: #fff; --surface-2: #f4f5f9; --text: #000; --muted: #555; --border: #ddd; }
  .sidebar, .topbar, .no-print, .banner, .page-head .actions, .filters, .bottom-nav, .toasts, .backdrop { display: none !important; }
  body { background: #fff !important; font-size: 10.5px; color: #000; }
  .content { padding: 0; max-width: none; animation: none; }
  .card, .stat { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
  .card.flush { border: 0; }
  th { background: #f1f2f6 !important; position: static; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  th, td { padding: 4px 6px !important; }
  a { color: inherit; }
  .stat::after { display: none; }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Dorade ---------- */
td .person .name, td .person .meta { white-space: nowrap; }
td .person .meta { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 960px) {
  .page-head .actions > .btn, .page-head .actions > form { flex: 1; }
  .page-head .actions > form .btn { width: 100%; }
}
.card.hero h2 .icon, .card.hero h3 .icon { color: #fff; }

/* ---------- Izbor: počinjem / završavam posao ---------- */
.kind-pick { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.kind-opt {
  display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: 1.05rem .6rem .95rem;
  border: 2px solid var(--border); border-radius: 18px; background: var(--surface); color: var(--text);
  font: inherit; cursor: pointer; transition: border-color .15s, background .15s, transform .1s, box-shadow .15s;
  -webkit-tap-highlight-color: transparent;
}
.kind-opt:active { transform: scale(.97); }
.kind-opt b { font-size: 1rem; line-height: 1.2; }
.kind-opt small { color: var(--muted); font-size: .78rem; }
.kind-opt .k-ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2, var(--border)); color: var(--muted); transition: background .15s, color .15s; }
.kind-opt .k-ico .icon { width: 24px; height: 24px; }
.kind-opt.in.on { border-color: var(--success); background: var(--success-soft); box-shadow: 0 6px 18px -8px var(--success); }
.kind-opt.in.on .k-ico { background: var(--success); color: #fff; }
.kind-opt.out.on { border-color: var(--warning); background: var(--warning-soft); box-shadow: 0 6px 18px -8px var(--warning); }
.kind-opt.out.on .k-ico { background: var(--warning); color: #fff; }
.kind-opt.on small { color: var(--text); font-weight: 600; }
.bio-btn.out { background: linear-gradient(135deg, #f59e0b, #f97316); border-color: transparent; }
.bio-btn.out:not(:disabled)::before { background: linear-gradient(135deg, #f59e0b, #f97316); }

/* ---------- Aplikacija radnika: zarada, tačnost, zahtevi, privatnost ---------- */
.earn-card { background: radial-gradient(420px 200px at 100% -30%, color-mix(in srgb, var(--success) 22%, transparent), transparent 70%), var(--surface); }
.earn-top { display: flex; justify-content: space-between; align-items: center; font-size: .84rem; font-weight: 650; color: var(--muted); }
.earn-top > span:first-child { display: inline-flex; gap: .4rem; align-items: center; }
.earn-top .icon { width: 16px; height: 16px; color: var(--success-text); }
.earn-big { font-family: var(--font-display); font-size: 2.1rem; font-weight: 800; letter-spacing: -.04em; margin: .35rem 0 .7rem; font-variant-numeric: tabular-nums; color: var(--success-text); }
.earn-rows > div { display: flex; justify-content: space-between; gap: .75rem; font-size: .86rem; padding: .38rem 0; border-top: 1px dashed var(--border); }
.earn-rows span { color: var(--muted); }
.earn-rows b { font-variant-numeric: tabular-nums; }
.punct { padding: .8rem .9rem; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.punct .icon { width: 15px; height: 15px; vertical-align: -2px; }
.m-link { display: flex; gap: .9rem; align-items: center; color: var(--text); text-decoration: none; }
.m-link:active { transform: scale(.99); }
.m-link > .icon { color: var(--muted); }
.ml-ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; background: var(--primary-soft); color: var(--primary-text); }
.ml-ico .icon { width: 22px; height: 22px; }
.privacy-card { border: 1.5px solid color-mix(in srgb, var(--primary) 40%, var(--border)); }
.privacy-more { margin-top: .4rem; }
.privacy-more summary { cursor: pointer; font-size: .86rem; font-weight: 600; color: var(--primary-text); }
.privacy-more[open] summary { margin-bottom: .6rem; }
.privacy-text { color: var(--text-2); line-height: 1.55; }
.privacy-text p { margin: 0 0 .65rem; }
.privacy-text ul { margin: 0 0 .65rem; padding-left: 1.1rem; }
.privacy-text li { margin-bottom: .25rem; }
.req-types .choice { margin-bottom: .5rem; padding: .8rem .9rem; }
.req-types .choice .icon { width: 16px; height: 16px; }
.form-row.two { grid-template-columns: 1fr 1fr; }

/* ---------- Vlasnik: zahtevi za ispravku ---------- */
.req-item { padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--border); }
.req-item:last-child { border-bottom: 0; }
.req-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
.req-body { margin: .7rem 0 0 calc(36px + .75rem); font-size: .92rem; }
.req-actions { display: flex; flex-wrap: wrap; gap: .3rem .8rem; align-items: flex-end; margin: .8rem 0 0 calc(36px + .75rem); }
.req-actions .field { margin: 0; min-width: 120px; }
.req-actions .field.grow { flex: 1; min-width: 200px; }
.req-actions .btn-row { margin-bottom: 1px; }
@media (max-width: 600px) { .req-body, .req-actions { margin-left: 0; } .req-item { padding: 1rem; } }

/* ---------- Vlasnik: rang lista tačnosti ---------- */
.rank-row { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr) minmax(80px, 180px) 3.4rem; gap: .9rem; align-items: center; padding: .75rem 1.4rem; border-bottom: 1px solid var(--border); }
.rank-row:last-child { border-bottom: 0; }
.rank-row.first { background: linear-gradient(90deg, color-mix(in srgb, var(--warning-soft) 80%, transparent), transparent 70%); }
.rank-pos { font-size: 1.25rem; text-align: center; font-weight: 700; color: var(--muted); }
.rank-pct { text-align: right; font-weight: 750; }
.medal { font-size: 1.1rem; width: 1.5rem; text-align: center; }
@media (max-width: 600px) { .rank-row { grid-template-columns: 2rem minmax(0, 1fr) 3rem; padding: .7rem 1rem; } .rank-bar { display: none; } }

/* ---------- Vlasnik: Zakon o radu ---------- */
.law-rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .75rem; margin-bottom: 1.25rem; }
.law-rule { display: flex; gap: .8rem; align-items: center; padding: .9rem 1rem; border-radius: var(--r); background: var(--surface); border: 1px solid var(--border); }
.law-rule.bad { border-color: color-mix(in srgb, var(--danger) 45%, var(--border)); background: color-mix(in srgb, var(--danger-soft) 55%, var(--surface)); }
.law-rule .t { font-weight: 650; font-size: .88rem; line-height: 1.3; }
.law-rule .s { font-size: .75rem; color: var(--muted); }
.law-rule .n { font-size: 1.4rem; font-weight: 800; }
.law-rule.ok .n { color: var(--success-text); }
.law-rule.bad .n { color: var(--danger-text); }
.card.hero.law-ok { background: radial-gradient(500px 240px at 90% -20%, rgba(255, 255, 255, .22), transparent 60%), linear-gradient(135deg, #10b981, #059669); box-shadow: 0 20px 40px -18px rgba(16, 185, 129, .7); }
.law-list { padding-left: 1.1rem; color: var(--text-2); }
.law-list li { margin-bottom: .45rem; }

/* ---------- Kalendar i izbor perioda (public/js/datepicker.js) ---------- */
.dp { position: relative; }
.dp-native { position: absolute !important; left: 0; bottom: 0; width: 100% !important; height: 1px !important; opacity: 0; pointer-events: none; padding: 0 !important; border: 0 !important; }
.dp-btn {
  width: 100%; min-height: 42px; display: flex; align-items: center; gap: .6rem; padding: .55rem .8rem; text-align: left; cursor: pointer;
  font: inherit; font-size: .92rem; font-variant-numeric: tabular-nums; color: var(--text); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: 11px; box-shadow: var(--shadow-xs); transition: border-color .15s, box-shadow .15s;
}
.dp-btn .icon { width: 17px; height: 17px; color: var(--primary); flex-shrink: 0; }
.dp-btn:hover { border-color: color-mix(in srgb, var(--primary) 30%, var(--border-strong)); }
.dp-btn.open, .dp-btn:focus-visible { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 4px var(--ring); }
.dp-btn.dp-empty .dp-txt { color: var(--faint); }
.dp-btn .dp-txt { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dp-btn.range { min-width: 260px; }
.dp-btn.range > .icon:last-child { color: var(--faint); transition: transform .2s; }
.dp-btn.range.open > .icon:last-child { transform: rotate(180deg); }
.dp-chip { font-size: .72rem; font-weight: 700; padding: .15rem .5rem; border-radius: 99px; background: var(--primary-soft); color: var(--primary-text); white-space: nowrap; }
.dp.has .dp-btn { padding-right: 2.3rem; }
.dp-clear { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: var(--faint); cursor: pointer; display: none; place-items: center; }
.dp-clear .icon { width: 15px; height: 15px; }
.dp.has .dp-clear { display: grid; }
.dp-clear:hover { background: var(--surface-3); color: var(--text); }
.dp.invalid .dp-btn { border-color: var(--danger); box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 22%, transparent); animation: shake .4s; }

.dp-pop {
  position: fixed; z-index: 600; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: .9rem;
  box-shadow: 0 2px 6px rgba(16, 18, 40, .06), 0 30px 70px -18px rgba(30, 20, 90, .35); opacity: 0; transform: translateY(-6px) scale(.98); transform-origin: top left;
  transition: opacity .18s var(--ease), transform .22s var(--ease); color: var(--text);
}
.dp-pop.show { opacity: 1; transform: none; }
.dp-pop.sheet { left: 0 !important; right: 0; bottom: 0; top: auto !important; border-radius: 24px 24px 0 0; padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom)); transform: translateY(30px); max-height: 88vh; overflow-y: auto; }
.dp-pop.sheet.show { transform: none; }
.dp-backdrop { position: fixed; inset: 0; z-index: 599; background: rgba(8, 8, 24, .45); backdrop-filter: blur(3px); opacity: 0; transition: opacity .2s; }
.dp-backdrop.show { opacity: 1; }
.dp-cal { width: 286px; }
.dp-pop.sheet .dp-cal { width: 100%; }
.dp-head { display: flex; align-items: center; gap: .3rem; margin-bottom: .55rem; }
.dp-title { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: .3rem; font-family: var(--font-display); font-weight: 750; font-size: .98rem; letter-spacing: -.01em; border: 0; background: transparent; color: var(--text); padding: .35rem; border-radius: 9px; cursor: default; }
button.dp-title { cursor: pointer; }
button.dp-title:hover { background: var(--surface-2); }
.dp-title .icon { width: 15px; height: 15px; color: var(--faint); }
.dp-nav { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); display: grid; place-items: center; cursor: pointer; transition: background .15s, transform .15s; }
.dp-nav:hover { background: var(--surface-2); color: var(--text); }
.dp-nav:active { transform: scale(.92); }
.dp-nav .icon { width: 17px; height: 17px; }
.dp-nav-sp { width: 34px; }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 2px; }
.dp-dow { text-align: center; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--faint); padding: .3rem 0 .4rem; }
.dp-dow.we { color: color-mix(in srgb, var(--danger) 55%, var(--faint)); }
.dp-day {
  position: relative; height: 38px; border: 0; background: transparent; color: var(--text); font: inherit; font-size: .88rem; font-weight: 550;
  font-variant-numeric: tabular-nums; cursor: pointer; border-radius: 11px; transition: background .12s, color .12s, transform .12s; z-index: 0;
}
.dp-day:hover:not(:disabled) { background: var(--primary-soft); color: var(--primary-text); }
.dp-day:active:not(:disabled) { transform: scale(.92); }
.dp-day.out { color: var(--faint); opacity: .55; }
.dp-day.we:not(.sel):not(.start):not(.end) { color: color-mix(in srgb, var(--danger) 55%, var(--text)); }
.dp-day.today::after { content: ""; position: absolute; left: 50%; bottom: 5px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--primary); }
.dp-day:disabled { opacity: .28; cursor: not-allowed; }
.dp-day.in { background: var(--primary-soft); color: var(--primary-text); border-radius: 0; }
.dp-day.sel, .dp-day.start, .dp-day.end { background: var(--grad); color: #fff; box-shadow: 0 6px 14px -6px rgba(99, 102, 241, .8); }
.dp-day.start { border-radius: 11px 0 0 11px; }
.dp-day.end { border-radius: 0 11px 11px 0; }
.dp-day.start.end, .dp-day.sel { border-radius: 11px; }
.dp-day.sel.today::after, .dp-day.start.today::after, .dp-day.end.today::after { background: #fff; }
.dp-months { display: grid; grid-template-columns: repeat(3, 1fr); gap: .35rem; }
.dp-month { height: 46px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; transition: all .15s; }
.dp-month:hover { border-color: var(--primary); color: var(--primary-text); }
.dp-month.sel { background: var(--grad); color: #fff; border-color: transparent; }
.dp-foot { display: flex; gap: .4rem; align-items: center; border-top: 1px solid var(--border); margin-top: .6rem; padding-top: .6rem; }
.dp-link { border: 0; background: var(--primary-soft); color: var(--primary-text); font: inherit; font-weight: 650; font-size: .82rem; padding: .4rem .8rem; border-radius: 9px; cursor: pointer; }
.dp-link:hover { filter: brightness(.97); }
.dp-link.muted { background: transparent; color: var(--muted); margin-left: auto; }
.dp-link:disabled { opacity: .4; cursor: not-allowed; }
.dp-range { display: flex; gap: .9rem; }
.dp-presets { display: flex; flex-direction: column; gap: 2px; min-width: 168px; padding-right: .9rem; border-right: 1px solid var(--border); }
.dp-plabel { font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); padding: .3rem .6rem .45rem; }
.dp-preset { text-align: left; border: 0; background: transparent; color: var(--text-2); font: inherit; font-size: .86rem; font-weight: 550; padding: .5rem .7rem; border-radius: 10px; cursor: pointer; transition: background .12s, color .12s; }
.dp-preset:hover { background: var(--surface-2); color: var(--text); }
.dp-preset.on { background: var(--primary-soft); color: var(--primary-text); font-weight: 700; }
.dp-months2 { display: flex; gap: 1.2rem; }
.dp-foot.range { justify-content: flex-end; }
.dp-sum { margin-right: auto; font-size: .84rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.dp-sum b { color: var(--text); }
@media (max-width: 640px) {
  .dp-range { flex-direction: column; gap: .6rem; }
  .dp-presets { flex-direction: row; flex-wrap: wrap; border-right: 0; padding: 0 0 .6rem; border-bottom: 1px solid var(--border); min-width: 0; }
  .dp-plabel { width: 100%; padding: 0 0 .2rem; }
  .dp-preset { padding: .4rem .7rem; background: var(--surface-2); border-radius: 99px; font-size: .8rem; }
  .dp-btn.range { min-width: 0; }
  .dp-sum { width: 100%; }
  .dp-foot.range { flex-wrap: wrap; }
}

/* ---------- Modal ---------- */
.mdl { position: fixed; inset: 0; z-index: 350; display: grid; place-items: center; padding: 1.25rem; }
.mdl-bd { position: absolute; inset: 0; background: rgba(8, 9, 20, .5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: mdlFade .22s var(--ease) both; }
.mdl-box { position: relative; width: min(560px, 100%); max-height: min(86vh, 760px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: 0 30px 80px -20px rgba(10, 12, 40, .45); overflow: hidden; animation: mdlIn .32s var(--spring) both; }
.mdl.wide .mdl-box { width: min(760px, 100%); }
.mdl-head { display: flex; align-items: center; gap: .85rem; padding: 1.15rem 1.3rem 1rem; border-bottom: 1px solid var(--border); }
.mdl-head h3 { margin: 0; font-family: var(--font-display); font-size: 1.12rem; font-weight: 750; letter-spacing: -.02em; line-height: 1.25; }
.mdl-head .sub { font-size: .8rem; color: var(--muted); margin-top: .1rem; }
.mdl-head .grow { flex: 1; min-width: 0; }
.mdl-x { width: 36px; height: 36px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); display: grid; place-items: center; cursor: pointer; flex-shrink: 0; transition: all .15s; }
.mdl-x:hover { color: var(--text); background: var(--surface-3); }
.mdl-x .icon { width: 17px; height: 17px; }
.mdl-body { padding: 1.1rem 1.3rem 1.25rem; overflow-y: auto; overscroll-behavior: contain; }
.mdl-foot { display: flex; gap: .55rem; justify-content: flex-end; flex-wrap: wrap; padding: .9rem 1.3rem; border-top: 1px solid var(--border); background: var(--surface-2); }
.mdl-foot form { margin: 0; }
.mdl-foot .left { margin-right: auto; }
.mdl.out .mdl-bd { animation: mdlFade .18s var(--ease) reverse both; }
.mdl.out .mdl-box { animation: mdlOut .18s var(--ease) both; }
@keyframes mdlFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes mdlIn { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes mdlOut { to { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes mdlUp { from { transform: translateY(100%); } to { transform: none; } }
@media (max-width: 640px) {
  .mdl { place-items: end stretch; padding: 0; }
  .mdl-box { width: 100%; max-height: 88vh; border-radius: 22px 22px 0 0; animation-name: mdlUp; padding-bottom: env(safe-area-inset-bottom); }
  .mdl-box::before { content: ""; position: absolute; top: 7px; left: 50%; width: 38px; height: 4px; margin-left: -19px; border-radius: 9px; background: var(--border-strong); }
}
body.mdl-open { overflow: hidden; }

/* liste u modalu */
.mlist { display: flex; flex-direction: column; }
.mrow { display: flex; align-items: center; gap: .8rem; padding: .75rem 0; border-bottom: 1px solid var(--border); color: var(--text); }
.mrow:first-child { padding-top: 0; }
.mrow:last-child { border-bottom: 0; padding-bottom: 0; }
a.mrow:hover { color: var(--text); }
a.mrow:hover .mrow-t { color: var(--primary-text); }
.mrow .grow { flex: 1; min-width: 0; }
.mrow-t { font-weight: 650; line-height: 1.3; transition: color .15s; }
.mrow-s { font-size: .8rem; color: var(--muted); margin-top: .1rem; }
.mrow-r { text-align: right; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.mrow-r b { display: block; font-size: .98rem; }
.mrow-r span { font-size: .76rem; color: var(--muted); }
.mempty { text-align: center; color: var(--muted); padding: 1.2rem 0 .6rem; }
.mempty .ico-chip { margin: 0 auto .7rem; }

/* klikabilni bedževi (npr. „sumnjivo") */
button.badge { font: inherit; font-size: .72rem; font-weight: 650; cursor: pointer; transition: transform .15s, box-shadow .15s; }
button.badge:hover { transform: translateY(-1px); box-shadow: 0 3px 10px -3px color-mix(in srgb, var(--t) 60%, transparent); }
button.badge .icon { width: 12px; height: 12px; }
.chk-list { list-style: none; margin: .2rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.chk-list li { display: flex; gap: .6rem; align-items: flex-start; font-size: .88rem; line-height: 1.4; }
.chk-list li .icon { width: 17px; height: 17px; flex-shrink: 0; margin-top: 1px; }
.chk-list li.bad .icon { color: var(--warning-text); }
.chk-list li.block .icon { color: var(--danger-text); }
.chk-list li.ok .icon { color: var(--success-text); }
.chk-list li small { display: block; color: var(--muted); font-size: .78rem; }
.scan-box { border: 1px solid var(--border); border-radius: var(--r); padding: .9rem 1rem; background: var(--surface-2); }
.scan-box + .scan-box { margin-top: .75rem; }
.scan-box-h { display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: .92rem; margin-bottom: .65rem; }
.scan-box-h .icon { width: 16px; height: 16px; }
.scan-box-h .spacer { flex: 1; }
.scan-box .kv { font-size: .84rem; gap: .35rem 1rem; margin-top: .7rem; }
.scan-box .photos { margin-top: .7rem; }
.scan-box .photos .thumb { width: 64px; height: 64px; }
.mdl-note { font-size: .82rem; background: var(--primary-soft); color: var(--primary-text); border-radius: var(--r); padding: .7rem .9rem; margin-top: .9rem; display: flex; gap: .55rem; align-items: flex-start; line-height: 1.45; }
.mdl-note .icon { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; }

/* kartice na tabli koje otvaraju modal */
button.stat { width: 100%; text-align: left; font: inherit; cursor: pointer; }
button.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--tone) 35%, var(--border)); }
.stat .stat-more { position: absolute; right: 1rem; bottom: .95rem; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: var(--faint); background: var(--surface-2); transition: all .2s var(--ease); }
.stat .stat-more .icon { width: 14px; height: 14px; }
.stat:hover .stat-more { color: var(--tone-text); background: var(--tone-soft); transform: translateX(2px); }

/* ---------- Panel obaveštenja (zvonce) ---------- */
.notif-wrap { position: relative; display: inline-flex; }
.notif { position: absolute; right: 0; top: calc(100% + 10px); width: 400px; max-width: calc(100vw - 1.5rem); background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 24px 60px -16px rgba(10, 12, 40, .35); z-index: 120; overflow: hidden; transform-origin: top right; animation: notifIn .26s var(--spring) both; display: flex; flex-direction: column; max-height: min(620px, calc(100vh - 90px)); }
.notif[hidden] { display: none; }
@keyframes notifIn { from { opacity: 0; transform: translateY(-6px) scale(.96); } to { opacity: 1; transform: none; } }
.notif-h { display: flex; align-items: center; gap: .6rem; padding: .95rem 1.1rem .8rem; border-bottom: 1px solid var(--border); }
.notif-h h3 { margin: 0; font-size: 1rem; font-family: var(--font-display); font-weight: 750; }
.notif-h .spacer { flex: 1; }
.notif-list { overflow-y: auto; overscroll-behavior: contain; flex: 1; }
.notif-item { display: flex; gap: .75rem; padding: .8rem 1.1rem; border-bottom: 1px solid var(--border); color: var(--text); position: relative; transition: background .15s; }
.notif-item:last-child { border-bottom: 0; }
.notif-item:hover { background: var(--surface-2); color: var(--text); }
.notif-item.unread { background: linear-gradient(90deg, color-mix(in srgb, var(--primary-soft) 75%, transparent), transparent 70%); }
.notif-item.unread::after { content: ""; position: absolute; right: 1rem; top: 1.05rem; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 3px var(--ring); }
.notif-item .grow { flex: 1; min-width: 0; padding-right: .8rem; }
.notif-item .t { font-weight: 650; font-size: .88rem; line-height: 1.3; }
.notif-item .m { font-size: .8rem; color: var(--text-2); margin-top: .15rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.notif-item .w { font-size: .72rem; color: var(--muted); margin-top: .25rem; }
.notif-empty { padding: 2.2rem 1.2rem; text-align: center; color: var(--muted); font-size: .88rem; }
.notif-empty .ico-chip { margin: 0 auto .7rem; }
.notif-f { display: flex; gap: .5rem; padding: .75rem 1rem; border-top: 1px solid var(--border); background: var(--surface-2); }
.notif-f .btn { flex: 1; justify-content: center; }
@media (max-width: 640px) {
  .notif { position: fixed; left: .6rem; right: .6rem; top: 64px; width: auto; max-width: none; }
}

/* ---------- Instaliraj aplikaciju (radnik) ---------- */
.install { position: relative; overflow: hidden; border-radius: 22px; padding: 1.05rem 1.1rem 1.1rem; margin: 0 0 1rem; color: #fff; background: linear-gradient(135deg, #4f46e5, #7c3aed 55%, #c026d3); box-shadow: 0 18px 40px -18px rgba(124, 58, 237, .8); animation: mdlIn .45s var(--spring) both; }
.install[hidden] { display: none; }
.install::before { content: ""; position: absolute; right: -50px; top: -60px; width: 190px; height: 190px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .28), transparent 65%); pointer-events: none; }
.install-top { display: flex; gap: .85rem; align-items: center; position: relative; padding-right: 1.6rem; }
.install-app { width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0; box-shadow: 0 6px 16px -4px rgba(0, 0, 0, .35); }
.install-top b { display: block; font-family: var(--font-display); font-size: 1.04rem; letter-spacing: -.01em; }
.install-top span { font-size: .8rem; opacity: .88; line-height: 1.35; display: block; }
.install-x { position: absolute; top: .7rem; right: .7rem; width: 30px; height: 30px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .16); color: #fff; display: grid; place-items: center; cursor: pointer; z-index: 1; }
.install-x .icon { width: 15px; height: 15px; }
.install-btn { margin-top: .9rem; width: 100%; height: 46px; border: 0; border-radius: 14px; background: #fff; color: #4f46e5; font: inherit; font-weight: 750; font-size: .95rem; display: flex; align-items: center; justify-content: center; gap: .5rem; cursor: pointer; box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .35); position: relative; }
.install-btn .icon { width: 18px; height: 18px; }
.install-steps { list-style: none; margin: .9rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .45rem; position: relative; counter-reset: st; }
.install-steps li { display: flex; align-items: center; gap: .65rem; background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .16); border-radius: 13px; padding: .55rem .7rem; font-size: .86rem; line-height: 1.3; counter-increment: st; }
.install-steps li::before { content: counter(st); width: 22px; height: 22px; border-radius: 50%; background: #fff; color: #5b21b6; font-weight: 800; font-size: .74rem; display: grid; place-items: center; flex-shrink: 0; }
.install-steps li b { font-weight: 750; }
.install-steps .ios-ico { width: 32px; height: 32px; border-radius: 9px; background: #fff; color: #0a84ff; display: grid; place-items: center; flex-shrink: 0; margin-left: auto; }
.install-steps .ios-ico svg { width: 19px; height: 19px; }
.install-hint { position: relative; font-size: .75rem; opacity: .85; margin: .65rem 0 0; display: flex; gap: .4rem; align-items: flex-start; line-height: 1.4; }
.install-hint .icon { width: 14px; height: 14px; flex-shrink: 0; margin-top: 1px; }
.install-arrow { position: fixed; left: 50%; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 90; color: #fff; background: #5b21b6; padding: .5rem .85rem; border-radius: 99px; font-size: .78rem; font-weight: 700; display: flex; gap: .4rem; align-items: center; box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .5); animation: bob 1.4s ease-in-out infinite; white-space: nowrap; }
.install-arrow[hidden] { display: none; }
.install-arrow svg { width: 16px; height: 16px; }
@keyframes bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 5px); } }

/* ---------- Spojena evidencija ---------- */
tr.ev-attempt td { background: var(--row-block); }
.ev-kind { display: inline-flex; align-items: center; gap: .3rem; font-size: .74rem; color: var(--muted); font-weight: 600; }
.ev-kind .icon { width: 13px; height: 13px; }
.install [hidden], .install-arrow[hidden], .install[hidden] { display: none !important; }
.install-steps small { color: rgba(255, 255, 255, .78) !important; font-weight: 500; }
button.stat .progress { margin-right: 2.3rem; }

/* ---------- Pomoćno ---------- */
.mb-3 { margin-bottom: 1.5rem; }
.section-title { display: flex; align-items: center; gap: .5rem; font-size: 1rem; font-weight: 750; margin: 0 0 .75rem; color: var(--text-2); }
.section-title .icon { width: 18px; height: 18px; color: var(--primary-text); }
.seg button { padding: .5rem .9rem; font: inherit; font-size: .86rem; color: var(--muted); font-weight: 600; border-radius: 8px; border: 0; background: transparent; cursor: pointer; transition: all .15s; }
.seg button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--border); }
.seg.block { display: flex; width: 100%; }
.seg.block > * { flex: 1; justify-content: center; }
.link-btn { border: 0; background: none; padding: 0; font: inherit; color: var(--muted); text-decoration: underline; cursor: pointer; }
.link-btn:hover { color: var(--danger-text); }

/* zahtevi za slobodan dan (vlasnik) */
.leave-when { display: flex; align-items: center; gap: .7rem; }
.leave-when .date-chip { width: 46px; height: 50px; border-radius: 14px; background: var(--success-soft); color: var(--success-text); display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; line-height: 1.05; }
.leave-when .date-chip b { font-family: var(--font-display); font-size: 1.15rem; font-weight: 750; }
.leave-when .date-chip span { font-size: .62rem; text-transform: uppercase; font-weight: 700; letter-spacing: .05em; }
.leave-dash { color: var(--faint); font-weight: 700; }
.leave-warn { display: inline-flex; gap: .4rem; align-items: center; font-size: .8rem; color: var(--warning-text); background: var(--warning-soft); padding: .35rem .65rem; border-radius: 9px; }
.leave-warn .icon { width: 14px; height: 14px; }

/* ---------- Skener QR koda (radnik) ---------- */
.scan-btn { height: 58px; font-size: 1.05rem; }
.scan-btn .icon { width: 22px; height: 22px; }
.qrs { position: fixed; inset: 0; z-index: 500; background: #000; color: #fff; animation: mdlFade .2s ease both; overflow: hidden; }
.qrs.out { animation: mdlFade .2s ease reverse both; }
.qrs video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.qrs-shade { position: absolute; left: 50%; top: 46%; width: min(72vw, 300px); aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 28px; box-shadow: 0 0 0 200vmax rgba(5, 6, 15, .62); }
.qrs-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: calc(14px + env(safe-area-inset-top)) 16px 14px; font-size: 1.02rem; }
.qrs-btn { width: 44px; height: 44px; border-radius: 14px; border: 0; background: rgba(255, 255, 255, .16); color: #fff; display: grid; place-items: center; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); cursor: pointer; }
.qrs-btn[hidden] { visibility: hidden; display: grid; }
.qrs-btn svg { width: 22px; height: 22px; }
.qrs-btn.on { background: #fde047; color: #111; }
.qrs-frame { position: absolute; left: 50%; top: 46%; width: min(72vw, 300px); aspect-ratio: 1; transform: translate(-50%, -50%); }
.qrs-frame i { position: absolute; width: 46px; height: 46px; border: 5px solid #fff; transition: border-color .2s; }
.qrs-frame i:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; border-radius: 26px 0 0 0; }
.qrs-frame i:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; border-radius: 0 26px 0 0; }
.qrs-frame i:nth-child(3) { left: 0; bottom: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 26px; }
.qrs-frame i:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; border-radius: 0 0 26px 0; }
.qrs-line { position: absolute; left: 10%; right: 10%; height: 3px; border-radius: 3px; background: linear-gradient(90deg, transparent, #a78bfa, #f0abfc, #a78bfa, transparent); box-shadow: 0 0 18px #a78bfa; animation: qrsLine 2.2s ease-in-out infinite; }
@keyframes qrsLine { 0%, 100% { top: 12%; } 50% { top: 86%; } }
.qrs.ok .qrs-frame i { border-color: #34d399; }
.qrs.ok .qrs-line { display: none; }
.qrs-msg { position: absolute; left: 24px; right: 24px; top: calc(46% + min(36vw, 150px) + 28px); text-align: center; margin: 0; font-weight: 600; font-size: .98rem; text-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
.qrs-msg.err { color: #fda4af; }
.qrs.ok .qrs-msg { color: #6ee7b7; }
