/* Sales Quiz — vizualni jezik po Atlassian Design System (svetla tema).
   Žetoni povzeti po atlassian.design: Blue 700 #0C66E4, tekst #172B4D,
   površine #FFFFFF / #F7F8F9, obrobe #DCDFE4, radij 3–8 px, pisava sistemska. */

:root {
  --bg: #F7F8F9;              /* surface.sunken */
  --bg-panel: #FFFFFF;        /* surface */
  --bg-panel-2: #F1F2F4;      /* surface.hovered */
  --text: #172B4D;
  --text-dim: #626F86;
  --text-subtle: #44546F;
  --line: #DCDFE4;
  --brand: #0C66E4;           /* Blue 700 */
  --brand-hover: #0055CC;
  --brand-light: #0C66E4;     /* povezave na svetli podlagi */
  --focus: #388BFF;
  --good: #22A06B;            /* Green 600 */
  --good-bg: #DCFFF1;
  --bad: #C9372C;             /* Red 600 */
  --bad-bg: #FFECEB;
  --warn: #B38600;
  --opt-a: #C9372C;           /* Red 600 */
  --opt-b: #0C66E4;           /* Blue 700 */
  --opt-c: #C25100;           /* Orange 600 */
  --radius: 8px;
  --radius-s: 3px;
  --shadow: 0 1px 1px rgba(9, 30, 66, 0.25), 0 0 1px rgba(9, 30, 66, 0.31);
  --shadow-overlay: 0 8px 12px rgba(9, 30, 66, 0.15), 0 0 1px rgba(9, 30, 66, 0.31);
  --footer-bg: #101214;       /* temna pasica */
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button { font: inherit; cursor: pointer; border: 0; color: inherit; background: none; }
input {
  font: inherit; color: var(--text);
  background: var(--bg-panel);
  border: 1px solid #8590A2;
  border-radius: var(--radius-s);
  padding: 10px 12px;
  outline: none;
  width: 100%;
}
input::placeholder { color: #8590A2; }
input:focus { border-color: var(--focus); box-shadow: 0 0 0 1px var(--focus); }

a { color: var(--brand); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--brand);
  color: #FFFFFF;
  border-radius: var(--radius-s);
  padding: 10px 16px;
  font-weight: 600;
  transition: background 0.1s ease, transform 0.05s ease;
  user-select: none;
}
.btn:hover { background: var(--brand-hover); }
.btn:active { transform: translateY(1px); }
.btn.big { font-size: 1.15rem; padding: 14px 28px; border-radius: 4px; }
.btn.ghost { background: transparent; color: var(--text-subtle); font-weight: 600; border: 1px solid var(--line); }
.btn.ghost:hover { background: rgba(9, 30, 66, 0.06); color: var(--text); }
.btn.danger { background: transparent; border: 1px solid var(--line); color: var(--bad); font-weight: 600; }
.btn.danger:hover { background: var(--bad-bg); border-color: var(--bad); }
.btn:disabled { opacity: 0.45; cursor: default; transform: none; }

/* ---------- temna pasica z logotipom ---------- */

.appfooter {
  background: var(--footer-bg);
  color: #BFC1C4;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 6px 16px;
  flex: 0 0 auto;
}
.appfooter .pwr { font-size: 0.7rem; color: #738496; }
.appfooter .bllogo { height: 16px; width: auto; display: block; opacity: 0.9; }

.toast-box { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: #FFFFFF; border-left: 4px solid var(--bad); color: var(--text);
  padding: 12px 18px; border-radius: var(--radius-s); box-shadow: var(--shadow-overlay);
  opacity: 0; transform: translateY(-8px); transition: all 0.3s ease; font-weight: 600;
  max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* ---------- odgovori ---------- */

.opt {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  border-radius: var(--radius);
  padding: 16px 18px;
  font-weight: 600;
  text-align: left;
  color: #fff;
  box-shadow: var(--shadow);
  transition: opacity 0.25s ease, filter 0.1s ease, transform 0.05s ease;
}
.opt .shape { font-size: 1.05em; flex: 0 0 auto; }
.opt.opt-a { background: var(--opt-a); }
.opt.opt-b { background: var(--opt-b); }
.opt.opt-c { background: var(--opt-c); }
.opt:not(:disabled):hover { filter: brightness(1.08); }
.opt:not(:disabled):active { transform: translateY(1px); }
.opt.dim { opacity: 0.3; filter: saturate(0.5); }
.opt.correct-glow { outline: 3px solid var(--good); outline-offset: 3px; }
.opt .mark { margin-left: auto; font-size: 1.2em; }

/* ---------- časovnica ---------- */

.timerbar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.timerbar > div {
  height: 100%; width: 100%;
  background: var(--brand);
  border-radius: 999px;
  transform-origin: left center;
}
.timerbar.low > div { background: var(--bad); }

/* ---------- tabele / lestvice ---------- */

.tablewrap { overflow-x: auto; }
table.board { width: 100%; border-collapse: collapse; }
table.board th, table.board td { padding: 10px 14px; text-align: left; white-space: nowrap; }
table.board th { color: var(--text-dim); font-size: 0.72em; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; border-bottom: 2px solid var(--line); }
table.board td { border-bottom: 1px solid #F1F2F4; }
table.board tr.top1 td { background: #FFF7D6; font-weight: 700; }
table.board tr.top2 td { background: #F7F8F9; font-weight: 600; }
table.board tr.top3 td { background: #FFF3EB; font-weight: 600; }
table.board td.num, table.board th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.board td.rank { width: 3.2em; color: var(--text-dim); }

.statbar { display: flex; align-items: center; gap: 10px; }
.statbar .bar { flex: 1; height: 12px; background: var(--bg-panel-2); border-radius: 999px; overflow: hidden; }
.statbar .bar > div { height: 100%; background: var(--good); border-radius: 999px; }
.statbar.badbar .bar > div { background: var(--bad); }

/* =====================================================================
   IGRALEC (telefon)
   ===================================================================== */

body.player { display: flex; flex-direction: column; min-height: 100dvh; }
body.player .wrap {
  width: 100%; max-width: 560px; margin: 0 auto; padding: 12px 16px 24px;
  flex: 1; display: flex; flex-direction: column;
}

.topline {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px;
  margin-bottom: 14px; color: var(--text-subtle); font-size: 0.9rem; font-weight: 600;
  min-height: 34px;
}
.topline .apptitle { color: var(--text); font-weight: 700; letter-spacing: 0.01em; }
.topline #who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topline .clientlogo { display: flex; justify-content: flex-end; align-items: center; }
.topline .clientlogo img { max-height: 30px; max-width: 130px; object-fit: contain; display: none; }

.p-card {
  background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 22px; box-shadow: var(--shadow);
}
.p-center { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 18px; text-align: center; }
.p-title { font-size: 1.5rem; font-weight: 700; line-height: 1.25; }
.p-sub { color: var(--text-subtle); font-weight: 600; }
.p-huge { font-size: clamp(2.4rem, 12vw, 3.4rem); font-weight: 800; }
.p-points { font-size: 2rem; font-weight: 800; }
.p-good { color: var(--good); }
.p-bad { color: var(--bad); }
.p-muted { color: var(--text-dim); }

.subline { display: flex; justify-content: space-between; color: var(--text-subtle); font-weight: 600; font-size: 0.9rem; margin-bottom: 4px; }

.p-question { font-size: 1.15rem; font-weight: 700; line-height: 1.4; margin: 10px 0 16px; }
.p-opts { display: flex; flex-direction: column; gap: 12px; }
.p-opts .opt { font-size: 1.05rem; min-height: 64px; }

.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

.joinlogo { text-align: center; margin: 30px 0 22px; }
.joinlogo .big { font-size: 1.9rem; font-weight: 800; }
.joinlogo .sub { color: var(--text-subtle); margin-top: 6px; font-weight: 600; }

.conn-warn {
  position: fixed; bottom: 64px; left: 50%; transform: translateX(-50%);
  background: #FFF7D6; border: 1px solid #E2B203; color: #533F04;
  border-radius: 999px; padding: 8px 18px; font-weight: 700; font-size: 0.9rem; z-index: 80;
  box-shadow: var(--shadow);
}

/* =====================================================================
   ADMIN / PROJEKCIJA
   ===================================================================== */

body.host { min-height: 100dvh; display: flex; flex-direction: column; }
body.host .stage {
  flex: 1; display: flex; flex-direction: column;
  padding: clamp(14px, 2.6vw, 36px);
  max-width: 1500px; margin: 0 auto; width: 100%;
}

.h-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: clamp(10px, 2vh, 24px); }
.h-top .crumb { font-size: clamp(1rem, 1.7vw, 1.4rem); font-weight: 600; color: var(--text-dim); }
.h-top .crumb b { color: var(--text); font-weight: 700; }
.h-tools { display: flex; gap: 8px; align-items: center; }
.iconbtn {
  width: 40px; height: 40px; border-radius: var(--radius-s); border: 1px solid var(--line);
  background: var(--bg-panel);
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem; color: var(--text-subtle);
}
.iconbtn:hover { background: var(--bg-panel-2); color: var(--text); }

.h-hero { text-align: center; margin: clamp(8px, 4vh, 36px) 0; }
.h-hero .kicker { color: var(--brand); font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; font-size: clamp(0.75rem, 1.3vw, 1rem); }
.h-hero h1 { font-size: clamp(2rem, 4.6vw, 3.6rem); font-weight: 800; margin-top: 8px; color: var(--text); }
.h-hero .note { color: var(--text-subtle); font-size: clamp(0.95rem, 1.7vw, 1.35rem); margin-top: 12px; font-weight: 500; }

.h-panel {
  background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(16px, 2.4vw, 30px); box-shadow: var(--shadow);
}

.lobby-grid { display: grid; grid-template-columns: 340px 1fr; gap: clamp(14px, 2vw, 26px); align-items: start; }
@media (max-width: 980px) { .lobby-grid { grid-template-columns: 1fr; } }

.qrbox { text-align: center; }
.qrbox svg { width: min(230px, 60vw); height: auto; background: #fff; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); }
.qrbox .url { margin-top: 12px; font-size: 1.1rem; font-weight: 700; color: var(--brand); word-break: break-all; }
.qrbox .hint { color: var(--text-dim); margin-top: 6px; font-weight: 500; font-size: 0.92rem; }

.gamegrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.gamecard { background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.gamecard h3 { font-size: 1.05rem; margin-bottom: 4px; color: var(--text); }
.gamecard .gname { color: var(--text-dim); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.roundrow { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.roundbtn {
  display: flex; align-items: center; justify-content: space-between;
  border: 1px solid var(--line); border-radius: var(--radius-s); padding: 9px 12px; font-weight: 600;
  background: var(--bg-panel);
  color: var(--text-subtle);
}
.roundbtn:hover { background: #E9F2FF; border-color: var(--brand); color: var(--text); }
.roundbtn .done { color: var(--good); font-weight: 700; font-size: 0.9em; }
.roundbtn .todo { color: var(--text-dim); font-weight: 600; font-size: 0.85em; }

.playerchips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; justify-content: center; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-panel); border: 1px solid var(--line);
  padding: 6px 12px; border-radius: 999px; font-weight: 600; font-size: 0.92rem;
  color: var(--text);
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); }
.chip.off { opacity: 0.55; }
.chip.off .dot { background: #8590A2; }
.chip .x { color: var(--text-dim); font-weight: 800; padding: 0 2px; }
.chip .x:hover { color: var(--bad); }

.h-question { font-size: clamp(1.5rem, 3.4vw, 2.8rem); font-weight: 700; line-height: 1.3; text-align: center; margin: clamp(10px, 3vh, 28px) auto; max-width: 1200px; color: var(--text); }
.h-opts { display: grid; gap: clamp(10px, 1.6vw, 18px); max-width: 1150px; margin: 0 auto; width: 100%; }
.h-opts .opt { font-size: clamp(1.05rem, 2.3vw, 1.8rem); padding: clamp(14px, 2vw, 24px); }
.h-opts.n2 { grid-template-columns: 1fr 1fr; }
.h-opts.n3 { grid-template-columns: 1fr; }
@media (min-width: 900px) { .h-opts.n3 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .h-opts.n2 { grid-template-columns: 1fr; } }

.h-timer { display: flex; align-items: center; gap: 18px; max-width: 1150px; margin: clamp(12px, 3vh, 28px) auto 0; width: 100%; }
.h-timer .clock {
  font-size: clamp(1.7rem, 3.8vw, 3rem); font-weight: 800; font-variant-numeric: tabular-nums;
  min-width: 2.2em; text-align: center; color: var(--text);
  background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 10px;
  box-shadow: var(--shadow);
}
.h-timer .clock.low { color: var(--bad); border-color: var(--bad); }
.h-timer .timerbar { flex: 1; height: 14px; }
.answercount { text-align: center; color: var(--text-subtle); font-weight: 600; font-size: clamp(1rem, 1.9vw, 1.4rem); margin-top: clamp(10px, 2vh, 18px); }
.answercount b { color: var(--text); font-weight: 700; }

.h-controls { display: flex; justify-content: center; gap: 10px; margin-top: clamp(14px, 3vh, 28px); flex-wrap: wrap; }

.dist { max-width: 1000px; margin: clamp(12px, 2.5vh, 24px) auto 0; width: 100%; display: flex; flex-direction: column; gap: 10px; }
.distrow { display: grid; grid-template-columns: 2.2em 1fr 3.5em; align-items: center; gap: 12px; font-size: clamp(1rem, 1.9vw, 1.4rem); font-weight: 700; color: var(--text); }
.distrow .shape { text-align: center; }
.distrow .bar { height: clamp(16px, 2.2vw, 26px); border-radius: 6px; background: var(--bg-panel-2); overflow: hidden; }
.distrow .bar > div { height: 100%; border-radius: 6px; transition: width 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); }
.distrow.da .bar > div { background: var(--opt-a); }
.distrow.db .bar > div { background: var(--opt-b); }
.distrow.dc .bar > div { background: var(--opt-c); }
.distrow.dnone .bar > div { background: #8590A2; }
.distrow .cnt { text-align: right; font-variant-numeric: tabular-nums; }
.distrow.won .bar > div { box-shadow: inset 0 0 0 3px rgba(34, 160, 107, 0.85); }
.distrow.won { color: var(--good); }

.tallyline { text-align: center; font-size: clamp(1.05rem, 2vw, 1.6rem); font-weight: 700; margin-top: clamp(12px, 2.5vh, 22px); color: var(--text); }
.tallyline .ok { color: var(--good); }
.tallyline .no { color: var(--bad); }

.fastest { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: clamp(10px, 2vh, 18px); }
.fastest .fitem { background: var(--bg-panel); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; font-weight: 600; color: var(--text-dim); font-size: clamp(0.88rem, 1.5vw, 1.15rem); box-shadow: var(--shadow); }
.fastest .fitem b { color: var(--text); }

.podium { display: flex; justify-content: center; align-items: flex-end; gap: clamp(10px, 2vw, 22px); margin: clamp(14px, 3vh, 32px) 0; }
.podium .col { text-align: center; width: clamp(120px, 18vw, 230px); }
.podium .name { font-weight: 800; font-size: clamp(1rem, 2vw, 1.45rem); margin-bottom: 6px; color: var(--text); }
.podium .pts { color: var(--text-dim); font-weight: 600; margin-bottom: 10px; font-size: clamp(0.88rem, 1.5vw, 1.15rem); }
.podium .block { border-radius: var(--radius) var(--radius) 0 0; display: flex; align-items: center; justify-content: center; font-size: clamp(1.6rem, 3vw, 2.4rem); border: 1px solid var(--line); border-bottom: 0; }
.podium .p1 .block { height: clamp(105px, 17vh, 180px); background: #F8E6A0; border-color: #E2B203; }
.podium .p2 .block { height: clamp(78px, 12vh, 135px); background: #F1F2F4; border-color: #C1C7D0; }
.podium .p3 .block { height: clamp(58px, 9vh, 105px); background: #FEDEC8; border-color: #FEA362; }

.winnerline { text-align: center; font-size: clamp(1.3rem, 2.8vw, 2rem); font-weight: 800; margin: 10px 0 4px; color: var(--text); }
.winnerline .trophy { font-size: 1.2em; }

.h-board { max-width: 1100px; margin: 0 auto; width: 100%; font-size: clamp(0.92rem, 1.6vw, 1.25rem); }

.qstat-item { padding: 12px 4px; border-bottom: 1px solid #F1F2F4; }
.qstat-item .qt { font-weight: 600; margin-bottom: 8px; font-size: clamp(0.92rem, 1.5vw, 1.15rem); line-height: 1.35; color: var(--text); }
.qstat-item .qt .idx { color: var(--text-dim); margin-right: 8px; }
.qstat-list { max-width: 1100px; margin: 0 auto; width: 100%; }

/* prekrivni dialogi */
.overlay {
  position: fixed; inset: 0; background: rgba(9, 30, 66, 0.54); z-index: 60;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.dialog {
  background: var(--bg-panel); border-radius: var(--radius-s);
  padding: 24px; max-width: 480px; width: 100%; box-shadow: var(--shadow-overlay);
}
.dialog h3 { margin-bottom: 10px; font-size: 1.25rem; font-weight: 600; color: var(--text); }
.dialog p { color: var(--text-subtle); margin-bottom: 12px; line-height: 1.5; }
.dialog .row { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }

/* =====================================================================
   ADMIN — ZAVIHKI, ANALITIKA, GRAFI
   ===================================================================== */

.h-tabs { display: flex; gap: 2px; align-items: center; }
.h-tab {
  padding: 8px 14px; border-radius: var(--radius-s) var(--radius-s) 0 0;
  font-weight: 600; color: var(--text-subtle);
  border-bottom: 2px solid transparent;
}
.h-tab:hover { background: rgba(9, 30, 66, 0.06); color: var(--text); }
.h-tab.on { color: var(--brand); border-bottom-color: var(--brand); }

.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--bg-panel-2); padding: 4px; border-radius: var(--radius-s); }
.seg button {
  padding: 7px 14px; border-radius: var(--radius-s); font-weight: 600;
  color: var(--text-subtle); font-size: 0.95rem;
}
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--bg-panel); color: var(--brand); box-shadow: var(--shadow); }

.an-livebar {
  max-width: 1180px; margin: 0 auto 14px; width: 100%;
  background: #FFF7D6; border: 1px solid #E2B203; border-radius: var(--radius-s);
  padding: 10px 14px; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; font-weight: 600; color: #533F04; flex-wrap: wrap;
}

.an-wrap { max-width: 1180px; margin: 0 auto; width: 100%; display: flex; flex-direction: column; gap: 18px; }
.an-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.an-head h2 { font-size: 1.35rem; font-weight: 700; }
.an-head .sub { color: var(--text-dim); font-size: 0.9rem; font-weight: 500; }

.an-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.an-grid.two { grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); }
@media (max-width: 900px) { .an-grid.two { grid-template-columns: 1fr; } }

.an-card {
  background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 12px;
}
.an-card h3 { font-size: 1rem; font-weight: 700; color: var(--text); }
.an-card h3 .hint { display: block; font-weight: 500; font-size: 0.82rem; color: var(--text-dim); margin-top: 3px; }
/* druga sekcija v isti kartici dobi ločnico */
.an-subsection { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.an-empty { text-align: center; color: var(--text-dim); padding: 40px 20px; font-weight: 500; }

.viz-stat { display: flex; flex-direction: column; gap: 2px; }
.viz-stat-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-dim); font-weight: 700; }
.viz-stat-value { font-size: 2rem; font-weight: 700; color: var(--text); line-height: 1.15; }
.viz-stat-value.good { color: var(--good); }
.viz-stat-value.bad { color: var(--bad); }
.viz-stat-sub { font-size: 0.85rem; color: var(--text-dim); }

.viz-bars { display: flex; flex-direction: column; gap: 8px; }
.viz-bar-row { display: grid; grid-template-columns: minmax(120px, 1.4fr) 3fr 3.4em; align-items: center; gap: 12px; }
.viz-bar-label { font-size: 0.92rem; font-weight: 600; color: var(--text); }
.viz-bar-note { display: block; font-weight: 500; font-size: 0.78rem; color: var(--text-dim); }
.viz-bar-track { position: relative; height: 16px; background: var(--bg-panel-2); border-radius: 4px; overflow: hidden; }
.viz-bar-fill { height: 100%; border-radius: 0 4px 4px 0; transition: width 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
.viz-refline { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--text-dim); opacity: 0.5; z-index: 1; }
.viz-bar-value { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); font-size: 0.95rem; }

.viz-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.82rem; color: var(--text-subtle); font-weight: 600; }
.viz-key { display: inline-flex; align-items: center; gap: 6px; }
.viz-key i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.viz-dumbbell { display: flex; flex-direction: column; gap: 10px; }
.viz-db-row { display: grid; grid-template-columns: minmax(110px, 1.2fr) 3fr 3em; align-items: center; gap: 12px; }
.viz-db-track { position: relative; height: 30px; }
.viz-db-line { position: absolute; top: 14px; height: 2px; background: var(--line); }
.viz-db-dot { position: absolute; top: 9px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; border: 2px solid var(--bg-panel); }
.viz-db-dot.a { background: #8FB8F6; }
.viz-db-dot.b { background: #0C66E4; }
.viz-db-tag { position: absolute; top: 0; transform: translateX(-50%); font-size: 0.72rem; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.viz-db-tag.b { top: 22px; color: var(--text-subtle); font-weight: 600; }
.viz-db-delta { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 0.92rem; }
.viz-db-delta.up { color: var(--good); }
.viz-db-delta.down { color: var(--bad); }
.viz-db-delta.muted { color: var(--text-dim); }

.viz-scatter-wrap { width: 100%; overflow-x: auto; }
.viz-scatter { width: 100%; min-width: 420px; height: auto; display: block; }
.viz-scatter circle { transition: r 0.12s ease; }
.viz-scatter circle:hover { r: 7; }

.viz-share { display: flex; height: 22px; border-radius: 4px; overflow: hidden; gap: 2px; background: var(--bg-panel-2); }
.viz-share-seg { display: flex; align-items: center; justify-content: center; color: #fff; font-size: 0.72rem; font-weight: 700; min-width: 3px; }

.viz-tip {
  position: fixed; z-index: 95; pointer-events: none; opacity: 0;
  background: #172B4D; color: #fff; padding: 6px 10px; border-radius: 4px;
  font-size: 0.82rem; font-weight: 600; max-width: 320px; line-height: 1.35;
  box-shadow: var(--shadow-overlay); transition: opacity 0.12s ease;
}
.viz-tip.on { opacity: 1; }

.an-insights { display: flex; flex-direction: column; gap: 10px; }
.an-insight { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; }
.an-insight .ico { font-size: 1rem; line-height: 1.4; }
.an-insight b { display: block; font-size: 0.95rem; color: var(--text); }
.an-insight span { font-size: 0.9rem; color: var(--text-subtle); line-height: 1.5; }
.an-insight.warn b { color: #974F0C; }
.an-insight.weak b { color: var(--bad); }

.an-qlist { display: flex; flex-direction: column; gap: 14px; }
.an-q { display: flex; flex-direction: column; gap: 7px; }
.an-q .qtext { font-size: 0.92rem; font-weight: 600; color: var(--text); line-height: 1.4; }
.an-q .qmeta { font-size: 0.8rem; color: var(--text-dim); }
.an-q .qmeta b { color: var(--text-subtle); }
.an-q .qbar { display: grid; grid-template-columns: 1fr 4.2em; gap: 10px; align-items: center; }

.an-mis { border-left: 3px solid var(--bad); background: var(--bad-bg); border-radius: 4px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.an-mis .qtext { font-weight: 600; font-size: 0.92rem; }
.an-mis .row { font-size: 0.85rem; color: var(--text-subtle); }
.an-mis .row b { color: var(--bad); }
.an-mis .row.ok b { color: var(--good); }

.set-wrap { max-width: 720px; margin: 0 auto; width: 100%; display: flex; flex-direction: column; gap: 16px; }
.set-card { background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.set-card h3 { font-size: 1rem; font-weight: 700; }
.set-card p { color: var(--text-subtle); font-size: 0.92rem; line-height: 1.5; }
.set-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.set-link { font-weight: 600; word-break: break-all; }
.set-logo-prev { max-height: 44px; max-width: 170px; object-fit: contain; border: 1px solid var(--line); border-radius: 4px; padding: 3px; background: #fff; }
.set-card.danger { border-color: rgba(201, 55, 44, 0.4); }

/* =====================================================================
   DALJINEC
   ===================================================================== */

body.remote { min-height: 100dvh; display: flex; flex-direction: column; }
body.remote .wrap { max-width: 460px; margin: 0 auto; padding: 18px 16px 30px; width: 100%; flex: 1; }
body.remote h1 { font-size: 1.2rem; margin-bottom: 4px; color: var(--text); }
body.remote .status { color: var(--text-subtle); font-weight: 600; margin-bottom: 16px; min-height: 1.4em; }
.r-actions { display: flex; flex-direction: column; gap: 10px; }
.r-actions .btn { width: 100%; padding: 14px; font-size: 1.05rem; }
.r-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.r-grid .btn { width: 100%; }
.r-sec { margin-top: 22px; }
.r-sec h2 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); margin-bottom: 10px; font-weight: 700; }
