/* =========================================================
   Kovo — design system
   Barve in razmiki so spremenljivke → enostavno prilagajanje.
   ========================================================= */
:root {
  --font: "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", Roboto, system-ui, sans-serif;
  --radius-xl: 28px;
  --radius: 20px;
  --radius-sm: 14px;
  --radius-xs: 10px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.4, .64, 1);
  --sidebar: 252px;

  --accent: #7c5cff;
  --accent-2: #22d3ee;
  --accent-grad: linear-gradient(135deg, #8b5cf6 0%, #6366f1 50%, #22d3ee 100%);
  --pos: #34d399;
  --neg: #fb7185;
  --warn: #fbbf24;
  --info: #60a5fa;
}

:root[data-theme="dark"] {
  --bg: #07070d;
  --bg-2: #0d0d18;
  --text: #f4f4fb;
  --text-2: rgba(244, 244, 251, .66);
  --text-3: rgba(244, 244, 251, .42);
  --glass: rgba(255, 255, 255, .055);
  --glass-2: rgba(255, 255, 255, .085);
  --glass-3: rgba(255, 255, 255, .13);
  --glass-solid: rgba(20, 20, 34, .82);
  --stroke: rgba(255, 255, 255, .09);
  --stroke-2: rgba(255, 255, 255, .16);
  --highlight: rgba(255, 255, 255, .07);
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 20px 50px -20px rgba(0, 0, 0, .6);
  --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, .75);
  --blob-1: #6d28d9;
  --blob-2: #0891b2;
  --blob-3: #be185d;
  --blob-opacity: .38;
  --track: rgba(255, 255, 255, .08);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #eef0f7;
  --bg-2: #ffffff;
  --text: #11121c;
  --text-2: rgba(17, 18, 28, .64);
  --text-3: rgba(17, 18, 28, .42);
  --glass: rgba(255, 255, 255, .55);
  --glass-2: rgba(255, 255, 255, .72);
  --glass-3: rgba(255, 255, 255, .9);
  --glass-solid: rgba(255, 255, 255, .9);
  --stroke: rgba(17, 18, 28, .07);
  --stroke-2: rgba(17, 18, 28, .13);
  --highlight: rgba(255, 255, 255, .9);
  --shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 18px 40px -22px rgba(40, 40, 90, .28);
  --shadow-lg: 0 30px 80px -24px rgba(40, 40, 90, .35);
  --blob-1: #a78bfa;
  --blob-2: #67e8f9;
  --blob-3: #f9a8d4;
  --blob-opacity: .55;
  --track: rgba(17, 18, 28, .07);
  --pos: #059669;
  --neg: #e11d48;
  --warn: #d97706;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01";
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
.num, .money { font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
::selection { background: color-mix(in srgb, var(--accent) 40%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }

/* ---------- ozadje ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(1200px 800px at 80% -10%, var(--bg-2), var(--bg)); }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: var(--blob-opacity); will-change: transform; }
.b1 { width: 52vmax; height: 52vmax; background: var(--blob-1); top: -18vmax; left: -12vmax; animation: float1 28s var(--ease) infinite alternate; }
.b2 { width: 44vmax; height: 44vmax; background: var(--blob-2); bottom: -20vmax; right: -12vmax; animation: float2 34s var(--ease) infinite alternate; }
.b3 { width: 30vmax; height: 30vmax; background: var(--blob-3); top: 40%; left: 45%; opacity: calc(var(--blob-opacity) * .55); animation: float3 40s var(--ease) infinite alternate; }
.grain { position: absolute; inset: 0; opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
@keyframes float1 { to { transform: translate(10vmax, 8vmax) scale(1.1); } }
@keyframes float2 { to { transform: translate(-12vmax, -6vmax) scale(.9); } }
@keyframes float3 { to { transform: translate(-14vmax, 10vmax) scale(1.2); } }

/* ---------- steklo ---------- */
.glass, .card {
  background: var(--glass);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  box-shadow: var(--shadow);
}
.card { border-radius: var(--radius); padding: 20px; position: relative; min-width: 0; }
.card.pad-lg { padding: 24px; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-title { font-size: 13px; font-weight: 600; color: var(--text-2); letter-spacing: .02em; display: flex; align-items: center; gap: 8px; margin: 0; }
.card-title svg { opacity: .8; }

/* ---------- postavitev ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100dvh; }
.sidebar {
  position: sticky; top: 0; height: 100dvh; padding: 22px 14px; display: flex; flex-direction: column; gap: 6px;
  border-right: 1px solid var(--stroke); background: color-mix(in srgb, var(--glass) 60%, transparent);
  backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 6px 10px 22px; }
.logo { width: 38px; height: 38px; border-radius: 12px; background: var(--accent-grad); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 19px; box-shadow: 0 8px 24px -6px rgba(124, 92, 255, .7), inset 0 1px 0 rgba(255,255,255,.35); }
.brand-name { font-weight: 750; font-size: 20px; letter-spacing: -.03em; }
.brand-sub { font-size: 11.5px; color: var(--text-3); margin-top: -2px; }
.nav-link {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: var(--text-2);
  font-weight: 550; font-size: 14.5px; transition: background .2s, color .2s; position: relative;
}
.nav-link:hover { background: var(--glass); color: var(--text); }
.nav-link.active { background: var(--glass-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--stroke); }
.nav-link.active::before { content: ""; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--accent-grad); }
.nav-link.active svg { color: var(--accent); }
.sidebar .spacer { flex: 1; }
.sidebar-add { margin: 8px 4px 14px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; border: 1px solid var(--stroke); background: var(--glass); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: linear-gradient(135deg, #f472b6, #8b5cf6); color: #fff; flex: none; }
.user-chip .meta { min-width: 0; flex: 1; }
.user-chip .meta b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip .meta span { font-size: 11.5px; color: var(--text-3); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.main { min-width: 0; padding: 28px clamp(16px, 3vw, 40px) 120px; max-width: 1380px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(26px, 3.2vw, 34px); letter-spacing: -.035em; line-height: 1.1; margin: 0; font-weight: 750; }
.page-head p { margin: 6px 0 0; color: var(--text-2); }
.head-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.grid { display: grid; gap: 16px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.span-2 { grid-column: span 2; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.mt { margin-top: 16px; } .mt-s { margin-top: 8px; } .mt-l { margin-top: 28px; }
.muted { color: var(--text-2); } .dim { color: var(--text-3); }
.small { font-size: 13px; } .tiny { font-size: 11.5px; }
.pos { color: var(--pos); } .neg { color: var(--neg); } .warn { color: var(--warn); }
.right { text-align: right; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.section-title { font-size: 13px; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); margin: 28px 0 12px; }

/* ---------- mobilna navigacija ---------- */
.tabbar { display: none; }
.fab {
  position: fixed; right: 28px; bottom: 28px; z-index: 40; width: 60px; height: 60px; border-radius: 20px; border: 0;
  background: var(--accent-grad); color: #fff; display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 16px 40px -8px rgba(124, 92, 255, .75), inset 0 1px 0 rgba(255,255,255,.35);
  transition: transform .3s var(--ease-spring), box-shadow .3s;
}
.fab:hover { transform: translateY(-2px) scale(1.04); }
.fab:active { transform: scale(.94); }

@media (max-width: 1100px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main { padding: calc(18px + env(safe-area-inset-top)) 16px calc(130px + env(safe-area-inset-bottom)); }
  .g-2, .g-3 { grid-template-columns: minmax(0, 1fr); }
  .span-2 { grid-column: auto; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 12px; right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 30; height: 66px; border-radius: 24px; padding: 6px;
    background: var(--glass-solid); border: 1px solid var(--stroke-2);
    backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%); box-shadow: var(--shadow-lg);
  }
  .tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10.5px; font-weight: 600; color: var(--text-3); border-radius: 18px; transition: color .2s; }
  .tab.active { color: var(--text); }
  .tab.active svg { color: var(--accent); }
  .tab-plus { display: grid; place-items: center; }
  .tab-plus span { width: 52px; height: 52px; border-radius: 18px; background: var(--accent-grad); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 26px -6px rgba(124, 92, 255, .8); transition: transform .25s var(--ease-spring); }
  .tab-plus:active span { transform: scale(.9); }
  .fab { display: none; }
  .page-head { margin-bottom: 18px; }
  .card { padding: 16px; }
}

/* ---------- gumbi ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 13px;
  border: 1px solid var(--stroke-2); background: var(--glass-2); color: var(--text); font-weight: 600; font-size: 14px; cursor: pointer;
  transition: transform .15s var(--ease), background .2s, border-color .2s, opacity .2s; white-space: nowrap; user-select: none;
}
.btn:hover { background: var(--glass-3); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent-grad); border-color: transparent; color: #fff; box-shadow: 0 10px 26px -10px rgba(124, 92, 255, .9), inset 0 1px 0 rgba(255,255,255,.3); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--glass); color: var(--text); }
.btn.danger { color: var(--neg); }
.btn.danger.solid { background: var(--neg); color: #fff; border-color: transparent; }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 11px; }
.btn.lg { height: 52px; padding: 0 22px; font-size: 15.5px; border-radius: 16px; }
.btn.block { width: 100%; }
.icon-btn { width: 38px; height: 38px; padding: 0; border-radius: 12px; }
.icon-btn.sm { width: 32px; height: 32px; border-radius: 10px; }

/* ---------- obrazci ---------- */
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > label, .label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.input, .select, textarea.input {
  width: 100%; height: 46px; padding: 0 14px; border-radius: 13px; border: 1px solid var(--stroke-2);
  background: var(--glass); outline: none; transition: border-color .2s, box-shadow .2s, background .2s; font-size: 15px;
}
textarea.input { height: auto; min-height: 84px; padding: 12px 14px; resize: vertical; }
.input:focus, .select:focus { border-color: color-mix(in srgb, var(--accent) 70%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); background: var(--glass-2); }
.input::placeholder { color: var(--text-3); }
.select { appearance: none; cursor: pointer; padding-right: 38px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5' stroke-linecap='round'><path d='m6 9 6 6 6-6'/></svg>");
  background-repeat: no-repeat; background-position: right 14px center; }
.select option { background: var(--bg-2); color: var(--text); }
.input.sm, .select.sm { height: 38px; font-size: 14px; border-radius: 11px; }
.input-wrap { position: relative; }
.input-wrap > svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.input-wrap > .input { padding-left: 40px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 520px) { .form-grid { grid-template-columns: 1fr; } }
.hint { font-size: 12.5px; color: var(--text-3); margin: 0; }
.error-text { color: var(--neg); font-size: 13px; min-height: 18px; }

.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 44px; height: 26px; border-radius: 99px; background: var(--track); border: 1px solid var(--stroke-2); position: relative; transition: background .25s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); transition: transform .3s var(--ease-spring); }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(18px); }

/* segmentirani gumbi */
.seg { display: inline-flex; padding: 4px; border-radius: 14px; background: var(--track); border: 1px solid var(--stroke); gap: 2px; position: relative; }
.seg button { border: 0; background: transparent; height: 34px; padding: 0 14px; border-radius: 10px; font-weight: 600; font-size: 13.5px; color: var(--text-2); cursor: pointer; transition: background .2s, color .2s; white-space: nowrap; }
.seg button.on { background: var(--glass-3); color: var(--text); box-shadow: 0 2px 10px -2px rgba(0,0,0,.25), inset 0 0 0 1px var(--stroke); }
.seg.block { display: flex; } .seg.block button { flex: 1; }
.seg.type button.on[data-v="expense"] { color: var(--neg); }
.seg.type button.on[data-v="income"] { color: var(--pos); }
.seg.type button.on[data-v="transfer"] { color: var(--info); }

/* čipi */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 13px; border-radius: 12px; border: 1px solid var(--stroke);
  background: var(--glass); font-size: 13.5px; font-weight: 550; cursor: pointer; transition: all .18s var(--ease); white-space: nowrap; color: var(--text-2);
}
.chip:hover { border-color: var(--stroke-2); color: var(--text); }
.chip.on { background: color-mix(in srgb, var(--c, var(--accent)) 22%, transparent); border-color: color-mix(in srgb, var(--c, var(--accent)) 60%, transparent); color: var(--text); }
.chip .emo { font-size: 15px; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; max-height: 236px; overflow: auto; padding: 2px; margin: -2px; }
.cat-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 10px 6px; min-height: 72px; border-radius: 14px;
  border: 1px solid var(--stroke); background: var(--glass); cursor: pointer; font-size: 11.5px; font-weight: 550; color: var(--text-2); text-align: center; line-height: 1.2;
  transition: transform .15s var(--ease), background .2s, border-color .2s;
}
.cat-tile .emo { font-size: 22px; line-height: 1; }
.cat-tile:active { transform: scale(.95); }
.cat-tile.on { background: color-mix(in srgb, var(--c) 22%, transparent); border-color: color-mix(in srgb, var(--c) 70%, transparent); color: var(--text); }

/* ---------- številke ---------- */
.hero { padding: 26px; border-radius: var(--radius-xl); overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 240px at 0% 0%, rgba(124, 92, 255, .28), transparent 60%), radial-gradient(500px 260px at 100% 120%, rgba(34, 211, 238, .2), transparent 60%); pointer-events: none; }
.hero > * { position: relative; }
.kpi-label { font-size: 13px; color: var(--text-2); font-weight: 550; display: flex; align-items: center; gap: 6px; }
.kpi { font-size: clamp(30px, 4.6vw, 46px); font-weight: 750; letter-spacing: -.045em; line-height: 1.08; margin: 6px 0 2px; }
.kpi .cents { font-size: .5em; opacity: .55; letter-spacing: -.02em; }
.kpi-sm { font-size: 24px; font-weight: 720; letter-spacing: -.035em; margin: 6px 0 4px; }
.delta { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 650; padding: 3px 8px; border-radius: 99px; background: var(--glass-2); }
.delta.up-bad, .delta.down-bad { color: var(--neg); background: color-mix(in srgb, var(--neg) 14%, transparent); }
.delta.up-good, .delta.down-good { color: var(--pos); background: color-mix(in srgb, var(--pos) 14%, transparent); }
.stat-icon { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--glass-2); border: 1px solid var(--stroke); }
.stat-icon.pos { color: var(--pos); background: color-mix(in srgb, var(--pos) 13%, transparent); }
.stat-icon.neg { color: var(--neg); background: color-mix(in srgb, var(--neg) 13%, transparent); }
.stat-icon.acc { color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, transparent); }

.breakdown { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.bd-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px; border-radius: 14px; background: var(--glass); border: 1px solid var(--stroke); min-width: 0; }
.bd-item .ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-size: 16px; background: var(--glass-2); }
.bd-item b { display: block; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.bd-item span { display: block; font-size: 11.5px; color: var(--text-3); }

/* ---------- seznami ---------- */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 11px 6px; border-radius: 14px; cursor: pointer; transition: background .15s; min-width: 0; }
.li:hover { background: var(--glass); }
.li + .li { border-top: 1px solid var(--stroke); }
.li:hover + .li, .li:hover { border-color: transparent; }
.li-icon { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-size: 19px; flex: none; background: color-mix(in srgb, var(--c, #888) 18%, transparent); border: 1px solid color-mix(in srgb, var(--c, #888) 28%, transparent); }
.li-main { flex: 1; min-width: 0; }
.li-title { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-sub { font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; gap: 6px; align-items: center; }
.li-amt { font-weight: 650; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.li-amt small { display: block; font-weight: 500; font-size: 11.5px; color: var(--text-3); }
.day-head { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 6px 6px; font-size: 12.5px; font-weight: 650; color: var(--text-3); text-transform: capitalize; }
.day-head:first-child { padding-top: 4px; }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 650; padding: 2px 7px; border-radius: 99px; background: var(--glass-2); color: var(--text-2); border: 1px solid var(--stroke); }
.pill.cash { color: #10b981; } .pill.card { color: #a78bfa; } .pill.acc { color: var(--accent); }

/* ---------- napredek ---------- */
.progress { height: 8px; border-radius: 99px; background: var(--track); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: inherit; background: var(--c, var(--accent-grad)); transition: width .9s var(--ease); }
.progress.over > i { background: var(--neg); }
.progress.warn > i { background: var(--warn); }
.budget { padding: 12px 0; }
.budget + .budget { border-top: 1px solid var(--stroke); }

/* ---------- grafi ---------- */
.chart { display: block; overflow: visible; max-width: 100%; }
.chart text { fill: var(--text-3); font-size: 11px; font-family: var(--font); }
.chart .grid-line { stroke: var(--stroke); stroke-dasharray: 3 5; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--text-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 4px; margin-right: 6px; vertical-align: -1px; }
.donut-wrap { display: grid; grid-template-columns: 180px 1fr; gap: 22px; align-items: center; }
@media (max-width: 520px) { .donut-wrap { grid-template-columns: 1fr; justify-items: center; } .donut-wrap .list { width: 100%; } }
.donut-center { font-size: 20px; font-weight: 750; letter-spacing: -.03em; }
.bar-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 7px 0; }
.bar-row .progress { grid-column: 1 / -1; height: 6px; }
.tip-box { position: fixed; pointer-events: none; z-index: 100; padding: 8px 11px; border-radius: 11px; font-size: 12.5px; background: var(--glass-solid); border: 1px solid var(--stroke-2); box-shadow: var(--shadow-lg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); opacity: 0; transition: opacity .12s; white-space: pre; line-height: 1.45; }
.tip-box.show { opacity: 1; }

/* ---------- računi ---------- */
.acc-card {
  border-radius: 22px; padding: 20px; min-height: 168px; display: flex; flex-direction: column; justify-content: space-between; cursor: pointer; position: relative; overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s;
}
.acc-card::after { content: ""; position: absolute; inset: 0; background: radial-gradient(420px 180px at 110% -20%, color-mix(in srgb, var(--c) 55%, transparent), transparent 70%); pointer-events: none; }
.acc-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.acc-card > * { position: relative; z-index: 1; }
.acc-card .acc-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 21px; background: color-mix(in srgb, var(--c) 25%, transparent); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); }
.acc-card .bal { font-size: 28px; font-weight: 750; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.acc-card.archived { opacity: .5; }
.acc-actions { display: flex; gap: 6px; }

/* ---------- vpogledi ---------- */
.score-ring { position: relative; width: 150px; height: 150px; flex: none; }
.score-ring .val { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.score-ring .val b { font-size: 40px; font-weight: 800; letter-spacing: -.05em; line-height: 1; display: block; }
.score-ring .val span { font-size: 11.5px; color: var(--text-3); }
.tip-card { display: flex; gap: 14px; padding: 16px; border-radius: 18px; background: var(--glass); border: 1px solid var(--stroke); }
.tip-card .emo { font-size: 26px; line-height: 1; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--glass-2); flex: none; }
.tip-card h4 { margin: 0 0 4px; font-size: 15px; letter-spacing: -.01em; }
.tip-card p { margin: 0; font-size: 13.5px; color: var(--text-2); }
.tip-card .save { margin-top: 8px; font-size: 12.5px; font-weight: 650; color: var(--pos); }
.tip-card.warn .emo { background: color-mix(in srgb, var(--warn) 16%, transparent); }
.tip-card.good .emo { background: color-mix(in srgb, var(--pos) 16%, transparent); }
.safe-num { font-size: clamp(34px, 5vw, 52px); font-weight: 800; letter-spacing: -.05em; line-height: 1; }
.stacked { display: flex; height: 14px; border-radius: 99px; overflow: hidden; background: var(--track); gap: 2px; }
.stacked > i { display: block; height: 100%; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 130px; }
.week .col { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.week .col i { width: 100%; max-width: 34px; border-radius: 9px 9px 4px 4px; background: var(--accent-grad); opacity: .85; min-height: 4px; transition: height .8s var(--ease); }
.week .col.we i { background: linear-gradient(180deg, #f472b6, #fb7185); }
.week .col span { font-size: 11.5px; color: var(--text-3); font-weight: 600; }

/* ---------- prazna stanja ---------- */
.empty { text-align: center; padding: 34px 16px; color: var(--text-2); }
.empty .emo { font-size: 40px; display: block; margin-bottom: 10px; filter: saturate(1.2); }
.empty h3 { margin: 0 0 6px; color: var(--text); font-size: 17px; letter-spacing: -.02em; }
.empty p { margin: 0 auto 16px; max-width: 360px; font-size: 14px; }

/* ---------- sheet / modal ---------- */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(5, 5, 12, .5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; transition: opacity .25s var(--ease); }
.overlay.show { opacity: 1; }
.sheet {
  width: min(560px, 100%); max-height: min(88dvh, 860px); display: flex; flex-direction: column; border-radius: 26px; background: var(--glass-solid);
  border: 1px solid var(--stroke-2); box-shadow: var(--shadow-lg); backdrop-filter: blur(40px) saturate(180%); -webkit-backdrop-filter: blur(40px) saturate(180%);
  transform: translateY(16px) scale(.98); transition: transform .4s var(--ease-spring); overflow: hidden;
}
.sheet.wide { width: min(820px, 100%); }
.overlay.show .sheet { transform: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 6px; gap: 12px; }
.sheet-head h2 { margin: 0; font-size: 19px; letter-spacing: -.025em; }
.sheet-body { padding: 12px 20px 20px; overflow: auto; overscroll-behavior: contain; }
.sheet-foot { padding: 14px 20px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--stroke); display: flex; gap: 10px; justify-content: flex-end; }
.grabber { display: none; }
@media (max-width: 640px) {
  .overlay { align-items: flex-end; padding: 0; }
  .sheet, .sheet.wide { width: 100%; border-radius: 26px 26px 0 0; max-height: 94dvh; transform: translateY(100%); transition: transform .45s var(--ease); }
  .grabber { display: block; width: 40px; height: 5px; border-radius: 9px; background: var(--stroke-2); margin: 8px auto 0; }
  .sheet-foot .btn { flex: 1; }
}

.amount-input { display: flex; align-items: baseline; justify-content: center; gap: 6px; padding: 10px 0 4px; }
.amount-input input { border: 0; outline: 0; background: transparent; text-align: center; font-size: 48px; font-weight: 800; letter-spacing: -.05em; width: 100%; max-width: 320px; field-sizing: content; min-width: 4ch; font-variant-numeric: tabular-nums; }
.amount-input input::placeholder { color: var(--text-3); }
.amount-input .cur { font-size: 28px; font-weight: 700; color: var(--text-3); }
.amount-input.expense input { color: var(--neg); }
.amount-input.income input { color: var(--pos); }

/* ---------- toast ---------- */
#toasts { position: fixed; z-index: 100; left: 50%; transform: translateX(-50%); bottom: 28px; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
@media (max-width: 860px) { #toasts { bottom: calc(92px + env(safe-area-inset-bottom)); } }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 16px; background: var(--glass-solid); border: 1px solid var(--stroke-2); box-shadow: var(--shadow-lg); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); font-size: 14px; font-weight: 550; animation: toastIn .45s var(--ease-spring); max-width: calc(100vw - 32px); }
.toast.out { animation: toastOut .3s var(--ease) forwards; }
.toast .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pos); flex: none; box-shadow: 0 0 12px var(--pos); }
.toast.error .dot { background: var(--neg); box-shadow: 0 0 12px var(--neg); }
.toast button { border: 0; background: transparent; color: var(--accent); font-weight: 700; cursor: pointer; padding: 0 0 0 6px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.95); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px) scale(.97); } }

/* ---------- prijava ---------- */
.auth { min-height: 100dvh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-art h1 { font-size: clamp(36px, 4.4vw, 60px); letter-spacing: -.05em; line-height: 1.02; margin: 0 0 18px; font-weight: 800; max-width: 620px; }
.auth-art h1 em { font-style: normal; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-art p { color: var(--text-2); max-width: 460px; font-size: 16.5px; margin: 0; }
.auth-feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 640px; }
.auth-feats .card { padding: 16px; }
.auth-feats b { display: block; font-size: 14px; margin: 8px 0 2px; }
.auth-feats span { font-size: 12.5px; color: var(--text-3); }
.auth-panel { display: grid; place-items: center; padding: 32px 20px; }
.auth-card { width: min(420px, 100%); padding: 32px; border-radius: 28px; }
.auth-card h2 { margin: 0 0 4px; font-size: 26px; letter-spacing: -.035em; }
.auth-card form { display: flex; flex-direction: column; gap: 14px; margin-top: 22px; }
.strength { display: flex; gap: 4px; margin-top: 2px; }
.strength i { flex: 1; height: 4px; border-radius: 4px; background: var(--track); transition: background .3s; }
@media (max-width: 960px) {
  .auth { grid-template-columns: 1fr; }
  .auth-art { padding: 32px 24px 0; }
  .auth-art .auth-feats, .auth-art .foot { display: none; }
  .auth-art h1 { font-size: 34px; }
  .auth-card { padding: 24px; }
}

/* ---------- tabele ---------- */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
table.t th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); font-weight: 650; padding: 8px 10px; border-bottom: 1px solid var(--stroke); white-space: nowrap; }
table.t td { padding: 10px; border-bottom: 1px solid var(--stroke); white-space: nowrap; }
table.t td.r, table.t th.r { text-align: right; }
table.t tr:last-child td { border-bottom: 0; }
table.t input.input { height: 36px; font-size: 14px; text-align: right; max-width: 140px; }

/* ---------- filtri ---------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar .input-wrap { flex: 1 1 220px; }
.toolbar .select { width: auto; min-width: 140px; flex: 0 1 auto; }
.summary-strip { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13.5px; color: var(--text-2); margin-bottom: 8px; padding: 0 6px; }
.summary-strip b { color: var(--text); font-variant-numeric: tabular-nums; }

.month-switch { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: 14px; background: var(--glass); border: 1px solid var(--stroke); }
.month-switch b { min-width: 140px; text-align: center; font-size: 14px; font-weight: 650; }

/* ---------- animacije vstopa ---------- */
.fade-in > * { animation: rise .55s var(--ease) both; }
.fade-in > *:nth-child(2) { animation-delay: .04s; }
.fade-in > *:nth-child(3) { animation-delay: .08s; }
.fade-in > *:nth-child(4) { animation-delay: .12s; }
.fade-in > *:nth-child(5) { animation-delay: .16s; }
.fade-in > *:nth-child(n+6) { animation-delay: .2s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.skeleton { border-radius: 12px; background: linear-gradient(90deg, var(--glass) 0%, var(--glass-3) 50%, var(--glass) 100%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.boot { min-height: 100dvh; display: grid; place-items: center; }
.boot-logo { width: 64px; height: 64px; border-radius: 20px; background: var(--accent-grad); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 30px; animation: pulse 1.4s var(--ease) infinite; box-shadow: 0 16px 50px -10px rgba(124,92,255,.8); }
@keyframes pulse { 50% { transform: scale(.92); opacity: .7; } }

.update-bar { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 90; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .blob { animation: none; }
}
