/* Formula CRM — stilovi prema odobrenom dizajnu (crvena #E00213, plava #00254B). */

:root {
  --navy: #00254B;
  --navy-2: #0D3460;
  --red: #E00213;
  --red-dark: #B8000F;
  --red-soft: #FDE6E8;
  --red-ink: #A80010;
  --bg: #E3E7EE;
  --side: #F2F4F8;
  --panel: #FAFBFD;
  --white: #FFFFFF;
  --line: #E6EAF0;
  --border: #D3D9E2;
  --tile-border: #DDE2EA;
  --head: #EEF1F5;
  --ink: #00254B;
  --ink-2: #3E4A5A;
  --muted: #556070;
  --muted-2: #5F6B7A;
  --on-navy-muted: #B9C6D6;
  --ok-bg: #E3F4EA;
  --ok-ink: #145A32;
  --radius-lg: 28px;
  --radius: 18px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.5;
}

a { color: var(--ink); }
a:hover { color: var(--red); }

h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }

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

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

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

/* ---------- App shell ---------- */

.app {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px;
  min-height: 100vh;
}

.side {
  flex: 1 1 240px;
  max-width: 100%;
  background: var(--side);
  border-radius: var(--radius-lg);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (min-width: 900px) {
  .side { flex: 0 0 272px; }
}

.main {
  flex: 999 1 560px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.brand {
  display: flex;
  justify-content: center;
  background: var(--white);
  border-radius: 20px;
  padding: 10px;
}
.brand img { width: 128px; height: 128px; object-fit: contain; display: block; }

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

.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 92px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--tile-border);
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  padding: 8px;
}
.tile:hover { border-color: var(--navy); color: var(--navy); }
.tile.on { background: var(--navy); color: var(--white); border-color: var(--navy); }
.tile.wide { grid-column: 1 / -1; flex-direction: row; min-height: 56px; }

.side-cats { display: flex; flex-direction: column; gap: 4px; padding: 0 6px; }
.side-cats strong { font-size: 13px; margin-bottom: 6px; }
.side-cats > span { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); min-height: 30px; }
.dot { width: 10px; height: 10px; border-radius: 3px; background: var(--red); flex: none; }

.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }

.lang-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 6px; }
.lang-row > span { font-size: 13px; font-weight: 700; color: var(--ink-2); }

.lang-switch { display: flex; gap: 4px; background: var(--line); padding: 4px; border-radius: 999px; margin: 0; }
.lang-switch button {
  min-height: 36px; padding: 0 16px; border-radius: 999px; border: 0;
  background: transparent; color: var(--ink-2); font-size: 13px; font-weight: 800; cursor: pointer;
}
.lang-switch button[aria-pressed="true"] { background: var(--navy); color: var(--white); }

.user-row { display: flex; gap: 8px; align-items: center; }
.user-chip {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px;
  background: var(--navy); color: var(--white); border-radius: 16px; padding: 8px 10px; text-decoration: none;
}
.user-chip:hover { color: var(--white); background: var(--navy-2); }
.user-chip .who { display: flex; flex-direction: column; min-width: 0; }
.user-chip .who b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip .who small { font-size: 11px; color: var(--on-navy-muted); }

.avatar {
  width: 36px; height: 36px; border-radius: 12px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px; background: var(--red); color: var(--white);
}
.avatar.lg { width: 44px; height: 44px; border-radius: 14px; }
.avatar.navy { background: var(--navy); }
.avatar.muted { background: #C3CBD6; color: var(--navy); }

.iconbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 14px; flex: none;
  background: var(--panel); border: 1px solid var(--tile-border); color: var(--navy); cursor: pointer;
}
.iconbtn:hover { border-color: var(--navy); color: var(--navy); }

/* ---------- Panels & typography ---------- */

.panel {
  background: var(--panel);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.page-head { padding: 24px 28px; gap: 8px; }
.hero { background: radial-gradient(120% 140% at 85% 0%, #FCD9DD 0%, #EEF2F8 45%, var(--panel) 75%); gap: 20px; }

.crumbs { font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--navy); font-weight: 700; text-decoration: none; }

.title-xl { font-size: clamp(32px, 4.5vw, 48px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.title-lg { font-size: clamp(28px, 3.5vw, 40px); font-weight: 700; letter-spacing: -0.03em; }
.title-md { font-size: 20px; font-weight: 800; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.cols { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.cols > * { flex: 1 1 380px; min-width: 0; }

/* ---------- Forms ---------- */

.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.field input, .field select, .field textarea {
  font-size: 14px; font-weight: 500; color: var(--ink);
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px; min-height: 44px; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--red); outline-offset: 1px; border-color: var(--navy); }
.field .hint { font-weight: 500; color: var(--muted-2); }
.field .error, .error-text { font-weight: 600; color: var(--red-ink); font-size: 13px; }
.field input[aria-invalid="true"] { border-color: var(--red); }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }

.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.check input { width: 18px; height: 18px; accent-color: var(--navy); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: 999px;
  border: 1px solid var(--navy); background: var(--navy); color: var(--white);
  font-size: 14px; font-weight: 800; text-decoration: none; cursor: pointer;
}
.btn:hover { color: var(--white); background: var(--navy-2); }
.btn.red { background: var(--red); border-color: var(--red); }
.btn.red:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn.ghost { background: transparent; color: var(--navy); border-color: var(--border); }
.btn.ghost:hover { border-color: var(--navy); }
.btn.sm { min-height: 40px; padding: 0 14px; font-size: 13px; }
.btn.block { width: 100%; min-height: 54px; font-size: 16px; }

.alert { border-radius: 16px; padding: 12px 16px; font-size: 14px; font-weight: 600; }
.alert.ok { background: var(--ok-bg); color: var(--ok-ink); }
.alert.err { background: var(--red-soft); color: var(--red-ink); }
.alert.info { background: var(--head); color: var(--ink-2); }

.badge { align-self: flex-start; background: var(--red-soft); color: var(--red-ink); font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 999px; }
.pill { font-size: 12px; font-weight: 700; background: var(--side); color: var(--ink-2); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.pill.red { background: var(--red-soft); color: var(--red-ink); }

/* ---------- Users list ---------- */

.user-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.user-card .top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.user-card .who { flex: 1; min-width: 160px; display: flex; flex-direction: column; }
.user-card .who b { font-size: 15px; }
.user-card .who small { font-size: 12px; color: var(--muted); }
.user-card details { border-top: 1px solid var(--line); padding-top: 10px; }
.user-card summary { cursor: pointer; font-size: 13px; font-weight: 800; color: var(--navy); min-height: 32px; display: flex; align-items: center; }
.user-card details form { margin-top: 12px; }

/* ---------- Guest (login/setup) ---------- */

.guest { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.guest-wrap { width: 100%; max-width: 1120px; display: flex; flex-wrap: wrap; gap: 16px; align-items: stretch; }

.guest-hero {
  flex: 1 1 380px; background: var(--navy); color: #FAFBFD; border-radius: 32px; padding: 40px;
  display: flex; flex-direction: column; gap: 32px; min-height: 560px;
}
.guest-hero .logo { align-self: flex-start; background: var(--white); border-radius: 24px; padding: 12px; }
.guest-hero .logo img { width: 150px; height: 150px; object-fit: contain; display: block; }
.guest-hero h1 { font-size: clamp(32px, 4vw, 44px); line-height: 1.08; font-weight: 800; letter-spacing: -0.03em; }
.guest-hero p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--on-navy-muted); max-width: 420px; }
.guest-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.guest-cards div { background: var(--navy-2); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.guest-cards span { font-size: 12px; color: #AFC0D4; }
.guest-cards b { font-size: 15px; }
.guest-cards div.red { background: var(--red); color: var(--white); }
.guest-cards div.red span { color: #FFE3E6; }

.guest-form {
  flex: 1 1 420px; background: var(--panel); border-radius: 32px; padding: 40px;
  display: flex; flex-direction: column; justify-content: center; gap: 24px;
}
.guest-form .lang-switch { align-self: flex-end; }
.guest-form h2 { font-size: 34px; font-weight: 800; }

.input-icon { position: relative; display: block; }
.input-icon svg { position: absolute; left: 14px; top: 16px; pointer-events: none; }
.input-icon input { padding-left: 44px; min-height: 52px; font-size: 15px; }

@media (max-width: 560px) {
  .guest-hero { min-height: 0; padding: 28px; }
  .guest-form { padding: 28px 20px; }
  .guest-cards { grid-template-columns: 1fr; }
}

@media (max-width: 899px) {
  .side-cats { display: none; }
  .brand img { width: 96px; height: 96px; }
}

/* ---------- Dashboard ---------- */

.hero-body { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; border-top: 1px dashed #CBD3DE; padding-top: 20px; }
.kpis div { display: flex; flex-direction: column; }
.kpis b { font-size: clamp(26px, 3vw, 36px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.kpis span { font-size: 14px; color: var(--muted); font-weight: 600; }
.gauge { flex: 0 0 230px; display: flex; justify-content: center; }

.day-picker { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.day-picker input { min-height: 40px; border: 1px solid var(--border); border-radius: 999px; padding: 0 14px; background: var(--white); color: var(--navy); font-weight: 700; }

.big-number { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }

.chips-field { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.chips-field legend { font-size: 12px; font-weight: 700; color: var(--ink-2); padding: 0; margin-bottom: 10px; }
.chips-field legend .hint { font-weight: 500; color: var(--muted-2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--white); color: var(--ink-2); font-size: 13px; font-weight: 700; cursor: pointer;
}
.chip span:hover { border-color: var(--navy); }
.chip input:checked + span { background: var(--navy); color: var(--white); border-color: var(--navy); }
.chip input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }
.ok-text { color: var(--ok-ink) !important; font-weight: 700 !important; }

.order-row { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: var(--radius); background: var(--white); border: 1px solid var(--line); }
.order-row .who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.order-row .who b { font-size: 14px; }
.order-row .who small { font-size: 12px; color: var(--muted); }
.order-row .end { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; white-space: nowrap; }
.order-row .end b { font-size: 15px; }
.order-row .end a { font-weight: 700; }

.chart-box { position: relative; width: 100%; }

.donut-wrap { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.donut { position: relative; width: 200px; height: 200px; flex: none; }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.donut-center b { font-size: 28px; font-weight: 800; }
.donut-center span { font-size: 12px; color: var(--muted); }
.legend { list-style: none; margin: 0; padding: 0; flex: 1 1 160px; display: flex; flex-direction: column; gap: 8px; }
.legend li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.legend .swatch { width: 12px; height: 12px; border-radius: 4px; flex: none; background: #8b95a3; }
.legend .name { flex: 1; font-weight: 600; }

.segmented { display: flex; gap: 4px; background: var(--head); padding: 4px; border-radius: 999px; }
.segmented button { min-height: 36px; padding: 0 16px; border-radius: 999px; border: 0; background: transparent; color: var(--muted); font-size: 13px; font-weight: 700; cursor: pointer; }
.segmented button[aria-pressed="true"] { background: var(--navy); color: var(--white); }

.table-view summary { cursor: pointer; font-size: 13px; font-weight: 800; color: var(--navy); min-height: 32px; display: flex; align-items: center; }
.table-view table { border-collapse: collapse; width: 100%; max-width: 480px; margin-top: 8px; font-size: 14px; }
.table-view caption { text-align: left; font-weight: 800; padding: 4px 0; }
.table-view th { text-align: left; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); padding: 8px 10px; background: var(--head); }
.table-view td { padding: 8px 10px; border-bottom: 1px solid var(--line); }
.table-view .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Zaposleni ---------- */

.avatar.xl { width: 56px; height: 56px; border-radius: 18px; font-size: 18px; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.stat-cards div { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 2px; }
.stat-cards span { font-size: 13px; color: var(--muted); font-weight: 600; }
.stat-cards b { font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; letter-spacing: -0.02em; }
.stat-cards .dark { background: var(--navy); border-color: var(--navy); color: var(--white); }
.stat-cards .dark span { color: var(--on-navy-muted); }
.stat-cards .red { background: var(--red); border-color: var(--red); color: var(--white); }
.stat-cards .red span { color: #FFE3E6; }

.emp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.emp-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 22px; background: var(--white); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.emp-card:hover { border-color: var(--navy); color: var(--ink); }
.emp-card.off { opacity: .7; }
.emp-card .top { display: flex; align-items: center; gap: 12px; }
.emp-card .who { display: flex; flex-direction: column; gap: 2px; min-width: 0; align-items: flex-start; }
.emp-card .who b { font-size: 15px; }
.emp-card .who small { font-size: 12px; color: var(--muted); }
.emp-card .line { display: flex; justify-content: space-between; font-size: 13px; border-top: 1px solid var(--line); padding-top: 8px; }
.emp-card .line span { color: var(--muted); }
.emp-photo, .photo-preview { width: 56px; height: 56px; border-radius: 18px; object-fit: cover; flex: none; }
.photo-preview { width: 72px; height: 72px; border-radius: 20px; }

.upload-row { display: flex; flex-wrap: wrap; gap: 12px; }
.upload-box { flex: 1 1 220px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; border: 1.5px dashed #C3CCD8; border-radius: var(--radius); background: var(--white); padding: 14px; color: var(--navy); }
.upload-box .field { width: 100%; }
.upload-box input[type=file] { padding: 8px; font-size: 13px; }

.costs-field { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.costs-field legend { font-size: 12px; font-weight: 700; color: var(--ink-2); padding: 0; margin-bottom: 6px; }
.cost-rows { display: flex; flex-direction: column; gap: 8px; }
.cost-row { display: flex; gap: 8px; align-items: center; }
.cost-row .field { flex: 1 1 auto; }
.cost-row .field.amount { flex: 0 0 120px; }

.table-wrap { overflow-x: auto; border-radius: 16px; border: 1px solid var(--line); background: var(--white); }
.data-table { width: 100%; border-collapse: collapse; min-width: 760px; font-size: 14px; }
.data-table th { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); font-weight: 700; text-align: left; padding: 12px 14px; background: var(--head); }
.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table tfoot td { border-bottom: 0; background: var(--panel); }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table tr.off td { color: var(--muted); }

/* ---------- Troškovi ---------- */

.month-nav { display: flex; align-items: center; gap: 6px; background: var(--white); border: 1px solid var(--tile-border); border-radius: 999px; padding: 4px; flex-wrap: wrap; }
.month-nav > span { font-weight: 800; padding: 0 8px; min-width: 130px; text-align: center; }
.month-nav .iconbtn { width: 40px; height: 40px; border-radius: 999px; border: 0; }
.notice { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; background: var(--red-soft); }
.notice > div { flex: 1 1 320px; }
.kind-row { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.bar-track { height: 8px; border-radius: 999px; background: var(--line); }
.bar-fill { height: 8px; border-radius: 999px; background: var(--navy); }
.inline-legend { list-style: none; margin: 0; padding: 0; display: flex; gap: 16px; font-size: 13px; font-weight: 700; }
.inline-legend li { display: flex; align-items: center; gap: 6px; }
.inline-legend .swatch { width: 12px; height: 12px; border-radius: 4px; }

/* ---------- CRM ---------- */

.crm-search { display: flex; align-items: center; gap: 8px; background: var(--white); border: 1px solid var(--border); border-radius: 999px; padding: 4px 4px 4px 14px; flex: 0 1 420px; min-width: 0; color: var(--muted); }
.crm-search input { border: 0; outline: none; background: transparent; min-height: 36px; flex: 1; min-width: 0; font-size: 14px; color: var(--ink); }

.cal-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.cal-left { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cal-title { font-size: 24px; font-weight: 800; margin-left: 6px; }
.iconbtn.round { width: 40px; height: 40px; border-radius: 999px; }
.segmented a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 16px; border-radius: 999px; color: var(--muted); font-size: 13px; font-weight: 700; text-decoration: none; }
.segmented a.on { background: var(--navy); color: var(--white); }

.cal-scroll { overflow-x: auto; }
.cal { min-width: 840px; border: 1px solid var(--tile-border); border-radius: 18px; overflow: hidden; background: var(--white); }
.cal-head, .cal-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head { background: var(--side); border-bottom: 1px solid var(--tile-border); }
.cal-head span { padding: 12px; font-size: 13px; font-weight: 800; }
.cal-row + .cal-row { border-top: 1px solid var(--line); }
.cal-cell { min-height: 132px; padding: 8px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal-cell:last-child { border-right: 0; }
.cal-cell.out { background: #F5F7FA; }
.cal-cell.out .num { color: #98A2B0; }
.cal-day { display: flex; justify-content: space-between; align-items: center; gap: 6px; min-height: 28px; }
.cal-day .sum { font-size: 12px; font-weight: 700; color: var(--muted); }
.cal-day .num { margin-left: auto; min-width: 28px; height: 28px; padding: 0 7px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; text-decoration: none; color: var(--ink); }
.cal-day .num:hover { background: var(--head); }
.cal-cell.today .num { background: var(--red); color: var(--white); }
.cal-card { display: flex; flex-direction: column; gap: 1px; padding: 6px 8px; border-radius: 10px; background: var(--head); text-decoration: none; color: var(--ink); font-size: 12px; min-width: 0; border: 1px solid transparent; }
.cal-card:hover { border-color: var(--navy); color: var(--ink); }
.cal-card b, .cal-card > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-card > span { color: var(--muted); }
.cal-more { font-size: 12px; font-weight: 800; color: var(--red-ink); text-decoration: none; padding: 2px 4px; }
.cal-week .cal-cell { min-height: 460px; }
.cal-week .cal-card { background: var(--white); border-color: var(--line); padding: 10px; gap: 3px; border-radius: 14px; }
.cal-week .cal-card b { font-size: 13px; }
.cal-week .cal-card > span { white-space: normal; }

.facts { margin: 0; display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 4px 14px; }
.facts div { display: flex; justify-content: space-between; gap: 10px; min-height: 42px; align-items: center; font-size: 14px; }
.facts div + div { border-top: 1px solid var(--head); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.vehicle-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.vehicle-list li { display: flex; align-items: center; gap: 10px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.vehicle-list .muted { margin-left: auto; }
.edit-details summary { cursor: pointer; font-size: 13px; font-weight: 800; color: var(--navy); min-height: 36px; display: flex; align-items: center; }
.edit-details form { margin-top: 8px; }
.history-row { display: flex; gap: 14px; align-items: flex-start; padding: 12px; border-radius: var(--radius); background: var(--white); border: 1px solid var(--line); }
.history-row .date { display: flex; flex-direction: column; align-items: center; min-width: 52px; padding: 6px; border-radius: 12px; background: var(--head); }
.history-row .date span { font-size: 11px; color: var(--muted); }
.history-row .what { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.history-row .what span { font-size: 13px; color: var(--muted); }
.history-row .end { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; white-space: nowrap; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; }

/* ---------- Podešavanja: kategorije i polja ---------- */

.set-row { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.set-row.off { background: #F5F7FA; }
.set-main { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.set-name { display: flex; flex-direction: column; flex: 1 1 140px; min-width: 0; }
.set-name small { font-size: 12px; color: var(--muted); }
.set-actions { display: flex; gap: 4px; }
.set-actions form { margin: 0; }
.iconbtn.sm { width: 36px; height: 36px; border-radius: 10px; }
.iconbtn:disabled { opacity: .35; cursor: default; }
.set-row details summary, .new-field > summary { cursor: pointer; font-size: 13px; font-weight: 800; color: var(--navy); min-height: 32px; display: flex; align-items: center; list-style: none; }
.set-row details summary::-webkit-details-marker, .new-field > summary::-webkit-details-marker { display: none; }
.new-field > summary { display: inline-flex; color: var(--white); width: auto; }
.set-edit { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.inline-add { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.inline-add .field { flex: 1 1 160px; }
.req { color: var(--red-ink); }
