/*
 * VojvodinaMeteo — UI komplet „Vedrina 2" za stanice i padavine (inc/stations/vm-stations-ui.php).
 * Koreni: #vm-pad (padavine), #vm-sth (hub /stanice/), #vm-stp (stranica stanice), uz klasu .vm-sx.
 * Boja teksta ide kroz jedan kanal (--sx-c): tema u tamnom režimu boji sve span/link elemente
 * sa !important, pa samo ID + !important pouzdano pobeđuje (obrazac trodnevne v3).
 * v1.0 (2026-10-14)
 */

/* ── Tokeni ─────────────────────────────────────────────────────────────── */
.vm-sx {
	--sx-ink: #0f172a;
	--sx-muted: #475569;
	--sx-soft: #64748b;
	--sx-line: rgba(148, 163, 184, .32);
	--sx-card: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
	--sx-card-solid: #ffffff;
	--sx-card-border: #e0e7ff;
	--sx-tint: #f5f8ff;
	--sx-chip: #f1f5f9;
	--sx-track: #e2e8f0;
	--sx-accent: #3b82f6;
	--sx-accent-2: #6366f1;
	--sx-accent-ink: #1d4ed8;
	--sx-grad: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
	--sx-sky: radial-gradient(120% 90% at 100% 0%, rgba(253, 230, 138, .5) 0%, rgba(253, 230, 138, 0) 42%), radial-gradient(90% 80% at 0% 100%, rgba(196, 181, 253, .45) 0%, rgba(196, 181, 253, 0) 55%), linear-gradient(160deg, #e0f2fe 0%, #eef2ff 55%, #f5f3ff 100%);
	--sx-glass: rgba(255, 255, 255, .62);
	--sx-glass-line: rgba(255, 255, 255, .85);
	--sx-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 32px -18px rgba(37, 99, 235, .35);
	--sx-radius: 24px;
	--sx-ok: #16a34a;
	--sx-warn: #d97706;
	--sx-bad: #dc2626;
	--sx-c: var(--sx-ink);
	display: flex;
	flex-direction: column;
	gap: 22px;
	margin: 6px 0 44px;
	line-height: 1.55;
	font-size: 1rem;
}
[data-theme="dark"] .vm-sx {
	--sx-ink: #e2e8f0;
	--sx-muted: #cbd5e1;
	--sx-soft: #94a3b8;
	--sx-line: rgba(148, 163, 184, .2);
	--sx-card: linear-gradient(180deg, #111a2e 0%, #0f172a 100%);
	--sx-card-solid: #0f172a;
	--sx-card-border: rgba(129, 140, 248, .22);
	--sx-tint: rgba(30, 41, 59, .7);
	--sx-chip: rgba(51, 65, 85, .55);
	--sx-track: rgba(71, 85, 105, .55);
	--sx-accent: #60a5fa;
	--sx-accent-2: #818cf8;
	--sx-accent-ink: #93c5fd;
	--sx-sky: radial-gradient(120% 90% at 100% 0%, rgba(99, 102, 241, .35) 0%, rgba(99, 102, 241, 0) 45%), radial-gradient(90% 80% at 0% 100%, rgba(14, 165, 233, .22) 0%, rgba(14, 165, 233, 0) 55%), linear-gradient(160deg, #0f172a 0%, #172554 55%, #1e1b4b 100%);
	--sx-glass: rgba(15, 23, 42, .55);
	--sx-glass-line: rgba(148, 163, 184, .16);
	--sx-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 18px 40px -22px rgba(0, 0, 0, .7);
	--sx-ok: #4ade80;
	--sx-warn: #fbbf24;
	--sx-bad: #f87171;
}

/* ── Jedan kanal boje + reset unutar korena ────────────────────────────── */
html :is(#vm-pad, #vm-sth, #vm-stp),
html :is(#vm-pad, #vm-sth, #vm-stp) *:not(svg, svg *, .leaflet-container *, .vm-sx-raw, .vm-sx-raw *, .vm-map-tooltip-wrapper *) { color: var(--sx-c) !important; }
html :is(#vm-pad, #vm-sth, #vm-stp) *, html :is(#vm-pad, #vm-sth, #vm-stp) *::before, html :is(#vm-pad, #vm-sth, #vm-stp) *::after { box-sizing: border-box; }
html :is(#vm-pad, #vm-sth, #vm-stp) :is(h1, h2, h3, h4) { margin: 0; letter-spacing: -.01em; }
html :is(#vm-pad, #vm-sth, #vm-stp) p:not(.vm-sx-raw p) { margin: 0; text-align: left !important; }
html :is(#vm-pad, #vm-sth, #vm-stp) a:not(.vm-sx-raw a, .leaflet-container a) { text-decoration: none !important; }
html :is(#vm-pad, #vm-sth, #vm-stp) a:not([class]):not(.vm-sx-raw a, .leaflet-container a) { border-bottom: 0 !important; box-shadow: none; }
html :is(#vm-pad, #vm-sth, #vm-stp) a.vm-sx-tile { border: 1px solid var(--sx-glass-line) !important; }
html :is(#vm-pad, #vm-sth, #vm-stp) .vm-sx-tiles--solid a.vm-sx-tile { border-color: var(--sx-line) !important; }
html :is(#vm-pad, #vm-sth, #vm-stp) a.vm-sx-tile:hover { border-color: var(--sx-accent) !important; }
/* Podrazumevana boja linka sa najnižim prioritetom (pločice/kartice-linkovi postavljaju svoju). */
:where(#vm-pad, #vm-sth, #vm-stp) :where(a) { --sx-c: var(--sx-accent-ink); }
html :is(#vm-pad, #vm-sth, #vm-stp) :is(.vm-sx-prose, .vm-sx-lead, .vm-sx-note, .vm-sx-card__sub, .vm-sx-faq__item p, .vm-sx-crumbs, .vm-sx-links) a:hover { text-decoration: underline !important; }
html :is(#vm-pad, #vm-sth, #vm-stp) [hidden] { display: none !important; }
.vm-sx .vm-sx-muted { --sx-c: var(--sx-muted); }
.vm-sx .vm-sx-soft { --sx-c: var(--sx-soft); }
.vm-sx .vm-sx-num { font-variant-numeric: tabular-nums; }
.vm-sx .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.vm-sx button:focus-visible, .vm-sx a:focus-visible, .vm-sx select:focus-visible, .vm-sx input:focus-visible, .vm-sx summary:focus-visible { outline: 3px solid var(--sx-accent); outline-offset: 2px; }

/* ── Zaglavlje ──────────────────────────────────────────────────────────── */
.vm-sx .vm-sx-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .82rem; --sx-c: var(--sx-soft); }
.vm-sx .vm-sx-crumbs a { font-weight: 700; }
.vm-sx .vm-sx-crumbs__sep { opacity: .7; }
.vm-sx .vm-sx-head { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.vm-sx .vm-sx-eyebrow {
	align-self: flex-start; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 8px;
	padding: 6px 13px; border-radius: 999px; font-size: .78rem; font-weight: 800; letter-spacing: .02em; --sx-c: var(--sx-accent-ink);
	background: linear-gradient(var(--sx-card-solid), var(--sx-card-solid)) padding-box, var(--sx-grad) border-box; border: 1.5px solid transparent;
}
.vm-sx .vm-sx-eyebrow__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sx-ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sx-ok) 25%, transparent); }
.vm-sx .vm-sx-eyebrow__dot--stale { background: var(--sx-warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sx-warn) 25%, transparent); }
.vm-sx .vm-sx-h1 { font-size: clamp(1.7rem, 4.2vw, 2.55rem); line-height: 1.12; font-weight: 800; }
.vm-sx .vm-sx-lead { --sx-c: var(--sx-muted); font-size: 1.04rem; max-width: 70ch; }
.vm-sx .vm-sx-lead strong { --sx-c: var(--sx-ink); }

/* ── Hero (nebo) ────────────────────────────────────────────────────────── */
.vm-sx .vm-sx-hero {
	position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 16px;
	padding: 18px; border-radius: 30px; background: var(--sx-sky);
	border: 1px solid rgba(255, 255, 255, .8); box-shadow: var(--sx-shadow);
}
[data-theme="dark"] .vm-sx .vm-sx-hero { border-color: rgba(129, 140, 248, .25); }
.vm-sx .vm-sx-hero::before, .vm-sx .vm-sx-hero::after { content: ""; position: absolute; pointer-events: none; border-radius: 50%; filter: blur(2px); }
.vm-sx .vm-sx-hero::before { width: 220px; height: 220px; right: -60px; top: -80px; background: radial-gradient(circle, rgba(255, 255, 255, .85), rgba(255, 255, 255, 0) 70%); }
.vm-sx .vm-sx-hero::after { width: 260px; height: 120px; left: -40px; bottom: -50px; background: radial-gradient(ellipse, rgba(255, 255, 255, .7), rgba(255, 255, 255, 0) 70%); }
[data-theme="dark"] .vm-sx .vm-sx-hero::before { background: radial-gradient(circle, rgba(165, 180, 252, .28), rgba(165, 180, 252, 0) 70%); }
[data-theme="dark"] .vm-sx .vm-sx-hero::after { background: radial-gradient(ellipse, rgba(56, 189, 248, .16), rgba(56, 189, 248, 0) 70%); }
.vm-sx .vm-sx-hero > * { position: relative; z-index: 1; }
.vm-sx .vm-sx-hero__kicker { font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; --sx-c: var(--sx-accent-ink); padding: 2px 4px 0; }
.vm-sx .vm-sx-hero__headline { font-size: clamp(1.1rem, 2.3vw, 1.38rem); font-weight: 800; line-height: 1.3; max-width: 52ch; padding: 0 4px; }
.vm-sx .vm-sx-hero__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; padding: 0 6px 2px; font-size: .84rem; --sx-c: var(--sx-soft); }
.vm-sx .vm-sx-glass { padding: 13px 16px; border-radius: 18px; background: var(--sx-glass); border: 1px solid var(--sx-glass-line); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }

.vm-sx .vm-sx-rings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.vm-sx .vm-sx-ringbox {
	display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; min-width: 0;
	padding: 14px 10px 14px; border-radius: 22px; background: var(--sx-glass); border: 1px solid var(--sx-glass-line);
	-webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.vm-sx .vm-sx-ring { position: relative; display: inline-block; width: 112px; height: 112px; margin: 6px 0 6px; }
.vm-sx .vm-sx-ring > svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.vm-sx .vm-sx-ring__track { fill: none; stroke: var(--sx-track); stroke-width: 11; }
.vm-sx .vm-sx-ring__val { fill: none; stroke-width: 11; stroke-linecap: round; filter: drop-shadow(0 2px 6px rgba(15, 23, 42, .12)); }
.vm-sx .vm-sx-ring__in { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.vm-sx .vm-sx-ring__num { display: inline-flex; align-items: baseline; gap: 2px; font-size: 1.9rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.vm-sx .vm-sx-ring__num small { font-size: .8rem; font-weight: 800; --sx-c: var(--sx-soft); }
.vm-sx .vm-sx-ringbox__t { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; --sx-c: var(--sx-soft); }
.vm-sx .vm-sx-ringbox__v { font-size: 1.02rem; font-weight: 800; line-height: 1.25; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vm-sx .vm-sx-ringbox__s { font-size: .76rem; --sx-c: var(--sx-soft); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Pločice ────────────────────────────────────────────────────────────── */
.vm-sx .vm-sx-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.vm-sx .vm-sx-tile {
	position: relative; display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 12px 40px 12px 14px; border-radius: 18px;
	background: var(--sx-glass); border: 1px solid var(--sx-glass-line); --sx-c: var(--sx-ink);
	transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.vm-sx .vm-sx-tiles--solid .vm-sx-tile { background: var(--sx-card-solid); border-color: var(--sx-line); }
.vm-sx a.vm-sx-tile:hover, .vm-sx a.vm-sx-tile:focus-visible { transform: translateY(-2px); border-color: var(--sx-accent); box-shadow: 0 12px 24px -16px rgba(37, 99, 235, .6); text-decoration: none !important; }
.vm-sx .vm-sx-tile__icon { display: inline-flex; width: 30px; height: 30px; margin-bottom: 4px; align-items: center; justify-content: center; border-radius: 10px; background: rgba(59, 130, 246, .12); --sx-c: var(--sx-accent-ink); }
.vm-sx .vm-sx-tile__icon svg { color: var(--sx-accent-ink); }
.vm-sx .vm-sx-tile--warm .vm-sx-tile__icon { background: rgba(239, 68, 68, .12); }
.vm-sx .vm-sx-tile--warm .vm-sx-tile__icon svg { color: #dc2626; }
.vm-sx .vm-sx-tile--cold .vm-sx-tile__icon { background: rgba(59, 130, 246, .14); }
.vm-sx .vm-sx-tile--wind .vm-sx-tile__icon { background: rgba(20, 184, 166, .14); }
.vm-sx .vm-sx-tile--wind .vm-sx-tile__icon svg { color: #0d9488; }
.vm-sx .vm-sx-tile--rain .vm-sx-tile__icon { background: rgba(14, 165, 233, .14); }
.vm-sx .vm-sx-tile--rain .vm-sx-tile__icon svg { color: #0284c7; }
.vm-sx .vm-sx-tile--snow .vm-sx-tile__icon { background: rgba(148, 163, 184, .2); }
.vm-sx .vm-sx-tile--ok .vm-sx-tile__icon { background: rgba(34, 197, 94, .14); }
.vm-sx .vm-sx-tile--ok .vm-sx-tile__icon svg { color: #16a34a; }
[data-theme="dark"] .vm-sx .vm-sx-tile__icon svg { color: #93c5fd; }
[data-theme="dark"] .vm-sx .vm-sx-tile--warm .vm-sx-tile__icon svg { color: #fca5a5; }
[data-theme="dark"] .vm-sx .vm-sx-tile--wind .vm-sx-tile__icon svg { color: #5eead4; }
[data-theme="dark"] .vm-sx .vm-sx-tile--rain .vm-sx-tile__icon svg { color: #7dd3fc; }
[data-theme="dark"] .vm-sx .vm-sx-tile--ok .vm-sx-tile__icon svg { color: #86efac; }
.vm-sx .vm-sx-tile__label { font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; --sx-c: var(--sx-soft); }
.vm-sx .vm-sx-tile__value { font-size: 1.32rem; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vm-sx .vm-sx-tile__where { font-size: .84rem; --sx-c: var(--sx-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vm-sx .vm-sx-tile__go { position: absolute; right: 12px; top: 12px; display: inline-flex; width: 24px; height: 24px; border-radius: 50%; align-items: center; justify-content: center; background: rgba(59, 130, 246, .1); }
.vm-sx .vm-sx-tile__go svg { color: var(--sx-accent-ink); }

/* ── Skok-pilule i lepljiva traka ──────────────────────────────────────── */
.vm-sx .vm-sx-jump { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin-top: -6px; }
.vm-sx .vm-sx-jump::-webkit-scrollbar { display: none; }
html :is(#vm-pad, #vm-sth, #vm-stp) .vm-sx-jump a {
	flex: none; padding: 7px 14px; border-radius: 999px; background: var(--sx-chip); --sx-c: var(--sx-muted);
	font-size: .84rem; font-weight: 700; border: 1px solid transparent !important; transition: border-color .15s, color .15s;
}
html :is(#vm-pad, #vm-sth, #vm-stp) .vm-sx-jump a:hover, html :is(#vm-pad, #vm-sth, #vm-stp) .vm-sx-jump a:focus-visible { --sx-c: var(--sx-accent-ink); border-color: var(--sx-accent) !important; text-decoration: none !important; }

.vm-sx .vm-sx-sectionbar {
	position: sticky; top: 0; z-index: 40; margin: -6px 0 -4px; padding: 6px 0;
	background: color-mix(in srgb, var(--vm-bg-primary, #fff) 88%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--sx-line);
}
@media (min-width: 1000px) { .vm-sx .vm-sx-sectionbar { top: var(--vm-header-h, 0px); } }
.vm-sx .vm-sx-sectionbar__track { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent); mask-image: linear-gradient(90deg, #000 92%, transparent); padding-right: 24px; }
.vm-sx .vm-sx-sectionbar__track::-webkit-scrollbar { display: none; }
html :is(#vm-pad, #vm-sth, #vm-stp) .vm-sx-sectionbar a { flex: none; padding: 7px 13px; border-radius: 999px; font-size: .86rem; font-weight: 750; --sx-c: var(--sx-muted); border: 1px solid transparent !important; }
html :is(#vm-pad, #vm-sth, #vm-stp) .vm-sx-sectionbar a:hover { text-decoration: none !important; --sx-c: var(--sx-ink); }
html :is(#vm-pad, #vm-sth, #vm-stp) .vm-sx-sectionbar a[aria-current="true"] { --sx-c: #ffffff; background: var(--sx-grad); box-shadow: 0 6px 16px -10px rgba(37, 99, 235, .8); }

/* ── Kartice ────────────────────────────────────────────────────────────── */
.vm-sx .vm-sx-card {
	display: flex; flex-direction: column; gap: 16px; padding: 20px 22px 22px; border-radius: var(--sx-radius); min-width: 0;
	background: var(--sx-card); border: 1px solid var(--sx-card-border); box-shadow: var(--sx-shadow); scroll-margin-top: 120px;
}
@media (min-width: 1000px) { .vm-sx .vm-sx-card, .vm-sx .vm-sx-hero { scroll-margin-top: calc(var(--vm-header-h, 0px) + 70px); } }
.vm-sx .vm-sx-card__head { display: flex; align-items: flex-start; gap: 14px; }
.vm-sx .vm-sx-card__head > div { flex: 1; min-width: 0; }
.vm-sx .vm-sx-card__icon {
	flex: none; display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 15px;
	background: linear-gradient(135deg, rgba(59, 130, 246, .16), rgba(99, 102, 241, .2));
}
.vm-sx .vm-sx-card__icon svg { color: #1d4ed8; }
.vm-sx .vm-sx-card__icon--rain { background: linear-gradient(135deg, rgba(125, 211, 252, .32), rgba(59, 130, 246, .16)); }
.vm-sx .vm-sx-card__icon--rain svg { color: #0284c7; }
.vm-sx .vm-sx-card__icon--map { background: linear-gradient(135deg, rgba(94, 234, 212, .3), rgba(59, 130, 246, .14)); }
.vm-sx .vm-sx-card__icon--map svg { color: #0d9488; }
.vm-sx .vm-sx-card__icon--chart { background: linear-gradient(135deg, rgba(196, 181, 253, .32), rgba(129, 140, 248, .16)); }
.vm-sx .vm-sx-card__icon--chart svg { color: #7c3aed; }
.vm-sx .vm-sx-card__icon--gauge { background: linear-gradient(135deg, rgba(253, 224, 71, .3), rgba(251, 146, 60, .16)); }
.vm-sx .vm-sx-card__icon--gauge svg { color: #d97706; }
.vm-sx .vm-sx-card__icon--table { background: linear-gradient(135deg, rgba(203, 213, 225, .5), rgba(148, 163, 184, .2)); }
.vm-sx .vm-sx-card__icon--table svg { color: #475569; }
.vm-sx .vm-sx-card__icon--help { background: linear-gradient(135deg, rgba(251, 207, 232, .45), rgba(244, 114, 182, .14)); }
.vm-sx .vm-sx-card__icon--help svg { color: #db2777; }
.vm-sx .vm-sx-card__icon--ok { background: linear-gradient(135deg, rgba(134, 239, 172, .32), rgba(34, 197, 94, .14)); }
.vm-sx .vm-sx-card__icon--ok svg { color: #16a34a; }
[data-theme="dark"] .vm-sx .vm-sx-card__icon svg { color: #93c5fd; }
[data-theme="dark"] .vm-sx .vm-sx-card__icon--rain svg { color: #7dd3fc; }
[data-theme="dark"] .vm-sx .vm-sx-card__icon--map svg { color: #5eead4; }
[data-theme="dark"] .vm-sx .vm-sx-card__icon--chart svg { color: #c4b5fd; }
[data-theme="dark"] .vm-sx .vm-sx-card__icon--gauge svg { color: #fcd34d; }
[data-theme="dark"] .vm-sx .vm-sx-card__icon--table svg { color: #cbd5e1; }
[data-theme="dark"] .vm-sx .vm-sx-card__icon--help svg { color: #f9a8d4; }
[data-theme="dark"] .vm-sx .vm-sx-card__icon--ok svg { color: #86efac; }
.vm-sx .vm-sx-h2 { font-size: clamp(1.14rem, 2.2vw, 1.34rem); line-height: 1.25; font-weight: 800; }
.vm-sx .vm-sx-h3 { font-size: 1rem; line-height: 1.3; font-weight: 800; }
.vm-sx .vm-sx-card__sub { margin-top: 3px !important; --sx-c: var(--sx-soft); font-size: .92rem; }
.vm-sx .vm-sx-note { --sx-c: var(--sx-soft); font-size: .86rem; }
.vm-sx .vm-sx-empty { --sx-c: var(--sx-muted); padding: 14px 16px; border-radius: 16px; background: var(--sx-tint); }
.vm-sx .vm-sx-prose { display: grid; gap: 10px; --sx-c: var(--sx-muted); font-size: .95rem; }
.vm-sx .vm-sx-prose strong { --sx-c: var(--sx-ink); }
html :is(#vm-pad, #vm-sth, #vm-stp) .vm-sx-pill {
	appearance: none; -webkit-appearance: none; flex: none; display: inline-flex; align-items: center; gap: 7px; margin: 0;
	padding: 6px 12px; border-radius: 999px; background: var(--sx-card-solid); border: 1px solid var(--sx-line);
	font: inherit; font-size: .8rem; font-weight: 700; --sx-c: var(--sx-muted); white-space: nowrap; cursor: default; box-shadow: none; text-transform: none; letter-spacing: 0;
}
.vm-sx .vm-sx-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--sx-grad); }
.vm-sx button.vm-sx-pill { cursor: pointer; }
[data-theme="dark"] .vm-sx .vm-sx-pill { background: rgba(30, 41, 59, .8); }

/* ── Kontrole: segment i prekidač ───────────────────────────────────────── */
.vm-sx .vm-sx-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 16px; background: var(--sx-tint); border: 1px solid var(--sx-line); }
html :is(#vm-pad, #vm-sth, #vm-stp) .vm-sx-seg > :is(button, a) {
	appearance: none; -webkit-appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; margin: 0;
	min-height: 38px; padding: 6px 13px; border: 0 !important; border-radius: 12px; background: transparent; box-shadow: none;
	font: inherit; font-size: .88rem; font-weight: 750; --sx-c: var(--sx-muted); cursor: pointer; text-transform: none; letter-spacing: 0; line-height: 1.2;
	transition: background .16s ease, box-shadow .16s ease;
}
html :is(#vm-pad, #vm-sth, #vm-stp) .vm-sx-seg > button:hover { background: var(--sx-card-solid); --sx-c: var(--sx-ink); }
html :is(#vm-pad, #vm-sth, #vm-stp) .vm-sx-seg > :is(button, a):is([aria-pressed="true"], [aria-selected="true"], [aria-current="true"], .is-active) {
	background: var(--sx-grad); --sx-c: #ffffff; box-shadow: 0 8px 18px -10px rgba(37, 99, 235, .8);
}
html :is(#vm-pad, #vm-sth, #vm-stp) .vm-sx-seg > button:disabled { opacity: .45; cursor: not-allowed; }
html :is(#vm-pad, #vm-sth, #vm-stp) .vm-sx-switch {
	appearance: none; -webkit-appearance: none; display: inline-flex; align-items: center; gap: 10px; margin: 0;
	min-height: 40px; padding: 6px 14px 6px 8px; border-radius: 999px; border: 1px solid var(--sx-line) !important;
	background: var(--sx-card-solid); box-shadow: none; font: inherit; font-size: .88rem; font-weight: 750; --sx-c: var(--sx-ink);
	cursor: pointer; text-transform: none; letter-spacing: 0; line-height: 1.2;
}
.vm-sx .vm-sx-switch__knob { position: relative; flex: none; width: 38px; height: 22px; border-radius: 999px; background: var(--sx-track); transition: background .18s ease; }
.vm-sx .vm-sx-switch__knob::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, .3); transition: transform .18s ease; }
.vm-sx .vm-sx-switch[aria-checked="true"] .vm-sx-switch__knob, .vm-sx .vm-sx-switch:has(input:checked) .vm-sx-switch__knob { background: var(--sx-grad); }
.vm-sx .vm-sx-switch[aria-checked="true"] .vm-sx-switch__knob::after, .vm-sx .vm-sx-switch:has(input:checked) .vm-sx-switch__knob::after { transform: translateX(16px); }
.vm-sx .vm-sx-switch:disabled { opacity: .5; cursor: not-allowed; }
.vm-sx .vm-sx-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.vm-sx .vm-sx-field select, .vm-sx .vm-sx-field input, .vm-sx select.vm-sx-field, .vm-sx input.vm-sx-field {
	min-height: 40px; padding: 8px 12px; border: 1px solid var(--sx-line) !important; border-radius: 12px; background: var(--sx-card-solid) !important;
	--sx-c: var(--sx-ink); font: inherit; font-size: .9rem; box-shadow: none;
}

/* ── Značke mreža ───────────────────────────────────────────────────────── */
.vm-sx .vm-sx-badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: .72rem; font-weight: 800; letter-spacing: .02em; line-height: 1.5; white-space: nowrap; background: #e2e8f0; --sx-c: #334155; }
.vm-sx .vm-sx-badge--gms, .vm-sx .vm-sx-badge--ams_state { background: #dbeafe; --sx-c: #1d4ed8; }
.vm-sx .vm-sx-badge--ams_supplementary { background: #e0e7ff; --sx-c: #4338ca; }
.vm-sx .vm-sx-badge--wu { background: #fef3c7; --sx-c: #92400e; }
.vm-sx .vm-sx-badge--clientraw { background: #dcfce7; --sx-c: #166534; }
.vm-sx .vm-sx-badge--flumen { background: #ccfbf1; --sx-c: #115e59; }
[data-theme="dark"] .vm-sx .vm-sx-badge { background: rgba(71, 85, 105, .6); --sx-c: #e2e8f0; }
[data-theme="dark"] .vm-sx .vm-sx-badge--gms, [data-theme="dark"] .vm-sx .vm-sx-badge--ams_state { background: #1e3a8a; --sx-c: #bfdbfe; }
[data-theme="dark"] .vm-sx .vm-sx-badge--ams_supplementary { background: #312e81; --sx-c: #c7d2fe; }
[data-theme="dark"] .vm-sx .vm-sx-badge--wu { background: #78350f; --sx-c: #fde68a; }
[data-theme="dark"] .vm-sx .vm-sx-badge--clientraw { background: #14532d; --sx-c: #bbf7d0; }
[data-theme="dark"] .vm-sx .vm-sx-badge--flumen { background: #134e4a; --sx-c: #99f6e4; }

/* ── Legenda (traka) ────────────────────────────────────────────────────── */
.vm-sx .vm-sx-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.vm-sx .vm-sx-legend__t { font-size: .8rem; font-weight: 800; --sx-c: var(--sx-soft); }
.vm-sx .vm-sx-legend__bar { display: flex; flex: 1 1 280px; max-width: 520px; height: 12px; padding-bottom: 22px; box-sizing: content-box; }
.vm-sx .vm-sx-legend__bar span { position: relative; flex: 1; height: 12px; }
.vm-sx .vm-sx-legend__bar span:first-child { border-radius: 999px 0 0 999px; }
.vm-sx .vm-sx-legend__bar span:last-child { border-radius: 0 999px 999px 0; }
.vm-sx .vm-sx-legend__bar em { position: absolute; top: 14px; left: 0; transform: translateX(-50%); font-size: .7rem; font-style: normal; font-weight: 700; --sx-c: var(--sx-soft); }

/* ── Tabela ─────────────────────────────────────────────────────────────── */
.vm-sx .vm-sx-tablewrap { overflow-x: auto; border-radius: 16px; border: 1px solid var(--sx-line); background: var(--sx-card-solid); }
.vm-sx table.vm-sx-table { width: 100%; border-collapse: collapse; margin: 0; font-size: .9rem; border: 0; }
.vm-sx .vm-sx-table th, .vm-sx .vm-sx-table td { padding: 9px 12px; border: 0; border-bottom: 1px solid var(--sx-line); text-align: left; background: transparent; }
.vm-sx .vm-sx-table thead th { font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; --sx-c: var(--sx-soft); background: var(--sx-tint); }
.vm-sx .vm-sx-table tbody tr:last-child > * { border-bottom: 0; }

/* ── FAQ i povezano ─────────────────────────────────────────────────────── */
.vm-sx .vm-sx-faq { display: grid; gap: 8px; }
.vm-sx .vm-sx-faq__item { border-radius: 16px; background: var(--sx-card-solid); border: 1px solid var(--sx-line); overflow: hidden; }
[data-theme="dark"] .vm-sx .vm-sx-faq__item { background: rgba(15, 23, 42, .6); }
.vm-sx .vm-sx-faq__item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; font-weight: 800; }
.vm-sx .vm-sx-faq__item summary::-webkit-details-marker { display: none; }
.vm-sx .vm-sx-faq__item summary::after { content: "+"; flex: none; display: inline-flex; width: 24px; height: 24px; align-items: center; justify-content: center; border-radius: 50%; background: rgba(59, 130, 246, .12); --sx-c: var(--sx-accent-ink); font-weight: 800; }
.vm-sx .vm-sx-faq__item[open] summary::after { content: "−"; }
.vm-sx .vm-sx-faq__item p { padding: 0 16px 14px; --sx-c: var(--sx-muted); font-size: .94rem; }
.vm-sx .vm-sx-related { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
html :is(#vm-pad, #vm-sth, #vm-stp) .vm-sx-related a {
	display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: center; padding: 14px; border-radius: 16px;
	background: var(--sx-card-solid); border: 1px solid var(--sx-line) !important; --sx-c: var(--sx-ink); transition: transform .18s ease, border-color .18s ease;
}
[data-theme="dark"] .vm-sx .vm-sx-related a { background: rgba(15, 23, 42, .6); }
html :is(#vm-pad, #vm-sth, #vm-stp) .vm-sx-related a:hover { transform: translateY(-2px); border-color: var(--sx-accent) !important; text-decoration: none !important; }
.vm-sx .vm-sx-related a > span { grid-row: span 2; display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 12px; background: rgba(59, 130, 246, .12); }
.vm-sx .vm-sx-related a > span svg { color: var(--sx-accent-ink); }
.vm-sx .vm-sx-related b { font-weight: 800; }
.vm-sx .vm-sx-related small { font-size: .82rem; --sx-c: var(--sx-soft); }

/* ── Leaflet unutar kompleta ────────────────────────────────────────────── */
.vm-sx .leaflet-container { font: inherit; }
.vm-sx .leaflet-control-attribution { font-size: 10px !important; line-height: 1.4; padding: 1px 6px !important; background: rgba(255, 255, 255, .78) !important; border-radius: 8px 0 0 0; }
[data-theme="dark"] .vm-sx .leaflet-control-attribution { background: rgba(15, 23, 42, .78) !important; }
[data-theme="dark"] .vm-sx .leaflet-control-attribution, [data-theme="dark"] .vm-sx .leaflet-control-attribution * { color: #cbd5e1 !important; }
[data-theme="dark"] .vm-sx .leaflet-control-attribution a { color: #93c5fd !important; }
[data-theme="dark"] .vm-sx .leaflet-bar a { background: #1e293b !important; color: #e2e8f0 !important; border-color: #334155 !important; }
.vm-sx .leaflet-container img, .vm-sx .leaflet-container .leaflet-tile { background: transparent !important; animation: none !important; max-width: none !important; max-height: none !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; margin: 0 !important; padding: 0 !important; }

/* ── Mobilni ────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
	.vm-sx { gap: 16px; }
	.vm-sx .vm-sx-hero { padding: 12px; border-radius: 24px; gap: 12px; }
	.vm-sx .vm-sx-rings { gap: 6px; }
	.vm-sx .vm-sx-ringbox { padding: 10px 4px 10px; border-radius: 18px; }
	.vm-sx .vm-sx-ring { width: 78px; height: 78px; margin: 4px 0; }
	.vm-sx .vm-sx-ring__num { font-size: 1.32rem; }
	.vm-sx .vm-sx-ring__num small { font-size: .66rem; }
	.vm-sx .vm-sx-ringbox__t { font-size: .6rem; letter-spacing: .04em; }
	.vm-sx .vm-sx-ringbox__v { font-size: .82rem; }
	.vm-sx .vm-sx-ringbox__s { font-size: .66rem; }
	.vm-sx .vm-sx-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
	.vm-sx .vm-sx-tile { padding: 10px 12px; }
	.vm-sx .vm-sx-tile__value { font-size: 1.12rem; }
	.vm-sx .vm-sx-tile__go { display: none; }
	.vm-sx .vm-sx-card { padding: 16px 14px 18px; border-radius: 20px; gap: 14px; }
	.vm-sx .vm-sx-card__head { gap: 12px; flex-wrap: wrap; }
	.vm-sx .vm-sx-card__icon { width: 40px; height: 40px; border-radius: 13px; }
	.vm-sx .vm-sx-card__head > div { flex: 1 1 calc(100% - 60px); }
	.vm-sx .vm-sx-seg { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
	.vm-sx .vm-sx-seg::-webkit-scrollbar { display: none; }
	html :is(#vm-pad, #vm-sth, #vm-stp) .vm-sx-seg > :is(button, a) { flex: none; padding: 6px 11px; font-size: .84rem; }
	.vm-sx .vm-sx-related { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
	.vm-sx *, .vm-sx *::before, .vm-sx *::after { transition: none !important; animation: none !important; }
}
