/* Levion portal za stanare — vizualni sustav
   Strogi CSP (default-src 'self'): bez vanjskih fontova, slika ni inline stilova. */

:root {
  color-scheme: light;
  --ink: #101924;
  --muted: #565e69;
  --brand: #0d1827;
  --green: #13407a;
  --mint: #dfe8f3;
  --amber: #b4561a;
  --gold: #f3d98c;
  --surface: #ffffffd9;
  --surface-solid: #fff;
  --page: #f2f4f6;
  --border: #dbe0e7;
  --hairline: #1019240f;
  --error: #b2321f;
  --in: #1d539a;
  --in-2: #5f91d3;
  --out: #e08a4a;
  --out-2: #f5bf8a;
  --radius: 1.35rem;
  --radius-sm: .85rem;
  --action: #123c74;
  --action-2: #1c539c;
  --action-ink: #fff;
  --focus: #2b5d9e;
  --field-border: #c3cad3;
  --field-bg: #f7f8fa;
  --wash: #edf0f5;
  --wash-soft: #f3f5f8;
  --selected-ink: #072752;
  --selected-border: #bfcfe3;
  --chart-selection: #d6e0ed66;
  --attention-bg: linear-gradient(150deg, #fff8f0, #fff0e2);
  --attention-border: #f1d6bd;
  --balance-bg: linear-gradient(150deg, #f1f5fb, #e3ebf5);
  --balance-border: #c8d6e8;
  --debt-track: #f2e7da;
  --debt-fill: linear-gradient(90deg, #e3a067, #b4561a);
  --shadow-sm: 0 1px 2px #0d18270a, 0 2px 6px #0d18270a;
  --shadow: 0 1px 2px #0d18270d, 0 8px 24px -6px #0d18271f;
  --shadow-lg: 0 2px 4px #0d18270f, 0 30px 70px -20px #0d182740;
  --blob-1: #8bb0e0;
  --blob-2: #f6dc8e;
  --blob-3: #8cc6f0;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  font: 100%/1.55 Inter, "SF Pro Text", "Segoe UI Variable Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  color: var(--ink);
  background: var(--page);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e8ecf2;
  --muted: #9fa9b5;
  --brand: #080d14;
  --green: #7fa7dc;
  --mint: #1d2b3d;
  --amber: #f6b783;
  --surface: #131922cc;
  --surface-solid: #131922;
  --page: #080c11;
  --border: #ffffff14;
  --hairline: #ffffff0d;
  --error: #ff9f90;
  --in: #4f87d0;
  --in-2: #8eb8f0;
  --out: #eda56b;
  --out-2: #f7cb9c;
  --action: #5f91d3;
  --action-2: #9ec2f0;
  --action-ink: #061323;
  --focus: #9ec2f0;
  --field-border: #ffffff24;
  --field-bg: #0c1219;
  --wash: #ffffff0a;
  --wash-soft: #ffffff07;
  --selected-ink: #c9dcf6;
  --selected-border: #ffffff1f;
  --chart-selection: #ffffff0f;
  --attention-bg: linear-gradient(150deg, #2a1d14cc, #22180fcc);
  --attention-border: #6b4a3266;
  --balance-bg: linear-gradient(150deg, #111e3099, #0e1826aa);
  --balance-border: #2f496a66;
  --debt-track: #3a2b21;
  --debt-fill: linear-gradient(90deg, #f0b886, #d27f42);
  --shadow-sm: 0 1px 2px #0000004d;
  --shadow: 0 1px 2px #00000059, 0 12px 30px -10px #00000080;
  --shadow-lg: 0 2px 6px #00000066, 0 40px 80px -24px #000000b3;
  --blob-1: #1f467a;
  --blob-2: #6b5320;
  --blob-3: #1d4e74;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100dvh; background: var(--page); overflow-x: hidden; }
h1, h2, h3, p, dl { margin: 0; }
h1 { font-size: clamp(1.9rem, 3.8vw, 2.7rem); line-height: 1.04; letter-spacing: -.045em; font-weight: 780; }
h2 { font-size: 1.16rem; line-height: 1.22; letter-spacing: -.022em; font-weight: 730; }
h3 { font-size: 1rem; line-height: 1.3; font-weight: 680; }
a { color: var(--green); text-underline-offset: .18em; }
.subtle, dt, time { color: var(--muted); }
.subtle, time { font-size: .875rem; }
.status { color: var(--error); overflow-wrap: anywhere; font-weight: 600; }
.status:empty { display: none; }
.stack, form { display: grid; gap: 1rem; }
button, input, textarea, select { font: inherit; }
::selection { background: #5f91d355; }

/* ——— Ambient backdrop ——— */
.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.backdrop span {
  position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%;
  background: radial-gradient(circle, var(--blob) 0%, transparent 68%);
  opacity: .5; animation: drift 26s var(--ease) infinite alternate;
}
.backdrop span:nth-child(1) { --blob: var(--blob-1); top: -26vmax; left: -20vmax; }
.backdrop span:nth-child(2) { --blob: var(--blob-2); top: 25vh; right: -28vmax; animation-delay: -9s; opacity: .38; }
.backdrop span:nth-child(3) { --blob: var(--blob-3); bottom: -34vmax; left: 20vw; animation-delay: -17s; opacity: .32; }
:root[data-theme="dark"] .backdrop span { opacity: .3; }
@keyframes drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(6vmax, 4vmax, 0) scale(1.12); }
  100% { transform: translate3d(-4vmax, 7vmax, 0) scale(.94); }
}

/* ——— Controls ——— */
button, .link-button {
  min-height: 2.75rem; border: 1px solid transparent; border-radius: .8rem; padding: .5rem .95rem;
  font-size: .9rem; font-weight: 680; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  transition: transform .18s var(--ease), background-color .18s, box-shadow .25s var(--ease), border-color .18s, color .18s;
  -webkit-tap-highlight-color: transparent;
}
button:active:not(:disabled), .link-button:active { transform: scale(.97); }
.link-button { text-decoration: none; white-space: nowrap; }
:where(button, input, textarea, select, summary, a):focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
button:disabled { opacity: .6; cursor: wait; }
.glyph { display: inline-grid; width: 1.15em; height: 1.15em; flex: 0 0 auto; }
.glyph svg { width: 100%; height: 100%; }

.primary {
  position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(135deg, var(--action), var(--action-2)); color: var(--action-ink);
  box-shadow: 0 1px 0 #ffffff33 inset, 0 8px 20px -8px #123c74aa;
}
.primary::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, #ffffff55 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .7s var(--ease);
}
.primary:hover { box-shadow: 0 1px 0 #ffffff33 inset, 0 14px 28px -10px #123c74cc; transform: translateY(-1px); }
.primary:hover::after { transform: translateX(120%); }
.primary .glyph { transition: transform .25s var(--ease); }
.primary:hover .glyph { transform: translateX(3px); }
.secondary {
  background: var(--surface-solid); border-color: var(--border); color: var(--green); box-shadow: var(--shadow-sm);
}
.secondary:hover { background: var(--mint); border-color: var(--selected-border); }
.secondary .glyph { transition: transform .25s var(--ease); }
.secondary:hover .glyph { transform: translateX(3px); }
.quiet { background: #ffffff14; color: #fff; border-color: #ffffff2e; }
.quiet:hover { background: #ffffff26; }
.icon-button { width: 2.75rem; padding: 0; background: #ffffff14; color: #fff; border-color: #ffffff2e; border-radius: 50%; }
.icon-button:hover { background: #ffffff26; transform: rotate(-15deg); }
.icon-button .glyph { width: 1.2rem; height: 1.2rem; }
.text-link { background: none; color: var(--green); padding-inline: .2rem; min-height: 2.2rem; justify-self: start; }
.text-link:hover { text-decoration: underline; text-underline-offset: .2em; }

input, textarea, select {
  padding: .7rem .85rem; width: 100%; border: 1px solid var(--field-border); border-radius: .8rem;
  background: var(--field-bg); color: var(--ink);
  transition: border-color .18s, box-shadow .2s, background-color .18s;
}
input:hover, textarea:hover { border-color: var(--focus); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--focus); background: var(--surface-solid); box-shadow: 0 0 0 4px #2b5d9e26; }
textarea { resize: vertical; }
label { display: grid; gap: .35rem; font-weight: 640; font-size: .9rem; }

.panel {
  position: relative; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius);
  padding: clamp(1rem, 2.4vw, 1.5rem); min-width: 0; align-content: start;
  box-shadow: var(--shadow); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
}
.panel > h2:first-child, .section-title h2 { display: flex; align-items: center; gap: .55rem; }
.panel > h2:first-child::before {
  content: ""; width: .5rem; height: 1.1rem; border-radius: 1rem; flex: 0 0 auto;
  background: linear-gradient(180deg, var(--in-2), var(--action));
}

/* ——— Header ——— */
.site-header {
  position: sticky; top: 0; z-index: 30; color: #fff;
  background: linear-gradient(90deg, #0b1624e6, #102036e6);
  backdrop-filter: blur(16px) saturate(1.5); -webkit-backdrop-filter: blur(16px) saturate(1.5);
  border-bottom: 1px solid #ffffff14;
  padding-top: env(safe-area-inset-top, 0px);
}
:root[data-theme="dark"] .site-header { background: #070c12cc; }
.site-bar {
  max-width: 92rem; margin: auto; min-height: 4.1rem; padding: .6rem clamp(1rem, 3vw, 2.4rem);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.site-actions { display: flex; align-items: center; gap: .5rem; }
.site-actions button { white-space: nowrap; }
.brand { display: flex; align-items: center; gap: .7rem; font-size: 1.18rem; font-weight: 780; line-height: 1.12; letter-spacing: -.03em; }
.brand img { border-radius: .7rem; box-shadow: 0 0 0 1px #ffffff26, 0 6px 16px -4px #000a; }
.brand small { display: block; margin-top: .12rem; color: #b9c6d8; font-size: .74rem; font-weight: 520; letter-spacing: .01em; }

.shell { max-width: 92rem; margin: auto; padding: clamp(1rem, 3vw, 2.4rem); }
.boot { display: flex; align-items: center; justify-content: center; gap: .8rem; min-height: 60vh; color: var(--muted); font-weight: 600; }
.boot-ring, .skeleton-ring {
  width: 1.6rem; height: 1.6rem; border-radius: 50%;
  border: 3px solid var(--mint); border-top-color: var(--green); animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(1turn); } }

/* ——— Signed-in layout ——— */
.shell.signed-in { display: grid; grid-template-columns: minmax(13rem, 15rem) minmax(0, 1fr); gap: clamp(1.05rem, 2.4vw, 2.2rem); align-items: start; }
.sidebar {
  position: sticky; top: calc(5.4rem + env(safe-area-inset-top, 0px)); display: flex; flex-direction: column; gap: 1rem;
  min-width: 0; min-height: clamp(28rem, calc(100dvh - 8rem), 46rem);
  padding: .75rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  box-shadow: var(--shadow); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
}
.property, .account { display: flex; align-items: center; gap: .7rem; padding: .7rem; overflow-wrap: anywhere; }
.property {
  align-items: start; border-radius: 1rem; color: #fff;
  background: linear-gradient(135deg, #0f223b, #193c69); box-shadow: 0 10px 24px -14px #0d1827;
}
.property .icon { color: var(--gold); margin-top: .15rem; }
.property-name, .account div { display: grid; gap: .13rem; }
.property-name strong, .account strong { line-height: 1.24; font-size: .88rem; }
.property-name span { color: #c3d0e2; font-size: .75rem; }
.account div span { color: var(--muted); font-size: .75rem; }
.account { margin-top: auto; border-top: 1px solid var(--border); padding-top: .9rem; }
.avatar {
  display: grid; place-items: center; flex: 0 0 2.3rem; height: 2.3rem; border-radius: 50%;
  background: linear-gradient(135deg, var(--in-2), var(--action)); color: #fff; font-weight: 780; font-size: .78rem;
  text-transform: uppercase; box-shadow: 0 0 0 3px var(--surface-solid), 0 0 0 4px var(--selected-border);
}
.tabs { display: grid; gap: .2rem; }
.nav-link {
  position: relative; justify-content: flex-start; gap: .7rem; width: 100%; padding-inline: .75rem;
  color: var(--muted); background: transparent; text-align: left; min-width: 0; white-space: nowrap; font-weight: 620;
}
.nav-link:hover { background: var(--wash); color: var(--ink); }
.nav-link:hover .icon { transform: scale(1.12); }
.nav-link .icon { transition: transform .25s var(--spring); }
.nav-link[aria-current="page"] { color: var(--selected-ink); background: var(--mint); border-color: var(--selected-border); font-weight: 720; }
.nav-link[aria-current="page"]::before {
  content: ""; position: absolute; left: -.76rem; top: 22%; bottom: 22%; width: 4px; border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, var(--in-2), var(--action));
}
.nav-short { display: none; }
.icon, .metric-icon, .document-icon {
  display: inline-block; flex: 0 0 1.05rem; width: 1.05rem; height: 1.05rem; background: currentColor;
  mask: var(--icon) center / contain no-repeat; -webkit-mask: var(--icon) center / contain no-repeat;
}
.icon-finance { --icon: url("/icons/finance"); }
.icon-building { --icon: url("/icons/building"); }
.icon-invoice_view { --icon: url("/icons/invoice_view"); }
.icon-contract { --icon: url("/icons/contract"); }
.icon-balance { --icon: url("/icons/balance"); }
.icon-email { --icon: url("/icons/email"); }
.icon-bank { --icon: url("/icons/bank"); }
.icon-pdf { --icon: url("/icons/pdf"); }
.icon-notice { --icon: url("/icons/notice"); }
.icon-chat { --icon: url("/icons/chat"); }
.nav-badge {
  display: inline-grid; place-items: center; min-width: 1.4rem; height: 1.4rem; margin-left: auto;
  padding: 0 .3rem; border-radius: 1rem; color: #fff; background: linear-gradient(135deg, #f08a4b, #d4552a);
  font-size: .72rem; font-weight: 800; font-variant-numeric: tabular-nums;
  box-shadow: 0 4px 10px -3px #d4552a99; animation: pop .5s var(--spring), pulse 2.6s 1s ease-in-out infinite;
}
@keyframes pop { from { transform: scale(0); } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 #f08a4b66; } 50% { box-shadow: 0 0 0 6px #f08a4b00; } }

.workspace-content { display: grid; gap: 1.1rem; min-width: 0; }
.page-heading, .section-title, .entry-heading {
  display: flex; justify-content: space-between; align-items: center; gap: .65rem; flex-wrap: wrap;
}
.page-heading { align-items: end; padding: .1rem 0 .2rem; }
.page-heading h1 {
  background: linear-gradient(100deg, var(--ink) 30%, var(--green)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.page-address { color: var(--muted); font-size: .82rem; font-weight: 640; margin-bottom: .3rem; letter-spacing: .01em; }
.as-of {
  color: var(--muted); background: var(--surface); border: 1px solid var(--border); padding: .3rem .8rem; border-radius: 2rem;
  font-size: .8rem; font-weight: 600; white-space: nowrap; box-shadow: var(--shadow-sm);
}
.view-body { min-width: 0; }
.view-body:focus { outline: none; }
.view-body > * { animation: rise .55s var(--ease) both; }
.dashboard > * { animation: rise .6s var(--ease) both; }
.dashboard > :nth-child(2) { animation-delay: .07s; }
.dashboard > :nth-child(3) { animation-delay: .14s; }
.dashboard-metrics > .metric { animation: rise .6s var(--ease) both; }
.dashboard-metrics > .metric:nth-child(2) { animation-delay: .12s; }
.dashboard-metrics > .metric:nth-child(3) { animation-delay: .18s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.activation-hint {
  display: flex; align-items: center; gap: .6rem; background: var(--balance-bg); border: 1px solid var(--balance-border);
  padding: .8rem 1rem; border-radius: var(--radius-sm); font-weight: 600; animation: rise .5s var(--ease) both;
}
.eyebrow { font-size: .74rem; font-weight: 760; letter-spacing: .14em; text-transform: uppercase; color: var(--green); }

/* ——— Hero ——— */
.dashboard-hero, .auth-visual {
  position: relative; overflow: hidden; isolation: isolate; color: #fff; border-radius: calc(var(--radius) + .2rem);
  background:
    radial-gradient(120% 140% at 0% 0%, #1f467acc 0%, transparent 55%),
    radial-gradient(90% 120% at 100% 100%, #c9a2451f 0%, transparent 60%),
    linear-gradient(125deg, #0a1523 0%, #0f223a 45%, #173760 100%);
  box-shadow: var(--shadow-lg);
}
.dashboard-hero::before, .auth-visual::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image: linear-gradient(#ffffff0d 1px, transparent 1px), linear-gradient(90deg, #ffffff0d 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse at 70% 30%, #000 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000 10%, transparent 70%);
}
.dashboard-hero::after, .auth-visual::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none; width: 26rem; height: 26rem; border-radius: 50%;
  right: -8rem; top: -12rem; background: radial-gradient(circle, #5f91d355, transparent 65%);
  animation: glow 9s ease-in-out infinite alternate;
}
@keyframes glow { to { transform: translate(-4rem, 3rem) scale(1.2); opacity: .7; } }
.dashboard-hero {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(16rem, 1fr); align-items: stretch; gap: clamp(1rem, 3vw, 2rem);
  padding: clamp(1.3rem, 3.4vw, 2.3rem);
}
.dashboard-hero .eyebrow { color: var(--gold); }
.hero-content { display: grid; gap: .65rem; justify-items: start; align-content: center; min-width: 0; }
.hero-content h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.6rem); line-height: 1.06; letter-spacing: -.045em; font-weight: 800; overflow-wrap: anywhere;
  background: linear-gradient(100deg, #fff 40%, #c9dbf3 70%, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-content > p:not(.eyebrow, .status-pill) { color: #cfdae8; font-size: .96rem; max-width: 34rem; }
.status-pill {
  display: inline-flex; align-items: center; gap: .45rem; padding: .38rem .85rem .38rem .55rem; border-radius: 2rem;
  font-size: .84rem; font-weight: 700; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  animation: rise .6s .25s var(--ease) both;
}
.status-pill .glyph { display: grid; place-items: center; width: 1.35rem; height: 1.35rem; padding: .2rem; border-radius: 50%; }
.status-pill.ok { background: #5f91d326; border: 1px solid #8eb8f04d; color: #c9ddf8; }
.status-pill.ok .glyph { background: #5f91d3; color: #061323; animation: pop .6s .6s var(--spring) both; }
.status-pill.warn { background: #f0a06a26; border: 1px solid #f5bf8a59; color: #ffe1c7; }
.status-pill.warn .glyph { background: #f0a06a; color: #3b1a06; }
.status-pill.info { background: #ffffff1a; border: 1px solid #ffffff2e; color: #e6ecf3; }
.status-pill.info .glyph { background: var(--gold); color: #3a2c06; }
.hero-action {
  margin-top: .35rem; color: #0f1b2a; font-weight: 760;
  background: linear-gradient(135deg, #fbe9b0, var(--gold)); box-shadow: 0 10px 26px -10px #f3d98ccc;
}
.hero-action:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -12px #f3d98c; }
.hero-action .glyph { transition: transform .25s var(--ease); }
.hero-action:hover .glyph { transform: translateX(4px); }
.hero-side { position: relative; display: grid; align-content: end; min-height: 13rem; }
.building-art { display: block; pointer-events: none; }
.building-art svg { width: 100%; height: 100%; display: block; }
.hero-art { position: absolute; right: -.5rem; bottom: 4.6rem; width: min(100%, 19rem); opacity: .85; }
.hero-source {
  position: relative; display: grid; gap: .15rem; padding: 1rem 1.15rem; border-radius: 1.05rem;
  background: linear-gradient(150deg, #ffffff24, #ffffff0d); border: 1px solid #ffffff33;
  backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 1px 0 #ffffff26 inset, 0 20px 40px -20px #000c; font-variant-numeric: tabular-nums;
}
.hero-label { font-size: .74rem; font-weight: 760; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.hero-balance { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 800; letter-spacing: -.04em; line-height: 1.12; }
.hero-note { color: #cfdae8; font-size: .78rem; }
.win { fill: #ffffff1f; }
.win.lit { fill: #f6dc8e; animation: twinkle 5s ease-in-out infinite; }
.win.lit-1 { animation-delay: -1.6s; animation-duration: 6.5s; }
.win.lit-2 { animation-delay: -3.3s; animation-duration: 4.2s; }
@keyframes twinkle { 0%, 100% { fill-opacity: .95; } 45% { fill-opacity: .35; } 55% { fill-opacity: .9; } }
.art-moon { animation: breathe 6s ease-in-out infinite; transform-origin: 282px 46px; }
@keyframes breathe { 50% { transform: scale(1.18); opacity: .7; } }
.art-tree { animation: sway 7s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center bottom; }
@keyframes sway { to { transform: translateY(-2px) scale(1.04); } }

/* ——— Auth ——— */
.auth-layout {
  display: grid; grid-template-columns: minmax(18rem, 1.1fr) minmax(0, .9fr);
  max-width: 64rem; margin: clamp(.6rem, 6vw, 4.5rem) auto; min-height: 34rem; border: 1px solid var(--border);
  background: var(--surface); border-radius: 1.8rem; overflow: hidden; box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4);
  animation: rise .7s var(--ease) both;
}
.auth-visual { display: grid; align-content: end; gap: .8rem; padding: clamp(1.4rem, 4vw, 2.6rem); border-radius: 0; box-shadow: none; }
.auth-visual .eyebrow { color: var(--gold); }
.auth-art { width: min(100%, 22rem); margin: 0 0 .6rem auto; animation: float 7s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }
.auth-visual h2 {
  font-size: clamp(1.9rem, 4.2vw, 3.1rem); line-height: 1.02; letter-spacing: -.055em; font-weight: 820; white-space: pre-line;
  background: linear-gradient(100deg, #fff 45%, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.auth-visual > p:not(.eyebrow) { color: #cfdae8; max-width: 26rem; }
.auth-highlights { display: flex; flex-wrap: wrap; gap: .45rem; margin: .4rem 0 0; padding: 0; list-style: none; }
.auth-highlights li {
  display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .7rem; border-radius: 2rem; font-size: .8rem; font-weight: 640;
  background: #ffffff17; border: 1px solid #ffffff26; color: #eaf0f7;
}
.auth-highlights .glyph { color: var(--gold); }
.auth {
  padding: clamp(1.3rem, 4vw, 3rem); border: 0; box-shadow: none; align-content: center; gap: 1.1rem;
  background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; border-radius: 0;
}
.auth h1 { font-size: clamp(1.8rem, 3.8vw, 2.3rem); }
.auth form { gap: 1.05rem; margin-top: .4rem; }
.submit-wide { width: 100%; min-height: 3.1rem; font-size: .98rem; }
.password-wrap { position: relative; display: block; }
.password-wrap input { padding-right: 3rem; }
.reveal {
  position: absolute; right: .3rem; top: 50%; translate: 0 -50%; min-height: 0; width: 2.3rem; height: 2.3rem; padding: 0;
  border-radius: .6rem; color: var(--muted); background: transparent;
}
.reveal:hover { color: var(--green); background: var(--wash); }
.reveal[aria-pressed="true"] { color: var(--green); }

/* ——— Metrics ——— */
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: .8rem; }
.dashboard-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric {
  position: relative; overflow: hidden; display: grid; align-content: start; gap: .35rem; min-width: 0;
  background: var(--surface); border: 1px solid var(--border); padding: clamp(.85rem, 1.6vw, 1.15rem);
  border-radius: 1.1rem; box-shadow: var(--shadow); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.metric:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.metric::after {
  content: ""; position: absolute; right: -2.5rem; top: -2.5rem; width: 6rem; height: 6rem; border-radius: 50%;
  background: radial-gradient(circle, #5f91d32e, transparent 70%); pointer-events: none;
}
.metric dt { display: flex; align-items: center; gap: .5rem; font-size: .8rem; font-weight: 680; }
.metric-icon {
  color: var(--green); flex-basis: 1.9rem; width: 1.9rem; height: 1.9rem; border-radius: .6rem;
  background: var(--mint); mask: none; -webkit-mask: none; position: relative;
}
.metric-icon::before {
  content: ""; position: absolute; inset: .45rem; background: currentColor;
  mask: var(--icon) center / contain no-repeat; -webkit-mask: var(--icon) center / contain no-repeat;
}
.metric dd { margin: 0; }
.metric-value { font-size: clamp(1.25rem, 2.2vw, 1.8rem); font-weight: 800; letter-spacing: -.045em; font-variant-numeric: tabular-nums; line-height: 1.12; overflow-wrap: anywhere; }
.metric-note { color: var(--muted); font-size: .76rem; line-height: 1.35; }
.attention-metric { background: var(--attention-bg); border-color: var(--attention-border); }
.attention-metric::after { background: radial-gradient(circle, #f0a06a33, transparent 70%); }
.attention-metric .metric-value { color: var(--amber); }
.attention-metric .metric-icon { color: var(--amber); background: #f0a06a26; }
.balance-metric { background: var(--balance-bg); border-color: var(--balance-border); }
.calm-metric .metric-value { color: var(--green); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(15rem, 1fr); gap: 1rem; align-items: start; }

/* ——— Bank chart ——— */
.bank-card { gap: .9rem; }
.bank-card h2 { margin-bottom: .18rem; }
.segments { display: inline-flex; gap: .15rem; padding: .2rem; background: var(--wash); border: 1px solid var(--border); border-radius: .8rem; }
.segments button { min-height: 2rem; border-radius: .6rem; padding: .18rem .65rem; color: var(--muted); background: transparent; font-size: .78rem; }
.segments button:hover { color: var(--green); }
.segments button[aria-pressed="true"] { color: var(--selected-ink); background: var(--surface-solid); border-color: var(--border); box-shadow: var(--shadow-sm); }
.chart-legend, .chart-reading { display: flex; gap: .36rem 1rem; flex-wrap: wrap; align-items: center; font-size: .83rem; }
.chart-legend { color: var(--muted); }
.in-key::before, .out-key::before { content: ""; display: inline-block; width: .6rem; height: .6rem; margin-right: .38rem; border-radius: 50%; }
.in-key::before { background: linear-gradient(135deg, var(--in-2), var(--in)); }
.out-key::before { background: linear-gradient(135deg, var(--out-2), var(--out)); }
.chart-reading {
  min-height: 2.9rem; padding: .65rem .85rem; background: var(--wash-soft); border: 1px solid var(--hairline);
  border-radius: .9rem; font-variant-numeric: tabular-nums;
}
.chart-reading strong { text-transform: capitalize; }
.chart-reading strong, .net-key { font-weight: 750; }
.chart { display: grid; grid-template-columns: 2.3rem minmax(0,1fr); min-width: 0; gap: .3rem; }
.chart-scale {
  display: flex; flex-direction: column; justify-content: space-between; align-items: end;
  font-size: .72rem; color: var(--muted); height: 12.2rem; margin-top: -.38rem; padding-right: .18rem; font-variant-numeric: tabular-nums;
}
.chart-columns {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: max(2px, .3vw);
  background:
    linear-gradient(var(--border), var(--border)) 0 0 / 100% 1px no-repeat,
    linear-gradient(var(--border), var(--border)) 0 5.9rem / 100% 1px no-repeat,
    linear-gradient(var(--border), var(--border)) 0 11.8rem / 100% 1px no-repeat;
}
.chart-month {
  display: grid; grid-template-rows: 11.8rem 1.8rem; grid-template-columns: minmax(0, 1fr); justify-content: stretch; justify-items: center;
  min-width: 0; min-height: 0; border-radius: .6rem;
  color: var(--muted); background: transparent; border: 0; padding: 0; gap: 0;
}
.chart-month:hover, .chart-month[aria-pressed="true"] { background: var(--chart-selection); color: var(--ink); }
.chart-month:active:not(:disabled) { transform: none; }
.chart-month[aria-pressed="true"] .chart-label { font-weight: 760; color: var(--green); }
.bar-plot { display: flex; gap: 10%; align-items: end; justify-content: center; justify-self: stretch; height: 100%; padding-inline: 16%; }
.bar {
  display: block; flex: 1 1 0; max-width: 1.5rem; min-height: 2px; border-radius: .45rem .45rem .15rem .15rem;
  transform-origin: bottom; animation: grow .9s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms);
  transition: filter .2s;
}
.in-bar { background: linear-gradient(180deg, var(--in-2), var(--in)); box-shadow: 0 6px 14px -6px var(--in); }
.out-bar { background: linear-gradient(180deg, var(--out-2), var(--out)); box-shadow: 0 6px 14px -6px var(--out); }
.chart-month:hover .bar, .chart-month[aria-pressed="true"] .bar { filter: brightness(1.08) saturate(1.15); }
@keyframes grow { from { transform: scaleY(0); } }
.chart-label { align-self: center; font-size: .72rem; white-space: nowrap; text-transform: capitalize; }
.chart-details { font-size: .84rem; }
.empty-chart { color: var(--muted); border: 1.5px dashed var(--border); border-radius: 1rem; padding: 1.4rem; text-align: center; }

/* ——— Obligations & aging ——— */
.obligation-bar { display: flex; gap: 3px; height: .9rem; overflow: hidden; background: var(--wash); border-radius: 999px; padding: 2px; }
.obligation-segment { border-radius: 999px; transform-origin: left; animation: stretch 1s .2s var(--ease) both; }
.obligation-segment.overdue { background: linear-gradient(90deg, #e3a067, #c05f2c); }
.obligation-segment.upcoming { background: linear-gradient(90deg, #5f91d3, #1d539a); }
.obligation-segment.undated { background: linear-gradient(90deg, #9fb3c0, #657c88); }
.obligation-segment.carried { background: linear-gradient(90deg, #dccb87, #a19051); }
@keyframes stretch { from { transform: scaleX(0); } }
.breakdown { display: grid; gap: .45rem; }
.breakdown div { display: flex; justify-content: space-between; gap: .45rem; align-items: center; padding: .3rem 0; border-bottom: 1px dashed var(--border); }
.breakdown div:last-child { border-bottom: 0; }
.breakdown dt { font-size: .84rem; }
.breakdown dd { margin: 0; font-size: .9rem; font-weight: 760; white-space: nowrap; font-variant-numeric: tabular-nums; }
.aging-plot { display: grid; gap: .7rem; }
.aging-item { display: grid; grid-template-columns: 5.3rem 1fr 1.5rem; gap: .5rem; align-items: center; font-size: .82rem; }
.aging-item strong { text-align: right; font-variant-numeric: tabular-nums; }
.aging-track { height: .6rem; background: var(--debt-track); border-radius: 999px; overflow: hidden; }
.aging-fill { height: 100%; background: var(--debt-fill); border-radius: inherit; transform-origin: left; animation: stretch 1s var(--ease) both; }

/* ——— Lists, tables ——— */
.entries { padding: 0; margin: 0; list-style: none; }
.entries > li + li { border-top: 1px solid var(--border); }
.entries > li { padding: .85rem 0; }
.entries > li:first-child { padding-top: .15rem; }
.entries > li:last-child { padding-bottom: .15rem; }
.notice-heading { display: grid; gap: .16rem; }
.notice-heading time { font-size: .74rem; font-weight: 640; letter-spacing: .02em; }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: .34rem; font-size: .93rem; line-height: 1.6; }
.payment-rows { list-style: none; padding: .35rem 0 0; margin: 0; display: grid; gap: .3rem; }
.payment-rows li { display: flex; gap: 1rem; justify-content: space-between; flex-wrap: wrap; font-size: .9rem; font-variant-numeric: tabular-nums; }
.entry-heading strong { font-variant-numeric: tabular-nums; color: var(--green); }
.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: 1rem; background: var(--surface-solid); }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: .75rem .9rem; border-bottom: 1px solid var(--border); vertical-align: top; }
tbody tr { transition: background-color .15s; }
tbody tr:hover { background: var(--wash-soft); }
tbody tr:last-child td { border-bottom: 0; }
th { color: var(--muted); font-size: .76rem; font-weight: 720; text-transform: uppercase; letter-spacing: .06em; background: var(--wash-soft); }
td.money, th.money { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
td.money { font-weight: 640; }
details summary { cursor: pointer; color: var(--green); font-weight: 680; list-style: none; display: inline-flex; align-items: center; gap: .3rem; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: ""; width: .45rem; height: .45rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s var(--ease); }
details[open] summary::after { transform: rotate(-135deg) translate(-2px, 0); }
.details-body { display: grid; gap: .35rem; padding-top: .5rem; font-size: .86rem; animation: rise .3s var(--ease) both; }
.outstanding { color: var(--error); font-weight: 750; }
.copy-row { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.copy-label { color: var(--muted); font-size: .78rem; }
.copy-row code { font: 650 .82rem/1.3 ui-monospace, "SF Mono", "Cascadia Mono", Menlo, monospace; background: var(--wash); padding: .18rem .45rem; border-radius: .4rem; }
.copy-button { min-height: 1.9rem; padding: .15rem .55rem; font-size: .74rem; color: var(--green); background: var(--mint); border-color: var(--selected-border); }
.copy-button:hover { filter: brightness(.97); }
.copy-button.copied { color: #fff; background: var(--in); border-color: transparent; }
.document-list { display: grid; gap: .6rem; }
.entries.document-list > li { display: flex; align-items: center; gap: .9rem; padding: .85rem; border: 1px solid var(--border); border-radius: 1rem; background: var(--surface-solid); transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .2s; }
.entries.document-list > li + li { border-top: 1px solid var(--border); }
.entries.document-list > li:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--selected-border); }
.document-icon { position: relative; color: #fff; flex: 0 0 2.6rem; width: 2.6rem; height: 2.6rem; border-radius: .8rem; mask: none; -webkit-mask: none; background: linear-gradient(135deg, #f08a4b, #c9452a); box-shadow: 0 8px 16px -8px #c9452a; }
.document-icon::before { content: ""; position: absolute; inset: .62rem; background: currentColor; mask: var(--icon) center / contain no-repeat; -webkit-mask: var(--icon) center / contain no-repeat; }
.document-name { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.document-name .subtle { font-size: .8rem; }
.link-button[aria-busy="true"] { opacity: .7; cursor: progress; }

/* ——— Skeleton ——— */
.skeleton-group { display: grid; gap: .6rem; }
.skeleton {
  display: block; height: .95rem; border-radius: .5rem;
  background: linear-gradient(90deg, var(--wash) 25%, var(--mint) 50%, var(--wash) 75%) 0 0 / 300% 100%;
  animation: shimmer 1.4s linear infinite;
}
.skeleton:nth-child(1) { width: 92%; }
.skeleton:nth-child(2) { width: 76%; }
.skeleton:nth-child(3) { width: 84%; }
.skeleton:nth-child(4) { width: 58%; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -50% 0; } }

/* ——— Feeds (obavijesti, razgovor) ——— */
.feed-compose {
  padding: .85rem 1rem; border: 1px solid var(--border); border-radius: 1rem; background: var(--wash-soft);
}
.feed-compose summary { min-height: 2rem; }
.feed-compose form { margin-top: .8rem; }
.feed-compose button[type="submit"], .chat-composer button { justify-self: start; }
.feed-compose select { justify-self: start; max-width: 100%; padding: .45rem .6rem; border-radius: .6rem; width: auto; }
.feed-confirmation { color: var(--green); font-size: .89rem; font-weight: 640; animation: rise .4s var(--ease) both; }
.feed-confirmation:empty { display: none; }
.notice-stream, .community-stream { display: grid; gap: .75rem; }
.entries > .notice-card, .entries > .community-card {
  display: grid; gap: .45rem; padding: .95rem 1.05rem;
  min-width: 0; border: 1px solid var(--border); border-radius: 1rem; background: var(--surface-solid);
  transition: box-shadow .25s var(--ease), transform .25s var(--ease);
}
.entries > .notice-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
:is(.notice-stream, .community-stream) > li:is(:first-child, :last-child) { padding-block: .95rem; }
.entries > .notice-unread {
  background: linear-gradient(90deg, var(--mint), var(--surface-solid) 45%); border-color: var(--selected-border);
  box-shadow: inset 4px 0 0 var(--in);
}
.notice-fresh {
  border-radius: 10rem; padding: .16rem .55rem; color: #fff; background: linear-gradient(135deg, var(--in-2), var(--in));
  font-size: .72rem; font-weight: 760; white-space: nowrap; box-shadow: 0 4px 10px -4px var(--in);
}
.author-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: .14rem .55rem; font-size: .8rem; }
.author-line strong { font-size: .86rem; }
.author-line span, .author-line time { color: var(--muted); font-size: .76rem; }
.feed-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; }
.feed-actions button { min-height: 2rem; font-size: .78rem; padding: .24rem .6rem; }
.text-action { color: var(--muted); background: transparent; }
.text-action:hover { color: var(--green); background: var(--wash); }
.community-stream {
  max-height: min(58vh, 38rem); overflow-y: auto; overscroll-behavior-y: contain; scroll-behavior: smooth;
  padding: .8rem; border-radius: 1.1rem; border: 1px solid var(--border);
  background:
    radial-gradient(circle at 1px 1px, var(--hairline) 1px, transparent 0) 0 0 / 18px 18px,
    var(--wash-soft);
}
.community-stream:empty { display: none; }
.entries > .community-card {
  max-width: min(85%, 45rem); justify-self: start; background: var(--surface-solid);
  border-radius: 1.1rem 1.1rem 1.1rem .35rem; box-shadow: var(--shadow-sm);
}
.entries > .community-card.own-post {
  justify-self: end; border-radius: 1.1rem 1.1rem .35rem 1.1rem;
  background: linear-gradient(150deg, var(--mint), color-mix(in srgb, var(--mint) 70%, var(--surface-solid)));
  border-color: var(--selected-border);
}
.entries > .community-card.poll-card { width: min(100%, 42rem); }
.chat-composer { padding-bottom: .7rem; border-bottom: 1px solid var(--border); }
.poll-content { gap: .6rem; }
.poll-fields { grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: .65rem; }
.poll-choices { display: grid; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.poll-choices li { display: grid; gap: .25rem; }
.poll-label { font-size: .92rem; font-weight: 700; }
.poll-choice { text-align: left; justify-content: flex-start; width: 100%; overflow-wrap: anywhere; }
.poll-choice[aria-pressed="true"] { border-color: var(--in); background: var(--mint); color: var(--selected-ink); box-shadow: 0 0 0 3px #1d539a22; }
.poll-result { display: flex; align-items: center; gap: .55rem; font-size: .78rem; font-variant-numeric: tabular-nums; }
.poll-result progress {
  flex: 1; min-width: 2rem; height: .6rem; accent-color: var(--in);
  appearance: none; -webkit-appearance: none; border: 0; border-radius: 1rem; overflow: hidden; background: var(--wash);
}
.poll-result progress::-webkit-progress-bar { background: var(--wash); border-radius: 1rem; }
.poll-result progress::-webkit-progress-value { background: linear-gradient(90deg, var(--in-2), var(--in)); border-radius: 1rem; }
.poll-result progress::-moz-progress-bar { background: linear-gradient(90deg, var(--in-2), var(--in)); border-radius: 1rem; }

/* ——— Responsive ——— */
@media (max-width: 70rem) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-grid > .stack { grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); align-items: start; }
}
@media (max-width: 60rem) {
  .dashboard-hero { grid-template-columns: 1fr; }
  .hero-side { min-height: 0; }
  .hero-art { display: none; }
}
@media (max-width: 51rem) {
  .shell.signed-in {
    display: grid; grid-template-columns: 1fr; gap: .9rem;
    padding-bottom: calc(6.2rem + env(safe-area-inset-bottom, 0px));
  }
  /* No backdrop-filter here: it would become the containing block of the fixed tab bar. */
  .sidebar { position: static; min-height: 0; padding: 0; border: 0; background: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .property, .account { display: none; }
  .tabs {
    position: fixed; z-index: 40; left: .6rem; right: .6rem; bottom: calc(.6rem + env(safe-area-inset-bottom, 0px));
    display: flex; gap: .15rem; padding: .35rem; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
    background: color-mix(in srgb, var(--surface-solid) 82%, transparent); border: 1px solid var(--border); border-radius: 1.4rem;
    box-shadow: var(--shadow-lg); backdrop-filter: blur(20px) saturate(1.6); -webkit-backdrop-filter: blur(20px) saturate(1.6);
  }
  .tabs::-webkit-scrollbar { display: none; }
  .nav-link {
    flex: 1 0 3.55rem; flex-direction: column; justify-content: center; gap: .18rem; min-height: 3.4rem;
    padding: .3rem .15rem; font-size: .66rem; border-radius: 1.05rem; scroll-snap-align: center; line-height: 1.1;
  }
  .nav-link .icon { width: 1.25rem; height: 1.25rem; flex-basis: 1.25rem; }
  .nav-link[aria-current="page"] { background: linear-gradient(150deg, var(--mint), color-mix(in srgb, var(--mint) 60%, transparent)); }
  .nav-link[aria-current="page"]::before { display: none; }
  .nav-link[aria-current="page"] .icon { transform: translateY(-1px) scale(1.08); }
  .nav-label { display: none; }
  .nav-short { display: inline; }
  .nav-badge { position: absolute; top: .2rem; right: calc(50% - 1.35rem); margin: 0; min-width: 1.1rem; height: 1.1rem; font-size: .62rem; padding: 0 .2rem; }
  .page-heading { padding-top: .2rem; }
}
@media (max-width: 36rem) {
  .dashboard-metrics { grid-template-columns: 1fr 1fr; }
  .dashboard-metrics > .metric:first-child { grid-column: 1 / -1; }
  .hero-action { width: 100%; }
  .auth-layout { display: flex; flex-direction: column; min-height: 0; border-radius: 1.4rem; }
  .auth-visual { padding: 1.3rem; gap: .55rem; }
  .auth-art { width: 11rem; margin: -.3rem 0 0 auto; position: absolute; right: -1rem; top: .4rem; opacity: .45; }
  .auth-visual h2 { white-space: normal; }
  .chart-columns[data-range="12"] .chart-month:nth-child(even) .chart-label { visibility: hidden; }
  .chart-month .chart-label { font-size: .64rem; }
  .entries.document-list > li { flex-wrap: wrap; }
  .entries.document-list .link-button { width: 100%; justify-content: center; }
  .entries > .community-card { max-width: 94%; }
  .as-of { display: none; }
}
@media (max-width: 24rem) {
  .site-actions { gap: .32rem; }
  .site-actions .quiet { font-size: .74rem; padding-inline: .55rem; }
  .brand { gap: .45rem; font-size: 1rem; }
  .brand img { width: 2rem; height: 2rem; }
  .brand small { font-size: .66rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
  .backdrop span { animation: none; }
}

/* ═══════════ Napredni moduli ═══════════ */

/* Header extras */
.bell-button { position: relative; }
.bell-badge {
  position: absolute; top: -.2rem; right: -.2rem; min-width: 1.15rem; height: 1.15rem; padding: 0 .25rem; border-radius: 1rem;
  display: grid; place-items: center; font-size: .66rem; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #f08a4b, #d4552a); box-shadow: 0 0 0 2px #0d1827; animation: pop .45s var(--spring);
}
.bell-badge[hidden] { display: none; }
.install-button { color: var(--gold); border-color: #f3d98c55; }

/* Navigation */
.nav-glyph { width: 1.15rem; height: 1.15rem; transition: transform .25s var(--spring); }
.nav-link:hover .nav-glyph { transform: scale(1.12); }
.nav-plus {
  margin-left: auto; padding: .05rem .38rem; border-radius: .4rem; font-size: .6rem; font-weight: 800; letter-spacing: .06em;
  color: #3a2c06; background: linear-gradient(135deg, #fbe9b0, var(--gold));
}
.nav-plus + .nav-badge[hidden] { display: none; }
.nav-more { display: none; }
.account {
  width: 100%; min-height: 0; justify-content: flex-start; text-align: left; background: transparent; border-radius: 0 0 .9rem .9rem;
  border: 0; border-top: 1px solid var(--border); font-weight: 500; color: inherit;
}
.account:hover { background: var(--wash); }
.account-gear { margin-left: auto; color: var(--muted); }

/* Modal & sheet */
body.modal-open { overflow: hidden; }
.modal-backdrop {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 1rem;
  background: #040910b0; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .2s ease both;
}
.modal-backdrop.closing { animation: fade .18s ease reverse both; }
@keyframes fade { from { opacity: 0; } }
.modal {
  width: min(34rem, 100%); max-height: min(90dvh, 52rem); display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface-solid); border: 1px solid var(--border); border-radius: 1.4rem; box-shadow: var(--shadow-lg);
  animation: zoom .32s var(--spring) both;
}
.modal.wide { width: min(52rem, 100%); }
@keyframes zoom { from { opacity: 0; transform: translateY(14px) scale(.96); } }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem .6rem; }
.modal-body { padding: .4rem 1.2rem 1.3rem; overflow-y: auto; display: grid; gap: 1rem; }
.icon-only { min-height: 2.4rem; width: 2.4rem; padding: 0; border-radius: 50%; background: var(--wash); color: var(--ink); }
.icon-only:hover { background: var(--mint); }
.modal-backdrop.as-sheet { align-items: end; justify-items: end; padding: 0; }
.as-sheet .modal { height: 100dvh; max-height: none; width: min(28rem, 100%); border-radius: 1.4rem 0 0 1.4rem; animation: slide-in .35s var(--ease) both; }
@keyframes slide-in { from { transform: translateX(100%); } }

/* Toast */
.toast-host { position: fixed; z-index: 120; left: 50%; bottom: calc(1.2rem + env(safe-area-inset-bottom, 0px)); translate: -50% 0; display: grid; gap: .5rem; width: min(26rem, calc(100% - 2rem)); pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: .6rem; padding: .8rem 1rem; border-radius: 1rem; font-weight: 640; font-size: .9rem;
  color: #fff; background: #101924ee; box-shadow: var(--shadow-lg); backdrop-filter: blur(10px); animation: zoom .35s var(--spring) both;
}
.toast.ok .glyph { color: #5f91d3; }
.toast.warn .glyph { color: #f5bf8a; }
.toast.leaving { animation: fade .35s ease reverse both; }

/* Generic bits */
.hint { color: var(--muted); font-size: .78rem; font-weight: 500; line-height: 1.4; }
.label-like { font-weight: 640; font-size: .9rem; margin-bottom: -.4rem; }
.check-row { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; font-weight: 560; cursor: pointer; }
.check-row input[type="checkbox"] { width: 1.15rem; height: 1.15rem; accent-color: var(--in); }
.check-row .hint { flex-basis: 100%; margin-left: 1.65rem; }
.check-row input[type="time"] { width: auto; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: .8rem; }
.field-row[hidden] { display: none; }
output { color: var(--green); font-size: .8rem; font-weight: 700; }
input[type="range"] { accent-color: var(--in); padding: 0; border: 0; background: none; box-shadow: none; }
select { width: 100%; }
.segments.wrap { flex-wrap: wrap; }
.small { min-height: 2.2rem; padding: .3rem .7rem; font-size: .8rem; }
.danger-text { color: var(--error); }
.block { display: block; }
.center { text-align: center; }
.chip { min-height: 2.2rem; border-radius: 2rem; padding: .3rem .85rem; background: var(--wash); border-color: var(--border); color: var(--ink); font-size: .82rem; }
.chip:hover { background: var(--mint); }
.chip.large { min-height: 3rem; font-size: 1rem; padding-inline: 1.3rem; }
.status-tag {
  display: inline-flex; align-items: center; gap: .3rem; padding: .18rem .6rem; border-radius: 2rem; font-size: .72rem; font-weight: 750;
  white-space: nowrap; background: var(--wash); color: var(--muted); border: 1px solid transparent;
}
.status-tag.ok { background: #1d539a1f; color: var(--green); }
.status-tag.warn { background: #e08a4a24; color: var(--amber); }
.status-tag.live { background: #3b82c41f; color: #2f6fb0; }
:root[data-theme="dark"] .status-tag.live { color: #8cc3f0; }
.status-tag.live::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; animation: pulse-dot 1.6s ease-in-out infinite; }
@keyframes pulse-dot { 50% { opacity: .3; } }
.status-tag.outline { background: transparent; border-color: var(--border); }
.status-tag.muted { opacity: .8; }
.switch {
  position: relative; width: 2.9rem; min-width: 2.9rem; height: 1.7rem; min-height: 0; padding: 0; border-radius: 2rem;
  background: var(--field-border); border: 0; transition: background-color .25s;
}
.switch::after {
  content: ""; position: absolute; top: .2rem; left: .2rem; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px #0004; transition: transform .3s var(--spring);
}
.switch[aria-checked="true"] { background: linear-gradient(135deg, var(--in-2), var(--in)); }
.switch[aria-checked="true"]::after { transform: translateX(1.2rem); }
.switch:active:not(:disabled) { transform: none; }

/* Activity */
.activity-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.activity-button {
  width: 100%; min-height: 0; display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: .75rem; padding: .7rem .55rem;
  text-align: left; background: transparent; border-radius: .9rem; color: inherit; font-weight: 500;
}
.activity-button:hover { background: var(--wash); }
.activity-icon { width: 2.3rem; height: 2.3rem; padding: .5rem; border-radius: .8rem; background: var(--mint); color: var(--green); }
.kind-decision .activity-icon { background: #3b82c41f; color: #3b82c4; }
.kind-charge .activity-icon, .kind-issue .activity-icon { background: #e08a4a24; color: var(--amber); }
.kind-goal .activity-icon, .kind-balance .activity-icon { background: #d4a72c24; color: #a8821c; }
.activity-text { display: grid; gap: .1rem; min-width: 0; }
.activity-text strong { font-size: .9rem; line-height: 1.3; }
.activity-body { color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.activity-button time { font-size: .72rem; white-space: nowrap; padding-top: .15rem; }
.activity-item.unseen .activity-button { background: linear-gradient(90deg, var(--mint), transparent); }
.activity-item.unseen strong::after { content: ""; display: inline-block; width: .45rem; height: .45rem; margin-left: .4rem; border-radius: 50%; background: var(--in); vertical-align: middle; }

/* Settings */
.settings-profile { display: flex; align-items: center; gap: .9rem; padding: .9rem; border-radius: 1rem; background: var(--wash); }
.settings-profile div { display: grid; }
.avatar.large { flex-basis: 3.2rem; height: 3.2rem; font-size: 1rem; }
.settings-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .85rem; padding: .3rem 0; }
.settings-row div { display: grid; gap: .1rem; }
.settings-row .subtle { font-size: .8rem; }
.settings-icon { width: 2.4rem; height: 2.4rem; padding: .55rem; border-radius: .8rem; background: var(--mint); color: var(--green); }
.settings-row .segments { grid-column: 1 / -1; justify-self: start; }
.more-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.more-tile {
  position: relative; flex-direction: column; min-height: 5.5rem; gap: .45rem; padding: .7rem .4rem; border-radius: 1rem;
  background: var(--wash); color: var(--ink); font-size: .78rem; font-weight: 650; text-align: center;
}
.more-tile .glyph { width: 1.5rem; height: 1.5rem; color: var(--green); }
.more-tile.current { background: var(--mint); border-color: var(--selected-border); }
.more-tile .nav-badge { position: absolute; top: .4rem; right: .4rem; margin: 0; }

/* Quick actions */
.quick-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13.5rem), 1fr)); gap: .75rem; }
.quick-action {
  justify-content: flex-start; gap: .8rem; min-height: 4.6rem; padding: .85rem 1rem; text-align: left; color: var(--ink);
  background: var(--surface); border: 1px solid var(--border); border-radius: 1.1rem; box-shadow: var(--shadow);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); animation: rise .6s .05s var(--ease) both;
}
.quick-action:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--selected-border); }
.quick-icon { width: 2.8rem; height: 2.8rem; padding: .65rem; border-radius: .95rem; color: #fff; flex: 0 0 auto; box-shadow: 0 8px 18px -8px currentColor; }
.tone-pay .quick-icon { background: linear-gradient(135deg, #5f91d3, #123c74); }
.tone-vote .quick-icon { background: linear-gradient(135deg, #7db6ec, #2f6fb0); }
.tone-smart .quick-icon { background: linear-gradient(135deg, #f6dc8e, #b68a1d); }
.tone-issue .quick-icon { background: linear-gradient(135deg, #f5bf8a, #c9622b); }
.tone-cert .quick-icon { background: linear-gradient(135deg, #c3a4ef, #7a4fc0); }
.tone-money .quick-icon { background: linear-gradient(135deg, #8eb3e4, #1f5193); }
.quick-text { display: grid; gap: .1rem; min-width: 0; }
.quick-text strong { font-size: .95rem; }
.quick-text span { color: var(--muted); font-size: .76rem; font-weight: 520; line-height: 1.3; }
.quick-arrow { margin-left: auto; color: var(--muted); transition: transform .25s var(--ease); }
.quick-action:hover .quick-arrow { transform: translateX(3px); color: var(--green); }

/* Contacts */
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.contact-list li { display: flex; align-items: center; gap: .7rem; }
.contact-icon { width: 2.2rem; height: 2.2rem; padding: .5rem; border-radius: .75rem; background: var(--wash); color: var(--green); flex: 0 0 auto; }
.contact-text { display: grid; min-width: 0; }
.contact-role { font-size: .72rem; color: var(--muted); font-weight: 600; }
.contact-text a, .contact-text strong { font-size: .9rem; font-weight: 680; overflow-wrap: anywhere; }
.mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.mini-stats div { padding: .6rem .75rem; border-radius: .8rem; background: var(--wash-soft); border: 1px solid var(--hairline); }
.mini-stats dt { font-size: .72rem; }
.mini-stats dd { margin: 0; font-size: 1.25rem; font-weight: 800; letter-spacing: -.03em; }

/* Payments */
.action-cell { text-align: right; white-space: nowrap; }
.pay-button {
  min-height: 2.1rem; padding: .25rem .7rem; font-size: .78rem; color: #fff; border-radius: .7rem;
  background: linear-gradient(135deg, var(--action), var(--action-2)); box-shadow: 0 6px 14px -8px #123c74;
}
.pay-button:hover { transform: translateY(-1px); }
:root[data-theme="dark"] .pay-button { color: var(--action-ink); }
.pay-banner {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem; padding: 1.1rem 1.3rem; border-radius: var(--radius);
  background: linear-gradient(135deg, #0f223a, #173760); color: #fff; box-shadow: var(--shadow-lg); animation: rise .5s var(--ease) both;
}
.pay-banner > div { display: grid; gap: .1rem; }
.pay-banner .eyebrow { color: var(--gold); }
.pay-banner .subtle { color: #cfdae8; }
.pay-banner .primary { background: linear-gradient(135deg, #fbe9b0, var(--gold)); color: #0f1b2a; }
.pay-banner.settled { background: linear-gradient(135deg, #123c74, #1d539a); }
.pay-banner-icon { width: 3rem; height: 3rem; padding: .7rem; border-radius: 1rem; background: #ffffff1f; color: var(--gold); }
.pay-total { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; letter-spacing: -.04em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pay-dialog { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.barcode-card { margin: 0; padding: 1rem; border-radius: 1.1rem; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow); display: grid; gap: .6rem; }
.barcode-card img { width: 100%; height: auto; image-rendering: pixelated; }
.barcode-card figcaption { color: #565e69; font-size: .74rem; text-align: center; font-weight: 600; }
.pay-facts { display: grid; gap: .45rem; }
.pay-steps { margin: .4rem 0 0; padding-left: 1.2rem; display: grid; gap: .25rem; font-size: .84rem; color: var(--muted); }
.pay-others { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; padding-top: .4rem; border-top: 1px solid var(--border); }
.pay-others .subtle { flex-basis: 100%; }
.paper-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: .75rem; }
.paper-tile {
  flex-direction: column; align-items: flex-start; gap: .3rem; min-height: 0; padding: 1rem; text-align: left; border-radius: 1rem;
  background: var(--wash-soft); border: 1px solid var(--border); color: var(--ink); font-weight: 500;
}
.paper-tile:hover { border-color: var(--selected-border); background: var(--mint); transform: translateY(-2px); }
.paper-tile strong { font-size: .95rem; }
.paper-tile span { color: var(--muted); font-size: .8rem; line-height: 1.4; }
.paper-icon { width: 2.4rem; height: 2.4rem; padding: .55rem; border-radius: .8rem; color: #fff; background: linear-gradient(135deg, #c3a4ef, #7a4fc0); margin-bottom: .3rem; }
.year-list { display: flex; flex-wrap: wrap; gap: .5rem; }

/* Print */
.print-actions { display: flex; justify-content: flex-end; }
.print-page { background: #fff; color: #101924; border-radius: .8rem; padding: 2rem; border: 1px solid var(--border); box-shadow: var(--shadow); }
.print-content { display: grid; gap: .9rem; }
.print-content h1 { font-size: 1.5rem; color: #101924; background: none; -webkit-text-fill-color: currentColor; }
.print-content h2 { font-size: 1rem; margin-top: .4rem; }
.print-content .subtle, .print-content dt { color: #565e69; }
.print-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-bottom: .8rem; border-bottom: 2px solid #123c74; }
.print-brand { display: flex; align-items: center; gap: .6rem; }
.print-brand img { width: 2.6rem; height: 2.6rem; border-radius: .6rem; }
.print-brand div { display: grid; font-size: .8rem; }
.print-subtitle { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #123c74; }
.print-verdict { display: flex; align-items: center; gap: .6rem; padding: .8rem 1rem; border-radius: .8rem; font-size: 1rem; }
.print-verdict.ok { background: #e3ebf5; color: #072752; }
.print-verdict.warn { background: #fff0e2; color: #8a3f10; }
.print-verdict .glyph { width: 1.6rem; height: 1.6rem; }
.print-facts, .print-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .5rem 1.2rem; }
.print-facts div, .print-summary div { border-bottom: 1px dashed #dbe0e7; padding: .35rem 0; }
.print-facts dd, .print-summary dd { margin: 0; font-weight: 700; }
.print-summary dd { font-size: 1.3rem; }
.print-verify { display: flex; align-items: center; gap: 1rem; padding: .9rem; border: 1px solid #dbe0e7; border-radius: .8rem; }
.print-verify img { width: 7.5rem; height: 7.5rem; }
.print-verify div { display: grid; gap: .25rem; font-size: .85rem; }
.print-code { font: 800 1.1rem/1.2 ui-monospace, Menlo, monospace; letter-spacing: .08em; }
.print-note { font-size: .74rem; color: #565e69; }
.print-page .table-scroll { background: #fff; border-color: #dbe0e7; }
.print-page th { background: #f3f5f8; color: #565e69; }
.print-page td, .print-page th { border-color: #dbe0e7; }
@media print {
  body.printing > *:not(.modal-backdrop), body.printing .modal-header, body.printing .print-actions { display: none !important; }
  body.printing .modal-backdrop { position: static; background: none; backdrop-filter: none; padding: 0; display: block; }
  body.printing .modal { width: auto; max-height: none; border: 0; box-shadow: none; animation: none; overflow: visible; }
  body.printing .modal-body { padding: 0; overflow: visible; }
  body.printing .print-page { border: 0; box-shadow: none; padding: 0; }
  @page { margin: 16mm; }
}

/* Feature hero */
.feature-hero {
  position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: center; flex-wrap: wrap; gap: 1rem 1.3rem;
  padding: clamp(1.2rem, 3vw, 1.9rem); border-radius: calc(var(--radius) + .2rem); color: #fff; box-shadow: var(--shadow-lg);
  background: linear-gradient(125deg, #0a1523, #0f223a 50%, #173760);
}
.feature-hero::after {
  content: ""; position: absolute; z-index: -1; width: 22rem; height: 22rem; right: -6rem; top: -10rem; border-radius: 50%;
  background: radial-gradient(circle, var(--hero-glow, #5f91d355), transparent 65%); animation: glow 9s ease-in-out infinite alternate;
}
.feature-hero > div:not(.hero-source) { flex: 1 1 18rem; display: grid; gap: .4rem; }
.feature-hero h2 { font-size: clamp(1.4rem, 3vw, 2rem); letter-spacing: -.04em; font-weight: 800; }
.feature-hero p { color: #d2ddeb; max-width: 40rem; font-size: .92rem; }
.feature-hero .eyebrow { color: var(--gold); }
.feature-hero .hero-source { flex: 0 1 17rem; }
.feature-hero-icon { width: 3.4rem; height: 3.4rem; padding: .8rem; border-radius: 1.1rem; background: #ffffff1a; color: var(--gold); align-self: flex-start; }
.feature-figure { font-size: clamp(2rem, 5vw, 3rem); font-weight: 850; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.tone-vote.feature-hero { background: linear-gradient(125deg, #0d1f3a, #173a66 55%, #1f5a8a); --hero-glow: #7db6ec55; }
.tone-issue.feature-hero { background: linear-gradient(125deg, #2a160c, #5a2c14 55%, #8a4a22); --hero-glow: #f5bf8a55; }
.tone-smart.feature-hero { background: linear-gradient(125deg, #0b0f1f, #1d2449 55%, #2f3a73); --hero-glow: #f6dc8e55; }
.tone-money.feature-hero { background: linear-gradient(125deg, #061426, #0d2b52 55%, #16417a); --hero-glow: #8eb3e455; }

/* Decisions */
.decision-card, .issue-card {
  display: grid; gap: .7rem; padding: clamp(1rem, 2.4vw, 1.4rem); border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  animation: rise .5s var(--ease) both;
}
.decision-card.open { border-color: #3b82c455; box-shadow: var(--shadow), inset 0 3px 0 #3b82c4; }
.decision-top { display: flex; flex-wrap: wrap; gap: .4rem; }
.decision-card h3 { font-size: 1.15rem; letter-spacing: -.02em; }
.decision-body summary { font-size: .85rem; }
.vote-result { display: grid; gap: .5rem; }
.vote-bar { position: relative; display: flex; height: 1.1rem; border-radius: 1rem; background: var(--wash); overflow: visible; }
.vote-segment { height: 100%; transform-origin: left; animation: stretch .9s var(--ease) both; }
.vote-segment:first-child { border-radius: 1rem 0 0 1rem; }
.vote-segment.for { background: linear-gradient(90deg, #5f91d3, #1d539a); }
.vote-segment.against { background: linear-gradient(90deg, #f5a08a, #d4552a); }
.vote-segment.abstain { background: linear-gradient(90deg, #c0cad3, #8a98a6); }
.vote-threshold { position: absolute; top: -.35rem; bottom: -.35rem; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--ink); }
.vote-threshold::after { content: "prag"; position: absolute; top: -1.15rem; left: 50%; translate: -50% 0; font-size: .6rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.vote-legend { display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .8rem; }
.vote-legend span { display: inline-flex; align-items: center; gap: .3rem; }
.vote-legend i { width: .6rem; height: .6rem; border-radius: 50%; }
.legend-for i { background: #1d539a; }
.legend-against i { background: #d4552a; }
.legend-abstain i { background: #8a98a6; }
.legend-rest i { background: var(--field-border); }
.vote-legend strong { font-variant-numeric: tabular-nums; }
.decision-hint { font-size: .84rem; font-weight: 640; color: #2f6fb0; }
:root[data-theme="dark"] .decision-hint { color: #8cc3f0; }
.ballot { display: grid; gap: .5rem; padding-top: .7rem; border-top: 1px solid var(--border); }
.ballot-buttons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.ballot-button { min-height: 3rem; background: var(--wash); color: var(--ink); border-color: var(--border); }
.ballot-button:hover { border-color: var(--focus); }
.ballot-button.for[aria-pressed="true"] { background: linear-gradient(135deg, #5f91d3, #1d539a); color: #fff; border-color: transparent; }
.ballot-button.against[aria-pressed="true"] { background: linear-gradient(135deg, #f5a08a, #d4552a); color: #fff; border-color: transparent; }
.ballot-button.abstain[aria-pressed="true"] { background: linear-gradient(135deg, #c0cad3, #7a8896); color: #fff; border-color: transparent; }
.vote-row { flex-direction: column; align-items: stretch; gap: .55rem; min-height: 0; padding: .8rem; text-align: left; border-radius: 1rem; background: var(--wash-soft); border-color: var(--border); color: var(--ink); font-weight: 500; }
.vote-row:hover { border-color: var(--selected-border); }
.vote-row-head { display: flex; justify-content: space-between; gap: .6rem; align-items: start; }
.vote-row-head strong { font-size: .92rem; }

/* Issues */
.category-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
.category-tile { flex-direction: column; gap: .3rem; min-height: 4.4rem; padding: .5rem .3rem; border-radius: .9rem; font-size: .74rem; background: var(--wash); color: var(--ink); border-color: var(--border); }
.category-tile .glyph { width: 1.4rem; height: 1.4rem; color: var(--amber); }
.category-tile[aria-pressed="true"] { border-color: var(--amber); background: #e08a4a1f; box-shadow: 0 0 0 3px #e08a4a26; }
.photo-previews { display: flex; flex-wrap: wrap; gap: .6rem; }
.photo-add { width: 6rem; height: 6rem; flex-direction: column; gap: .25rem; border: 2px dashed var(--field-border); background: var(--wash-soft); color: var(--muted); font-size: .72rem; border-radius: 1rem; }
.photo-add:hover { border-color: var(--amber); color: var(--amber); }
.photo-thumb { position: relative; width: 6rem; height: 6rem; border-radius: 1rem; overflow: hidden; box-shadow: var(--shadow); animation: zoom .3s var(--spring) both; }
.photo-thumb canvas { width: 100%; height: 100%; object-fit: cover; }
.photo-thumb .icon-only { position: absolute; top: .3rem; right: .3rem; width: 1.8rem; min-height: 1.8rem; background: #000a; color: #fff; }
.issue-head { display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: start; }
.issue-head h3 { font-size: 1.05rem; }
.issue-icon { width: 2.6rem; height: 2.6rem; padding: .6rem; border-radius: .9rem; background: #e08a4a1f; color: var(--amber); }
.status-tag.issue-reported { background: #e08a4a24; color: var(--amber); }
.status-tag.issue-acknowledged, .status-tag.issue-in_progress { background: #3b82c41f; color: #2f6fb0; }
.status-tag.issue-resolved { background: #1d539a1f; color: var(--green); }
.issue-stepper { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.issue-stepper li { position: relative; display: grid; justify-items: center; gap: .3rem; font-size: .7rem; color: var(--muted); text-align: center; }
.issue-stepper li::before { content: ""; position: absolute; top: .45rem; left: -50%; width: 100%; height: 3px; background: var(--border); z-index: -1; }
.issue-stepper li:first-child::before { display: none; }
.issue-stepper li.done::before, .issue-stepper li.current::before { background: linear-gradient(90deg, #5f91d3, #1d539a); }
.step-dot { width: 1.05rem; height: 1.05rem; border-radius: 50%; background: var(--surface-solid); border: 3px solid var(--border); }
.done .step-dot { background: #1d539a; border-color: #1d539a; }
.current .step-dot { border-color: #1d539a; box-shadow: 0 0 0 5px #1d539a26; animation: pulse-ring 2s ease-in-out infinite; }
.current .step-label { color: var(--ink); font-weight: 750; }
@keyframes pulse-ring { 50% { box-shadow: 0 0 0 9px #1d539a00; } }
.issue-stepper.rejected { opacity: .5; }
.issue-photos { display: flex; gap: .5rem; flex-wrap: wrap; }
.issue-photo { width: 5.5rem; height: 5.5rem; padding: 0; border-radius: .9rem; overflow: hidden; border: 1px solid var(--border); }
.issue-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s var(--ease); }
.issue-photo:hover img { transform: scale(1.08); }
.photo-large { width: 100%; border-radius: 1rem; }
.issue-facts { font-size: .84rem; font-weight: 640; color: var(--green); }
.timeline { list-style: none; margin: .6rem 0 0; padding: 0 0 0 1rem; border-left: 2px solid var(--border); display: grid; gap: .7rem; }
.timeline li { position: relative; font-size: .84rem; }
.timeline li::before { content: ""; position: absolute; left: calc(-1rem - 6px); top: .35rem; width: 10px; height: 10px; border-radius: 50%; background: var(--field-border); }
.timeline li.from-manager::before { background: var(--in); }
.timeline time { font-size: .76rem; }
.support-button { min-height: 2.2rem; padding: .25rem .8rem; font-size: .8rem; background: var(--wash); color: var(--ink); border-color: var(--border); }
.support-button .glyph { color: #d4552a; }
.support-button.on { background: #d4552a14; border-color: #d4552a55; }
.support-button.on .glyph svg { fill: #d4552a; }

/* Finance */
.finance-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(16rem, 1fr); gap: 1rem; align-items: start; }
.donut-layout { display: grid; grid-template-columns: minmax(11rem, 15rem) minmax(0, 1fr); gap: 1.3rem; align-items: center; }
.donut { position: relative; display: grid; place-items: center; }
.donut svg { width: 100%; height: auto; overflow: visible; }
.donut-track { fill: none; stroke: var(--wash); stroke-width: 26; }
.donut-arc { fill: none; stroke-width: 26; stroke-linecap: butt; animation: draw 1.1s var(--ease) both; animation-delay: calc(var(--i) * 90ms); transition: stroke-width .2s; }
.donut-arc:hover { stroke-width: 32; }
@keyframes draw { from { stroke-dasharray: 0 999; } }
.donut-center { position: absolute; display: grid; text-align: center; gap: .1rem; }
.donut-center strong { font-size: 1.25rem; font-weight: 820; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.donut-center .subtle { font-size: .72rem; }
.category-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .65rem; }
.category-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .25rem .8rem; align-items: center; }
.category-name { display: flex; align-items: center; gap: .45rem; min-width: 0; }
.category-name i { width: .7rem; height: .7rem; border-radius: .25rem; flex: 0 0 auto; }
.category-name strong { font-size: .88rem; }
.category-name .subtle { font-size: .72rem; }
.category-bar { grid-column: 1 / 2; height: .4rem; border-radius: 1rem; background: var(--wash); overflow: hidden; }
.category-bar span { display: block; height: 100%; border-radius: inherit; transform-origin: left; animation: stretch 1s var(--ease) both; }
.category-amounts { grid-row: 1 / span 2; grid-column: 2; display: grid; justify-items: end; font-size: .86rem; font-variant-numeric: tabular-nums; }
.category-amounts .subtle { font-size: .72rem; }
.my-part { font-size: .72rem; font-weight: 700; color: var(--green); }
.bench-gauge { display: grid; gap: .6rem; }
.bench-row { display: grid; grid-template-columns: 1fr; gap: .25rem; font-size: .82rem; }
.bench-row strong { justify-self: end; margin-top: -1.55rem; font-variant-numeric: tabular-nums; }
.bench-track { height: .7rem; border-radius: 1rem; background: var(--wash); overflow: hidden; }
.bench-track span { display: block; height: 100%; border-radius: inherit; transform-origin: left; animation: stretch 1s var(--ease) both; }
.bench-row.own .bench-track span { background: linear-gradient(90deg, #8eb3e4, #1f5193); }
.bench-row.avg .bench-track span { background: linear-gradient(90deg, #c0cad3, #8a98a6); }
.bench-verdict { font-weight: 680; font-size: .88rem; }
.bench-verdict.ok { color: var(--green); }
.bench-verdict.warn { color: var(--amber); }
.goal-card { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: center; padding: .9rem; border-radius: 1rem; background: var(--wash-soft); border: 1px solid var(--hairline); }
.goal-ring {
  --progress: 0; width: 5rem; height: 5rem; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(closest-side, var(--surface-solid) 74%, transparent 75% 100%),
              conic-gradient(#1d539a calc(var(--progress) * 1turn), var(--wash) 0);
  animation: pop .7s var(--spring) both;
}
.goal-ring strong { font-size: .95rem; font-variant-numeric: tabular-nums; }
.goal-text { display: grid; gap: .2rem; }
.goal-text h3 { font-size: .98rem; }
.goal-text .subtle { font-size: .8rem; }
.goal-amounts { font-weight: 720; font-size: .88rem; font-variant-numeric: tabular-nums; }
.goal-projection { font-size: .8rem; font-weight: 600; }
.goal-projection.ok { color: var(--green); }
.goal-projection.warn { color: var(--amber); }
.goal-projection.info { color: #2f6fb0; }
.payment-feed { list-style: none; margin: 0; padding: 0; display: grid; }
.payment-feed li { display: grid; grid-template-columns: auto 1fr auto auto; gap: .8rem; align-items: center; padding: .65rem 0; border-bottom: 1px solid var(--border); }
.payment-feed li:last-child { border-bottom: 0; }
.payment-feed i { width: .65rem; height: .65rem; border-radius: 50%; }
.payment-feed div { display: grid; min-width: 0; }
.payment-feed div strong { font-size: .88rem; }
.payment-feed .subtle { font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.payment-feed time { font-size: .76rem; white-space: nowrap; }
.payment-amount { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Smart building */
.device-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: 1rem; }
.device-tile {
  display: grid; gap: .8rem; align-content: start; padding: 1.1rem; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  animation: rise .5s var(--ease) both;
}
.device-tile:nth-child(2) { animation-delay: .06s; }
.device-tile:nth-child(3) { animation-delay: .12s; }
.device-tile:nth-child(4) { animation-delay: .18s; }
.device-tile.kind-lighting { grid-column: span 2; }
.device-tile.locked { opacity: .65; }
.device-head { display: flex; align-items: center; gap: .8rem; }
.device-head div { display: grid; }
.device-head .subtle { font-size: .76rem; }
.device-icon { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 1rem; color: #fff; background: linear-gradient(135deg, #7c8aa0, #3d4a60); box-shadow: 0 10px 20px -10px #3d4a60; }
.device-icon .glyph { width: 1.5rem; height: 1.5rem; }
.kind-entrance .device-icon { background: linear-gradient(135deg, #5f91d3, #123c74); }
.kind-garage .device-icon { background: linear-gradient(135deg, #7db6ec, #2f6fb0); }
.kind-gate .device-icon { background: linear-gradient(135deg, #c3a4ef, #7a4fc0); }
.kind-barrier .device-icon { background: linear-gradient(135deg, #f5bf8a, #c9622b); }
.kind-lighting .device-icon { background: linear-gradient(135deg, #f6dc8e, #b68a1d); }
.device-note { font-size: .86rem; font-weight: 620; }
.device-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.device-locked { display: flex; align-items: center; gap: .5rem; font-size: .82rem; color: var(--muted); padding: .7rem; border-radius: .8rem; background: var(--wash); }
.device-last { font-size: .76rem; }
.sun-row { display: flex; align-items: center; gap: .35rem; font-size: .8rem; color: var(--muted); }
.sun-row .glyph:nth-of-type(2) { margin-left: .6rem; }
.sun-row .glyph { color: #b68a1d; }
.day-wrap { display: grid; gap: .25rem; }
.day-timeline { position: relative; height: 1.6rem; border-radius: .7rem; overflow: hidden; background: linear-gradient(90deg, #1d2449 0%, #3b5a8a 22%, #cfe4f5 35%, #f3f8fb 50%, #cfe4f5 65%, #3b5a8a 78%, #1d2449 100%); }
:root[data-theme="dark"] .day-timeline { filter: brightness(.8); }
.day-segment { position: absolute; top: 0; bottom: 0; }
.day-segment.lit { background: repeating-linear-gradient(135deg, #f6dc8ecc 0 6px, #f3d98c99 6px 12px); box-shadow: inset 0 0 0 1px #f6dc8e; }
.day-now { position: absolute; top: -2px; bottom: -2px; width: 2px; background: #d4552a; box-shadow: 0 0 6px #d4552a; }
.day-scale { display: flex; justify-content: space-between; font-size: .66rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.hold-button {
  position: relative; overflow: hidden; isolation: isolate; width: 100%; min-height: 3.6rem; border-radius: 1.1rem; font-size: 1.02rem; font-weight: 780;
  color: #fff; background: linear-gradient(135deg, #1c2a45, #2f3a73); box-shadow: 0 12px 26px -14px #2f3a73; user-select: none; -webkit-user-select: none; touch-action: none;
}
.kind-entrance .hold-button { background: linear-gradient(135deg, #123c74, #1d539a); box-shadow: 0 12px 26px -14px #123c74; }
.kind-garage .hold-button { background: linear-gradient(135deg, #1f4f86, #2f6fb0); }
.kind-gate .hold-button { background: linear-gradient(135deg, #573a91, #7a4fc0); }
.kind-barrier .hold-button { background: linear-gradient(135deg, #8a3f10, #c9622b); }
.hold-ring { position: absolute; inset: 0; z-index: -1; background: #ffffff38; transform: scaleX(0); transform-origin: left; }
.hold-button.holding .hold-ring { transform: scaleX(1); transition: transform .7s linear; }
.hold-button.holding { transform: scale(.98); }
.hold-button.working .hold-ring { transform: scaleX(1); animation: shimmer 1s linear infinite; background: linear-gradient(90deg, #ffffff10, #ffffff40, #ffffff10) 0 0 / 200% 100%; }
.hold-button.success { background: linear-gradient(135deg, #1d539a, #5f91d3) !important; animation: pop .45s var(--spring); }
.hold-button.failed { background: linear-gradient(135deg, #a42f24, #d4552a) !important; animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.hold-label { pointer-events: none; }
.guest-result { display: grid; justify-items: center; gap: .6rem; text-align: center; }
.guest-result input { text-align: center; font-size: .8rem; }
.guest-ok { width: 3.4rem; height: 3.4rem; padding: .8rem; border-radius: 50%; color: #fff; background: linear-gradient(135deg, #5f91d3, #1d539a); animation: pop .5s var(--spring); }
.pass-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.pass-list li { display: grid; grid-template-columns: auto 1fr auto; gap: .7rem; align-items: center; padding: .65rem .8rem; border-radius: .9rem; background: var(--wash-soft); border: 1px solid var(--hairline); }
.pass-list li.expired { opacity: .55; }
.pass-list div { display: grid; }
.pass-list .subtle { font-size: .76rem; }
.pass-icon { width: 2.1rem; height: 2.1rem; padding: .45rem; border-radius: .7rem; color: #b68a1d; background: #f6dc8e33; }
.access-table th .glyph { display: block; margin: 0 auto .2rem; width: 1.2rem; height: 1.2rem; }
.access-table th span { font-size: .68rem; text-transform: none; letter-spacing: 0; }
.access-table td { vertical-align: middle; }
.access-table .switch { margin: 0 auto; }
.smart-log { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; font-size: .84rem; }
.smart-log li { display: grid; grid-template-columns: auto 1fr auto; gap: .6rem; align-items: center; padding: .45rem 0; border-bottom: 1px dashed var(--border); }
.smart-log time { font-size: .74rem; color: var(--muted); white-space: nowrap; }
.log-dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--in); }
.outcome-failed .log-dot { background: #d4552a; }
.outcome-denied .log-dot { background: #8a98a6; }
.teaser-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: .8rem; }
.teaser-card { display: grid; gap: .35rem; padding: 1.1rem; border-radius: 1.1rem; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); animation: rise .5s var(--ease) both; }
.teaser-card h3 { font-size: .98rem; }
.teaser-card .subtle { font-size: .82rem; }
.teaser-icon { width: 2.6rem; height: 2.6rem; padding: .6rem; border-radius: .9rem; color: #fff; background: linear-gradient(135deg, #2f3a73, #5a68b8); }
.teaser-cta { justify-items: start; }
.smart-quick .quick-devices { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: .7rem; }
.quick-device { display: grid; gap: .5rem; }
.quick-device-label { display: flex; align-items: center; gap: .4rem; font-size: .86rem; }
.quick-device .hold-button { min-height: 3rem; font-size: .92rem; }

/* Public pages */
body.public-page .site-actions > :not(#theme-toggle) { display: none; }
.public-card {
  max-width: 30rem; margin: clamp(.5rem, 5vw, 3rem) auto; border-radius: 1.6rem; overflow: hidden; background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow-lg); animation: rise .6s var(--ease) both;
}
.public-visual {
  position: relative; display: grid; gap: .3rem; padding: 1.6rem 1.5rem 1.3rem; color: #fff;
  background: radial-gradient(120% 140% at 0% 0%, #1f467acc 0%, transparent 55%), linear-gradient(125deg, #0a1523, #0f223a 45%, #173760);
}
.public-visual .eyebrow { color: var(--gold); }
.public-visual h1 { font-size: 2rem; color: #fff; background: none; -webkit-text-fill-color: currentColor; }
.public-art { position: absolute; right: -1rem; bottom: -.6rem; width: 11rem; opacity: .5; }
.public-body { display: grid; gap: 1rem; padding: 1.4rem 1.5rem 1.6rem; }
.public-open {
  min-height: 5rem; border-radius: 1.3rem; font-size: 1.2rem; font-weight: 800; color: #fff; gap: .6rem;
  background: linear-gradient(135deg, #123c74, #1d539a); box-shadow: 0 18px 36px -16px #123c74;
}
.public-open .glyph { width: 1.6rem; height: 1.6rem; }
.public-open.working { animation: pulse 1.2s infinite; }
.public-open.success { background: linear-gradient(135deg, #1d539a, #5f91d3); }
.public-success { color: var(--green); font-weight: 700; text-align: center; }
.public-state { display: grid; justify-items: center; text-align: center; gap: .4rem; padding: 1rem; border-radius: 1rem; }
.public-state .glyph { width: 3rem; height: 3rem; padding: .7rem; border-radius: 50%; color: #fff; animation: pop .5s var(--spring); }
.public-state.ok { background: var(--balance-bg); }
.public-state.ok .glyph { background: linear-gradient(135deg, #5f91d3, #1d539a); }
.public-state.warn { background: var(--attention-bg); }
.public-state.warn .glyph { background: linear-gradient(135deg, #f5bf8a, #c9622b); }
.public-state.muted { background: var(--wash); }
.public-state.muted .glyph { background: #8a98a6; }
.public-facts { display: grid; gap: .1rem; }
.public-facts div { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px dashed var(--border); font-size: .88rem; }
.public-facts dd { margin: 0; font-weight: 700; text-align: right; }
.verify-result { display: grid; gap: .8rem; }

/* Responsive for new modules */
@media (max-width: 70rem) {
  .finance-grid { grid-template-columns: 1fr; }
}
@media (max-width: 51rem) {
  .nav-secondary { display: none; }
  .nav-more { display: flex; }
  .nav-more.holds-current { color: var(--selected-ink); background: var(--mint); }
  .nav-more .nav-badge { position: absolute; top: .2rem; right: calc(50% - 1.35rem); }
  .nav-link { flex-basis: 0; }
  .nav-glyph { width: 1.35rem; height: 1.35rem; }
  .nav-plus { display: none; }
  .account { display: none; }
  .as-sheet .modal { width: 100%; height: auto; max-height: 88dvh; border-radius: 1.4rem 1.4rem 0 0; animation: slide-up .35s var(--ease) both; }
  .modal-backdrop.as-sheet { justify-items: stretch; }
  @keyframes slide-up { from { transform: translateY(100%); } }
  .device-tile.kind-lighting { grid-column: auto; }
  .toast-host { bottom: calc(6.4rem + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 40rem) {
  .pay-dialog { grid-template-columns: 1fr; }
  .donut-layout { grid-template-columns: 1fr; justify-items: center; }
  .donut { width: min(15rem, 100%); }
  .category-list { width: 100%; }
  .pay-banner { grid-template-columns: auto 1fr; }
  .pay-banner .primary { grid-column: 1 / -1; }
  .modal-backdrop:not(.as-sheet) { align-items: end; padding: 0; }
  .modal-backdrop:not(.as-sheet) .modal { width: 100%; max-height: 92dvh; border-radius: 1.4rem 1.4rem 0 0; }
  .category-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .payment-feed li { grid-template-columns: auto 1fr auto; }
  .payment-feed time { display: none; }
  .label-text { display: none; }
  #theme-toggle { display: none; }
  .quick-actions { grid-template-columns: 1fr 1fr; }
  .quick-action { flex-direction: column; align-items: flex-start; min-height: 7.2rem; }
  .quick-arrow { display: none; }
  .issue-stepper .step-label { font-size: .6rem; }
}

/* Fine-tuning */
.vote-result { margin-top: 1.1rem; }
.category-name { flex-wrap: wrap; row-gap: 0; }
.category-name .subtle { flex-basis: 100%; margin-left: 1.15rem; }
.paper-tile { justify-content: flex-start; }
.barcode-card img { image-rendering: auto; }
.tone-cert .quick-icon, .paper-icon { flex: 0 0 auto; }

/* Kontakt i zadnja uplata */
.last-payment { background: var(--balance-bg); border-color: var(--balance-border); }
.last-payment-amount { font-size: 1.9rem; font-weight: 820; letter-spacing: -.04em; font-variant-numeric: tabular-nums; color: var(--green); }
.contact-fab {
  position: fixed; z-index: 45; right: max(1.2rem, env(safe-area-inset-right, 0px)); bottom: calc(1.2rem + env(safe-area-inset-bottom, 0px));
  display: inline-flex; align-items: center; gap: .5rem;
  min-height: 3.2rem; padding: .6rem 1.15rem .6rem .95rem; border-radius: .95rem; color: #fff; font-weight: 760;
  background: linear-gradient(135deg, #1a54a0, #0d376e); box-shadow: 0 14px 30px -12px rgba(13, 110, 76, .85); animation: zoom .5s .4s var(--spring) both;
}
.contact-fab:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -12px rgba(13, 110, 76, .95); }
body.public-page .contact-fab, body.modal-open .contact-fab { display: none; }
.settings-contact { padding: .9rem; border-radius: 1rem; background: var(--wash-soft); border: 1px solid var(--hairline); gap: .6rem; }
.settings-contact .secondary { justify-self: start; }
.inquiry-history h3 { margin-top: .4rem; }
.inquiry-card { display: grid; gap: .35rem; padding: .85rem 1rem; border-radius: 1rem; border: 1px solid var(--border); background: var(--wash-soft); }
.inquiry-answer { display: grid; gap: .2rem; margin-top: .3rem; padding: .7rem .85rem; border-radius: .8rem; background: var(--mint); box-shadow: inset 3px 0 0 var(--in); }
@media (max-width: 51rem) {
  .contact-fab { bottom: calc(5.6rem + env(safe-area-inset-bottom, 0px)); right: .9rem; min-height: 3rem; width: 3rem; padding: 0; border-radius: 50%; justify-content: center; gap: 0; }
  .contact-fab span { display: none; }
}

.stale-note { display: inline-flex; margin-top: .3rem; padding: .15rem .55rem; border-radius: 1rem; font-size: .74rem; font-weight: 650; color: var(--amber); background: #e08a4a1f; }
