:root {
  --bg: #0a1220; --card: #101b30; --border: #1c2b47; --text: #e8eefc; --muted: #8fa3c7;
  --azure: #19c2ff; --blue: #2a6cff; --ok: #2ecc8f; --bad: #ff5d6c; --warn: #ffb84d;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--azure); text-decoration: none; }
a:hover { text-decoration: underline; }
main { max-width: 1180px; margin: 0 auto; padding: 20px 16px 40px; }
footer { text-align: center; color: var(--muted); font-size: 13px; padding: 24px 0 32px; }
footer b { color: var(--text); letter-spacing: .06em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 20px; border-bottom: 1px solid var(--border); background: #0c1628; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.word { display: flex; flex-direction: column; line-height: 1; }
.word b { font-size: 22px; font-weight: 800; letter-spacing: .02em; }
.word small { font-size: 10px; letter-spacing: .32em; color: var(--muted); margin-top: 3px; }
.word.big b { font-size: 34px; } .word.big small { font-size: 13px; }
.who { display: flex; align-items: center; gap: 12px; }
.who form { margin: 0; }

.card { background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 18px 20px; margin-bottom: 16px; }
h2, h3 { margin: 0 0 8px; } h2 { font-size: 20px; } h3 { font-size: 16px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { margin: 0; display: flex; flex-direction: column; }
.stat b { font-size: 34px; line-height: 1.1; }
.stat.ok b { color: var(--ok); } .stat.bad b { color: var(--bad); }

.site-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.site-head h2, .site-head h3 { margin: 0; }
.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0; }

input[type=text], input[type=email], input[type=password], input[type=number] {
  background: #0a1426; border: 1px solid var(--border); border-radius: 10px; color: var(--text);
  padding: 9px 12px; font: inherit; min-width: 220px; }
input:focus { outline: 2px solid var(--blue); outline-offset: 0; }
label { display: block; margin-bottom: 14px; color: var(--muted); font-size: 13px; }
label input { display: block; width: 100%; margin-top: 6px; }

.btn { background: #16264a; border: 1px solid var(--border); color: var(--text); border-radius: 10px;
  padding: 8px 14px; font: inherit; cursor: pointer; display: inline-block; }
.btn:hover { background: #1b2f5c; text-decoration: none; }
.btn.primary { background: linear-gradient(135deg, var(--azure), var(--blue)); border: 0; color: #031022; font-weight: 700; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.danger { background: #3a1620; border-color: #5b2230; color: #ffb3bd; }

.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase;
  letter-spacing: .06em; padding: 8px 10px; border-bottom: 1px solid var(--border); }
td { padding: 10px; border-bottom: 1px solid #14223c; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; }
.dot.on { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.dot.off { background: var(--bad); }
meter { width: 70px; height: 10px; vertical-align: middle; }

.alert { background: #3a1620; border: 1px solid #5b2230; color: #ffb3bd; padding: 10px 12px; border-radius: 10px; }
.alert.warn { background: #3a2c12; border-color: #5b4420; color: #ffd9a1; }
pre { background: #0a1426; border: 1px solid var(--border); border-radius: 10px; padding: 12px;
  overflow-x: auto; user-select: all; font-size: 13px; }

.login { max-width: 400px; margin: 8vh auto 0; padding: 28px; }
.login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.login .btn { width: 100%; padding: 11px; }

.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 10px 20px; margin: 10px 0 0; }
.kv dt { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.kv dd { margin: 2px 0 0; }

.range { display: flex; gap: 6px; }
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 14px; }
.chart { background: #0a1426; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.chart h4 { margin: 0 0 4px; font-size: 13px; color: var(--muted); font-weight: 600; display: flex; justify-content: space-between; }
.chart svg { width: 100%; height: 150px; display: block; }
.chart .empty { color: var(--muted); padding: 40px 0; text-align: center; font-size: 13px; }
.axis { stroke: #1c2b47; stroke-width: 1; }
.lbl { fill: #8fa3c7; font-size: 10px; }
.line { fill: none; stroke-width: 1.8; stroke-linejoin: round; }

@media (max-width: 640px) {
  .top { padding: 10px 12px; } .who .muted { display: none; }
  input[type=text] { min-width: 0; flex: 1; }
}

label.opt { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 15px; margin-bottom: 8px; }
label.opt input { display: inline-block; width: auto; margin: 0; }
.steps { padding-left: 22px; color: var(--text); }
.steps li { margin-bottom: 4px; }

/* ukazovatele vyuzitia v tmavej teme: zelena < 80 %, oranzova 80-90 %, cervena > 90 % */
meter { -webkit-appearance: none; appearance: none; width: 70px; height: 8px; border: 0; border-radius: 4px; background: #1c2b47; vertical-align: middle; }
meter::-webkit-meter-bar { background: #1c2b47; border: 0; border-radius: 4px; height: 8px; }
meter::-webkit-meter-optimum-value { background: var(--ok); border-radius: 4px; }
meter::-webkit-meter-suboptimum-value { background: var(--warn); border-radius: 4px; }
meter::-webkit-meter-even-less-good-value { background: var(--bad); border-radius: 4px; }
meter::-moz-meter-bar { background: var(--ok); border-radius: 4px; }
meter:-moz-meter-sub-optimum::-moz-meter-bar { background: var(--warn); }
meter:-moz-meter-sub-sub-optimum::-moz-meter-bar { background: var(--bad); }

.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 0 0 14px; border-bottom: 1px solid var(--border); }
.tabs a { padding: 9px 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--text); border-bottom-color: var(--azure); font-weight: 600; }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 6px; border-radius: 10px; font-size: 12px; text-align: center; color: #031022; }
.badge.warn { background: var(--warn); } .badge.bad { background: var(--bad); }
.pill { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; background: #16264a; }
.pill.critical, .pill.error, .pill.bad { background: #5b2230; color: #ffb3bd; }
.pill.warning, .pill.warn { background: #5b4420; color: #ffd9a1; }
.msg { white-space: normal; max-width: 560px; overflow-wrap: anywhere; }
select { background: #0a1426; border: 1px solid var(--border); border-radius: 10px; color: var(--text); padding: 8px 10px; font: inherit; }
h4 { margin: 18px 0 8px; font-size: 14px; }
.hwgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 14px; }
.hwgrid .card { margin: 0; }
.hwgrid p { margin: 6px 0; }
.kv.one { grid-template-columns: 1fr; }
input[type=checkbox] { width: auto; margin: 0; }

.mainnav { display: flex; gap: 18px; margin-right: auto; margin-left: 28px; }
.mainnav a { color: var(--muted); }
.mainnav a:hover { color: var(--text); text-decoration: none; }
code { background: #0a1426; border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; font-size: 13px; }

.btn.sm { padding: 3px 10px; font-size: 13px; border-radius: 8px; }
.btn.gap { margin-left: 12px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.pill.ok { background: #12402f; color: #8be5bc; }
.alert.okbox { background: #12402f; border-color: #1f6b4d; color: #b6f0d4; }
td form.inline { display: inline-flex; margin-right: 4px; }

.alertlist { list-style: none; padding: 0; margin: 8px 0 0; }
.alertlist li { padding: 5px 0; border-bottom: 1px solid #14223c; }
.alertlist li:last-child { border-bottom: 0; }
input.num { width: 90px; min-width: 0; }
a.stat { color: var(--text); display: flex; }
a.stat:hover { text-decoration: none; border-color: var(--azure); }

.modal-overlay { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(4, 10, 20, .72); backdrop-filter: blur(3px); }
.modal { width: 100%; max-width: 460px; background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 22px 24px; box-shadow: 0 24px 60px rgba(0, 0, 0, .55); }
.modal-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.modal-title { font-size: 17px; font-weight: 700; }
.modal-msg { margin: 0 0 20px; color: var(--text); line-height: 1.5; overflow-wrap: anywhere; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
.modal-actions .btn { padding: 9px 18px; }

.netgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 12px; }
.netbox { background: #0a1426; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.netbig { display: flex; gap: 18px; margin: 6px 0 4px; font-size: 18px; flex-wrap: wrap; }
.netbig .dl b { color: var(--azure); } .netbig .ul b { color: var(--warn); }
.spark { width: 100%; height: 44px; display: block; }
.sp-dl, .sp-ul { fill: none; stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.sp-dl { stroke: #19c2ff; } .sp-ul { stroke: #ffb84d; }
.totalrow td { border-top: 1px solid var(--border); background: #0d1930; }
.netform { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 10px; }
.netform summary { cursor: pointer; color: var(--azure); }
.ipgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); gap: 10px; margin: 10px 0; }
.ipgrid label { margin: 0; }

.netsec { border-top: 1px solid var(--border); margin-top: 14px; padding-top: 12px; }
.netsec h3 { font-size: 15px; }
details.popform { position: relative; display: inline-block; }
details.popform > summary { list-style: none; cursor: pointer; }
details.popform > summary::-webkit-details-marker { display: none; }
details.popform[open] > form, details.popform[open] > summary ~ form { margin-top: 8px; }
details.popform[open] { background: #0d1930; border: 1px solid var(--border); border-radius: 12px; padding: 6px; }

.innertable { margin: 6px 0 4px; font-size: 13px; }
.innertable td { padding: 2px 14px 2px 0; border: 0; }

.qrbox { background: #fff; display: inline-block; padding: 6px; border-radius: 10px; margin: 6px 0 10px; }
.qrbox svg { display: block; }

.termbox { height: 68vh; min-height: 360px; background: #050b16; border: 1px solid var(--border); border-radius: 12px; padding: 8px; }
.termbox .xterm { height: 100%; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; }

.iconcell { width: 36px; padding-right: 0; }
.appicon { display: inline-block; vertical-align: middle; border-radius: 5px; }
.appicon.ph { width: 24px; height: 24px; line-height: 24px; text-align: center; background: #1d3358; color: var(--azure); font-weight: 700; font-size: 13px; }
td.actions { white-space: nowrap; }

/* Tmava tema: skrolovacie listy a ovladacie prvky v dizajne GRATA */
:root { color-scheme: dark; }
html, body, * { scrollbar-width: thin; scrollbar-color: #2f4772 #0c1628; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: #0c1628; border-radius: 8px; }
*::-webkit-scrollbar-thumb { background: #2f4772; border-radius: 8px; border: 2px solid #0c1628; }
*::-webkit-scrollbar-thumb:hover { background: #41639c; }
*::-webkit-scrollbar-corner { background: #0c1628; }

/* Tabulky: text sa zalamuje, aby sa zmestili do okna bez vodorovneho posuvania */
th { white-space: nowrap; }
td { white-space: normal; overflow-wrap: break-word; }
td.actions, td:has(> form), td:has(> .pill), td:has(> meter), td:has(> .dot), td:has(> .badge) { white-space: nowrap; }
td.nw { white-space: nowrap; }
.tablewrap { padding-bottom: 2px; }
td.actions form.inline { margin-bottom: 2px; }

.secscore { font-size: 16px; padding: 3px 14px; }
dl.kv .good { color: #8be5bc; } dl.kv .badv { color: #ffb3bd; } dl.kv .warnv { color: #ffd9a1; }

.hwgrid .card.wide { grid-column: 1 / -1; }
.diskrow + .diskrow { border-top: 1px solid #1c2c4d; margin-top: 16px; padding-top: 16px; }
.diskrow h4 { margin: 0; font-size: 15px; }

.subh { margin: 20px 0 6px; font-size: 14px; color: var(--muted, #8da2c8); font-weight: 600; }

.chartgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 14px; margin-top: 14px; }
.chartbox h4 { margin: 0 0 4px; font-size: 14px; }
.legend { display: flex; gap: 14px; font-size: 12px; color: #8da2c8; margin-bottom: 2px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.spark { max-width: 360px; } .spark svg { display: block; }
a.btn.primary { background: #123a63; border-color: #2a6fb0; color: #e8f1ff; }

.scantbl td { white-space: normal; vertical-align: top; }
.scantbl td.clip { max-width: 16em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scantbl td.nowrap { white-space: nowrap; }
.scantbl .clipline { max-width: 22em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scantbl td.mono { white-space: nowrap; font-size: 12px; }
.webform { max-width: 720px; }
.webform .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 8px 0; }
.btnrow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.btnrow form { display: inline; }
.webform progress { width: 100%; }
@media (max-width: 600px) { .webform .row2 { grid-template-columns: 1fr; } }
.webform .row2 { align-items: end; }
.webform .lbl { display: block; color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.seg { display: inline-flex; border: 1px solid #1d2f55; border-radius: 10px; overflow: hidden; background: #0b1426; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { display: block; margin: 0; padding: 9px 22px; cursor: pointer; color: var(--muted); font-size: 14px; user-select: none; }
.seg input:checked + label { background: linear-gradient(135deg, #22b8ff, #2e6bff); color: #06101f; font-weight: 700; }
.seg input:focus-visible + label { outline: 2px solid #5aa9ff; outline-offset: -2px; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; position: relative; }
.switch input { position: absolute; opacity: 0; width: auto; height: 0; margin: 0; pointer-events: none; }
.switch .slider { width: 46px; height: 26px; border-radius: 13px; background: #223152; border: 1px solid var(--border); position: relative; flex: none; transition: background .15s; }
.switch .slider::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #8fa3c7; transition: left .15s, background .15s; }
.switch input:checked + .slider { background: linear-gradient(135deg, #22b8ff, #2e6bff); }
.switch input:checked + .slider::after { left: 23px; background: #fff; }
.switch input:focus-visible + .slider { outline: 2px solid #5aa9ff; outline-offset: 2px; }

textarea { background: #0a1426; border: 1px solid var(--border); border-radius: 10px; color: var(--text); padding: 9px 12px; font: inherit; width: 100%; resize: vertical; }
label textarea { display: block; margin-top: 6px; }
.ipgrid .wide { grid-column: 1 / -1; }
pre.steps { white-space: pre-wrap; word-break: break-word; margin: 8px 0; padding: 10px 12px; background: #0a1426; border: 1px solid var(--border); border-radius: 10px; font: inherit; }
.finding { border: 1px solid var(--border); border-left: 4px solid #5b6b8c; border-radius: 12px; padding: 12px 14px; margin: 12px 0; }
.finding.sev-critical { border-left-color: #ff5d6c; }
.finding.sev-warning { border-left-color: #ffb454; }
.finding .fhead { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.finding details { margin: 6px 0; }
.finding summary { cursor: pointer; color: #8fb4ff; }
.fbtns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.comment { border-top: 1px solid var(--border); padding-top: 8px; }

/* panel prebiehajucich akcii: obsah (poloha a rozlozenie su v shell.css) */
.actpanel-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; background: var(--card); border-bottom: 1px solid var(--border); font-weight: 700; font-size: 13px; flex: none; }
.actpanel-head .act-x { background: none; border: 1px solid var(--border); border-radius: 6px; color: var(--muted); font: inherit; font-size: 11.5px; line-height: 1; cursor: pointer; padding: 5px 8px; }
.actpanel-head .act-x:hover { color: var(--text); border-color: var(--muted); }
.actpanel-body { flex: 1; overflow-y: auto; padding: 10px 12px; font-family: Consolas, "Cascadia Mono", "Courier New", monospace; font-size: 12.5px; line-height: 1.5; }
.actln { margin-bottom: 10px; }
.actln-cmd { color: #7fd1ff; overflow-wrap: anywhere; }
.actln-cmd a { color: inherit; text-decoration: none; } .actln-cmd a:hover { text-decoration: underline; }
.actln-prompt { color: #4fb0ff; margin-right: 4px; }
.actln-host { color: #5b6b8c; font-size: 11.5px; margin-left: 6px; }
.actln-out { color: #c9d6ee; white-space: pre-wrap; word-break: break-word; margin-top: 2px; padding-left: 14px; }
.actln.ok .actln-out { color: #6fe3a3; }
.actln.err .actln-out { color: #ff8b96; }
.actln.wait .actln-out, .actln.run .actln-out { color: #ffcf7a; }
.chk { display: inline-flex; align-items: center; gap: 4px; margin-right: 10px; }

.swbtn { display: inline-flex; align-items: center; gap: 10px; background: none; border: 0; padding: 0; cursor: pointer; color: inherit; font: inherit; }
.swbtn::before { content: ""; width: 46px; height: 26px; box-sizing: border-box; flex: none; border-radius: 13px; border: 1px solid var(--border); background: radial-gradient(circle at 13px 50%, #8fa3c7 10px, transparent 11px) no-repeat, #223152; }
.pstbl .swform { margin: 0; }

/* profil: upozornenia (Web Push) */
#pushbox [hidden] { display: none !important; }
#pushbox .push-opts { display: grid; gap: .4rem; margin: .6rem 0; }
#pushbox .push-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
#pushbox .push-msg { min-height: 1.2em; margin-top: .6rem; }

/* karta Obrazovka zariadenia */
.screenout { margin-top: .8rem; border: 1px solid var(--line, #cbd5e1); border-radius: 8px; overflow: hidden; background: #0b1426; }
.screenout img, .screenout canvas { display: block; width: 100%; height: auto; }
.screenout:fullscreen { display: flex; align-items: center; justify-content: center; border: 0; border-radius: 0; }
.screenout:fullscreen canvas { width: auto; max-width: 100vw; max-height: 100vh; }

/* samostatne okno s obrazovkou zariadenia */
body.scrwin { margin: 0; background: #060b16; display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.scrbar { display: flex; align-items: center; gap: 6px; padding: 5px 8px; background: var(--card); border-bottom: 1px solid var(--border); flex: none; }
.scrname { margin-right: 6px; font-size: 13px; }
.scrmsg { flex: 1; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scrlog { font-size: 12px; color: var(--muted); }
.scrview { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; background: #060b16; }
.scrview[hidden] { display: none; }
.scrview img, .scrview canvas { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; }
.scrview:fullscreen { border: 0; }
.scrmsg.bad { color: var(--bad); }
.scrsel { background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 6px; font-size: 12px; padding: 3px 4px; }
.scrview.actual { overflow: auto; align-items: flex-start; justify-content: flex-start; }
.scrview.actual img, .scrview.actual canvas { max-width: none; max-height: none; flex: none; }
.btn.rec { background: #c0243a; border-color: #c0243a; color: #fff; }
.scrpop { position: fixed; inset: 0; background: rgba(3, 8, 18, .72); display: flex; align-items: center; justify-content: center; z-index: 50; }
.scrpop[hidden] { display: none; }
.scrpopbox { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 18px 22px; max-width: 440px; text-align: center; }
.scrpopbox p { margin: 0 0 12px; white-space: pre-line; word-break: break-word; }
.scrpath { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; margin-right: 6px; }
.scrpath i { color: var(--muted); font-style: normal; margin: 0 2px; }
.scrbar { -webkit-app-region: drag; app-region: drag; }
.scrbar button, .scrbar select, .scrbar a, .scrbar input { -webkit-app-region: no-drag; app-region: no-drag; }
@media (display-mode: window-controls-overlay) {
  .scrbar { height: env(titlebar-area-height, 40px); padding-right: calc(100vw - env(titlebar-area-x, 0px) - env(titlebar-area-width, 100vw) + 8px); }
}

/* Tlačiarne na PC: panel Nastavenie tlače */
.pset { margin: .6rem 0 .2rem; padding: .2rem 1rem .9rem; border: 1px solid var(--border); border-radius: 12px; background: rgba(127, 150, 190, .06); }
.pset-sec { padding: .8rem 0 .2rem; }
.pset-sec + .pset-sec { border-top: 1px solid var(--border); margin-top: .5rem; }
.pset-sec h4 { margin: 0 0 .2rem; font-size: 14px; font-weight: 700; }
.pset-hint { margin: 0 0 .7rem; }
.pset-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .8rem 1rem; align-items: start; }
.pf { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.pf-l { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.pf select { width: 100%; height: 36px; }
.pf-n { font-size: 12px; color: var(--muted); }
.pf-wide { flex: 1 1 320px; max-width: 520px; }
.pset-bar { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }
.pset-drv { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: flex-end; }
.pset-drv .pset-bar { margin-top: 0; }

/* Zoznam tlačiarní v sieti: zdieľanie a účet v jednom stĺpci, bez zbytočného skladania pod seba */
.pstbl td { vertical-align: middle; }
.pstbl .pscol { display: flex; flex-direction: column; gap: .2rem; align-items: flex-start; }
.pstbl .pscol code { white-space: nowrap; }
.pset-grid { grid-template-columns: repeat(auto-fit, minmax(210px, 290px)); }
.pset-sec .pset-bar { margin-top: .7rem; }

/* Karty tlačiarní na počítači: na širokej obrazovke dve vedľa seba, výraznejší rámik */
[data-pcp-list] { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 560px), 1fr)); gap: .9rem; align-items: start; margin: .6rem 0; }
[data-pcp-list] > p { grid-column: 1 / -1; }
.pcp-card { margin: 0; padding: .9rem 1.1rem; border: 1.5px solid color-mix(in srgb, var(--muted) 45%, var(--border)); border-radius: 12px; box-shadow: 0 1px 3px rgba(20, 30, 60, .10); min-width: 0; }
.pcp-card.pcp-lib { grid-column: 1 / -1; }

/* Priebeh zmeny tlačiarne: pruh, ktorý ostáva na očiach aj pri posúvaní stránky */
.pcp-status { position: sticky; bottom: 14px; z-index: 30; display: flex; align-items: center; gap: .7rem; margin: .8rem 0 0; padding: .75rem 1rem; border-radius: 12px; border: 1.5px solid; font-size: 14px; font-weight: 600; box-shadow: 0 6px 20px rgba(20, 30, 60, .18); }
.pcp-status[hidden] { display: none; }
.pcp-status.run { background: #eaf1ff; border-color: #2563eb; color: #1e3a8a; }
.pcp-status.ok { background: #e8f8ee; border-color: #16a34a; color: #14532d; }
.pcp-status.err { background: #fdecec; border-color: #dc2626; color: #7f1d1d; }
.pcp-st-t { flex: 1; min-width: 0; }
.pcp-x { background: none; border: 0; font-size: 22px; line-height: 1; cursor: pointer; color: inherit; padding: 0 .3rem; }
.pcp-spin { width: 16px; height: 16px; flex: none; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: pcpspin .8s linear infinite; }
@keyframes pcpspin { to { transform: rotate(360deg); } }

/* Výsledok skúšky e-mailu */
.mtest { border: 1.5px solid; border-radius: 10px; padding: .7rem 1rem; margin: 0 0 .8rem; }
.mtest.ok { border-color: #16a34a; background: rgba(22,163,74,.08); }
.mtest.bad { border-color: #dc2626; background: rgba(220,38,38,.07); }
.mtest ul { margin: .4rem 0 0; padding-left: 1.1rem; font-size: 13px; }

/* Nastavenia e-mailu */
.mform { max-width: 820px; }
.mf-on { display: flex; align-items: center; gap: .5rem; padding: .7rem .9rem; margin: .4rem 0 .2rem; border: 1px solid var(--border); border-radius: 10px; background: rgba(127,150,190,.06); cursor: pointer; }
.mf-on input { width: 18px; height: 18px; margin: 0; }
.mf-sec { padding: .9rem 0 .2rem; border-top: 1px solid var(--border); margin-top: .8rem; }
.mf-sec h4 { margin: 0 0 .6rem; font-size: 14px; font-weight: 700; }
.mf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .8rem 1rem; align-items: start; }
.mf-grid .pf input:not([type=checkbox]):not([type=radio]), .mf-grid .pf select { width: 100%; height: 36px; box-sizing: border-box; }
.mf-grid .pf-n input[type=checkbox] { width: 16px; height: 16px; margin: 0; flex: none; }
.mf-grid .pf-n .inl { white-space: nowrap; }
.mf-grid .mf-w2 { grid-column: span 2; }
.mf-grid .mf-port { max-width: 120px; }
.mf-test { max-width: 820px; align-items: end; }
.mf-test .pset-bar { margin-top: 0; }
@media (max-width: 640px) { .mf-grid .mf-w2 { grid-column: auto; } }
.pf-n .inl { display: inline-flex; align-items: center; gap: .35rem; font-weight: 400; }

/* Zaškrtávacie voľby v okne Vyriešiť tiket (trieda .chk je obsadená iným prvkom) */
.dbody-add label.tkchk, label.tkchk { display: flex; align-items: flex-start; gap: .55rem; margin: .5rem 0; font-size: 14px; font-weight: 500; cursor: pointer; }
label.tkchk input { width: 16px; height: 16px; margin: 2px 0 0; flex: none; }
label.tkchk small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 2px; }

/* Tiket: komunikácia ako vlákno (najnovšie hore): jeden stĺpec s časovou osou vľavo */
.thr-new { display: flex; gap: .6rem; align-items: flex-end; margin: .4rem 0 1rem; max-width: 900px; }
.thr-new textarea { flex: 1; min-height: 44px; }
.thr { position: relative; display: flex; flex-direction: column; gap: .55rem; max-width: 900px; }
.thr::before { content: ""; position: absolute; left: 16px; top: 8px; bottom: 8px; width: 2px; background: var(--border); }
.thr-msg, .thr-ev { position: relative; display: flex; gap: .7rem; align-items: flex-start; }
.thr-av { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #fff; background: #16a34a; box-shadow: 0 0 0 4px var(--card); }
.thr-msg.tech .thr-av { background: #1d4ed8; }
.thr-msg.ai .thr-av { background: #7c3aed; }
.thr-bub { flex: 1; min-width: 0; border-radius: 12px; padding: .55rem .85rem; border: 1px solid var(--border); border-left-width: 4px; background: var(--card); }
.thr-msg.cust .thr-bub { background: rgba(22,163,74,.07); border-color: rgba(22,163,74,.35); border-left-color: #16a34a; }
.thr-msg.tech .thr-bub { background: rgba(29,78,216,.06); border-color: rgba(29,78,216,.28); border-left-color: #1d4ed8; }
.thr-msg.ai .thr-bub { background: rgba(124,58,237,.06); border-color: rgba(124,58,237,.28); border-left-color: #7c3aed; }
.thr-meta { font-size: 12px; display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin-bottom: .15rem; }
.thr-bub .richbox, .thr-evb .richbox { background: none; border: 0; padding: 0; margin: 0; }
.thr-tag { font-size: 11px; font-weight: 700; padding: .05rem .5rem; border-radius: 999px; }
.thr-tag.cust { background: rgba(22,163,74,.15); color: #15803d; }
.thr-tag.tech { background: rgba(29,78,216,.12); color: #1d4ed8; }
.thr-tag.ai { background: rgba(124,58,237,.14); color: #6d28d9; }
.thr-tag.sys { background: rgba(100,116,139,.14); color: var(--muted); }
.thr-tag.mail { background: rgba(245,158,11,.18); color: #b45309; }
.thr-ev { font-size: 12.5px; color: var(--muted); }
.thr-dot { flex: none; width: 34px; display: flex; justify-content: center; padding-top: .3rem; }
.thr-dot::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: #94a3b8; box-shadow: 0 0 0 4px var(--card); }
.thr-ev.tocust .thr-dot::before { background: #f59e0b; }
.thr-ev.start .thr-dot::before { background: #475569; }
.thr-evb { flex: 1; min-width: 0; padding: .1rem 0 .2rem; }
.thr-evb .richbox { font-size: 12.5px; color: var(--muted); }

/* Zariadenie > Zdravie > Zabezpečenie: prehľadné karty v mriežke, riadok = popis vľavo, stav vpravo */
.secgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(440px, 1fr)); gap: 1rem; align-items: start; margin-top: 1rem; }
.secgrid > .card { margin: 0; }
.secgrid .site-head { margin-bottom: .3rem; }
dl.slist { margin: 0; }
dl.slist > div { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .55rem 0; border-top: 1px solid var(--border); }
dl.slist > div:first-child { border-top: 0; }
dl.slist dt { color: var(--muted); font-size: 13px; font-weight: 500; flex: 0 0 auto; max-width: 45%; }
dl.slist dd { margin: 0; text-align: right; font-weight: 600; min-width: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: .3rem .5rem; }
dl.slist dd .small, dl.slist dd.small { font-weight: 400; }
dl.slist .good, dl.slist .badv, dl.slist .warnv { display: inline-flex; align-items: center; gap: .4rem; }
dl.slist .good::before, dl.slist .badv::before, dl.slist .warnv::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
dl.slist .good { color: var(--ok, #16a34a); } dl.slist .badv { color: var(--bad, #dc2626); } dl.slist .warnv { color: var(--warn, #d97706); }
@media (max-width: 560px) { .secgrid { grid-template-columns: 1fr; } dl.slist > div { flex-direction: column; align-items: flex-start; } dl.slist dd { justify-content: flex-start; text-align: left; } dl.slist dt { max-width: none; } }

/* Zoznam tiketov: filter a farebné stavy */
.tkf { display: flex; flex-wrap: wrap; gap: .4rem; margin: .2rem 0 .9rem; }
.tkf a { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .75rem; border-radius: 999px; border: 1px solid var(--border); font-size: 13px; font-weight: 600; color: inherit; text-decoration: none; background: var(--card); }
.tkf a:hover { border-color: #3b82f6; }
.tkf a.on { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
.tkf .n { font-size: 11.5px; font-weight: 700; padding: 0 .45rem; border-radius: 999px; background: rgba(127,140,170,.18); }
.tkf a.on .n { background: rgba(255,255,255,.25); }
.sti { width: 15px; height: 15px; flex: none; }
.tkst { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .65rem; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.tkst.open { background: rgba(245,158,11,.16); color: #b45309; }
.tkst.in_progress { background: rgba(37,99,235,.13); color: #1d4ed8; }
.tkst.awaiting_test { background: rgba(234,88,12,.15); color: #c2410c; }
.tkst.resolved { background: rgba(22,163,74,.14); color: #15803d; }
.tkst.closed { background: rgba(100,116,139,.16); color: #475569; }
.tkst.rejected { background: rgba(220,38,38,.13); color: #b91c1c; }
.tkf a .sti { opacity: .85; }
.tkpr.high { color: #d97706; font-weight: 700; } .tkpr.urgent { color: #dc2626; font-weight: 700; } .tkpr.low { color: var(--muted); }
.ipgrid h4.mfh { margin: .6rem 0 0; font-size: 13px; font-weight: 700; color: var(--muted); border-top: 1px solid var(--border); padding-top: .6rem; }
