/* spisak — stilovi (verzija 1 dizajna) */
:root {
  --bg: #F3F5F2;
  --card: #FFFFFF;
  --ink: #18201C;
  --ink-2: #3A443F;
  --muted: #5B6660;
  --line: #D5DCD7;
  --line-soft: #EEF1EE;
  --accent: #1F6B4F;
  --accent-dark: #164D39;
  --accent-soft: #DCEBE3;
  --done-bg: #EAEEEB;
  --warn-bg: #FDECE7;
  --warn-line: #E9B7A8;
  --warn-ink: #7C2D12;
  --warn-btn: #9A3412;
  --danger: #B42318;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.4; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid rgba(31, 107, 79, .45); outline-offset: 2px; }

.screen { max-width: 480px; min-height: 100vh; min-height: 100dvh; margin: 0 auto; padding: 32px 20px calc(32px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 24px; }
.top { display: flex; align-items: center; }
.wordmark { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.wordmark span { color: var(--accent); }
.intro { display: flex; flex-direction: column; gap: 8px; }
h1 { margin: 0; font-family: var(--display); font-weight: 700; font-size: 34px; line-height: 1.1; letter-spacing: -0.02em; overflow-wrap: anywhere; }
h2 { margin: 0; font-family: var(--display); font-weight: 700; font-size: 24px; letter-spacing: -0.02em; }
p { margin: 0; }
.muted { color: #4F5A54; font-size: 15px; line-height: 1.45; }
.hint { color: var(--muted); font-size: 13px; line-height: 1.4; }
.opt { font-weight: 400; color: var(--muted); }
.error { color: var(--danger); font-size: 14px; font-weight: 500; min-height: 0; }
.error:empty { display: none; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.grow { flex: 1 1 auto; min-width: 0; }

/* polja */
.field { display: flex; flex-direction: column; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > label, .field > legend { font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 0; }
.field > legend { margin-bottom: 8px; }
input[type=text], input:not([type]), input[inputmode] {
  height: 52px; width: 100%; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card);
  padding: 0 16px; font-size: 17px; outline: none; transition: border-color .15s;
}
input:not([type]):focus, input[inputmode]:focus { border-color: var(--accent); }
input::placeholder { color: #6B746F; }
.code-input { font-family: var(--display); font-size: 26px !important; font-weight: 600; letter-spacing: 0.5em; text-align: center; padding-left: calc(16px + 0.5em) !important; height: 60px !important; }
.code-input::placeholder { letter-spacing: 0.5em; }

/* izbor trajanja */
.segs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.seg { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: flex; height: 44px; align-items: center; justify-content: center; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); font-size: 15px; font-weight: 500; }
.seg input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.seg input:focus-visible + span { outline: 3px solid rgba(31, 107, 79, .45); outline-offset: 2px; }

/* kartica i prekidač */
.card { background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; }
.switch-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; }
.switch-label { font-size: 15px; font-weight: 600; display: block; margin-bottom: 2px; }
.switch { appearance: none; -webkit-appearance: none; flex-shrink: 0; width: 52px; height: 32px; border-radius: 16px; background: #B9C3BD; position: relative; margin: 0; cursor: pointer; transition: background .15s; }
.switch::before { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 13px; background: #fff; transition: transform .15s; }
.switch:checked { background: var(--accent); }
.switch:checked::before { transform: translateX(20px); }

/* dugmad */
.btn { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 20px; border-radius: 14px; border: none; font-size: 17px; font-weight: 600; text-decoration: none; text-align: center; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-dark); color: #fff; }
.btn.dark { background: var(--ink); color: #fff; }
.btn.outline { background: var(--card); border: 1.5px solid var(--line); color: var(--ink); }
.btn.danger { background: var(--card); border: 1.5px solid #F0C4BF; color: var(--danger); }
.btn.small { min-height: 44px; font-size: 15px; padding: 0 16px; border-radius: 10px; }
.btn:disabled { opacity: .6; cursor: default; }
.icon-btn { width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.icon-btn.ghost { border: none; background: transparent; }
svg.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.badge-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.badge-icon.grey { background: #E4E8E5; color: var(--ink-2); }
.badge-icon svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.spacer { flex: 1 1 auto; }
.center-msg { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; gap: 16px; }

/* zamka za botove */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* podeli */
.share-box { padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.share-row { display: flex; flex-direction: column; gap: 6px; }
.share-row .cap { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.share-row .val { display: flex; align-items: center; gap: 10px; }
.share-row .big { flex: 1 1 auto; min-width: 0; font-family: var(--display); font-size: 20px; font-weight: 600; overflow-wrap: anywhere; }
.share-row .big.code { letter-spacing: .3em; font-size: 22px; }
.divider { height: 1px; background: #E6EBE7; }

/* spisak */
.list-screen { gap: 18px; padding-top: 24px; }
.list-screen > div:empty { display: none; }
.list-head { display: flex; align-items: flex-start; gap: 8px; }
.list-head h1 { font-size: 32px; line-height: 1.05; }
.list-head .sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
.banner { display: flex; align-items: center; gap: 12px; background: var(--warn-bg); border: 1.5px solid var(--warn-line); border-radius: 14px; padding: 12px 12px 12px 14px; color: var(--warn-ink); }
.banner .t { font-size: 15px; font-weight: 600; }
.banner .s { font-size: 12px; }
.banner button { flex-shrink: 0; min-height: 40px; padding: 0 14px; border-radius: 10px; border: none; background: var(--warn-btn); color: #fff; font-size: 14px; font-weight: 600; }
.name-ask { display: flex; flex-direction: column; gap: 10px; padding: 14px; }
.name-ask .row { display: flex; gap: 8px; }
.name-ask input { height: 44px !important; font-size: 16px !important; }

.add { display: flex; flex-direction: column; gap: 10px; }
.add-row { display: flex; gap: 8px; }
.add-row input { flex: 1 1 auto; height: 50px; }
.add-row .add-btn { width: 50px; height: 50px; border-radius: 12px; border: none; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.add-row .add-btn svg { width: 22px; height: 22px; stroke-width: 2.4; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { height: 36px; padding: 0 14px; border-radius: 18px; border: 1.5px solid var(--line); background: var(--card); font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.chip[aria-pressed=true] { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.chip.add-cat { border-style: dashed; border-color: #9AA7A0; background: transparent; color: var(--ink-2); font-weight: 600; }

.group { display: flex; flex-direction: column; gap: 6px; }
.group-head { display: flex; align-items: center; gap: 8px; padding-left: 4px; }
.dot { width: 8px; height: 8px; border-radius: 4px; flex-shrink: 0; }
.group-title { font-family: var(--body); line-height: 1.4; flex: 1 1 auto; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.group-head .icon-btn { width: 40px; height: 32px; color: #6B746F; }
.group-body { background: var(--card); border: 1px solid #DDE3DE; border-radius: 14px; overflow: hidden; }
.group-empty { padding: 14px; font-size: 14px; color: var(--muted); }
.item { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 4px 0 14px; }
.item + .item { border-top: 1px solid var(--line-soft); }
.check { width: 26px; height: 26px; border-radius: 8px; border: 2px solid #B9C3BD; background: var(--card); flex-shrink: 0; padding: 0; display: flex; align-items: center; justify-content: center; position: relative; }
.check::after { content: ''; position: absolute; inset: -9px; }
.check[aria-pressed=true] { background: var(--accent); border-color: var(--accent); color: #fff; }
.check svg { width: 16px; height: 16px; stroke-width: 3; }
.item .txt { flex: 1 1 auto; min-width: 0; padding: 8px 0; }
.item .t { font-size: 16px; overflow-wrap: anywhere; }
.item .a { font-size: 12px; color: var(--muted); }
.item .del { color: #6B746F; }
.done-wrap { display: flex; flex-direction: column; gap: 6px; }
.done-toggle { min-height: 52px; border-radius: 14px; border: none; background: var(--done-bg); display: flex; align-items: center; padding: 0 16px; gap: 10px; color: var(--ink-2); }
.done-toggle .lbl { flex: 1 1 auto; text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.done-toggle svg { transition: transform .15s; }
.done-toggle[aria-expanded=true] svg { transform: rotate(180deg); }
.done-body { background: var(--done-bg); border-radius: 14px; overflow: hidden; }
.done-body .item .t { text-decoration: line-through; color: var(--muted); font-size: 15px; }
.done-body .item + .item { border-top-color: #DDE2DE; }
.empty { text-align: center; color: var(--muted); font-size: 15px; padding: 24px 8px; }
.foot { text-align: center; font-size: 12px; color: var(--muted); padding-top: 8px; }

/* donji panel (dialog) */
dialog.sheet { width: 100%; max-width: 480px; margin: auto auto 0; border: none; padding: 0; border-radius: 24px 24px 0 0; background: var(--card); color: var(--ink); max-height: 90vh; overflow-y: auto; }
dialog.sheet .inner { padding: 12px 24px calc(28px + env(safe-area-inset-bottom)); }
dialog.sheet::backdrop { background: rgba(24, 32, 28, .55); }
dialog.sheet .handle { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 18px; }
dialog.sheet .body { display: flex; flex-direction: column; gap: 20px; }
dialog.sheet .row { display: flex; gap: 10px; }
dialog.sheet .row .btn { flex: 1 1 0; }
.colors { display: flex; gap: 12px; flex-wrap: wrap; }
.swatch { width: 40px; height: 40px; border-radius: 20px; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); padding: 0; }
.swatch[aria-pressed=true] { box-shadow: 0 0 0 2px var(--ink); }
.menu-list { display: flex; flex-direction: column; }
.menu-list button { min-height: 52px; border: none; background: none; text-align: left; font-size: 16px; padding: 0 4px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line-soft); }
.menu-list button:last-child { border-bottom: none; }
.menu-list button.red { color: var(--danger); }
select { height: 52px; width: 100%; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); padding: 0 12px; font-size: 16px; }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 15px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100% - 40px); z-index: 10; }
.toast-act { background: none; border: none; color: #9BE3C1; font-weight: 600; padding: 4px 2px; font-size: 15px; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.offline { position: fixed; top: 0; left: 0; right: 0; background: var(--warn-btn); color: #fff; text-align: center; font-size: 13px; padding: 6px; z-index: 5; }

/* naslov sa rečju koja se menja */
.hero { gap: 12px; }
.hero h1 { font-size: 30px; line-height: 1.12; min-height: calc(4 * 1.12em); }
.hero .muted { font-size: 16px; }
.rot { color: var(--accent); display: inline-block; transition: opacity .18s, transform .18s; }
.rot.out { opacity: 0; transform: translateY(6px); }
@media (prefers-reduced-motion: reduce) { .rot { transition: none; } }
.text-link { align-self: center; margin-top: -8px; padding: 10px 12px; font-size: 15px; font-weight: 500; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* kako radi */
.back { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; font-weight: 500; color: var(--ink-2); text-decoration: none; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 20px; }
.step { display: flex; gap: 16px; }
.step .num { width: 36px; height: 36px; border-radius: 18px; background: var(--accent-soft); color: var(--accent-dark); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 700; font-size: 17px; flex-shrink: 0; }
.step h2 { font-family: var(--body); font-size: 17px; font-weight: 600; letter-spacing: 0; margin: 6px 0 4px; }
.stack-tight { display: flex; flex-direction: column; gap: 10px; }
.section-title { font-size: 22px; margin-bottom: 4px; }
.faq { padding: 16px; border-width: 1px; border-color: #DDE3DE; border-radius: 14px; }
.faq h3 { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
