/* ============================================================
   notifikacija.xyz - design system
   Dark theme is the default (:root); light theme activates via
   <html data-theme="light">, toggled in the topbar and persisted
   to localStorage (see inline script in App.razor).
   ============================================================ */
:root {
    color-scheme: dark;

    --bg: #0b0d12;
    --bg-glow: radial-gradient(1200px 500px at 50% -10%, rgba(245, 165, 36, .07), transparent 60%);
    --surface: #14181f;
    --surface-2: #1c212b;
    --surface-3: #242a36;
    --border: #232936;
    --border-strong: #323a4a;
    --text: #eceef2;
    --text-dim: #9aa3b2;
    --text-faint: #68717f;

    /* Brand: warm amber, the color of the notification bell */
    --brand: #fbbf24;             /* links, active text, accents */
    --brand-bg: #f5a524;          /* primary button / chip fill  */
    --brand-bg-hover: #ffb640;
    --on-brand: #201503;          /* text on amber fills          */
    --brand-soft: rgba(245, 165, 36, .13);
    --brand-ring: rgba(245, 165, 36, .3);

    --new: #34d399;
    --new-soft: rgba(52, 211, 153, .13);
    --danger: #f87171;
    --danger-soft: rgba(248, 113, 113, .12);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
    --shadow: 0 2px 8px rgba(0, 0, 0, .35);
    --shadow-lg: 0 16px 44px rgba(0, 0, 0, .5);

    --radius: 16px;
    --radius-sm: 10px;
    --maxw: 1140px;
    --topbar-h: 60px;
}

:root[data-theme="light"] {
    color-scheme: light;

    --bg: #f7f6f3;
    --bg-glow: radial-gradient(1200px 500px at 50% -10%, rgba(245, 165, 36, .09), transparent 60%);
    --surface: #ffffff;
    --surface-2: #f1f0ec;
    --surface-3: #e9e7e2;
    --border: #e7e5e0;
    --border-strong: #d6d3cc;
    --text: #17181c;
    --text-dim: #5b616d;
    --text-faint: #979ea9;

    --brand: #b45309;             /* readable amber for text/links on white */
    --brand-bg: #f5a524;
    --brand-bg-hover: #e6940e;
    --on-brand: #201503;
    --brand-soft: rgba(245, 165, 36, .16);
    --brand-ring: rgba(230, 148, 14, .3);

    --new: #059669;
    --new-soft: rgba(5, 150, 105, .12);
    --danger: #dc2626;
    --danger-soft: rgba(220, 38, 38, .09);

    --shadow-sm: 0 1px 2px rgba(24, 20, 10, .06);
    --shadow: 0 1px 3px rgba(24, 20, 10, .09), 0 1px 2px rgba(24, 20, 10, .05);
    --shadow-lg: 0 12px 32px rgba(24, 20, 10, .16);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    font-size: 15px;
    line-height: 1.5;
}
body { background-image: var(--bg-glow); background-repeat: no-repeat; }

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.015em; }

:focus-visible { outline: 2px solid var(--brand-bg); outline-offset: 2px; border-radius: 4px; }

/* ---------- App shell ---------- */
.app { min-height: 100vh; }

.topbar {
    position: sticky; top: 0; z-index: 30;
    height: var(--topbar-h);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 clamp(1rem, 4vw, 2rem);
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--border);
}
.topbar-actions { display: flex; align-items: center; gap: .55rem; }

.brand {
    display: flex; align-items: center; gap: .6rem;
    font-weight: 800; font-size: 1.08rem; letter-spacing: -.02em; color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand-mark {
    display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px;
    background: linear-gradient(140deg, #ffc93f, #f59e0b 55%, #e07f06);
    color: #241a04; box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .35);
    flex: 0 0 auto;
}
.brand-mark svg { width: 18px; height: 18px; display: block; }
.brand-dim { color: var(--text-faint); font-weight: 650; }
@media (max-width: 560px) { .brand-word { display: none; } }

.app-main { max-width: var(--maxw); margin: 0 auto; padding: 1.75rem clamp(1rem, 4vw, 2rem) 4rem; }

/* Theme switch (plain JS, works on static and interactive pages) */
.theme-toggle {
    display: grid; place-items: center; width: 36px; height: 36px; padding: 0;
    border: 1px solid var(--border-strong); border-radius: 999px;
    background: var(--surface); color: var(--text-dim); cursor: pointer;
    font-size: .95rem; line-height: 1; transition: color .15s, border-color .15s, transform .2s;
}
.theme-toggle:hover { color: var(--brand); border-color: var(--brand-bg); transform: rotate(15deg); }
.theme-toggle .tt-sun { display: none; }
:root[data-theme="light"] .theme-toggle .tt-sun { display: block; }
:root[data-theme="light"] .theme-toggle .tt-moon { display: none; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: .4rem; cursor: pointer;
    border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
    border-radius: var(--radius-sm); padding: .5rem .9rem; font-size: .9rem; font-weight: 600;
    white-space: nowrap; text-decoration: none;
    transition: background .15s, border-color .15s, color .15s, transform .06s, box-shadow .15s;
}
.btn:hover { background: var(--surface-2); border-color: var(--border-strong); text-decoration: none; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn.primary, .btn-primary {
    background: linear-gradient(180deg, var(--brand-bg-hover), var(--brand-bg));
    border-color: transparent; color: var(--on-brand);
    box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.btn.primary:hover, .btn-primary:hover {
    background: linear-gradient(180deg, var(--brand-bg-hover), var(--brand-bg-hover));
    filter: saturate(1.08);
}
.btn.primary:disabled {
    background: var(--surface-3); border-color: transparent; color: var(--text-faint);
    cursor: not-allowed; box-shadow: none; filter: none;
}
.btn.ghost { background: transparent; border-style: dashed; }

/* ---------- Inputs ---------- */
.in {
    width: 100%; padding: .58rem .75rem; font-size: .92rem;
    background: var(--surface-2); color: var(--text);
    border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.in::placeholder { color: var(--text-faint); }
.in:focus { outline: none; background: var(--surface); border-color: var(--brand-bg); box-shadow: 0 0 0 3px var(--brand-ring); }
select.in { cursor: pointer; }

/* ============================================================
   Home - watch dashboard
   ============================================================ */
.noti-head { margin-bottom: 2.25rem; }
.noti-head h1 { font-size: 1.55rem; }
.noti-head .sub { color: var(--text-dim); margin: .35rem 0 0; font-size: .92rem; }
.live-dot { color: var(--new); font-size: .7rem; animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* Progress until next OLX poll */
.poll-progress { display: flex; align-items: center; gap: .7rem; margin-top: .7rem; max-width: 360px; }
.pp-track { flex: 1; height: 5px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.pp-fill {
    height: 100%; width: 0; border-radius: 999px;
    background: linear-gradient(90deg, var(--brand-bg), #ffd166);
    animation-name: ppfill; animation-timing-function: linear; animation-fill-mode: forwards;
}
@keyframes ppfill { to { width: 100%; } }
.pp-label { font-size: .78rem; color: var(--text-faint); white-space: nowrap; }

.empty {
    color: var(--text-dim); background: var(--surface); border: 1px dashed var(--border-strong);
    padding: 2.25rem 2rem; border-radius: var(--radius); text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: .9rem;
}
.empty p { margin: 0; font-size: 1rem; }

/* Dashboard: sidebar watch list + main content */
.dashboard { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 2.5rem; align-items: start; }

.watch-list {
    position: sticky; top: calc(var(--topbar-h) + 1rem);
    display: flex; flex-direction: column; gap: .6rem; min-width: 0;
    max-height: calc(100vh - var(--topbar-h) - 2rem);
}
.watch-main { min-width: 0; }
.watch-filter { flex: 0 0 auto; }
.wl-head {
    display: flex; align-items: center; justify-content: space-between;
    font-size: .76rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: .06em;
    font-weight: 700; padding: 0 .25rem;
}
.wl-newsummary { color: var(--new); text-transform: none; letter-spacing: 0; }
.wl-scroll { display: flex; flex-direction: column; gap: .5rem; overflow-y: auto; padding-right: .25rem; }
.wl-empty { color: var(--text-faint); font-size: .85rem; padding: .5rem .25rem; }

.watch-item {
    display: flex; align-items: center; gap: .6rem; width: 100%; text-align: left; cursor: pointer;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 12px; padding: .7rem .85rem; transition: all .15s; box-shadow: var(--shadow-sm);
    user-select: none;
}
.watch-item:hover { background: var(--surface-2); border-color: var(--border-strong); }
.watch-item.active { background: var(--brand-soft); border-color: var(--brand-bg); }
.watch-item.active .wi-name { color: var(--brand); }
.watch-item.has-new { border-color: var(--new); }
.watch-item.all-item { margin-bottom: .25rem; }
.watch-item.all-item .wi-name { font-weight: 750; }
/* Row actions: edit + delete live on the row (single management place) */
.wi-actions { display: none; flex: 0 0 auto; gap: .1rem; }
.watch-item:hover .wi-actions { display: inline-flex; }
.watch-item:hover .wi-new { display: none; }
.wi-icon {
    display: grid; place-items: center; width: 27px; height: 27px; padding: 0;
    border: none; background: none; border-radius: 8px; cursor: pointer;
    color: var(--text-faint); text-decoration: none; font-size: .85rem;
    transition: background .12s, color .12s;
}
.wi-icon:hover { background: var(--surface-3); color: var(--brand); text-decoration: none; }
.wi-icon.danger:hover { color: var(--danger); }
@media (hover: none) { .wi-actions { display: inline-flex; } .watch-item .wi-new { display: inline; } }

/* Inline delete confirm inside the row */
.watch-item.confirming { border-color: var(--danger); cursor: default; }
.watch-item .del-q { color: var(--danger); font-weight: 650; }
.wi-act {
    flex: 0 0 auto; border: 1px solid var(--border-strong); background: var(--surface);
    color: var(--text); border-radius: 8px; padding: .25rem .6rem; font-size: .8rem;
    font-weight: 600; cursor: pointer;
}
.wi-act.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.wi-main { display: flex; flex-direction: column; gap: .1rem; min-width: 0; flex: 1; }
.wi-name {
    font-size: .88rem; font-weight: 600; color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.watch-item.has-new .wi-name { font-weight: 700; }
.wi-sub { font-size: .74rem; color: var(--text-faint); display: flex; align-items: center; gap: .3rem; }
.wi-err { color: var(--danger); }
.wi-new {
    flex: 0 0 auto; background: var(--new); color: #06281c; border-radius: 999px;
    padding: .1rem .5rem; font-size: .7rem; font-weight: 800; letter-spacing: .02em;
    animation: newpulse 1.7s ease-in-out infinite;
}
@keyframes newpulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--new) 55%, transparent); } 50% { box-shadow: 0 0 0 5px transparent; } }

/* Main content head */
.wm-head {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
    margin-bottom: 1.25rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border);
}
.wm-title h2 { font-size: 1.2rem; margin-bottom: .35rem; }
.wm-actions { display: flex; gap: .5rem; flex: 0 0 auto; align-items: center; }
.danger-btn { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--border-strong)); }
.danger-btn:hover { background: var(--danger-soft); }

.meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; color: var(--text-dim); font-size: .85rem; }
.meta strong { color: var(--text); }
.meta-new { color: var(--new); font-weight: 700; }
.meta .dot { color: var(--text-faint); }
.del-confirm { display: inline-flex; gap: .35rem; align-items: center; color: var(--text); font-size: .85rem; }
.poll-error { color: var(--danger); font-weight: 650; cursor: help; }

@media (max-width: 820px) {
    .dashboard { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
    .watch-list { position: static; max-height: none; min-width: 0; }
    .wl-scroll { flex-direction: row; overflow-x: auto; overflow-y: hidden; min-width: 0; padding-bottom: .35rem; }
    .watch-item { flex: 0 0 auto; width: 210px; }
    .wm-head { flex-direction: column; }
    .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* Listing groups */
.group-head {
    display: flex; align-items: center; gap: .5rem; margin: 0 0 .9rem;
    font-size: .8rem; font-weight: 750; text-transform: uppercase; letter-spacing: .06em;
    color: var(--new);
}
.group-head .gh-count { background: var(--new-soft); color: var(--new); padding: .02rem .55rem; border-radius: 999px; font-size: .76rem; }
.group-head.dim { color: var(--text-faint); margin-top: 2rem; }

/* Listing grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); gap: 1.4rem; }
.card {
    display: flex; flex-direction: column; text-decoration: none; color: inherit;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow);
    transition: box-shadow .18s, transform .18s, border-color .18s;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: var(--border-strong); text-decoration: none; }
.card.new { border-color: var(--new); box-shadow: 0 0 0 1px var(--new), var(--shadow); }

.thumb { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.badge {
    position: absolute; top: .55rem; left: .55rem; background: var(--new); color: #06281c;
    font-size: .68rem; font-weight: 800; padding: .18rem .45rem; border-radius: 7px;
    letter-spacing: .04em; box-shadow: var(--shadow-sm);
}
.badge.sponsored { left: auto; right: .55rem; background: rgba(10, 12, 16, .72); color: #fff; backdrop-filter: blur(4px); }

/* Loading shimmer skeletons (shown while listings load or a poll is running) */
.card.skeleton { pointer-events: none; }
.card.skeleton:hover { transform: none; box-shadow: var(--shadow); }
.skel { position: relative; overflow: hidden; background: var(--surface-2); }
.skel::after {
    content: ""; position: absolute; inset: 0; transform: translateX(-100%);
    background: linear-gradient(90deg, transparent,
        color-mix(in srgb, var(--text) 9%, transparent), transparent);
    animation: shimmer 1.25s ease-in-out infinite;
}
.skel-line { height: .8rem; border-radius: 5px; }
.skel-line.lg { height: 1.1rem; }
.skel-line.w40 { width: 40%; }
.skel-line.w55 { width: 55%; }
.skel-line.w90 { width: 90%; }
@keyframes shimmer { 100% { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .skel::after { animation: none; } }

.card .body { padding: .85rem .95rem 1rem; display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.card .price { font-weight: 750; font-size: 1.08rem; color: var(--text); letter-spacing: -.01em; }
.card .title {
    font-size: .88rem; color: var(--text); line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card .attrs { font-size: .77rem; color: var(--brand); font-weight: 550; }
.card .src {
    font-size: .74rem; color: var(--text-faint);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card .times {
    display: flex; justify-content: space-between; gap: .5rem; margin-top: auto; padding-top: .35rem;
    font-size: .72rem; color: var(--text-faint);
}

/* ============================================================
   Filter builder (guided form)
   ============================================================ */
.editor { max-width: 680px; margin: 0 auto; padding-bottom: 1rem; }
.ed-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.75rem; }
.ed-head .back { color: var(--text-dim); font-weight: 550; }
.ed-head h1 { font-size: 1.45rem; }

.ed-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow-sm);
    padding: 1.4rem 1.5rem 1.5rem; margin-bottom: 1.1rem;
    display: flex; flex-direction: column; gap: .9rem;
}
.ed-card h2 { display: flex; align-items: center; gap: .6rem; font-size: 1.02rem; font-weight: 700; margin: 0; }
.step {
    display: grid; place-items: center; width: 26px; height: 26px; border-radius: 999px;
    background: linear-gradient(140deg, var(--brand-bg-hover), var(--brand-bg));
    color: var(--on-brand); font-size: .82rem; font-weight: 800; flex: 0 0 auto;
}
.ed-name { padding: 1rem 1.5rem; }

.in-lg { font-size: 1.05rem; padding: .75rem .9rem; }
.cat-select { font-size: 1rem; padding: .65rem .8rem; }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
    border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
    border-radius: 999px; padding: .42rem .95rem; font-size: .88rem; font-weight: 500;
    cursor: pointer; transition: all .15s;
}
.chip:hover { border-color: var(--brand-bg); color: var(--brand); }
.chip.on { background: var(--brand-bg); color: var(--on-brand); border-color: var(--brand-bg); font-weight: 650; }
.subcats .chip { padding: .5rem 1.05rem; font-size: .92rem; }

.sel-cities .chip.on { padding-right: .8rem; }
.city-results { max-height: 220px; overflow-y: auto; }

.cities {
    max-height: 280px; overflow-y: auto; border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: .5rem; background: var(--surface);
}
.canton > summary { cursor: pointer; padding: .45rem; font-size: .92rem; font-weight: 550; border-radius: 6px; list-style-position: inside; }
.canton > summary:hover { background: var(--surface-2); }
.pill { background: var(--brand-bg); color: var(--on-brand); border-radius: 999px; padding: .02rem .5rem; font-size: .72rem; font-weight: 700; margin-left: .4rem; }
.city-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: .3rem .6rem; padding: .4rem .3rem .7rem 1.4rem; }
.chk { display: flex; align-items: center; gap: .45rem; font-size: .9rem; font-weight: 400; cursor: pointer; }
.chk input { accent-color: var(--brand-bg); width: 16px; height: 16px; }

.price-row { display: flex; align-items: center; gap: .75rem; }
.price-row .in { font-size: 1rem; padding: .65rem .8rem; }
.price-sep { color: var(--text-faint); font-size: .85rem; font-weight: 600; }

.attr-list { display: flex; flex-direction: column; gap: 1.15rem; }
.attr-name { font-size: .88rem; color: var(--text-dim); margin-bottom: .45rem; font-weight: 600; }
.range { display: flex; align-items: center; gap: .5rem; }
.range .in { max-width: 180px; }

.more-opts { border-top: 1px solid var(--border); padding-top: .9rem; }
.more-opts > summary {
    cursor: pointer; font-weight: 650; font-size: .95rem; color: var(--text);
    padding: .3rem 0; list-style-position: inside;
}
.more-opts > summary:hover { color: var(--brand); }
.more-count { color: var(--text-faint); font-weight: 500; font-size: .82rem; margin-left: .3rem; }
.extra-chips { padding-top: .8rem; }

/* Sticky save bar */
.savebar {
    position: sticky; bottom: 0; z-index: 20;
    display: flex; align-items: center; gap: .7rem;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-strong); border-radius: var(--radius);
    padding: .8rem 1.1rem; margin-top: .4rem; box-shadow: var(--shadow-lg);
}
.savebar-count { flex: 1; font-size: .95rem; color: var(--text); }
.savebar-count strong { color: var(--brand); }
.sb-dim { color: var(--text-faint); }
.btn-lg { padding: .68rem 1.35rem; font-size: .98rem; border-radius: 12px; }
.btn.small { padding: .35rem .75rem; font-size: .82rem; }

/* Small labels inside cards (listing type, advanced groups) */
.field-label {
    font-size: .82rem; font-weight: 700; color: var(--text-dim);
    text-transform: uppercase; letter-spacing: .03em; margin-top: .2rem;
}
.seg-types .chip { padding: .5rem 1.05rem; }

/* One-click canton selection */
.canton-tools { padding: .35rem .3rem .2rem 1.4rem; }
.canton-all { font-size: .82rem; padding: .3rem .8rem; }

/* Advanced options (collapsible) */
.ed-advanced > summary {
    cursor: pointer; font-weight: 700; font-size: 1rem; color: var(--text);
    display: flex; align-items: center; gap: .5rem; list-style-position: inside;
}
.ed-advanced > summary:hover { color: var(--brand); }
.adv-body { display: flex; flex-direction: column; gap: 1.3rem; padding-top: .4rem; }
.adv-section { display: flex; flex-direction: column; gap: .6rem; }
.adv-hint { font-size: .85rem; color: var(--text-faint); margin: 0; line-height: 1.4; }

/* Pasted-link mode banner + de-emphasised guided options */
.raw-banner {
    display: flex; align-items: center; justify-content: space-between; gap: .8rem;
    background: var(--brand-soft);
    border: 1px solid var(--brand-bg); border-radius: var(--radius);
    padding: .7rem 1rem; margin-bottom: 1.1rem; font-size: .9rem; color: var(--text);
}
.ed-card.muted { opacity: .55; }

/* ============================================================
   Auth (login / register / reset) - static SSR pages
   ============================================================ */
.auth-wrap { display: grid; place-items: center; padding: 2.5rem 1rem 3rem; }
.auth-card {
    width: 100%; max-width: 430px; background: var(--surface);
    border: 1px solid var(--border); border-radius: 20px;
    box-shadow: var(--shadow-lg); padding: 2.1rem 2.2rem 2.3rem;
    display: flex; flex-direction: column; gap: 1rem;
}
.auth-brand { display: flex; justify-content: center; margin-bottom: .3rem; }
.auth-brand .brand-mark { width: 46px; height: 46px; border-radius: 14px; }
.auth-brand .brand-mark svg { width: 26px; height: 26px; }
.auth-card h1 { font-size: 1.35rem; margin: 0; text-align: center; }
.auth-sub { color: var(--text-dim); font-size: .93rem; margin: 0; line-height: 1.5; text-align: center; }
.auth-form { display: flex; flex-direction: column; gap: .95rem; }
.auth-field { display: flex; flex-direction: column; gap: .35rem; }
.auth-field label { font-size: .84rem; font-weight: 650; color: var(--text-dim); }
.auth-field .in { padding: .68rem .8rem; font-size: .95rem; }
.auth-optional { color: var(--text-faint); font-weight: 500; }
.auth-remember { font-size: .9rem; color: var(--text-dim); }
.auth-submit { width: 100%; margin-top: .35rem; justify-content: center; }
.auth-links { font-size: .88rem; text-align: center; }
.auth-links a { color: var(--brand); text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }
.auth-note { font-size: .82rem; color: var(--text-faint); margin: 0; text-align: center; }
.auth-error {
    background: var(--danger-soft);
    border: 1px solid color-mix(in srgb, var(--danger) 45%, transparent);
    border-radius: var(--radius-sm);
    padding: .6rem .8rem; font-size: .88rem; color: var(--text);
}
.auth-ok {
    background: var(--new-soft);
    border: 1px solid color-mix(in srgb, var(--new) 45%, transparent);
    border-radius: var(--radius-sm);
    padding: .6rem .8rem; font-size: .88rem; color: var(--text);
}
.auth-card .validation-message { font-size: .82rem; }

/* Registration: the invited address shown as a locked identity pill */
.auth-identity {
    display: flex; align-items: center; gap: .6rem;
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: .6rem .8rem;
}
.auth-identity .ai-mail { font-weight: 650; font-size: .93rem; overflow: hidden; text-overflow: ellipsis; }
.auth-identity .ai-ok { margin-left: auto; color: var(--new); font-size: .78rem; font-weight: 700; white-space: nowrap; }
.pw-hint { font-size: .78rem; color: var(--text-faint); margin: 0; }

/* Top-bar user menu */
.user-chip { font-size: .88rem; color: var(--text-dim); white-space: nowrap; text-decoration: none; }
a.user-chip:hover { color: var(--brand); text-decoration: none; }
.logout-form { display: inline; margin: 0; }
.user-chip .uc-gear { display: none; font-size: 1.15rem; line-height: 1; }

/* Compact topbar on phones: shorter labels, tighter buttons, email chip becomes
   a settings glyph. Without this the actions overflow past the viewport. */
@media (max-width: 680px) {
    .hide-sm { display: none; }
    .topbar { padding: 0 .75rem; }
    .topbar-actions { gap: .35rem; }
    .topbar-actions .btn { padding: .45rem .6rem; font-size: .82rem; }
    .theme-toggle { width: 32px; height: 32px; }
    .user-chip .uc-name { display: none; }
    .user-chip .uc-gear { display: inline; }
}

/* Settings / Telegram connect */
.settings { max-width: 640px; margin: 0 auto; }
.tg-status { margin: 0; font-size: .95rem; }
.tg-status.ok { color: var(--new); font-weight: 600; }
.tg-status.wait { color: var(--text-dim); }
.tg-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.tg-link { text-align: center; }
.btn.danger-ghost { border-color: color-mix(in srgb, var(--danger) 50%, transparent); color: var(--danger); }
.btn.danger-ghost:hover { background: var(--danger-soft); }

/* Notification channels (onboarding step 4 + settings) */
.onb-channel {
    display: flex; flex-direction: column; gap: .5rem;
    background: var(--surface-2); border-radius: var(--radius-sm); padding: .9rem 1rem;
}
.onb-channel-head { font-weight: 700; font-size: .98rem; }
.soon-tag {
    background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--text-faint);
    border-radius: 6px; font-size: .64rem; font-weight: 800; padding: .12rem .4rem;
    letter-spacing: .06em; vertical-align: middle; margin-left: .35rem;
}
.store-badges { display: flex; gap: .7rem; flex-wrap: wrap; }
.store-badge {
    display: flex; align-items: center; gap: .6rem; cursor: default; user-select: none;
    background: #101216; color: #fff; border: 1px solid #333a46; border-radius: 12px;
    padding: .5rem .95rem; opacity: .75;
}
.store-badge .sb-ico { font-size: 1.25rem; }
.store-badge .sb-text { display: flex; flex-direction: column; line-height: 1.15; font-weight: 650; font-size: .95rem; }
.store-badge .sb-text small { font-size: .58rem; font-weight: 600; letter-spacing: .08em; color: #b8bec6; }

/* ============================================================
   Public landing (anonymous "/" - request an invite)
   ============================================================ */
.landing { max-width: 760px; margin: 0 auto; padding-top: 1.5rem; }
.ld-hero { text-align: center; margin-bottom: 2.5rem; }
.ld-logo { width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 1.4rem; display: grid; }
.ld-logo svg { width: 38px; height: 38px; }
.ld-hero h1 { font-size: clamp(1.7rem, 5vw, 2.5rem); line-height: 1.18; letter-spacing: -.025em; }
.ld-accent { color: var(--brand); }
.ld-sub {
    color: var(--text-dim); font-size: 1.02rem; line-height: 1.6;
    max-width: 540px; margin: 1rem auto 0;
}
.ld-features {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: .8rem; margin-bottom: 2.2rem;
}
.ld-feat {
    display: flex; flex-direction: column; gap: .3rem;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1.1rem 1.2rem; box-shadow: var(--shadow-sm);
}
.ld-feat-ico { font-size: 1.45rem; margin-bottom: .2rem; }
.ld-feat strong { font-size: .95rem; }
.ld-feat span:last-child { font-size: .84rem; color: var(--text-dim); line-height: 1.45; }
.ld-form { max-width: 480px; margin: 0 auto; text-align: center; }
.ld-form h2 { justify-content: center; }
.ld-fields { display: flex; flex-direction: column; gap: .65rem; margin-top: .3rem; }
.ld-fields .in { padding: .7rem .85rem; font-size: .98rem; text-align: center; }
.ld-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ============================================================
   Admin dashboard
   ============================================================ */
.admin { max-width: 860px; margin: 0 auto; }
.invite-row { display: flex; gap: .6rem; }
.invite-row .in { flex: 1; }
.invite-status { margin: 0; font-size: .88rem; }
.invite-status.ok { color: var(--new); }
.invite-status.err { color: var(--danger); }
.adm-list { display: flex; flex-direction: column; gap: .5rem; }
.adm-row {
    display: flex; align-items: center; gap: .8rem;
    padding: .55rem .7rem; border-radius: var(--radius-sm); background: var(--surface-2);
}
.adm-main { flex: 1; display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.adm-title { font-weight: 600; font-size: .92rem; }
.adm-sub { font-size: .8rem; color: var(--text-faint); }
.adm-badge {
    background: var(--brand-bg); color: var(--on-brand); border-radius: 6px; font-size: .66rem;
    font-weight: 800; padding: .1rem .4rem; margin-left: .45rem; letter-spacing: .04em;
}
.adm-link { max-width: 320px; font-size: .78rem; color: var(--text-dim); }

/* ============================================================
   Onboarding wizard
   ============================================================ */
.onb { max-width: 720px; margin: 0 auto; }
.onb-head { text-align: center; margin-bottom: 1.3rem; }
.onb-head h1 { font-size: 1.6rem; }
.onb-steps { display: flex; justify-content: center; gap: .6rem; margin-top: 1rem; }
.onb-dot {
    width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center;
    background: var(--surface-2); color: var(--text-faint); font-size: .85rem; font-weight: 700;
    border: 1px solid var(--border); transition: all .2s;
}
.onb-dot.active { background: var(--brand-bg); color: var(--on-brand); border-color: var(--brand-bg); }
.onb-dot.done { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.onb-card h2 { font-size: 1.15rem; }
.onb-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .7rem; }
.onb-tile {
    display: flex; flex-direction: column; align-items: center; gap: .3rem; text-align: center;
    background: var(--surface-2); border: 2px solid transparent; border-radius: var(--radius);
    padding: 1.1rem .8rem; cursor: pointer; transition: all .15s; color: var(--text);
}
.onb-tile:hover { border-color: var(--brand-bg); transform: translateY(-1px); }
.onb-tile.on { border-color: var(--brand-bg); background: var(--brand-soft); }
.onb-ico { font-size: 1.7rem; }
.onb-title { font-weight: 700; font-size: .95rem; }
.onb-sub { font-size: .78rem; color: var(--text-faint); line-height: 1.3; }
.onb-cantons { max-height: 210px; overflow-y: auto; }
.onb-subs { display: flex; flex-direction: column; gap: .55rem; }
.onb-region { display: flex; flex-direction: column; gap: .45rem; }
.onb-region-name {
    font-size: .78rem; font-weight: 800; color: var(--text-faint);
    text-transform: uppercase; letter-spacing: .05em;
}
.onb-price { display: flex; flex-direction: column; gap: .35rem; max-width: 260px; }
.onb-price label { font-size: .85rem; font-weight: 650; color: var(--text-dim); }
.onb-count { min-height: 1.4rem; font-size: .92rem; color: var(--text-dim); }
.onb-count strong { color: var(--brand); }
.onb-nav { display: flex; justify-content: space-between; align-items: center; margin-top: .4rem; }

/* ============================================================
   Blazor framework UI (error + validation)
   ============================================================ */
.valid.modified:not([type=checkbox]) { outline: 1px solid var(--new); }
.invalid { outline: 1px solid var(--danger); }
.validation-message { color: var(--danger); }

#blazor-error-ui {
    color-scheme: light dark;
    background: #fff3cd; color: #664d03; bottom: 0; box-shadow: 0 -1px 8px rgba(0,0,0,.2);
    display: none; left: 0; padding: .8rem 1.4rem; position: fixed; width: 100%; z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 1rem; top: .6rem; }
.blazor-error-boundary {
    background: #b32121; padding: 1rem; color: white;
}
.blazor-error-boundary::after { content: "Došlo je do greške." }
