: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; }
