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

 :root {
  --bg: #0e0e0e;
  --bg-elevated: #171717;
  --bg-card: #171717;
  --cyan: #C43026;
  --cyan-dim: #9e261f;
  --cyan-glow: rgba(196, 48, 38, 0.22);
  --cyan-soft: rgba(196, 48, 38, 0.14);
  --biz: #61A2D3;
  --text: #f7f7f7;
  --text-muted: #c4c4c4;
  --border: rgba(255, 255, 255, 0.1);
  --radius: 16px;
  --font-display: "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --ok: #4CBB17;
  --warn: #e0a100;
  --err: #ff8d86;
  --sidebar: 252px;
  --sidebar-bg: #000000;
  --input-bg: #101010;
  --modal-bg: #171717;
  --overlay: rgba(0, 0, 0, .72);
  --map-bg: #12161b;
  --pre-bg: #121212;
  --pre-fg: #f3f5f7;
  --btn-primary-fg: #ffffff;
  --bar-track: rgba(255, 255, 255, .08);
  --gauge-track: rgba(255, 255, 255, .1);
  --shadow: 0 10px 28px rgba(0, 0, 0, .4);
  --grid-line: transparent;
  --glow: transparent;
}

html[data-theme="light"] {
  --bg: #F5F5F5;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --cyan: #C43026;
  --cyan-dim: #9e261f;
  --cyan-glow: rgba(196, 48, 38, 0.12);
  --cyan-soft: rgba(196, 48, 38, 0.08);
  --biz: #61A2D3;
  --text: #141414;
  --text-muted: #5c5c5c;
  --border: rgba(0, 0, 0, 0.08);
  --ok: #2f9e22;
  --warn: #a67c00;
  --err: #C43026;
  --sidebar-bg: #000000;
  --input-bg: #ffffff;
  --modal-bg: #ffffff;
  --overlay: rgba(0, 0, 0, .48);
  --map-bg: #e6e6e6;
  --pre-bg: #f7f7f7;
  --pre-fg: #1a1a1a;
  --btn-primary-fg: #ffffff;
  --bar-track: rgba(0, 0, 0, .08);
  --gauge-track: rgba(0, 0, 0, .08);
  --shadow: 0 0 15px rgba(0, 0, 0, .06);
  --grid-line: transparent;
  --glow: transparent;
}

html { font-size: 15px; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  min-height: 100vh;
}

body.booting #login-screen,
body.booting #app,
body.booting #portal { display: none !important; }
body.is-login #app,
body.is-login #portal { display: none !important; }
body.is-login #login-screen { display: flex; }
body.is-app #login-screen,
body.is-app #portal { display: none !important; }
body.is-app #app { display: flex; }
body.is-portal #login-screen,
body.is-portal #app { display: none !important; }
body.is-portal #portal { display: flex; flex-direction: column; }

.login-tabs {
  display: flex; gap: 0.25rem; margin: 0.85rem 0 0; padding: 0.2rem;
  background: var(--input-bg); border-radius: 999px; border: 1px solid var(--border);
}
.login-tab {
  flex: 1; border: 0; background: transparent; color: var(--text-muted);
  font: inherit; font-size: 0.78rem; font-weight: 600; padding: 0.38rem 0.5rem;
  border-radius: 999px; cursor: pointer;
}
.login-tab.active { background: var(--cyan-soft); color: var(--cyan); }

.portal-bar {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; align-items: center;
  gap: 0.75rem; padding: 0.55rem 1rem;
  border-bottom: 1px solid var(--border); background: var(--sidebar-bg);
}
.portal-bar-right { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.portal-main { position: relative; z-index: 1; padding: 0.9rem 1rem 1.6rem; max-width: 1180px; margin: 0 auto; }

.bg-grid {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 55% at 50% 18%, black 18%, transparent 72%);
}
.bg-glow {
  position: fixed; top: -22%; left: 50%; transform: translateX(-50%);
  width: 110vw; height: 55vh; pointer-events: none; z-index: 0;
  background: radial-gradient(ellipse at center, var(--glow) 0%, transparent 62%);
}

.section-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--cyan);
  text-transform: uppercase;
}

.muted { color: var(--text-muted); }
.tax-hint.tax-ok { color: var(--ok); }
.tax-hint.tax-warn { color: var(--warn); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.8rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem;
  padding: 0.42rem 0.85rem;
  font-family: var(--font-body); font-size: 0.8rem; font-weight: 600;
  border-radius: 8px; border: none; cursor: pointer; text-decoration: none;
  transition: 0.15s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--cyan), var(--cyan-dim));
  color: var(--btn-primary-fg);
  box-shadow: 0 0 14px var(--cyan-glow);
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-secondary {
  background: transparent; color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--cyan); color: var(--cyan); background: var(--cyan-soft); }
.btn-danger {
  background: rgba(255, 80, 80, 0.1); color: #ffb4b4;
  border: 1px solid rgba(255, 80, 80, 0.32);
}
.btn-sm { padding: 0.22rem 0.55rem; font-size: 0.72rem; }
.pw-wrap { position: relative; display: flex; align-items: center; }
.pw-wrap input { width: 100%; padding-right: 2.1rem; }
.pw-toggle {
  position: absolute; right: 0.25rem; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; color: var(--text-muted);
  width: 32px; height: 32px; display: grid; place-items: center;
  cursor: pointer; border-radius: 6px;
}
.pw-toggle:hover, .pw-toggle.on { color: var(--cyan); background: var(--cyan-soft); }

.login-wrap {
  position: relative; z-index: 1;
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 1rem;
}
.login-chrome {
  position: absolute; top: 0.75rem; right: 0.9rem; z-index: 3;
  display: flex; align-items: center; gap: 0.55rem;
}
.login-card {
  position: relative; z-index: 2;
  width: min(380px, 100%);
  background: var(--modal-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.4rem 1.25rem 1.15rem;
  box-shadow: var(--shadow);
  text-align: center;
}
.login-logo {
  width: 168px; height: 168px; border-radius: 28px; object-fit: cover;
  filter: drop-shadow(0 0 22px var(--cyan-glow));
  margin-bottom: 0.55rem;
}
.login-stage {
  position: absolute; inset: 0; z-index: 0; overflow: hidden;
  color: var(--cyan); pointer-events: none;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 48%, transparent 18%, black 58%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 48%, transparent 18%, black 58%);
}
.login-stage svg { width: 100%; height: 100%; display: block; }
.login-stage .ls-lab {
  fill: currentColor; stroke: none;
  font-family: var(--font-display), system-ui, sans-serif;
  font-size: 13px; letter-spacing: .16em; opacity: .72;
}
.login-stage .ls-tiny {
  fill: currentColor; stroke: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px; letter-spacing: .04em; opacity: .7;
}
.login-stage .ls-land { fill: var(--cyan-soft); }
.login-stage .ls-node, .login-stage .ls-pop, .login-stage .ls-pkt { fill: currentColor; stroke: none; }
.login-stage .ls-pkt { filter: url(#ls-glow); }
.login-stage .ls-block { stroke-width: 1.1; fill: var(--cyan-soft); }
.login-stage .ls-cable {
  stroke: currentColor; stroke-width: 2.4; opacity: .28;
}
.login-stage .ls-pulse {
  stroke: url(#ls-fiber); stroke-width: 2.6;
  stroke-dasharray: 28 420; stroke-linecap: round;
  animation: ls-flow 4.8s linear infinite;
}
.login-stage .ls-wave {
  transform-origin: 0 10px;
  animation: ls-radio 3.6s ease-out infinite;
}
.login-stage .ls-ring {
  transform-box: fill-box; transform-origin: center;
  animation: ls-radio 4.2s ease-out infinite;
}
.login-stage .ls-wavef {
  animation: ls-voice 2.4s ease-in-out infinite;
}
.login-stage .ls-node, .login-stage .ls-pop, .login-stage .ls-ok {
  animation: ls-blink 2.8s ease-in-out infinite;
}
.login-stage .ls-dns {
  transform-box: fill-box; transform-origin: center;
  animation: ls-radio 3.2s ease-out infinite;
}
.login-stage .ls-d1 { animation-delay: .4s; }
.login-stage .ls-d2 { animation-delay: .9s; }
.login-stage .ls-d3 { animation-delay: 1.4s; }
.login-stage .ls-d4 { animation-delay: 1.9s; }
@keyframes ls-flow { to { stroke-dashoffset: -448; } }
@keyframes ls-radio {
  0% { opacity: .55; transform: scale(.55); }
  100% { opacity: 0; transform: scale(1.25); }
}
@keyframes ls-voice {
  0%, 100% { transform: translateY(0); opacity: .55; }
  50% { transform: translateY(-6px); opacity: 1; }
}
@keyframes ls-blink {
  0%, 100% { opacity: .45; }
  50% { opacity: 1; }
}
body:not(.is-login) .login-stage { display: none; }
@media (prefers-reduced-motion: reduce) {
  .login-stage * { animation: none !important; }
}
html[data-theme="light"] .login-stage { opacity: .72; }
html[data-theme="dark"] .login-card {
  background: linear-gradient(165deg, rgba(13,21,32,.9) 0%, rgba(10,16,24,.92) 100%);
  backdrop-filter: blur(16px);
}
html[data-theme="light"] .login-card {
  background: linear-gradient(165deg, rgba(255,255,255,.92) 0%, rgba(244,248,250,.94) 100%);
  backdrop-filter: blur(16px);
}
.login-card h1 {
  font-family: var(--font-display); letter-spacing: .04em;
  font-size: 1.05rem; margin: 0.2rem 0 0.25rem;
}
.login-card .muted { font-size: 0.82rem; }
.login-card form { text-align: left; margin-top: 0.85rem; }
.login-card .btn { width: 100%; margin-top: 0.2rem; }

.field { display: flex; flex-direction: column; gap: 0.22rem; margin-bottom: 0.55rem; }
.field span {
  font-size: 0.68rem; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted);
}
.field input, .field select, .field textarea {
  width: 100%; background: var(--input-bg);
  border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); font: inherit; font-size: 0.86rem; padding: 0.42rem 0.6rem; outline: none;
}
.field textarea { min-height: 64px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: #61A2D3; box-shadow: 0 0 0 2px rgba(97,162,211,.22);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.45rem; }

.form-status { margin: 0.15rem 0 0.45rem; padding: 0.45rem 0.6rem; border-radius: 8px; font-size: 0.8rem; }
.form-status.ok { background: rgba(0,200,120,.12); border: 1px solid rgba(0,200,120,.35); color: var(--ok); }
.form-status.err { background: rgba(255,80,80,.1); border: 1px solid rgba(255,80,80,.35); color: var(--err); }

#app { position: relative; z-index: 1; display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar); flex-shrink: 0;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 0.7rem 0.6rem;
  position: sticky; top: 0; height: 100vh;
}
.brand {
  display: flex; gap: 0.5rem; align-items: center;
  text-decoration: none; color: var(--text); padding: 0.15rem 0.3rem 0.7rem;
}
.sidebar .brand {
  flex-direction: column; align-items: center; text-align: center;
  gap: 0.5rem; padding: 0.35rem 0.2rem 0.9rem;
}
.brand img { width: 42px; height: 42px; border-radius: 10px; object-fit: cover; }
.sidebar .brand img {
  width: 108px; height: 108px; border-radius: 20px;
  box-shadow: 0 0 22px var(--cyan-glow);
}
.brand strong {
  display: block; font-family: var(--font-display); font-size: 0.72rem; letter-spacing: .1em;
}
.sidebar .brand strong { font-size: 0.86rem; letter-spacing: .12em; }
.brand small { color: var(--text-muted); font-size: 0.65rem; }
.portal-bar .brand img { width: 52px; height: 52px; border-radius: 12px; }
#nav { display: flex; flex-direction: column; gap: 0.08rem; }
#nav a, .nav-parent {
  color: var(--text-muted); text-decoration: none;
  font-family: var(--font-body); font-size: 0.82rem; font-weight: 500; line-height: 1.35;
  padding: 0.38rem 0.55rem; border-radius: 7px; transition: .12s;
  text-transform: uppercase; letter-spacing: .04em;
}
#nav a:hover, #nav a.active, .nav-parent:hover { color: var(--cyan); background: var(--cyan-soft); }
.nav-group { display: flex; flex-direction: column; }
.nav-parent {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; background: none; border: 0; cursor: pointer; text-align: left;
}
.nav-parent .chev { transition: transform .2s; opacity: .7; width: 12px; height: 12px; }
.nav-group.open .nav-parent .chev { transform: rotate(180deg); }
.nav-group.open .nav-parent { color: var(--cyan); }
.nav-sub {
  display: none; flex-direction: column; gap: 0.04rem;
  margin: 0.08rem 0 0.15rem 0.4rem;
  padding-left: 0.4rem;
  border-left: 1px solid var(--border);
}
.nav-group.open .nav-sub { display: flex; }
.nav-sub a { font-size: 0.82rem; font-weight: 500; padding: 0.38rem 0.55rem; }
.sidebar-foot { margin-top: auto; padding-top: 0.7rem; display: flex; flex-direction: column; gap: 0.3rem; }
.sidebar-foot .btn { width: 100%; }
.who { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 0.05rem; }

.main { flex: 1; min-width: 0; padding: 0.75rem 1rem 1.5rem; display: flex; flex-direction: column; }
.view { flex: 1; }
.site-footer {
  position: relative; z-index: 2;
  margin-top: 1.2rem;
  padding: 0.55rem 0 0.15rem;
  text-align: center;
  font-size: 0.68rem;
  letter-spacing: .06em;
  color: var(--text-muted);
}
.login-wrap .site-footer { position: relative; z-index: 2; margin-top: 1.1rem; }
#portal { position: relative; z-index: 1; min-height: 100vh; display: none; flex-direction: column; }
body.is-portal #portal { display: flex; }
#portal .site-footer { padding-bottom: 1rem; }
.topbar {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 0.7rem; margin-bottom: 0.75rem;
}
.topbar h2 {
  font-family: var(--font-display); font-size: 1.12rem; letter-spacing: .03em; font-weight: 700;
}
.topbar-right {
  display: flex; align-items: center; gap: 0.55rem; flex-wrap: wrap; justify-content: flex-end;
}
.topbar-clock {
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: .04em;
  color: var(--text-muted);
  text-align: right;
  text-transform: capitalize;
  line-height: 1.35;
  white-space: nowrap;
}
.theme-toggle {
  display: inline-flex; align-items: center; gap: 0.35rem;
  white-space: nowrap;
}
.theme-toggle svg { width: 14px; height: 14px; flex: none; }
html[data-theme="light"] .theme-ico-sun { display: none; }
html:not([data-theme="light"]) .theme-ico-moon { display: none; }
.topbar-actions { display: flex; gap: 0.35rem; flex-wrap: wrap; }

.grid-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.5rem; }
.stat, .card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.65rem 0.75rem 0.6rem; position: relative; overflow: hidden;
}
.stat::before, .card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent); opacity: .45;
}
.stat b { display: block; font-family: var(--font-display); font-size: 1.2rem; color: var(--cyan); margin-top: .08rem; line-height: 1.2; }
.stat span { color: var(--text-muted); font-size: 0.68rem; letter-spacing: .04em; text-transform: uppercase; }
.card h3 {
  font-family: var(--font-display); color: var(--text); text-transform: none; letter-spacing: .03em;
  font-size: 0.82rem; margin-bottom: 0.45rem; font-weight: 600;
}

.toolbar { display: flex; gap: 0.4rem; margin-bottom: 0.55rem; flex-wrap: wrap; }
.toolbar input, .toolbar select {
  background: var(--input-bg); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); padding: 0.38rem 0.55rem; min-width: 200px; font-size: 0.84rem;
}
button.th-sort {
  background: none; border: 0; padding: 0; margin: 0;
  color: inherit; font: inherit; font-weight: 600; cursor: pointer;
  letter-spacing: inherit; text-transform: inherit;
}
button.th-sort:hover { color: var(--cyan); }
button.th-sort.active { color: var(--cyan); }
.authlog-filters input { min-width: 140px; flex: 1 1 140px; }
.authlog-pager { margin-top: 0.55rem; margin-bottom: 0; align-items: center; }
.authlog-pager .btn { min-width: 2rem; }
.pop-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.7rem;
}
.pop-photo {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0,0,0,.25);
}
.pop-photo-open {
  display: block; width: 100%; padding: 0; border: 0; background: #000; cursor: pointer;
}
.pop-photo img { width: 100%; height: 140px; object-fit: cover; display: block; }
.pop-photo figcaption {
  display: flex; flex-direction: column; gap: 0.2rem;
  padding: 0.45rem 0.5rem 0.55rem; font-size: 0.78rem;
}
.pop-photo-actions { display: flex; gap: 0.3rem; margin-top: 0.25rem; flex-wrap: wrap; }

.table-wrap { overflow: auto; border: 1px solid var(--border); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
th, td { text-align: left; padding: 0.38rem 0.55rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
th {
  font-size: 0.65rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted);
  background: rgba(0,0,0,.03); font-weight: 600; position: sticky; top: 0;
}
tr:hover td { background: rgba(196,48,38,.05); }
td a { color: var(--cyan); text-decoration: none; }
td br + .muted, td br + .mono { font-size: 0.72rem; }
.empty { padding: 0.85rem; color: var(--text-muted); text-align: center; font-size: 0.82rem; }

.badge {
  display: inline-flex; align-items: center; padding: 0.04rem 0.4rem;
  border-radius: 999px; font-size: 0.66rem; font-weight: 600; letter-spacing: .03em;
  border: 1px solid var(--border); color: var(--text-muted); line-height: 1.4;
}
.badge.ok { color: var(--ok); border-color: rgba(0,200,120,.35); background: rgba(0,200,120,.1); }
.badge.warn { color: var(--warn); border-color: rgba(255,200,80,.35); background: rgba(255,200,80,.1); }
.badge.err { color: var(--err); border-color: rgba(255,80,80,.35); background: rgba(255,80,80,.1); }
.badge.info { color: var(--cyan); border-color: var(--border); background: var(--cyan-soft); }

.cust-map iframe {
  width: 100%; border: 0; border-radius: 8px;
  background: var(--map-bg); display: block;
}
.geo-suggest {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 90;
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 8px;
  max-height: 220px; overflow: auto; margin-top: 2px;
}
.geo-suggest-item {
  display: block; width: 100%; text-align: left; border: 0;
  background: transparent; color: var(--text); font: inherit;
  padding: 0.45rem 0.6rem; cursor: pointer;
}
.geo-suggest-item + .geo-suggest-item { border-top: 1px solid var(--border); }
.geo-suggest-item:hover { background: var(--cyan-soft); color: var(--cyan); }

.modal-overlay {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 3vh 0.8rem; overflow: auto;
  background: var(--overlay); backdrop-filter: blur(6px);
}
.modal-overlay[hidden] { display: none !important; }
.modal {
  position: relative; width: min(860px, 100%);
  background: var(--modal-bg);
  border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 1.05rem 1rem 0.9rem;
}
.modal h2 { font-family: var(--font-display); font-size: 0.98rem; letter-spacing: .03em; margin-bottom: 0.7rem; }
.modal-close {
  position: absolute; top: .35rem; right: .5rem; border: 0; background: none;
  color: var(--text-muted); font-size: 1.45rem; cursor: pointer; line-height: 1;
}
.modal-actions { display: flex; justify-content: flex-end; gap: .4rem; margin-top: .25rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 0.5rem; }
.span-2 { grid-column: 1 / -1; }

.modal.modal-nas {
  width: min(900px, 100%);
  max-height: calc(100vh - 1.6rem);
  overflow: auto;
  padding: 0.7rem 0.8rem 0.65rem;
}
.modal.modal-nas h2 { margin-bottom: 0.35rem; font-size: 1.05rem; }
.nas-snmp { display: flex; flex-direction: column; gap: 0.5rem; }
.nas-snmp-head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .7rem;
}
.nas-snmp-head strong { font-size: .92rem; }
.nas-snmp-descr {
  margin: 0; font-size: .74rem; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.nas-snmp-health {
  display: grid;
  grid-template-columns: minmax(150px, 190px) minmax(0, 1fr);
  gap: .5rem .75rem;
  align-items: center;
}
.nas-snmp-gauges {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .3rem;
}
.nas-snmp-gauges .gauge-card { padding: .3rem .2rem .32rem; }
.nas-snmp-gauges .gauge-card h3 { font-size: .62rem; margin-bottom: .08rem; }
.nas-snmp-gauges .gauge { width: 64px; height: 64px; }
.nas-snmp-gauges .gauge-center b { font-size: .78rem; }
.nas-snmp-gauges .gauge-foot { font-size: .62rem; margin-top: .12rem; }
.nas-snmp .section-tag { margin: 0 0 .28rem; }
.nas-snmp-if select {
  width: 100%; margin: .15rem 0 .35rem;
  background: var(--input-bg); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); font: inherit; font-size: .8rem;
  padding: .32rem .45rem;
}
.nas-snmp-if .traffic-tabs,
.nas-snmp-bgp-traf .traffic-tabs { margin: .35rem 0 .25rem; }
.nas-snmp-if #nas-if-p95 { margin: 0 0 .2rem; font-size: .72rem; }
.nas-snmp .traffic-svg { height: 112px; }
.nas-snmp .table-wrap { margin-top: .25rem; }
.nas-snmp table { font-size: .76rem; }
.nas-snmp th, .nas-snmp td { padding: .26rem .42rem; }
.nas-if-facts { margin-top: .15rem; }
@media (max-width: 720px) {
  .nas-snmp-health { grid-template-columns: 1fr; }
}
.modal.modal-inet {
  width: min(800px, 100%);
  padding: 0.85rem 0.9rem 0.75rem;
}
.modal.modal-inet h2 { margin-bottom: 0.45rem; }
.inet-form .section-tag { margin: .55rem 0 .28rem; }
.inet-form > .section-tag:first-child { margin-top: 0; }
.inet-form .field { margin-bottom: .32rem; }
.inet-form .form-grid { gap: 0 .45rem; }
.inet-form .fwa-box { margin-top: .55rem; }
.inet-form .fwa-box .check-field { margin: 0; }
.inet-form #inet-fwa-fields { margin-top: .4rem; }
.inet-form #inet-fwa-fields[hidden] { display: none !important; }
.snmp-ex-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) 5.5rem auto;
  gap: .35rem;
  align-items: center;
  margin-bottom: .3rem;
}
.snmp-ex-row input {
  width: 100%; background: var(--input-bg);
  border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); font: inherit; font-size: 0.82rem; padding: 0.35rem 0.5rem;
}
.inet-form .muted.span-2 { font-size: .75rem; }
.nas-chassis-wrap { position: relative; margin: 0; }
.nas-chassis { width: 100%; height: auto; max-height: 196px; display: block; overflow: visible; }
.nas-chassis-page .nas-chassis { max-height: 268px; }
.nas-ch-body { fill: #141c24; stroke: rgba(97,162,211,.35); stroke-width: 1.2; }
.nas-ch-brand {
  font-family: var(--font-display); font-size: 11px; letter-spacing: .18em;
  fill: var(--cyan); font-weight: 700;
}
.nas-ch-title { font-size: 13px; fill: var(--text); font-weight: 600; }
.nas-leds text { font-size: 9px; fill: var(--text-muted); }
.nas-led { fill: #3a4a55; }
.nas-led.ok { fill: #1ee36a; }
.nas-slot-body { fill: #1b252e; stroke: rgba(255,255,255,.08); stroke-width: 1; }
.nas-slot-lab { font-size: 10px; fill: var(--text-muted); }
.nas-port { cursor: pointer; }
.nas-port rect { stroke: #070b10; stroke-width: 1; }
.nas-port text { font-size: 10px; pointer-events: none; font-weight: 600; }
.nas-port-shut rect { fill: #f4f7f8; }
.nas-port-shut text { fill: #5b7380; }
.nas-port-unconnected rect { fill: #e23b3b; }
.nas-port-unconnected text { fill: #fff; }
.nas-port-idle rect { fill: #2f9e57; }
.nas-port-idle text { fill: #04140a; }
.nas-port-traffic rect { fill: #1ee36a; }
.nas-port-traffic text { fill: #04140a; }
.nas-port-unknown rect { fill: #3a4a55; }
.nas-port-unknown text { fill: #c5d5dc; }
.nas-port:hover rect { stroke: var(--cyan); stroke-width: 1.6; }
.nas-chassis-legend {
  display: flex; flex-wrap: wrap; gap: .25rem 0.7rem;
  margin: .28rem 0 0; font-size: .7rem; color: var(--text-muted);
}
.nas-chassis-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.nas-dot {
  width: .7rem; height: .7rem; border-radius: 2px; display: inline-block;
  border: 1px solid rgba(0,0,0,.25);
}
.nas-dot.shut { background: #f4f7f8; }
.nas-dot.unconnected { background: #e23b3b; }
.nas-dot.idle { background: #2f9e57; }
.nas-dot.traffic { background: #1ee36a; }
.nas-port-tip {
  position: absolute; z-index: 3; max-width: 280px;
  background: var(--bg-elevated); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px;
  padding: .4rem .55rem; font-size: .76rem; line-height: 1.35;
  pointer-events: none;
  box-shadow: var(--shadow);
}
html[data-theme="light"] .nas-ch-body { fill: #e8eef2; stroke: rgba(0,90,105,.22); }
html[data-theme="light"] .nas-slot-body { fill: #f4f8fa; stroke: rgba(0,90,105,.14); }
html[data-theme="light"] .nas-port rect { stroke: #c5d0d6; }

.modal.modal-vt {
  width: min(760px, 100%);
  padding: 0.85rem 0.9rem 0.75rem;
}
.modal.modal-vt h2 { margin-bottom: 0.45rem; }
.vt-form .field { margin-bottom: 0; }
.vt-form textarea { min-height: 44px; }
.vt-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 0.85fr));
  gap: 0.4rem 0.5rem;
}
.vt-hint { margin: 0.35rem 0 0.5rem; font-size: 0.75rem; line-height: 1.35; }
.vt-dests {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  margin-bottom: 0.5rem;
}
.vt-dest {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.45rem 0.55rem 0.4rem;
  background: var(--bg-elevated);
}
html[data-theme="light"] .vt-dest { background: #f4f8fa; }
.vt-dest-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.45rem;
  margin: 0 0 0.35rem;
}
.vt-dest-head strong { font-size: 0.86rem; }
.vt-dest-head span { font-size: 0.72rem; color: var(--text-muted); }
.vt-kinds {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.7rem;
}
.vt-radio {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  margin: 0;
  font-size: 0.84rem;
  cursor: pointer;
  color: var(--text);
  white-space: nowrap;
}
.vt-radio input { accent-color: var(--cyan); margin: 0; }
.vt-min {
  width: 5.6rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  font-size: 0.84rem;
  padding: 0.28rem 0.4rem;
  outline: none;
}
.vt-min:focus {
  border-color: #61A2D3;
  box-shadow: 0 0 0 2px rgba(97,162,211,.22);
}
.vt-opts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.9rem;
  margin: 0 0 0.5rem;
}
.vt-opts .check-field { margin: 0; }
.vt-opts .check-field input { margin-top: 0; }
.vt-form .modal-actions { margin-top: 0.45rem; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.kv { display: grid; grid-template-columns: 118px 1fr; gap: .18rem .55rem; font-size: .8rem; align-items: baseline; }
.kv b { color: var(--text-muted); font-weight: 500; }

.bar { height: 5px; background: var(--bar-track); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan-dim), var(--cyan)); }

.sys-board { margin-bottom: 0.65rem; }
.sys-services {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; margin-bottom: 0.5rem;
}
.nas-dash { margin: 0.5rem 0 0.65rem; }
.nas-dash .extra-ip-head h3 { margin-bottom: 0; }
.nas-dash .muted,
.nas-dash #mon-summary {
  font-family: var(--font-body);
  font-size: 0.7rem;
  line-height: 1.35;
}
.nas-dash-list { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.svc-status {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.55rem 0.65rem 0.5rem; display: flex; flex-direction: column; gap: 0.28rem;
}
.svc-status-top { display: flex; justify-content: space-between; align-items: center; gap: 0.4rem; }
.svc-status h3 { margin: 0; font-size: 0.78rem; }
.svc-status .meta { font-size: 0.7rem; color: var(--text-muted); line-height: 1.3; }
.svc-status .btn { align-self: flex-start; }
.dot {
  width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-right: 0.28rem;
  box-shadow: 0 0 6px currentColor;
}
.dot.ok { background: #4CBB17; color: #4CBB17; }
.dot.warn { background: #ffd36a; color: #ffd36a; }
.dot.err { background: #ff6b6b; color: #ff6b6b; }
.gauges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.gauge-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.5rem 0.55rem 0.45rem; text-align: center;
}
.gauge-card h3 { margin-bottom: 0.25rem; font-size: 0.75rem; }
.gauge { width: 86px; height: 86px; margin: 0 auto; position: relative; }
.gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge-bg { fill: none; stroke: var(--gauge-track); stroke-width: 3.4; }
.gauge-fg { fill: none; stroke: var(--cyan); stroke-width: 3.4; stroke-linecap: round;
  transition: stroke-dasharray .45s ease, stroke .3s ease; }
.gauge.ok .gauge-fg { stroke: #61A2D3; }
.gauge.warn .gauge-fg { stroke: #ffd36a; }
.gauge.err .gauge-fg { stroke: #ff6b6b; }
#g-cpu.ok .gauge-fg,
#g-mem.ok .gauge-fg,
#g-disk.ok .gauge-fg { stroke: #4CBB17; }
#g-cpu.warn .gauge-fg,
#g-mem.warn .gauge-fg,
#g-disk.warn .gauge-fg { stroke: #f5a623; }
#g-cpu.err .gauge-fg,
#g-mem.err .gauge-fg,
#g-disk.err .gauge-fg { stroke: #ff4d4d; }
#g-cpu.ok .gauge-center b,
#g-mem.ok .gauge-center b,
#g-disk.ok .gauge-center b { color: #4CBB17; }
#g-cpu.warn .gauge-center b,
#g-mem.warn .gauge-center b,
#g-disk.warn .gauge-center b { color: #f5a623; }
#g-cpu.err .gauge-center b,
#g-mem.err .gauge-center b,
#g-disk.err .gauge-center b { color: #ff4d4d; }
.gauge-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; pointer-events: none;
}
.gauge-center b {
  font-family: var(--font-display); font-size: 0.88rem; color: var(--text); letter-spacing: .02em;
}
.gauge-center small { color: var(--text-muted); font-size: 0.58rem; letter-spacing: .04em; text-transform: uppercase; }
.gauge-foot { margin-top: 0.25rem; font-size: 0.7rem; color: var(--text-muted); }

.traffic-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .3rem; flex-wrap: wrap; }
.traffic-head h3 { margin: 0; }
.traffic-tabs { display: flex; gap: .25rem; flex-wrap: wrap; }
.traffic-tabs .active { border-color: var(--cyan); color: var(--cyan); background: var(--cyan-soft); }
.traffic-svg { width: 100%; height: 140px; display: block; }
.chart-grid { stroke: rgba(97,162,211,.14); stroke-width: .6; }
.chart-tick { fill: var(--text-muted); font-size: 8px; text-anchor: end; }
.chart-xlabel { fill: var(--text-muted); font-size: 8px; text-anchor: middle; }
.chart-area-down { fill: rgba(97,162,211,.18); }
.chart-area-up { fill: rgba(196,48,38,.10); }
.chart-line-down { fill: none; stroke: #61A2D3; stroke-width: 1.4; }
.chart-line-up { fill: none; stroke: #C43026; stroke-width: 1.2; opacity: .85; }
.chart-legend { display: flex; gap: 0.85rem; font-size: .72rem; color: var(--text-muted); margin-top: .25rem; }
.chart-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: .28rem; vertical-align: -1px; }
.lg-down { background: #61A2D3; }
.lg-up { background: #C43026; }
.lg-p95 { background: #ffb020; }
.chart-p95 { stroke: #ffb020; stroke-width: 1; stroke-dasharray: 4 3; opacity: .9; }
.chart-p95-lab { fill: #ffb020; font-size: 8px; text-anchor: end; }

.voice-stats { margin: .15rem 0 .2rem; }
.voice-stats-tabs { display: flex; flex-wrap: wrap; gap: .28rem; margin: 0 0 .55rem; }
.voice-stats-tabs .active { border-color: var(--cyan); color: var(--cyan); background: var(--cyan-soft); }
.voice-stats-charts {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 0.75rem 1rem;
  align-items: center;
}
.voice-pie { width: 168px; height: 168px; display: block; }
.voice-pie-hole { fill: var(--bg-card); }
.modal .voice-pie-hole { fill: #0d1520; }
html[data-theme="light"] .modal .voice-pie-hole { fill: #ffffff; }
.voice-pie-n { fill: var(--text); font-size: 15px; font-weight: 700; }
.voice-pie-lab { fill: var(--text-muted); font-size: 8px; }
.voice-bars { display: flex; flex-direction: column; gap: .32rem; min-width: 0; }
.voice-bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(48px, 1fr) 3.2rem;
  gap: .4rem;
  align-items: center;
  font-size: .76rem;
}
.voice-bar-lab {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--text);
}
.voice-bar-track {
  height: 8px; background: var(--bar-track); border-radius: 99px; overflow: hidden;
}
.voice-bar-track > i { display: block; height: 100%; border-radius: 99px; }
.voice-bar-pct { text-align: right; color: var(--text-muted); font-variant-numeric: tabular-nums; }
@media (max-width: 720px) {
  .voice-stats-charts { grid-template-columns: 1fr; justify-items: center; }
  .voice-bars { width: 100%; }
}
.voice-month-calls { margin-top: .35rem; }
.voice-month-calls table { font-size: .76rem; }
.voice-month-calls th, .voice-month-calls td { padding: .26rem .42rem; }
.voice-month-calls td:nth-child(3) { white-space: normal; max-width: 16rem; }
.voice-dest-cell {
  display: inline-block; max-width: 16rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom;
}
.voice-month-pager { margin-top: .35rem; margin-bottom: 0; }
.voice-month-pager .btn { min-width: 2rem; padding: .18rem .45rem; }
.traffic-svc { margin-top: 0.55rem; padding-top: 0.5rem; border-top: 1px solid var(--border); }
.traffic-svc:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.traffic-svc-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; margin-bottom: .2rem; }
.traffic-svc-head h4 { margin: 0; font-size: .82rem; font-weight: 600; }

.inet-card { margin-top: .45rem; }
.inet-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .28rem .85rem;
}
.inet-fact { min-width: 0; display: flex; flex-direction: column; gap: .04rem; }
.inet-fact b {
  font-size: .62rem; letter-spacing: .05em; text-transform: uppercase;
  color: var(--text-muted); font-weight: 600;
}
.inet-fact span { font-size: .8rem; line-height: 1.3; }
.inet-mon { margin-top: .4rem; }
.fwa-box {
  margin-top: .5rem;
  padding: .4rem .5rem .45rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--cyan-soft);
}
.fwa-box .section-tag { margin: 0 0 .35rem; }
.fwa-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .28rem .75rem;
}
.fwa-meters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .45rem;
  margin-top: .55rem;
  align-items: stretch;
}
.fwa-meter {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: .45rem .3rem .5rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-elevated);
  min-width: 0;
}
.fwa-meter-lab {
  margin: 0 0 .3rem;
  width: 100%;
  min-height: 2.2em;
  font-size: .66rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  line-height: 1.1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.fwa-meter-ring {
  width: 78px;
  height: 78px;
  position: relative;
  flex: 0 0 78px;
}
.fwa-meter-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); display: block; }
.fwa-bg { fill: none; stroke: var(--gauge-track); stroke-width: 3.2; }
.fwa-fg { fill: none; stroke-width: 3.2; stroke-linecap: round; stroke: #94a3b8; }
.fwa-meter-val {
  margin: .32rem 0 0;
  min-height: 2.35em;
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.05;
  font-weight: 600;
}
.fwa-meter-val small {
  display: block;
  margin-top: .12rem;
  font-size: .62rem;
  font-family: var(--font);
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.fwa-meter.ok .fwa-fg { stroke: #4CBB17; }
.fwa-meter.warn .fwa-fg { stroke: #f5a623; }
.fwa-meter.err .fwa-fg { stroke: #ff4d4d; }
.fwa-meter.ok .fwa-meter-val { color: #4CBB17; }
.fwa-meter.warn .fwa-meter-val { color: #f5a623; }
.fwa-meter.err .fwa-meter-val { color: #ff4d4d; }
.fwa-meter[data-kind="sig"].ok .fwa-fg { stroke: #4CBB17; }
.fwa-meter[data-kind="q"].ok .fwa-fg { stroke: #4CBB17; }
.fwa-meter[data-kind="c"].ok .fwa-fg { stroke: #2ee6c6; }
.fwa-meter[data-kind="ccq"].ok .fwa-fg { stroke: #4fc3f7; }
@media (max-width: 720px) {
  .fwa-meters { grid-template-columns: 1fr 1fr; }
}
.pw-inline {
  display: inline-flex; align-items: center; gap: .28rem; min-width: 0;
}
.pw-inline .pw-toggle {
  position: static; width: 1.45rem; height: 1.45rem; flex-shrink: 0;
  padding: 0; display: inline-flex; align-items: center; justify-content: center;
}
@media (max-width: 640px) {
  .inet-facts, .fwa-grid { grid-template-columns: 1fr; }
}
.svc-block { border: 1px solid var(--border); border-radius: 8px; padding: 0.55rem 0.65rem; margin-top: 0.4rem; }
.svc-block:first-child { margin-top: 0; }
.extra-ip-row {
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.55rem;
  margin-top: 0.45rem;
}
button.linkish {
  background: none;
  border: 0;
  padding: 0;
  color: var(--cyan);
  cursor: pointer;
  font: inherit;
  text-align: left;
}
button.linkish:hover { text-decoration: underline; }
.extra-ip-head { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.extra-ip-head h3 { margin-bottom: 0; }
.prefix-host-row { margin-top: 0.25rem; }
.prefix-host-row .field span.mono { color: var(--cyan); }
.check-field {
  display: flex; align-items: flex-start; gap: 0.5rem;
  margin: 0.25rem 0 0.45rem; color: var(--text);
  font-size: 0.84rem;
}
.check-field input[type="checkbox"] { margin-top: 0.2rem; accent-color: var(--cyan); }
.ant-proto {
  display: grid;
  grid-template-columns: minmax(7.5rem, auto) minmax(0, 8.5rem);
  gap: .35rem .75rem;
  align-items: center;
  margin: .15rem 0 .45rem;
}
.ant-proto .check-field,
.ant-proto .field { margin: 0; }
#ant-brand-other-wrap[hidden] { display: none !important; }
.ant-access-actions { display: flex; flex-wrap: wrap; gap: .35rem; }
.card.pfx-ripe-ok,
html[data-theme="light"] .card.pfx-ripe-ok {
  border-color: #4CBB17;
  box-shadow: inset 4px 0 0 #4CBB17, var(--shadow);
}
.card.pfx-ripe-bad,
html[data-theme="light"] .card.pfx-ripe-bad {
  border-color: #C43026;
  box-shadow: inset 4px 0 0 #C43026, var(--shadow);
}
.ipam-asn-issues { margin: .55rem 0 0; padding-left: 1.1rem; }
.ipam-asn-issues li { margin: .28rem 0; }
.notify-emails { margin: 0.1rem 0 0.15rem; }
.notify-emails-list { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 0.4rem; }
.notify-email-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4rem;
  align-items: center;
}
.notify-email-row input {
  width: 100%;
}
.notify-email-row [data-del-notify-email] {
  min-width: 2rem;
  padding: 0.22rem 0.5rem;
  line-height: 1;
  font-size: 1rem;
}
.notify-emails-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}
.notify-emails-actions [data-notify-test-status] {
  margin: 0;
  width: 100%;
}
.nas-dash-list a.badge,
.nas-dash-list button.badge,
button.badge[data-nas-snmp] {
  text-decoration: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: .03em;
  line-height: 1.4;
}
.pre {
  background: var(--pre-bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 0.55rem; overflow: auto; font-size: 0.74rem; color: var(--pre-fg);
}

.ticket-chips { display: flex; gap: 0.3rem; flex-wrap: wrap; margin-bottom: 0.55rem; }
.ticket-chips .btn { font-size: 0.74rem; }
.ticket-subj { white-space: normal; max-width: 26rem; line-height: 1.35; }
td:has(.ticket-subj) { white-space: normal; }
.ticket-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 0.85rem;
  align-items: start;
}
.ticket-thread { display: flex; flex-direction: column; gap: 0.65rem; }
.ticket-msg {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  background: var(--bg-card);
}
.ticket-msg.operator { border-color: rgba(97, 162, 211, .45); }
.ticket-msg.customer { background: var(--cyan-soft); }
.ticket-msg.internal {
  border-style: dashed;
  opacity: .95;
  background: rgba(255, 211, 106, .06);
}
.ticket-msg.system {
  background: transparent;
  padding: 0.35rem 0.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.ticket-msg-head {
  display: flex; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap;
  font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.35rem;
}
.ticket-msg-head b { color: var(--text); font-weight: 600; }
.ticket-body { white-space: pre-wrap; word-break: break-word; font-size: 0.88rem; line-height: 1.5; }
.ticket-files { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }
.ticket-file {
  display: inline-flex; align-items: center; gap: 0.35rem;
  border: 1px solid var(--border); border-radius: 8px; padding: 0.2rem 0.45rem;
  font-size: 0.75rem; color: var(--cyan); text-decoration: none; background: var(--input-bg);
}
.ticket-file img { width: 42px; height: 42px; object-fit: cover; border-radius: 4px; }
.ticket-reply textarea { min-height: 110px; }
.ticket-side .kv { font-size: 0.82rem; }
.stat a { color: inherit; text-decoration: none; }
.stat a:hover b { color: var(--cyan-dim); }

@media (max-width: 980px) {
  .ticket-layout { grid-template-columns: 1fr; }
}

@media (max-width: 1100px) {
  .grid-stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 980px) {
  #app { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: relative; }
  #nav { flex-direction: row; flex-wrap: wrap; }
  .nav-group { width: 100%; }
  .split, .form-grid, .field-row, .vt-dests { grid-template-columns: 1fr; }
  .vt-grid { grid-template-columns: 1fr 1fr; }
  .vt-grid .vt-name { grid-column: 1 / -1; }
  .sys-services { grid-template-columns: 1fr 1fr; }
  .gauges, .grid-stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .sys-services, .gauges, .grid-stats, .vt-grid { grid-template-columns: 1fr; }
}

.netmap-box {
  margin-top: .4rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--map-bg);
}
.netmap-leaflet { height: 360px; width: 100%; background: var(--map-bg); }
.gmap-pin {
  position: absolute;
  transform: translate(-50%, -100%);
  cursor: pointer;
  pointer-events: auto;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.35));
}
.gmap-pin .net-router-pin,
.gmap-pin .net-bgp-circle { pointer-events: none; }
.netmap-legend {
  display: flex; flex-wrap: wrap; gap: .7rem 1rem;
  padding: .45rem .6rem; font-size: .78rem; color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.net-dot, .net-line {
  display: inline-block; margin-right: .35rem; vertical-align: middle;
}
.net-dot {
  width: .55rem; height: .55rem; border-radius: 50%;
  background: var(--text-muted);
}
.net-dot.online { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.net-line {
  width: 1.1rem; height: 3px; border-radius: 2px; background: var(--text-muted);
}
.net-line.up { background: #22c55e; box-shadow: 0 0 6px #22c55e; }
.net-line.down { background: #ef4444; box-shadow: 0 0 6px #ef4444; }
.net-router-pin {
  background: #101820; border: 1px solid var(--cyan);
  color: var(--text); border-radius: 8px; padding: .2rem .45rem;
  min-width: 110px; text-align: center; box-shadow: 0 0 12px var(--cyan-glow);
}
.net-router-pin b { display: block; font-size: .72rem; font-weight: 600; }
.net-router-pin span { display: block; font-size: .66rem; color: var(--text-muted); font-family: ui-monospace, monospace; }
.net-router-pin.online { border-color: #22c55e; }
.net-router-pin.offline { border-color: #ef4444; }
.net-router-pin.inet { border-color: #61A2D3; background: #0b1a28; box-shadow: 0 0 14px rgba(56, 189, 248, .45); }
.net-bgp-circle {
  width: 68px; height: 68px; border-radius: 50%;
  border: 3px solid #61A2D3; background: #071018;
  color: #f4f8fb; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1px;
  box-shadow: 0 0 16px rgba(56, 189, 248, .5);
  text-align: center;
}
.net-bgp-circle strong { font-size: 12px; letter-spacing: .04em; line-height: 1; }
.net-bgp-circle small { font-size: 8px; color: #61A2D3; max-width: 60px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.net-dot.inet { background: #61A2D3; box-shadow: 0 0 8px #61A2D3; }
.net-svg-node.inet circle { stroke: #61A2D3; fill: #0b1a28; }
.net-svg-globe { fill: #61A2D3; font-size: 16px; }
.net-router-icon { background: none !important; border: 0 !important; }
.netmap-svg { width: 100%; height: 340px; display: block; }
.net-svg-link { stroke-width: 3.5; fill: none; }
.net-svg-link.up { stroke: #22c55e; }
.net-svg-link.down { stroke: #ef4444; }
.net-svg-lab { fill: var(--text-muted); font-size: 10px; text-anchor: middle; }
.net-svg-node circle { fill: #101820; stroke: var(--cyan); stroke-width: 2; }
.net-svg-node.online circle { stroke: #22c55e; }
.net-svg-node.offline circle { stroke: #ef4444; }
.net-svg-node text { fill: var(--text); font-size: 11px; }
.net-svg-sub { fill: var(--text-muted) !important; font-size: 10px !important; }
.net-link-note { display: inline-block; margin-top: .2rem; font-size: .78rem; }
.net-link-note.up { color: #4CBB17; }
.net-link-note.down { color: #ffb4b4; }

.cov-verdict {
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  margin-bottom: 0.7rem;
  background: var(--bg-card);
}
.cov-verdict h3 {
  font-family: var(--font-display);
  font-size: 0.98rem;
  letter-spacing: .03em;
  margin-bottom: .25rem;
}
.cov-verdict p { color: var(--text-muted); font-size: .86rem; }
.cov-verdict.ok { border-color: rgba(0,200,120,.4); background: rgba(0,200,120,.08); }
.cov-verdict.ok h3 { color: var(--ok); }
.cov-verdict.err { border-color: rgba(255,80,80,.35); background: rgba(255,80,80,.08); }
.cov-verdict.err h3 { color: var(--err); }
.cov-verdict.warn { border-color: rgba(255,200,80,.35); background: rgba(255,200,80,.08); }
.cov-verdict.warn h3 { color: var(--warn); }
.cov-map {
  height: 380px; width: 100%;
  border-radius: 8px; background: var(--map-bg);
  border: 1px solid var(--border);
}
.cov-map-wide { height: 460px; }
.cov-pin {
  background: #101820; border: 1px solid var(--cyan);
  color: var(--text); border-radius: 8px; padding: .18rem .45rem;
  font-size: .72rem; font-weight: 600; text-align: center;
  box-shadow: 0 0 12px var(--cyan-glow); white-space: nowrap;
}
.cov-pin.ok { border-color: #4CBB17; color: var(--ok); }
.cov-pin.query { border-color: #ffd36a; color: var(--warn); background: #1a1408; }
.cov-techs { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0 0 .65rem; }
.cov-house {
  width: 48px; height: 48px; color: #ef4444;
  filter: drop-shadow(0 0 8px rgba(239, 68, 68, .65));
}
.cov-house.ok {
  color: #3dff9a;
  filter: drop-shadow(0 0 10px rgba(61, 255, 154, .75));
}
.cov-house svg { width: 48px; height: 48px; display: block; overflow: visible; }
.cov-house .roof { fill: currentColor; }
.cov-house .chimney { fill: currentColor; }
.cov-house .body { fill: currentColor; }
.cov-house .door, .cov-house .win { fill: #071018; }
.cov-tower {
  display: flex; align-items: flex-end; gap: .2rem;
  color: #3dff9a;
  filter: drop-shadow(0 0 8px rgba(61, 255, 154, .45));
}
.cov-tower svg { width: 28px; height: 34px; display: block; flex: none; }
.cov-tower .mast, .cov-tower .base, .cov-tower .arm, .cov-tower .wave {
  fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round;
}
.cov-tower .head { fill: currentColor; }
.cov-tower span {
  font-size: .62rem; font-weight: 600; color: var(--text);
  background: #101820; border: 1px solid rgba(61, 255, 154, .45);
  border-radius: 6px; padding: .12rem .35rem; white-space: nowrap;
  max-width: 140px; overflow: hidden; text-overflow: ellipsis;
}

/* Media Veneto — allineamento grafico a mediaveneto.it */
html { font-size: 16px; }

.bg-grid, .bg-glow, .login-stage { display: none !important; }

body.is-login { background: #071018; }
.login-wrap {
  background:
    linear-gradient(180deg, rgba(7, 16, 24, .25) 0%, rgba(7, 16, 24, .42) 42%, rgba(7, 16, 24, .72) 100%),
    url("../img/bg-business.jpg") center 78% / cover no-repeat;
}
body.is-login .site-footer { color: rgba(255, 255, 255, .78); }
body.is-login .login-chrome .topbar-clock { color: #fff; }
body.is-login .login-chrome .btn-secondary {
  background: rgba(0, 0, 0, .28);
  color: #fff;
  border-color: rgba(255, 255, 255, .35);
}
body.is-login .login-chrome .btn-secondary:hover {
  border-color: #fff;
  color: #fff;
  background: rgba(196, 48, 38, .85);
}

.login-card,
html[data-theme="light"] .login-card,
html[data-theme="dark"] .login-card {
  width: min(440px, 100%);
  background: #fff;
  color: #141414;
  border: 0;
  border-radius: 20px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
  backdrop-filter: none;
}
.login-logo {
  width: min(300px, 100%);
  height: auto;
  max-height: 84px;
  object-fit: contain;
  border-radius: 0;
  filter: none;
  background: transparent;
  margin-bottom: .85rem;
}
.login-card h1 {
  font-family: var(--font-body);
  letter-spacing: 0;
  font-size: 1.45rem;
  font-weight: 700;
  color: #141414;
}
.login-card .section-tag { color: #C43026; }
.login-card .muted { color: #5c5c5c; }
.login-card .field span { color: #333; text-transform: none; letter-spacing: 0; font-weight: 600; font-size: .8rem; }
.login-card .field input {
  background: #fff;
  color: #141414;
  border: 1px solid #ced4da;
  border-radius: 6px;
  padding: .55rem .7rem;
}
.login-card .login-tabs {
  background: #f3f3f3;
  border: 0;
  border-radius: 10px;
}
.login-card .login-tab { color: #555; text-transform: none; letter-spacing: 0; }
.login-card .login-tab.active { background: #C43026; color: #fff; }

.sidebar {
  background: #000;
  border-right: 0;
  width: var(--sidebar);
}
.sidebar .brand {
  color: #fff;
  padding-bottom: .7rem;
}
.sidebar .brand img,
.portal-bar .brand img {
  width: min(210px, 100%);
  height: auto;
  max-height: 56px;
  object-fit: contain;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
.sidebar .brand strong,
.portal-bar .brand strong { display: none; }
.sidebar .brand small,
.sidebar .who {
  color: rgba(255, 255, 255, .62);
  letter-spacing: .04em;
}
.sidebar #nav a,
.sidebar .nav-parent {
  color: rgba(255, 255, 255, .82);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  border-radius: 8px;
}
.sidebar #nav a:hover,
.sidebar .nav-parent:hover,
.sidebar .nav-group.open .nav-parent {
  color: #C43026;
  background: transparent;
}
.sidebar #nav a.active {
  color: #fff;
  background: #C43026;
}
.sidebar .nav-sub { border-left-color: rgba(255, 255, 255, .16); }
.sidebar .btn-secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, .28);
}
.sidebar .btn-secondary:hover {
  color: #fff;
  border-color: #C43026;
  background: rgba(196, 48, 38, .22);
}

.portal-bar {
  background: rgba(0, 0, 0, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 0;
  color: #fff;
  padding: .7rem 1.1rem;
}
.portal-bar .brand,
.portal-bar .who,
.portal-bar .topbar-clock,
.portal-bar .brand small { color: rgba(255, 255, 255, .82); }
.portal-bar .btn-secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, .28);
}
.portal-bar .btn-secondary:hover {
  color: #fff;
  border-color: #61A2D3;
  background: rgba(97, 162, 211, .2);
}
.portal-bar .btn-primary { background: #C43026; color: #fff; box-shadow: none; }
.portal-bar .badge.info {
  color: #fff;
  background: rgba(97, 162, 211, .25);
  border-color: transparent;
}

.btn { border-radius: 8px; font-weight: 600; }
.btn-primary {
  background: #C43026;
  color: #fff;
  box-shadow: none;
}
.btn-primary:hover { filter: brightness(.92); }
.btn-secondary:hover {
  border-color: #61A2D3;
  color: #61A2D3;
  background: rgba(97, 162, 211, .1);
}
.btn-danger {
  background: rgba(196, 48, 38, .08);
  color: #C43026;
  border: 1px solid rgba(196, 48, 38, .32);
}

.section-tag,
.topbar h2,
.modal h2,
.card h3,
.stat b,
.gauge-center b,
.topbar-clock,
.brand strong,
.cov-verdict h3 {
  font-family: var(--font-body);
  letter-spacing: 0;
}
.section-tag { letter-spacing: .08em; font-weight: 700; }
.topbar h2 { font-size: 1.35rem; font-weight: 700; }
.topbar { align-items: center; margin-bottom: 1rem; }

.stat, .card, .svc-status, .gauge-card {
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.stat::before, .card::before { display: none; }
html[data-theme="light"] .stat,
html[data-theme="light"] .card,
html[data-theme="light"] .svc-status,
html[data-theme="light"] .gauge-card,
html[data-theme="light"] .modal,
html[data-theme="light"] .ticket-msg {
  border: 1px solid rgba(0, 0, 0, .05);
}
.modal { border-radius: 20px; }
.stat b { color: #C43026; font-weight: 700; }

.field span {
  text-transform: none;
  letter-spacing: 0;
  font-size: .78rem;
  font-weight: 600;
}
.field input, .field select, .field textarea,
.toolbar input, .toolbar select {
  border-radius: 6px;
}
.field input:focus, .field select:focus, .field textarea:focus,
.vt-min:focus {
  border-color: #61A2D3;
  box-shadow: 0 0 0 3px rgba(97, 162, 211, .22);
}

.ipam-allocs { display: grid; gap: 0.8rem; }
.ipam-alloc .toolbar { margin: .15rem 0 .55rem; }
.ipam-alloc .toolbar input { flex: 1 1 12rem; min-width: 0; width: 100%; }
.ipam-alloc td { vertical-align: top; }
.ipam-alloc td.ip, .ipam-alloc td.act { white-space: nowrap; }
.ipam-alloc td.clip { white-space: normal; max-width: 16rem; overflow-wrap: anywhere; }
.ipam-alloc tbody tr:nth-child(even) td { background: rgba(127, 127, 127, .07); }
.ipam-alloc tbody tr:hover td { background: rgba(196, 48, 38, .08); }
.ipam-alloc-foot {
  display: flex; justify-content: space-between; align-items: center;
  gap: .5rem; flex-wrap: wrap; margin-top: .45rem;
}
.ipam-alloc-foot .muted { margin: 0; }
.ipam-alloc-foot .authlog-pager { margin-top: 0; }

.dns-browser .toolbar { margin: .15rem 0 .55rem; }
.dns-browser .toolbar input { flex: 1 1 12rem; min-width: 0; width: 100%; }
.dns-browser td { vertical-align: top; }
.dns-browser td .mono { overflow-wrap: anywhere; }
.dns-browser-foot {
  display: flex; justify-content: space-between; align-items: center;
  gap: .5rem; flex-wrap: wrap; margin-top: .45rem;
}
.dns-browser-foot .muted { margin: 0; }
.dns-browser-foot .authlog-pager { margin-top: 0; }

html[data-theme="light"] .table-wrap {
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, .06);
}
html[data-theme="light"] th { background: #fafafa; color: #666; }
td a { color: #C43026; }
td a:hover { color: #9e261f; }

.dot { box-shadow: none; }
.dot.ok { background: #4CBB17; color: #4CBB17; }
.dot.warn { background: #e0a100; color: #e0a100; }
.dot.err { background: #C43026; color: #C43026; }

.chart-line-down, .lg-down { stroke: #61A2D3; background: #61A2D3; }
.lg-down { stroke: none; }
.chart-line-up { stroke: #C43026; }
.lg-up { background: #C43026; }
html[data-theme="light"] .chart-grid { stroke: rgba(0, 0, 0, .08); }

html[data-theme="light"] .net-router-pin,
html[data-theme="light"] .cov-pin {
  background: #fff;
  color: #141414;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .18);
}
html[data-theme="light"] .net-svg-node circle { fill: #fff; }
.cov-house { filter: none; color: #C43026; }
.cov-house.ok { color: #4CBB17; filter: none; }
.net-link-note.up { color: #2f9e22; }
.net-link-note.down { color: #C43026; }

.site-footer { letter-spacing: .02em; font-size: .75rem; }

@media (max-width: 980px) {
  .sidebar .brand img, .portal-bar .brand img { width: 180px; max-height: 48px; }
  .sidebar #nav { flex-direction: column; align-items: stretch; }
  .sidebar #nav a, .sidebar .nav-parent { width: 100%; }
}
