/* ULTRA Time - aplikacija: osnova, layout, komponente. Zavisi od tokens.css. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
body { margin: 0; min-height: 100%; font-family: var(--font); font-size: var(--fs); line-height: 22px; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; font-feature-settings: 'cv11', 'ss01'; }
body.no-scroll { overflow: hidden; }
/* naslovi: Manrope 700 od 20 px (h1 32/40, h2 24/32, h3 20/28 600), h4 Inter 16/24 600 */
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 700; color: var(--ink); }
h1 { font-size: 32px; line-height: 40px; letter-spacing: -0.02em; }
h2 { font-size: 24px; line-height: 32px; letter-spacing: -0.015em; }
h3 { font-size: 20px; line-height: 28px; font-weight: 600; letter-spacing: -0.01em; }
h4 { font-size: 16px; line-height: 24px; font-family: var(--font-sans); font-weight: 600; }
p { margin: 0; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: not-allowed; opacity: var(--opacity-disabled); }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
img, svg { display: block; max-width: 100%; }
code, .mono { font-family: var(--font-mono); font-size: 13px; font-weight: 500; }
.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: var(--fs-sm); }
.xs { font-size: var(--fs-xs); }
.strong { font-weight: 600; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.col { display: flex; flex-direction: column; gap: 12px; }
.grow { flex: 1 1 auto; min-width: 0; }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.grid { display: grid; gap: 16px; }
.grid > * { min-width: 0; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.grid.main-side { grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); }
@media (max-width: 1100px) { .grid.cols-4, .grid.cols-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.main-side { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .grid.cols-2, .grid.cols-3, .grid.cols-4, .grid.cols-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.cols-2.stack, .grid.cols-3.stack { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------------------------ ljuska uprave: svijetli u-sidebar 256 + u-topbar 56 + sadržaj na surface-alt */
.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; width: auto; height: 100vh; height: 100dvh; overflow-y: auto; overscroll-behavior: contain; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.u-sidebar__group { font-size: 12px; }
.u-sidebar__item:hover { text-decoration: none; }
.sidebar-foot { display: flex; align-items: center; gap: 12px; }
.sidebar-foot .who { min-width: 0; flex: 1; }
.sidebar-foot .who b { display: block; color: var(--ink); font-weight: 600; font-size: 13px; line-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-foot .who span { display: block; color: var(--ink-muted); font-size: 13px; line-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { padding: 0 32px; }
.topbar .search { flex: 1; max-width: 420px; }
.topbar .spacer { flex: 1; }
.content { padding: 32px 32px 64px; max-width: var(--content-max-wide); width: 100%; margin: 0 auto; }
.topbar .hamburger, .topbar .search-toggle, .topbar .search-close { display: none; }
@media (min-width: 641px) { .phone-only { display: none !important; } }
.hamburger .count { position: absolute; top: -4px; right: -4px; }
.topbar-me { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; border-radius: var(--radius-pill); color: inherit; }
.topbar-me:hover { text-decoration: none; }
/* logotip: svijetla ili tamna verzija prema temi (samo zvanični SVG) */
.logo-pair { display: inline-flex; }
.logo-pair .logo-dark { display: none; }
[data-theme="dark"] .logo-pair .logo-light { display: none; }
[data-theme="dark"] .logo-pair .logo-dark { display: block; }
.u-lockup:hover { text-decoration: none; }

@media (max-width: 1000px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(280px, 85vw); z-index: var(--z-sheet); transform: translateX(-100%); transition: transform var(--duration-exit) var(--ease-exit); height: 100dvh; }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); transition: transform var(--duration-slow) var(--ease-emphasized); }
  .scrim { position: fixed; inset: 0; background: var(--overlay); z-index: calc(var(--z-sheet) - 1); animation: u-fade-in var(--duration-base) var(--ease-standard) both; }
  .topbar .hamburger { display: inline-flex; }
  .topbar { padding: env(safe-area-inset-top) 12px 0; height: calc(var(--topbar-app) + env(safe-area-inset-top)); gap: 8px; }
  .content { padding: 20px 16px calc(48px + env(safe-area-inset-bottom)); }
  .topbar .search { display: none; }
  .topbar .search-toggle { display: inline-flex; }
  .topbar.searching .search { display: flex; align-items: center; gap: 8px; position: absolute; left: 12px; right: 12px; bottom: 8px; max-width: none; z-index: 3; background: var(--surface-raised); }
  .topbar.searching .search .u-input { flex: 1; }
  .topbar.searching .search .search-close { display: inline-flex; flex-shrink: 0; }
  .shell, .main { overflow-x: clip; }
}

/* ------------------------------------------------------------------ ljuska zaposlenog (telefon): Lockup gore, u-bottom-nav dolje */
.mshell { overflow-x: clip; min-height: 100dvh; display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; background: var(--bg); }
.mtop { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) 16px 8px; position: sticky; top: 0; z-index: var(--z-header); background: var(--bg); }
.mtop .back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding-right: 8px; color: var(--ink-muted); text-decoration: none; font-weight: 600; }
.mtop .back:hover { text-decoration: none; }
.mtop .u-lockup { min-height: 44px; }
.mcontent { flex: 1; min-width: 0; padding: 12px 16px calc(96px + env(safe-area-inset-bottom)); }
.mnav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 560px; height: calc(var(--bottom-nav) + env(safe-area-inset-bottom)); z-index: var(--z-header); }
.u-bottom-nav__item { font-size: 12px; line-height: 16px; min-height: 48px; }
.u-bottom-nav__item:hover { text-decoration: none; }

/* ------------------------------------------------------------------ zaglavlje stranice */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head .eyebrow { font-size: 12px; line-height: 16px; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); font-weight: 600; margin-bottom: 8px; }
.page-head p { color: var(--muted); margin-top: 4px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 24px 0 12px; }
.section-title h3 { font-size: var(--fs-md); font-family: var(--font); font-weight: 600; }

/* ------------------------------------------------------------------ kartice i KPI (u-card, u-stat iz sistema; ovdje samo dopune) */
/* meniji i iskačući prozori unutar kartice ne smiju biti odsječeni, pa uglove nose djeca */
.u-card { overflow: visible; }
.u-card > :first-child { border-top-left-radius: inherit; border-top-right-radius: inherit; }
.u-card > :last-child { border-bottom-left-radius: inherit; border-bottom-right-radius: inherit; }
.u-card.pad { padding: 20px; }
.u-card.pad-sm { padding: 12px 16px; }
.u-card__header h3 { font: 600 16px/24px var(--font-sans); letter-spacing: 0; }
.u-card__body.col, .u-card__body.row { display: flex; }
.kpi { min-height: 112px; }
.kpi .u-stat__label .ic { width: var(--icon-sm); height: var(--icon-sm); color: var(--accent); }
.kpi.u-stat--navy .u-stat__label .ic { color: var(--teal-light); }
.kpi.clickable { cursor: pointer; text-align: left; width: 100%; transition: transform var(--duration-base) var(--ease-emphasized), box-shadow var(--duration-base) var(--ease-standard), border-color var(--duration-base) var(--ease-standard); }
.kpi.clickable:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: var(--hairline-strong); }

/* ------------------------------------------------------------------ dugmad (u-btn iz sistema; ovdje samo dopune) */
.u-btn--icon .dot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger-solid); border: 2px solid var(--surface-raised); }
.u-btn--icon { flex-shrink: 0; }

/* ------------------------------------------------------------------ forme (u-field, u-input, u-select, u-textarea, u-choice, u-switch, u-alert iz sistema) */
.label { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--ink-secondary); }
.search { position: relative; }
.search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: var(--icon-sm); height: var(--icon-sm); color: var(--ink-muted); pointer-events: none; }
.search .u-input { padding-left: 40px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .span-2 { grid-column: span 2; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } .form-grid .span-2 { grid-column: span 1; } }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.u-alert { align-items: flex-start; }
.u-alert > :not(.u-icon) { flex: 1 1 auto; min-width: 0; }
.u-alert.small { font-size: 13px; line-height: 18px; }
.plain-list { margin: 0; padding-left: 16px; }

/* ------------------------------------------------------------------ tabele (u-table, u-table-wrap iz sistema) */
/* tabela u kartici: okvir nosi kartica */
.u-card > .u-table-wrap, .u-card > .tbl > .u-table-wrap { border: 0; background: transparent; }
.u-card > .u-table-wrap:not(:first-child), .u-card > .tbl:not(:first-child) > .u-table-wrap { border-top-left-radius: 0; border-top-right-radius: 0; }
.u-table tbody tr.clickable { cursor: pointer; }
.u-table .actions-cell { text-align: right; white-space: nowrap; }
.u-table td.u-table__num, .u-table th.u-table__num { text-align: right; }

/* ------------------------------------------------------------------ bedževi (u-badge iz sistema) */
.tenant-badge { height: 32px; padding: 0 12px; font-size: 13px; }

/* smjene u rasporedu */
.shift-chip { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 32px; padding: 0 8px; border-radius: var(--radius-md); font-weight: 700; font-size: var(--fs-sm); letter-spacing: .01em; border: 1px solid transparent; position: relative; cursor: pointer; transition: box-shadow var(--duration-fast) var(--ease-standard); }
.shift-chip:hover { box-shadow: 0 0 0 2px var(--accent-border); }
.shift-chip.mint { background: var(--shift-mint-bg); color: var(--shift-mint-ink); }
.shift-chip.teal { background: var(--shift-teal-bg); color: var(--shift-teal-ink); }
.shift-chip.ink { background: var(--shift-ink-bg); color: var(--shift-ink-ink); }
.shift-chip.amber { background: var(--shift-amber-bg); color: var(--shift-amber-ink); }
.shift-chip.gray { background: var(--shift-gray-bg); color: var(--shift-gray-ink); font-weight: 600; }
.shift-chip.coral { background: var(--shift-coral-bg); color: var(--shift-coral-ink); }
.shift-chip.locked::after { content: ''; position: absolute; right: -3px; top: -3px; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); border: 2px solid var(--surface-raised); }
.shift-chip.selected { box-shadow: 0 0 0 2px var(--mint); }
.shift-chip.conflict { box-shadow: 0 0 0 2px var(--danger); }
.shift-chip.custom { flex-direction: column; gap: 0; height: auto; min-height: 32px; padding: 4px 8px; line-height: 1.2; }
.shift-chip .t { font-size: var(--fs-xs); font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.popover .pop-time { display: flex; flex-direction: column; gap: 8px; padding: 4px 12px; }
.popover .pop-time .u-field { flex: 1 1 0; min-width: 0; }
.popover .pop-time .u-input { width: 100%; }

/* ------------------------------------------------------------------ osoba (u-avatar iz sistema) */
.person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.person .name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person .sub { font-size: 13px; line-height: 18px; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ------------------------------------------------------------------ tabovi, segmenti, chipovi (u-tabs, u-segmented, u-chip iz sistema) */
.u-tabs, .u-segmented { max-width: 100%; }
.u-tab, .u-segmented__item { flex-shrink: 0; white-space: nowrap; }
.hscroll { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.hscroll::-webkit-scrollbar { display: none; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ prazno stanje, učitavanje (u-empty, u-spinner, u-skeleton iz sistema) */
.u-empty > .ic { width: 26px; height: 26px; color: var(--accent); }
.u-empty > h4 { color: var(--ink); }
.u-empty > p { max-width: 360px; }
.loader { animation: u-fade-in var(--duration-base) var(--ease-standard) .3s both; display: flex; align-items: center; justify-content: center; padding: 40px; color: var(--ink-muted); gap: 12px; }

/* ------------------------------------------------------------------ dijalog i sheet (u-scrim, u-dialog, u-sheet iz sistema; otvaranje i zatvaranje kroz Ultra.open / Ultra.close) */
.u-dialog { max-height: calc(100dvh - 32px); }
.u-dialog__header, .u-dialog__footer, .u-sheet__header, .u-sheet__footer { flex-shrink: 0; }
.u-dialog__body { flex: 1 1 auto; min-height: 0; overscroll-behavior: contain; }
.u-dialog__footer { flex-wrap: wrap; }
@media (max-width: 640px) {
  /* telefon: dijalog je panel od dna (sheet), izlazi istim putem */
  .u-scrim:not(.u-scrim--sheet) { place-items: end stretch; padding: 0; }
  .u-dialog { max-width: none; max-height: 92dvh; border-radius: var(--radius-xl) var(--radius-xl) 0 0; border-bottom: 0; animation-name: u-slide-up; }
  .u-dialog[data-state="closing"] { animation-name: u-slide-down; }
  .u-dialog__header { padding: 16px 16px 12px; }
  .u-dialog__body { padding: 0 16px 16px; }
  .u-dialog__footer { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .u-dialog__footer > .u-btn { flex: 1 1 0; min-width: 0; }
  .u-sheet { width: 100%; border-left: 0; }
}

/* ------------------------------------------------------------------ toast (u-toast iz sistema, Time: --light) */
.u-toast--light.u-toast--success .u-icon { color: var(--success); }
.u-toast--light.u-toast--danger .u-icon { color: var(--danger); }
@media (max-width: 640px) {
  .u-toast-stack { left: 16px; right: 16px; width: auto; bottom: calc(16px + env(safe-area-inset-bottom)); }
  body:has(.mnav) .u-toast-stack { bottom: calc(88px + env(safe-area-inset-bottom)); }
}

/* ------------------------------------------------------------------ liste i stavke */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.list-item:last-child { border-bottom: 0; }
.list-item .body { flex: 1; min-width: 0; }
.list-item .title { font-weight: 600; }
.list-item .sub { font-size: var(--fs-sm); color: var(--muted); margin-top: 2px; }
.list-item.clickable { cursor: pointer; }
.list-item.clickable:hover { background: var(--surface-2); }
/* prvi koraci nove firme (Pregled) */
ol.list { list-style: none; margin: 0; padding: 0; }
.setup-steps .list-item > .ic { color: var(--ink-muted); flex: none; }
.setup-steps .list-item:has(.u-badge--success) > .ic { color: var(--success); }
.setup-steps .list-item .u-btn { flex: none; }
.dl { display: grid; grid-template-columns: 160px 1fr; gap: 8px 16px; font-size: var(--fs); }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; font-weight: 500; }
@media (max-width: 640px) { .dl { grid-template-columns: 120px 1fr; } }
.timeline { position: relative; padding-left: 24px; display: flex; flex-direction: column; gap: 16px; }
.timeline::before { content: ''; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.timeline .t-item { position: relative; }
.timeline .t-item::before { content: ''; position: absolute; left: -20px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface-raised); border: 2px solid var(--brand); }
.timeline .t-item.pending::before { border-color: var(--warning); }
.timeline .t-item.rejected::before { border-color: var(--danger); background: var(--danger-soft); }

/* ------------------------------------------------------------------ raspored (grid) */
.sched { min-width: 760px; }
.sched th, .sched td { text-align: center; padding: 8px 4px; }
.sched th:first-child, .sched td:first-child { text-align: left; position: sticky; left: 0; background: var(--surface-raised); z-index: 2; min-width: 190px; padding-left: 16px; }
.sched .shift-chip { min-width: 40px; padding: 0 8px; }
.grid.main-side.sched-layout { grid-template-columns: minmax(0, 2.6fr) minmax(280px, 1fr); }
@media (max-width: 1100px) { .grid.main-side.sched-layout { grid-template-columns: minmax(0, 1fr); } }
.sched th:first-child { background: var(--surface-2); z-index: 3; }
.sched th.today, .sched td.today { background: var(--mint-soft); }
.sched th .d { display: block; font-size: var(--fs-xs); text-transform: none; letter-spacing: 0; color: var(--faint); font-weight: 500; margin-top: 2px; }
.sched .cov { font-size: var(--fs-xs); color: var(--muted); display: flex; flex-direction: column; gap: 4px; align-items: center; }
.sched .cov span { display: inline-flex; gap: 4px; align-items: center; }
.sched .cov .ok { color: var(--success); }
.sched .cov .bad { color: var(--danger); font-weight: 600; }
.sched td.total { font-variant-numeric: tabular-nums; font-size: var(--fs-sm); color: var(--muted); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: var(--fs-xs); color: var(--muted); align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 14px; height: 14px; border-radius: var(--radius-sm); display: inline-block; }
.popover { position: absolute; z-index: 70; background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 12px; display: flex; flex-direction: column; gap: 8px; min-width: 220px; animation: u-scale-in var(--duration-base) var(--ease-emphasized) both; transform-origin: top left; }
.popover .opt { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: var(--radius-md); width: 100%; text-align: left; font-weight: 500; }
.popover .opt:hover { background: var(--surface-2); }
.popover .opt .shift-chip { min-width: 38px; height: 26px; font-size: var(--fs-xs); pointer-events: none; }

/* ------------------------------------------------------------------ grafikon (sedmični) */
.bars { display: flex; align-items: flex-end; gap: 12px; height: 150px; padding: 8px 4px 0; }
.bars .b { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; min-width: 0; }
.bars .b .stack { width: 100%; max-width: 44px; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; position: relative; }
.bars .b .plan { position: absolute; left: 0; right: 0; border-top: 2px dashed var(--border-strong); }
.bars .b .fill { background: var(--brand); border-radius: var(--radius-xs) var(--radius-xs) 0 0; min-height: 3px; transition: height var(--duration-reveal) var(--ease-emphasized); }
.bars .b.today .fill { background: var(--mint); }
.bars .b .lbl { font-size: var(--fs-xs); color: var(--muted); font-weight: 600; }
.bars .b .val { font-size: 13px; color: var(--faint); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ mobilna početna */
.hero-status { border-radius: var(--radius-xl); padding: 20px; background: var(--surface-raised); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.hero-status .state { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.hero-status .state .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--faint); }
.hero-status.on .state .dot { background: var(--success); box-shadow: 0 0 0 4px var(--success-soft); }
.hero-status.break .state .dot { background: var(--warning); box-shadow: 0 0 0 4px var(--warning-soft); }
.hero-status.exit .state .dot { background: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.hero-status .timer { font-family: var(--font-display); font-size: 48px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; margin: 16px 0 4px; font-variant-numeric: tabular-nums; }
.hero-status .sub { color: var(--muted); font-size: var(--fs-sm); }
.nfc-cta { margin-top: 16px; border-radius: var(--radius-xl); padding: 20px; border: 1.5px dashed var(--mint); background: var(--mint-soft); display: flex; gap: 16px; align-items: center; }
.nfc-cta .ring { width: 54px; height: 54px; border-radius: 50%; background: var(--surface-raised); display: flex; align-items: center; justify-content: center; color: var(--brand); position: relative; flex-shrink: 0; }
.nfc-cta .ring .ic { width: 26px; height: 26px; }
.nfc-cta b { display: block; color: var(--brand-ink); }
.nfc-cta span { font-size: var(--fs-sm); color: var(--muted); }
.action-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 16px; }
.action-btn { border-radius: var(--radius-xl); padding: 16px; background: var(--surface-raised); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; align-items: flex-start; text-align: left; transition: transform var(--duration-base) var(--ease-emphasized), box-shadow var(--duration-base) var(--ease-standard); min-height: 84px; }
.action-btn:hover { box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.action-btn .ic { width: 22px; height: 22px; color: var(--brand); }
.action-btn b { font-size: var(--fs); }
.action-btn.primary { background: var(--brand); border-color: var(--brand); color: var(--ink-on-accent); }
.action-btn.primary .ic { color: inherit; }
.action-btn.danger { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.action-btn.danger .ic { color: var(--danger); }
.mini-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.mini-tiles div { background: var(--surface-2); border-radius: var(--radius-lg); padding: 12px 12px; }
.mini-tiles small { display: block; font-size: var(--fs-xs); color: var(--muted); }
.mini-tiles b { display: block; font-size: var(--fs-md); margin-top: 2px; font-variant-numeric: tabular-nums; }
.day-card { border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface-raised); padding: 12px 16px; display: flex; gap: 12px; align-items: center; }
.day-card .date { width: 46px; text-align: center; flex-shrink: 0; }
.day-card .date b { display: block; font-size: 18px; font-family: var(--font-display); line-height: 1; }
.day-card .date span { font-size: var(--fs-xs); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.day-card.today { border-color: var(--mint); background: var(--mint-soft); }
.day-card.off { opacity: .8; }

/* ------------------------------------------------------------------ auth */
.auth { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth .side { background: var(--navy); color: var(--ink-on-navy); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth .side h2 { color: var(--ink-on-navy); font-size: 34px; max-width: 460px; line-height: 1.15; }
.auth .side p { color: var(--ink-on-navy-muted); max-width: 440px; margin-top: 16px; font-size: var(--fs-md); }
.auth .side .u-lockup img { height: 32px; }
.auth .side ul { list-style: none; padding: 0; margin: 32px 0 0; display: flex; flex-direction: column; gap: 12px; color: var(--ink-on-navy-muted); }
.auth .side li { display: flex; gap: 12px; align-items: center; }
.auth .side li .ic { width: 18px; height: 18px; color: var(--teal-light); }
.auth .pane { display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.auth .box { width: 100%; max-width: 400px; }
.auth .box h1 { font-size: 28px; margin-bottom: 8px; }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth .side { display: none; } }

/* ------------------------------------------------------------------ scan stranica */
.scan { max-width: 520px; margin: 0 auto; padding: 16px; display: flex; flex-direction: column; gap: 16px; min-height: 100dvh; }
.scan .tag-card { border-radius: var(--radius-xl); padding: 20px; background: var(--surface-raised); border: 1px solid var(--border); display: flex; gap: 16px; align-items: center; }
.scan .tag-card .ring { width: 52px; height: 52px; border-radius: var(--radius-xl); background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.scan .tag-card .ring .ic { width: 26px; height: 26px; }
.geo-line { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--muted); }
.geo-line .ic { width: 16px; height: 16px; }
.geo-line.ok { color: var(--success); }
.geo-line.bad { color: var(--danger); }
.result { border-radius: var(--radius-xl); padding: 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; animation: u-fade-up var(--duration-slow) var(--ease-emphasized) both; }
.result .big { width: 68px; height: 68px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.result .big .ic { width: 34px; height: 34px; }
.result.ok { background: var(--success-soft); color: var(--success); }
.result.ok .big { background: var(--success-solid); color: var(--off-white); }
.result.review { background: var(--warning-soft); color: var(--warning); }
.result.review .big { background: var(--warning-solid); color: var(--navy); }
.result.rejected { background: var(--danger-soft); color: var(--danger); }
.result.rejected .big { background: var(--danger-solid); color: var(--ink-on-danger); }
.result h3 { color: inherit; }
.result p { color: var(--ink-2); }

/* ------------------------------------------------------------------ kiosk */
.kiosk { min-height: 100dvh; background: var(--navy); color: var(--ink-on-navy); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; }
.kiosk .panel { width: 100%; max-width: 520px; background: var(--surface-raised); color: var(--ink); border-radius: var(--radius-xl); padding: 32px; box-shadow: var(--shadow-lg); }
.kiosk .keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.kiosk .keypad button { display: inline-flex; align-items: center; justify-content: center; height: 64px; border-radius: var(--radius-xl); background: var(--surface-2); border: 1px solid var(--border); font-size: 24px; font-weight: 600; transition: background-color var(--duration-instant) var(--ease-standard); }
.kiosk .keypad button:active { background: var(--brand-soft); }
.kiosk .keypad button.ok { background: var(--accent); border-color: var(--accent); color: var(--ink-on-accent); }
.kiosk-lockup { margin-bottom: 24px; }
.kiosk-lockup img { height: 32px; }
.kiosk .pin-dots { display: flex; gap: 12px; justify-content: center; margin: 16px 0 4px; }
.kiosk .pin-dots i { width: 14px; height: 14px; border-radius: 50%; background: var(--border-strong); }
.kiosk .pin-dots i.on { background: var(--brand); }
.kiosk .big-actions { display: grid; gap: 12px; margin-top: 16px; }
.kiosk .big-actions .u-btn { height: 60px; font-size: 17px; border-radius: var(--radius-xl); }
.kiosk .clock { font-family: var(--font-display); font-size: 64px; line-height: 68px; font-weight: 700; letter-spacing: -0.03em; color: var(--ink-on-navy); margin-bottom: 20px; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ prisutnost (live) */
.live-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.live-card { border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface-raised); padding: 12px 16px; display: flex; gap: 12px; align-items: center; }
.live-card .st { width: 10px; height: 10px; border-radius: 50%; background: var(--faint); flex-shrink: 0; }
.live-card.ON_DUTY .st { background: var(--success); }
.live-card.ON_BREAK .st { background: var(--warning); }
.live-card.ON_BUSINESS_EXIT .st, .live-card.ON_PRIVATE_EXIT .st { background: var(--brand); }
.live-card.LEAVE .st { background: var(--danger); }

/* ------------------------------------------------------------------ padajući meni (u-menu iz sistema) */
.menu-host { position: relative; display: inline-block; }
.menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: var(--z-dropdown); }
.notif-panel { width: min(400px, calc(100vw - 32px)); max-height: 70vh; overflow: auto; }
.notif { display: flex; gap: 12px; padding: 12px; border-radius: var(--radius-md); align-items: flex-start; }
.notif.unread { background: var(--accent-soft); }
.notif .t { font-weight: 600; font-size: 13px; }
.notif .b { font-size: 13px; color: var(--ink-muted); }
.notif time { font-size: 13px; color: var(--ink-muted); white-space: nowrap; }

/* ------------------------------------------------------------------ print */
@media print { .sidebar, .topbar, .mnav, .u-toast-stack, .page-head .actions { display: none !important; } .shell { grid-template-columns: 1fr; } .content { padding: 0; } .u-card { box-shadow: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---- boot (prije učitavanja modula) ---- */
.boot { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; color: var(--ink); }
.boot .logo-pair img { height: 40px; width: auto; }

/* ------------------------------------------------------------------ tabela kao lista kartica (table({ mobile: 'cards' })) */
.tcards { display: flex; flex-direction: column; gap: 12px; }
.u-card > .tbl > .tcards, .u-card > .tcards { padding: 12px; }
.tcard { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface-raised); padding: 12px 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.tcard.clickable { cursor: pointer; }
.tcard.clickable:active { background: var(--surface-2); }
.tcard-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; min-width: 0; }
.tcard-title { min-width: 0; flex: 1 1 auto; font-weight: 600; overflow-wrap: anywhere; }
.tcard-badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; flex-shrink: 0; max-width: 55%; }
.tcard-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; margin: 0; font-size: var(--fs-sm); }
.tcard-fields > div { min-width: 0; }
.tcard-fields > div.full { grid-column: 1 / -1; }
.tcard-fields dt { color: var(--muted); font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.tcard-fields dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.tcard-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 2px; }
.tcard-actions > * { flex: 1 1 auto; }
.tcard-actions .actions-cell, .tcard-actions > div { display: flex; gap: 8px; flex-wrap: wrap; width: 100%; }
.tcard-actions .u-btn { flex: 1 1 0; min-width: 0; }
.tcard.total { background: var(--surface-2); }

/* ------------------------------------------------------------------ telefon (<= 640 px) */
@media (max-width: 640px) {
  .content { padding: 16px 16px calc(40px + env(safe-area-inset-bottom)); }
  .page-head { flex-direction: column; align-items: stretch; gap: 12px; margin-bottom: 16px; }
  .page-head h1 { font-size: 24px; line-height: 32px; overflow-wrap: anywhere; }
  .page-head .eyebrow { font-size: 12px; }
  .page-head .actions { flex-wrap: wrap; }
  .page-head .actions > .u-btn, .page-head .actions > div { flex: 1 1 auto; }
  .page-head .actions > div > .u-btn { width: 100%; }
  .u-card__header { padding: 12px 16px; flex-wrap: wrap; }
  .u-card__body { padding: 16px; }
  .u-card.pad { padding: 16px; }
  .u-card__footer { padding: 12px 16px; flex-wrap: wrap; }
  .kpi { padding: 16px; min-height: 96px; }
  .kpi .u-stat__value { font-size: 26px; }
  .kpi .u-stat__label, .kpi .u-stat__meta { overflow-wrap: anywhere; }
  .u-input, .u-select, .u-textarea { font-size: 16px; }
  .u-badge { white-space: normal; height: auto; min-height: 22px; padding-top: 4px; padding-bottom: 4px; max-width: 100%; line-height: 1.2; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
  .chips::-webkit-scrollbar { display: none; }
  .u-chip { flex-shrink: 0; }
  .bars { gap: 8px; }
  .bars .b .val { display: none; }
  .dl { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  .dl dt { margin-top: 8px; font-size: var(--fs-sm); }
  .dl dd { overflow-wrap: anywhere; }
  .form-actions { flex-wrap: wrap; }
  .form-actions > .u-btn { flex: 1 1 auto; }
  .section-title { flex-wrap: wrap; }
  /* tabela koja ostaje tabela: horizontalni skrol unutar okvira, prva kolona prikovana, sjenka kao nagovještaj */
  .u-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%;
    background: linear-gradient(to left, transparent, var(--surface-raised) 70%) left center / 24px 100% no-repeat local,
                linear-gradient(to right, transparent, var(--surface-raised) 70%) right center / 24px 100% no-repeat local,
                radial-gradient(farthest-side at 0 50%, var(--overlay), transparent) left center / 10px 100% no-repeat scroll,
                radial-gradient(farthest-side at 100% 50%, var(--overlay), transparent) right center / 10px 100% no-repeat scroll; }
  .u-table-wrap > .u-table th:first-child, .u-table-wrap > .u-table td:first-child { position: sticky; left: 0; z-index: 2; background: var(--surface-raised); }
  .u-table-wrap > .u-table th:first-child { background: var(--surface-2); z-index: 3; }
  .u-table-wrap > .u-table tfoot td:first-child { background: var(--surface-2); }
  .u-table td, .u-table th { padding-left: 12px; padding-right: 12px; }
}

/* ------------------------------------------------------------------ dodirni ekrani: ciljevi dodira >= 44 px (dugmad), >= 40 px (sitne kontrole) */
@media (pointer: coarse) {
  .u-btn { --_h: var(--control-xl); }
  .u-btn--sm, .u-btn--xs { --_h: 40px; }
  .u-btn--xl { --_h: var(--control-2xl); }
  .u-btn--icon .dot { top: 10px; right: 10px; }
  .topbar-me { min-width: 44px; height: 44px; }
  .u-tabs--pill .u-tab, .u-segmented__item { height: 40px; }
  .u-chip { height: 40px; padding: 0 16px; }
  .u-input, .u-select { --_h: var(--control-xl); }
  .u-input--sm, .u-select--sm { --_h: 40px; }
  .u-choice { min-height: 40px; align-items: center; }
  .u-choice__box { margin-top: 0; }
  .u-toast__close { width: 40px; height: 40px; }
  .shift-chip { height: 40px; min-width: 44px; }
  .shift-chip.custom { height: auto; min-height: 40px; }
  .popover .opt { min-height: 44px; }
  .u-menu__item { height: 44px; }
  .u-sidebar__item { height: 44px; }
  a.small, .u-card__header > a, .section-title > a { display: inline-flex; align-items: center; min-height: 40px; min-width: 40px; }
  .u-switch { min-height: 44px; }
}

/* inbox (zahtjevi) */
.inbox-card .who-link { color: inherit; font-weight: 600; }
@media (pointer: coarse) { .inbox-card .who-link { display: inline-flex; align-items: center; min-height: 40px; } }
@media (max-width: 640px) { .inbox-card .inbox-actions { width: 100%; } .inbox-card .inbox-actions .u-btn { flex: 1 1 0; } }
.back-link { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--muted); text-decoration: none; }
.back-link:hover { text-decoration: none; color: var(--ink); }
@media (pointer: coarse) { .back-link { min-height: 40px; padding-right: 8px; } }
@media (max-width: 640px) { .filters > .u-select { flex: 1 1 140px; } .filters > .search { flex-basis: 100% !important; max-width: none !important; } }
@media (max-width: 640px) {
  .u-table .u-badge { white-space: nowrap; }
  .page-head .actions > .u-btn { flex: 1 1 0; min-width: max-content; }
  .page-head .actions > .u-badge, .page-head .actions > .row:has(> .u-badge) { flex: 0 0 100%; background: transparent; padding-left: 0; }
}

/* ------------------------------------------------------------------ raspored: telefon (prikaz po danu, sklopivi paneli, traka akcija) */
.sched-switch, .sched-day, .sched-bar { display: none; }
.sched-panel > summary { cursor: pointer; list-style: none; }
.sched-panel > summary::-webkit-details-marker { display: none; }
.sched-panel > summary .chev { width: 18px; height: 18px; color: var(--muted); transition: transform var(--duration-base) var(--ease-standard); }
.sched-panel[open] > summary .chev { transform: rotate(180deg); }
.sched-panel:not([open]) > summary { border-bottom: 0; }
.day-chips { display: flex; gap: 8px; padding-bottom: 2px; }
.day-chip { flex: 0 0 auto; min-width: 54px; min-height: 54px; border-radius: var(--radius-lg); border: 1px solid var(--border-strong); background: var(--surface-raised); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 4px 8px; }
.day-chip b { font-size: var(--fs-sm); font-weight: 600; }
.day-chip span { font-size: var(--fs-xs); color: var(--muted); }
.day-chip.today { border-color: var(--mint); box-shadow: inset 0 0 0 1px var(--mint); }
.day-chip.active { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.day-chip.active span { color: inherit; opacity: .85; }
.day-cov { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0; }
@media (max-width: 640px) {
  .sched-switch { display: block; margin-bottom: 12px; }
  .sched-root.view-day .sched-day { display: block; margin-bottom: 16px; }
  .sched-root.view-day .sched-grid { display: none; }
  .sched-root.has-bar { padding-bottom: 80px; }
  .page-head.has-bar .actions { display: none; }
  .sched-bar { display: flex; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--surface-raised); border-top: 1px solid var(--border); }
  .sched-bar .u-btn { flex: 1 1 0; min-width: 0; }
  .sched-toolbar > .row { width: 100%; }
  .sched-toolbar > .row > .u-select { flex: 1 1 140px; }
  .popover { max-width: calc(100vw - 16px); }
}
.leave-legend { margin-left: 16px; }
@media (max-width: 640px) { .leave-legend { margin-left: 0; flex-basis: 100%; } }
@media (max-width: 640px) {
  .u-card:has(> .tbl > .tcards):not(:has(> .u-card__header)) { background: transparent; border: 0; box-shadow: none; }
  .u-card:has(> .tbl > .tcards):not(:has(> .u-card__header)) > .tbl > .tcards { padding: 0; }
}
@media (max-width: 640px) {
  .report-filters > .u-select { flex: 1 1 40%; min-width: 0; }
  .report-filters > .grow { display: none; }
  .report-filters > .period-status { flex-basis: 100%; justify-content: space-between; }
}
@media (max-width: 640px) { .u-table-wrap > .u-table td:first-child { min-width: 150px; } }
.card-note { padding: 12px 20px; }
@media (max-width: 640px) { .card-note { padding: 12px 16px 0; } }
@media (pointer: coarse) { .auth-links a { display: inline-flex; align-items: center; min-height: 44px; } }
/* brojač u bedžu: 12 px umjesto micro 11 (najmanji tekst u aplikaciji je 12 px; prijedlog sistemu u docs/ultra/PRIJEDLOZI-ZA-SISTEM.md) */
.u-badge--count { min-width: 20px; height: 20px; font-size: 12px; }
/* filteri iznad liste: na desktopu u jednom redu (na telefonu pravilo iznad) */
@media (min-width: 641px) { .filters > .u-select { width: auto; flex: 0 1 220px; } }
.scan-mark { display: flex; justify-content: center; margin-top: 8px; }
.scan-mark img { height: 24px; width: auto; }
.notif-head { padding: 8px 12px; }
/* početna zaposlenog bez smjene danas: datum sljedeće smjene umjesto tajmera */
.hero-status .timer.next { font-size: 32px; line-height: 40px; letter-spacing: -0.02em; }

/* ------------------------------------------------------------------ vodič kroz aplikaciju (ui/tour.ts, ui/tours.ts) */
/* Sloj iznad dijaloga i toasta (z-tooltip + 10): vodič mora pokazati i elemente unutar otvorenog bočnog menija. */
.topbar-help { display: inline-flex; align-items: center; gap: 4px; }
.tour { position: fixed; inset: 0; z-index: calc(var(--z-tooltip) + 10); pointer-events: none; }
.tour [hidden] { display: none !important; }
.tour-catch { position: fixed; inset: 0; pointer-events: auto; }
.tour.no-target .tour-catch { background: var(--overlay); }
.tour-spot { position: fixed; border-radius: var(--radius-lg); box-shadow: 0 0 0 9999px var(--overlay); outline: 2px solid var(--focus-ring); pointer-events: none; }
.tour-bubble { position: fixed; width: min(360px, calc(100vw - 24px)); padding: 16px 16px 12px; display: flex; flex-direction: column; gap: 8px; background: var(--surface-raised); color: var(--ink); border: 1px solid var(--hairline); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); pointer-events: auto; }
.tour-bubble.in { animation: tour-in var(--duration-base) var(--ease-emphasized) both; }
.tour.out { opacity: 0; transition: opacity var(--duration-exit) var(--ease-exit); }
@keyframes tour-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.tour-count { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.tour-title { margin: 0; font-family: var(--font-sans); font-size: 16px; line-height: 24px; font-weight: 600; color: var(--ink); }
.tour-text { margin: 0; font-size: 15px; line-height: 22px; color: var(--ink-secondary); max-width: 68ch; }
.tour-help { align-self: flex-start; font-size: 14px; font-weight: 600; }
.tour-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.tour-nav { display: flex; gap: 8px; margin-left: auto; }
.tour-skip { padding-left: 8px; padding-right: 8px; color: var(--ink-muted); }
.tour-arrow { position: absolute; width: 12px; height: 12px; background: var(--surface-raised); border: 1px solid var(--hairline); transform: rotate(45deg); }
.tour-bubble[data-side="bottom"] .tour-arrow { top: -7px; margin-left: -6px; border-right: 0; border-bottom: 0; }
.tour-bubble[data-side="top"] .tour-arrow { bottom: -7px; margin-left: -6px; border-left: 0; border-top: 0; }
.tour-bubble[data-side="right"] .tour-arrow { left: -7px; margin-top: -6px; border-right: 0; border-top: 0; }
.tour-bubble[data-side="left"] .tour-arrow { right: -7px; margin-top: -6px; border-left: 0; border-bottom: 0; }
/* telefon: panel od dna; od vrha samo kad bi pokrio element (donja navigacija); dugmad 44 px */
.tour-bubble.sheet { left: 0; right: 0; bottom: 0; top: auto; width: auto; max-width: 560px; margin: 0 auto; padding: 16px 16px calc(12px + env(safe-area-inset-bottom)); border-radius: var(--radius-xl) var(--radius-xl) 0 0; border-bottom: 0; }
.tour-bubble.sheet.dock-top { top: 0; bottom: auto; padding: calc(16px + env(safe-area-inset-top)) 16px 12px; border-radius: 0 0 var(--radius-xl) var(--radius-xl); border-bottom: 1px solid var(--hairline); border-top: 0; }
.tour-bubble.sheet .u-btn { min-height: 44px; }
.tour-bubble.sheet.in { animation: tour-sheet-in var(--duration-slow) var(--ease-emphasized) both; }
.tour-bubble.sheet.dock-top.in { animation-name: tour-sheet-in-top; }
@keyframes tour-sheet-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes tour-sheet-in-top { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: none; } }
/* poziv pri prvom otvaranju stranice: mali, ne pokriva navigaciju, nestaje promjenom stranice */
.tour-invite { position: fixed; right: 24px; bottom: 24px; z-index: var(--z-toast); width: min(420px, calc(100vw - 32px)); display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; background: var(--surface-raised); color: var(--ink); border: 1px solid var(--hairline); border-radius: var(--radius-xl); box-shadow: var(--shadow-md); animation: tour-in var(--duration-slow) var(--ease-emphasized) both; }
.tour-invite > .ic { flex-shrink: 0; color: var(--accent); }
.tour-invite b { display: block; font-size: 14px; line-height: 20px; }
.tour-invite span { display: block; font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.tour-invite__actions { display: flex; gap: 8px; flex-shrink: 0; }
.tour-invite.above-nav { bottom: calc(64px + 12px + env(safe-area-inset-bottom)); }
.tour-invite--top { top: calc(16px + env(safe-area-inset-top)); bottom: auto; right: 16px; }
@media (max-width: 640px) {
  .tour-invite { left: 16px; right: 16px; width: auto; flex-wrap: wrap; }
  .tour-invite > .grow { flex: 1 1 calc(100% - 40px); }
  .tour-invite__actions { width: 100%; justify-content: flex-end; }
  .tour-invite__actions .u-btn { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .tour-bubble.in, .tour-bubble.sheet.in, .tour-invite { animation: none; }
  .tour.out { transition: none; }
}
/* uske trake (do 400 px, dugmad 44 px): „i“ i „?“ stanu uz pretragu, temu, zvono i profil bez horizontalnog skrola */
@media (max-width: 400px) {
  .topbar { gap: 2px; padding-left: 8px; padding-right: 8px; }
  .topbar-help { gap: 2px; }
  .mtop { padding-left: 12px; padding-right: 12px; }
  .mtop .mtop-tools { gap: 2px; }
}
