/* =========================================================
   Vozni park — vlastiti sloj preko Bootstrapa 5
   ========================================================= */

:root {
  --ink: #16202B;
  --steel: #54697D;
  --mute: #8B9AA8;
  --paper: #E9EDF1;
  --line: #D7DEE5;
  --line-soft: #E7ECF1;
  --blue: #1D4E89;
  --blue-soft: #E8EEF6;
  --amber: #B87514;
  --amber-soft: #FBF0DC;
  --red: #B93326;
  --red-soft: #FAE7E4;
  --green: #26714F;
  --green-soft: #E2F0EA;

  --font-display: 'Barlow Condensed', Impact, sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
}

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
}

h1, h2, h3, .display-font {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: .02em;
  font-weight: 600;
}

h1 { font-size: 1.6rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.1rem; }

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

.label-sm {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--mute);
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* ---------- Registarska pločica ---------- */

.plate {
  display: inline-flex;
  align-items: stretch;
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  background: #fff;
  overflow: hidden;
  vertical-align: middle;
  line-height: 1;
  white-space: nowrap;
}
.plate-band {
  background: var(--blue);
  color: #fff;
  font-family: var(--font-mono);
  font-weight: 600;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.plate-text {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: .06em;
  display: flex;
  align-items: center;
  padding: 0 8px;
}

.plate-sm { height: 22px; }
.plate-sm .plate-band { width: 10px; font-size: 6.5px; padding-bottom: 2px; }
.plate-sm .plate-text { font-size: 11px; padding: 0 6px; }

.plate-md { height: 28px; }
.plate-md .plate-band { width: 13px; font-size: 8px; padding-bottom: 2px; }
.plate-md .plate-text { font-size: 14px; }

.plate-lg { height: 38px; }
.plate-lg .plate-band { width: 17px; font-size: 11px; padding-bottom: 3px; }
.plate-lg .plate-text { font-size: 19px; padding: 0 10px; }

/* ---------- Admin izgled ---------- */

.app-sidebar {
  background: var(--ink);
  width: 226px;
  min-height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1030;
}
.app-sidebar .brand { border-bottom: 1px solid rgba(255,255,255,.09); }
.app-sidebar .brand-title { font-family: var(--font-display); font-size: 22px; color: #fff; text-transform: uppercase; }
.app-sidebar .brand-sub { font-family: var(--font-mono); font-size: 10px; color: #7C90A5; letter-spacing: .08em; }

.app-sidebar .nav-link {
  color: #9DAEBE;
  font-size: 13.5px;
  border-radius: 4px;
  border-left: 2px solid transparent;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.app-sidebar .nav-link:hover { color: #fff; background: rgba(255,255,255,.06); }
.app-sidebar .nav-link.active {
  color: #fff;
  background: rgba(255,255,255,.10);
  border-left-color: var(--amber);
  font-weight: 600;
}

.app-main { margin-left: 226px; }

@media (max-width: 991.98px) {
  .app-sidebar { position: static; width: 100%; min-height: auto; }
  .app-main { margin-left: 0; }
  .app-sidebar .nav { flex-direction: row !important; overflow-x: auto; }
  .app-sidebar .nav-link { white-space: nowrap; border-left: none; border-bottom: 2px solid transparent; }
  .app-sidebar .nav-link.active { border-left: none; border-bottom-color: var(--amber); }
}

.topbar {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 1020;
}

/* ---------- Kartice i tablice ---------- */

.card {
  border: 1px solid var(--line);
  border-radius: 6px;
}
.card-header {
  background: #fff;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 1.05rem;
  font-weight: 600;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 600;
  line-height: 1.05;
}

.table > :not(caption) > * > * { padding: .7rem .75rem; }
.table thead th {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--mute);
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.row-link { cursor: pointer; }
.row-link:hover { background: var(--blue-soft) !important; }
.row-unread { background: #FFFDF7; }

/* ---------- Oznake statusa ---------- */

.badge-soft {
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.badge-soft::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-soft.bg-danger-soft { background: var(--red-soft); color: var(--red); }
.badge-soft.bg-warning-soft { background: var(--amber-soft); color: var(--amber); }
.badge-soft.bg-success-soft { background: var(--green-soft); color: var(--green); }
.badge-soft.bg-secondary-soft { background: #F2F5F8; color: var(--steel); }

/* ---------- Tijek prijave ---------- */

.timeline { list-style: none; padding-left: 0; margin: 0; }
.timeline li { display: flex; gap: 12px; }
.timeline .dot-col { display: flex; flex-direction: column; align-items: center; }
.timeline .dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; background: var(--blue); }
.timeline .dot.admin { background: var(--green); }
.timeline .line { width: 1px; flex: 1; background: var(--line); margin-top: 3px; }
.timeline .content { padding-bottom: 14px; }

/* ---------- Koraci statusa ---------- */

.steps { display: flex; align-items: center; gap: 4px; }
.steps .step { display: flex; flex-direction: column; align-items: center; width: 80px; }
.steps .circle {
  width: 24px; height: 24px; border-radius: 50%;
  background: #DCE3EA; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 13px;
}
.steps .circle.on { background: var(--blue); }
.steps .bar { flex: 1; height: 2px; background: #DCE3EA; }
.steps .bar.on { background: var(--blue); }
.steps .caption { font-size: 10.5px; margin-top: 4px; text-align: center; color: var(--mute); }
.steps .caption.on { color: var(--ink); }

/* ---------- Vozačevo sučelje (mobitel) ---------- */

.driver-wrap { max-width: 460px; margin: 0 auto; background: var(--paper); min-height: 100vh; }
.driver-topbar { background: var(--ink); color: #fff; }
.driver-topbar .title { font-family: var(--font-display); font-size: 18px; text-transform: uppercase; }

.driver-nav {
  position: sticky;
  bottom: 0;
  background: #fff;
  border-top: 1px solid var(--line);
  display: flex;
  z-index: 1020;
}
.driver-nav a {
  flex: 1;
  text-align: center;
  padding: 9px 0 11px;
  color: var(--mute);
  text-decoration: none;
  font-size: 11px;
  position: relative;
}
.driver-nav a.active { color: var(--blue); font-weight: 600; }
.driver-nav a.active::before {
  content: ''; position: absolute; top: 0; left: 25%; right: 25%; height: 2px; background: var(--blue);
}
.driver-nav i { display: block; font-size: 19px; margin-bottom: 2px; }

/* Veliki gumbi — palac, rukavice, parkiralište */
.btn-touch { min-height: 52px; font-size: 15px; font-weight: 600; border-radius: 8px; }

.type-tile {
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: #fff;
  min-height: 78px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  color: var(--steel);
  font-size: 12px;
  width: 100%;
}
.type-tile i { font-size: 20px; }
.type-tile.selected { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); font-weight: 600; }

.photo-thumb {
  width: 78px; height: 78px; border-radius: 6px; border: 1px solid var(--line);
  object-fit: cover; background: #CFD8E0;
}
.photo-add {
  width: 78px; height: 78px; border-radius: 6px; border: 1.5px dashed var(--line);
  background: #fff; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 3px; color: var(--steel); font-size: 10px; cursor: pointer;
}

/* ---------- Sitno ---------- */

.btn-primary { background: var(--blue); border-color: var(--blue); }
.btn-primary:hover { background: #17406F; border-color: #17406F; }
.text-muted-sm { font-size: 12px; color: var(--mute); }
a { text-decoration: none; }
.form-label { font-size: 12px; font-weight: 600; color: var(--steel); margin-bottom: 4px; }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); display: inline-block; }

@media print {
  .app-sidebar, .topbar, .driver-nav, .btn { display: none !important; }
  .app-main { margin-left: 0; }
}
