/* Instrument — sastavljeno iz UI/instrument/ naredbom `node tools/build-css.mjs`. Ne mijenjaj ručno. */

/* Instrument — zajednički dizajn sustav platforme i konzole tvrtke.
   Boje, radijusi i sjene žive samo u ovom korijenu; pravila koriste isključivo varijable. */

:root {
  color-scheme: light;
  --paper: #f7f9fc;
  --paper-2: #f1f4f9;
  --surface: #ffffff;
  --surface-2: #f4f6fa;
  --surface-3: #e9eef6;
  --surface-soft: #f4f6fa;
  --bg: #f7f9fc;
  --ink: #101828;
  --ink-2: #475467;
  --muted: #667085;
  --faint: #98a2b3;
  --label: #344054;
  --line: #eaecf0;
  --line-2: #d0d5dd;
  --line-soft: #f2f4f7;
  --line-strong: #7d8799;
  --accent: #2563eb;
  --accent-2: #1d4ed8;
  --accent-dark: #1d4ed8;
  --accent-soft: #eff4ff;
  --accent-ink: #ffffff;
  --on-accent: #ffffff;
  --on-brand: #ffffff;
  --on-toast: #ffffff;
  --ok: #067647;
  --ok-soft: #ecfdf3;
  --ok-bright: #12b76a;
  --success: #067647;
  --success-soft: #ecfdf3;
  --warn: #b54708;
  --warn-soft: #fffaeb;
  --warn-bright: #f79009;
  --warm: #b54708;
  --bad: #b42318;
  --bad-soft: #fef3f2;
  --danger: #b42318;
  --danger-soft: #fef3f2;
  --danger-strong: #912018;
  --info: #026aa2;
  --info-soft: #f0f9ff;
  --live: #1d4ed8;
  --live-soft: #eff4ff;
  --neutral-soft: #f2f4f7;
  --muted-soft: #f2f4f7;
  --grid: rgba(16, 24, 40, 0.045);
  --scrim: rgba(16, 24, 40, 0.5);
  --focus: #2563eb;
  --track: #eaecf0;
  --loader-track: #e9eef6;
  --mark-bg: #eff4ff;
  --mark-ink: #2563eb;
  --toast-bg: #101828;
  --logo-bg: #ffffff;
  --auth-lead: #475467;
  --readonly-ink: #667085;
  --rail-ink: #475467;
  --shadow-1: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-2: 0 12px 32px -12px rgba(16, 24, 40, 0.16), 0 2px 6px rgba(16, 24, 40, 0.04);
  --shadow-3: 0 32px 64px -16px rgba(16, 24, 40, 0.24);
  --shadow-card: var(--shadow-1);
  --shadow-pop: var(--shadow-2);
  --shadow: var(--shadow-1);
  --r-1: 8px;
  --r-2: 10px;
  --r-3: 16px;
  --r-4: 20px;
  --radius: 16px;
  --radius-lg: 20px;
  --r-pill: 999px;
  --row-h: 56px;
  --rail: 260px;
  --rail-mini: 76px;
  --topbar-h: 64px;
  --content-max: 1560px;
  --side-bg: #ffffff;
  --side-bg-2: #f9fafb;
  --side-ink: #101828;
  --side-muted: #667085;
  --side-line: #eaecf0;
  --side-hover: #f4f6fa;
  --paused: #8b5cf6;
  --side-active: #eff4ff;
  --side-accent: #2563eb;
  --c1: #2563eb;
  --c2: #38bdf8;
  --c3: #12b76a;
  --c4: #f79009;
  --c5: #7a5af8;
  --dot-live: #12b76a;
  --dot-live-glow: rgba(18, 183, 106, 0.2);
  --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", "Consolas", "SF Mono", ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
  --dur: 0.16s;
  --label-size: 12px;
  --label-spacing: 0.02em;
  --label-weight: 600;
  --tab-h: 36px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4,
p,
figure {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip,
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 400;
  padding: 9px 14px;
  border-radius: var(--r-2);
  background: var(--ink);
  color: var(--paper);
  font-size: var(--fs-body);
  font-weight: 600;
  transform: translateY(-180%);
  transition: transform var(--dur) var(--ease);
}

.skip:focus,
.skip-link:focus {
  transform: none;
}

/* ---------- ljuska ---------- */

.shell {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  min-height: 100vh;
}

.company-shell {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  min-height: 100vh;
}

.main {
  min-width: 0;
  padding: 0 28px 40px;
}

.main > * {
  max-width: var(--content-max);
  margin-left: auto;
  margin-right: auto;
}

.main > .topbar,
.workspace > .topbar {
  max-width: none;
}

.workspace {
  min-width: 0;
  padding: 0 28px 40px;
}

.workspace > * {
  max-width: var(--content-max);
  margin-left: auto;
  margin-right: auto;
}

.workspace__main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.workspace__main:focus {
  outline: none;
}

/* ---------- navigacija ---------- */

.side {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-width: 0;
  background: var(--side-bg);
  border-right: 1px solid var(--side-line);
}

.side__inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  padding: 0;
}

.side-brand__toggle {
  margin-left: auto;
  display: inline-grid;
  color: var(--muted);
  flex: 0 0 auto;
}

.side-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--topbar-h);
  padding: 0 12px 0 16px;
  border-bottom: 1px solid var(--side-line);
  flex: 0 0 auto;
}

.navpanel {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-width: 0;
  background: var(--side-bg);
  border-right: 1px solid var(--side-line);
}

.navpanel__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--topbar-h);
  padding: 0 18px 0 18px;
  border-bottom: 1px solid var(--side-line);
  flex: 0 0 auto;
  min-width: 0;
}

.navpanel__brand > span {
  min-width: 0;
}

.navpanel__brand b {
  display: block;
  font-size: var(--fs-body);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--side-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.navpanel__brand small {
  display: block;
  font-size: 11px;
  color: var(--side-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.navpanel__close {
  display: none;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: var(--r-1);
  background: transparent;
  color: var(--side-muted);
  font-size: var(--fs-body);
  line-height: 1;
  cursor: pointer;
}

.navpanel__close:hover {
  background: var(--side-hover);
  color: var(--side-ink);
}

.navpanel__close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}

.brand__mark,
.rail__mark,
.hero-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: var(--r-1);
  background: var(--mark-bg);
  color: var(--mark-ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
  overflow: hidden;
}

.brand__mark {
  background: var(--accent);
  color: var(--accent-ink);
}

.rail__mark {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  background: var(--mark-color, var(--accent));
  color: var(--on-brand);
  font-size: var(--fs-body);
  font-weight: 700;
}

.rail__mark--logo {
  position: relative;
}

.rail__mark--logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--logo-bg);
}

.rail__mark--logo .rail__initial {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.rail__mark--logo img + .rail__initial {
  display: none;
}

.brand > span:last-child,
.brand__copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand b,
.brand small {
  display: block;
}

.brand__copy b,
.brand b {
  font-size: var(--fs-body);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--side-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand__copy small,
.brand small {
  font-size: 11px;
  color: var(--side-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logo {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: var(--r-1);
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
}

.side__nav,
.navpanel__nav {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 12px 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}

.side__nav::-webkit-scrollbar,
.navpanel__nav::-webkit-scrollbar {
  width: 6px;
}

.side__nav::-webkit-scrollbar-thumb,
.navpanel__nav::-webkit-scrollbar-thumb {
  background: var(--line-2);
  border-radius: 3px;
}

.navpanel__group {
  margin-top: 18px;
}

.navpanel__group:first-child {
  margin-top: 2px;
}

.dispatch-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: wrap;
  padding: 10px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.dispatch-strip__metrics {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.dispatch-strip__label {
  font-weight: 600;
}

.dispatch-strip .panel__metric {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  min-width: 0;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: var(--fs-meta);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dispatch-strip .panel__metric b {
  font-weight: 700;
}

.dispatch-strip .panel__metric.pill--warn {
  border-color: transparent;
}

.dispatch-strip__tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}

.dispatch-strip__status {
  font-size: var(--fs-meta);
  white-space: nowrap;
}

.field--tight {
  gap: 4px;
}

.field--tight > span {
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--muted);
}

.field--tight input {
  width: 84px;
  height: 30px;
  font-size: 12px;
}

.live-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(310px, 1fr);
  gap: 16px;
  padding: 16px 20px 18px;
  align-items: start;
}

.live-grid__map {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.live-grid__map .map {
  min-height: 460px;
  height: 100%;
}

.live-grid__side {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.live-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.live-metric {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface-2);
}

.live-metric span {
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.live-metric b {
  font-size: var(--fs-title);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.live-metric--live b {
  color: var(--live);
}

.live-list {
  display: grid;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface);
  overflow: hidden;
}

.live-list__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.live-list__head b {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.live-list__body {
  display: grid;
  max-height: 424px;
  overflow-y: auto;
}

.live-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.live-row:last-child {
  border-bottom: 0;
}

.live-row:hover {
  background: var(--surface-2);
}

.live-row:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}

.live-row__head {
  grid-column: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.live-row__head b {
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--ink);
}

.live-row__meta {
  grid-column: 1;
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  font-size: var(--fs-meta);
  line-height: 1.4;
  color: var(--muted);
}

.live-row__meta > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-row__driver {
  flex: 0 1 auto;
  font-weight: 600;
  color: var(--ink-2, var(--ink));
}

.live-row__driver--none {
  font-weight: 500;
  color: var(--muted);
}

.live-row__dot {
  flex: none;
  opacity: 0.6;
}

.live-row__route {
  flex: 1 1 auto;
}

.live-row__chevron {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  flex: none;
  width: 7px;
  height: 7px;
  border-right: 1.6px solid var(--muted);
  border-top: 1.6px solid var(--muted);
  transform: rotate(45deg);
  opacity: 0.55;
}

.live-map-missing {
  display: grid;
  gap: 6px;
  place-content: center;
  min-height: 460px;
  padding: 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-2);
  background: var(--surface-2);
  text-align: center;
}

.live-map-missing b {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.live-map-missing p {
  max-width: 40ch;
  margin: 0 auto;
  font-size: var(--fs-meta);
  line-height: 1.5;
  color: var(--muted);
}

@media (max-width: 1080px) {
  .live-grid {
    grid-template-columns: 1fr;
  }

  .live-grid__map .map,
  .live-map-missing {
    min-height: 320px;
  }
}

.navpanel__area {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  height: 30px;
  padding: 0 10px 0 10px;
  border: 0;
  border-radius: var(--r-1);
  background: transparent;
  color: var(--side-muted);
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
}

.navpanel__area:hover {
  background: var(--side-hover);
  color: var(--side-ink);
}

.navpanel__area:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

.navpanel__area[data-active="true"] {
  color: var(--side-ink);
}

.navpanel__area-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.navpanel__chevron {
  flex: none;
  width: 8px;
  height: 8px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.15s var(--ease);
  opacity: 0.7;
}

.navpanel__area[aria-expanded="false"] .navpanel__chevron {
  transform: rotate(-45deg) translate(-1px, 1px);
}

.navpanel__items {
  padding-top: 2px;
}

.navpanel__items[hidden] {
  display: none;
}

.side__section-label,
.navpanel__label {
  display: block;
  padding: 0 10px 6px;
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--side-muted);
  opacity: 0.85;
}

.side__section-label:not(:first-child) {
  margin-top: 18px;
}

.nav-item,
.navpanel__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 36px;
  margin-bottom: 2px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--r-1);
  background: transparent;
  color: var(--side-muted);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.nav-item > span,
.navpanel__link > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-item svg,
.navpanel__link svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  opacity: 0.85;
}

.nav-item:hover,
.navpanel__link:hover {
  background: var(--side-hover);
  color: var(--side-ink);
}

.nav-item[aria-current="true"],
.nav-item[aria-current="page"],
.navpanel__link[aria-current="true"],
.navpanel__link[aria-current="page"] {
  background: var(--side-active);
  color: var(--side-accent);
  font-weight: 600;
}

.nav-item[aria-current="true"] svg,
.nav-item[aria-current="page"] svg,
.navpanel__link[aria-current="true"] svg,
.navpanel__link[aria-current="page"] svg {
  opacity: 1;
}

.nav-item b {
  margin-left: auto;
  min-width: 22px;
  padding: 1px 6px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.nav-item[aria-current="true"] b {
  background: var(--surface);
  color: var(--accent);
}

.nav-item--sub,
.navpanel__link--sub {
  height: 32px;
  padding-left: 34px;
  font-size: var(--fs-body);
}

.side__sub {
  margin: 2px 0 4px;
}

.side__sub-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--r-1);
  background: transparent;
  color: var(--side-muted);
  font-size: var(--fs-body);
  font-weight: 500;
  text-align: left;
}

.side__sub-toggle:hover {
  background: var(--side-hover);
  color: var(--side-ink);
}

.side__sub-toggle span[aria-hidden="true"] {
  color: var(--faint);
  font-size: 10px;
}

.side__sub-items {
  position: relative;
  margin: 2px 0 6px 20px;
  padding-left: 10px;
  border-left: 1px solid var(--side-line);
}

.side__sub-items .nav-item {
  height: 32px;
  padding: 0 8px;
  font-size: var(--fs-body);
}

.side__status {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 12px 10px;
  padding: 9px 12px;
  border: 1px solid var(--side-line);
  border-radius: var(--r-2);
  background: var(--surface-2);
  color: var(--side-muted);
  flex: 0 0 auto;
}

.side__status b {
  display: block;
  color: var(--side-ink);
  font-size: var(--fs-body);
  font-weight: 600;
  line-height: 1.25;
}

.side__status small {
  display: block;
  font-size: 11px;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: currentColor;
  color: var(--ok-bright);
}

.side__status .status-dot {
  box-shadow: 0 0 0 3px var(--dot-live-glow);
}

.side__foot,
.navpanel__foot {
  flex: 0 0 auto;
  padding: 12px;
  border-top: 1px solid var(--side-line);
}

.account-row,
.profile__head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 4px 2px 10px;
}

.account-copy,
.profile__head > span:last-child {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.account-copy b,
.profile__head b {
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--side-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-copy small,
.profile__head small {
  font-size: 11px;
  color: var(--side-muted);
  text-transform: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.avatar,
.profile__avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.profile {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile__head {
  padding-bottom: 6px;
}

.profile__actions {
  display: flex;
  gap: 6px;
  padding: 0 2px 6px;
}

.profile__actions button {
  flex: 1 1 auto;
  height: 28px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-1);
  background: var(--surface);
  color: var(--ink-2);
  font-size: var(--fs-meta);
  font-weight: 600;
}

.profile__actions button:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.profile__actions .out {
  color: var(--bad);
  border-color: var(--line-2);
}

.profile__actions .out:hover {
  background: var(--bad-soft);
}

.profile__theme,
.side__tools {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 2px;
}

.profile__theme {
  justify-content: space-between;
  padding-top: 4px;
}

.side__tools {
  flex-wrap: wrap;
}

.mobile-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: var(--topbar-h);
  margin: 0 -28px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

/* ---------- gornja traka ---------- */

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--topbar-h);
  margin: 0 -28px 20px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 40;
}

.topbar__ctx {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.topbar__ctx b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar__chip {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--muted);
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.topbar__search-wrap {
  position: relative;
  flex: 0 0 auto;
  min-width: 0;
  width: min(400px, 36vw);
  max-width: 400px;
}

.topbar__search-wrap .pagehead__search {
  width: 100%;
}

.topbar__profile {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 0 1 auto;
  overflow: hidden;
  padding-left: 4px;
}

.topbar__nav-toggle {
  margin-right: 2px;
}

.topbar__nav-toggle span {
  font-size: var(--fs-title);
  line-height: 1;
}

.topbar__profile-txt {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  line-height: 1.25;
}

.topbar__profile-txt b,
.topbar__profile-txt small {
  max-width: 130px;
}

.topbar__profile-txt b {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

.topbar__profile-txt small {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--fs-micro);
  color: var(--muted);
}

.density-switch {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface-2);
}

.density-switch__button {
  height: 26px;
  padding: 0 9px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--muted);
  font-size: var(--fs-micro);
  font-weight: 600;
  white-space: nowrap;
}

.density-switch__button:hover {
  color: var(--ink-2);
}

.density-switch__button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-1);
}

.topbar__sep {
  width: 1px;
  height: 22px;
  flex: 0 0 1px;
  background: var(--line);
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.topbar__search {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
  width: min(400px, 36vw);
  height: 34px;
  padding: 0 6px 0 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--muted);
  font-size: var(--fs-body);
  text-align: left;
}

.topbar__search:hover {
  border-color: var(--faint);
  color: var(--ink-2);
}

.topbar__search span {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

kbd {
  font-family: var(--mono);
}

.kbd {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 1px solid var(--line-2);
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--mono);
  font-size: var(--fs-micro);
  line-height: 1;
}

.topbar__profile {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 10px 0 4px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--ink-2);
  font-size: var(--fs-body);
  font-weight: 600;
}

.topbar__profile:hover {
  background: var(--surface-2);
}

/* ---------- zaglavlje stranice ---------- */

.page-head,
.pagehead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 0 20px;
}

.pagehead {
  align-items: flex-end;
  gap: 24px;
  padding: 0 0 6px;
  margin-bottom: 22px;
}

.page-head h1,
.pagehead h1 {
  font-size: var(--fs-value);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.page-head p,
.pagehead p {
  margin-top: 6px;
  max-width: 78ch;
  font-size: 13px;
  color: var(--muted);
}

.page-head > div:first-child,
.pagehead > div:first-child {
  min-width: 0;
}

.page-head > .actions,
.pagehead__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
}

.eyebrow {
  display: block;
  margin-bottom: 6px;
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--muted);
}

.breadcrumbs a:hover {
  color: var(--accent);
}

.breadcrumbs span[aria-hidden="true"] {
  color: var(--faint);
}

/* ---------- gumbi ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--ink-2);
  font-size: var(--fs-body);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.button svg {
  width: 16px;
  height: 16px;
}

.button:hover {
  background: var(--surface-2);
}

.button:disabled,
.button[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.button--primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: var(--shadow-1);
}

.button--primary:hover {
  background: var(--accent-2);
}

.button--quiet,
.button--ghost {
  border-color: var(--line-2);
  background: var(--surface);
  color: var(--ink-2);
}

.button--quiet:hover,
.button--ghost:hover {
  background: var(--surface-2);
  border-color: var(--faint);
  color: var(--ink);
}

.button--ghost {
  border-color: transparent;
  background: transparent;
}

.button--ghost:hover {
  border-color: transparent;
  background: var(--surface-2);
}

.button--danger {
  background: var(--bad);
  color: var(--surface);
}

.button--danger:hover {
  background: var(--danger-strong);
}

.button--quiet.button--danger {
  border-color: var(--line-2);
  background: var(--surface);
  color: var(--bad);
}

.button--small {
  height: 30px;
  padding: 0 10px;
  font-size: var(--fs-meta);
}

.button--wide {
  width: 100%;
}

.link-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-size: var(--fs-body);
  font-weight: 600;
}

.link-button:hover {
  color: var(--accent-2);
  text-decoration: underline;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--r-2);
  background: transparent;
  color: var(--muted);
}

.icon-button:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.icon-button svg {
  width: 17px;
  height: 17px;
}

.theme-toggle {
  color: var(--muted);
}

.language-switch,
.locale-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface-2);
}

.language-switch button,
.locale-switch button {
  height: 24px;
  min-width: 30px;
  padding: 0 7px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--muted);
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.language-switch button[aria-pressed="true"],
.locale-switch button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-1);
}

.button-row,
.actions,
.form-actions,
.issue-form__actions,
.filters__actions,
.draft-actions,
.preview-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.button-row {
  padding-top: 4px;
}

.actions {
  margin-top: 14px;
}

[dir="rtl"] .button-row {
  flex-direction: row-reverse;
}

/* ---------- polja ---------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.field > span,
.field > label,
.field__label,
.field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--label);
}

.field input,
.field select,
.field textarea,
input[type="text"],
input[type="search"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="tel"],
select,
textarea {
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
}

.field textarea,
textarea {
  min-height: 76px;
  resize: vertical;
}

.field input { border: 1px solid var(--line-strong); }
.field select { border: 1px solid var(--line-strong); }
.field textarea { border: 1px solid var(--line-strong); }

.field input:hover,
.field select:hover,
.field textarea:hover,
select:hover,
textarea:hover,
input:hover {
  border-color: var(--faint);
}

.field input:focus,
.field select:focus,
.field textarea:focus,
select:focus,
textarea:focus,
input:focus {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--accent);
}

.field input[readonly],
.field textarea[readonly],
.field--readonly input {
  background: var(--surface-2);
  color: var(--readonly-ink);
}

.field input[type="checkbox"],
.field input[type="radio"],
input[type="checkbox"],
input[type="radio"] {
  width: 16px;
  min-height: 16px;
  height: 16px;
  padding: 0;
  accent-color: var(--accent);
}

.field input::placeholder,
input::placeholder,
textarea::placeholder {
  color: var(--faint);
}

select {
  appearance: none;
  padding-right: 30px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.field small,
.field-hint {
  font-size: var(--fs-meta);
  color: var(--muted);
}

.field-hint--strong {
  color: var(--ink-2);
  font-weight: 500;
}

.field-hint--warn {
  color: var(--warn);
}

.field--wide {
  grid-column: 1 / -1;
}

.field--full {
  grid-column: 1 / -1;
}

.field--grow {
  flex: 1 1 auto;
}

.field--inline {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 20px;
}

.form-grid--tight {
  gap: 10px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
}

.form-inline {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  padding: 20px;
}

.form-section {
  display: grid;
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.form-section:first-of-type {
  border-top: 0;
}

.form-section > h3 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.field-group {
  display: grid;
  gap: 10px;
}

.check-row,
.checkbox-row,
.switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
  font-size: 13px;
}

.check-row > span,
.checkbox-row > span {
  min-width: 0;
}

.check-row--inline {
  min-height: 0;
  gap: 8px;
}

.check-row--full {
  grid-column: 1 / -1;
}

.check-row b {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
}

.checkbox-row input {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.switch-row {
  justify-content: space-between;
}

.inline-select {
  height: 28px;
  min-height: 28px;
  padding: 2px 24px 2px 8px;
  font-size: 12px;
}

.mode-switch {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface-2);
}

.mode-switch button {
  height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.mode-switch button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-1);
}

.filters {
  display: flex;
  align-items: flex-end;
  gap: 10px 12px;
  flex-wrap: wrap;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.filters .field--inline {
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}

.filters .field--inline > span {
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.filters .field--inline input,
.filters .field--inline select {
  height: 32px;
  font-size: var(--fs-body);
}

.filters .field--inline.field--grow {
  flex: 1 1 260px;
  max-width: 340px;
}

.filters .button {
  height: 32px;
}

.filters__actions {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-left: auto;
}

.filters__note {
  width: 100%;
  font-size: var(--fs-meta);
  color: var(--muted);
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
}

.filter-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.filter-button:hover {
  border-color: var(--line-2);
  color: var(--ink-2);
}

.filter-button[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.filter-button span {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  color: var(--ink-2);
  font-size: var(--fs-micro);
}

.filter-button[aria-pressed="true"] span {
  background: var(--surface);
  color: var(--accent);
}

.filter-summary {
  margin-left: auto;
  font-size: var(--fs-meta);
  color: var(--muted);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 200px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--muted);
}

.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.search-box svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
}

.search-box input {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: var(--fs-body);
  outline: none;
}

.search-box input:focus {
  outline: none;
  box-shadow: none;
}

.input {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2);
  background: var(--surface);
  font-size: var(--fs-body);
}

.input--inline {
  height: 30px;
  min-height: 30px;
}

.hint {
  font-size: var(--fs-meta);
  color: var(--muted);
}

/* ---------- tablice ---------- */

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}

.table-wrap:last-child {
  border-bottom: 0;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  height: 44px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.data-table thead th:first-child {
  padding-left: 20px;
}

.data-table thead th:last-child {
  padding-right: 20px;
}

.data-table tbody td {
  height: var(--row-h);
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  vertical-align: middle;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody td:first-child {
  padding-left: 20px;
  color: var(--ink);
  font-weight: 500;
}

.data-table tbody td:last-child {
  padding-right: 20px;
}

.data-table tbody tr:hover td {
  background: var(--surface-2);
}

.data-table tbody tr.row--selected td,
.data-table tbody tr[aria-selected="true"] td {
  background: var(--accent-soft);
}

.data-table--inner {
  font-size: var(--fs-body);
}

.data-table--inner thead th {
  height: 36px;
  background: transparent;
}

.data-table--inner tbody td {
  height: auto;
  padding-top: 8px;
  padding-bottom: 8px;
}

.data-table td.number-cell,
.data-table th.number-cell,
.number-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.data-table td.date-cell,
.date-cell {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cell-actions {
  white-space: nowrap;
  text-align: right;
}

.cell-actions .button,
.cell-actions .inline-select {
  vertical-align: middle;
}

.cell-actions > * + * {
  margin-left: 6px;
}

.cell-muted,
.muted {
  color: var(--muted);
}

.cell-note {
  display: block;
  margin-top: 2px;
  font-size: var(--fs-meta);
  color: var(--muted);
}

.cell-money {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cell-identity,
.company-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.cell-identity > span {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}

.cell-identity b {
  font-weight: 600;
  color: var(--ink);
}

.cell-identity small {
  font-size: var(--fs-meta);
  color: var(--muted);
}

.company-cell > span {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}

.company-cell b {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.company-cell small {
  font-size: var(--fs-meta);
  color: var(--muted);
}

.company-cell--compact {
  gap: 8px;
}

.company-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: var(--r-2);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: var(--fs-meta);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cell-link {
  color: var(--accent);
  font-weight: 600;
}

.cell-link:hover {
  text-decoration: underline;
}

.data-table--fixed {
  table-layout: fixed;
}

.data-table--fixed col.w-number { width: 146px; }
.data-table--fixed col.w-status { width: 116px; }
.data-table--fixed col.w-driver { width: 124px; }
.data-table--fixed col.w-money { width: 100px; }
.data-table--fixed col.w-actions { width: 150px; }

.data-table--fixed col.w-role { width: 132px; }
.data-table--fixed col.w-driver-link { width: 124px; }
.data-table--fixed col.w-status { width: 108px; }
.data-table--fixed col.w-login { width: 122px; }

.cell-identity__text {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.cell-identity__text b,
.cell-identity__text small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-note {
  display: block;
  font-size: 11px;
  line-height: 1.35;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
}

.panel__head .panel__tools .button,
.panel__head .filters__actions .button {
  height: 30px;
  padding: 0 10px;
  font-size: var(--fs-meta);
}

.data-table--duty col.w-vehicle { width: 120px; }
.data-table--duty col.w-availability { width: 116px; }
.data-table--duty col.w-position { width: 158px; }
.data-table--duty col.w-active { width: 70px; }
.data-table--duty col.w-shift { width: 186px; }

.duty-position {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.duty-position .pill {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.duty-position__link {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-1);
  font-size: 11px;
  line-height: 1;
  color: var(--muted);
  text-decoration: none;
}

.duty-position__link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.cell-stack {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.cell-stack b {
  font-size: var(--fs-body);
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-stack small {
  font-size: var(--fs-meta);
  line-height: 1.35;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-stack__muted {
  font-style: normal;
  font-weight: 500;
  color: var(--muted);
}

.data-table--fixed td {
  overflow: hidden;
  text-overflow: ellipsis;
}

.data-table--fixed .cell-actions {
  overflow: hidden;
}

.cell-compact {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-select {
  width: 44px;
  text-align: center;
}

.cell-select input {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.data-table .col-price {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.data-table .col-status,
.data-table .col-vehicle {
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .data-table .col-lastseen {
    display: none;
  }

  .data-table .cell-compact {
    max-width: 170px;
  }
}

@media (max-width: 980px) {
  .data-table .col-active {
    display: none;
  }

  .data-table .cell-compact {
    max-width: 130px;
  }
}

.code,
code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: var(--fs-meta);
}

.table-note,
.table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: var(--fs-meta);
  color: var(--muted);
}

.table-actions {
  justify-content: flex-end;
}

.panel__foot--pager,
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}

.pager__buttons {
  display: flex;
  gap: 6px;
}

/* ---------- kartice i ploče ---------- */

.panel {
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 58px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.panel__head > div:first-child {
  min-width: 0;
}

.panel__head h2,
.panel__title h2 {
  font-size: var(--fs-title);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.panel__head p {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.panel__head .eyebrow {
  margin-bottom: 3px;
}

.panel__title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.panel__title > span {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 20px;
  padding: 0 7px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.panel__title > span:not(.filter-summary) {
  min-width: 22px;
  padding: 0 7px;
  background: var(--surface-2);
}

.panel__title > .filter-summary {
  display: inline-block;
  max-width: 46ch;
  overflow: hidden;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-size: var(--fs-meta);
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .panel__title > .filter-summary {
    max-width: 18ch;
  }
}

.panel__tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  justify-content: flex-end;
}

.panel__metric {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 26px;
  padding: 0 9px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.panel__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 12px;
  color: var(--muted);
}

.panel__foot--note {
  display: block;
  font-size: var(--fs-meta);
}

.panel__foot--split {
  display: flex;
  justify-content: space-between;
}

.panel__note {
  padding: 0 20px 14px;
  font-size: var(--fs-meta);
  color: var(--muted);
}

.panel--form .panel__body {
  padding: 20px;
}

.panel--form__set {
  display: grid;
  gap: 14px;
}

.panel--center {
  display: grid;
  place-items: center;
  padding: 40px;
  text-align: center;
}

.panel--flush {
  border-radius: 0;
  border-left: 0;
  border-right: 0;
}

.panel[data-slot="dashboard-attention"],
.panel--attention {
  border-color: var(--line);
}

.metrics,
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.metric,
.stat-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}

.metric__top {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: var(--fs-meta);
  font-weight: 600;
  color: var(--muted);
}

.metric__top > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: var(--r-1);
  background: var(--accent-soft);
  color: var(--accent);
}

.metric__top svg {
  width: 16px;
  height: 16px;
}

.metric__top small {
  font-size: var(--fs-meta);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--muted);
  text-transform: none;
}

.metric__value,
.stat-card > b {
  font-size: var(--fs-value);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.metric__value {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.metric__foot,
.stat-card > small,
.stat-card > span {
  font-size: var(--fs-meta);
  color: var(--muted);
}

.metric__foot {
  display: flex;
  align-items: center;
  gap: 6px;
}

.metric__spark {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 20px;
  border-radius: 5px;
  background: var(--ok-soft);
  color: var(--ok);
}

.metric__spark svg {
  width: 13px;
  height: 13px;
}

.metric--green .metric__top > span,
.metric--amber .metric__top > span,
.metric--rose .metric__top > span {
  background: var(--ok-soft);
  color: var(--ok);
}

.metric--amber .metric__top > span {
  background: var(--warn-soft);
  color: var(--warn);
}

.metric--rose .metric__top > span {
  background: var(--bad-soft);
  color: var(--bad);
}

.metric--amber .metric__spark {
  background: var(--warn-soft);
  color: var(--warn);
}

.metric--rose .metric__spark {
  background: var(--bad-soft);
  color: var(--bad);
}

.stat-card {
  gap: 4px;
}

.stat-card > span {
  font-size: var(--fs-meta);
  font-weight: 600;
  color: var(--muted);
}

.stat-card > b.stat-card__text,
.stat-card__text {
  font-size: var(--fs-title);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.module-grid,
.packages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  padding: 20px;
}

.module-card,
.package-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--surface);
}

.module-card__top,
.package-card__top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.module-card__icon,
.package-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: var(--r-1);
  background: var(--surface-2);
  color: var(--ink-2);
}

.module-card__copy,
.package-details {
  min-width: 0;
}

.module-card__copy b,
.package-details b {
  display: block;
  font-size: var(--fs-body);
  font-weight: 600;
}

.module-card__copy small,
.package-details small {
  font-size: var(--fs-meta);
  color: var(--muted);
}

.module-card__type,
.package-code {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--muted);
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.package-price {
  font-size: var(--fs-title);
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.module-sections,
.module-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.usage-list,
.usage-row {
  display: grid;
  gap: 8px;
  padding: 16px 20px;
}

.usage-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 0;
}

.usage-row small {
  font-size: var(--fs-meta);
  color: var(--muted);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 24px;
  padding: 20px;
}

.detail-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-body);
}

.detail-row:last-child {
  border-bottom: 0;
}

.detail-label {
  color: var(--muted);
}

.detail-row > span:last-child,
.detail-row > b {
  color: var(--ink);
  font-weight: 600;
  text-align: right;
  overflow-wrap: anywhere;
}

.detail-block {
  display: grid;
  gap: 4px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.detail-block:first-child {
  border-top: 0;
}

.detail-block > span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.modal-details,
.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 20px 16px;
}

.body--split {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.body__main,
.body__side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.checklist {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 20px;
}

.check-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.check-icon.is-done {
  background: var(--ok-soft);
  color: var(--ok);
}

.attention-row,
.dashboard-alert-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  font-size: var(--fs-body);
}

.attention-row b,
.dashboard-alert-row b {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

.progress-track {
  height: 6px;
  margin: 0 20px;
  overflow: hidden;
  border-radius: var(--r-pill);
  background: var(--track);
}

.progress-track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.3s var(--ease);
}

.step-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 20px 20px;
  counter-reset: step;
}

.step-list li {
  position: relative;
  padding-left: 28px;
  font-size: var(--fs-body);
  color: var(--ink-2);
  counter-increment: step;
}

.step-list li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
  font-size: var(--fs-micro);
  font-weight: 700;
}

.tab-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface-2);
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
}

.tab-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.tab-panel[hidden] {
  display: none;
}

.tab-bar__button {
  height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.tab-bar__button[aria-selected="true"],
.tab-bar__button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-1);
}

/* ---------- oznake ---------- */

.pill,
.status-tag,
.role-tag,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 22px;
  padding: 2px 9px;
  border-radius: var(--r-pill);
  background: var(--neutral-soft);
  color: var(--ink-2);
  font-size: var(--fs-meta);
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.pill .status-dot,
.status-tag .status-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
}

.pill--ok,
.status-tag.pill--ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.pill--warn,
.status-tag.pill--warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.pill--danger,
.pill--bad,
.status-tag.pill--danger {
  background: var(--bad-soft);
  color: var(--bad);
}

.pill--live,
.pill--info,
.status-tag.pill--live {
  background: var(--live-soft);
  color: var(--live);
}

.pill--muted {
  background: var(--neutral-soft);
  color: var(--muted);
}

.pill--neutral {
  background: var(--neutral-soft);
  color: var(--muted);
}

.pill-- {
  background: var(--neutral-soft);
  color: var(--muted);
}

.status-tag {
  background: var(--neutral-soft);
  color: var(--ink-2);
}

.status-tag .status-dot {
  color: currentColor;
  background: currentColor;
}

.status-tag.pill--ok .status-dot,
.pill--ok .status-dot {
  color: var(--ok-bright);
}

.status-tag.pill--warn .status-dot {
  color: var(--warn-bright);
}

.status-tag.pill--danger .status-dot {
  color: var(--bad);
}

.status-tag.pill--live .status-dot {
  color: var(--live);
}

.status-tag:not([class*="pill--"]) .status-dot {
  color: var(--muted);
}

.role-tag {
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: var(--fs-micro);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.plan-label {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 9px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  color: var(--ink-2);
  font-size: var(--fs-meta);
  font-weight: 600;
}

.rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.rating > span[aria-hidden="true"] {
  color: var(--warn-bright);
}

.rating-stars {
  color: var(--warn-bright);
  letter-spacing: 1px;
  white-space: nowrap;
}

.rating-stars--large {
  font-size: 18px;
}

.rating-tags,
.rating-list,
.rating-item {
  display: grid;
  gap: 8px;
}

.rating-item {
  gap: 4px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.rating-item:last-child {
  border-bottom: 0;
}

.rating-item__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}

.rating-comment {
  font-size: var(--fs-body);
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

/* ---------- prazna stanja, skelet, utovar ---------- */

.empty,
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 32px 20px;
  text-align: center;
  color: var(--muted);
}

.empty-state__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-2);
  background: var(--surface-2);
  color: var(--muted);
}

.empty-state b {
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--ink);
}

.empty-state p {
  max-width: 46ch;
  font-size: 12px;
}

.empty-state .button {
  margin-top: 6px;
}

.error-panel {
  margin-top: 20px;
}

.error-panel .empty p {
  color: var(--bad);
  font-weight: 500;
}

.error-panel .primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: var(--fs-body);
  font-weight: 600;
}

.loader {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--loader-track);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-screen,
.loading-block {
  display: grid;
  place-items: center;
  min-height: 240px;
  padding: 40px;
}

.skeleton {
  position: relative;
  overflow: hidden;
  min-height: 14px;
  border-radius: 6px;
  background: var(--surface-2);
  color: transparent !important;
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  animation: ins-shimmer 1.3s var(--ease) infinite;
}

.skeleton-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 0 22px;
}

.skeleton-head > div {
  display: grid;
  gap: 8px;
  width: min(420px, 60%);
}

.skeleton-head > div span {
  width: 90px;
  height: 10px;
}

.skeleton-head > div i {
  width: 100%;
  height: 26px;
}

.skeleton-head > b {
  width: 120px;
  height: 34px;
  border-radius: var(--r-pill);
}

.skeleton-panel {
  display: grid;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--surface);
}

.skeleton-row {
  height: 44px;
  border-radius: var(--r-1);
  background: var(--surface-2);
}

.skeleton-row:nth-child(2) {
  width: 82%;
}

.skeleton-row:nth-child(3) {
  width: 64%;
}

.skeleton.metric {
  display: grid;
  gap: 10px;
  min-height: 110px;
}

.skeleton.metric i {
  width: 40%;
  height: 10px;
}

.skeleton.metric b {
  width: 60%;
  height: 26px;
}

.skeleton.metric span {
  width: 70%;
  height: 10px;
}

@keyframes ins-shimmer {
  to {
    transform: translateX(100%);
  }
}

/* ---------- poruke ---------- */

.notice,
.alert {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: var(--fs-body);
  line-height: 1.45;
}

.notice--success,
.alert--success {
  border-color: var(--ok-soft);
  background: var(--ok-soft);
  color: var(--ok);
}

.notice--error,
.alert--danger {
  border-color: var(--bad-soft);
  background: var(--bad-soft);
  color: var(--bad);
}

.notice--warn,
.alert--warn {
  border-color: var(--warn-soft);
  background: var(--warn-soft);
  color: var(--warn);
}

.notice--danger {
  border-color: var(--bad-soft);
  background: var(--bad-soft);
  color: var(--bad);
}

.notice button,
.alert button {
  margin-left: auto;
}

.success-callout {
  padding: 12px 14px;
  border: 1px solid var(--ok-soft);
  border-radius: var(--r-2);
  background: var(--ok-soft);
  color: var(--ok);
  font-size: var(--fs-body);
}

.hint {
  font-size: var(--fs-meta);
  color: var(--muted);
}

.toast {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 300;
  width: min(360px, calc(100vw - 48px));
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-2);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-2);
  font-size: var(--fs-body);
  font-weight: 500;
}

.toast[data-tone="ok"] {
  border-left-color: var(--ok-bright);
}

.toast[data-tone="warn"] {
  border-left-color: var(--warn-bright);
}

.toast[data-tone="bad"] {
  border-left-color: var(--bad);
}

/* ---------- prekrivači ---------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--scrim);
  overflow-y: auto;
}

.overlay:not([hidden]) {
  animation: ins-fade 0.14s var(--ease);
}

@keyframes ins-fade {
  from {
    opacity: 0;
  }
}

.modal,
.modal-card {
  width: min(580px, 100%);
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  border-radius: var(--r-4);
  background: var(--surface);
  box-shadow: var(--shadow-3);
  animation: ins-rise 0.18s var(--ease);
}

.modal--wide,
.modal-card--wide {
  width: min(920px, 100%);
}

.stat-card__spark {
  display: block;
  flex: none;
  width: 92px;
  height: 26px;
  margin-top: 6px;
  color: var(--accent);
  opacity: 0.95;
}

.stat-card .stat-card__spark svg {
  display: block;
  width: 92px;
  height: 26px;
  color: var(--accent);
}

.bars {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  align-items: end;
  gap: 8px;
  height: var(--bar-h, 132px);
  padding: 6px 2px 0;
}

.bars .bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  height: 100%;
  min-width: 0;
}

.bars .bar__stack {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  gap: 2px;
  width: 100%;
  max-width: 34px;
  height: 100%;
}

.bars .bar__stack i {
  display: block;
  border-radius: 6px 6px 2px 2px;
  background: var(--accent);
  min-height: 2px;
}

.bars .bar__stack u {
  display: block;
  border-radius: 2px;
  background: var(--muted);
  opacity: 0.45;
  min-height: 0;
}

.bars .bar small {
  font-size: var(--fs-micro);
  color: var(--muted);
  white-space: nowrap;
}

.panel .line-chart svg {
  display: block;
  width: 100%;
  height: 132px;
  color: var(--accent);
}

.line-chart__labels {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  font-size: var(--fs-micro);
  color: var(--muted);
}

[data-form="setup-step"] .modal__body {
  padding-bottom: 20px;
}

.wizard-progress {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 20px 12px;
}

.wizard-progress__bar {
  height: 6px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.wizard-progress__bar > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  transition: width 0.2s var(--ease);
}

.wizard-progress__text {
  font-size: 12px;
  color: var(--muted);
}

.wizard-checks {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.wizard-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.wizard-check--ok {
  color: var(--ok);
}

@keyframes ins-rise {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.995);
  }
}

.modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
}

.modal__head h2 {
  font-size: var(--fs-title);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.modal__head p {
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
}

.modal > form {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.modal__body {
  flex: 1 1 auto;
  overflow-y: auto;
}

.modal__body.form-grid,
.modal__body.form-stack,
.modal__body > .form-grid,
.modal__body > .form-stack {
  padding: 18px 20px;
}

.modal__foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}

.modal__foot .button:first-child {
  margin-right: auto;
}

.confirm {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--scrim);
}

.confirm__box {
  width: min(440px, 100%);
  padding: 20px;
  border-radius: var(--r-4);
  background: var(--surface);
  box-shadow: var(--shadow-3);
}

.confirm__box h2 {
  margin-bottom: 6px;
  font-size: var(--fs-title);
  font-weight: 600;
}

.confirm__box p {
  font-size: var(--fs-body);
  color: var(--muted);
}

.confirm__foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.menu {
  position: relative;
}

.menu__trigger {
  display: inline-grid;
  place-items: center;
  width: var(--ctl-sm);
  height: var(--ctl-sm);
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--ctl-r);
  background: transparent;
  color: var(--muted);
}

.menu__trigger:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.menu-pop,
.menu__list {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 120;
  min-width: 220px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface);
  box-shadow: var(--shadow-2);
  list-style: none;
}

.menu-pop[hidden],
.menu__list[hidden] {
  display: none;
}

.menu__item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 34px;
  padding: 6px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-2);
  font-size: var(--fs-body);
  font-weight: 500;
  text-align: left;
}

.menu__item:hover,
.menu__item:focus-visible {
  background: var(--surface-2);
  color: var(--ink);
}

.menu__item--danger {
  color: var(--bad);
}

.menu__item--danger:hover {
  background: var(--bad-soft);
  color: var(--bad);
}

.menu__block {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 8px 4px;
  border-top: 1px solid var(--line);
  margin-top: 4px;
}

.menu__block select {
  min-height: 30px;
  font-size: 12px;
}

.palette {
  position: fixed;
  inset: 0;
  z-index: 320;
  display: flex;
  justify-content: center;
  padding: 12vh 20px 20px;
  background: var(--scrim);
}

.palette__box {
  display: flex;
  flex-direction: column;
  width: min(620px, 100%);
  max-height: min(560px, 74vh);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-4);
  background: var(--surface);
  box-shadow: var(--shadow-3);
}

.palette__input {
  width: 100%;
  min-height: 50px;
  padding: 0 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  font-size: var(--fs-body);
  outline: none;
}

.palette__input:focus {
  outline: none;
  box-shadow: none;
  border-color: var(--line);
}

.palette__list {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 6px;
}

.palette__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--r-1);
  background: transparent;
  color: var(--ink-2);
  font-size: 13px;
  text-align: left;
}

.palette__item:hover,
.palette__item[aria-selected="true"],
.palette__item.is-active {
  background: var(--accent-soft);
  color: var(--accent);
}

.palette__item small {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
}

.palette__empty {
  padding: 22px;
  text-align: center;
  font-size: var(--fs-body);
  color: var(--muted);
}

.palette__foot {
  padding: 9px 14px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
}

/* ---------- grafovi i sitnice ---------- */

.progress-track + .checklist {
  padding-top: 14px;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 6px 20px 16px;
}

.timeline__dot {
  position: relative;
  padding: 10px 0 10px 22px;
  border-left: 1px solid var(--line);
  font-size: var(--fs-body);
  color: var(--ink-2);
}

.timeline__dot::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 16px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline__blockers {
  margin-top: 4px;
  font-size: var(--fs-meta);
  color: var(--bad);
}

.phone-value {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.row--selected td,
.data-table tr[data-selected-ride="true"] td {
  background: var(--accent-soft);
}

tr.is-drop-target td,
.data-table tr.is-drop-target td {
  background: var(--warn-soft);
  box-shadow: inset 0 0 0 1px var(--warn);
}

.secret,
.api-key-value {
  display: block;
  padding: 10px 12px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-2);
  background: var(--surface-2);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.import-issues {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--bad);
  font-size: 12px;
  display: grid;
  gap: 4px;
}

.check-row.is-drop-target,
.is-drop-target {
  outline: 2px dashed var(--accent);
  outline-offset: 3px;
}

.bulk-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: var(--fs-body);
  font-weight: 600;
}

.bulk-bar__count {
  font-variant-numeric: tabular-nums;
}

.row-menu {
  position: relative;
  display: inline-block;
}

.row-menu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 90;
  min-width: 190px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface);
  box-shadow: var(--shadow-2);
}

.row-menu__item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 32px;
  padding: 6px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-2);
  font-size: var(--fs-body);
  text-align: left;
}

.row-menu__item:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.stops-list {
  display: grid;
  gap: 6px;
  padding: 14px 20px;
}

.stops-list li {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-1);
  background: var(--surface-2);
  font-size: var(--fs-body);
}

.chat__list {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
  padding: 14px 20px;
}

.chat__item {
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface-2);
  font-size: var(--fs-body);
}

.chat__item small {
  font-size: 11px;
  color: var(--muted);
}

.chat__item p {
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.chat__item[data-author="DISPATCHER"] {
  border-color: var(--line-2);
  background: var(--surface);
}

.draft-tabs {
  display: flex;
  gap: 4px;
  padding: 0 20px 12px;
}

.draft-tabs button {
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--muted);
  font-size: var(--fs-meta);
  font-weight: 600;
}

.print-only { display: none; }

.print-head {
  display: none;
}

.report-fold {
  border-top: 1px solid var(--line);
}

.report-fold__sum {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  cursor: pointer;
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--ink-2);
}

.report-fold__mark {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
}

.report-fold__body {
  padding: 0 20px 14px;
}

.report-fold__text {
  font-size: var(--fs-body);
  color: var(--muted);
}

/* ---------- PARITY s admin-v2: mjere prenesene iz UI/admin-v2/assets/app.css ---------- */

.side-brand { padding: 0 14px 0 18px; }
.nav, .side__nav, .navpanel__nav { padding: 10px 10px 18px; mask-image: linear-gradient(to bottom, rgb(0, 0, 0) calc(100% - 22px), transparent); }
.nav-grp, .navpanel__group { margin-top: 16px; }
.side__section-label, .navpanel__label { padding: 0 12px 8px; opacity: 0.8; }
.nav-item, .navpanel__link { height: 40px; padding: 0 12px; gap: 11px; border-radius: var(--r-2); }
.nav-item b { min-width: 19px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--neutral-soft); color: var(--muted); font-family: var(--mono); font-size: 9.5px; }
.side__sub { margin: 2px 0 6px 24px; padding-left: 12px; }
.side__sub-items { margin: 0; padding-left: 0; border-left: 0; display: flex; flex-direction: column; gap: 1px; }
.side__foot, .navpanel__foot { padding: 10px 12px 12px; gap: 8px; border-top: 1px solid var(--side-line); }
.side__status { padding: 9px 10px; border-radius: var(--r-2); background: var(--side-bg-2); font-size: 11px; }
.topbar { padding: 0 24px; gap: 12px; }
.topbar__search { width: min(400px, 36vw); height: 40px; padding: 0 12px; gap: 9px; border-radius: 999px; background: var(--surface-2); border-color: var(--line); }
.kbd { min-width: 19px; height: 19px; padding: 0 5px; border-bottom-width: 2px; border-radius: 5px; background: var(--surface); font-size: 9.5px; }
.topbar__actions { gap: 2px; }
.topbar__profile { height: 44px; padding: 0 8px; gap: 9px; border-radius: 999px; }
.topbar__profile-txt b { font-size: var(--fs-body); }
.topbar__profile-txt small { font-size: var(--fs-micro); }
.page-head { align-items: flex-end; gap: 24px; padding: 0 0 6px; margin-bottom: 22px; }
.ph-left { min-width: 0; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: var(--fs-meta); color: var(--muted); min-height: 16px; }
.crumbs .sep { color: var(--line-2); }
.crumbs .here { color: var(--ink-2); font-weight: 600; }
.ph-title-row { display: flex; align-items: baseline; gap: 14px; margin-top: 10px; flex-wrap: wrap; }
.ph-title-row h1 { font-size: var(--fs-value); line-height: 1.12; font-weight: 600; letter-spacing: -0.028em; }
.ph-sub { margin-top: 7px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 13px; }
.ph-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.page-head p { margin-top: 7px; font-size: 13px; }
.page-head > .actions { gap: 8px; }
.metric { position: relative; min-height: 152px; padding: 18px 20px 16px; overflow: hidden; }
.metric__top { gap: 10px; }
.metric__top > span { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 12px; }
.metric__value { margin-top: 12px; font-size: var(--fs-value); line-height: 1.05; font-weight: 600; letter-spacing: -0.03em; }
.metric__foot { margin-top: 8px; gap: 4px 8px; padding-right: 92px; min-height: 20px; align-items: flex-start; }
.metric__spark { position: absolute; right: 16px; top: 60px; }
.panel__head { gap: 10px; }
.panel__foot { padding: 13px 20px; background: transparent; color: var(--muted); font-size: 12px; }
.table-wrap { overflow-x: auto; overflow-y: visible; }
.data-table thead th:first-child, .data-table tbody td:first-child { padding-left: 14px; }
.data-table thead th:last-child, .data-table tbody td:last-child { padding-right: 14px; }
.data-table tbody td { padding: 6px 14px; }
.button { height: 38px; padding: 0 16px; letter-spacing: -0.005em; }
.button--small { height: 32px; padding: 0 12px; }
.icon-button { width: 36px; height: 36px; }
.button--quiet, .button--ghost { color: var(--ink); }
.pill, .status-tag { height: 22px; padding: 0 9px; gap: 5px; font-size: 11px; font-weight: 600; letter-spacing: 0.005em; }
.pill .status-dot, .status-tag .status-dot { width: 7px; height: 7px; flex: 0 0 7px; }
.tab-bar { border: 0; background: transparent; padding: 0; gap: 4px; border-bottom: 1px solid var(--line); border-radius: 0; }
.tab-bar__button { height: 44px; padding: 0 14px; border-radius: 0; font-size: var(--fs-body); font-weight: 500; }
.tab-bar__button[aria-selected="true"] { background: transparent; color: var(--ink); box-shadow: none; box-shadow: inset 0 -2px 0 var(--accent); }
.menu__item { min-height: 31px; padding: 5px 8px; font-size: 12px; border-radius: var(--r-1); }
.modal { max-height: min(86vh, 880px); }
.toast { border-radius: 14px; padding: 12px 13px; }
/* ---------- gornja traka: kontekst, izbornici, obavijesti ---------- */

.topbar-sp { flex: 1 1 auto; }
.topbar-mode { font-size: 11px; color: var(--muted); white-space: nowrap; }
.scope { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 9px; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface); color: var(--ink); font-size: 12px; font-weight: 600; max-width: 210px; }
.scope:hover { border-color: var(--line-2); }
.scope-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok-bright); flex: 0 0 7px; }
.scope-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-sep { width: 1px; height: 20px; background: var(--line); flex: 0 0 1px; }
.bell { position: relative; }
.bell-dot { position: absolute; top: 3px; right: 3px; display: grid; place-items: center; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 999px; background: var(--bad); color: var(--surface); font-size: 9px; font-weight: 700; }
.userbtn { display: flex; align-items: center; gap: 9px; height: 44px; padding: 0 8px; border: 0; border-radius: 999px; background: transparent; text-align: left; }
.userbtn:hover { background: var(--surface-2); }
.userbtn-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.userbtn-txt b { font-size: var(--fs-body); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.userbtn-txt small { font-size: var(--fs-micro); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar-ink { background: var(--accent-soft); color: var(--accent); }
.pop { position: fixed; z-index: 210; min-width: 200px; max-width: min(340px, calc(100vw - 16px)); border: 1px solid var(--line-2); border-radius: var(--r-3); background: var(--surface); box-shadow: var(--shadow-2); }
.pop .menu { padding: 5px; }
.menu { display: flex; flex-direction: column; }
.menu-label { padding: 6px 8px 4px; font-size: var(--fs-micro); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.menu-item { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 31px; padding: 5px 8px; border: 0; border-radius: var(--r-1); background: transparent; color: var(--ink-2); font-size: 12px; text-align: left; }
.menu-item:hover { background: var(--surface-2); color: var(--ink); }
.menu-item[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.menu-item small { margin-left: auto; color: var(--muted); font-size: var(--fs-micro); }
.menu-note { padding: 6px 8px; font-size: 11px; color: var(--muted); }
.menu-sep { height: 1px; margin: 4px 2px; background: var(--line); }
.notif-item { display: flex; gap: 9px; width: 100%; padding: 8px; border: 0; border-radius: var(--r-1); background: transparent; text-align: left; }
.notif-item:hover { background: var(--surface-2); }
.notif-item b { display: block; font-size: 12px; font-weight: 600; color: var(--ink); }
.notif-item small { display: block; font-size: 11px; color: var(--muted); }
/* ---------- paleta naredbi (admin-v2 .cmdk) ---------- */

.cmdk { position: fixed; inset: 0; z-index: 240; display: flex; justify-content: center; align-items: flex-start; padding-top: 11vh; background: var(--scrim); }
.cmdk-panel { width: min(620px, calc(100vw - 24px)); max-height: min(72vh, 620px); display: flex; flex-direction: column; border: 1px solid var(--line-2); border-radius: var(--r-4); background: var(--surface); box-shadow: var(--shadow-3); }
.cmdk-input { display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 50px; border-bottom: 1px solid var(--line); }
.cmdk-input input { flex: 1; min-width: 0; height: 100%; min-height: 0; padding: 0; border: 0; background: transparent; font-size: var(--fs-body); outline: none; }
.cmdk-input input:focus { outline: none; box-shadow: none; }
.cmdk-list { overflow-y: auto; padding: 6px; flex: 1; }
.cmdk-group { padding: 8px 9px 4px; font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.cmdk-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 38px; padding: 6px 9px; border: 1px solid transparent; border-radius: var(--r-2); background: transparent; color: var(--ink-2); text-align: left; font-size: 13px; }
.cmdk-item:hover, .cmdk-item.is-active { background: var(--accent-soft); color: var(--accent); }
.cmdk-item .cmdk-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.cmdk-item .cmdk-txt small { color: var(--muted); font-size: 11px; }
.cmdk-empty { padding: 22px; text-align: center; color: var(--muted); font-size: var(--fs-body); }
.cmdk-foot { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-top: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font-size: 10px; }
.cmdk-foot span { display: inline-flex; align-items: center; gap: 4px; }
/* ---------- gustoća i sažeta navigacija ---------- */

html[data-density="compact"] {
  --row-h: 44px;
}

html[data-density="cozy"] {
  --row-h: 56px;
}

html[data-density="comfy"] {
  --row-h: 64px;
}

html[data-density="compact"] .nav-item,
html[data-density="compact"] .navpanel__link {
  height: 32px;
}

html[data-density="comfy"] .nav-item,
html[data-density="comfy"] .navpanel__link {
  height: 40px;
}

html[data-sidebar="collapsed"] {
  --rail: var(--rail-mini);
}

html[data-sidebar="collapsed"] .side,
html[data-sidebar="collapsed"] .navpanel {
  align-items: stretch;
}

html[data-sidebar="collapsed"] .brand__copy,
html[data-sidebar="collapsed"] .navpanel__brand > span:last-child,
html[data-sidebar="collapsed"] .side__section-label,
html[data-sidebar="collapsed"] .navpanel__label,
html[data-sidebar="collapsed"] .nav-item > span,
html[data-sidebar="collapsed"] .navpanel__link > span,
html[data-sidebar="collapsed"] .nav-item b,
html[data-sidebar="collapsed"] .side__sub,
html[data-sidebar="collapsed"] .account-copy,
html[data-sidebar="collapsed"] .profile__head > span:last-child,
html[data-sidebar="collapsed"] .side__status span:not(.status-dot),
html[data-sidebar="collapsed"] .profile__actions,
html[data-sidebar="collapsed"] .language-switch,
html[data-sidebar="collapsed"] .locale-switch {
  display: none;
}

html[data-sidebar="collapsed"] .nav-item,
html[data-sidebar="collapsed"] .navpanel__link {
  justify-content: center;
  padding: 0;
}

html[data-sidebar="collapsed"] .side-brand,
html[data-sidebar="collapsed"] .navpanel__brand {
  justify-content: center;
  padding: 0;
}

html[data-sidebar="collapsed"] .side__status {
  justify-content: center;
  margin-left: 6px;
  margin-right: 6px;
  padding: 8px 0;
}

html[data-sidebar="collapsed"] .profile__theme,
html[data-sidebar="collapsed"] .side__tools {
  justify-content: center;
}

html[data-sidebar="collapsed"] .account-row,
html[data-sidebar="collapsed"] .profile__head {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

/* ---------- osjetljivost i pristupačnost ---------- */

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

  .loader,
  .skeleton::after {
    animation: spin 2s linear infinite !important;
  }
}

@media (max-width: 1280px) {
  .metrics,
  .stat-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .body--split {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 1100px) {
  .shell,
  .company-shell {
    grid-template-columns: var(--rail-mini) minmax(0, 1fr);
  }

  html:not([data-sidebar]) .brand__copy,
  html:not([data-sidebar]) .navpanel__brand > span:last-child,
  html:not([data-sidebar]) .side__section-label,
  html:not([data-sidebar]) .navpanel__label,
  html:not([data-sidebar]) .nav-item > span,
  html:not([data-sidebar]) .navpanel__link > span,
  html:not([data-sidebar]) .nav-item b,
  html:not([data-sidebar]) .side__sub,
  html:not([data-sidebar]) .account-copy,
  html:not([data-sidebar]) .profile__head > span:last-child,
  html:not([data-sidebar]) .side__status span:not(.status-dot),
  html:not([data-sidebar]) .profile__actions,
  html:not([data-sidebar]) .language-switch,
  html:not([data-sidebar]) .locale-switch {
    display: none;
  }

  html:not([data-sidebar]) .nav-item,
  html:not([data-sidebar]) .navpanel__link {
    justify-content: center;
    padding: 0;
  }

  html:not([data-sidebar]) .side-brand,
  html:not([data-sidebar]) .navpanel__brand {
    justify-content: center;
    padding: 0;
  }

  html:not([data-sidebar]) .profile__head,
  html:not([data-sidebar]) .account-row,
  html:not([data-sidebar]) .profile__theme,
  html:not([data-sidebar]) .side__tools {
    justify-content: center;
  }
}

@media (max-width: 1100px) {
  .topbar__profile-txt {
    display: none;
  }

  .density-switch {
    display: none;
  }
}

@media (max-width: 1100px) {
  .topbar-mode,
  .topbar-scope > .topbar-sep {
    display: none;
  }

  .userbtn-txt {
    display: none;
  }
}

@media (max-width: 820px) {
  .main,
  .workspace {
    padding: 0 16px 32px;
  }

  .topbar {
    margin: 0 -16px 16px;
    padding: 0 16px;
    gap: 8px;
  }

  .topbar__ctx .topbar__chip,
  .topbar__sep {
    display: none;
  }

  .topbar__ctx {
    display: none;
  }

  .topbar__search {
    width: auto;
    flex: 1 1 auto;
  }

  .topbar__search span {
    display: none;
  }

  .topbar__search .kbd,
  .topbar__search-wrap .kbd {
    display: none;
  }

  .topbar-scope {
    display: none;
  }

  .topbar-actions .icon-button[data-action="help-menu"],
  .topbar-actions .icon-button[data-action="view-menu"] {
    display: none;
  }

  .topbar__search,
  .topbar__search-wrap {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
  }

  .metrics,
  .stat-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-grid,
  .form-row,
  .detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-head,
  .pagehead {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding-top: 18px;
  }

  .page-head > .actions,
  .pagehead__actions {
    justify-content: flex-start;
  }

  .panel__head {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .search-box {
    width: 100%;
  }

  .toast {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
  }

  .overlay {
    padding: 0;
    align-items: stretch;
  }

  .modal,
  .modal-card {
    width: 100%;
    max-height: 100vh;
    min-height: 100vh;
    border-radius: 0;
  }

  .palette {
    padding: 0;
  }

  .palette__box {
    width: 100%;
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
    border: 0;
  }
}

@media (max-width: 560px) {
  .page-head h1,
  .pagehead h1 {
    font-size: 22px;
  }

  .panel {
    border-radius: var(--r-2);
  }

  .panel__head {
    padding: 12px 14px;
  }

  .form-grid,
  .form-stack,
  .form-inline,
  .detail-grid,
  .module-grid,
  .packages-grid {
    padding: 14px;
  }

  .data-table thead th,
  .data-table tbody td {
    padding-left: 10px;
    padding-right: 10px;
  }

  .data-table thead th:first-child,
  .data-table tbody td:first-child {
    padding-left: 14px;
  }
}

/* ---------- ispis ---------- */

@media print {
  @page {
    margin: 16mm;
  }

  body {
    background: var(--surface);
    color: var(--ink);
  }

  .side,
  .navpanel,
  .topbar,
  .mobile-bar,
  .no-print,
  .toast,
  .overlay {
    display: none !important;
  }

  .shell,
  .company-shell {
    display: block;
  }

  .main,
  .workspace {
    padding: 0;
  }

  .panel {
    border: 1px solid var(--line);
    box-shadow: none;
    break-inside: avoid;
  }

  .print-only,
  .print-head {
    display: block;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0c111d;
  --paper-2: #080c14;
  --surface: #101828;
  --surface-2: #182230;
  --surface-3: #1d2939;
  --surface-soft: #182230;
  --bg: #0c111d;
  --ink: #f9fafb;
  --ink-2: #d0d5dd;
  --muted: #98a2b3;
  --faint: #667085;
  --label: #d0d5dd;
  --line: #1d2939;
  --line-2: #344054;
  --line-soft: #1d2939;
  --line-strong: #6b7d95;
  --accent: #84adff;
  --accent-2: #b2ccff;
  --accent-dark: #b2ccff;
  --accent-soft: #12294a;
  --accent-ink: #0c111d;
  --on-accent: #0c111d;
  --on-brand: #ffffff;
  --on-toast: #0c111d;
  --ok: #75e0a7;
  --ok-soft: #0b2a1d;
  --ok-bright: #75e0a7;
  --success: #75e0a7;
  --success-soft: #0b2a1d;
  --warn: #fec84b;
  --warn-soft: #2c1f08;
  --warn-bright: #fec84b;
  --warm: #fec84b;
  --bad: #fda29b;
  --bad-soft: #2c1210;
  --danger: #fda29b;
  --danger-soft: #2c1210;
  --danger-strong: #f97066;
  --info: #7cd4fd;
  --info-soft: #0b2533;
  --live: #84adff;
  --live-soft: #12294a;
  --neutral-soft: #1d2939;
  --muted-soft: #1d2939;
  --grid: rgba(249, 250, 251, 0.045);
  --scrim: rgba(3, 7, 18, 0.68);
  --focus: #84adff;
  --track: #1d2939;
  --loader-track: #1d2939;
  --mark-bg: #12294a;
  --mark-ink: #84adff;
  --toast-bg: #101828;
  --logo-bg: #ffffff;
  --auth-lead: #d0d5dd;
  --readonly-ink: #98a2b3;
  --rail-ink: #d0d5dd;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 14px 34px -10px rgba(0, 0, 0, 0.62), 0 2px 6px rgba(0, 0, 0, 0.4);
  --shadow-3: 0 34px 70px -18px rgba(0, 0, 0, 0.78);
  --side-bg: #0c111d;
  --side-bg-2: #101828;
  --side-ink: #f9fafb;
  --side-muted: #98a2b3;
  --side-line: #1d2939;
  --side-hover: #182230;
  --paused: #a78bfa;
  --side-active: #12294a;
  --side-accent: #84adff;
  --c1: #84adff;
  --c2: #7cd4fd;
  --c3: #75e0a7;
  --c4: #fec84b;
  --c5: #bdb4fe;
  --dot-live: #75e0a7;
  --dot-live-glow: rgba(117, 224, 167, 0.22);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #0c111d;
    --paper-2: #080c14;
    --surface: #101828;
    --surface-2: #182230;
    --surface-3: #1d2939;
    --surface-soft: #182230;
    --bg: #0c111d;
    --ink: #f9fafb;
    --ink-2: #d0d5dd;
    --muted: #98a2b3;
    --faint: #667085;
    --label: #d0d5dd;
    --line: #1d2939;
    --line-2: #344054;
    --line-soft: #1d2939;
    --line-strong: #6b7d95;
    --accent: #84adff;
    --accent-2: #b2ccff;
    --accent-dark: #b2ccff;
    --accent-soft: #12294a;
    --accent-ink: #0c111d;
    --on-accent: #0c111d;
    --on-brand: #ffffff;
    --on-toast: #0c111d;
    --ok: #75e0a7;
    --ok-soft: #0b2a1d;
    --ok-bright: #75e0a7;
    --success: #75e0a7;
    --success-soft: #0b2a1d;
    --warn: #fec84b;
    --warn-soft: #2c1f08;
    --warn-bright: #fec84b;
    --warm: #fec84b;
    --bad: #fda29b;
    --bad-soft: #2c1210;
    --danger: #fda29b;
    --danger-soft: #2c1210;
    --danger-strong: #f97066;
    --info: #7cd4fd;
    --info-soft: #0b2533;
    --live: #84adff;
    --live-soft: #12294a;
    --neutral-soft: #1d2939;
    --muted-soft: #1d2939;
    --grid: rgba(249, 250, 251, 0.045);
    --scrim: rgba(3, 7, 18, 0.68);
    --focus: #84adff;
    --track: #1d2939;
    --loader-track: #1d2939;
    --mark-bg: #12294a;
    --mark-ink: #84adff;
    --toast-bg: #101828;
    --logo-bg: #ffffff;
    --auth-lead: #d0d5dd;
    --readonly-ink: #98a2b3;
    --rail-ink: #d0d5dd;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-2: 0 14px 34px -10px rgba(0, 0, 0, 0.62), 0 2px 6px rgba(0, 0, 0, 0.4);
    --shadow-3: 0 34px 70px -18px rgba(0, 0, 0, 0.78);
    --side-bg: #0c111d;
    --side-bg-2: #101828;
    --side-ink: #f9fafb;
    --side-muted: #98a2b3;
    --side-line: #1d2939;
    --side-hover: #182230;
  --paused: #a78bfa;
    --side-active: #12294a;
    --side-accent: #84adff;
    --c1: #84adff;
    --c2: #7cd4fd;
    --c3: #75e0a7;
    --c4: #fec84b;
    --c5: #bdb4fe;
    --dot-live: #75e0a7;
    --dot-live-glow: rgba(117, 224, 167, 0.22);
  }
}

/* Instrument — konzola tvrtke: prijava, navigacija, karta, pregledi, ispis računa. */

/* ---------- prijava i prvi korak ---------- */

.auth-layout {
  display: grid;
  grid-template-columns: minmax(380px, 520px) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
  width: min(1180px, calc(100% - 48px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 48px 0;
}

.auth-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}

.auth-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.auth-toolbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-copy h1 {
  margin: 4px 0 8px;
  font-size: 26px;
  line-height: 1.18;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.auth-copy p {
  max-width: 40ch;
  font-size: 13px;
  color: var(--muted);
}

.auth-signout {
  align-self: flex-start;
}

.auth-aside {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: flex-end;
  min-height: 420px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--r-4);
  background:
    radial-gradient(circle at 80% 12%, var(--accent-soft), transparent 52%),
    var(--surface-2);
  overflow: hidden;
}

.auth-aside p {
  position: relative;
  z-index: 1;
  max-width: 42ch;
  font-size: var(--fs-body);
  color: var(--ink-2);
}

.aside-kicker {
  position: relative;
  z-index: 1;
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.aside-orbit {
  position: absolute;
  top: 12%;
  right: -12%;
  width: 320px;
  height: 320px;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.aside-orbit::before,
.aside-orbit::after {
  content: "";
  position: absolute;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.aside-orbit::before {
  inset: 44px;
}

.aside-orbit::after {
  inset: 96px;
  border-color: var(--accent);
  opacity: 0.35;
}

/* ---------- traka stranice s pretragom ---------- */

.pagehead__search {
  display: flex;
  align-items: center;
  gap: 9px;
  width: min(400px, 36vw);
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--muted);
  font-size: var(--fs-body);
}

.pagehead__search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.pagehead__search input {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: var(--fs-body);
  outline: none;
}

.pagehead__search input:focus {
  outline: none;
  box-shadow: none;
}

.pagehead__search-count {
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pagehead__jump {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 120;
  width: min(420px, 82vw);
  max-height: 60vh;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface);
  box-shadow: var(--shadow-2);
}

.pagehead {
  position: relative;
}

.pagehead__jump[hidden] {
  display: none;
}

.pagehead__jump-label {
  display: block;
  padding: 8px 10px 4px;
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.pagehead__jump-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
  width: 100%;
  padding: 7px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-2);
  text-align: left;
}

.pagehead__jump-item b {
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--ink);
}

.pagehead__jump-item small {
  font-size: 11px;
  color: var(--muted);
}

.pagehead__jump-item:hover,
.pagehead__jump-item:focus-visible {
  background: var(--accent-soft);
}

.pagehead__jump-item:hover b {
  color: var(--accent);
}

/* ---------- karta ---------- */

.map {
  position: relative;
  height: 320px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  overflow: hidden;
  background:
    linear-gradient(0deg, var(--grid) 1px, transparent 1px) 0 0 / 34px 34px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 34px 34px,
    var(--surface-2);
}

.map-platform,
.zone-draw__map {
  position: relative;
  height: 320px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  overflow: hidden;
  background:
    linear-gradient(0deg, var(--grid) 1px, transparent 1px) 0 0 / 34px 34px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 34px 34px,
    var(--surface-2);
}

.map-platform {
  height: 260px;
}

.zone-draw__map {
  height: 300px;
  cursor: crosshair;
}

.map-pin,
.zone-draw__pin {
  position: relative;
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted);
  box-shadow: 0 0 0 3px var(--surface);
}

.map-pin--driver {
  background: var(--ok-bright);
}

.map-pin--ride {
  background: var(--accent);
}

.map-pin--paused {
  background: var(--paused);
}

.map-pin--,
.map-pin--muted {
  background: var(--muted);
}

.map-pin--cluster {
  width: 22px;
  height: 22px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: var(--fs-micro);
  font-weight: 700;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.map-legend .map-pin {
  flex: 0 0 auto;
}

.map-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 20px 12px;
  font-size: var(--fs-meta);
}

.map-legend .map-pin {
  margin-right: 2px;
}

.zone-draw__pin {
  position: absolute;
  width: 11px;
  height: 11px;
  margin: -5px 0 0 -5px;
  background: var(--accent);
  cursor: grab;
}

.vehicle-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-2);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

/* ---------- pregled boja i logotipa ---------- */

.color-field {
  display: grid;
  gap: 10px;
}

.color-field__row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.color-preview {
  display: grid;
  gap: 12px;
}

.color-preview__phone {
  display: grid;
  gap: 8px;
  width: 220px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-4);
  background: var(--surface);
}

.color-field input[type="color"] {
  width: 44px;
  min-height: 34px;
  height: 34px;
  padding: 2px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-1);
  background: var(--surface);
}

.logo-field {
  display: grid;
  gap: 10px;
}

.logo-field__row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.logo-field__actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.logo-preview {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: var(--r-2);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo-preview--empty,
.logo-pick {
  border-style: dashed;
}

.logo-pick {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-2);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
}

.logo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.logo-row:last-child {
  border-bottom: 0;
}

.logo-row__tools {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.brand-icons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ---------- revizija ---------- */

.audit-table {
  font-size: var(--fs-body);
}

.audit-row td {
  vertical-align: top;
}

.audit-cell {
  max-width: 320px;
}

.audit-cell--details {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.audit-time,
.audit-code {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.audit-actor {
  display: block;
  font-weight: 600;
  color: var(--ink);
}

.audit-ip {
  display: block;
  font-family: var(--mono);
  font-size: var(--fs-micro);
  color: var(--muted);
}

.audit-badge {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--muted);
  vertical-align: middle;
}

.audit-badge--ok {
  background: var(--ok-bright);
}

.audit-badge--danger {
  background: var(--bad);
}

.audit-badge--accent {
  background: var(--accent);
}

.audit-badge--muted {
  background: var(--muted);
}

/* ---------- ispis ---------- */

.print-only,
.print-head {
  display: none;
}

body.print-receipt > :not(.overlay) {
  display: none !important;
}

body.print-receipt .overlay {
  position: static;
  display: block;
  padding: 0;
  background: none;
  overflow: visible;
}

body.print-receipt .modal {
  max-height: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body.print-receipt .modal__head,
body.print-receipt .modal__foot {
  display: none !important;
}

body.print-receipt .modal__body > :not([data-slot="ride-receipt"]):not(.receipt) {
  display: none !important;
}

.qr {
  display: inline-grid;
  place-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface);
}

.embed-origins,
.embed-snippet {
  display: grid;
  gap: 8px;
  padding: 14px 20px;
}

.embed-snippet code {
  display: block;
  padding: 10px 12px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface-2);
  font-size: var(--fs-meta);
  white-space: pre;
}

/* ---------- usporedni pregled ---------- */

.preview-sheet {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--surface);
}

.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.preview-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: var(--fs-micro);
  font-weight: 600;
}

.preview-banner,
.preview-warn {
  padding: 9px 12px;
  border: 1px solid var(--warn-soft);
  border-radius: var(--r-2);
  background: var(--warn-soft);
  color: var(--warn);
  font-size: var(--fs-meta);
}

.preview-banner {
  border-color: var(--accent-soft);
  background: var(--accent-soft);
  color: var(--accent);
}

.preview-car,
.preview-map {
  position: relative;
  display: grid;
  place-items: center;
  height: 120px;
  border-radius: var(--r-2);
  background: var(--surface-2);
  color: var(--muted);
  font-size: var(--fs-meta);
}

.preview-pin {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
}

.preview-stats {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--muted);
}

.preview-stats b {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.preview-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.preview-button,
.preview-button--ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--preview-brand, var(--accent));
  color: var(--on-accent);
  font-size: var(--fs-meta);
  font-weight: 600;
}

.preview-button--ghost {
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink-2);
}

.color-preview__phone > .preview-button,
.color-preview__phone > .preview-button--ghost {
  width: 100%;
}

@media (max-width: 1000px) {
  .auth-layout {
    grid-template-columns: minmax(0, 1fr);
    width: min(560px, calc(100% - 32px));
    padding: 24px 0;
  }

  .auth-aside {
    display: none;
  }
}

@media (max-width: 820px) {
  .pagehead__search {
    width: 100%;
  }

  .pagehead__actions {
    width: 100%;
  }

  .map,
  .zone-draw__map {
    height: 220px;
  }
}

@media (max-width: 1100px) {
  .company-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .navpanel {
    position: fixed;
    top: 0;
    left: 0;
    width: 288px;
    max-width: 86vw;
    height: 100vh;
    height: 100dvh;
    transform: translateX(-100%);
    transition: transform 0.2s var(--ease);
    box-shadow: var(--shadow-3);
    z-index: 130;
  }

  body.nav-open .navpanel {
    transform: none;
  }

  body.nav-open {
    overflow: hidden;
  }

  .nav-scrim {
    position: fixed;
    inset: 0;
    z-index: 120;
    background: var(--scrim);
  }

  .navpanel__close {
    display: inline-flex;
  }

  html[data-sidebar="drawer"] .navpanel__brand {
    padding: 0 12px 0 18px;
  }
}

:root {
  --fs-micro: 11px;
  --fs-meta: 12px;
  --fs-body: 13px;
  --fs-title: 16px;
  --fs-value: 26px;
  --ctl: 36px;
  --ctl-sm: 32px;
  --ctl-r: 10px;
  --label-ink: var(--label);
}

body {
  font-size: var(--fs-body);
  line-height: 1.5;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

b,
strong {
  font-weight: 600;
}

small {
  font-size: var(--fs-meta);
}

.report-fold__sum {
  padding: 12px 18px;
  font-size: var(--fs-body);
  font-weight: 600;
}

.report-fold__body {
  padding: 0 18px 14px;
}

.report-fold__mark {
  width: 20px;
  height: 20px;
  font-size: var(--fs-micro);
}

.page-head,
.pagehead {
  align-items: flex-end;
  gap: 20px;
  padding: 4px 0 0;
  margin-bottom: 18px;
}

.page-head h1,
.pagehead h1,
.ph-title-row h1 {
  font-size: var(--fs-value);
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.page-head p,
.pagehead p,
.ph-sub {
  margin-top: 6px;
  max-width: 74ch;
  font-size: var(--fs-body);
  line-height: 1.5;
  color: var(--muted);
}

.crumbs,
.breadcrumbs {
  min-height: 18px;
  font-size: var(--fs-meta);
  color: var(--muted);
}

.eyebrow,
.panel__head .eyebrow,
.section-head {
  display: block;
  margin-bottom: 4px;
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.panel,
.stat-card,
.metric {
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}

.panel__head > div:first-child {
  min-width: 0;
  padding: 2px 0;
}

.panel__head h2,
.panel__title h2 {
  font-size: var(--fs-title);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.012em;
}

.panel__head p {
  margin-top: 3px;
  max-width: 96ch;
  font-size: var(--fs-meta);
  line-height: 1.45;
  color: var(--muted);
}

.panel__tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.panel__metric {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: var(--fs-meta);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.panel__foot,
.panel__foot--note {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-top: 1px solid var(--line-soft);
  background: transparent;
  font-size: var(--fs-meta);
  line-height: 1.5;
  color: var(--muted);
}

.panel__foot--split {
  justify-content: space-between;
}

.panel--flush > .data-table tbody td:first-child,
.panel--flush > .data-table thead th:first-child {
  padding-left: 18px;
}

.metrics,
.stat-row,
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.metric,
.stat-card,
.stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: flex-start;
  min-height: 104px;
  padding: 14px 16px;
  overflow: hidden;
}

.metric__top,
.stat-card > span,
.stat__label,
.stat-card__label {
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.metric__top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 18px;
}

.metric__top small {
  font-size: var(--fs-micro);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.metric__value,
.stat-card > b,
.stat__value {
  font-size: var(--fs-value);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.metric__value {
  margin-top: 2px;
}

.stat-card > b.stat-card__text,
.stat-card__text {
  font-size: var(--fs-title);
  font-weight: 600;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
}

.metric__foot,
.stat-card > small,
.stat__foot {
  margin-top: auto;
  font-size: var(--fs-meta);
  line-height: 1.45;
  color: var(--muted);
}

.stat-card__spark {
  position: absolute;
  right: 14px;
  bottom: 14px;
  height: 26px;
  opacity: 0.9;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.form-stack,
.form-grid--tight {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-section > h3 {
  margin-bottom: 10px;
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.field {
  gap: 5px;
}

.field > span,
.field > label,
.field__label,
.field-label,
.detail-label,
.stat__label {
  font-size: var(--fs-meta);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--label-ink);
}

.field input:not([type="checkbox"]):not([type="radio"]),
.field select,
.field textarea,
input[type="text"],
input[type="search"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="tel"],
input[type="url"],
select,
textarea {
  width: 100%;
  height: var(--ctl);
  min-height: var(--ctl);
  padding: 0 11px;
  border: 1px solid var(--line-2);
  border-radius: var(--ctl-r);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: var(--fs-body);
  line-height: 1.4;
}

textarea,
.field textarea {
  height: auto;
  min-height: 84px;
  padding: 9px 11px;
  line-height: 1.5;
  resize: vertical;
}

.field input:hover,
.field select:hover,
.field textarea:hover,
input:hover,
select:hover,
textarea:hover {
  border-color: var(--faint);
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field input::placeholder,
input::placeholder,
textarea::placeholder {
  color: var(--faint);
}

select {
  padding-right: 28px;
  background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%;
}

.field small,
.field-hint,
.detail-block small {
  font-size: var(--fs-meta);
  line-height: 1.45;
  color: var(--muted);
}

.field input[type="checkbox"],
.field input[type="radio"],
input[type="checkbox"],
input[type="radio"] {
  width: 16px;
  height: 16px;
  min-height: 16px;
  padding: 0;
  border-radius: 4px;
}

.button {
  height: var(--ctl);
  padding: 0 14px;
  gap: 6px;
  border-radius: var(--ctl-r);
  font-size: var(--fs-body);
  font-weight: 600;
  letter-spacing: 0;
}

.button--small {
  height: var(--ctl-sm);
  padding: 0 11px;
  font-size: var(--fs-body);
}

.panel__head .panel__tools .button,
.panel__head .filters__actions .button {
  height: var(--ctl-sm);
  font-size: var(--fs-body);
}

.icon-button {
  width: var(--ctl);
  height: var(--ctl);
  border-radius: var(--ctl-r);
}

.link-button {
  font-size: var(--fs-body);
  font-weight: 600;
}

.filters-row,
.filters {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.filters .field--inline {
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
}

.filters .field--inline > span {
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.filters .field--inline input,
.filters .field--inline select {
  height: var(--ctl);
  min-height: var(--ctl);
  font-size: var(--fs-body);
}

.filters .field--inline.field--grow {
  flex: 1 1 240px;
  max-width: 320px;
}

.filters .button {
  height: var(--ctl);
}

.filters__note {
  width: 100%;
  font-size: var(--fs-meta);
  color: var(--muted);
}

.filters__actions {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-left: auto;
}

.tab-bar {
  display: flex;
  align-items: stretch;
  gap: 2px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.tab-bar__button {
  height: 40px;
  padding: 0 12px;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: var(--fs-body);
  font-weight: 600;
}

.tab-bar__button:hover {
  color: var(--ink);
}

.tab-bar__button[aria-selected="true"],
.tab-bar__button[aria-pressed="true"] {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead th {
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.data-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-soft);
  font-size: var(--fs-body);
  line-height: 1.45;
  vertical-align: middle;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover td {
  background: var(--surface-2);
}

.data-table thead th:first-child,
.data-table tbody td:first-child {
  padding-left: 18px;
}

.data-table thead th:last-child,
.data-table tbody td:last-child {
  padding-right: 18px;
}

.data-table td.number-cell,
.data-table th.number-cell,
.data-table td.cell-money,
.data-table th.cell-money,
.data-table td.col-price,
.data-table th.col-price,
.data-table .money-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.data-table td.cell-actions,
.data-table th.cell-actions {
  text-align: right;
}

.cell-stack {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.cell-stack b {
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-stack small,
.cell-stack .cell-stack__muted {
  font-size: var(--fs-meta);
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-muted,
.cell-note {
  font-size: var(--fs-meta);
  color: var(--muted);
}

.cell-identity__text {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pill,
.status-tag,
.role-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.checklist {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 4px 18px 8px;
}

.check-row,
.attention-row,
.dashboard-alert-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 8px 0;
  border-top: 1px solid var(--line-soft);
  font-size: var(--fs-body);
  line-height: 1.45;
}

.checklist > *:first-child {
  border-top: 0;
}

.check-row > span,
.attention-row > span {
  min-width: 0;
}

.check-row b,
.attention-row b,
.dashboard-alert-row b {
  margin-left: auto;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.check-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  font-size: var(--fs-micro);
}

.step-list {
  gap: 10px;
  padding: 14px 18px 18px;
}

.step-list li {
  padding-left: 28px;
  font-size: var(--fs-body);
  line-height: 1.5;
  color: var(--ink-2);
}

.step-list li::before {
  width: 20px;
  height: 20px;
  font-size: var(--fs-micro);
}

.live-row__head b,
.live-list__head b {
  font-size: var(--fs-body);
  font-weight: 600;
}

.live-row__meta,
.live-row__route,
.live-row__driver {
  font-size: var(--fs-meta);
}

.live-metric span {
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.live-metric b {
  font-size: var(--fs-title);
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 34px 20px;
  text-align: center;
}

.empty-state b {
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--ink);
}

.empty-state p {
  max-width: 52ch;
  font-size: var(--fs-meta);
  line-height: 1.5;
  color: var(--muted);
}

.notice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--r-2);
  font-size: var(--fs-body);
  line-height: 1.45;
}

.modal__head {
  padding: 16px 18px 13px;
}

.modal__head h2 {
  font-size: var(--fs-title);
  font-weight: 600;
}

.modal__head p {
  margin-top: 3px;
  font-size: var(--fs-meta);
  color: var(--muted);
}

.modal__body.form-grid,
.modal__body.form-stack,
.modal__body > .form-grid,
.modal__body > .form-stack {
  padding: 16px 18px;
}

.modal__foot {
  padding: 12px 18px;
  gap: 8px;
}

.topbar {
  height: var(--topbar-h);
  padding: 0 24px;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.topbar__search {
  height: var(--ctl);
  padding: 0 12px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  border: 1px solid transparent;
  font-size: var(--fs-body);
}

.topbar__search:focus-within {
  border-color: var(--accent);
  background: var(--surface);
}

.topbar__profile,
.userbtn {
  height: 40px;
}

.userbtn-txt b {
  font-size: var(--fs-body);
  font-weight: 600;
}

.userbtn-txt small {
  font-size: var(--fs-micro);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.scope {
  height: var(--ctl-sm);
  font-size: var(--fs-meta);
}

.navpanel__group {
  margin-top: 14px;
}

.navpanel__label,
.side__section-label {
  padding: 0 12px 6px;
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--side-muted);
}

.navpanel__area {
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.navpanel__link {
  height: 38px;
  padding: 0 12px;
  gap: 10px;
  border-radius: var(--ctl-r);
  font-size: var(--fs-body);
  font-weight: 500;
}

.navpanel__link[aria-current="true"],
.navpanel__link[aria-current="page"] {
  font-weight: 600;
}

.menu-label {
  font-size: var(--fs-micro);
  letter-spacing: 0.06em;
}

.menu-item,
.menu__item {
  min-height: 32px;
  font-size: var(--fs-body);
}

.menu-item small,
.menu__item small {
  font-size: var(--fs-micro);
}

.body--split {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.body__main,
.body__side {
  gap: 16px;
}

.workspace__main {
  gap: 16px;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px 0 10px;
}

.section-head h2 {
  font-size: var(--fs-title);
  font-weight: 600;
}

.table-note,
.table-actions {
  font-size: var(--fs-meta);
  color: var(--muted);
}

@media (max-width: 1400px) {
  .metrics,
  .stat-row,
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .body--split {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .metrics,
  .stat-row,
  .stat-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .filters,
  .filters-row {
    padding: 12px 14px;
  }

  .filters .field--inline,
  .filters .field--inline.field--grow {
    flex: 1 1 100%;
    max-width: none;
  }

  .filters__actions {
    margin-left: 0;
    width: 100%;
  }

  .panel__head {
    padding-left: 14px;
    padding-right: 14px;
  }

  .data-table thead th:first-child,
  .data-table tbody td:first-child {
    padding-left: 14px;
  }

  .data-table thead th:last-child,
  .data-table tbody td:last-child {
    padding-right: 14px;
  }
}
