/* ═══════════════════════════════════════════════════════════════
   KLOPIO — dizajn sistem v2 (zajednički za sve strane)
   Tamna tema je podrazumevana; svetla preko [data-theme="light"]
   ═══════════════════════════════════════════════════════════════ */

:root {
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --bg:        #060d0b;
  --bg-2:      #08110f;
  --panel:     #0c1714;
  --panel-2:   #0f1c18;
  --panel-3:   #13231e;
  --line:      #1c2e29;
  --line-2:    #2a3d37;
  --text:      #f3f4ef;
  --muted:     #97a49e;
  --muted-2:   #6b7a73;

  --gold:      #f0cc55;
  --gold-2:    #f6da7a;
  --gold-ink:  #16150d;
  --gold-text: #f0cc55;
  --gold-soft: rgba(240, 204, 85, .08);
  --gold-line: rgba(240, 204, 85, .38);

  --green:     #1fc77f;
  --green-bg:  rgba(31, 199, 127, .09);
  --green-line:rgba(31, 199, 127, .35);
  --red:       #ef4d6d;
  --red-bg:    rgba(239, 77, 109, .09);
  --blue:      #3aa7e6;
  --osm:       #9ccb52;
  --osm-bg:    rgba(156, 203, 82, .08);
  --osm-line:  rgba(156, 203, 82, .35);

  --r-xs: 8px; --r-sm: 10px; --r: 14px; --r-lg: 18px; --r-pill: 999px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .28);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, .5);
  --ease: cubic-bezier(.2, .7, .2, 1);

  color-scheme: dark;
}

[data-theme="light"] {
  --bg:        #f5f3ec;
  --bg-2:      #efece3;
  --panel:     #ffffff;
  --panel-2:   #faf8f2;
  --panel-3:   #f1eee4;
  --line:      #e3dfd2;
  --line-2:    #d3cebe;
  --text:      #141a17;
  --muted:     #5f6b66;
  --muted-2:   #8a948f;
  --gold:      #f0cc55;
  --gold-2:    #e8bf3c;
  --gold-text: #8a6a06;
  --gold-soft: rgba(240, 204, 85, .16);
  --gold-line: rgba(184, 142, 20, .45);
  --green:     #0f9960;
  --green-bg:  rgba(15, 153, 96, .08);
  --green-line:rgba(15, 153, 96, .35);
  --osm:       #4f7d12;
  --osm-bg:    rgba(79, 125, 18, .07);
  --osm-line:  rgba(79, 125, 18, .3);
  --shadow: 0 8px 24px rgba(40, 35, 20, .08);
  --shadow-lg: 0 24px 60px rgba(40, 35, 20, .14);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }

/* Ikone */
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic-sm { width: 16px; height: 16px; }
.ic-lg { width: 24px; height: 24px; }
.ic-fill { fill: currentColor; }

/* Logo */
.logo { display: inline-flex; align-items: baseline; gap: 5px; font-weight: 800; font-size: 26px; letter-spacing: -.05em; line-height: 1; color: var(--text); }
.logo::after { content: ''; width: .34em; height: .34em; border-radius: 50%; background: var(--gold); transform: translateY(-.02em); }

/* Dugmad */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 46px; padding: 0 20px; border-radius: var(--r-sm);
  border: 1px solid transparent; font-weight: 700; font-size: 14px; line-height: 1;
  cursor: pointer; white-space: nowrap; transition: transform .15s var(--ease), background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn-gold { background: var(--gold); color: var(--gold-ink); box-shadow: 0 10px 30px rgba(240, 204, 85, .14); }
.btn-gold:hover { background: var(--gold-2); transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--gold-line); color: var(--gold-text); }
.btn-soft { background: var(--panel-2); border-color: var(--line); color: var(--text); }
.btn-soft:hover { border-color: var(--line-2); }
.btn-block { width: 100%; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 13px; border-radius: var(--r-xs); }
.btn[disabled] { opacity: .6; cursor: default; transform: none; }

/* Kartica / panel */
.panel { background: linear-gradient(145deg, var(--panel), var(--bg-2)); border: 1px solid var(--line); border-radius: var(--r-lg); }

/* Eyebrow / badge */
.eyebrow { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-text); font-weight: 800; }
.badge { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--gold-line); color: var(--gold-text); background: var(--gold-soft); padding: 7px 12px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; }

/* Forme */
.field { margin-bottom: 14px; }
.field label, .label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 7px; }
.input {
  width: 100%; height: 48px; padding: 0 14px; border-radius: var(--r-sm);
  background: var(--panel-2); border: 1px solid var(--line-2); color: var(--text);
  font: inherit; font-size: 15px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: var(--muted-2); }
.input:focus { border-color: var(--gold-line); box-shadow: 0 0 0 3px var(--gold-soft); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); }
.check input { margin-top: 3px; accent-color: var(--gold); width: 16px; height: 16px; flex: none; }
.check a, .link { color: var(--gold-text); }
.link:hover { text-decoration: underline; }

/* Poruke */
.alert { border-radius: var(--r-sm); padding: 11px 14px; font-size: 13px; margin-bottom: 14px; display: flex; gap: 9px; align-items: flex-start; line-height: 1.45; }
.alert .ic { width: 17px; height: 17px; margin-top: 1px; }
.alert-err { background: var(--red-bg); border: 1px solid rgba(239, 77, 109, .3); color: #ff8aa2; }
.alert-ok  { background: var(--green-bg); border: 1px solid var(--green-line); color: var(--green); }
[data-theme="light"] .alert-err { color: #b3213f; }
.alert a { color: inherit; text-decoration: underline; }

/* Segment (tabovi) */
.segment { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; }
.segment button { height: 38px; border: 0; border-radius: 9px; background: none; color: var(--muted); font-weight: 600; font-size: 13px; cursor: pointer; }
.segment button.active { background: var(--panel-3); color: var(--text); box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 2px 8px rgba(0,0,0,.2); }

/* Divider sa tekstom */
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted-2); font-size: 12px; margin: 18px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ── AUTH / pomoćne strane (login, reset, magic, confirm) ── */
.auth-page {
  min-height: 100dvh; display: grid; place-items: center; padding: 28px 16px;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(34, 72, 58, .35), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, rgba(120, 90, 30, .14), transparent 60%),
    var(--bg);
}
[data-theme="light"] .auth-page { background: radial-gradient(900px 500px at 85% -10%, rgba(240, 204, 85, .18), transparent 60%), var(--bg); }
.auth-card { width: 100%; max-width: 410px; padding: 32px 26px 26px; box-shadow: var(--shadow-lg); }
.auth-head { text-align: center; margin-bottom: 24px; }
.auth-head .logo { font-size: 30px; }
.auth-head p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.auth-title { font-size: 22px; font-weight: 800; letter-spacing: -.03em; margin: 0 0 6px; text-align: center; }
.auth-sub { text-align: center; color: var(--muted); font-size: 14px; margin: 0 0 22px; }
.auth-icon { width: 58px; height: 58px; border-radius: 16px; margin: 0 auto 18px; display: grid; place-items: center; background: var(--gold-soft); border: 1px solid var(--gold-line); color: var(--gold-text); }
.auth-icon .ic { width: 26px; height: 26px; }
.auth-icon.err { background: var(--red-bg); border-color: rgba(239, 77, 109, .3); color: var(--red); }
.auth-icon.ok  { background: var(--green-bg); border-color: var(--green-line); color: var(--green); }
.auth-foot { display: flex; justify-content: center; gap: 14px; margin-top: 22px; font-size: 12px; color: var(--muted-2); }
.auth-foot a:hover { color: var(--text); }
.btn-google { background: #fff; color: #1f1f1f; border-color: #fff; }
.btn-google:hover { background: #f1f1f1; transform: translateY(-1px); }
.captcha-group label { color: var(--text); font-size: 13px; font-weight: 600; }
.captcha-group label b { color: var(--gold-text); }

/* ── Jednostavna strana sa sadržajem (privatnost, uslovi) ── */
.doc-top { display: flex; align-items: center; justify-content: space-between; max-width: 820px; margin: 0 auto; padding: 22px 20px; }
.doc { max-width: 820px; margin: 0 auto; padding: 10px 20px 80px; }
.doc h1 { font-size: clamp(30px, 5vw, 44px); letter-spacing: -.04em; line-height: 1.05; margin: 10px 0 8px; }
.doc h2 { font-size: 19px; letter-spacing: -.02em; margin: 34px 0 10px; }
.doc p, .doc li { color: var(--muted); font-size: 15px; line-height: 1.75; }
.doc a { color: var(--gold-text); }

/* Jezik prekidač */
.lang-switch { display: inline-flex; border: 1px solid var(--line-2); border-radius: 10px; padding: 3px; gap: 2px; }
.lang-switch a { padding: 6px 10px; border-radius: 7px; font-size: 12px; font-weight: 700; color: var(--muted); }
.lang-switch a.active { background: var(--panel-3); color: var(--text); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
