/* Moj BMW — tamna tema, M akcenti */

:root {
  --bg: #0d0f12;
  --card: #171a1f;
  --card-2: #1e2228;
  --line: #272b32;
  --text: #f2f4f7;
  --text-2: #c4cad3;
  --muted: #8d96a2;
  --m-light: #5bb4e5;
  --m-dark: #1c3f94;
  --m-red: #e1251b;

  --radius: 16px;
  --tap: 44px;
  --tabbar-h: 58px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);

  color-scheme: dark;
}

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

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

a { color: var(--m-light); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { display: block; }

/* ---------- Okvir ekrana ---------- */

.view {
  padding:
    calc(var(--safe-top) + 12px)
    calc(var(--safe-right) + 16px)
    calc(var(--tabbar-h) + var(--safe-bottom) + 24px)
    calc(var(--safe-left) + 16px);
  max-width: 640px;
  margin: 0 auto;
}

.page-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: var(--tap);
  margin-bottom: 16px;
}
.page-head h1 {
  flex: 1;
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.page-head .back { margin-left: -10px; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: var(--tap);
  height: var(--tap);
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-2);
}
.icon-btn:active { background: var(--card-2); }
.icon-btn svg { width: 24px; height: 24px; }

/* ---------- Početna ---------- */

.home-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.home-head .eyebrow {
  margin: 6px 0 2px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.home-head h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.home-head .icon-btn { margin-right: -10px; }

/* Trobojna M traka */
.m-stripe {
  display: flex;
  gap: 3px;
  margin-top: 10px;
}
.m-stripe i {
  width: 22px;
  height: 4px;
  transform: skewX(-24deg);
  border-radius: 1px;
}
.m-stripe i:nth-child(1) { background: var(--m-light); }
.m-stripe i:nth-child(2) { background: var(--m-dark); }
.m-stripe i:nth-child(3) { background: var(--m-red); }

.car-switch {
  display: block;
  width: 100%;
  min-height: var(--tap);
  margin: -8px 0 16px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}

.car-stage { margin: 6px -4px 0; }
.car-svg {
  width: 100%;
  height: auto;
  overflow: visible;
  -webkit-user-select: none;
  user-select: none;
}

/* Tačke delova na crtežu */
.hotspot .hit { fill: transparent; }
.hotspot .glow {
  fill: var(--m-light);
  opacity: 0.25;
  transform-box: fill-box;
  transform-origin: center;
  animation: pulse 2.6s ease-in-out infinite;
  animation-delay: calc(var(--i) * -0.37s);
}
.hotspot .dot {
  fill: var(--m-light);
  stroke: var(--bg);
  stroke-width: 3;
  transition: fill 0.15s;
}
.hotspot:active .dot { fill: #fff; }
.hotspot:focus-visible { outline: none; }
.hotspot:focus-visible .dot { stroke: #fff; }

@keyframes pulse {
  0%, 100% { transform: scale(0.8); opacity: 0.35; }
  50% { transform: scale(1.3); opacity: 0.1; }
}

@media (prefers-reduced-motion: reduce) {
  .hotspot .glow { animation: none; }
}

/* Red čipova */
.chips {
  display: flex;
  gap: 8px;
  margin: 12px -16px 0;
  padding: 0 16px 2px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  height: var(--tap);
  padding: 0 16px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text-2);
  font-size: 15px;
  white-space: nowrap;
}
.chip:active { background: var(--card-2); color: var(--text); }

/* Plutajuće dugme + */
.fab {
  position: fixed;
  right: calc(var(--safe-right) + 16px);
  bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 16px);
  z-index: 11;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 50%;
  background: var(--m-light);
  color: var(--bg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
.fab svg { width: 26px; height: 26px; stroke-width: 2.4; }
.fab:active { transform: scale(0.95); }

.km-now {
  margin: 24px 0 28px;
}
.km-now .label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.km-now .value {
  display: block;
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.km-now .value small {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-2);
  margin-left: 4px;
}

/* ---------- Kartice, liste, sekcije ---------- */

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
}

.section-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
section + section { margin-top: 28px; }
.list + section { margin-top: 24px; }

.list {
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
}
.list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 12px 16px;
}
.list li + li { border-top: 1px solid var(--line); }
.list .sub { color: var(--muted); font-size: 14px; }
.list .val { color: var(--text-2); text-align: right; }

.empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
}
.empty svg { width: 40px; height: 40px; color: var(--m-light); opacity: 0.8; }
.empty strong { color: var(--text); font-size: 17px; }
.empty p { margin: 0; max-width: 28ch; font-size: 15px; }

.list .link-row { padding: 0; }
.list .link-row a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 10px 12px 10px 16px;
  color: var(--text);
}
.list .link-row a:active { background: var(--card-2); }
.list .link-row svg { width: 20px; height: 20px; flex: none; color: var(--muted); }
.list .link-row a.accent { justify-content: flex-start; color: var(--m-light); }
.list .link-row a.accent svg { color: var(--m-light); }
.list .link-row.muted a { color: var(--muted); }
.grow { flex: 1; }

/* Kartice unosa */
.entries { display: grid; gap: 10px; }
.entry {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
}
.entry:active { background: var(--card-2); }
.entry-top { display: flex; align-items: center; gap: 8px; }
.entry-part { font-size: 14px; color: var(--muted); }
.entry-receipt { margin-left: auto; color: var(--muted); }
.entry-receipt svg { width: 18px; height: 18px; }
.entry-title { font-size: 17px; font-weight: 600; }
.entry-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.entry-price { font-size: 16px; font-weight: 700; color: var(--text); white-space: nowrap; }

.tag {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.tag.servis { background: rgba(91, 180, 229, 0.16); color: var(--m-light); }
.tag.tuning { background: rgba(225, 37, 27, 0.18); color: #ff7b72; }
.tag.styling { background: var(--m-dark); color: #e3eaff; }

/* Dugmad */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 20px;
  border: 0;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 600;
}
.btn svg { width: 20px; height: 20px; stroke-width: 2.2; }
.btn-block { display: flex; width: 100%; }
.btn-primary { background: var(--m-light); color: var(--bg); }
.btn-secondary { background: var(--card-2); color: var(--text); }
.btn-danger { background: transparent; color: #ff6b61; border: 1px solid #3a2224; }
.btn:active { opacity: 0.85; }
.add-entry { margin-bottom: 20px; }

/* Forme */
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 14px; font-weight: 600; color: var(--text-2); }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  font-size: 16px;
  -webkit-appearance: none;
  appearance: none;
}
.field input::placeholder { color: #5f6873; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--m-light);
}
.field input[type="date"] { display: flex; align-items: center; }
.form .btn-primary { margin-top: 8px; }
.hint { margin: 0; font-size: 14px; color: var(--muted); text-align: center; }

.field textarea { padding: 12px 14px; line-height: 1.4; resize: none; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.field-row input { min-width: 0; }
.field-hint { margin: -8px 0 0; font-size: 13px; color: var(--muted); }

.select-wrap { position: relative; display: block; }
.select-wrap select { padding-right: 40px; }
.select-wrap::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.suffix-wrap { position: relative; display: block; }
.suffix-wrap input { padding-right: 52px; font-variant-numeric: tabular-nums; }
.suffix {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  color: var(--muted);
  pointer-events: none;
}

/* Segmentirano dugme (tip unosa) */
.segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: var(--card);
}
.seg input, .pill input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
  display: grid;
  place-items: center;
  height: 40px;
  border-radius: 10px;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
}
.seg.servis input:checked + span { background: var(--m-light); color: var(--bg); font-weight: 700; }
.seg.tuning input:checked + span { background: var(--m-red); color: #fff; font-weight: 700; }
.seg.styling input:checked + span { background: var(--m-dark); color: #fff; font-weight: 700; }
.seg input:focus-visible + span, .pill input:focus-visible + span { outline: 2px solid var(--m-light); outline-offset: 2px; }

.total-card {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--card);
}
.total-card .label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.total-card .value { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.total-card small { margin-left: 6px; font-size: 16px; font-weight: 600; color: var(--text-2); }

.suggest { display: flex; flex-wrap: wrap; gap: 8px; margin-top: -6px; }
.suggest-chip {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: transparent;
  color: var(--text-2);
  font-size: 14px;
}

/* Detalji unosa */
.head-action {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 4px;
  font-size: 17px;
  font-weight: 600;
}
.detail-top { display: flex; align-items: center; gap: 8px; }
.detail-title { margin: 10px 0 4px; font-size: 28px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.detail-meta { margin: 0; font-size: 15px; color: var(--muted); }
.note { margin: 0; white-space: pre-wrap; color: var(--text-2); line-height: 1.45; }

/* Istorija */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.search { position: relative; display: block; }
.search svg { position: absolute; left: 14px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--muted); }
.search input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px 0 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  font-size: 16px;
  -webkit-appearance: none;
  appearance: none;
}
.search input:focus { outline: none; border-color: var(--m-light); }

.pills { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; scrollbar-width: none; }
.pills::-webkit-scrollbar { display: none; }
.pill span {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  color: var(--text-2);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}
.pill input:checked + span { background: var(--m-light); border-color: var(--m-light); color: var(--bg); font-weight: 700; }

.filter-row { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.filter-row select {
  width: 100%;
  min-height: var(--tap);
  padding: 0 40px 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  font-size: 15px;
  -webkit-appearance: none;
  appearance: none;
}
.summary { font-size: 14px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.results { margin-top: 20px; }
.section-title.month { margin-top: 22px; }
.results > .section-title.month:first-child { margin-top: 0; }

.ok, .list .val.ok { color: #6fd08c; }
.warn, .list .val.warn { color: #f0b44c; }

/* ---------- Donja traka ---------- */

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 0 var(--safe-right) var(--safe-bottom) var(--safe-left);
  background: rgba(13, 15, 18, 0.92);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  border-top: 1px solid var(--line);
}
.tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: var(--tabbar-h);
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}
.tabbar a svg { width: 24px; height: 24px; }
.tabbar a.active { color: var(--m-light); }

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 16px);
  z-index: 20;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--card-2);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 15px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* ---------- Slika računa ---------- */
.receipt-input { display: none; }
.receipt-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 96px;
  border: 1.5px dashed #3a3f47;
  border-radius: 14px;
  background: transparent;
  color: var(--text-2);
  font-size: 15px;
}
.receipt-empty svg { width: 28px; height: 28px; color: var(--m-light); }
.receipt-empty:active { background: var(--card); }
.receipt-busy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 96px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  color: var(--muted);
  font-size: 15px;
}
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #3a3f47;
  border-top-color: var(--m-light);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.receipt-card {
  display: flex;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}
.receipt-thumb {
  flex: none;
  width: 84px;
  height: 108px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--card-2);
}
.receipt-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.receipt-thumb:active { opacity: 0.85; }
.receipt-thumb.large { width: 120px; height: 150px; border-radius: 12px; }
.receipt-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}
.receipt-info strong { display: block; font-size: 16px; }
.receipt-info span { display: block; margin-top: 2px; font-size: 14px; color: var(--muted); }
.receipt-actions { display: flex; gap: 8px; }
.btn-sm { min-height: var(--tap); padding: 0 16px; border-radius: 12px; font-size: 15px; }
.btn-secondary.btn-sm { border: 1px solid #2f343c; }

/* Prikaz preko celog ekrana */
.viewer-open, .viewer-open body { overflow: hidden; }
.viewer {
  position: fixed;
  inset: 0;
  z-index: 15;
  background: #000;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.viewer.ready { opacity: 1; }
.viewer-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}
.viewer-stage img {
  flex: none;
  max-width: none;
  transform-origin: center;
  will-change: transform;
  -webkit-touch-callout: none;
}
.viewer-head {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: calc(var(--safe-top) + 10px) calc(var(--safe-right) + 12px) 18px calc(var(--safe-left) + 12px);
  background: linear-gradient(rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
  pointer-events: none;
}
.viewer-close {
  flex: none;
  width: var(--tap);
  height: var(--tap);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(40, 44, 52, 0.8);
  color: var(--text);
  pointer-events: auto;
}
.viewer-close svg { width: 22px; height: 22px; stroke-width: 2; }
.viewer-spacer { flex: none; width: var(--tap); }
.viewer-title { min-width: 0; text-align: center; }
.viewer-title strong { display: block; font-size: 16px; }
.viewer-title span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.viewer-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--safe-bottom) + 16px);
  margin: 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  pointer-events: none;
}

/* ---------- Želje ---------- */
.segmented.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.seg.prio-opt span { display: flex; align-items: center; justify-content: center; gap: 6px; }
.seg.prio-opt input:checked + span { background: var(--m-light); color: var(--bg); font-weight: 700; }
.prio-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.prio-dot.p1, .prio.p1::before { background: var(--m-red); }
.prio-dot.p2, .prio.p2::before { background: var(--m-light); }
.prio-dot.p3, .prio.p3::before { background: #6b7480; }
.field-group { display: grid; gap: 6px; }
.field-label { font-size: 14px; font-weight: 600; color: var(--text-2); }
.field > span em { font-style: normal; font-weight: 400; color: var(--muted); }

.wish-total { margin: 4px 0 20px; }
.wish-total .sub { display: block; margin-top: 2px; font-size: 14px; color: var(--muted); }
.wish {
  display: grid;
  gap: 6px;
  padding: 14px 16px 12px;
  border-radius: var(--radius);
  background: var(--card);
}
.wish-main { display: grid; gap: 6px; color: var(--text); }
.wish-main:active { opacity: 0.8; }
.prio {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
}
.prio::before { content: ''; width: 8px; height: 8px; border-radius: 50%; }
.wish-actions { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.wish-price { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.wish-price small { margin-left: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.wish-price .muted { font-size: 14px; font-weight: 500; color: var(--muted); }
.wish-link { margin-left: auto; color: var(--text-2); }
.wish-link + .wish-done { margin-left: 0; }
.wish-done { margin-left: auto; gap: 6px; }
.wish-done svg { width: 18px; height: 18px; color: var(--m-light); }

/* ---------- Gorivo ---------- */
.fuel-avg { margin: 4px 0 18px; }
.fuel-avg .sub, .km-now .sub { display: block; margin-top: 4px; font-size: 13px; line-height: 1.4; color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 24px; }
.tile { padding: 14px 16px; border-radius: var(--radius); background: var(--card); }
.tile .label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.tile .value { display: block; margin-top: 4px; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tile .value small, .fill-amount small { margin-left: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.fills .fill-main { flex: 1; min-width: 0; display: grid; }
.fills .fill-main strong { font-size: 16px; font-weight: 600; }
.fill-amount { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Troškovi ---------- */
.pills.years { margin-top: 0; }
.cost-total { margin: 18px 0 14px; }
.cat-bar { display: flex; gap: 2px; height: 10px; margin-bottom: 10px; border-radius: 5px; overflow: hidden; }
.cats .cat-name { flex: 1; display: flex; align-items: center; gap: 10px; }
.cats .cat-name i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.cats .cat-pct { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.cats .val { min-width: 104px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.chart-card { padding: 14px 16px 10px; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-size: 15px; font-weight: 600; }
.chart-head strong { font-variant-numeric: tabular-nums; }
.month-chart { display: block; width: 100%; height: auto; overflow: visible; }
.month-chart .grid { stroke: var(--line); stroke-width: 1; }
.month-chart .axis { stroke: #3a3f47; stroke-width: 1; }
.month-chart .tick { fill: #5d6570; font-size: 10px; }
.month-chart .mlabel { fill: var(--muted); font-size: 11px; }
.month-chart .mlabel.on { fill: var(--text); font-weight: 700; }
.month-chart .bar { fill: #3a96cc; fill-opacity: 0.55; }
.month-chart .bar.on { fill: var(--m-light); fill-opacity: 1; }
.month-chart .hit { fill: transparent; cursor: pointer; }
.chart-hint { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.all-time { margin-top: 16px; }
.all-time .since { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }
.all-time .value { font-size: 22px; }
.all-time .value small, .total-card .value small { margin-left: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }

/* ---------- Backup ---------- */

.backup-actions { display: grid; gap: 10px; margin-top: 14px; }
.backup-actions .btn-secondary { border: 1px solid #2f343c; cursor: pointer; }
.backup-actions .btn:disabled { opacity: 0.7; }
.backup-actions .spinner { border-color: rgba(13, 15, 18, 0.25); border-top-color: var(--bg); }
.backup-note { margin: 12px 0 0; font-size: 13px; line-height: 1.45; color: var(--muted); }
.backup-note b { color: var(--text-2); font-weight: 600; }
.backup-note.warn { margin-top: 8px; color: #f0b44c; }
