:root {
  --bg: #0f1419; --panel: #171e26; --panel2: #1f2832; --line: #2b3643;
  --text: #e8edf2; --muted: #93a1b0; --accent: #2fb8a0; --accent-ink: #06231e;
  --pos: #3ecf8e; --neg: #f2707a; --warn: #e8b458; --radius: 12px;
  --bench: #8b9dc3;
  color-scheme: dark;
}
/* Režim: podľa systému, alebo ručne zvolený prepínačom (html[data-theme]). */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f4f6f8; --panel: #ffffff; --panel2: #eef2f5; --line: #d9e0e6;
    --text: #17202a; --muted: #5d6b79; --accent: #0f8f7a; --accent-ink: #ffffff;
    --pos: #12805a; --neg: #c8323f; --warn: #9a6a0b;
    --bench: #5a6f99;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
    --bg: #f4f6f8; --panel: #ffffff; --panel2: #eef2f5; --line: #d9e0e6;
    --text: #17202a; --muted: #5d6b79; --accent: #0f8f7a; --accent-ink: #ffffff;
    --pos: #12805a; --neg: #c8323f; --warn: #9a6a0b;
    --bench: #5a6f99;
    color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 system-ui, "Segoe UI", Roboto, sans-serif; }
h1 { font-size: 1.6rem; margin: 0 0 .25rem; }
h2 { font-size: 1.1rem; margin: 0; }
h3 { font-size: .95rem; margin: 1.25rem 0 .5rem; }
.muted { color: var(--muted); }
.pos { color: var(--pos); } .neg { color: var(--neg); }
.r { text-align: right; } .nowrap { white-space: nowrap; }
.loading { padding: 3rem 1rem; text-align: center; color: var(--muted); }

button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border-radius: 8px; border: 1px solid transparent; padding: .5rem .9rem; background: none; }
button:disabled { opacity: .5; cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.primary { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.ghost { border-color: var(--line); }
.ghost:hover { background: var(--panel2); }
.danger { background: var(--neg); color: #fff; font-weight: 600; }
.small { padding: .25rem .6rem; font-size: .85rem; }
.wide { width: 100%; margin-top: .75rem; }
.icon { padding: .2rem .45rem; color: var(--muted); }
.icon:hover { color: var(--text); background: var(--panel2); }
input, select { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: .5rem .6rem; width: 100%; min-width: 0; }
label { display: flex; flex-direction: column; gap: .25rem; font-size: .8rem; color: var(--muted); }
label input, label select { font-size: .95rem; color: var(--text); }

.top { display: flex; align-items: center; gap: .75rem; padding: .6rem 1rem; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 2; flex-wrap: wrap; }
.brand { color: var(--accent); font-weight: 700; padding: 0; border: 0; background: none; text-align: left; }
.brand { transition: text-shadow .2s ease; }
.brand:hover, .brand:focus-visible { text-shadow: 0 0 6px color-mix(in srgb, var(--accent) 70%, transparent), 0 0 14px color-mix(in srgb, var(--accent) 45%, transparent); }
/* priestor pre výrez a stavový riadok, keď beží ako aplikácia na ploche */
.top { padding-top: calc(.6rem + env(safe-area-inset-top)); padding-left: calc(1rem + env(safe-area-inset-left)); padding-right: calc(1rem + env(safe-area-inset-right)); }
main { padding-bottom: calc(1rem + env(safe-area-inset-bottom)); }
.tabs { display: flex; gap: 0; flex: 1; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { color: var(--muted); white-space: nowrap; flex: none; padding: .4rem .55rem; }
.brandbox { display: flex; flex-direction: column; align-items: flex-start; gap: .2rem; }
.langsel { font-size: .75rem; padding: .1rem .3rem; border-radius: 6px; background: var(--panel2); border: 1px solid var(--line); color: var(--muted); }
.auth .langsel { align-self: center; margin-bottom: .5rem; }
.tabs button.on { color: var(--text); background: var(--panel2); }
.who { display: flex; flex-direction: column; align-items: flex-end; gap: .25rem; }
.whoacts { display: flex; align-items: center; gap: .4rem; }
/* posuvník svetlý / tmavý režim: guľôčka so symbolom aktuálneho režimu */
.themesw { position: relative; display: inline-flex; align-items: center; justify-content: space-between; width: 54px; height: 28px; padding: 0 7px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel2); font-size: 12px; line-height: 1; flex: none; }
.themesw > span:not(.ts-knob) { opacity: .5; }
.ts-knob { position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.35); display: grid; place-items: center; font-size: 12px; transition: transform .22s cubic-bezier(.3,.7,.4,1); }
.ts-knob::after { content: "☀️"; }
.themesw[aria-checked="true"] .ts-knob { transform: translateX(26px); }
.themesw[aria-checked="true"] .ts-knob::after { content: "🌙"; }
@media (prefers-reduced-motion: reduce) { .ts-knob { transition: none; } }
.chips { display: flex; gap: .4rem; padding: .75rem 1rem 0; overflow-x: auto; max-width: 1280px; margin: 0 auto; }
.chips button { border-color: var(--line); border-radius: 999px; padding: .3rem .9rem; white-space: nowrap; color: var(--muted); }
.chips button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }

main { max-width: 1280px; margin: 0 auto; padding: 1rem; display: grid; gap: 1rem; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; min-width: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .75rem; }
.stat { display: flex; flex-direction: column; gap: .3rem; }
.stat b { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.stat span { font-size: .8rem; }
.hero { display: grid; grid-template-columns: 1fr auto; gap: .75rem 1.5rem; align-items: start; }
.hero .big { font-size: clamp(1.9rem, 6vw, 2.8rem); font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.hero .sub { font-size: .85rem; }
.herostats { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .6rem 2rem; padding-top: .75rem; border-top: 1px solid var(--line); }
.herostats div { display: flex; flex-direction: column; gap: .15rem; }
.herostats span { font-size: .8rem; }
.herostats b { font-variant-numeric: tabular-nums; }
.hero .stamp { grid-column: 1 / -1; }
.row { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: .75rem; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.count { font-weight: 400; font-size: .9rem; }
.notice { margin: 0; padding: .6rem .8rem; border-radius: 8px; background: var(--panel2); color: var(--muted); font-size: .88rem; overflow-wrap: anywhere; }
.notice.warn { color: var(--warn); }
.notice ul { margin: .5rem 0 0; padding-left: 1.1rem; }
.small-text { font-size: .82rem; }

/* prepínače, grafy */
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); }
.seg button { padding: .28rem .65rem; font-size: .82rem; border-radius: 7px; color: var(--muted); }
.seg button.on { background: var(--panel2); color: var(--text); font-weight: 600; }
.card > .seg { margin-bottom: .5rem; }
.chartbox { position: relative; height: 300px; margin-top: .5rem; }
.chartbox.short { height: 240px; margin-bottom: .75rem; }
.chartbox.donut { height: 300px; }
.chartsum { margin: .25rem 0 0; font-size: .9rem; }
.split { display: grid; grid-template-columns: minmax(240px, 1fr) 1.4fr; gap: 1rem; align-items: start; }
.split2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1rem; align-items: start; }
.dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; margin-right: .45rem; vertical-align: middle; }
.stat span + span { font-size: .78rem; }

/* rebalans */
.pctin { width: 6.5rem; text-align: right; padding: .3rem .45rem; }
table.reb tfoot td { border-bottom: none; font-weight: 600; }
.rebadd { display: flex; gap: .5rem; margin-top: .75rem; max-width: 420px; }

/* dividendový kalendár */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-head { font-size: .72rem; color: var(--muted); text-align: center; padding: .2rem 0; text-transform: uppercase; }
.cal-cell { min-height: 64px; border: 1px solid var(--line); border-radius: 8px; padding: .3rem .35rem; display: flex; flex-direction: column; gap: .1rem; font-size: .75rem; min-width: 0; }
.cal-cell.empty { border: none; }
.cal-cell.has { background: var(--panel2); }
.cal-cell.today { border-color: var(--accent); }
.cal-day { color: var(--muted); }
.cal-amt { font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.cal-amt.est { color: var(--bench); }
.cal-tick { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .7rem; }
.empty { padding: 1.5rem 0; text-align: center; }

.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th { text-align: left; font-size: .75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
th.r { text-align: right; }
table.postab th, table.postab td { text-align: center; }
table.postab th:first-child, table.postab td:first-child { text-align: left; }
th, td { padding: .5rem .6rem; border-bottom: 1px solid var(--line); }
tbody tr:hover { background: var(--panel2); }
/* Úprava a zmazanie ostávajú viditeľné aj pri posúvaní širokej tabuľky. */
td.acts { position: sticky; right: 0; background: var(--panel); box-shadow: -8px 0 8px -8px rgb(0 0 0 / .4); }
tbody tr:hover td.acts { background: var(--panel2); }
.note { color: var(--muted); max-width: 16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { font-size: .75rem; padding: .15rem .5rem; border-radius: 999px; background: var(--panel2); white-space: nowrap; }
.badge.buy, .badge.transfer_in, .badge.deposit { color: var(--pos); }
.badge.sell, .badge.transfer_out, .badge.withdraw { color: var(--neg); }
.badge.dividend, .badge.stock_dividend, .badge.interest_income { color: var(--accent); }
#txsearch { margin-bottom: .75rem; }

.auth { max-width: 380px; padding-top: 12vh; }
.auth form, .dlg { display: grid; gap: .8rem; }
.pfform { display: grid; grid-template-columns: 2fr 1fr auto; gap: .6rem; align-items: end; }
.pflist { list-style: none; margin: .75rem 0 0; padding: 0; }
.pflist li { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.pflist li span:last-child { display: flex; gap: .4rem; }

dialog { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--text); padding: 1.1rem; width: min(440px, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); }
dialog:has(.wide) { width: min(980px, calc(100vw - 2rem)); }
/* Import: na počítači širšie okno; dlhé názvy súborov sa zalomia. */
dialog:has(.impdlg) { width: min(560px, calc(100vw - 2rem)); overflow-x: hidden; }
.impdlg > * { min-width: 0; }
.impdlg .field { display: flex; flex-direction: column; gap: .25rem; font-size: .8rem; color: var(--muted); }
.vh { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.filepick { flex-direction: row; align-items: center; gap: .6rem; font-size: .95rem; color: var(--text); border: 1px solid var(--line); background: var(--bg); border-radius: 8px; padding: .35rem .4rem; cursor: pointer; min-width: 0; }
.filepick .btnlike { flex: none; padding: .3rem .7rem; border: 1px solid var(--line); border-radius: 6px; background: var(--panel2); font-size: .88rem; }
.filepick:hover .btnlike { border-color: var(--accent); }
.filepick:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.filepick .fname { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .88rem; }
.filepick.disabled { opacity: .5; cursor: default; }
.restab summary { cursor: pointer; color: var(--text); }
.restab p { margin: .4rem 0; }
.restab table { width: 100%; border-collapse: collapse; }
.restab td { padding: .3rem .25rem; border-top: 1px solid var(--line); vertical-align: middle; font-size: .85rem; }
.restab td:nth-child(2) { width: 9.5rem; }
.restab td:nth-child(3) { width: 6rem; text-align: right; }
.restab td.warn { color: var(--warn); }
.restab input { padding: .3rem .45rem; font-size: .88rem; }
@media (max-width: 640px) { .restab td:nth-child(2) { width: 7rem; } .restab td:nth-child(3) { width: 4.5rem; } .restab td:first-child { overflow-wrap: anywhere; } }
dialog::backdrop { background: rgb(0 0 0 / .6); }
.dlg p { margin: 0; }
.dlg .inline { max-width: 260px; }
.dlgbtns { display: flex; justify-content: flex-end; gap: .5rem; }
.txrows { display: grid; gap: .6rem; }
.txrow { display: flex; flex-wrap: wrap; gap: .5rem; align-items: end; border: 1px solid var(--line); border-radius: 10px; padding: .6rem; margin: 0; min-width: 0; }
.txrow label { flex: 1 1 110px; }
.txrow label:has(.grow) { flex: 2 1 180px; }
.rowbtns { display: flex; }
.txrow label.tick { flex: 2 1 220px; position: relative; }
.hint { color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest { position: absolute; top: 100%; left: 0; z-index: 5; width: max(100%, min(420px, 80vw)); max-height: 260px; overflow-y: auto; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgb(0 0 0 / .35); }
.suggest:empty { display: none; }
.suggest button { display: grid; grid-template-columns: auto 1fr; gap: 0 .6rem; width: 100%; text-align: left; border-radius: 0; padding: .45rem .7rem; font-size: .9rem; color: var(--text); }
.suggest button:hover, .suggest button:focus-visible { background: var(--panel); }
.suggest .sname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest .muted { grid-column: 1 / -1; font-size: .78rem; }
.suggest p { margin: 0; padding: .6rem .7rem; font-size: .85rem; }
dialog:has(.suggest:not(:empty)) { min-height: min(460px, calc(100vh - 2rem)); }

#toast { position: fixed; left: 50%; bottom: 1.25rem; transform: translate(-50%, 150%); background: var(--panel2); border: 1px solid var(--line); padding: .6rem 1rem; border-radius: 10px; transition: transform .2s; z-index: 10; max-width: calc(100vw - 2rem); visibility: hidden; }
#toast.show { transform: translate(-50%, 0); visibility: visible; }
#toast.bad { border-color: var(--neg); color: var(--neg); }

/* Prehľad: hlavička s panelom */
.hero2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 1rem 2rem; align-items: start; }
.hero-left { display: flex; flex-direction: column; gap: .3rem; }
.hero2 .big { font-size: clamp(1.9rem, 5vw, 2.6rem); font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.hero2 .sub { font-size: .82rem; }
.kv { display: flex; gap: .5rem; align-items: baseline; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.kv .muted { font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; }
.hero-actions { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-top: .4rem; }
.hero-right { min-width: 0; }
.panelbody { margin-top: .75rem; }
.bgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.bcol { display: flex; flex-direction: column; gap: .2rem; font-size: .82rem; font-variant-numeric: tabular-nums; }
.mid { font-size: 1.3rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.kgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .75rem 1rem; }
.kstat { display: flex; flex-direction: column; gap: .1rem; font-variant-numeric: tabular-nums; }
.kstat .muted { font-size: .78rem; }
table.pnl td { padding: .38rem .2rem; }
table.pnl tr.tot td, table.divtab tr.tot td { font-weight: 700; border-top: 2px solid var(--line); }
.row .seg + .seg { margin-left: auto; }

/* ciele */
.goals { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.goal p { margin: .35rem 0 0; }
.goalnums { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.goalnums .pct { margin-left: auto; font-size: 1.1rem; }
.pbar { height: 8px; border-radius: 99px; background: var(--panel2); overflow: hidden; margin: .5rem 0 .25rem; }
.pbar span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.goalstrip { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .75rem; }
.goalbox { display: grid; gap: .6rem; }
.goalbox .gmini { background: var(--panel2); padding: .75rem .9rem; }
.goalbox .pbar { background: var(--line); }
.gmini { display: flex; flex-direction: column; gap: .15rem; text-align: left; color: var(--text); }
.gmini:hover { border-color: var(--accent); }
.gopt { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.goal.click { cursor: pointer; transition: border-color .15s; }
.goal.click:hover { border-color: var(--accent); }
/* detail cieľa: parametre vľavo, graf vpravo, pod nimi tabuľka */
.gplan { display: grid; grid-template-columns: minmax(280px, 340px) 1fr; gap: 1rem; align-items: start; }
.gform { display: grid; gap: .7rem; }
.gform .primary { justify-self: start; }
.gform .primary:disabled { opacity: .5; cursor: default; }
.gptitle { margin: .5rem 0 .1rem; }
.gpstats { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem .75rem; margin: .25rem 0 0; padding-top: .7rem; border-top: 1px solid var(--line); }
.gpstats dt { font-size: .78rem; }
.gpstats dd { margin: 0; }
#gp-stats p { margin: .4rem 0 0; }
.chartbox.tall { height: 380px; }
table.plantab th, table.plantab td { padding: .4rem .45rem; font-variant-numeric: tabular-nums; }
label.check { flex-direction: row; align-items: center; gap: .5rem; grid-column: 1 / -1; }
label.check input { width: auto; }

/* dividendy */
.divhead { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 1rem 1.5rem; align-items: start; }
.divhead > div { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.divhead .big { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.divhead .seg { align-self: flex-start; }
.dh-stats { display: grid !important; grid-template-columns: 1fr 1fr; gap: .75rem 1rem; }
.dh-stats div { display: flex; flex-direction: column; gap: .1rem; }
.dh-stats .muted { font-size: .78rem; }
.dh-stats b { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.mcal-head { display: flex; align-items: center; justify-content: center; gap: .75rem; margin-bottom: .5rem; }
.mcal-head b { min-width: 9rem; text-align: center; }
.mcal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.mc-head { font-size: .7rem; color: var(--muted); text-align: center; padding: .15rem 0; }
.mc { min-height: 46px; border: 1px solid var(--line); border-radius: 6px; padding: .2rem; display: flex; flex-direction: column; align-items: center; gap: .15rem; font-size: .72rem; min-width: 0; }
.mc.empty { border: none; }
.mc.today .mc-day { background: var(--accent); color: var(--accent-ink); border-radius: 99px; padding: 0 .35rem; font-weight: 700; }
.mc-day { color: var(--muted); }
.mc-amt { background: color-mix(in srgb, var(--accent) 28%, transparent); color: var(--text); border-radius: 4px; padding: 0 .25rem; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: .68rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.mc-amt.est { background: var(--panel2); color: var(--muted); }
table.divtab td, table.divtab th { padding: .4rem .5rem; }
table.divtab td.est { color: var(--muted); }

@media (max-width: 860px) {
  .hero2, .divhead { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  /* prvý stĺpec (ticker) ostáva viditeľný pri posúvaní širokej tabuľky */
  .scroll table th:first-child, .scroll table td:first-child { position: sticky; left: 0; background: var(--panel); z-index: 1; box-shadow: 8px 0 8px -8px rgb(0 0 0 / .4); }
  .scroll tbody tr:hover td:first-child { background: var(--panel2); }
  th, td { padding: .45rem .5rem; }
  .bgrid { gap: .9rem; }
  .bcol { display: grid; grid-template-columns: 1fr auto; gap: .1rem .75rem; align-items: baseline; }
  .bcol > span:first-child { grid-column: 1 / -1; }
  .bcol .mid { grid-row: span 2; font-size: 1.15rem; }
  .bcol > span:nth-child(n+3) { text-align: right; }
  .bgrid { grid-template-columns: 1fr; }
  .gopt { grid-template-columns: 1fr; }
  .gplan { grid-template-columns: 1fr; }
  .chartbox.tall { height: 280px; }
  .row .seg + .seg { margin-left: 0; }
  .email { display: none; }
  .tabs { order: 3; flex-basis: 100%; }
  .tabs button { flex: 1; }
  .who { margin-left: auto; }
  .pfform { grid-template-columns: 1fr; }
  .split, .split2 { grid-template-columns: 1fr; }
  .chartbox { height: 240px; }
  .cal-cell { min-height: 48px; padding: .2rem; }
  .cal-tick { display: none; }
  .cal-amt { font-size: .68rem; }
  .row .seg { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { #toast { transition: none; } }
.captcha:empty { display: none; }
.captcha { display: flex; justify-content: center; }

/* hlavička: ikonové tlačidlá s popisom pod ikonou (Účet, Pomoc) */
.iconlbl { display: inline-flex; flex-direction: column; align-items: center; gap: 1px; padding: .1rem .35rem; color: var(--muted); line-height: 1; border-radius: 8px; }
.iconlbl:hover, .iconlbl.on { color: var(--text); background: var(--panel2); }
.il-ico { font-size: 15px; height: 18px; display: grid; place-items: center; }
.il-q { width: 18px; border-radius: 50%; border: 1.5px solid currentColor; font-size: 12px; font-weight: 700; }
.il-txt { font-size: calc(.66rem + 2pt); }

/* menu Pomoc (Návod, Nahlásiť chybu, Spätná väzba) */
.hmenu { position: relative; display: inline-flex; }
.hm-pop { position: absolute; top: calc(100% + 6px); right: 0; z-index: 30; min-width: 210px; display: flex; flex-direction: column; padding: .35rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 28px rgb(0 0 0 / .28); }
.hm-pop[hidden] { display: none; }
.hm-pop button { display: flex; align-items: center; gap: .7rem; width: 100%; padding: .6rem .7rem; border: 0; border-radius: 7px; background: none; color: var(--text); text-align: left; font-size: .95rem; white-space: nowrap; }
.hm-pop button:hover, .hm-pop button:focus-visible { background: var(--panel2); }
.hm-ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; color: var(--muted); }
.hm-ico.bug { color: #e5484d; }
.hm-ico.chat { color: var(--accent); }

/* okno Nahlásiť chybu / Spätná väzba */
.dlghead { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.dlghead h2 { margin: 0; font-size: 1.15rem; }
.xbtn { flex: none; width: 32px; height: 32px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--muted); font-size: 1rem; }
.xbtn:hover, .xbtn:focus-visible { background: var(--panel2); color: var(--text); }
.fbtip { font-size: .88rem; color: var(--muted); background: var(--panel2); border-radius: 8px; padding: .55rem .7rem; }
.fbtip .linkbtn { font-size: inherit; }
.fbdlg textarea { width: 100%; min-height: 140px; resize: vertical; font: inherit; color: var(--text); box-sizing: border-box;
  background: var(--panel2); border: 1px solid transparent; border-radius: 8px; padding: .6rem .7rem; outline: none; transition: border-color .15s, box-shadow .15s; }
.fbdlg textarea::placeholder { color: var(--muted); opacity: .85; }
.fbdlg textarea:focus { border-color: color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
.fbinfo { font-size: .78rem; }
.fberr { color: var(--neg, #e5484d); font-size: .88rem; }
.fbdlg .dlgbtns { justify-content: flex-end; }
@media (max-width: 640px) {
  dialog:has(.fbdlg) { width: calc(100vw - 1.5rem); max-width: none; }
  .fbdlg .dlgbtns button { flex: 1; }
}
.il-img { width: 20px; height: 20px; }

/* správa účtu */
.acctinfo { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .75rem; margin: .75rem 0 0; }
.acctinfo > div { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.acctinfo b { overflow-wrap: anywhere; }
.acctinfo + .notice { margin-top: .75rem; }
.acctgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.acctform { display: grid; gap: .7rem; margin-top: .75rem; }
.acctform .small-text, .acctform .notice { margin: 0; }
.acctform button { justify-self: start; }
/* Požiadavky na heslo: splnené sa označia fajkou. */
.pwrules { display: grid; gap: .25rem; }
.pwrules ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .15rem .75rem; font-size: .82rem; }
.pwrules li { color: var(--muted); display: flex; gap: .4rem; align-items: baseline; }
.pwrules li::before { content: "○"; width: 1em; text-align: center; }
.pwrules li.ok { color: var(--pos, #2e9e5b); }
.pwrules li.ok::before { content: "✓"; font-weight: 700; }
#acct-captcha:empty { display: none; }

/* pomoc */
.help { display: grid; gap: 1rem; }
.helptoc { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .75rem; }
.helptoc button { padding: .3rem .8rem; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); text-decoration: none; font-size: .88rem; }
.helptoc button:hover { color: var(--text); border-color: var(--accent); }
.helpsec { scroll-margin-top: 1rem; }
.helpsec h2 { margin-bottom: .5rem; }
.helpsec p, .helpsec ul, .helpsec ol { margin: .5rem 0; line-height: 1.55; }
.helpsec li { margin: .25rem 0; }
.helpsec code { background: var(--panel2); padding: .05rem .3rem; border-radius: 4px; font-size: .85em; overflow-wrap: anywhere; }
@media (max-width: 720px) { .acctgrid { grid-template-columns: 1fr; } }
.linkbtn { justify-self: end; padding: 0; margin-top: -.4rem; font-size: .82rem; color: var(--accent); background: none; border: 0; }
.linkbtn:hover { text-decoration: underline; }
