/* Tripaton: web sučelje. Teme odgovaraju Android aplikaciji. */

:root, [data-theme="light"] {
  --bg: #f4f7f6; --surface: #ffffff; --surface-2: #eef3f2; --border: #d5dfde;
  --text: #182122; --muted: #5d6b6b; --primary: #00696a; --on-primary: #ffffff;
  --primary-soft: #d4efee; --accent: #b7791f; --danger: #ba1a1a; --ok: #2e7d32;
  --c1: #00696a; --c2: #b7791f; --c3: #4b607c; --c4: #a14a6b; --c5: #5f7d1f; --c6: #7b5ea7;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0e1313; --surface: #161d1d; --surface-2: #1f2828; --border: #2e3a3a;
  --text: #e0e7e6; --muted: #95a4a3; --primary: #80d5d4; --on-primary: #003737;
  --primary-soft: #1d3b3b; --accent: #ffc857; --danger: #ffb4ab; --ok: #8bd18f;
  --c1: #80d5d4; --c2: #ffc857; --c3: #b3c8e8; --c4: #f2a6c0; --c5: #b9d77a; --c6: #c9b3f0;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  [data-theme="auto"] {
    --bg: #0e1313; --surface: #161d1d; --surface-2: #1f2828; --border: #2e3a3a;
    --text: #e0e7e6; --muted: #95a4a3; --primary: #80d5d4; --on-primary: #003737;
    --primary-soft: #1d3b3b; --accent: #ffc857; --danger: #ffb4ab; --ok: #8bd18f;
    --c1: #80d5d4; --c2: #ffc857; --c3: #b3c8e8; --c4: #f2a6c0; --c5: #b9d77a; --c6: #c9b3f0;
    color-scheme: dark;
  }
}
[data-theme="electric_teal"] {
  --bg: #071315; --surface: #0e1f22; --surface-2: #142a2c; --border: #1f3b3b;
  --text: #e2fbf8; --muted: #8fb3b0; --primary: #00e5d1; --on-primary: #00201d;
  --primary-soft: #0b3633; --accent: #ffc857; --danger: #ff8a80; --ok: #69f0ae;
  --c1: #00e5d1; --c2: #ffc857; --c3: #7cf5ff; --c4: #ff6fae; --c5: #a6ff8a; --c6: #b49bff;
  color-scheme: dark;
}
[data-theme="dracula_night"] {
  --bg: #282a36; --surface: #303241; --surface-2: #383a4b; --border: #44475a;
  --text: #f8f8f2; --muted: #a4a8c2; --primary: #bd93f9; --on-primary: #282a36;
  --primary-soft: #3d3756; --accent: #ff79c6; --danger: #ff5555; --ok: #50fa7b;
  --c1: #bd93f9; --c2: #ff79c6; --c3: #8be9fd; --c4: #50fa7b; --c5: #ffb86c; --c6: #f1fa8c;
  color-scheme: dark;
}
[data-theme="nord"] {
  --bg: #2e3440; --surface: #3b4252; --surface-2: #434c5e; --border: #4c566a;
  --text: #eceff4; --muted: #aeb6c5; --primary: #88c0d0; --on-primary: #2e3440;
  --primary-soft: #3e5160; --accent: #ebcb8b; --danger: #bf616a; --ok: #a3be8c;
  --c1: #88c0d0; --c2: #ebcb8b; --c3: #81a1c1; --c4: #b48ead; --c5: #a3be8c; --c6: #d08770;
  color-scheme: dark;
}
[data-theme="retro"] {
  --bg: #f4ecd8; --surface: #fbf5e6; --surface-2: #efe3c8; --border: #dccba6;
  --text: #3b2f2f; --muted: #6e5e52; --primary: #c8553d; --on-primary: #ffffff;
  --primary-soft: #f3d4c4; --accent: #2d6a6a; --danger: #a4161a; --ok: #3a7d44;
  --c1: #c8553d; --c2: #2d6a6a; --c3: #b7791f; --c4: #7d4e57; --c5: #588157; --c6: #3d5a80;
  color-scheme: light;
}
[data-theme="solarized"] {
  --bg: #fdf6e3; --surface: #fffbef; --surface-2: #eee8d5; --border: #ddd6c1;
  --text: #073642; --muted: #586e75; --primary: #268bd2; --on-primary: #ffffff;
  --primary-soft: #d7e9f5; --accent: #b58900; --danger: #dc322f; --ok: #859900;
  --c1: #268bd2; --c2: #b58900; --c3: #2aa198; --c4: #d33682; --c5: #859900; --c6: #6c71c4;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: 1.45rem; font-weight: 650; }
h2 { font-size: 1.1rem; font-weight: 620; }
h3 { font-size: .95rem; font-weight: 620; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.right { text-align: right; }
.boot { display: grid; place-items: center; min-height: 100vh; color: var(--muted); }

/* --- raspored --- */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.shell > div { min-width: 0; }
.side {
  background: var(--surface); border-right: 1px solid var(--border);
  padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 4px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; font-weight: 650; }
.brand img { width: 30px; height: 30px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px;
  color: var(--text); font-weight: 500;
}
.nav a:hover { background: var(--surface-2); text-decoration: none; }
.nav a.on { background: var(--primary-soft); color: var(--primary); }
.side .spacer { flex: 1; }
.side .who { padding: 10px 12px; border-top: 1px solid var(--border); margin-top: 8px; }
.main { padding: 24px 28px 64px; min-width: 0; max-width: 1280px; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { flex: 1; min-width: 200px; }
.topbar { display: none; }

@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .topbar {
    display: flex; align-items: center; gap: 10px; padding: 10px 16px;
    background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20;
  }
  .topbar .brand { padding: 0; flex: 1; }
  .mnav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; display: flex; overflow-x: auto;
    background: var(--surface); border-top: 1px solid var(--border); padding: 4px 6px calc(4px + env(safe-area-inset-bottom));
  }
  .mnav a { flex: 1 0 auto; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 10px; color: var(--muted); font-size: .72rem; }
  .mnav a.on { color: var(--primary); }
  .main { padding: 16px 16px 96px; }
}
@media (min-width: 861px) { .mnav { display: none; } }

/* --- elementi --- */
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px; min-width: 0; }
.card > .card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card > .card-head h2 { flex: 1; }
.stat .label { color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
.stat .value { font-size: 1.6rem; font-weight: 650; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat .sub { color: var(--muted); font-size: .85rem; margin-top: 2px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); padding: 8px 14px; border-radius: 10px; font: inherit; font-weight: 550; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { color: var(--danger); }
.btn.primary.danger { background: var(--danger); border-color: var(--danger); color: var(--surface); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.icon { padding: 7px; }
.btn:disabled { opacity: .55; cursor: default; }
.btn { transition: background-color .15s, color .15s, transform .12s cubic-bezier(.2,0,0,1), box-shadow .15s, filter .15s; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn svg, .nav svg, .mnav svg { width: 20px; height: 20px; flex: none; }

/* Polja: blaga podloga bez okvira, samo crta ispod koja se pri fokusu razvuče iz sredine (stil 2),
   a u formi je naslov unutar polja (stil 4). Greška vrijedi samo dok je polje prazno (Field u ui.js). */
:root { --field-bg: color-mix(in srgb, var(--surface-2) 75%, var(--surface)); --field-line: var(--border); --danger-soft: color-mix(in srgb, var(--danger) 10%, var(--surface)); }
label.field { display: flex; flex-direction: column; gap: 4px; font-size: .88rem; color: var(--muted); min-width: 0; }
label.field .hint { font-size: .76rem; padding: 0 12px; }
label.field .err { font-size: .76rem; color: var(--danger); padding: 0 12px; animation: err-in .18s ease-out; }
@keyframes err-in { from { opacity: 0; transform: translateY(-3px); } }
input, select, textarea {
  font: inherit; color: var(--text); width: 100%; min-width: 0;
  border: 0; border-bottom: 1px solid var(--field-line); border-radius: 10px 10px 0 0; padding: 8px 12px;
  background: linear-gradient(var(--primary), var(--primary)) center bottom / 0% 2px no-repeat border-box, var(--field-bg);
  transition: background-size .2s cubic-bezier(.2,0,0,1), background-color .15s, border-color .15s;
}
textarea { min-height: 84px; resize: vertical; }
input:hover, select:hover, textarea:hover { background-color: color-mix(in srgb, var(--surface-2) 100%, var(--text) 3%); }
input:focus, select:focus, textarea:focus { outline: none; background-size: 100% 2px, auto; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }
input[aria-invalid="true"], label.field.bad input, label.field.bad select, label.field.bad textarea {
  background-image: linear-gradient(var(--danger), var(--danger)); background-size: 100% 2px, auto; background-color: var(--danger-soft);
}
label.field.bad > span:first-child { color: var(--danger); }
/* Naslov unutar polja: naslov i polje dijele isto mjesto u mreži. */
label.field:has(> input:not([type=checkbox]):not([type=radio]):not([type=file]), > select, > textarea, > .cat-select) {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px 0; align-content: start; align-self: start;
}
label.field:has(> input:not([type=checkbox]):not([type=radio]):not([type=file]), > select, > textarea, > .cat-select) > span:first-child {
  grid-area: 1 / 1; z-index: 1; align-self: start; padding: 6px 12px 0; font-size: .72rem; font-weight: 500; line-height: 1.2;
  pointer-events: none; transition: color .15s;
}
label.field:has(> input, > select, > textarea, > .cat-select) > :is(input, select, textarea) { grid-area: 1 / 1; padding-top: 22px; padding-bottom: 6px; }
label.field:focus-within > span:first-child { color: var(--primary); }
label.field.bad:focus-within > span:first-child { color: var(--danger); }
input[type=checkbox], input[type=radio] { background: none; border: 0; padding: 0; width: auto; }
input[type=file] { background: none; border: 0; padding: 4px 0; }
input[type=date], input[type=datetime-local], input[type=month] { min-height: 0; }
/* Prekidač: uključen u aktivnoj boji, isključen neutralan. */
.check { display: flex; align-items: center; gap: 12px; color: var(--text); cursor: pointer; position: relative; min-height: 28px; }
.switch input { position: absolute; left: 0; top: 50%; translate: 0 -50%; width: 46px; height: 26px; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.switch .track { flex: none; position: relative; width: 46px; height: 26px; border-radius: 99px; background: var(--surface-2);
  border: 2px solid color-mix(in srgb, var(--muted) 70%, transparent); transition: background-color .2s, border-color .2s; }
.switch .track::after { content: ""; position: absolute; top: 50%; left: 4px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--muted); translate: 0 -50%; transition: left .2s cubic-bezier(.2,0,0,1), width .2s, height .2s, background-color .2s; }
.switch input:checked + .track { background: var(--primary); border-color: var(--primary); }
.switch input:checked + .track::after { left: 22px; width: 18px; height: 18px; background: var(--on-primary); }
.switch input:active + .track::after { width: 22px; }
.switch input:focus-visible + .track { outline: 2px solid var(--primary); outline-offset: 2px; }
.switch input:disabled, .switch.off { cursor: default; }
.switch.off .track { opacity: .45; }
.switch .lbl { min-width: 0; }
@media (prefers-reduced-motion: reduce) { .switch .track, .switch .track::after { transition: none; } }

/* Ikone šifrarnika: krug u boji skupine. */
.mi { width: 1em; height: 1em; fill: currentColor; display: block; }
.cat-ico { --cc: var(--muted); flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  font-size: 20px; color: var(--cc); background: color-mix(in srgb, var(--cc) 15%, transparent); }
.cat-ico.sm { width: 26px; height: 26px; font-size: 16px; }
.cat-ico.lg { width: 44px; height: 44px; font-size: 26px; }
.cat-ico.blank { background: none; }
.cat-ico.g-transport { --cc: #2f7dd1; } .cat-ico.g-vehicle { --cc: #d9822b; } .cat-ico.g-money { --cc: #2e9d5b; }
.cat-ico.g-stay { --cc: #a05ad6; } .cat-ico.g-work { --cc: #138a8a; } .cat-ico.g-other { --cc: #7a8585; }
.cat-name { display: inline-flex; align-items: center; gap: 8px; min-width: 0; vertical-align: middle; }
.cat-name > span:last-child { min-width: 0; }
.cat-select { position: relative; min-width: 0; }
label.field > .cat-select { grid-area: 1 / 1; }
.cat-select-btn { font: inherit; color: var(--text); width: 100%; display: flex; align-items: center; gap: 8px; text-align: left; cursor: pointer;
  border: 0; border-bottom: 1px solid var(--field-line); border-radius: 10px 10px 0 0; padding: 8px 10px 8px 12px; min-height: 42px;
  background: linear-gradient(var(--primary), var(--primary)) center bottom / 0% 2px no-repeat border-box, var(--field-bg); transition: background-size .2s; }
label.field > .cat-select .cat-select-btn { padding-top: 22px; padding-bottom: 6px; }
.cat-select-btn:hover { background-color: color-mix(in srgb, var(--surface-2) 100%, var(--text) 3%); }
.cat-select.open .cat-select-btn, .cat-select-btn:focus-visible { outline: none; background-size: 100% 2px, auto; }
.cat-select-btn .v { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-select-btn .chev { width: 18px; height: 18px; color: var(--muted); flex: none; transition: rotate .15s; }
.cat-select.open .chev { rotate: 180deg; }
label.field.bad .cat-select-btn { background-image: linear-gradient(var(--danger), var(--danger)); background-size: 100% 2px, auto; background-color: var(--danger-soft); }
.cat-pop { position: absolute; z-index: 50; left: 0; right: 0; top: calc(100% + 4px); min-width: 220px; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 6px; animation: pop-in .12s ease-out; }
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px); } }
.cat-pop .cat-q { margin-bottom: 6px; border-radius: 8px; }
.cat-pop ul { list-style: none; margin: 0; padding: 0; max-height: 300px; overflow: auto; }
.cat-pop li { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; cursor: pointer; font-size: .95rem; }
.cat-pop li.hi { background: var(--surface-2); }
.cat-pop li[aria-selected=true] { font-weight: 600; color: var(--primary); }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 6px; margin: 6px 0 12px; }
.icon-opt { display: grid; place-items: center; padding: 6px; border-radius: 12px; border: 2px solid transparent; background: none; cursor: pointer; }
.icon-opt:hover { background: var(--surface-2); }
.icon-opt.on { border-color: var(--primary); }
.icon-btn { padding: 0; border: 0; background: none; cursor: pointer; border-radius: 50%; }
.icon-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; }
.filters label.field { width: 180px; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
tbody tr.link { cursor: pointer; }
tbody tr.link:hover { background: var(--surface-2); }
tfoot td { font-weight: 650; border-bottom: none; }
.table-wrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }

.badge { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: .75rem; font-weight: 600; background: var(--surface-2); color: var(--muted); }
.badge.on { background: var(--primary-soft); color: var(--primary); }
.badge.warn { background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--accent); }
.badge.bad { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); }

.empty { text-align: center; color: var(--muted); padding: 40px 16px; }
.error-box { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); color: var(--danger); border-radius: 10px; padding: 10px 14px; }
.spinner { width: 22px; height: 22px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; margin: 30px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

.modal-back { position: fixed; inset: 0; background: rgb(0 0 0 / .45); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; width: min(720px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.modal header { display: flex; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.modal header h2 { flex: 1; }
.modal .body { padding: 18px; overflow-y: auto; }
.modal footer { padding: 14px 18px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

.toast { position: fixed; right: 20px; bottom: 20px; background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; z-index: 60; max-width: 360px; }
@media (max-width: 860px) { .toast { bottom: 84px; left: 16px; right: 16px; } }

/* Leaflet slojevi imaju z-index 400-1000; vlastiti stacking context ih drži ispod dijaloga. */
.map { position: relative; z-index: 0; isolation: isolate; height: 360px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); }
.chart { position: relative; height: 280px; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumbs a { display: block; width: 86px; height: 86px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs button { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 99px; padding: 6px 14px; font: inherit; cursor: pointer; }
.tabs button.on { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.swatch { border: 2px solid var(--border); border-radius: 12px; padding: 10px; cursor: pointer; background: var(--surface); color: var(--text); font: inherit; text-align: left; }
.swatch.on { border-color: var(--primary); }
.swatch .dots { display: flex; gap: 4px; margin-bottom: 6px; }
.swatch .dots i { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgb(0 0 0 / .15); }
.secret { font-family: ui-monospace, Menlo, Consolas, monospace; background: var(--surface-2); padding: 10px; border-radius: 8px; overflow-wrap: anywhere; }

.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login .card { width: min(400px, 100%); padding: 28px; }
.login .brand { justify-content: center; padding: 0 0 18px; font-size: 1.2rem; }
.login .card p { margin: 0; }

.doc { max-width: 1000px; }

/* --- ispis (izvještaji, "Spremi kao PDF") --- */
.print-only { display: none; }
@media print {
  @page { size: A4; margin: 14mm; }
  :root { --bg: #fff; --surface: #fff; --surface-2: #f2f2f2; --border: #bbb; --text: #000; --muted: #444; --primary: #000; }
  body { font-size: 11pt; }
  .side, .topbar, .mnav, .no-print, .toast { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; max-width: none; }
  .card { border: none; padding: 0; }
  .print-only { display: block; }
  table { font-size: 9.5pt; }
  th, td { padding: 4px 6px; }
  tr { break-inside: avoid; }
}

/* ===== Material 3 dorada: elevacija, oblici, pokret, pristupačnost ===== */
:root {
  --radius: 16px;
  --shadow-1: 0 1px 2px rgb(0 0 0 / .06), 0 1px 3px rgb(0 0 0 / .08);
  --shadow-2: 0 2px 6px rgb(0 0 0 / .08), 0 8px 24px rgb(0 0 0 / .08);
  --ease: cubic-bezier(.2, 0, 0, 1);
}
.card { border-radius: var(--radius); box-shadow: var(--shadow-1); }
.btn { border-radius: 99px; padding: 9px 18px; min-height: 40px; transition: background-color .15s, filter .15s, box-shadow .15s, transform .1s; }
.btn.icon { border-radius: 12px; min-height: 0; }
.btn.primary { box-shadow: var(--shadow-1); }
.btn.big { padding: 12px 22px; font-size: 1rem; justify-content: center; }
.nav a { border-radius: 99px; transition: background-color .15s; }
.badge { padding: 2px 10px; }
.stat .value { letter-spacing: -.01em; }
.modal { border-radius: 24px; box-shadow: var(--shadow-2); }
.tabs button { transition: background-color .15s, color .15s; }

/* Fokus samo s tipkovnicom, uvijek dobro vidljiv. */
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.btn:focus-visible, .nav a:focus-visible, .mnav a:focus-visible, .tabs button:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
main:focus { outline: none; }
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--primary); color: var(--on-primary);
  padding: 10px 16px; border-radius: 12px; font-weight: 600;
}
.skip:focus { top: 12px; text-decoration: none; }

/* Prazna stanja s ilustracijom */
.empty.illustrated { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 28px 16px; }
.empty.illustrated img { width: min(200px, 60%); height: auto; }

/* Pokret: samo ako korisnik nije isključio animacije u sustavu. */
@media (prefers-reduced-motion: no-preference) {
  /* Samo pretapanje: transform na omotaču stranice postaje okvir za position:fixed, pa bi se prozori
     (Modal) tijekom animacije centrirali po visini cijele stranice umjesto ekrana. */
  .page-in { animation: page-fade .24s ease-out backwards; }
  .modal { animation: modal-in .22s var(--ease) both; }
  .modal-back { animation: fade-in .18s ease-out both; }
  .card { transition: box-shadow .2s var(--ease), transform .2s var(--ease); }
  a.card:hover, .card.link:hover, .feat:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
  .btn:active:not(:disabled) { transform: scale(.97); }
  tbody tr.link { transition: background-color .12s; }
  .toast { animation: toast-in .25s var(--ease) both; }
  .landing .hero-text > *, .landing .hero-art { animation: page-in .5s var(--ease) both; }
  .landing .hero-text > *:nth-child(2) { animation-delay: .05s; }
  .landing .hero-text > *:nth-child(3) { animation-delay: .1s; }
  .landing .hero-text > *:nth-child(4) { animation-delay: .15s; }
  .landing .hero-art { animation-delay: .1s; }
}
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes page-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2s; } }

/* ===== Početna stranica (prije prijave) ===== */
.landing { min-height: 100vh; background:
  radial-gradient(1200px 500px at 85% -10%, color-mix(in srgb, var(--primary) 16%, transparent), transparent 70%),
  radial-gradient(800px 400px at -10% 110%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%), var(--bg); }
.land-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1200px; margin: 0 auto; padding: 18px 24px; }
.land-head .brand { padding: 0; font-size: 1.1rem; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 40px; align-items: center; max-width: 1200px; margin: 0 auto; padding: 24px 24px 48px; }
.eyebrow { color: var(--primary); font-weight: 650; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; margin: 0 0 10px; }
.hero h1 { font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1.1; letter-spacing: -.02em; font-weight: 750; }
.lead { font-size: 1.1rem; color: var(--muted); margin: 16px 0 24px; max-width: 34em; }
.login-card { max-width: 420px; padding: 24px; box-shadow: var(--shadow-2); }
.login-card h2 { font-size: 1.15rem; }
.hero-art img { width: 100%; height: auto; display: block; filter: drop-shadow(0 20px 40px rgb(0 0 0 / .08)); }
.section-title { font-size: 1.5rem; margin-bottom: 18px; letter-spacing: -.01em; }
.features, .steps { max-width: 1200px; margin: 0 auto; padding: 24px 24px 40px; }
.feat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feat h3 { font-size: 1.05rem; margin: 12px 0 6px; }
.feat p { margin: 0; color: var(--muted); }
.feat-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.feat-icon svg { width: 24px; height: 24px; }
.steps ol { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 18px 18px 64px; position: relative; color: var(--muted); }
.steps li strong { color: var(--text); display: block; margin-bottom: 4px; }
.steps li::before { content: counter(s); position: absolute; left: 18px; top: 16px; width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; font-weight: 700; }
.land-foot { text-align: center; padding: 24px 16px 40px; }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 8px; padding-top: 8px; }
  .hero-art { order: -1; max-width: 520px; }
  .feat-grid, .steps ol { grid-template-columns: 1fr; }
  .login-card { max-width: none; }
}

/* Jezik */
.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; }
.lang-pick select { width: auto; border-radius: 99px; padding: 8px 32px 8px 14px; background-color: var(--surface); min-height: 40px; }

/* ===== Paketi ===== */
.plan-free { --plan: #5d6b6b; } .plan-personal { --plan: #00897b; } .plan-pro { --plan: #6750a4; } .plan-fleet { --plan: #b7791f; }
.pricing { max-width: 1200px; margin: 0 auto; padding: 24px 24px 40px; }
.billing-toggle { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 99px; padding: 4px; margin: 0 0 18px; }
.billing-toggle button { border: 0; background: none; color: var(--muted); font: inherit; font-weight: 600; padding: 7px 18px; border-radius: 99px; cursor: pointer; }
.billing-toggle button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.plan-card { position: relative; display: flex; flex-direction: column; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--plan); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-1); overflow: hidden; }
.plan-card.popular { border-color: var(--plan); box-shadow: 0 0 0 1px var(--plan), var(--shadow-2); }
.plan-card.mine { background: color-mix(in srgb, var(--plan) 6%, var(--surface)); }
.plan-card header { display: flex; gap: 12px; align-items: center; }
.plan-card header img { width: 56px; height: 56px; border-radius: 16px; object-fit: cover; flex: none; }
.plan-card h3 { font-size: 1.2rem; margin: 0; }
.plan-card header p { margin: 2px 0 0; }
.ribbon { position: absolute; top: 0; right: 16px; background: var(--plan); color: #fff; font-size: .7rem; font-weight: 700; padding: 3px 10px 4px; border-radius: 0 0 10px 10px; letter-spacing: .04em; text-transform: uppercase; }
.plan-card.popular header { padding-top: 10px; }
.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.price strong { font-size: 2rem; letter-spacing: -.02em; color: var(--plan); }
.price span { color: var(--muted); }
.price small { flex-basis: 100%; color: var(--muted); }
.price small.per-vehicle { color: var(--plan); font-weight: 600; }
.plan-features { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; flex: 1; }
.plan-features li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.35; }
.plan-features li.no { color: var(--muted); opacity: .7; }
.plan-features .mark { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 700; background: var(--surface-2); }
.plan-features li.yes .mark { background: color-mix(in srgb, var(--plan, var(--primary)) 18%, transparent); color: var(--plan, var(--primary)); }
.plan-features.compact { margin-top: 10px; }
.plan-cta { min-height: 40px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.plan-cta .btn { width: 100%; justify-content: center; }
.plan-chip { display: inline-block; margin-top: 6px; padding: 2px 10px; border-radius: 99px; font-size: .75rem; font-weight: 700; color: var(--plan); background: color-mix(in srgb, var(--plan) 14%, transparent); }
.plan-chip:hover { text-decoration: none; filter: brightness(1.1); }
.plan-summary-head { display: flex; gap: 14px; align-items: center; }
.plan-summary-head img { border-radius: 18px; }
.plan-name { font-size: 1.35rem; font-weight: 700; color: var(--plan); display: flex; gap: 8px; align-items: center; }
.meter-bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-top: 6px; }
.meter-bar i { display: block; height: 100%; border-radius: 99px; background: var(--plan, var(--primary)); }
.meter-bar i.full { background: var(--danger); }
.swatch { position: relative; }
.swatch .lock { position: absolute; top: 8px; right: 8px; color: var(--muted); }
.swatch .lock svg { width: 16px; height: 16px; }
.upgrade { display: flex; gap: 18px; align-items: center; }
.upgrade img { width: 140px; height: auto; flex: none; }
.upgrade-msg { font-size: 1.05rem; font-weight: 600; margin-top: 0; }
.upsell { display: flex; gap: 16px; align-items: center; padding: 16px 20px; margin-bottom: 16px; border-left: 4px solid #6750a4; }
.upsell h2 { font-size: 1.05rem; margin: 0 0 4px; }
.upsell p { margin: 0; }
.upsell > div { flex: 1; }
.upsell img { border-radius: 16px; }
@media (prefers-reduced-motion: no-preference) {
  .plan-card { animation: page-in .4s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
  .plan-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
  .meter-bar i { transition: width .6s var(--ease); }
}
@media (max-width: 1100px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .plans { grid-template-columns: 1fr; } .upgrade, .upsell { flex-direction: column; text-align: center; } .upgrade img { width: 110px; } }
.row.between { justify-content: space-between; }
.note { background: var(--primary-soft); color: var(--text); border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; }
.note.warn { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.plan-card.popular .btn.primary { background: var(--plan); color: #fff; }

/* ===== Oglasi (paket Free) ===== */
.ad { position: relative; border: 1px dashed var(--border); border-radius: 14px; padding: 22px 14px 12px; background: var(--surface-2); }
.ad-label { position: absolute; top: 4px; left: 10px; font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ad ins.adsbygoogle { min-height: 90px; }
.ad-row td { padding: 8px 0; background: transparent; }
.ad-row:hover td { background: transparent; }
.house-ad { display: flex; gap: 14px; align-items: center; }
.house-ad > div { flex: 1; }
.house-ad strong { display: block; }
.house-ad p { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }
.house-ad img { border-radius: 14px; flex: none; }
.house-ad.big { flex-direction: column; text-align: center; padding: 10px 6px; }
.house-ad.big strong { font-size: 1.25rem; }
.house-ad.big p { font-size: 1rem; max-width: 30em; margin: 6px auto 0; }
.interstitial { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: color-mix(in srgb, var(--bg) 70%, rgb(0 0 0 / .6)); backdrop-filter: blur(6px); }
.interstitial-box { width: min(560px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 24px; box-shadow: var(--shadow-2); padding: 16px 18px 12px; display: grid; gap: 12px; }
.interstitial-box header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.interstitial-box .ad-interstitial ins.adsbygoogle { min-height: 250px; }
.interstitial-close { min-width: 120px; justify-content: center; }
.interstitial-progress { height: 4px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.interstitial-progress i { display: block; height: 100%; width: 100%; background: var(--primary); transform-origin: left; animation: ad-progress linear both; }
.center { text-align: center; }
@keyframes ad-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: no-preference) {
  .interstitial { animation: fade-in .2s ease-out both; }
  .interstitial-box { animation: modal-in .25s var(--ease) both; }
  .ad-row .ad { animation: page-in .35s var(--ease) both; }
}
@media (max-width: 640px) { .house-ad { flex-wrap: wrap; } .house-ad .btn { width: 100%; justify-content: center; } }

/* ===== Lokacije na karti ===== */
.kind-home, .pin-home, .zone-home { --kind: #00796b; }
.kind-work, .pin-work, .zone-work { --kind: #4b607c; }
.kind-client, .pin-client, .zone-client { --kind: #6750a4; }
.kind-fuel_station, .pin-fuel_station, .zone-fuel_station { --kind: #c77700; }
.kind-service, .pin-service, .zone-service { --kind: #a14a6b; }
.kind-parking, .pin-parking, .zone-parking { --kind: #1e6fb8; }
.kind-other, .pin-other, .zone-other { --kind: #5d6b6b; }
.map-pin { background: none; border: 0; }
.map-pin .pin-body { position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--kind); border: 2px solid #fff; box-shadow: 0 3px 8px rgb(0 0 0 / .3); display: grid; place-items: center; }
.map-pin .pin-body svg { width: 18px; height: 18px; color: #fff; transform: rotate(45deg); }
.map-pin .pin-badge { position: absolute; top: -8px; right: -10px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: #fff; color: var(--kind); font: 700 11px/20px system-ui, sans-serif; text-align: center; box-shadow: 0 1px 4px rgb(0 0 0 / .3); }
.map-pin:hover .pin-body, .map-pin:focus .pin-body { filter: brightness(1.12); }
path.zone { stroke: var(--kind); fill: var(--kind); fill-opacity: .12; stroke-opacity: .5; }
@media (prefers-reduced-motion: no-preference) {
  .map-pin .pin-body { animation: pin-drop .45s var(--ease) both; }
}
@keyframes pin-drop { from { opacity: 0; transform: translateY(-14px) rotate(-45deg); } to { opacity: 1; transform: rotate(-45deg); } }
.map-card { padding: 8px; overflow: hidden; }
.map-card .map { border-radius: 12px; }
.map-hint { margin: 8px 8px 2px; }
.place-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.search { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 99px; padding: 0 14px; min-height: 40px; flex: 0 1 280px; }
.search svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.search input { border: 0; background: none; padding: 8px 0; min-height: 0; box-shadow: none; outline: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 99px; padding: 4px 12px 4px 4px; font: inherit; font-size: .88rem; cursor: pointer; transition: background-color .15s, border-color .15s; }
.chip .chip-dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--kind) 16%, transparent); color: var(--kind); }
.chip .chip-dot svg { width: 15px; height: 15px; }
.chip.on { border-color: var(--kind); background: color-mix(in srgb, var(--kind) 12%, var(--surface)); }
.place-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.place-row { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; color: var(--text); }
.place-row:hover { background: var(--surface-2); text-decoration: none; }
.place-ico { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--kind) 15%, transparent); color: var(--kind); }
.place-ico svg { width: 22px; height: 22px; }
.place-ico.big { width: 48px; height: 48px; border-radius: 14px; }
.place-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.place-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.place-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.place-title { display: flex; align-items: center; gap: 12px; }
.place-sub { display: block; font-weight: 400; font-size: .85rem; }
.stats-row { margin-bottom: 16px; }
@media (prefers-reduced-motion: no-preference) {
  .place-list li { animation: page-in .3s var(--ease) both; animation-delay: calc(var(--i, 0) * 30ms); }
}
@media (max-width: 640px) { .place-meta { display: none; } .search { flex-basis: 100%; } }

/* ===== Cijene goriva na karti ===== */
.map-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 4px 10px; }
.fuel-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fuel-toggle { --kind: #2e7d32; }
.fuel-pick select { width: auto; border-radius: 99px; padding: 6px 30px 6px 12px; min-height: 36px; }
.pin-fuelprice { --kind: #c77700; }
.pin-fuelprice.cheap { --kind: #2e7d32; }
.pin-fuelprice.high { --kind: #c62828; }
.map-pin.wide .pin-badge { top: -10px; right: auto; left: 24px; font-size: 11.5px; padding: 0 7px; background: var(--kind); color: #fff; border: 1.5px solid #fff; white-space: nowrap; }
.map-pin.pin-fuelprice .pin-body { width: 30px; height: 30px; left: 3px; top: 6px; }
.map-pin.pin-fuelprice .pin-body svg { width: 15px; height: 15px; }
.map-pin.pin-fuelprice.stale .pin-badge { background: var(--surface); color: var(--kind); border: 1.5px dashed var(--kind); }
.map-pin.pin-fuelprice.stale .pin-body { opacity: .75; }
.fuel-stale-legend { font-weight: 600; }
.fuel-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; padding: 8px 8px 0; }
.fuel-legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.fuel-legend .dot.cheap { background: #2e7d32; } .fuel-legend .dot.mid { background: #c77700; } .fuel-legend .dot.high { background: #c62828; }
.station-prices { width: 100%; }
.station-prices tr.on td { background: var(--primary-soft); font-weight: 600; }
.station-prices td { padding: 8px 10px; }

/* ===== Početna stranica v2 ===== */
.landing { background: var(--bg); overflow-x: clip; }
.land-head { position: sticky; top: 0; z-index: 40; max-width: none; padding: 0; transition: background-color .2s, box-shadow .2s, backdrop-filter .2s; }
.land-head.scrolled { background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(12px); box-shadow: 0 1px 0 var(--border); }
.land-head-in { display: flex; align-items: center; gap: 16px; max-width: 1200px; margin: 0 auto; padding: 14px 24px; }
.land-head .brand { color: var(--text); font-weight: 700; display: flex; align-items: center; gap: 10px; }
.land-head .brand:hover { text-decoration: none; }
.land-nav { display: flex; gap: 4px; margin: 0 auto; }
.land-nav a { color: var(--muted); font-weight: 550; padding: 8px 12px; border-radius: 99px; transition: color .15s, background-color .15s; }
.land-nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.land-actions { flex-wrap: nowrap; }
.hero { position: relative; isolation: isolate; padding-top: 32px; padding-bottom: 56px; }
.hero-bg { position: absolute; inset: -80px -20vw 0; z-index: -1; pointer-events: none; overflow: hidden; -webkit-mask-image: linear-gradient(#000 65%, transparent); mask-image: linear-gradient(#000 65%, transparent); }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; }
.blob.b1 { width: 520px; height: 520px; right: 8%; top: -60px; background: color-mix(in srgb, var(--primary) 38%, transparent); }
.blob.b2 { width: 420px; height: 420px; left: 12%; top: 260px; background: color-mix(in srgb, var(--accent) 30%, transparent); }
.blob.b3 { width: 360px; height: 360px; right: 30%; bottom: -120px; background: color-mix(in srgb, #6750a4 22%, transparent); }
.hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); }
.hero h1 { background: linear-gradient(100deg, var(--text) 30%, var(--primary) 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-ctas { margin: 4px 0 18px; }
.hero-ctas .btn.big { padding: 13px 26px; }
.trust { list-style: none; padding: 0; margin: 0 0 22px; display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: .9rem; }
.trust li { display: flex; align-items: center; gap: 6px; }
.trust svg { width: 18px; height: 18px; color: var(--primary); }
.hero-art { position: relative; }
.float-chip { position: absolute; display: flex; align-items: center; gap: 8px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 14px; padding: 10px 14px; font-weight: 600; font-size: .9rem; box-shadow: var(--shadow-2); white-space: nowrap; }
.float-chip svg { width: 18px; height: 18px; color: var(--primary); }
.float-chip .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 25%, transparent); }
.float-chip.c1 { left: 2%; top: 46%; }
.float-chip.c2 { right: 0; top: 8%; }
.float-chip.c3 { right: 6%; bottom: 6%; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-2); border-radius: 99px; padding: 4px; }
.auth-tabs button { border: 0; background: none; font: inherit; font-weight: 600; color: var(--muted); padding: 8px; border-radius: 99px; cursor: pointer; }
.auth-tabs button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
.stats-band { max-width: 1200px; margin: 0 auto 24px; padding: 0 24px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.stat-item strong { font-size: 1.7rem; letter-spacing: -.02em; color: var(--primary); }
.stat-item span { color: var(--muted); font-size: .92rem; }
.eyebrow.center, .section-title.center, .center { text-align: center; }
.section-title { font-size: clamp(1.6rem, 2.6vw, 2.2rem); letter-spacing: -.02em; }
.section-lead { max-width: 40em; margin: -6px auto 24px; }
.features { padding-top: 48px; }
.feat { text-align: left; padding: 22px; }
.feat-img { width: 120px; height: 120px; object-fit: contain; display: block; margin: -6px 0 4px -8px; }
.how { max-width: 1200px; margin: 0 auto; padding: 56px 24px; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.how-art img { width: 100%; height: auto; display: block; }
.steps-list { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps-list li { counter-increment: s; position: relative; padding: 16px 18px 16px 66px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--muted); }
.steps-list li strong { color: var(--text); display: block; margin-bottom: 2px; }
.steps-list li::before { content: counter(s); position: absolute; left: 18px; top: 16px; width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; font-weight: 700; }
.pricing { padding-top: 40px; }
.pricing .billing-toggle { display: flex; width: max-content; margin: 0 auto 22px; }
.faq { max-width: 820px; margin: 0 auto; padding: 48px 24px; }
.faq-list { display: grid; gap: 10px; }
/* Česta pitanja na početnoj: pitanje lijevo, znak +/- uvijek uz desni rub. */
.faq .faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 0 22px; transition: border-color .2s, box-shadow .2s; }
.faq .faq-item:hover, .faq .faq-item[open] { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); }
.faq .faq-item[open] { box-shadow: var(--shadow-1, 0 4px 14px rgb(0 0 0 / .08)); }
.faq .faq-item summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; font-weight: 600; }
.faq .faq-item summary::-webkit-details-marker { display: none; }
.faq .faq-item summary::marker { content: ''; }
.faq .faq-item summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; border-radius: 8px; }
.faq .faq-item p { margin: 0 0 18px; color: var(--muted); line-height: 1.6; animation: fade-in .2s ease; }
.faq-mark { flex: none; width: 22px; height: 22px; position: relative; }
.faq-mark::before, .faq-mark::after { content: ''; position: absolute; left: 4px; right: 4px; top: 10px; height: 2px; border-radius: 2px; background: var(--primary); transition: transform .25s var(--ease); }
.faq-mark::after { transform: rotate(90deg); }
.faq-item[open] .faq-mark::after { transform: rotate(0); }
.cta-band { position: relative; max-width: 1200px; margin: 24px auto 0; border-radius: 28px; overflow: hidden; min-height: 340px; display: flex; align-items: center; color: #10302f; }
.cta-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 60%; }
.cta-band::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(255 240 222 / .92) 0%, rgb(255 240 222 / .65) 45%, transparent 75%); z-index: 1; }
.cta-in { position: relative; z-index: 2; padding: 40px; max-width: 520px; }
.cta-in h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); letter-spacing: -.02em; margin: 0 0 8px; }
.cta-in p { margin: 0 0 20px; color: #2f4a49; font-size: 1.05rem; }
.land-foot { max-width: 1200px; margin: 0 auto; padding: 40px 24px 48px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; text-align: left; }
.land-foot .brand { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.land-foot nav { gap: 16px; }
.land-foot p { flex-basis: 100%; margin: 0; }
/* Pokret */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
  .reveal.in { opacity: 1; transform: none; }
  .blob.b1 { animation: drift1 18s ease-in-out infinite alternate; }
  .blob.b2 { animation: drift2 22s ease-in-out infinite alternate; }
  .blob.b3 { animation: drift1 26s ease-in-out infinite alternate-reverse; }
  .float-chip { animation: floaty 6s ease-in-out infinite, page-in .6s var(--ease) both; }
  .float-chip.c2 { animation-delay: -2s, .3s; }
  .float-chip.c3 { animation-delay: -4s, .5s; }
  .hero-art img { animation: page-in .8s var(--ease) both .1s; }
  .feat:hover .feat-img { transform: translateY(-4px) scale(1.04); }
  .feat-img { transition: transform .3s var(--ease); }
  .stat-item { transition: transform .2s var(--ease); }
  .stat-item:hover { transform: translateY(-3px); }
}
@keyframes drift1 { from { transform: translate(0, 0) scale(1); } to { transform: translate(-60px, 40px) scale(1.12); } }
@keyframes drift2 { from { transform: translate(0, 0) scale(1); } to { transform: translate(70px, -30px) scale(.92); } }
@keyframes floaty { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@media (max-width: 980px) {
  .land-nav { display: none; }
  .land-actions { margin-left: auto; }
  .how { grid-template-columns: 1fr; }
  .stats-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .hide-sm { display: none; }
  .land-head-in { padding: 10px 16px; gap: 8px; }
  .land-head .brand { font-size: 0; gap: 0; }
  .lang-pick select { padding: 8px 28px 8px 10px; }
  .float-chip { display: none; }
  .stats-band, .features, .how, .pricing, .faq { padding-left: 16px; padding-right: 16px; }
  .stat-item strong { font-size: 1.35rem; }
  .cta-band { border-radius: 0; min-height: 300px; }
  .cta-band::before { background: linear-gradient(180deg, rgb(255 240 222 / .92) 0%, rgb(255 240 222 / .75) 60%, rgb(255 240 222 / .3) 100%); }
  .cta-in { padding: 28px 20px; }
}

/* ===== Aplikacija: pozdrav, skeleton ===== */
.welcome { position: relative; overflow: hidden; border-radius: 24px; margin-bottom: 16px; min-height: 170px; display: flex; align-items: center;
  background: url('img/banner_road.webp') right 0 top 78% / cover no-repeat, #ffe8c2; color: #10302f; }
.welcome::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(255 240 222 / .95) 0%, rgb(255 240 222 / .7) 45%, transparent 75%); }
.welcome-text { position: relative; padding: 22px 26px; max-width: 560px; }
.welcome h2 { font-size: 1.5rem; margin: 0 0 4px; letter-spacing: -.01em; }
.welcome p { margin: 0 0 14px; color: #2f4a49; }
.welcome .btn:not(.primary) { background: rgb(255 255 255 / .8); color: #10302f; border-color: transparent; }
.skeleton { display: grid; gap: 12px; padding: 8px 0; }
.skeleton i { display: block; height: 14px; width: var(--w, 80%); border-radius: 8px; background: linear-gradient(90deg, var(--surface-2) 0%, color-mix(in srgb, var(--surface-2) 40%, var(--surface)) 50%, var(--surface-2) 100%); background-size: 200% 100%; }
@media (prefers-reduced-motion: no-preference) {
  .skeleton i { animation: shimmer 1.3s ease-in-out infinite; }
  .welcome { animation: page-in .5s var(--ease) both; }
  .grid > .stat { animation: page-in .45s var(--ease) both; }
  .grid > .stat:nth-child(2) { animation-delay: .06s; } .grid > .stat:nth-child(3) { animation-delay: .12s; } .grid > .stat:nth-child(4) { animation-delay: .18s; }
  .nav a svg { transition: transform .2s var(--ease); }
  .nav a:hover svg { transform: translateX(2px); }
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (max-width: 640px) {
  .welcome { background-position: 75% center; }
  .welcome::before { background: linear-gradient(180deg, rgb(255 240 222 / .94) 0%, rgb(255 240 222 / .7) 70%, rgb(255 240 222 / .4) 100%); }
}

/* ===== Ruta i brzina ===== */
.trip-route { display: grid; gap: 16px; margin-bottom: 16px; }
.route-card .map { border-radius: 12px; }
.speed-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; }
.speed-legend i { display: inline-block; width: 18px; height: 5px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }
.speed-stats .value small { font-size: .55em; color: var(--muted); font-weight: 500; }
.stat.warn .value { color: var(--danger); }
.pin-expense { --kind: #a14a6b; }
.pin-income { --kind: #2e7d32; }
.trip-route .upsell { margin-bottom: 0; }
.avatar { display: inline-grid; place-items: center; flex: none; border-radius: 50%; overflow: hidden; font-weight: 700; color: #fff;
  background: hsl(var(--hue, 180) 45% 42%); }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.who-row { display: flex; gap: 10px; align-items: center; margin-bottom: 4px; }
.name-cell { display: inline-flex; gap: 10px; align-items: center; }
.avatar-row { display: flex; gap: 12px; align-items: center; }
.g12 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
@media (max-width: 1100px) { .g12 { grid-template-columns: 1fr; } }

/* Administracija */
.admin .admin-body { animation: fade-in .2s ease; }
.admin table tr.click { cursor: pointer; }
.admin table tr.click:hover td { background: var(--surface-2); }
.admin tr.muted td { opacity: .6; }
.admin .small.bad { color: var(--danger); }
.admin .note .btn { margin-left: 8px; }
ul.plain { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.modal footer .spacer { flex: 1; }
.impersonation { position: sticky; top: 0; z-index: 30; display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap;
  padding: 8px 16px; background: var(--accent); color: #fff; font-weight: 600; }
.impersonation .btn { background: #fff; color: #222; border-color: #fff; }

/* Listanje po stranicama */
.pager { display: flex; align-items: center; justify-content: center; gap: 4px; flex-wrap: wrap; margin-top: 14px; }
.pager .pg { min-width: 34px; height: 34px; padding: 0 8px; border-radius: 10px; border: 0; background: transparent; color: var(--text);
  font: inherit; font-variant-numeric: tabular-nums; cursor: pointer; transition: background-color .15s, color .15s, transform .15s; }
.pager .pg:hover:not(:disabled):not(.on) { background: var(--surface-2); }
.pager .pg:active:not(:disabled) { transform: scale(.94); }
.pager .pg.on { background: var(--primary); color: var(--on-primary); font-weight: 600; }
.pager .pg:disabled { opacity: .35; cursor: default; }
.pager .pg.nav { font-size: 1.2rem; }
.pager .pg.gap { display: inline-flex; align-items: center; justify-content: center; cursor: default; color: var(--muted); }
.pager .pg:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.pg-jump label { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; color: var(--muted); font-size: .85rem; }
.pg-jump input { width: 52px; height: 32px; padding: 0 8px; border: 0; border-radius: 8px; background: var(--surface-2); color: var(--text); font: inherit; text-align: center; }
.pg-jump input:focus { outline: 2px solid var(--primary); }

/* Redovi tablica ulaze jedan za drugim (najviše prvih 12), kartice i statistika blago se izdignu. */
@media (prefers-reduced-motion: no-preference) {
  tbody tr { animation: row-in .22s cubic-bezier(.2,0,0,1) both; }
  tbody tr:nth-child(2) { animation-delay: 25ms; } tbody tr:nth-child(3) { animation-delay: 50ms; }
  tbody tr:nth-child(4) { animation-delay: 75ms; } tbody tr:nth-child(5) { animation-delay: 100ms; }
  tbody tr:nth-child(6) { animation-delay: 125ms; } tbody tr:nth-child(7) { animation-delay: 150ms; }
  tbody tr:nth-child(8) { animation-delay: 175ms; } tbody tr:nth-child(9) { animation-delay: 200ms; }
  tbody tr:nth-child(10) { animation-delay: 225ms; } tbody tr:nth-child(11) { animation-delay: 250ms; }
  tbody tr:nth-child(n+12) { animation-delay: 275ms; }
  .toast:not([hidden]) { animation: toast-in .32s cubic-bezier(.34,1.4,.64,1) both; }
  a.card, .stat { transition: transform .18s cubic-bezier(.2,0,0,1), box-shadow .18s; }
  a.card:hover, .stat:hover { transform: translateY(-2px); }
}
@keyframes row-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(.96); } }
/* Okrugli izbornici (jezik, gorivo) i pretraga zadržavaju svoj oblik bez crte ispod. */
.lang-pick select, .fuel-pick select { border: 1px solid var(--border); background-image: none; }
.search input { background-image: none; border-radius: 0; }
.search input:focus { background-color: transparent; }

/* Dnevnica u obrascu putovanja */
.per-diem { border-top: 1px dashed var(--border); padding-top: 10px; }
.per-diem-est { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: end; margin-top: 8px; color: var(--text); }
@media (max-width: 700px) { .per-diem-est { grid-template-columns: 1fr; } }
button.linkish { border: 0; background: none; color: var(--primary); font: inherit; cursor: pointer; padding: 0; text-decoration: underline dotted; }

/* Pomoć: upitnik uz polje i oblačić s objašnjenjem */
.help-tip { position: relative; display: inline-flex; vertical-align: middle; margin-left: 5px; pointer-events: auto; }
.help-tip > button { width: 16px; height: 16px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; font: 700 .62rem/16px inherit;
  background: color-mix(in srgb, var(--primary) 16%, transparent); color: var(--primary); transition: background-color .15s, transform .15s; }
.help-tip > button:hover, .help-tip.open > button { background: var(--primary); color: var(--on-primary); transform: scale(1.08); }
.help-bubble { position: absolute; left: 50%; bottom: calc(100% + 8px); z-index: 50; width: max-content; max-width: min(280px, 80vw);
  padding: 8px 11px; border-radius: 10px; background: var(--text); color: var(--bg); font-size: .78rem; font-weight: 400; line-height: 1.4;
  white-space: normal; text-transform: none; letter-spacing: 0; box-shadow: 0 6px 20px rgba(0,0,0,.18);
  opacity: 0; visibility: hidden; transform: translate(-50%, 4px); transition: opacity .15s, transform .15s, visibility .15s; pointer-events: none; }
.help-bubble::after { content: ""; position: absolute; left: 50%; top: 100%; margin-left: -5px; border: 5px solid transparent; border-top-color: var(--text); }
.help-tip:hover .help-bubble, .help-tip:focus-within .help-bubble, .help-tip.open .help-bubble { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.help-link { display: flex; width: fit-content; align-items: center; gap: 6px; color: var(--muted); margin: 6px 0 8px; }
.help-link svg { width: 16px; height: 16px; }
/* Pomoć: pitanja u kartici (samo .help-page, da ne mijenja česta pitanja na početnoj stranici). */
.help-page .faq-item { border-bottom: 1px solid var(--border); padding: 4px 0; }
.help-page .faq-item:last-child { border-bottom: 0; }
.help-page .faq-item summary { cursor: pointer; padding: 10px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.help-page .faq-item summary::-webkit-details-marker { display: none; }
.help-page .faq-item summary::after { content: "+"; color: var(--primary); font-size: 1.2rem; line-height: 1; transition: transform .2s; }
.help-page .faq-item[open] summary::after { transform: rotate(45deg); }
.help-page .faq-item p { margin: 0 0 12px; color: var(--muted); animation: fade-in .2s ease; }
.deleted-places { margin-top: 12px; }
.deleted-places .card { margin-top: 8px; }

/* Kupnja paketa (Revolut Pay, Google Pay) */
.checkout { display: flex; flex-direction: column; gap: 14px; min-width: min(420px, 100%); }
.checkout-head { display: flex; gap: 12px; align-items: center; }
.checkout .billing-toggle { margin: 0; align-self: flex-start; }
.checkout-sum { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; min-height: 52px; }
.checkout-sum strong { font-size: 1.25rem; }
.pay-buttons { display: flex; flex-direction: column; gap: 10px; }
.pay-buttons .btn { width: 100%; justify-content: center; min-height: 48px; }
.pay-widget:empty { display: none; }
.pay-wait { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 0; }
.pay-result { display: flex; gap: 14px; align-items: center; }
.pay-result p { margin: 4px 0 0; }
.plan-summary .table-wrap { margin-top: 14px; }

/* Odo, los putnik (maskota) i logo s kometom kroz rogove */
.odo { display: block; overflow: visible; }
.odo .odo-bob { transform-box: view-box; transform-origin: 120px 284px; animation: odo-bob 3.2s ease-in-out infinite; }
.odo .odo-head { transform-box: view-box; transform-origin: 120px 160px; animation: odo-tilt 6.4s ease-in-out infinite; }
.odo .odo-armR { transform-box: view-box; transform-origin: 156px 178px; }
.odo .odo-eyeL, .odo .odo-eyeR { transform-box: fill-box; transform-origin: 50% 70%; }
.odo .odo-wink, .odo .odo-spark, .odo .odo-route, .odo .odo-route-base, .odo .odo-pin { opacity: 0; }
.odo .odo-spark { transform-box: fill-box; transform-origin: center; }
.odo .odo-pin { transform-box: fill-box; transform-origin: center; }
.odo .odo-route { stroke-dasharray: 26 200; stroke-dashoffset: 26; }
@keyframes odo-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes odo-tilt { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-2deg); } 70% { transform: rotate(2deg); } }
.odo.is-blink .odo-eyeL, .odo.is-blink .odo-eyeR { animation: odo-blink .3s ease-in-out; }
@keyframes odo-blink { 50% { transform: scaleY(.15); } }
.odo.is-wink .odo-eyeR { animation: odo-hide 1.4s ease-in-out; }
.odo.is-wink .odo-wink { animation: odo-show 1.4s ease-in-out; }
.odo.is-wink .odo-spark { animation: odo-spark 1.4s ease-out; }
@keyframes odo-hide { 10%, 75% { opacity: 0; } }
@keyframes odo-show { 10%, 75% { opacity: 1; } }
@keyframes odo-spark { 0% { opacity: 0; transform: scale(.2) rotate(0); } 25% { opacity: 1; transform: scale(1.2) rotate(45deg); } 70% { opacity: 1; transform: scale(1) rotate(90deg); } 100% { opacity: 0; transform: scale(.4) rotate(120deg); } }
.odo.is-waving .odo-armR { animation: odo-wave 2.2s ease-in-out; }
@keyframes odo-wave {
  0% { transform: rotate(0); } 18% { transform: rotate(-145deg); } 30% { transform: rotate(-120deg); } 42% { transform: rotate(-150deg); }
  54% { transform: rotate(-120deg); } 66% { transform: rotate(-150deg); } 82% { transform: rotate(-140deg); } 100% { transform: rotate(0); }
}
.odo.is-comet .odo-route { animation: odo-comet 2.8s cubic-bezier(.45, 0, .3, 1); }
.odo.is-comet .odo-route-base { animation: odo-trail 2.8s ease-out; }
.odo.is-comet .odo-pin { animation: odo-pin 2.8s ease-out; }
.odo.is-comet .odo-pin.b { animation-name: odo-pin-b; }
@keyframes odo-comet { 0% { opacity: 1; stroke-dashoffset: 26; } 60% { opacity: 1; stroke-dashoffset: -100; } 61%, 100% { opacity: 0; stroke-dashoffset: -100; } }
@keyframes odo-trail { 0%, 55% { opacity: 0; } 65% { opacity: 1; stroke: #FFB020; } 100% { opacity: 0; } }
@keyframes odo-pin { 0% { opacity: 0; transform: scale(.3); } 10% { opacity: 1; transform: scale(1.3); } 20%, 85% { opacity: 1; transform: scale(1); } 100% { opacity: 0; } }
@keyframes odo-pin-b { 0%, 55% { opacity: 0; transform: scale(.3); } 63% { opacity: 1; transform: scale(1.4); } 72%, 85% { opacity: 1; transform: scale(1); } 100% { opacity: 0; } }

.brand-icon { position: relative; display: inline-block; flex: none; }
.brand-icon img, .brand-icon svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.brand-icon svg { overflow: visible; pointer-events: none; }
.brand-icon .bi-trail, .brand-icon .bi-head { opacity: 0; }
.brand-icon .bi-head { stroke-dasharray: 14 200; stroke-dashoffset: 14; }
.brand-icon.is-comet .bi-head { animation: bi-head 2.8s cubic-bezier(.45, 0, .3, 1); }
.brand-icon.is-comet .bi-trail { animation: bi-trail 2.8s ease-out; }
@keyframes bi-head { 0% { opacity: 1; stroke-dashoffset: 14; } 62% { opacity: 1; stroke-dashoffset: -100; } 63%, 100% { opacity: 0; stroke-dashoffset: -100; } }
@keyframes bi-trail { 0% { opacity: 0; stroke-dasharray: 0 200; } 62% { opacity: .95; stroke-dasharray: 100 200; } 80% { opacity: .95; stroke-dasharray: 100 200; } 100% { opacity: 0; stroke-dasharray: 100 200; } }
.brand-lockup { display: inline-flex; align-items: center; gap: 9px; }
.wordmark { font-weight: 800; letter-spacing: -.02em; }
.wordmark b { color: #E8962F; font-weight: 800; }
@media (prefers-reduced-motion: reduce) { .odo .odo-bob, .odo .odo-head { animation: none; } }

/* Trip-a-ton: tone kilometara na Pregledu */
.welcome { position: relative; }
.welcome .odo-corner { position: absolute; right: 18px; bottom: 0; }
.tons { display: flex; gap: 14px; align-items: center; }
.tons .odo { flex: none; }
.tons strong { font-size: 1.6rem; }
.tons-bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-top: 6px; }
.tons-bar i { display: block; height: 100%; background: linear-gradient(90deg, #E8962F, #FFC53D); border-radius: 99px; }
.ton-party { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(10, 30, 35, .45); animation: fade-in .2s ease-out; }
.ton-party .card { text-align: center; max-width: 360px; padding: 22px 26px; }
.ton-party img { width: 200px; height: auto; animation: ton-jump 1.2s ease-in-out infinite; }
@keyframes ton-jump { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.hero-art .odo-hero { position: absolute; left: -10px; bottom: -6px; filter: drop-shadow(0 10px 18px rgba(0,0,0,.18)); }
@media (max-width: 720px) { .hero-art .odo-hero { width: 96px; height: 120px; left: 0; } .welcome .odo-corner { display: none; } }
.pay-result .odo-celebrate { width: 96px; height: auto; }
.ton-card { margin-bottom: 16px; }
.hero .tagline { font-weight: 700; color: #C4741B; margin: -6px 0 16px; }
:root[data-theme-dark] .hero .tagline { color: #F2A33A; }
.small-title { font-size: .95rem; margin: 0 0 2px; color: var(--muted); font-weight: 700; }
th.sortable { padding: 0; }
.sort-btn { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: 6px; width: 100%; padding: 10px 12px; cursor: pointer; font: inherit; font-weight: 700; color: inherit; }
.sort-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; border-radius: 6px; }
.sort-ind { font-size: .7em; opacity: .45; }
th[aria-sort="ascending"] .sort-ind, th[aria-sort="descending"] .sort-ind { opacity: 1; color: var(--primary); }
th.right .sort-btn { justify-content: flex-end; }
/* Dionice putovanja */
.legs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.legs li { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.legs .leg-ico { font-size: 1.4rem; width: 32px; text-align: center; }
.legs .leg-main { flex: 1; min-width: 0; }

/* Logo marke vozila: box lijevo, podaci desno. */
.brand-tile { --bc: var(--muted); flex: none; display: inline-grid; place-items: center; border-radius: 14px;
  background: color-mix(in srgb, var(--bc) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--bc) 22%, var(--border)); }
.brand-tile svg { width: 62%; height: 62%; display: block; }
.brand-tile.mono { color: var(--bc); font-weight: 800; letter-spacing: .02em; }
.brand-tile.none { color: var(--muted); }
.brand-tile.none svg path { fill: currentColor; }
.veh-head { display: flex; gap: 14px; align-items: center; }
.veh-head-text { flex: 1; min-width: 0; }
.veh-head-text h2 { margin: 0; }
.veh-data { display: flex; gap: 18px; align-items: flex-start; }
.veh-data > .kv { flex: 1; min-width: 0; margin: 0; }
@media (max-width: 480px) { .veh-data { gap: 12px; } .veh-data > .brand-tile { width: 52px !important; height: 52px !important; } }

/* Dnevnica u putnom nalogu: stavka u tri kratka retka, ne širi stupac. */
.pd-rows { white-space: normal; line-height: 1.35; margin-top: 4px; min-width: 9em; max-width: 15em; margin-left: auto; }
.pd-rows + .pd-rows { margin-top: 6px; }

/* Gorivo */
.fuel-page { display: flex; flex-direction: column; gap: 16px; }
.fuel-page > .grid { margin: 0; }
.fd-hero { display: flex; align-items: center; gap: 22px; overflow: hidden; position: relative;
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--primary) 16%, var(--surface)) 0%, var(--surface) 60%); }
.fd-hero img { width: 150px; height: auto; flex: none; animation: fd-float 5s ease-in-out infinite; }
.fd-hero-main { flex: 1; min-width: 0; }
.fd-big { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.fd-verdict { margin: 8px 0 0; font-weight: 600; color: var(--primary); }
@keyframes fd-float { 50% { transform: translateY(-6px) rotate(-1.5deg); } }
.fd-stat { position: relative; overflow: hidden; }
.fd-stat-ico { position: absolute; right: 12px; top: 12px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--primary) 14%, transparent); color: var(--primary); }
.fd-stat-ico svg { width: 18px; height: 18px; }
.fd-market { display: flex; flex-direction: column; gap: 12px; }
.fd-market-row { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.fd-vs { text-align: right; display: flex; flex-direction: column; align-items: flex-end; padding: 8px 12px; border-radius: 12px; }
.fd-vs strong { font-size: 1.35rem; }
.fd-vs.good { background: color-mix(in srgb, #2e9d5b 14%, transparent); color: #2e9d5b; }
.fd-vs.bad { background: color-mix(in srgb, #d9822b 16%, transparent); color: #c06a17; }
.fd-records { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.fd-record { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 14px; background: var(--surface-2);
  animation: fd-pop .45s cubic-bezier(.2,.9,.3,1.3) both; animation-delay: calc(var(--i) * 70ms); }
.fd-record b { font-size: 1.1rem; }
.fd-record-ico { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--primary); }
.fd-record-ico svg { width: 20px; height: 20px; }
.fd-record-ico.r-cheapest, .fd-record-ico.r-best_consumption { background: #2e9d5b; }
.fd-record-ico.r-priciest, .fd-record-ico.r-worst_consumption { background: #d9822b; }
.fd-record-ico.r-longest_range { background: #2f7dd1; }
@keyframes fd-pop { from { opacity: 0; transform: translateY(8px) scale(.96); } }
.fd-vehicles { display: flex; flex-direction: column; gap: 6px; }
.fd-vehicle { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: 12px; color: inherit; text-decoration: none; }
.fd-vehicle:hover { background: var(--surface-2); }
.fd-vehicle-text { flex: 1; min-width: 0; }
.fd-empty { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.fd-empty img { width: 200px; height: auto; }
@media (max-width: 600px) { .fd-hero { flex-direction: column; text-align: center; } .fd-hero img { width: 120px; } }
@media (prefers-reduced-motion: reduce) { .fd-hero img, .fd-record { animation: none; } }

/* ---- Doživljaj: konfeti, Odove poruke, trofeji, Tvoja godina ---- */
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 10000; }
body.no-scroll { overflow: hidden; }
.insight { margin: 4px 0 12px; font-weight: 600; color: var(--primary); }
.joy-toasts { position: fixed; left: 16px; bottom: 16px; z-index: 900; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.joy-toast { display: flex; align-items: flex-end; gap: 6px; animation: joy-in .5s cubic-bezier(.2,1.3,.4,1) both; }
.joy-toast .odo { flex: none; filter: drop-shadow(0 6px 10px rgba(0,0,0,.18)); }
.joy-toast p { margin: 0 0 18px; max-width: 300px; padding: 10px 14px; border-radius: 16px 16px 16px 4px; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); box-shadow: 0 10px 28px rgba(0,0,0,.16); font-weight: 600; }
@keyframes joy-in { from { opacity: 0; transform: translate(-30px, 20px) scale(.9); } }
@media (max-width: 760px) { .joy-toasts { bottom: 78px; left: 8px; } }

.medal { --s: 64px; position: relative; width: var(--s); height: var(--s); border: 0; padding: 0; border-radius: 50%; cursor: pointer; background: none; flex: none; }
.medal-ring { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(var(--primary) var(--deg), color-mix(in srgb, var(--muted) 22%, transparent) 0); }
.medal-face { position: absolute; inset: 5px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); font-size: calc(var(--s) * .42); }
.medal-face .mi { width: 1em; height: 1em; }
.medal.on .medal-ring { background: conic-gradient(from 200deg, #FFE27A, #E8962F, #FF7A1A, #FFE27A); animation: medal-spin 6s linear infinite; }
.medal.on .medal-face { background: radial-gradient(circle at 35% 30%, #FFF6D0, #FFD36B 45%, #E8962F); color: #6B3A00;
  box-shadow: inset 0 -4px 10px rgba(120,60,0,.25), 0 4px 14px rgba(232,150,47,.35); }
.medal.on::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.6) 50%, transparent 65%);
  background-size: 250% 100%; animation: medal-shine 3.5s ease-in-out infinite; pointer-events: none; }
.medal:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
@keyframes medal-spin { to { filter: hue-rotate(20deg); transform: rotate(360deg); } }
@keyframes medal-shine { 0%, 60% { background-position: 150% 0; } 100% { background-position: -50% 0; } }
.trophy-card .card-head { flex-wrap: wrap; gap: 10px; }
.year-btn { background: linear-gradient(90deg, #FF7A1A, #E8962F, #FFB347); border: 0; color: #2A1600; font-weight: 700; box-shadow: 0 6px 18px rgba(255,122,26,.35); }
.year-btn:hover { filter: brightness(1.05); }
.next-goal { margin: 0 0 14px; }
.goal-bar { display: block; height: 8px; border-radius: 99px; background: var(--surface-2); margin-top: 6px; overflow: hidden; }
.goal-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), #FF8A1F); animation: grow-x 1s cubic-bezier(.2,0,0,1) both; transform-origin: left; }
@keyframes grow-x { from { transform: scaleX(0); } }
.medals { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 14px 8px; }
.medal-cell { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; animation: fd-pop .5s cubic-bezier(.2,.9,.3,1.3) both; animation-delay: calc(var(--i) * 40ms); }
.medal-cell .small { line-height: 1.2; }
.trophy-pop { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; background: rgba(10,16,20,.55); backdrop-filter: blur(3px); animation: fade-in .2s ease-out; }
.trophy-pop .card { max-width: 380px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; animation: pop-big .55s cubic-bezier(.2,1.4,.4,1) both; }
.trophy-pop h2 { margin: 4px 0 0; }
.trophy-pop p { margin: 0; }
.trophy-pop img { width: 130px; height: auto; }
.trophy-burst { padding: 14px; border-radius: 50%; background: radial-gradient(circle, rgba(255,226,122,.55), transparent 70%); animation: burst 1.6s ease-out infinite; }
@keyframes pop-big { from { opacity: 0; transform: scale(.6) rotate(-6deg); } }
@keyframes burst { 50% { box-shadow: 0 0 0 18px rgba(255,200,87,.0), 0 0 40px 10px rgba(255,170,60,.35); } }
@keyframes fade-in { from { opacity: 0; } }

/* Tvoja godina (priča) */
.story { position: fixed; inset: 0; z-index: 1100; color: #fff; display: flex; flex-direction: column; overflow: hidden; transition: background .6s; }
.story.b1 { background: radial-gradient(120% 90% at 20% 10%, #1A6E6A 0%, #0E2A3A 55%, #0A1420 100%); }
.story.b2 { background: radial-gradient(120% 90% at 80% 10%, #FF8A1F 0%, #B33A1A 45%, #2A0E1A 100%); }
.story.b3 { background: radial-gradient(120% 90% at 10% 90%, #3E9E92 0%, #1E2A44 60%, #0A1020 100%); }
.story.b4 { background: radial-gradient(120% 90% at 50% 0%, #2F7DD1 0%, #1E2A44 55%, #0A1020 100%); }
.story.b5 { background: radial-gradient(120% 90% at 90% 80%, #A05AD6 0%, #2A1E44 55%, #0E0A20 100%); }
.story.b6 { background: radial-gradient(120% 90% at 20% 20%, #E8962F 0%, #4A2A10 55%, #140A04 100%); }
.story.b7 { background: radial-gradient(120% 90% at 80% 30%, #2E9D5B 0%, #123A2A 55%, #06140E 100%); }
.story.b8 { background: radial-gradient(120% 90% at 50% 50%, #FFD36B 0%, #B8661A 45%, #2A1404 100%); }
.story-bars { display: flex; gap: 4px; padding: 12px 14px 0; }
.story-bars span { flex: 1; height: 4px; border-radius: 4px; background: rgba(255,255,255,.28); overflow: hidden; }
.story-bars span i { display: block; height: 100%; width: 0; background: #fff; }
.story-bars span.done i { width: 100%; }
.story-bars span.now i { animation: bar var(--dur) linear forwards; }
.story-bars span.now.paused i { animation-play-state: paused; }
@keyframes bar { to { width: 100%; } }
.story-top { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; }
.story-brand { font-weight: 800; letter-spacing: .02em; opacity: .9; }
.story-brand b { color: #FFB347; }
.story-x { background: rgba(255,255,255,.15); border: 0; color: #fff; width: 40px; height: 40px; border-radius: 50%; font-size: 18px; cursor: pointer; }
.story-stage { flex: 1; display: grid; place-items: center; padding: 16px 20px 40px; cursor: pointer; user-select: none; }
.story-slide { max-width: 560px; width: 100%; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; animation: slide-in .6s cubic-bezier(.2,.9,.2,1) both; }
.story-slide > * { animation: slide-in .7s cubic-bezier(.2,.9,.2,1) both; }
.story-slide > *:nth-child(2) { animation-delay: .12s; } .story-slide > *:nth-child(3) { animation-delay: .24s; }
.story-slide > *:nth-child(4) { animation-delay: .36s; } .story-slide > *:nth-child(5) { animation-delay: .48s; }
@keyframes slide-in { from { opacity: 0; transform: translateY(24px) scale(.97); } }
.story h2 { font-size: clamp(1.8rem, 5vw, 2.6rem); margin: 0; line-height: 1.15; }
.story .big { font-size: clamp(3.4rem, 13vw, 6.5rem); font-weight: 900; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff, #FFE27A); -webkit-background-clip: text; background-clip: text; color: transparent; }
.story .lead { font-size: 1.3rem; font-weight: 600; margin: 0; }
.story .kicker { text-transform: uppercase; letter-spacing: .12em; font-weight: 700; opacity: .8; margin: 0; }
.story p, .story .lead, .story h2, .story li { margin: 0; color: rgba(255,255,255,.95); }
.story img { max-width: 60vw; height: auto; filter: drop-shadow(0 12px 24px rgba(0,0,0,.35)); }
.story .facts { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 8px; font-size: 1.1rem; }
.story .facts li { background: rgba(255,255,255,.1); border-radius: 14px; padding: 8px 14px; }
.podium { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; width: 100%; }
.podium li { display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,.12); border-radius: 16px; padding: 10px 14px; font-size: 1.15rem;
  animation: slide-in .6s both; animation-delay: calc(.2s + var(--i) * .15s); }
.podium li span { font-size: 1.8rem; } .podium li b { flex: 1; text-align: left; } .podium li em { font-style: normal; opacity: .8; }
.flags { font-size: 2.4rem; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.story-medals { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.story-medals > div { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 96px; animation: pop-big .6s both; animation-delay: calc(.2s + var(--i) * .12s); }
.story .btn { color: inherit; }
.story .btn.primary { background: #fff; color: #1E2A44; border-color: #fff; }
.story .btn:not(.primary) { background: rgba(255,255,255,.14); border-color: transparent; color: #fff; }
@media (prefers-reduced-motion: reduce) {
  .medal.on .medal-ring, .medal.on::after, .trophy-burst, .story-slide, .story-slide > *, .podium li, .story-medals > div, .medal-cell, .joy-toast { animation: none; }
}

/* Postignuća po razinama */
.ladders-title { margin: 20px 0 10px; font-size: 1.05rem; }
.ladders { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.ladder { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 16px; background: var(--surface-2);
  animation: fd-pop .45s cubic-bezier(.2,.9,.3,1.3) both; animation-delay: calc(var(--i) * 60ms); }
.ladder-text { flex: 1; min-width: 0; }
.ladder-text .goal-bar { margin: 6px 0 2px; }
.ladder-medal { --s: 56px; --tc: var(--muted); position: relative; flex: none; width: var(--s); height: var(--s); border-radius: 30%;
  display: grid; place-items: center; font-size: calc(var(--s) * .46); color: var(--muted);
  background: color-mix(in srgb, var(--muted) 14%, var(--surface)); transform: rotate(45deg); }
.ladder-medal > .mi { transform: rotate(-45deg); }
.ladder-medal.on { color: #fff; background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--tc) 55%, #fff), var(--tc) 60%, color-mix(in srgb, var(--tc) 70%, #000));
  box-shadow: 0 6px 16px color-mix(in srgb, var(--tc) 45%, transparent), inset 0 -3px 8px rgba(0,0,0,.2); }
.ladder-medal b { position: absolute; right: -6px; bottom: -6px; transform: rotate(-45deg); min-width: 22px; height: 22px; padding: 0 5px; border-radius: 99px;
  font-size: 12px; line-height: 22px; text-align: center; background: var(--surface); color: var(--text); border: 2px solid var(--tc); font-weight: 800; }
@media (prefers-reduced-motion: reduce) { .ladder { animation: none; } }
.route-speed { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.quick-business { margin: 0 0 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.quick-business p { margin: 4px 0 0 58px; }
.mail-transport { margin-top: 6px; }
.mail-transport .ok-text { color: var(--ok, #1e8e3e); }
.mail-transport .err-text { color: var(--danger, #c5221f); }

/* ===== Početna: snimke ekrana ===== */
.screens { max-width: 1200px; margin: 0 auto; padding: 56px 24px 24px; }
.shot-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 auto 18px; }
.shot-tabs button { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: 8px 16px; font: inherit; font-weight: 600; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; }
.shot-tabs button:hover { border-color: var(--primary); }
.shot-tabs button.on { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.browser { margin: 0 auto; max-width: 1080px; border-radius: 16px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 24px 60px -24px rgb(0 0 0 / .35); }
.browser-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: var(--surface-2, color-mix(in srgb, var(--text) 6%, var(--surface))); border-bottom: 1px solid var(--border); }
.browser-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.browser-bar i:nth-child(2) { background: #febc2e; }
.browser-bar i:nth-child(3) { background: #28c840; }
.browser-bar span { margin-left: 12px; flex: 1; max-width: 320px; padding: 3px 12px; border-radius: 8px; background: var(--surface); color: var(--muted); font-size: .8rem; }
.shot-zoom { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.shot-zoom img { display: block; width: 100%; height: auto; }
.browser .shot-zoom img { aspect-ratio: 1600 / 1012; animation: fade-in .25s ease; }
.browser figcaption, .phone figcaption { padding: 12px 16px 14px; color: var(--muted); font-size: .9rem; text-align: center; }
.shots-app-title { margin: 44px 0 18px; font-size: 1.25rem; }
.phones { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; max-width: 1080px; margin: 0 auto 14px; }
.phone { margin: 0; }
.phone .shot-zoom { border-radius: 30px; overflow: hidden; border: 8px solid #1d2327; box-shadow: 0 18px 40px -18px rgb(0 0 0 / .45); background: #1d2327; }
.phone .shot-zoom img { border-radius: 22px; }
.phone figcaption { padding: 10px 4px 0; }
.shot-light { position: fixed; inset: 0; z-index: 80; background: rgb(0 0 0 / .82); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 20px; cursor: zoom-out; animation: fade-in .15s ease; }
.shot-light img { max-width: min(1600px, 100%); max-height: calc(100vh - 90px); border-radius: 12px; box-shadow: 0 20px 60px rgb(0 0 0 / .5); }
.shot-light img.tall { border-radius: 24px; }
@media (prefers-reduced-motion: no-preference) {
  .phone .shot-zoom { transition: transform .25s var(--ease); }
  .phone .shot-zoom:hover { transform: translateY(-6px); }
}
@media (max-width: 900px) { .phones { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .screens { padding: 40px 16px 16px; } .shot-tabs { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; } .shot-tabs button { flex: none; } .phone .shot-zoom { border-width: 6px; border-radius: 24px; } }
