/* =====================================================================
   DateBuddy design system
   Tamni premium interfejs: duboka navy pozadina, tirkizni primarni akcenat,
   ljubičasta/roze za napredak, zlatna samo za Playing Master.
   Prepoznatljiv motiv: "signal bars" + vizuelno razdvajanje
   Činjenica (puna linija) / Moguće objašnjenje (isprekidano) / Preporuka (potez).
   ===================================================================== */

:root {
  --bg: #061521;
  --bg2: #091e2b;
  --panel: #0b2635;
  --panel2: #0e2d3e;
  --border: #1b4658;
  --border-soft: #143545;
  --primary: #20e5c2;
  --primary-ink: #04201b;
  --purple: #a85cff;
  --pink: #ed4fb1;
  --blue: #3697ff;
  --gold: #ffc43d;
  --text: #f5f8fa;
  --muted: #8fa9b5;
  --dim: #5f7d8b;
  --danger: #ff5d73;
  --ok: #3ddc97;
  --warn: #ffb547;
  --grad: linear-gradient(90deg, #20e5c2, #3697ff 55%, #ed4fb1);
  --grad-progress: linear-gradient(90deg, #a85cff, #ed4fb1);
  --radius: 10px;
  --radius-sm: 7px;
  --radius-lg: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --nav-h: 64px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f4f8fa;
  --bg2: #eaf1f5;
  --panel: #ffffff;
  --panel2: #f6fafc;
  --border: #cfdee6;
  --border-soft: #e1ebf0;
  --primary: #0ca88d;
  --primary-ink: #ffffff;
  --text: #0b2230;
  --muted: #4f6c7a;
  --dim: #7b95a2;
  --purple: #7b3ee0;
  --pink: #c92f8f;
  --blue: #1f6fd6;
  --gold: #b98200;
  --shadow: 0 10px 30px rgba(10, 40, 60, .10);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.15; letter-spacing: -.015em; font-weight: 800; }
h1 { font-size: clamp(2rem, 5.2vw, 3.6rem); letter-spacing: -.03em; }
h2 { font-size: clamp(1.55rem, 3.4vw, 2.3rem); letter-spacing: -.025em; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 1em; }
small, .small { font-size: .85rem; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
hr { border: 0; border-top: 1px solid var(--border-soft); margin: 24px 0; }
code { background: var(--bg2); padding: 1px 6px; border-radius: 4px; font-size: .9em; word-break: break-all; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 760px; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Ikonice ---------- */
.ic { display: inline-block; width: 18px; height: 18px; flex: none; vertical-align: middle; }
.ic svg { width: 100%; height: 100%; }
.ic-lg { width: 28px; height: 28px; }
.ic-xl { width: 40px; height: 40px; }
.c-primary { color: var(--primary); } .c-purple { color: var(--purple); } .c-pink { color: var(--pink); }
.c-blue { color: var(--blue); } .c-gold { color: var(--gold); } .c-muted { color: var(--muted); } .c-danger { color: var(--danger); }

/* ---------- Dugmad (tekst na tamnim/obojenim pozadinama je uvek eksplicitan) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  background: var(--primary); color: var(--primary-ink);
  font: inherit; font-weight: 700; font-size: .95rem; line-height: 1.2;
  cursor: pointer; text-decoration: none; white-space: normal; text-align: center;
  transition: transform .12s ease, background-color .15s ease, border-color .15s ease;
}
a.btn, a.btn:hover, a.btn:visited { color: var(--primary-ink); text-decoration: none; }
.btn:hover { background: #3bf0d0; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-loading { opacity: .6; pointer-events: none; }
.btn .ic { width: 16px; height: 16px; }
.btn-ghost, a.btn-ghost, a.btn-ghost:visited { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover, a.btn-ghost:hover { background: var(--panel2); color: var(--text); border-color: var(--primary); }
.btn-soft, a.btn-soft, a.btn-soft:visited { background: var(--panel2); color: var(--text); border-color: var(--border-soft); }
.btn-soft:hover, a.btn-soft:hover { background: var(--panel); color: var(--text); border-color: var(--border); }
.btn-danger, a.btn-danger, a.btn-danger:visited { background: transparent; color: var(--danger); border-color: rgba(255, 93, 115, .45); }
.btn-danger:hover { background: rgba(255, 93, 115, .12); color: var(--danger); }
.btn-danger-solid, a.btn-danger-solid { background: var(--danger); color: #ffffff; }
.btn-danger-solid:hover { background: #ff7a8c; color: #ffffff; }
.btn-gold, a.btn-gold, a.btn-gold:visited { background: var(--gold); color: #2a1c00; }
.btn-gold:hover { background: #ffd36b; color: #2a1c00; }
.btn-sm { min-height: 36px; padding: 7px 14px; font-size: .88rem; }
.btn-xs { min-height: 30px; padding: 5px 10px; font-size: .8rem; }
.btn-block { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; color: var(--primary); font: inherit; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.link-danger { color: var(--danger); }

/* ---------- Kartice / paneli ---------- */
.card {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 20px;
}
.card-tight { padding: 14px 16px; }
.card-hover { transition: border-color .15s ease; }
.card-hover:hover { border-color: var(--border); }
a.card { display: block; color: var(--text); text-decoration: none; }
a.card:hover { border-color: var(--primary); text-decoration: none; }
.card h3 { margin-bottom: 6px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 28px 0 12px; }
.section-title h2, .section-title h3 { margin: 0; }
.kicker { display: inline-block; color: var(--primary); font-weight: 700; font-size: .9rem; margin-bottom: 8px; }

/* ---------- Oznake ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 9px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--bg2);
  color: var(--muted); font-size: .78rem; font-weight: 600; line-height: 1.6;
}
.tag-primary { color: var(--primary); border-color: rgba(32, 229, 194, .35); }
.tag-purple { color: var(--purple); border-color: rgba(168, 92, 255, .4); }
.tag-pink { color: var(--pink); border-color: rgba(237, 79, 177, .4); }
.tag-gold { color: var(--gold); border-color: rgba(255, 196, 61, .45); }
.tag-danger { color: var(--danger); border-color: rgba(255, 93, 115, .45); }
.tag-demo { color: #2a1c00; background: var(--warn); border-color: var(--warn); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; }

/* ---------- Forme ---------- */
label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: 6px; }
.field { margin-bottom: 16px; }
.hint { color: var(--muted); font-size: .84rem; margin-top: 6px; }
input[type=text], input[type=email], input[type=number], input[type=url], input[type=search], select, textarea {
  width: 100%;
  padding: 11px 13px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(32, 229, 194, .15); }
input::placeholder, textarea::placeholder { color: var(--dim); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; cursor: pointer; }
.check > span { min-width: 0; overflow-wrap: anywhere; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--primary); flex: none; }
.textarea-xl { min-height: 190px; font-size: 1.05rem; }
.counter { text-align: right; color: var(--dim); font-size: .8rem; margin-top: 4px; }

/* Čipovi za izbor (radio/checkbox) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 13px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg2);
  color: var(--muted); font-size: .9rem; font-weight: 600; cursor: pointer;
}
.chip input:checked + span { border-color: var(--primary); color: var(--text); background: rgba(32, 229, 194, .10); }
.chip input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.chip .ic { width: 16px; height: 16px; }

/* ---------- Obaveštenja ---------- */
.notice { padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg2); font-size: .93rem; }
.notice + .notice { margin-top: 10px; }
.notice-ok { border-color: rgba(61, 220, 151, .45); }
.notice-error { border-color: rgba(255, 93, 115, .5); color: var(--text); }
.notice-warn { border-color: rgba(255, 181, 71, .5); }
.notice-care { border-color: rgba(168, 92, 255, .55); background: rgba(168, 92, 255, .08); }
.notice-privacy { display: flex; gap: 10px; align-items: flex-start; border-style: dashed; color: var(--muted); }
.flash-stack { position: fixed; top: 16px; right: 16px; z-index: 90; display: grid; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
.flash-stack .notice { box-shadow: var(--shadow); background: var(--panel); }

/* ---------- Javni header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(6, 21, 33, .86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border-soft); }
:root[data-theme="light"] .site-header { background: rgba(244, 248, 250, .9); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: var(--nav-h); }
.brand img { height: 50px; width: auto; }
.brand { flex: none; }
.site-nav { display: flex; gap: 22px; flex: 1; font-size: .93rem; margin-left: 64px; }
@media (max-width: 1080px) { .site-nav { margin-left: 28px; } }
.site-nav a { color: var(--muted); font-weight: 600; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--text); text-decoration: none; }
.header-actions { display: flex; gap: 10px; align-items: center; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border-radius: var(--radius-sm); border: 1px solid var(--border-soft);
  background: transparent; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { color: var(--text); border-color: var(--border); }
.menu-toggle { display: none; }
@media (max-width: 860px) {
  .site-nav { display: none; position: absolute; top: var(--nav-h); left: 0; right: 0; margin-left: 0; flex-direction: column; gap: 0; background: var(--bg); border-bottom: 1px solid var(--border-soft); padding: 8px 20px 16px; }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 0; border-bottom: 1px solid var(--border-soft); }
  .menu-toggle { display: inline-grid; }
  .header-actions .hide-sm { display: none; }
  .site-header .wrap { justify-content: space-between; }
  .brand img { height: 38px; }
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border-soft); margin-top: 64px; padding: 40px 0 28px; color: var(--muted); font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; }
.footer-grid b { display: block; color: var(--text); margin-bottom: 10px; }
.footer-grid a { display: block; color: var(--muted); margin-bottom: 6px; }
.footer-grid a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--border-soft); font-size: .84rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* ---------- App shell ---------- */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.app > div { min-width: 0; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--bg2); border-right: 1px solid var(--border-soft);
  padding: 18px 14px; display: flex; flex-direction: column; gap: 4px;
}
.sidebar .brand { padding: 4px 8px 16px; }
.sidebar .brand img { height: 36px; }
.side-link {
  display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: var(--radius-sm);
  color: var(--muted); font-weight: 600; font-size: .93rem;
}
.side-link:hover { background: var(--panel); color: var(--text); text-decoration: none; }
.side-link[aria-current="page"] { background: var(--panel); color: var(--text); box-shadow: inset 2px 0 0 var(--primary); }
.side-link .badge-count { margin-left: auto; background: var(--pink); color: #ffffff; font-size: .72rem; border-radius: 999px; padding: 0 7px; font-weight: 700; }
.side-sep { height: 1px; background: var(--border-soft); margin: 10px 4px; }
.side-player { margin-top: auto; padding: 12px; border: 1px solid var(--border-soft); border-radius: var(--radius); background: var(--panel); }
.side-player a { color: var(--text); }
.app-main { min-width: 0; padding: 26px 32px 60px; }
.app-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.app-top h1 { font-size: clamp(1.45rem, 3vw, 2rem); margin: 0; }
.app-mobile-bar { display: none; }
.mobile-nav { display: none; }
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .app-main { padding: 16px 16px 96px; }
  .app-mobile-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    position: sticky; top: 0; z-index: 30; height: 56px; padding: 0 16px;
    background: rgba(6, 21, 33, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border-soft);
  }
  :root[data-theme="light"] .app-mobile-bar { background: rgba(244, 248, 250, .94); }
  .app-mobile-bar img { height: 30px; width: auto; }
  .mobile-nav {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: var(--bg2); border-top: 1px solid var(--border-soft);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .mobile-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); font-size: .7rem; font-weight: 700; padding: 6px 2px; }
  .mobile-nav a[aria-current="page"] { color: var(--primary); }
  .mobile-nav a:hover { text-decoration: none; }
  .mobile-nav .ic { width: 22px; height: 22px; }
  .mobile-nav .nav-new { color: var(--primary-ink); }
  .mobile-nav .nav-new .bubble-plus { background: var(--primary); border-radius: 12px; width: 44px; height: 34px; display: grid; place-items: center; margin-top: -2px; }
}

/* ---------- Telefon mockup i oblačići ---------- */
.phone {
  position: relative;
  width: 100%; max-width: 380px;
  background: linear-gradient(165deg, #1a1446 0%, #0b2635 70%);
  border: 1px solid rgba(168, 92, 255, .55);
  border-radius: 30px; padding: 22px 18px 18px;
  box-shadow: 0 0 0 6px rgba(9, 30, 43, .9), 0 0 60px rgba(168, 92, 255, .25);
}
:root[data-theme="light"] .phone { background: linear-gradient(165deg, #1a1446 0%, #0b2635 70%); color: #f5f8fa; }
.phone-top { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid rgba(255, 255, 255, .08); font-size: .85rem; color: #8fa9b5; }
.phone-avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, #a85cff, #ed4fb1); }
.bubbles { display: flex; flex-direction: column; gap: 8px; }
.bubble { max-width: 82%; padding: 9px 13px; border-radius: 16px; font-size: .92rem; line-height: 1.4; background: #22394a; color: #f5f8fa; border-bottom-left-radius: 5px; }
.bubble.me { align-self: flex-end; background: #1d6fd8; border-bottom-left-radius: 16px; border-bottom-right-radius: 5px; }
.bubble-meta { font-size: .72rem; color: #8fa9b5; align-self: flex-end; margin-top: -4px; }
.bubble-meta.them { align-self: flex-start; }
.typing { align-self: flex-start; display: inline-flex; gap: 4px; padding: 10px 13px; background: #22394a; border-radius: 16px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: #8fa9b5; opacity: .5; }

/* Mini analiza unutar telefona */
.mini-analysis { margin-top: 14px; background: rgba(6, 21, 33, .85); border: 1px solid #1b4658; border-radius: 14px; padding: 14px; color: #f5f8fa; }
.mini-analysis .mv { font-weight: 800; font-size: 1.02rem; margin-bottom: 10px; }
.mini-row { display: flex; align-items: center; gap: 9px; font-size: .86rem; color: #c7d6dd; padding: 3px 0; }

/* ---------- Signal bars (motiv) ---------- */
.sbars { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; flex: none; }
.sbars i { display: block; width: 4px; border-radius: 1px; background: var(--border); }
.sbars i:nth-child(1) { height: 5px; } .sbars i:nth-child(2) { height: 9px; } .sbars i:nth-child(3) { height: 14px; }
.sbars.s1 i:nth-child(-n+1), .sbars.s2 i:nth-child(-n+2), .sbars.s3 i:nth-child(-n+3) { background: currentColor; }
.dir-positive { color: var(--ok); } .dir-negative { color: var(--danger); } .dir-neutral { color: var(--blue); } .dir-unclear { color: var(--warn); }

/* ---------- Činjenica / Hipoteza / Preporuka (ključni UX) ---------- */
.k-label { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 800; letter-spacing: .02em; margin-bottom: 8px; }
.k-fact .k-label { color: var(--primary); }
.k-hyp .k-label { color: var(--purple); }
.k-rec .k-label { color: var(--pink); }
.fact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.fact-list li {
  position: relative; padding: 10px 12px 10px 14px; border-radius: var(--radius-sm);
  background: var(--bg2); border: 1px solid var(--border-soft); border-left: 3px solid var(--primary);
  font-size: .95rem;
}
.hyp {
  border: 1.5px dashed rgba(168, 92, 255, .55); border-radius: var(--radius);
  padding: 14px 16px; background: rgba(168, 92, 255, .04);
}
.hyp + .hyp { margin-top: 10px; }
.hyp-head { display: flex; justify-content: space-between; gap: 8px 10px; align-items: flex-start; flex-wrap: wrap; }
.hyp-title { font-weight: 700; }
.hyp details { margin-top: 8px; font-size: .9rem; color: var(--muted); }
.hyp summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.hyp ul { margin: 6px 0 0; padding-left: 18px; }
.lk { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: .8rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; border: 1px solid; }
.lk-high { color: var(--purple); border-color: rgba(168, 92, 255, .6); background: rgba(168, 92, 255, .12); }
.lk-possible { color: var(--blue); border-color: rgba(54, 151, 255, .5); }
.lk-low { color: var(--muted); border-color: var(--border); }
.lk-insufficient { color: var(--warn); border-color: rgba(255, 181, 71, .5); border-style: dashed; }
.lk-meter { height: 4px; border-radius: 4px; background: var(--border-soft); margin-top: 10px; overflow: hidden; }
.lk-meter i { display: block; height: 100%; background: var(--purple); opacity: .75; }
.ai-estimate { font-size: .74rem; color: var(--dim); margin-top: 4px; }

.move {
  position: relative; border-radius: var(--radius-lg); padding: 22px;
  background: linear-gradient(var(--panel), var(--panel)) padding-box, var(--grad) border-box;
  border: 1.5px solid transparent;
}
.move-title { font-size: clamp(1.3rem, 3vw, 1.75rem); font-weight: 800; letter-spacing: -.02em; margin: 2px 0 10px; }
.move-why { color: var(--muted); margin-bottom: 12px; }
.move-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.principle { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--radius); border: 1px solid rgba(255, 196, 61, .35); background: rgba(255, 196, 61, .05); font-weight: 700; }
.principle .ic { color: var(--gold); }

/* Signal kartice */
.signal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); gap: 10px; }
.signal { padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border-soft); background: var(--bg2); }
.signal-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .78rem; color: var(--muted); font-weight: 700; margin-bottom: 6px; }
.signal-label { font-weight: 700; font-size: .95rem; }
.signal-detail { color: var(--muted); font-size: .86rem; margin-top: 4px; }
.signal-src { font-size: .72rem; color: var(--dim); }

/* ---------- Tabovi situacije ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border-soft); margin: 4px 0 22px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 10px 14px; color: var(--muted); font-weight: 700; font-size: .92rem; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--primary); }

/* ---------- Napredak / XP ---------- */
.bar { height: 8px; border-radius: 8px; background: var(--border-soft); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 8px; background: var(--grad-progress); }
.bar-primary i { background: var(--grad); }
.bar-gold i { background: linear-gradient(90deg, #ffc43d, #ffdf8a); }
.skill { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; }
.skill + .skill { margin-top: 12px; }
.skill-name { font-weight: 700; font-size: .92rem; }
.skill-val { font-weight: 800; font-variant-numeric: tabular-nums; }
.skill .bar { grid-column: 1 / -1; height: 6px; }
.xp-num { font-size: 2.1rem; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.level-badge { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; }
.level-badge .ic { width: 22px; height: 22px; }
.master { color: var(--gold); }

.ladder { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; position: relative; }
.ladder::before { content: ""; position: absolute; left: 10%; right: 10%; top: 30px; height: 2px; background: var(--border-soft); z-index: 0; }
.rung { position: relative; z-index: 1; text-align: center; font-size: .85rem; font-weight: 700; }
.rung .hx { width: 60px; height: 60px; margin: 0 auto 8px; display: grid; place-items: center; border-radius: 16px; background: var(--bg); border: 1px solid var(--border-soft); }
.rung .hx .ic { width: 34px; height: 34px; }
.rung small { display: block; color: var(--muted); font-weight: 600; }
.rung.done .hx { border-color: var(--border); }
.rung.current .hx { border-color: var(--primary); box-shadow: 0 0 22px rgba(32, 229, 194, .25); }
.rung.locked { opacity: .55; }
.rung.is-master.current .hx { border-color: var(--gold); box-shadow: 0 0 26px rgba(255, 196, 61, .3); }
@media (max-width: 560px) {
  .ladder { grid-auto-flow: row; grid-template-columns: 1fr; gap: 6px; }
  .ladder::before { display: none; }
  .rung { display: flex; align-items: center; gap: 12px; text-align: left; }
  .rung .hx { width: 44px; height: 44px; margin: 0; border-radius: 12px; }
  .rung .hx .ic { width: 26px; height: 26px; }
}

/* Dostignuća */
.ach { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--radius); border: 1px solid var(--border-soft); background: var(--panel); }
.ach-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--bg2); border: 1px solid var(--border-soft); flex: none; }
.ach-ic .ic { width: 24px; height: 24px; }
.ach.locked { opacity: .5; }
.ach.locked .ach-ic { filter: grayscale(1); }
.ach h4 { margin: 0 0 2px; }
.ach p { margin: 0; color: var(--muted); font-size: .88rem; }

/* XP knjiga */
.ledger { list-style: none; padding: 0; margin: 0; }
.ledger li { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border-soft); }
.ledger .xp { font-weight: 800; color: var(--primary); font-variant-numeric: tabular-nums; }
.ledger .why { color: var(--muted); font-size: .86rem; }

/* Rezultat odluke */
.score-ring { --v: 0; width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--primary) calc(var(--v) * 1%), var(--border-soft) 0); flex: none; }
.score-ring > div { width: 96px; height: 96px; border-radius: 50%; background: var(--panel); display: grid; place-items: center; text-align: center; line-height: 1.05; }
.score-ring b { font-size: 1.9rem; }
.score-ring small { color: var(--muted); font-size: .72rem; }
.score-sm { font-weight: 800; font-variant-numeric: tabular-nums; }

/* ---------- Liste situacija ---------- */
.sit-list { display: grid; gap: 10px; }
.sit-item { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--border-soft); border-radius: var(--radius); background: var(--panel); color: var(--text); }
a.sit-item:hover { border-color: var(--border); text-decoration: none; }
.sit-ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--bg2); color: var(--primary); }
.sit-title { font-weight: 700; }
.sit-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; color: var(--muted); font-size: .82rem; margin-top: 3px; }
.sit-side { text-align: right; font-size: .85rem; }
@media (max-width: 560px) { .sit-item { grid-template-columns: auto 1fr; } .sit-side { grid-column: 2; text-align: left; } }

/* Prazno stanje */
.empty { text-align: center; padding: 40px 20px; border: 1px dashed var(--border); border-radius: var(--radius); color: var(--muted); }
.empty h3 { color: var(--text); }

/* ---------- Predlozi poruka ---------- */
.msg-card { border: 1px solid var(--border-soft); border-radius: var(--radius); background: var(--panel); padding: 14px 16px; }
.msg-card .msg-text { font-size: 1rem; padding: 10px 12px; border-radius: 14px; border-bottom-right-radius: 5px; background: #1d6fd8; color: #ffffff; margin: 8px 0; white-space: pre-wrap; }
.msg-card textarea { min-height: 80px; margin: 8px 0; }
.msg-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.tone-neutral { color: var(--blue); } .tone-warm { color: var(--pink); } .tone-playful { color: var(--purple); } .tone-direct { color: var(--primary); }

/* ---------- Kreiranje situacije ---------- */
.convo-builder { display: grid; gap: 8px; }
.convo-row { display: grid; grid-template-columns: 110px 1fr 90px 36px; gap: 8px; align-items: start; }
.convo-row select, .convo-row input { padding: 9px 10px; font-size: .92rem; }
@media (max-width: 620px) { .convo-row { grid-template-columns: 1fr 36px; } .convo-row .cr-text { grid-column: 1 / -1; order: 3; } .convo-row .cr-time { display: none; } }
.dropzone { border: 1.5px dashed var(--border); border-radius: var(--radius); padding: 18px; text-align: center; color: var(--muted); cursor: pointer; }
.dropzone:hover, .dropzone.drag { border-color: var(--primary); color: var(--text); }
.steps-inline { display: flex; gap: 6px; align-items: center; color: var(--dim); font-size: .85rem; font-weight: 700; flex-wrap: wrap; }
.steps-inline .on { color: var(--primary); }

/* ---------- Tabele ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border-soft); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border-soft); vertical-align: top; }
th { color: var(--muted); font-weight: 700; font-size: .8rem; background: var(--bg2); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.stat { padding: 16px; border: 1px solid var(--border-soft); border-radius: var(--radius); background: var(--panel); }
.stat b { display: block; font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: .85rem; }

/* Mini bar chart */
.hbars { display: grid; gap: 8px; }
.hbar { display: grid; grid-template-columns: 150px 1fr 48px; gap: 10px; align-items: center; font-size: .88rem; }
.hbar .bar { height: 10px; }
.hbar .v { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .hbar { grid-template-columns: 1fr 44px; } .hbar .bar { grid-column: 1 / -1; grid-row: 2; } }

/* ---------- Modal ---------- */
dialog.modal { max-height: calc(100vh - 32px); overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--panel); color: var(--text); padding: 0; width: min(520px, calc(100vw - 32px)); box-shadow: var(--shadow); }
dialog.modal::backdrop { background: rgba(3, 10, 16, .7); }
.modal-body { padding: 24px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; padding: 0 24px 22px; flex-wrap: wrap; }
.xp-pop { text-align: center; }
.xp-pop .xp-big { font-size: 3rem; font-weight: 800; letter-spacing: -.03em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.xp-pop ul { list-style: none; padding: 0; margin: 14px 0; text-align: left; }
.xp-pop li { padding: 8px 0; border-bottom: 1px solid var(--border-soft); font-size: .92rem; }
.xp-pop li b { color: var(--primary); }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); z-index: 100; background: var(--panel); color: var(--text); border: 1px solid var(--border); padding: 10px 16px; border-radius: var(--radius-sm); box-shadow: var(--shadow); font-weight: 600; font-size: .92rem; }

/* ---------- Consent banner ---------- */
.consent {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 80;
  max-width: 560px; margin-left: auto;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 18px; box-shadow: var(--shadow);
}
.consent h3 { font-size: 1rem; margin-bottom: 6px; }
.consent p { color: var(--muted); font-size: .88rem; margin-bottom: 12px; }
.consent .opts { display: grid; gap: 8px; margin: 10px 0 14px; }
.consent .opts .check { font-size: .9rem; }
.consent .row { gap: 8px; }
@media (max-width: 960px) { .app-body .consent { bottom: 84px; } }

/* ---------- Share ---------- */
.share { display: flex; flex-wrap: wrap; gap: 6px; }
.share a, .share button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: var(--radius-sm); border: 1px solid var(--border-soft); color: var(--muted); background: transparent; font: inherit; font-size: .84rem; font-weight: 600; cursor: pointer; }
.share a:hover, .share button:hover { color: var(--text); border-color: var(--border); text-decoration: none; }
.share .ic { width: 15px; height: 15px; }

/* ======================= LANDING ======================= */
.hero { position: relative; padding: 56px 0 40px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -20% -10% auto 40%; height: 620px; background: radial-gradient(closest-side, rgba(168, 92, 255, .22), transparent 70%); pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 48px; align-items: center; }
.hero h1 { margin: 14px 0 18px; }
.hero-lead { font-size: 1.2rem; color: var(--muted); max-width: 30ch; margin-bottom: 26px; }
.hero-ctas { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-ticks { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 20px; color: var(--muted); font-size: .9rem; }
.hero-ticks span { display: inline-flex; gap: 6px; align-items: center; }
.hero-phone { display: flex; justify-content: center; position: relative; }
.float-tag { position: absolute; z-index: 2; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; font-size: .8rem; font-weight: 700; display: flex; gap: 8px; align-items: center; box-shadow: var(--shadow); }
.float-tag.ft-1 { right: 2%; top: -14px; }
.float-tag.ft-2 { left: 2%; bottom: -16px; }
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .float-tag { display: none; }
}

.l-section { padding: 64px 0; border-top: 1px solid var(--border-soft); }
.l-head { max-width: 640px; margin-bottom: 28px; }
.l-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.l-head p { color: var(--muted); font-size: 1.05rem; }

.situations-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 960px) { .situations-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .situations-row { grid-template-columns: 1fr; } }
.sit-card { display: flex; flex-direction: column; border: 1px solid var(--border-soft); border-radius: var(--radius); background: var(--panel); overflow: hidden; color: var(--text); }
a.sit-card:hover { border-color: var(--primary); text-decoration: none; }
.sit-card .scene { position: relative; height: 150px; padding: 14px; background: linear-gradient(150deg, #1b1546, #0b2635 70%); display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; overflow: hidden; }
.sit-card .scene.has-photo { background-size: cover; background-position: center; }
.sit-card .scene .bubble { font-size: .8rem; padding: 7px 10px; max-width: 90%; }
.sit-card .scene .seen { align-self: flex-end; font-size: .7rem; color: #8fa9b5; }
.sit-card .cap { display: flex; align-items: center; gap: 12px; padding: 14px 16px; font-weight: 800; }
.sit-card .cap .ic-wrap { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--bg2); flex: none; }

.flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; counter-reset: flow; }
.flow-step { position: relative; padding: 18px; border: 1px solid var(--border-soft); border-radius: var(--radius); background: var(--panel); }
.flow-step .n { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: .9rem; background: var(--bg2); color: var(--primary); border: 1px solid var(--border); margin-bottom: 12px; }
.flow-step p { color: var(--muted); font-size: .92rem; margin: 0; }
@media (max-width: 900px) { .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .flow { grid-template-columns: 1fr; } }

.fhr { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; align-items: stretch; }
.fhr > div { padding: 18px; border-radius: var(--radius); }
.fhr .k-fact { border: 1px solid var(--border-soft); border-left: 3px solid var(--primary); background: var(--panel); }
.fhr .k-hyp { border: 1.5px dashed rgba(168, 92, 255, .55); background: rgba(168, 92, 255, .04); }
.fhr .k-rec { background: linear-gradient(var(--panel), var(--panel)) padding-box, var(--grad) border-box; border: 1.5px solid transparent; }
.fhr .big { font-size: 1.15rem; font-weight: 700; margin: 4px 0 8px; }
.fhr p { color: var(--muted); font-size: .9rem; margin: 0; }
@media (max-width: 820px) { .fhr { grid-template-columns: 1fr; } }
.never { margin-top: 14px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font-size: .92rem; color: var(--muted); }
.never s { color: var(--danger); text-decoration-thickness: 2px; }

.example { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 22px; align-items: start; }
.example > *, .grid > *, .stack > * { min-width: 0; }
@media (max-width: 900px) { .example { grid-template-columns: minmax(0, 1fr); } }

.master-block { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; align-items: center; }
@media (max-width: 900px) { .master-block { grid-template-columns: 1fr; } }
.player-card { border-radius: var(--radius-lg); padding: 22px; background: linear-gradient(var(--panel), var(--panel)) padding-box, linear-gradient(140deg, rgba(255, 196, 61, .7), rgba(168, 92, 255, .5), rgba(32, 229, 194, .5)) border-box; border: 1.5px solid transparent; }
.outcome-card { border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 18px; background: var(--panel); }
.outcome-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.outcome-split > div { padding: 12px; border-radius: var(--radius-sm); background: var(--bg2); border: 1px solid var(--border-soft); }
.outcome-split b { display: block; font-size: 1.1rem; }

.pricing { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 860px; margin: 0 auto; }
@media (max-width: 720px) { .pricing { grid-template-columns: 1fr; } }
.plan { padding: 24px; border: 1px solid var(--border-soft); border-radius: var(--radius-lg); background: var(--panel); display: flex; flex-direction: column; }
.plan.featured { background: linear-gradient(var(--panel), var(--panel)) padding-box, var(--grad) border-box; border: 1.5px solid transparent; }
.plan .price { font-size: 2.2rem; font-weight: 800; letter-spacing: -.03em; margin: 8px 0 2px; }
.plan .price small { font-size: .95rem; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.plan ul { list-style: none; padding: 0; margin: 18px 0 22px; display: grid; gap: 9px; flex: 1; }
.plan li { display: flex; gap: 9px; align-items: flex-start; font-size: .94rem; }
.plan li .ic { color: var(--primary); width: 17px; height: 17px; margin-top: 3px; }

.faq details { border-bottom: 1px solid var(--border-soft); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--primary); font-weight: 800; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); margin: 10px 0 0; }

.final-cta { display: flex; gap: 22px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 28px; border-radius: var(--radius-lg); background: radial-gradient(500px 200px at 15% 0%, rgba(32, 229, 194, .10), transparent), var(--panel); border: 1px solid var(--border-soft); }
.final-cta img { height: 72px; width: auto; }

/* Pravne/tekstualne stranice */
.prose { max-width: 72ch; }
.prose h2 { font-size: 1.35rem; margin-top: 32px; }
.prose h3 { font-size: 1.05rem; margin-top: 22px; }
.prose p, .prose li { color: var(--muted); }
.prose strong { color: var(--text); }
.prose ul { padding-left: 20px; }
.page-head { padding: 44px 0 18px; }

/* Auth */
.auth-wrap { min-height: calc(100vh - var(--nav-h)); display: grid; place-items: center; padding: 32px 16px; }
.auth-card { width: 100%; max-width: 440px; }

/* Admin */
.admin-body .sidebar { background: #071a26; }
:root[data-theme="light"] .admin-body .sidebar { background: #e6eef3; }
.admin-flag { font-size: .72rem; font-weight: 800; color: var(--warn); padding: 0 10px 8px; }
.inline-form { display: inline; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filters input, .filters select { width: auto; min-width: 160px; padding: 8px 10px; font-size: .9rem; }

.dash-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; }
.split-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; }
@media (max-width: 1100px) { .dash-grid, .split-grid { grid-template-columns: 1fr; } }

/* Pomoćno */
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 36px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.w-100 { width: 100%; }
[hidden] { display: none !important; }
.spinner { width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.analyzing { text-align: center; padding: 40px 16px; }
.analyzing .sbars { height: 28px; gap: 4px; color: var(--primary); }
.analyzing .sbars i { width: 8px; animation: pulse 1.2s ease-in-out infinite; }
.analyzing .sbars i:nth-child(1) { height: 10px; } .analyzing .sbars i:nth-child(2) { height: 18px; animation-delay: .15s; } .analyzing .sbars i:nth-child(3) { height: 28px; animation-delay: .3s; }
@keyframes pulse { 0%, 100% { background: var(--border); } 50% { background: var(--primary); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .sidebar, .mobile-nav, .app-mobile-bar, .site-header, .site-footer, .consent, .btn { display: none !important; }
  body { background: #fff; color: #000; }
}
.link-btn.small, .side-link.link-btn { font-size: .88rem; }
.link-btn.small { font-size: .85rem; }
.site-header .btn { white-space: nowrap; }
@media (max-width: 400px) { .site-header .wrap { gap: 10px; } .header-actions { gap: 6px; } .site-header .btn-sm { padding: 7px 11px; } }
.brand { flex: none; }
@media (max-width: 360px) { .site-header [data-theme-toggle] { display: none; } }

/* =====================================================================
   VIZUELNI IZVEŠTAJ SITUACIJE (dashboard)
   ===================================================================== */
:root {
  --rp-card: linear-gradient(145deg, #0b2638, #0a2031);
  --rp-border: #214158;
  --rp-track: #16364a;
  --rp-teal: #2cebd9; --rp-teal-bg: #0c414b;
  --rp-purple: #bd67ff; --rp-purple-bg: #352450;
  --rp-orange: #ffad48; --rp-orange-bg: #493626;
  --rp-pink: #fa63ad; --rp-pink-bg: #43263f;
  --rp-lavender: #9d9bff; --rp-lavender-bg: #2a2f5a;
}
:root[data-theme="light"] {
  --rp-card: linear-gradient(145deg, #ffffff, #f4f9fb);
  --rp-border: #d4e3ea;
  --rp-track: #e3edf2;
  --rp-teal: #0ca88d; --rp-teal-bg: #d9f5ef;
  --rp-purple: #8a3fe0; --rp-purple-bg: #eee3fb;
  --rp-orange: #d98012; --rp-orange-bg: #fdeedb;
  --rp-pink: #d23c8a; --rp-pink-bg: #fbe3ef;
  --rp-lavender: #5b58d6; --rp-lavender-bg: #e6e6fb;
}
.rp-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rp-pill { display: inline-flex; align-items: center; gap: 10px; padding: 11px 22px; border-radius: 999px; background: var(--rp-teal-bg); color: var(--rp-teal); font-weight: 800; }
.rp-pill .ic { width: 20px; height: 20px; }
.rp-pill.rp-trend-flat { background: var(--rp-lavender-bg); color: var(--rp-lavender); }
.rp-pill.rp-trend-down { background: var(--rp-pink-bg); color: var(--rp-pink); }
.rp-btn { border-radius: 999px; border-color: rgba(32, 229, 194, .55); }

.report { margin-bottom: 8px; }
.rp-card { background: var(--rp-card); border: 1px solid var(--rp-border); border-radius: 16px; min-width: 0; }
.rp-top { display: grid; grid-template-columns: minmax(0, 2.5fr) repeat(4, minmax(0, 1fr)); gap: 14px; }
.rp-score { display: flex; align-items: center; gap: 30px; padding: 24px; min-height: 240px; }
.rp-ring, .rp-sring {
  --v: 0; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle, var(--panel) 58%, transparent 59.5%), conic-gradient(var(--rp-teal) calc(var(--v) * 1%), var(--rp-track) 0);
}
.rp-ring { width: 196px; height: 196px; box-shadow: 0 0 34px rgba(24, 215, 197, .18); }
.rp-ring > div, .rp-sring > div { display: flex; flex-direction: column; align-items: center; text-align: center; line-height: 1.05; }
.rp-ring strong { font-size: 3.6rem; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.rp-ring small { color: var(--muted); font-size: 1rem; margin-top: 4px; }
.rp-ring em, .rp-sring em { font-style: normal; color: var(--muted); font-size: .82rem; margin-top: 8px; }
.rp-ring.is-empty, .rp-sring.is-empty { box-shadow: none; }
.rp-score-text h2 { font-size: clamp(1.6rem, 2.6vw, 2.25rem); line-height: 1.08; margin: 0 0 14px; }
.rp-score-text p { color: var(--muted); margin: 0 0 10px; line-height: 1.6; }
.rp-note { display: block; font-size: .78rem; color: var(--dim); }
.rp-metric { display: flex; flex-direction: column; justify-content: center; padding: 22px 20px; }
.rp-ico { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 16px; }
.rp-ico .ic { width: 26px; height: 26px; }
.rp-metric > b { font-size: 1rem; min-height: 2.6em; line-height: 1.3; }
.rp-metric > strong { font-size: 2.3rem; font-weight: 800; margin: 6px 0 12px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.rp-reason { color: var(--dim); font-size: .76rem; line-height: 1.35; margin-top: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.rp-teal { color: var(--rp-teal); background: var(--rp-teal-bg); }
.rp-purple { color: var(--rp-purple); background: var(--rp-purple-bg); }
.rp-orange { color: var(--rp-orange); background: var(--rp-orange-bg); }
.rp-pink { color: var(--rp-pink); background: var(--rp-pink-bg); }
.rp-lavender { color: var(--rp-lavender); background: var(--rp-lavender-bg); }
.rp-bar { height: 14px; border-radius: 10px; background: var(--rp-track); overflow: hidden; }
.rp-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #58f0df, #2fdcc8); }
.rp-bar-purple i { background: linear-gradient(90deg, #b858ff, #c98aff); }
.rp-bar-orange i { background: linear-gradient(90deg, #ffb14b, #ff9a45); }
.rp-bar-pink i { background: linear-gradient(90deg, #ff4d9e, #ff8cc6); }
.rp-bar-lavender i { background: linear-gradient(90deg, #8f8dff, #b0aeff); }
.rp-bar.is-dashed { background: repeating-linear-gradient(90deg, var(--rp-track) 0 8px, transparent 8px 14px); }
.rp-foot { color: var(--dim); font-size: .78rem; margin: 8px 2px 0; }

.rp-mid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 14px; margin-top: 14px; }
.rp-bottom { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr) minmax(0, 1.55fr); gap: 14px; margin-top: 14px; }
.rp-panel { padding: 20px 24px; display: flex; flex-direction: column; }
.rp-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.rp-head h3 { margin: 0; font-size: 1.25rem; }
.rp-head span { color: var(--dim); font-size: .76rem; }
.rp-row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 64px; gap: 14px; align-items: center; margin: 12px 0; }
.rp-row label, .rp-factor label { margin: 0; font-weight: 500; font-size: .95rem; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.rp-row b, .rp-factor b { text-align: right; font-variant-numeric: tabular-nums; font-size: .95rem; }
.rp-na { color: var(--warn); font-size: .72rem; font-weight: 700; white-space: normal; line-height: 1.2; display: inline-block; }
.rp-factor { display: grid; grid-template-columns: 30px minmax(0, 1.1fr) minmax(0, 1fr) 64px; gap: 12px; align-items: center; margin: 9px 0; }
.rp-fic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; }
.rp-fic .ic { width: 17px; height: 17px; }
.rp-factor b { color: var(--muted); font-weight: 600; font-size: .85rem; }
.rp-link { margin-top: auto; padding-top: 10px; font-size: .86rem; font-weight: 700; }

.rp-tone { min-height: 270px; }
.rp-tone .rp-chart { margin-top: auto; }
.rp-tone .rp-labels { margin-bottom: auto; }
.rp-chart { border-bottom: 1px solid var(--rp-border); }
.tone-svg { width: 100%; height: auto; display: block; }
.tone-guide { stroke: var(--rp-border); stroke-dasharray: 4 5; }
.rp-labels { display: flex; justify-content: space-between; gap: 6px; color: var(--muted); font-size: .8rem; margin-top: 10px; }
.rp-labels span { flex: 1; text-align: center; }
.rp-labels span:first-child { text-align: left; } .rp-labels span:last-child { text-align: right; }
.rp-empty { flex: 1; display: grid; place-items: center; text-align: center; color: var(--muted); border: 1px dashed var(--rp-border); border-radius: 12px; padding: 18px; }
.rp-empty p { margin: 8px 0 0; font-size: .9rem; max-width: 34ch; }
.rp-recommend { text-align: center; }
.rp-recommend .rp-head { justify-content: flex-start; }
.rp-sring { width: 140px; height: 140px; margin: 0 auto 12px; box-shadow: 0 0 26px rgba(24, 215, 197, .16); }
.rp-sring strong { font-size: 2.2rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.rp-recommend h2 { font-size: 1.15rem; margin: 0 0 4px; line-height: 1.3; }
.rp-step { display: flex; align-items: center; gap: 14px; min-height: 54px; margin: 6px 0; padding: 7px 14px 7px 8px; border: 1px solid var(--rp-border); border-radius: 999px; color: var(--text); }
.rp-step:hover { border-color: var(--primary); text-decoration: none; }
.rp-step i { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 800; background: #22e2d2; color: #07202d; }
.rp-step:nth-of-type(2) i { background: #a54fff; color: #ffffff; }
.rp-step:nth-of-type(3) i { background: #687db5; color: #ffffff; }
.rp-step span { flex: 1; font-size: .95rem; line-height: 1.3; }
.rp-step b { color: var(--muted); font-size: 1.2rem; }

.detail-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 44px 0 6px; padding-top: 26px; border-top: 1px solid var(--border-soft); scroll-margin-top: 70px; }
.detail-head h2 { margin: 0 0 4px; }

@media (max-width: 1280px) {
  .rp-top { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rp-score { grid-column: 1 / -1; }
}
@media (max-width: 1100px) {
  .rp-mid, .rp-bottom { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .rp-top { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .rp-score { flex-direction: column; text-align: center; gap: 16px; padding: 22px 16px; min-height: 0; }
  .rp-ring { width: 160px; height: 160px; }
  .rp-ring strong { font-size: 2.9rem; }
  .rp-metric { padding: 16px 14px; }
  .rp-ico { width: 44px; height: 44px; margin-bottom: 10px; }
  .rp-metric > strong { font-size: 1.9rem; margin: 4px 0 10px; }
  .rp-panel { padding: 18px 16px; }
  .rp-row { grid-template-columns: minmax(0, 1fr) 64px; gap: 6px 10px; }
  .rp-row label { grid-column: 1 / -1; white-space: normal; }
  .rp-factor { grid-template-columns: 30px minmax(0, 1fr) 58px; }
  .rp-factor .rp-bar { grid-column: 2 / 3; grid-row: 2; }
  .rp-factor label { white-space: normal; }
  .rp-actions { width: 100%; }
  .rp-pill { padding: 9px 16px; }
}

@media (min-width: 1281px) and (max-width: 1560px) {
  .rp-score { gap: 22px; padding: 22px 20px; }
  .rp-ring { width: 160px; height: 160px; }
  .rp-ring strong { font-size: 2.9rem; }
  .rp-score-text h2 { font-size: 1.65rem; }
  .rp-score-text p { font-size: .92rem; line-height: 1.5; }
}

.rung-alt { color: var(--muted); font-weight: 600; }
.lvl-edit { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 90px; gap: 6px; align-items: center; }
.lvl-edit input { padding: 8px 9px; font-size: .9rem; }

.rung.is-legend .hx { border-color: #ff7ac8; box-shadow: 0 0 26px rgba(255, 122, 200, .3); background: linear-gradient(145deg, rgba(255,196,61,.08), rgba(168,92,255,.10)); }
.rung.is-legend.locked .hx { box-shadow: none; }
.legend-text { background: linear-gradient(90deg, #ffc43d, #ff7ac8 55%, #a85cff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.req-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.req-list li { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; font-size: .9rem; }
.req-list .req-bar { grid-column: 2 / -1; height: 5px; }
.req-ok { color: var(--primary); } .req-no { color: var(--dim); }

/* Hero fotografija — slika ispunjava ceo hero, bez okvira i senke */
.hero-photo { padding: 0; background: #001121; color-scheme: dark;
  --text: #f5f8fa; --muted: #b3c6cf; --primary: #20e5c2; --primary-ink: #04201b; --border: #2a5466; --panel: #0b2635; }
.hero-photo::before { display: none; }
.hero-photo .hero-bg img { display: block; width: 100%; height: auto; }
.hero-inner { position: relative; z-index: 1; color: var(--text); }
.hero-photo h1 { font-size: clamp(2.2rem, 5.6vw, 4.1rem); line-height: 1.05; margin: 14px 0 20px; max-width: 11ch; }
.hero-photo .hero-lead { max-width: 34ch; }
.hero-photo.hero-m { background: #010c17; }
.aud-switch { display: flex; width: max-content; gap: 2px; padding: 3px; margin-bottom: 18px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 999px; background: rgba(0, 18, 35, .55); backdrop-filter: blur(6px); }
.aud-switch a { padding: 5px 14px; border-radius: 999px; font-size: .82rem; font-weight: 700; color: var(--muted); text-decoration: none; }
.aud-switch a:hover { color: var(--text); }
.aud-switch a[aria-current] { background: rgba(32, 229, 194, .16); color: var(--primary); }
.addr-ask { border-color: rgba(32, 229, 194, .45); }
@media (min-width: 961px) {
  .hero-photo { display: flex; align-items: center; min-height: clamp(560px, calc(100vh - var(--nav-h)), 700px); }
  .hero-photo .hero-bg { position: absolute; inset: 0; display: flex; justify-content: flex-end; overflow: hidden; padding-right: max(0px, calc((100% - 1180px) / 2 - 120px)); }
  .hero-photo .hero-bg img { width: auto; height: 100%; max-width: none; flex: none; }
  .hero-photo h1, .hero-photo .hero-lead, .hero-photo .hero-ticks { text-shadow: 0 2px 22px rgba(0, 18, 35, .85); }
  .hero-photo .grad-text { text-shadow: none; }
  .hero-inner { padding-top: 56px; padding-bottom: 56px; }
}
@media (max-width: 960px) {
  .hero-photo { display: flex; flex-direction: column-reverse; }
  .hero-inner { padding-top: 36px; padding-bottom: 8px; }
  .hero-photo .hero-bg img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 70% 50%; }
  .hero-photo.hero-m .hero-bg img { object-position: 72% 50%; }
}

@media (max-width: 360px) { .site-header .brand img { height: 32px; } }

/* =====================================================================
   PORUDŽBINA I PREDRAČUN (offline plaćanje, IPS QR)
   ===================================================================== */
.tag-warn { background: rgba(255, 181, 71, .14); color: var(--warn); border-color: rgba(255, 181, 71, .35); }
.order-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 900px) { .order-grid { grid-template-columns: minmax(0, 1fr); } }
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg label { flex: 1 1 160px; margin: 0; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; text-align: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); font-weight: 700; font-size: .92rem; color: var(--muted); }
.seg input:checked + span { border-color: var(--primary); color: var(--primary); background: rgba(32, 229, 194, .08); }
.seg input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.ips-card { display: flex; gap: 22px; align-items: center; margin-bottom: 18px; border-color: rgba(32, 229, 194, .45); }
.ips-card .ips-qr { flex: none; width: 168px; }
.ips-qr { background: #fff; padding: 10px; border-radius: 10px; line-height: 0; }
.ips-qr svg, .ips-qr img { width: 100%; height: auto; display: block; }
@media (max-width: 560px) { .ips-card { flex-direction: column; text-align: center; } .ips-card .ips-qr { width: 200px; } }

.proforma { background: #fff; color: #14212b; border-radius: 12px; padding: 40px 44px; max-width: 860px; font-size: .92rem; line-height: 1.5; }
.proforma a { color: #0b7d69; }
.proforma table { border-collapse: collapse; width: auto; font-size: inherit; }
.proforma th, .proforma td { background: none; color: inherit; border-bottom: 0; padding: 0; white-space: normal; }
.proforma .pf-items { width: 100%; }
.pf-head { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-bottom: 22px; border-bottom: 2px solid #14212b; }
.pf-logo { height: 40px; width: auto; display: block; margin-bottom: 12px; background: #061521; padding: 6px 10px; border-radius: 8px; box-sizing: content-box; }
.pf-seller { font-size: .86rem; color: #3b4d59; }
.pf-seller strong { color: #14212b; font-size: .98rem; }
.pf-meta h2 { font-size: 1.5rem; letter-spacing: .08em; margin: 0 0 8px; color: #14212b; text-align: right; }
.pf-meta td { padding: 2px 0 2px 16px; font-size: .88rem; white-space: nowrap; }
.pf-meta td:first-child { color: #5d707c; padding-left: 0; }
.pf-meta td:last-child { text-align: right; }
.pf-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #5d707c; font-weight: 700; margin-bottom: 4px; }
.pf-buyer { margin: 22px 0; padding: 14px 16px; background: #f3f6f8; border-radius: 8px; max-width: 420px; }
.pf-items { width: 100%; margin: 8px 0 10px; }
.proforma .pf-items th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: #5d707c; border-bottom: 1px solid #c9d4db; padding: 8px 8px 8px 0; white-space: nowrap; }
.proforma .pf-items td { padding: 12px 8px 12px 0; border-bottom: 1px solid #e3e9ed; vertical-align: top; }
.proforma .pf-items .num { text-align: right; white-space: nowrap; padding-right: 0; padding-left: 8px; }
.proforma .pf-items tfoot td { border-bottom: 0; font-size: 1.02rem; padding-top: 14px; }
.pf-small { font-size: .82rem; color: #5d707c; }
.pf-note { font-size: .84rem; color: #3b4d59; margin: 6px 0 22px; }
.pf-pay { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; flex-wrap: wrap; padding: 18px; border: 1px solid #c9d4db; border-radius: 10px; }
.proforma .pf-pay td { padding: 3px 14px 3px 0; font-size: .88rem; vertical-align: top; }
.proforma .pf-pay td:first-child { color: #5d707c; white-space: nowrap; }
.pf-qr { flex: none; }
.pf-qr { width: 150px; text-align: center; font-size: .72rem; color: #5d707c; }
.pf-qr .ips-qr { padding: 0; margin-bottom: 6px; }
.pf-foot { font-size: .78rem; color: #5d707c; margin: 20px 0 0; }
@media (max-width: 640px) {
  .proforma { padding: 22px 18px; }
  .pf-meta h2 { text-align: left; }
  .pf-items th:nth-child(3), .pf-items td:nth-child(3), .pf-items th:nth-child(4), .pf-items td:nth-child(4) { display: none; }
  .pf-items tfoot td[colspan] { text-align: left; }
}
@media print {
  .no-print, .flash-stack, .notice { display: none !important; }
  .app, .app > div, main, .app-main { display: block !important; padding: 0 !important; margin: 0 !important; }
  :root, html, body { background: #fff !important; color-scheme: light; }
  .proforma { max-width: none; padding: 0; border-radius: 0; font-size: 10.5pt; }
  .pf-head, .pf-pay { flex-wrap: nowrap; }
  .pf-pay { break-inside: avoid; }
  .pf-logo { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  @page { margin: 16mm; }
}
.order-list td { vertical-align: middle; }
