:root{color-scheme:dark;font-family:Inter,system-ui,sans-serif;--bg:#0b1220;--panel:#111827;--line:#334155;--text:#e5e7eb;--muted:#94a3b8;--ok:#22c55e;--warn:#f59e0b;--down:#ef4444;--unknown:#64748b}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);overflow:hidden}.hidden{display:none!important}
header{height:52px;background:#0f172a;border-bottom:1px solid #1e293b;display:flex;align-items:center;gap:10px;padding:8px 12px}button,select,input{background:#1e293b;color:var(--text);border:1px solid #334155;border-radius:7px;padding:8px 10px}button{cursor:pointer}.brand{font-weight:700}.spacer{flex:1}.badge{background:#b91c1c;border-radius:12px;padding:2px 7px;font-size:12px}
main{height:calc(100vh - 52px);position:relative}#mapWrap{width:100%;height:100%;overflow:hidden}#mapSvg{width:100%;height:100%;background:#0b1220;touch-action:none}.link{stroke:#475569;stroke-width:4;fill:none}.link.backup{stroke-dasharray:10 8}.link-label{fill:#cbd5e1;font-size:12px;text-anchor:middle}.node{cursor:pointer}.node rect{fill:#111827;stroke:#334155;stroke-width:2;rx:10}.node.OK rect{stroke:var(--ok)}.node.DEGRADED rect,.node.WARNING rect{stroke:var(--warn)}.node.DOWN rect{stroke:var(--down)}.node.UNKNOWN rect{stroke:var(--unknown)}.node text{fill:var(--text);font-size:13px;text-anchor:middle;pointer-events:none}.node .sub{fill:var(--muted);font-size:11px}.editing .node{cursor:move}
#drawer{position:absolute;right:0;top:0;height:100%;width:min(430px,92vw);background:#0f172a;border-left:1px solid #334155;padding:18px;overflow:auto;z-index:4}#drawerClose{float:right;font-size:20px}.kv{display:grid;grid-template-columns:130px 1fr;gap:6px;margin:6px 0}.probe{padding:8px;border-bottom:1px solid #1e293b}.state{font-weight:700}.state.OK{color:var(--ok)}.state.WARNING,.state.UNSTABLE{color:var(--warn)}.state.ALERT,.state.DOWN{color:var(--down)}
.center-card{position:fixed;inset:0;display:grid;place-items:center;background:var(--bg)}.center-card form{width:min(360px,90vw);display:grid;gap:12px;background:#111827;padding:24px;border:1px solid #334155;border-radius:12px}.center-card h1{position:absolute;transform:translateY(-190px)}label{display:grid;gap:5px}.error{color:#fca5a5;min-height:1.4em}#toast{position:fixed;bottom:16px;left:50%;transform:translateX(-50%);background:#111827;border:1px solid #334155;padding:10px 14px;border-radius:8px;display:none}
@media(max-width:700px){header{gap:5px;padding:6px}header .brand{display:none}#lockBtn{display:none}#userLabel{display:none}.node text{font-size:11px}}

#deviceDialog {
    width: min(460px, calc(100vw - 30px));
    border: 1px solid #334155;
    border-radius: 10px;
    background: #111827;
    color: #e5e7eb;
    padding: 20px;
}

#deviceDialog::backdrop {
    background: rgba(0,0,0,.65);
}

#deviceDialog form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#deviceDialog h2 {
    margin: 0 0 8px 0;
}

#deviceDialog label {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

#deviceDialog input,
#deviceDialog select {
    box-sizing: border-box;
    width: 100%;
    padding: 9px 10px;
    border: 1px solid #475569;
    border-radius: 6px;
    background: #1e293b;
    color: #fff;
}

#newDeviceFields,
#existingDeviceFields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}

#addDeviceBtn {
    white-space: nowrap;
}

.map-node-link {
    stroke: #64748b;
    stroke-width: 2;
    stroke-dasharray: 8 6;
    opacity: .85;
}

.node.link-selected rect {
    stroke-width: 4 !important;
    stroke: #f59e0b !important;
}

.device-toolbar {
    display: flex;
    gap: 8px;
    margin: 8px 0 16px;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 18px;
}

.section-title h3 {
    margin: 0;
}

.probe-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.probe-detail {
    margin-top: 4px;
    font-size: 12px;
    opacity: .8;
}

.probe-error {
    margin-top: 6px;
    font-size: 12px;
    color: #fca5a5;
}

.probe-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
}

.probe-actions button {
    padding: 4px 7px;
    font-size: 12px;
}

.probe-disabled {
    opacity: .55;
}

#appFormDialog {
    width: min(560px, calc(100vw - 30px));
    max-height: 90vh;
    overflow: auto;
    background: #111827;
    color: #e5e7eb;
    border: 1px solid #475569;
    border-radius: 10px;
    padding: 20px;
}

#appFormDialog::backdrop {
    background: rgba(0,0,0,.65);
}

#appFormDialog form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#appFormDialog label {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

#appFormDialog input,
#appFormDialog select {
    background: #0b1220;
    color: #e5e7eb;
    border: 1px solid #475569;
    border-radius: 6px;
    padding: 8px;
}

#appFormDialog .check-row {
    flex-direction: row;
    align-items: center;
}

.dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

.form-grid-4 {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 8px;
}

@media (max-width:700px) {
    .form-grid-4 {
        grid-template-columns: repeat(2,1fr);
    }
}

/* ============================================================
   DEVICE NODE STATE COLORS
   ============================================================ */

.node.state-OK rect {
    fill: rgba(34,197,94,.22);
    stroke: #22c55e;
    stroke-width: 3;
}

.node.state-DEGRADED rect,
.node.state-UNSTABLE rect {
    fill: rgba(234,179,8,.22);
    stroke: #eab308;
    stroke-width: 3;
}

.node.state-WARNING rect {
    fill: rgba(249,115,22,.28);
    stroke: #f97316;
    stroke-width: 3;
}

.node.state-DOWN rect,
.node.state-ALERT rect {
    fill: rgba(239,68,68,.35);
    stroke: #ef4444;
    stroke-width: 4;
}

.node.state-UNKNOWN rect {
    fill: rgba(100,116,139,.18);
    stroke: #64748b;
    stroke-width: 2;
}

/* ============================================================
   DEVICE NODE STATE COLORS
   ============================================================ */

.node.state-OK rect {
    fill: rgba(34,197,94,.25) !important;
    stroke: #22c55e !important;
    stroke-width: 3 !important;
}

.node.state-DEGRADED rect,
.node.state-UNSTABLE rect {
    fill: rgba(234,179,8,.28) !important;
    stroke: #eab308 !important;
    stroke-width: 3 !important;
}

.node.state-WARNING rect {
    fill: rgba(249,115,22,.32) !important;
    stroke: #f97316 !important;
    stroke-width: 3 !important;
}

.node.state-DOWN rect,
.node.state-ALERT rect {
    fill: rgba(239,68,68,.42) !important;
    stroke: #ef4444 !important;
    stroke-width: 4 !important;
}

.node.state-UNKNOWN rect {
    fill: rgba(100,116,139,.20) !important;
    stroke: #64748b !important;
    stroke-width: 2 !important;
}

/* ============================================================
   DEVICE NODE STATE COLORS - current node classes
   ============================================================ */

.node.OK rect {
    fill: rgba(34,197,94,.25) !important;
    stroke: #22c55e !important;
    stroke-width: 3 !important;
}

.node.DEGRADED rect,
.node.UNSTABLE rect {
    fill: rgba(234,179,8,.30) !important;
    stroke: #eab308 !important;
    stroke-width: 3 !important;
}

.node.WARNING rect {
    fill: rgba(249,115,22,.35) !important;
    stroke: #f97316 !important;
    stroke-width: 3 !important;
}

.node.DOWN rect,
.node.ALERT rect {
    fill: rgba(239,68,68,.45) !important;
    stroke: #ef4444 !important;
    stroke-width: 4 !important;
}

.node.UNKNOWN rect {
    fill: rgba(100,116,139,.22) !important;
    stroke: #64748b !important;
    stroke-width: 2 !important;
}

.node .sub {
    fill: #94a3b8;
    font-size: 11px;
    font-weight: 400;
}


/* ===== DOHLED MAP UI V2 ===== */


/* ------------------------------------------------------------
   NODE CARD
   ------------------------------------------------------------ */

#mapSvg .node {
    cursor: pointer;
}

#mapSvg .node > rect {
    fill: rgba(15,23,42,.96);
    stroke: #64748b;
    stroke-width: 2;
    rx: 10;
    ry: 10;
}

#mapSvg .node-title {
    font-size: 14px;
    font-weight: 700;
    text-anchor: middle;
    dominant-baseline: middle;
    pointer-events: none;
}

#mapSvg .node-metrics {
    font-size: 11px;
    font-weight: 500;
    text-anchor: middle;
    dominant-baseline: middle;
    opacity: .9;
    pointer-events: none;
}

#mapSvg .node-role {
    font-size: 10px;
    font-weight: 600;
    text-anchor: middle;
    dominant-baseline: middle;
    opacity: .72;
    pointer-events: none;
}


/* ------------------------------------------------------------
   NODE HEALTH
   ------------------------------------------------------------ */

#mapSvg .node.OK > rect {
    stroke: #22c55e;
}

#mapSvg .node.DEGRADED > rect {
    stroke: #eab308;
}

#mapSvg .node.WARNING > rect {
    stroke: #f97316;
}

#mapSvg .node.DOWN > rect,
#mapSvg .node.ALERT > rect {
    stroke: #ef4444;
    stroke-width: 3;
}

#mapSvg .node.UNKNOWN > rect {
    stroke: #64748b;
}


/* pozdeji pro dependency engine */

#mapSvg .node.IMPACTED > rect {
    stroke: #f59e0b;
    stroke-width: 3;
    stroke-dasharray: 7 4;
}


/* ------------------------------------------------------------
   SITE PRIORITY
   ------------------------------------------------------------ */

#mapSvg .node[data-priority="1"] > rect,
#mapSvg .node[data-priority="2"] > rect {
    stroke-width: 3;
}

#mapSvg .node[data-priority="7"],
#mapSvg .node[data-priority="8"] {
    opacity: .88;
}


/* ------------------------------------------------------------
   LINKS
   ------------------------------------------------------------ */

#mapSvg .link {
    fill: none;
    vector-effect: non-scaling-stroke;
    stroke-linecap: round;
}

#mapSvg .link.role-main {
    stroke-dasharray: none;
}

#mapSvg .link.role-backup {
    stroke-dasharray: 10 7;
}


/* traffic / capacity */

#mapSvg .link.load-ok {
    stroke: #22c55e;
}

#mapSvg .link.load-medium {
    stroke: #eab308;
}

#mapSvg .link.load-high {
    stroke: #f97316;
}

#mapSvg .link.load-critical {
    stroke: #ef4444;
}

#mapSvg .link.load-unknown {
    stroke: #64748b;
}


/* fyzicky DOWN ma prednost pred vytizenim */

#mapSvg .link.link-down {
    stroke: #ef4444 !important;
    stroke-width: 5 !important;
}


/* ------------------------------------------------------------
   LINK LABEL
   ------------------------------------------------------------ */

#mapSvg .link-label {
    font-size: 11px;
    font-weight: 600;
    paint-order: stroke;
    stroke: rgba(15,23,42,.95);
    stroke-width: 4px;
    stroke-linejoin: round;
    pointer-events: none;
}


/* ------------------------------------------------------------
   MOBILE
   ------------------------------------------------------------ */

@media (max-width: 700px) {

    #mapSvg .node-title {
        font-size: 13px;
    }

    #mapSvg .node-metrics {
        font-size: 10px;
    }

    #mapSvg .node-role {
        font-size: 9px;
    }

    #mapSvg .link-label {
        font-size: 10px;
    }
}


/* ===== MAP NODE TYPOGRAPHY TUNE ===== */

#mapSvg .node-title {
    font-size: 12px;
    font-weight: 650;
}

#mapSvg .node-metrics {
    font-size: 10px;
}

#mapSvg .node-role {
    font-size: 9px;
    letter-spacing: .25px;
}



/* ===== MAP UI TUNING ===== */
#mapSvg .node-title{
    font-size:16px;
    font-weight:700;
    fill:#e5eefc;
    text-anchor:middle;
}

#mapSvg .node-metrics{
    font-size:12px;
    fill:#cbd5e1;
    text-anchor:middle;
}

#mapSvg .node-role{
    font-size:11px;
    fill:#94a3b8;
    text-anchor:middle;
    letter-spacing:.04em;
}

#mapSvg .link-label{
    font-size:12px;
    fill:#dbe7ff;
    text-anchor:middle;
}


/* ===== DOHLED MAP UI polish ===== */
#mapSvg .node > rect{
    stroke-width:1.5;
    shape-rendering:geometricPrecision;
}

#mapSvg .link{
    stroke-linecap:round;
    stroke-linejoin:round;
}

#mapSvg .node-title{
    font-weight:700;
}

#mapSvg .node-metrics{
    font-size:11px;
}

#mapSvg .node-role{
    font-size:10px;
    letter-spacing:.4px;
    opacity:.92;
}


/* ===== DOHLED NODE FINE BORDER ===== */

#mapSvg .node > rect {
    stroke-width: 1.15px !important;
    vector-effect: non-scaling-stroke;
}


/* ===== LINK EDITOR ===== */

.editing .link{
    cursor:pointer;
    pointer-events:stroke;
}

.editing .link:hover{
    stroke-width:6 !important;
    filter:drop-shadow(0 0 3px rgba(255,255,255,.45));
}

.link-editor{
    display:flex;
    flex-direction:column;
    gap:14px;
    min-width:300px;
}

.link-editor h2{
    margin:0 0 4px;
}

.link-editor label{
    display:flex;
    flex-direction:column;
    gap:5px;
}

.link-editor select{
    width:100%;
}

.link-editor-devices{
    display:grid;
    grid-template-columns:1fr auto 1fr;
    gap:8px;
    align-items:center;
    text-align:center;
}

.link-anchor-section{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:18px;
}

.link-anchor-pad{
    margin-top:8px;
    display:grid;
    grid-template-columns:repeat(3,36px);
    gap:4px;
    justify-content:center;
}

.link-anchor-btn{
    width:36px;
    height:36px;
    padding:0;
}

.link-anchor-btn.active{
    outline:2px solid #22c55e;
    background:#163b31;
}

.link-editor-actions{
    display:flex;
    gap:8px;
}

.link-editor-actions button{
    flex:1;
}

.link-editor-check{
    flex-direction:row !important;
    align-items:center;
}

.link-editor-note{
    font-size:11px;
    opacity:.7;
}


/* ===== LINK EDITOR ===== */

.editing .link{
    cursor:pointer;
    pointer-events:stroke;
}

.editing .link:hover{
    stroke-width:6 !important;
    filter:drop-shadow(0 0 3px rgba(255,255,255,.45));
}

.link-editor{
    display:flex;
    flex-direction:column;
    gap:14px;
    min-width:300px;
}

.link-editor h2{
    margin:0 0 4px;
}

.link-editor label{
    display:flex;
    flex-direction:column;
    gap:5px;
}

.link-editor select{
    width:100%;
}

.link-editor-devices{
    display:grid;
    grid-template-columns:1fr auto 1fr;
    gap:8px;
    align-items:center;
    text-align:center;
}

.link-anchor-section{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:18px;
}

.link-anchor-pad{
    margin-top:8px;
    display:grid;
    grid-template-columns:repeat(3,36px);
    gap:4px;
    justify-content:center;
}

.link-anchor-btn{
    width:36px;
    height:36px;
    padding:0;
}

.link-anchor-btn.active{
    outline:2px solid #22c55e;
    background:#163b31;
}

.link-editor-actions{
    display:flex;
    gap:8px;
}

.link-editor-actions button{
    flex:1;
}

.link-editor-check{
    flex-direction:row !important;
    align-items:center;
}

.link-editor-note{
    font-size:11px;
    opacity:.7;
}


/* ===== LINK CLICK FIX ===== */

#mapSvg.editing .link {
    pointer-events: stroke !important;
    cursor: pointer !important;
}

#mapSvg.editing .link-label {
    pointer-events: all !important;
    cursor: pointer !important;
}

#mapSvg.editing .link:hover {
    stroke-width: 6px !important;
}



/* ===== DEVICE SETTINGS EDITOR ===== */

.device-settings{
    display:flex;
    flex-direction:column;
    gap:12px;
}

.device-settings h2,
.device-settings h3{
    margin:0;
}

.device-settings label{
    display:flex;
    flex-direction:column;
    gap:5px;
}

.device-settings input,
.device-settings select{
    width:100%;
    box-sizing:border-box;
}

.device-setting-check{
    flex-direction:row !important;
    align-items:center;
    gap:8px !important;
}

.device-setting-check input{
    width:auto;
}

.device-setting-inline{
    display:grid;
    grid-template-columns:1fr auto;
    align-items:center;
    gap:8px;
}

.device-settings-actions{
    display:flex;
    gap:8px;
    margin-top:5px;
}

.device-settings-actions button{
    flex:1;
}

.device-settings-note{
    opacity:.65;
}

.device-settings-open{
    width:100%;
    margin-bottom:12px;
}



/* ===== MAP SETTINGS + DEPENDENCIES ===== */

.map-settings{
    display:flex;
    flex-direction:column;
    gap:12px;
}

.map-settings label{
    display:flex;
    flex-direction:column;
    gap:5px;
}

.map-settings input,
.map-settings select,
.map-settings textarea{
    width:100%;
    box-sizing:border-box;
}

.device-settings select[multiple]{
    min-height:110px;
}

.device-settings select[multiple] option{
    padding:5px 7px;
}



/* ===== MAP SETTINGS + DEPENDENCIES ===== */

.map-settings{
    display:flex;
    flex-direction:column;
    gap:12px;
}

.map-settings label{
    display:flex;
    flex-direction:column;
    gap:5px;
}

.map-settings input,
.map-settings select,
.map-settings textarea{
    width:100%;
    box-sizing:border-box;
}

.device-settings select[multiple]{
    min-height:110px;
}

.device-settings select[multiple] option{
    padding:5px 7px;
}


/* ===== SNMP FUNCTION ===== */

.snmp-function-fields{
    margin:12px 0;
    padding:12px;
    border:1px solid #334155;
    border-radius:8px;
}

.snmp-function-fields legend{
    padding:0 6px;
    font-weight:700;
}

.snmp-function-fields h4{
    margin:12px 0 5px;
}

.snmp-condition-row{
    display:grid;
    grid-template-columns:110px 100px 1fr;
    gap:6px;
}

.snmp-condition-row select,
.snmp-condition-row input{
    width:100%;
    box-sizing:border-box;
}

.probe-function-value{
    margin:5px 0;
    font-size:18px;
    font-weight:700;
}


.probe-function-value{
    margin:5px 0;
    font-size:18px;
    font-weight:700;
}



/* ===== NODE FOOTER + TOOLS ===== */
#mapSvg .node-role-left{
    text-anchor:start !important;
}

#mapSvg .node-tools{
    fill:#93c5fd;
    font-size:10px;
    font-weight:650;
    text-anchor:end;
    dominant-baseline:middle;
    text-decoration:underline;
    user-select:none;
}

#mapSvg .node-tools:hover{
    fill:#dbeafe;
}

#nodeToolsDialog{
    width:min(620px,calc(100vw - 30px));
    max-height:85vh;
    background:#111827;
    color:#e5e7eb;
    border:1px solid #475569;
    border-radius:12px;
    padding:18px;
}

#nodeToolsDialog::backdrop{
    background:rgba(0,0,0,.68);
}

.node-tools-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:16px;
    margin-bottom:14px;
}

.node-tools-head h2{
    margin:0 0 3px;
}

.node-tools-close{
    font-size:20px;
    line-height:1;
}

.node-tools-grid{
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:8px;
}

.node-tools-output{
    margin:14px 0 0;
    min-height:180px;
    max-height:45vh;
    overflow:auto;
    white-space:pre-wrap;
    background:#0b1220;
    border:1px solid #334155;
    border-radius:8px;
    padding:12px;
    color:#dbeafe;
}

@media(max-width:700px){
    .node-tools-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}


/* ===== WEB TERMINAL ===== */
.web-terminal-dialog{width:min(1100px,94vw);height:min(760px,90vh);padding:0;border:1px solid #334155;border-radius:12px;background:#020617;color:#e2e8f0}
.web-terminal-dialog::backdrop{background:rgba(0,0,0,.65)}
.web-terminal-head{display:flex;align-items:center;gap:14px;padding:10px 14px;background:#0f172a;border-bottom:1px solid #334155}
.web-terminal-head>div{display:flex;flex-direction:column;flex:1}.web-terminal-head small{opacity:.7}.web-terminal-state{font-size:12px;opacity:.85}
.web-terminal-close{font-size:24px;line-height:1;background:transparent;border:0;color:inherit;cursor:pointer}
.web-terminal-screen{box-sizing:border-box;margin:0;width:100%;height:calc(100% - 88px);overflow:auto;padding:14px;outline:0;white-space:pre-wrap;word-break:break-word;background:#020617;color:#e2e8f0;font:14px/1.35 ui-monospace,SFMono-Regular,Consolas,"Liberation Mono",monospace}
.web-terminal-help{height:28px;box-sizing:border-box;padding:5px 14px;border-top:1px solid #1e293b;font-size:12px;opacity:.65}


/* ===== CREDENTIAL EDITOR ===== */
.credential-editor-dialog{width:min(520px,92vw);padding:0;border:1px solid #334155;border-radius:12px;background:#0f172a;color:#e2e8f0;box-shadow:0 24px 80px rgba(0,0,0,.55)}
.credential-editor-dialog::backdrop{background:rgba(0,0,0,.62)}
.credential-editor-form{margin:0}
.credential-editor-head{display:flex;align-items:flex-start;gap:16px;padding:16px 18px;border-bottom:1px solid #334155}
.credential-editor-head>div{display:flex;flex:1;flex-direction:column;gap:4px}.credential-editor-head small,.credential-editor-body small{opacity:.7}
.credential-editor-x{border:0;background:transparent;color:inherit;font-size:24px;line-height:1;cursor:pointer}
.credential-editor-body{display:grid;gap:14px;padding:18px}
.credential-editor-body label{display:grid;gap:6px}
.credential-editor-body input,.credential-editor-body select{box-sizing:border-box;width:100%;padding:9px 10px;border:1px solid #475569;border-radius:7px;background:#1e293b;color:#e2e8f0}
.credential-editor-check{display:flex!important;grid-template-columns:none!important;align-items:center;gap:9px!important}.credential-editor-check input{width:auto}
.credential-editor-actions{display:flex;justify-content:flex-end;gap:10px;padding:14px 18px;border-top:1px solid #334155}
.credential-editor-actions button{min-width:110px}

/* ===== LINK HISTORY / GRAFANA MINI ===== */
.link-history-dialog{
    width:min(420px,92vw);
    height:min(320px,78vh);
    box-sizing:border-box;
    padding:0;
    overflow:hidden;
    border:1px solid #334155;
    border-radius:12px;
    background:#0b1220;
    color:#e2e8f0;
    box-shadow:0 20px 70px rgba(0,0,0,.55);
}
.link-history-dialog::backdrop{
    background:rgba(2,6,23,.48);
}
.link-history-head{
    min-height:58px;
    box-sizing:border-box;
    display:flex;
    align-items:center;
    gap:10px;
    padding:8px 10px 8px 12px;
    border-bottom:1px solid #334155;
    background:#0f172a;
}
.link-history-title{
    min-width:0;
    flex:1;
    display:flex;
    flex-direction:column;
    gap:2px;
}
.link-history-title strong{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:13px;
}
.link-history-title small{
    opacity:.7;
    font-size:11px;
}
.link-history-actions{
    display:flex;
    align-items:center;
    gap:6px;
}
.link-history-ranges{
    display:flex;
    gap:2px;
}
.link-history-actions button{
    min-width:0;
    padding:5px 7px;
    font-size:11px;
}
.link-history-ranges button.active{
    outline:1px solid #60a5fa;
    background:#1e3a5f;
}
.link-history-close{
    border:0 !important;
    background:transparent !important;
    color:inherit;
    font-size:22px !important;
    line-height:1;
    padding:2px 4px !important;
}
.link-history-frame-wrap{
    width:100%;
    height:calc(100% - 58px);
    background:#111827;
}
.link-history-frame{
    display:block;
    width:100%;
    height:100%;
    border:0;
    background:#111827;
}
#mapSvg.editing .node.dragging{
    cursor:grabbing;
}


/* MAP DASHBOARD V1 */
.map-dashboard-wrap{overflow:auto;max-width:92vw}.map-dashboard{border-collapse:collapse;width:100%;min-width:760px}
.map-dashboard th,.map-dashboard td{padding:.55rem .7rem;border-bottom:1px solid rgba(255,255,255,.12);text-align:left;white-space:nowrap}
.mt-row{display:grid;grid-template-columns:minmax(260px,1fr) 100px 150px;gap:.5rem;align-items:center;margin:.35rem 0}
#mapSvg{touch-action:none}@media(max-width:700px){.mt-row{grid-template-columns:1fr}.map-dashboard{font-size:.88rem}}

/* ===== FULL PAGE NOC DASHBOARD ===== */

#dashboardWrap {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    overflow: auto;
    padding: 24px;
    background: #0b1220;
}

#dashboardWrap.hidden {
    display: none;
}

.noc-dashboard {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
}

.noc-dashboard-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.noc-dashboard-head h2 {
    margin: 0;
    font-size: 26px;
}

.noc-dashboard-sub {
    margin-top: 5px;
    opacity: .65;
}

.noc-dashboard-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #334155;
    border-radius: 10px;
    background: #111827;
}

#dashboardWrap .map-dashboard {
    width: 100%;
    min-width: 850px;
    border-collapse: collapse;
}

#dashboardWrap .map-dashboard th,
#dashboardWrap .map-dashboard td {
    padding: 14px 18px;
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid #273449;
}

#dashboardWrap .map-dashboard th {
    font-weight: 700;
    background: #172033;
}

#dashboardWrap .map-dashboard tbody tr:last-child td {
    border-bottom: 0;
}

#dashboardWrap .map-dashboard-row {
    cursor: pointer;
}

#dashboardWrap .map-dashboard-row:hover {
    background: rgba(255,255,255,.05);
}

#dashboardWrap .map-dashboard th:first-child,
#dashboardWrap .map-dashboard td:first-child {
    min-width: 220px;
}

@media (max-width: 700px) {
    #dashboardWrap {
        padding: 12px;
    }

    .noc-dashboard-head {
        align-items: flex-start;
    }

    .noc-dashboard-head h2 {
        font-size: 21px;
    }

    #dashboardWrap .map-dashboard {
        min-width: 760px;
    }
}

/* ===== /FULL PAGE NOC DASHBOARD ===== */


/* ===== NOC DASHBOARD STATE COLORS ===== */

/*
 * OK
 * Radek zustava normalni.
 * Zeleny je pouze nazev mapy.
 */
.map-dashboard-row.map-dashboard-state-ok td:first-child b {
    color: #45d483;
}


/*
 * DEGRADED / WARNING
 * Jemne zlute podbarveni celeho radku.
 */
.map-dashboard-row.map-dashboard-state-degraded,
.map-dashboard-row.map-dashboard-state-warning {
    background: rgba(245, 180, 45, 0.12);
}

.map-dashboard-row.map-dashboard-state-degraded td:first-child b,
.map-dashboard-row.map-dashboard-state-warning td:first-child b {
    color: #f5c451;
}


/*
 * DOWN / ALERT
 * Jemne cervene podbarveni celeho radku.
 */
.map-dashboard-row.map-dashboard-state-down,
.map-dashboard-row.map-dashboard-state-alert {
    background: rgba(235, 70, 70, 0.15);
}

.map-dashboard-row.map-dashboard-state-down td:first-child b,
.map-dashboard-row.map-dashboard-state-alert td:first-child b {
    color: #ff6868;
}


/*
 * UNKNOWN zustava neutralni.
 */
.map-dashboard-row.map-dashboard-state-unknown td:first-child b {
    color: inherit;
}

/* ===== SERVICE PC V2 ===== */
.user-menu{position:fixed;z-index:50;min-width:210px;background:#0f172a;border:1px solid #334155;
border-radius:8px;padding:6px;box-shadow:0 12px 30px #0008}
.user-menu.hidden{display:none}
.user-menu button{display:block;width:100%;text-align:left;background:transparent;border:0;color:#e5e7eb;
padding:9px 10px;border-radius:6px}
.user-menu button:hover{background:#1e293b}
#servicePcDialog{width:min(780px,calc(100vw - 30px));max-height:88vh;overflow:auto;background:#111827;
color:#e5e7eb;border:1px solid #475569;border-radius:12px;padding:18px}
#servicePcDialog::backdrop{background:#000a}
.service-pc-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}
.service-pc-head h2{margin:0}.service-pc-head small,.service-pc-title small{display:block;color:#94a3b8;margin-top:4px}
.service-pc-head>[data-spc-close]{font-size:22px}
.service-pc-toolbar{display:flex;gap:8px;flex-wrap:wrap;margin:18px 0}
.buttonlike{display:inline-flex;align-items:center;text-decoration:none;color:#e5e7eb;background:#1e293b;
border:1px solid #475569;border-radius:6px;padding:7px 10px}
.service-pc-card{border:1px solid #334155;border-radius:9px;padding:13px;margin:10px 0;background:#0f172a}
.service-pc-title{display:flex;justify-content:space-between;gap:12px}
.service-pc-state{font-weight:700;white-space:nowrap}.service-pc-state.paired{color:#4ade80}
.service-pc-state.pending{color:#fbbf24}.service-pc-state.unpaired{color:#94a3b8}
.service-pc-meta{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 16px;
font-size:12px;color:#94a3b8;margin:10px 0}
.service-pc-actions{display:flex;gap:7px;flex-wrap:wrap}.service-pc-actions .danger{border-color:#7f1d1d;color:#fecaca}
.service-pc-code{margin-top:10px;padding:10px;border:1px solid #a16207;background:#42200655;border-radius:7px}
.service-pc-code code{font-size:18px;margin-left:8px}.service-pc-code small{display:block;margin-top:6px}
.service-pc-empty{padding:20px;text-align:center;color:#94a3b8}
@media(max-width:700px){.service-pc-meta{grid-template-columns:1fr}}

/* ===== MEGAPATCH 2026-09-26: responsive header + edit menu + map navigation ===== */
.edit-menu{position:relative;display:inline-flex}
.edit-menu-panel{position:absolute;top:calc(100% + 8px);left:0;z-index:30;min-width:220px;padding:7px;background:#0f172a;border:1px solid #334155;border-radius:10px;box-shadow:0 16px 35px #0009}
.edit-menu-panel>button,.edit-menu-extra>button{display:block;width:100%;min-height:42px;text-align:left;margin:2px 0;white-space:nowrap}
.edit-menu-extra{display:contents}
#mapFitBtn{white-space:nowrap}
#mapSvg{cursor:grab;user-select:none;-webkit-user-select:none}
#mapSvg:active{cursor:grabbing}
#mapSvg.editing .node{cursor:move}
#mapSvg .node.IMPACTED>rect{fill:rgba(245,158,11,.18)!important;stroke:#f59e0b!important;stroke-width:3!important;stroke-dasharray:7 4}
#mapSvg .link-label{paint-order:stroke;stroke:#0b1220;stroke-width:4px;stroke-linejoin:round}

@media(max-width:700px){
 header{height:auto;min-height:58px;display:grid;grid-template-columns:minmax(0,1fr) auto auto auto;gap:6px;padding:6px;overflow:visible}
 main{height:calc(100vh - 58px)}
 #mapSelect{width:100%;min-width:0;min-height:46px;font-size:15px}
 #mapFitBtn,#editMenuBtn,#mapDashboardBtn,#incidentsBtn{min-height:46px;padding:8px 10px;font-size:14px}
 #mapFitBtn{font-size:0}
 #mapFitBtn::after{content:'⛶';font-size:20px}
 #mapDashboardBtn{font-size:0}
 #mapDashboardBtn::after{content:'🔄';font-size:18px}
 #incidentsBtn{font-size:0}
 #incidentsBtn::before{content:'⚠️';font-size:18px}
 #incidentsBtn .badge{font-size:11px;margin-left:2px}
 .edit-menu{position:static}
 .edit-menu-panel{position:fixed;left:8px;right:8px;top:64px;min-width:0;padding:9px;max-height:calc(100vh - 80px);overflow:auto}
 .edit-menu-panel>button,.edit-menu-extra>button{min-height:50px;font-size:16px;padding:11px 13px}
 #logoutBtn{display:none}
}
/* ===== /MEGAPATCH ===== */

/* ===== GRAPHICAL MAP OVERVIEW V1 ===== */
.map-overview-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:16px;width:100%}
.map-overview-card{display:block;text-align:left;min-height:168px;padding:16px;border:1px solid #334155;border-radius:12px;background:#111827;color:inherit;cursor:pointer;box-shadow:0 8px 24px #0002}
.map-overview-card:hover{transform:translateY(-1px);border-color:#64748b;background:#152033}
.map-overview-card-head,.map-overview-card-foot,.map-overview-card-traffic{display:flex;align-items:center;justify-content:space-between;gap:12px}
.map-overview-card-head strong{font-size:18px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.map-overview-card-head span{font-size:11px;font-weight:800;letter-spacing:.06em;padding:4px 7px;border-radius:999px;background:#334155}
.map-overview-card-stats{margin:20px 0 14px}.map-overview-card-stats b{font-size:28px;display:block}.map-overview-card-stats small{opacity:.65}
.map-overview-card-traffic{font-weight:700;margin-bottom:14px}.map-overview-card-foot{padding-top:12px;border-top:1px solid #273449;font-size:12px;opacity:.72}
.map-overview-state-ok{border-left:4px solid #45d483}.map-overview-state-ok .map-overview-card-head span{background:rgba(69,212,131,.15);color:#45d483}
.map-overview-state-degraded,.map-overview-state-warning{border-left:4px solid #f5c451;background:rgba(245,180,45,.08)}
.map-overview-state-degraded .map-overview-card-head span,.map-overview-state-warning .map-overview-card-head span{background:rgba(245,180,45,.15);color:#f5c451}
.map-overview-state-down,.map-overview-state-alert{border-left:4px solid #ff6868;background:rgba(235,70,70,.09)}
.map-overview-state-down .map-overview-card-head span,.map-overview-state-alert .map-overview-card-head span{background:rgba(235,70,70,.16);color:#ff6868}
.map-overview-state-impacted{border-left:4px solid #fb923c;background:rgba(251,146,60,.09)}
.map-overview-state-impacted .map-overview-card-head span{background:rgba(251,146,60,.16);color:#fb923c}
.map-overview-empty{padding:30px;border:1px dashed #475569;border-radius:12px;text-align:center;opacity:.7}
@media(max-width:700px){.map-overview-grid{grid-template-columns:1fr}.map-overview-card{min-height:150px}}


/* ===== DEVICE WATERMARK / GLOBAL SEARCH / ICON LIBRARY ===== */
#mapSvg .node-watermark{opacity:.16;filter:saturate(.75);}
.global-search{position:relative;width:min(360px,32vw)}.global-search>input{width:100%}.global-search-results{position:absolute;z-index:100;right:0;top:calc(100% + 7px);width:min(560px,90vw);max-height:70vh;overflow:auto;background:#0f172a;border:1px solid #334155;border-radius:10px;box-shadow:0 18px 45px #000a;padding:8px}
.global-search-section{display:grid;gap:5px;padding:6px}.global-search-section>strong{font-size:12px;opacity:.7;padding:3px 5px}.global-search-section>button{text-align:left;display:grid;gap:2px}.global-search-section small{opacity:.7}
.icon-library-dialog{width:min(850px,94vw);max-height:88vh;background:#0f172a;color:#e2e8f0;border:1px solid #334155;border-radius:12px;padding:0}.icon-library-head{display:flex;justify-content:space-between;align-items:center;padding:16px;border-bottom:1px solid #334155}.icon-library-head h2{margin:0}.icon-library-head small{opacity:.7}.icon-upload{display:grid;grid-template-columns:1fr 2fr auto;gap:8px;padding:14px;border-bottom:1px solid #334155}.icon-library-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:10px;padding:14px;max-height:58vh;overflow:auto}.icon-library-item{display:grid;grid-template-columns:58px 1fr auto;align-items:center;gap:10px;border:1px solid #334155;border-radius:9px;padding:9px}.icon-library-item img{width:58px;height:48px;object-fit:contain;background:#02061755;border-radius:6px}.icon-library-item div{display:grid;min-width:0}.icon-library-item small{opacity:.65;overflow:hidden;text-overflow:ellipsis}
@media(max-width:800px){.global-search{width:46px}.global-search>input{width:46px}.global-search:focus-within{position:absolute;left:8px;right:8px;top:58px;width:auto;z-index:80}.global-search:focus-within>input{width:100%}.icon-upload{grid-template-columns:1fr}.icon-library-grid{grid-template-columns:1fr}}
/* ===== /DEVICE WATERMARK / GLOBAL SEARCH / ICON LIBRARY ===== */


/* ===== HEADER UX 2026-09-28 ===== */
/* Logout je v uzivatelskem menu; na mobilu musi zustat jeho spoustec dostupny. */
#userLabel{white-space:nowrap;cursor:pointer}
@media(max-width:700px){
  #userLabel{display:inline-flex!important;align-items:center;justify-content:center;min-width:46px;min-height:46px;font-size:0}
  #userLabel::before{content:'👤';font-size:19px}
}
/* ===== /HEADER UX ===== */


/* ===== BACKBONE GRAFANA PREVIEW ===== */
.backbone-monitoring{margin:10px 0 16px;padding:12px;border:1px solid #334155;border-radius:10px;background:#0b122080}
.backbone-monitoring .section-title{margin-top:0}.backbone-monitoring-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.backbone-monitoring-actions button{flex:1;min-width:130px}
.backbone-preview-dialog{width:min(980px,94vw);height:min(720px,90vh);padding:0;overflow:hidden;border:1px solid #334155;border-radius:12px;background:#0b1220;color:#e2e8f0;box-shadow:0 24px 80px #0009}
.backbone-preview-dialog::backdrop{background:rgba(2,6,23,.62)}
.backbone-preview-head{min-height:58px;display:flex;align-items:center;gap:12px;padding:9px 12px;border-bottom:1px solid #334155;background:#0f172a}.backbone-preview-head>div:first-child{display:flex;flex:1;min-width:0;flex-direction:column;gap:2px}.backbone-preview-head strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.backbone-preview-head small{opacity:.68}.backbone-preview-actions{display:flex;align-items:center;gap:7px}.backbone-preview-close{border:0!important;background:transparent!important;color:inherit;font-size:22px!important;padding:2px 5px!important}.backbone-preview-frame-wrap{width:100%;height:calc(100% - 58px);background:#111827}.backbone-preview-frame{display:block;width:100%;height:100%;border:0;background:#111827}
@media(max-width:700px){.backbone-preview-dialog{width:98vw;height:88vh}.backbone-preview-head{align-items:flex-start}.backbone-preview-actions [data-detail]{font-size:0}.backbone-preview-actions [data-detail]::after{content:'↗';font-size:16px}}
/* ===== /BACKBONE GRAFANA PREVIEW ===== */

/* ===== BACKBONE PREVIEW - LARGE DIALOG ===== */

.backbone-preview-dialog {
    width: min(1500px, 94vw) !important;
    height: min(900px, 90vh) !important;
    max-width: none !important;
    max-height: none !important;
}

.backbone-preview-frame-wrap {
    height: calc(90vh - 90px) !important;
    min-height: 0 !important;
}

.backbone-preview-frame {
    display: block;
    width: 100% !important;
    height: 100% !important;
    border: 0;
}


/* ===== MOBILE PORTRAIT DRAWER 2026-09-28 ===== */
#mobileMenuBtn{display:none}
.mobile-menu-overlay{position:fixed;inset:0;z-index:250;background:rgba(2,6,23,.68);backdrop-filter:blur(2px)}
.mobile-menu-panel{position:absolute;right:0;top:0;height:100%;width:min(340px,85vw);padding:0 12px 18px;background:#0f172a;border-left:1px solid #334155;box-shadow:-18px 0 45px #0008;overflow:auto}
.mobile-menu-head{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;min-height:58px;background:#0f172a;border-bottom:1px solid #334155;margin:0 -12px 12px;padding:8px 12px}
.mobile-menu-head strong{font-size:18px}.mobile-menu-head button{font-size:24px;line-height:1;padding:7px 11px}
.mobile-menu-items{display:grid;gap:9px}.mobile-menu-items>*{width:100%;max-width:none}.mobile-menu-items button,.mobile-menu-items select,.mobile-menu-items input{min-height:48px;font-size:15px}
.mobile-menu-items .global-search{width:100%}.mobile-menu-items .global-search>input{width:100%}.mobile-menu-items .global-search:focus-within{position:relative;inset:auto;width:100%;z-index:auto}
.mobile-menu-items .edit-menu{display:block;position:relative}.mobile-menu-items .edit-menu-panel{position:relative;inset:auto;margin-top:7px;width:100%;max-height:none}
.mobile-menu-items #userLabel{display:flex!important;font-size:14px!important;justify-content:flex-start;padding:12px;border:1px solid #334155;border-radius:7px;background:#1e293b}.mobile-menu-items #userLabel::before{margin-right:8px}
body.mobile-menu-open{overflow:hidden}
@media(max-width:700px) and (orientation:portrait){
 body.mobile-portrait-ui header{height:58px;min-height:58px;display:flex;align-items:center;gap:8px;padding:6px 8px}
 body.mobile-portrait-ui header .brand{display:block!important;font-size:17px}
 body.mobile-portrait-ui header .spacer{display:block;flex:1}
 body.mobile-portrait-ui #incidentsBtn{display:inline-flex;align-items:center;justify-content:center;min-width:46px;min-height:46px}
 body.mobile-portrait-ui #mobileMenuBtn{display:inline-flex;align-items:center;justify-content:center;min-width:46px;min-height:46px;font-size:23px;padding:6px 10px}
 body.mobile-portrait-ui main{height:calc(100dvh - 58px)}
}
/* ===== /MOBILE PORTRAIT DRAWER ===== */


/* ===== DOHLED MOBILE PORTRAIT SCROLL V2 2026-09-28 ===== */
@media(max-width:700px) and (orientation:portrait){
  body.mobile-portrait-ui main{
    height:calc(100dvh - 58px);
    min-height:0;
    overflow:hidden;
  }

  body.mobile-portrait-ui #mapWrap.mobile-portrait-scroll-wrap{
    width:100%;
    height:100%;
    min-height:0;
    overflow-x:hidden !important;
    overflow-y:auto !important;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior-x:none;
    overscroll-behavior-y:contain;
    touch-action:pan-y;
  }

  body.mobile-portrait-ui #mapWrap.mobile-portrait-scroll-wrap #mapSvg.mobile-portrait-scroll-map{
    display:block;
    width:100% !important;
    min-height:0 !important;
    max-width:100%;
    max-height:none !important;
    flex:none;
    touch-action:pan-y !important;
  }
}
/* ===== /DOHLED MOBILE PORTRAIT SCROLL V2 ===== */


/* ===== DOHLED PORTRAIT PAGE SCROLL 2026-09-28 ===== */
@media(max-width:700px) and (orientation:portrait){
  /* Aktivni pouze kdyz detailni mapa dostala scroll tridu z JS. */
  body.mobile-portrait-ui:has(#mapWrap.mobile-portrait-scroll-wrap){
    overflow-x:hidden !important;
    overflow-y:auto !important;
    height:auto !important;
    min-height:100dvh;
  }

  body.mobile-portrait-ui:has(#mapWrap.mobile-portrait-scroll-wrap) main{
    height:auto !important;
    min-height:calc(100dvh - 58px) !important;
    overflow:visible !important;
  }

  body.mobile-portrait-ui #mapWrap.mobile-portrait-scroll-wrap{
    position:relative !important;
    width:100% !important;
    height:auto !important;
    min-height:calc(100dvh - 58px) !important;
    overflow:visible !important;
    touch-action:pan-y !important;
  }

  body.mobile-portrait-ui #mapWrap.mobile-portrait-scroll-wrap #mapSvg.mobile-portrait-scroll-map{
    display:block !important;
    width:100% !important;
    min-height:calc(100dvh - 58px) !important;
    max-width:100% !important;
    max-height:none !important;
    touch-action:pan-y !important;
  }
}
/* ===== /DOHLED PORTRAIT PAGE SCROLL ===== */


/* ===== DOHLED SAFE UI CLEANUP 2026-09-28 =====
 * Link history / traffic must be clickable also outside edit mode.
 * Edit-mode hover styling remains unchanged.
 */
#mapSvg .link{
    pointer-events:stroke;
    cursor:pointer;
}
#mapSvg .link-label{
    pointer-events:all;
    cursor:pointer;
}


/* ===== DOHLED MAP POWER STATUS 2026-09-29 ===== */
#mapSvg .node.power-on-battery > rect,
#mapSvg .node.power-warn > rect{
    stroke:#ff2d2d !important;
    stroke-width:4px !important;
    filter:drop-shadow(0 0 4px rgba(255,45,45,.7));
}
#mapSvg .node.power-critical > rect{
    stroke:#ff1717 !important;
    stroke-width:5px !important;
    animation:dohledPowerCriticalBorder .8s steps(2,end) infinite;
}
#mapSvg .node.power-critical .node-power-status{animation:dohledPowerCriticalText .8s steps(2,end) infinite;}
#mapSvg .node.power-unknown .node-power-status{opacity:.72;}
#mapSvg .node-power-status{font-weight:800;letter-spacing:.2px;}
@keyframes dohledPowerCriticalBorder{
    0%,49%{stroke:#ff1717;filter:drop-shadow(0 0 8px rgba(255,23,23,.95));}
    50%,100%{stroke:#facc15;filter:drop-shadow(0 0 2px rgba(250,204,21,.35));}
}
@keyframes dohledPowerCriticalText{0%,49%{opacity:1;}50%,100%{opacity:.25;}}


/* ===== DOHLED POWER DASHBOARD VIEWS V2 2026-09-29 ===== */

.map-dashboard-power{
    white-space:nowrap;
    min-width:92px;
}

.power-dash{
    display:inline-flex;
    align-items:center;
    gap:3px;
    white-space:nowrap;
    font-weight:800;
    letter-spacing:.1px;
}

.power-dash.power-none{
    opacity:.55;
    font-weight:500;
}

.map-overview-card-head-status{
    display:flex;
    flex-direction:column;
    align-items:flex-end;
    gap:10px;
    min-width:78px;
}

.map-overview-card-power{
    min-height:18px;
    font-size:14px;
    line-height:1;
    margin-top:4px;
}

/* Map still works, but site is running from battery. */
.map-overview-card.power-card-on-battery,
.map-overview-card.power-card-battery-warn{
    border-color:#ff2d2d !important;
    box-shadow:
        0 0 0 2px rgba(255,45,45,.75),
        0 0 10px rgba(255,45,45,.22);
}

/* Critical battery = intentionally noisy. */
.map-overview-card.power-card-battery-critical{
    border-color:#ff1717 !important;
    animation:
        dohledDashboardPowerCriticalBorder
        .8s
        steps(2,end)
        infinite;
}

.power-battery-critical{
    animation:
        dohledDashboardPowerCriticalText
        .8s
        steps(2,end)
        infinite;
}

.power-on-battery,
.power-battery-warn{
    color:#ff8a8a;
}

.power-battery-critical{
    color:#ff5252;
}

.power-unknown{
    opacity:.72;
}

@keyframes dohledDashboardPowerCriticalBorder{
    0%,49%{
        box-shadow:
            0 0 0 3px rgba(255,23,23,.95),
            0 0 14px rgba(255,23,23,.65);
    }

    50%,100%{
        box-shadow:
            0 0 0 2px rgba(250,204,21,.85),
            0 0 4px rgba(250,204,21,.25);
    }
}

@keyframes dohledDashboardPowerCriticalText{
    0%,49%{
        opacity:1;
    }

    50%,100%{
        opacity:.28;
    }
}

@media (max-width:700px){
    .map-dashboard-power{
        min-width:78px;
    }

    .power-dash{
        font-size:13px;
    }
}


/* DOHLED IMPACTED DASHBOARD ROWS 2026-09-30 */
.map-dashboard-state-impacted{
    background:rgba(251,146,60,.08)!important;
}
.map-dashboard-state-impacted td:first-child{
    color:#fb923c!important;
    font-weight:700;
}
.map-overview-state-impacted{
    border-left:4px solid #fb923c!important;
    background:rgba(251,146,60,.09)!important;
}
.map-overview-state-impacted .map-overview-card-head span{
    background:rgba(251,146,60,.16)!important;
    color:#fb923c!important;
}


/* DOHLED DASHBOARD VERTICAL SCROLL 2026-09-30 */
#dashboardWrap{
    overflow-y:auto;
    overflow-x:hidden;
    min-height:0;
    height:calc(100vh - 70px);
    overscroll-behavior:contain;
}

#dashboardWrap .noc-dashboard{
    min-height:100%;
    padding-bottom:48px;
    box-sizing:border-box;
}
