:root {
  --bg: #edf2f7;
  --bg-soft: #f8fbff;
  --bg-elevated: #ffffff;
  --ink-strong: #13263a;
  --ink: #21384f;
  --muted: #5f7388;
  --line: #d4dfeb;
  --line-soft: #e7eef6;

  --brand: #0f6da8;
  --brand-strong: #0a4f7e;
  --brand-soft: #e6f4ff;

  --accent: #0c9b77;
  --warn: #d58d18;
  --danger: #ba3348;

  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 10px;

  --shadow-lg: 0 18px 45px rgba(15, 37, 60, 0.14);
  --shadow-md: 0 10px 24px rgba(15, 37, 60, 0.1);
  --shadow-sm: 0 4px 12px rgba(15, 37, 60, 0.07);
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  color: var(--ink);
  font-family: "Avenir Next", "Segoe UI", "Trebuchet MS", sans-serif;
  line-height: 1.45;
  background: linear-gradient(180deg, #f7f8fa 0%, #eef2f5 100%);
  background-attachment: fixed;
}

h1,
h2,
h3,
th {
  font-family: "Avenir Next", "Segoe UI Variable Display", "Segoe UI", sans-serif;
  letter-spacing: 0.01em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

a {
  color: inherit;
}

.auth-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.auth-card,
.card {
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-lg);
}

.auth-card {
  width: min(470px, 94vw);
  padding: 34px;
  position: relative;
  overflow: hidden;
  animation: enter-up 0.35s ease;
}

.auth-logo-block {
  display: flex;
  justify-content: center;
  margin: 0 0 14px;
}

.auth-logo {
  width: min(240px, 78%);
  height: auto;
  filter: drop-shadow(0 8px 20px rgba(31, 86, 146, 0.25));
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, var(--brand) 0%, #1e95d8 42%, var(--accent) 100%);
}

.auth-card h1 {
  margin: 0;
  font-size: 1.58rem;
  color: var(--ink-strong);
}

.auth-card p {
  margin: 10px 0 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

.auth-card small {
  display: block;
  margin-top: 14px;
  color: #73869a;
  font-size: 0.78rem;
}

.auth-inline-link {
  display: inline-flex;
  align-items: center;
  margin: 2px 0 6px;
  color: #0f6da8;
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
}

.auth-inline-link:hover {
  color: #0a4f7e;
  text-decoration: underline;
}

.auth-message {
  min-height: 20px;
  margin: 0;
  color: #2f5772;
  font-size: 0.88rem;
  font-weight: 700;
}

.auth-card form,
.grid-form {
  display: grid;
  gap: 10px;
}

.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrap input {
  padding-right: 44px;
}

.password-input-wrap .password-toggle {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px !important;
  min-width: 32px;
  min-height: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  box-shadow: none;
  font-size: 0.95rem;
  line-height: 1;
}

.password-input-wrap .password-toggle:hover {
  transform: translateY(-50%);
}

.password-input-wrap .password-toggle.is-visible {
  border-color: #8fc2e3;
  background: linear-gradient(180deg, #f4faff 0%, #e4f2ff 100%);
  color: #1d4f73;
}

.auth-actions {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

label {
  font-size: 0.84rem;
  font-weight: 700;
  color: #345067;
}

input,
select,
button,
textarea {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-strong);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input::placeholder,
select:invalid,
textarea::placeholder {
  color: #8ca1b7;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #6aa9d1;
  box-shadow: 0 0 0 4px rgba(15, 109, 168, 0.14);
  background: #fcfeff;
}

button {
  border: 0;
  border-radius: var(--radius-sm);
  min-height: 40px;
  padding: 10px 15px;
  background: linear-gradient(155deg, #1381c6 0%, var(--brand) 58%, var(--brand-strong) 100%);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.2s ease, filter 0.2s ease, background 0.2s ease;
  box-shadow: 0 8px 15px rgba(10, 79, 126, 0.23);
}

button:hover {
  transform: translateY(-1px);
  filter: saturate(1.03);
}

button:active {
  transform: translateY(0);
}

button.secondary {
  color: #22425d;
  border: 1px solid #c9d9e8;
  background: linear-gradient(180deg, #ffffff 0%, #edf4fb 100%);
  box-shadow: 0 3px 8px rgba(20, 48, 74, 0.08);
}

button.secondary:hover {
  background: linear-gradient(180deg, #ffffff 0%, #e6f0fa 100%);
}

button.secondary.is-active {
  color: #0b4f7c;
  border-color: #94bfdf;
  background: linear-gradient(180deg, #eef7ff 0%, #dceeff 100%);
  box-shadow: 0 4px 10px rgba(15, 93, 145, 0.16);
}

button:disabled,
button[disabled] {
  opacity: 0.54;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.auth-card button,
.grid-form button,
.auth-actions button,
#logoutBtn {
  width: 100%;
}

.auth-card .password-input-wrap .password-toggle {
  width: 32px !important;
}

.row-actions button,
.inline-actions button,
.section-header > button,
.router-history-tabs button {
  width: auto;
  min-height: 34px;
  padding: 7px 11px;
  font-size: 0.8rem;
  border-radius: 9px;
}

.error {
  min-height: 20px;
  margin: 0;
  color: var(--danger);
  font-size: 0.88rem;
  font-weight: 700;
}

.dashboard-body {
  min-height: 100vh;
}

.dashboard-shell {
  width: min(1820px, calc(100% - 24px));
  margin: 14px auto 18px;
  padding: 10px;
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  gap: 16px;
}

.sidebar-column {
  position: sticky;
  top: 12px;
  align-self: start;
  display: grid;
  gap: 10px;
}

.dashboard-shell .sidebar.card {
  padding: 24px 20px;
  display: grid;
  gap: 20px;
  color: var(--ink);
  border-color: #d7e3ef;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 18px 36px rgba(15, 37, 60, 0.08);
}

.eyebrow {
  margin: 0 0 7px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #9bc8e5;
  font-weight: 700;
}

.sidebar h1 {
  margin: 0;
  line-height: 1.06;
  font-size: 1.45rem;
  color: var(--ink-strong);
}

.welcome {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.sidebar-top-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 8px 2px;
}

.brand-logo {
  width: min(210px, 100%);
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 18px rgba(31, 86, 146, 0.18));
  transition: transform 0.24s ease, filter 0.24s ease;
  transform-origin: center;
}

.nav-grid {
  display: grid;
  gap: 9px;
}

.nav-link {
  text-decoration: none;
}

.nav-chip {
  display: block;
  padding: 10px 13px;
  border-radius: 12px;
  border: 1px solid #d5e2ef;
  background: linear-gradient(180deg, #ffffff 0%, #f5f8fc 100%);
  color: #24415b;
  font-weight: 600;
  transition: transform 0.16s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.2s ease;
}

.nav-chip:hover {
  transform: translateY(-1px);
  border-color: #b7d2e7;
  background: linear-gradient(180deg, #ffffff 0%, #eef6fc 100%);
  box-shadow: inset 0 0 0 1px rgba(175, 210, 233, 0.2);
}

body[data-page="dashboard"] .nav-link[href$="/dashboard"],
body[data-page="companies"] .nav-link[href$="/companies"],
body[data-page="users"] .nav-link[href$="/users"],
body[data-page="routers"] .nav-link[href$="/routers"],
body[data-page="routers-manage"] .nav-link[href$="/routers/manage"],
body[data-page="logs"] .nav-link[href$="/logs"],
body[data-page="releases"] .nav-link[href$="/releases"],
body[data-page="ops-health"] .nav-link[href$="/ops-health"] {
  border-color: #9fc5e1;
  background: linear-gradient(180deg, #eef7ff 0%, #dceeff 100%);
  color: #0e5f95;
  box-shadow: inset 0 0 0 1px rgba(175, 210, 233, 0.32), 0 4px 10px rgba(9, 45, 73, 0.12);
}

#logoutBtn {
  border: 1px solid #d5e2ef;
  background: linear-gradient(180deg, #ffffff 0%, #eff4fb 100%);
  color: #24415b;
  box-shadow: 0 8px 16px rgba(15, 37, 60, 0.08);
}

#logoutBtn:hover {
  background: linear-gradient(180deg, #ffffff 0%, #eaf2f8 100%);
}

body[data-page="dashboard"] {
  background:
    radial-gradient(920px 420px at -8% -6%, rgba(31, 144, 214, 0.08), transparent 60%),
    radial-gradient(760px 380px at 108% -2%, rgba(22, 165, 130, 0.05), transparent 60%),
    linear-gradient(180deg, #f8fbfe 0%, #eef3f8 100%);
}

body[data-page="dashboard"] .layout {
  gap: 18px;
}

body[data-page="dashboard"] .card {
  position: relative;
  overflow: hidden;
  border-color: #d3e1ec;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 251, 255, 0.98) 100%);
  box-shadow: 0 18px 36px rgba(9, 30, 48, 0.12);
}

body[data-page="dashboard"] .card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, rgba(32, 152, 220, 0.9) 0%, rgba(24, 172, 132, 0.9) 52%, rgba(223, 159, 38, 0.82) 100%);
}

body[data-page="dashboard"] .card::after {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  right: -120px;
  top: -160px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(151, 211, 245, 0.28) 0%, rgba(151, 211, 245, 0) 70%);
  pointer-events: none;
  opacity: 0.5;
}

body[data-page="dashboard"] .dashboard-hero-card {
  padding: 24px;
  background:
    radial-gradient(520px 260px at -6% -14%, rgba(83, 196, 255, 0.12), transparent 56%),
    radial-gradient(420px 220px at 108% -8%, rgba(74, 220, 188, 0.08), transparent 58%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  color: var(--ink-strong);
  border-color: #d6e3ef;
  box-shadow: 0 20px 40px rgba(15, 37, 60, 0.08);
}

body[data-page="dashboard"] .dashboard-hero-card::before {
  height: 4px;
  background: linear-gradient(90deg, rgba(51, 149, 220, 0.92) 0%, rgba(33, 173, 139, 0.88) 44%, rgba(243, 178, 67, 0.88) 100%);
}

body[data-page="dashboard"] .dashboard-hero-card::after {
  width: 380px;
  height: 380px;
  right: -120px;
  top: -190px;
  background: radial-gradient(circle, rgba(177, 226, 250, 0.16) 0%, rgba(177, 226, 250, 0) 72%);
  opacity: 0.8;
}

body[data-page="dashboard"] .dashboard-hero-card .eyebrow,
body[data-page="dashboard"] .dashboard-hero-card h2,
body[data-page="dashboard"] .dashboard-hero-card .muted-line,
body[data-page="dashboard"] .dashboard-hero-card h3,
body[data-page="dashboard"] .dashboard-hero-card small,
body[data-page="dashboard"] .dashboard-hero-card span,
body[data-page="dashboard"] .dashboard-hero-card strong,
body[data-page="dashboard"] .dashboard-hero-card p {
  color: inherit;
}

body[data-page="dashboard"] .dashboard-hero-top {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: 22px;
  margin-bottom: 18px;
  align-items: stretch;
}

body[data-page="dashboard"] .dashboard-hero-copy {
  display: grid;
  gap: 16px;
}

body[data-page="dashboard"] .dashboard-hero-copy h2 {
  margin: 0;
  max-width: 9ch;
  font-family: "Avenir Next", "Segoe UI Variable Display", "Segoe UI", sans-serif;
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

body[data-page="dashboard"] .dashboard-hero-copy .muted-line {
  margin: 0;
  max-width: 62ch;
  color: #5b748a;
  font-size: 1rem;
  line-height: 1.65;
}

body[data-page="dashboard"] .dashboard-hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

body[data-page="dashboard"] .dashboard-hero-links a.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid #c9dbe9;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f9fd 100%);
  color: #24415b;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 8px 16px rgba(15, 37, 60, 0.07);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

body[data-page="dashboard"] .dashboard-hero-links a.secondary:hover {
  transform: translateY(-1px);
  border-color: #a9cae2;
  background: linear-gradient(180deg, #ffffff 0%, #eef7ff 100%);
}

body[data-page="dashboard"] .dashboard-hero-links a.secondary.is-primary {
  border-color: #8dc0e3;
  background: linear-gradient(155deg, #2ca1e3 0%, #1588ca 62%, #1175b2 100%);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(16, 96, 150, 0.24);
}

body[data-page="dashboard"] .dashboard-hero-radar {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #d6e3ef;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96), 0 16px 30px rgba(7, 25, 39, 0.08);
}

body[data-page="dashboard"] .dashboard-hero-radar-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

body[data-page="dashboard"] .dashboard-hero-radar-kicker,
body[data-page="dashboard"] .dashboard-section-kicker {
  display: block;
  margin-bottom: 5px;
  color: #6a8497;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

body[data-page="dashboard"] .dashboard-section-kicker {
  color: #67859a;
}

body[data-page="dashboard"] .dashboard-hero-radar-head strong {
  display: block;
  font-family: "Avenir Next", "Segoe UI Variable Display", "Segoe UI", sans-serif;
  font-size: 1.16rem;
  line-height: 1.1;
  color: #13263a;
}

body[data-page="dashboard"] .dashboard-hero-radar .muted-line {
  margin: 0;
  color: #5b748a;
}

body[data-page="dashboard"] .dashboard-hero-radar-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

body[data-page="dashboard"] .dashboard-hero-radar-item {
  padding: 14px 15px;
  border: 1px solid #d7e4ef;
  border-radius: 18px;
  background:
    radial-gradient(220px 120px at 100% -20%, rgba(170, 218, 244, 0.14), transparent 72%),
    linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

body[data-page="dashboard"] .dashboard-hero-radar-item span,
body[data-page="dashboard"] .dashboard-summary-grid .dashboard-kpi-card small {
  color: #6b8397;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body[data-page="dashboard"] .dashboard-hero-radar-item strong {
  display: block;
  margin-top: 10px;
  font-size: 1.16rem;
  line-height: 1.2;
  color: #16324b;
}

body[data-page="dashboard"] .dashboard-hero-card .pill {
  border-color: #d3e0ea;
  background: linear-gradient(180deg, #ffffff 0%, #f2f7fb 100%);
  color: #1f3448;
}

body[data-page="dashboard"] .dashboard-hero-card .pill.is-ok {
  background: rgba(39, 187, 118, 0.12);
  border-color: rgba(107, 229, 170, 0.26);
  color: #17784f;
}

body[data-page="dashboard"] .dashboard-hero-card .pill.is-warn {
  background: rgba(219, 163, 58, 0.12);
  border-color: rgba(255, 210, 131, 0.26);
  color: #8c5e10;
}

body[data-page="dashboard"] .dashboard-hero-card .pill.is-danger {
  background: rgba(218, 94, 76, 0.12);
  border-color: rgba(248, 156, 143, 0.3);
  color: #9f3145;
}

body[data-page="dashboard"] .dashboard-summary-grid {
  position: relative;
  z-index: 1;
  margin-top: 4px;
}

body[data-page="dashboard"] .dashboard-summary-grid .dashboard-kpi-card {
  min-height: 132px;
  align-items: flex-start;
  text-align: left;
  border-color: #d7e4ef;
  background:
    radial-gradient(240px 140px at 108% -8%, rgba(170, 218, 244, 0.14) 0%, transparent 62%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 10px 18px rgba(15, 37, 60, 0.08);
}

body[data-page="dashboard"] .dashboard-summary-grid .dashboard-kpi-card p {
  color: #6a8195;
}

body[data-page="dashboard"] .dashboard-summary-grid .dashboard-kpi-card strong {
  color: #16324b;
  text-align: left;
  font-size: 2rem;
}

body[data-page="dashboard"] .dashboard-summary-grid .dashboard-kpi-card small {
  display: block;
  margin-top: auto;
  color: #6a8195;
}

body[data-page="dashboard"] .dashboard-summary-grid .dashboard-kpi-card.is-offline strong {
  color: #b23b4d;
}

body[data-page="dashboard"] .dashboard-focus-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(460px, 1.08fr);
  gap: 18px;
  align-items: start;
}

body[data-page="dashboard"] .dashboard-profile-rail {
  display: grid;
  gap: 8px;
  max-width: 720px;
}

body[data-page="dashboard"] #dashboardProfileSummary {
  margin: 0;
  max-width: 720px;
}

body[data-page="dashboard"] .dashboard-turn-card {
  background:
    radial-gradient(340px 200px at 100% -18%, rgba(160, 216, 243, 0.22), transparent 72%),
    linear-gradient(180deg, #fbfdff 0%, #f2f8fd 100%);
}

body[data-page="dashboard"] .dashboard-turn-trend-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

body[data-page="dashboard"] .dashboard-turn-trend-card {
  display: grid;
  gap: 10px;
  min-height: 142px;
  padding: 16px;
  border: 1px solid #d5e5f1;
  border-radius: 20px;
  background:
    radial-gradient(220px 120px at 100% -20%, rgba(170, 218, 244, 0.2), transparent 72%),
    linear-gradient(180deg, #ffffff 0%, #f6fbff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 12px 20px rgba(14, 43, 67, 0.08);
}

body[data-page="dashboard"] .dashboard-turn-trend-card.is-ok {
  border-color: rgba(88, 189, 137, 0.26);
}

body[data-page="dashboard"] .dashboard-turn-trend-card.is-warn {
  border-color: rgba(223, 180, 93, 0.32);
}

body[data-page="dashboard"] .dashboard-turn-trend-card.is-danger {
  border-color: rgba(220, 106, 85, 0.28);
}

body[data-page="dashboard"] .dashboard-turn-trend-card span {
  color: #66849a;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

body[data-page="dashboard"] .dashboard-turn-trend-card strong {
  color: #16324b;
  font-size: 2rem;
  line-height: 1.05;
}

body[data-page="dashboard"] .dashboard-turn-trend-card small {
  color: #5a7990;
  line-height: 1.5;
}

body[data-page="dashboard"] .dashboard-turn-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

body[data-page="dashboard"] .dashboard-turn-lane {
  display: grid;
  gap: 12px;
  min-height: 100%;
  padding: 16px;
  border: 1px solid #d6e5f0;
  border-radius: 20px;
  background:
    radial-gradient(220px 120px at 100% -20%, rgba(166, 214, 243, 0.16), transparent 72%),
    linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 10px 18px rgba(15, 45, 67, 0.06);
}

body[data-page="dashboard"] .dashboard-turn-lane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

body[data-page="dashboard"] .dashboard-turn-lane-head h3 {
  margin: 0;
  color: #18354e;
  font-size: 0.98rem;
}

body[data-page="dashboard"] .dashboard-turn-list,
body[data-page="dashboard"] .dashboard-turn-drilldown-list {
  display: grid;
  gap: 10px;
}

body[data-page="dashboard"] .dashboard-turn-drilldown-list a.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid #cadcea;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #edf5fb 100%);
  color: #21435f;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 8px 14px rgba(18, 47, 72, 0.08);
}

body[data-page="dashboard"] .dashboard-turn-drilldown-list a.secondary.is-primary {
  border-color: #a8cae5;
  background: linear-gradient(180deg, #eef8ff 0%, #dceeff 100%);
  color: #0d5483;
}

body[data-page="dashboard"] .dashboard-turn-list-item {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid #d7e6f2;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(246, 251, 255, 0.96) 100%);
}

body[data-page="dashboard"] .dashboard-turn-list-item.is-ok {
  border-color: rgba(88, 189, 137, 0.26);
}

body[data-page="dashboard"] .dashboard-turn-list-item.is-warn {
  border-color: rgba(223, 180, 93, 0.32);
}

body[data-page="dashboard"] .dashboard-turn-list-item.is-danger {
  border-color: rgba(220, 106, 85, 0.28);
}

body[data-page="dashboard"] .dashboard-turn-list-item.is-empty {
  min-height: 124px;
  align-content: center;
}

body[data-page="dashboard"] .dashboard-turn-list-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

body[data-page="dashboard"] .dashboard-turn-list-item strong {
  color: #16324b;
}

body[data-page="dashboard"] .dashboard-turn-list-item p,
body[data-page="dashboard"] .dashboard-turn-list-item small {
  margin: 0;
  color: #56748b;
  line-height: 1.45;
}

body[data-page="dashboard"] .dashboard-turn-inline-link {
  color: #1d5c84;
  font-weight: 700;
  text-decoration: none;
}

body[data-page="dashboard"] .dashboard-turn-inline-link:hover {
  text-decoration: underline;
}

body[data-page="dashboard"] .dashboard-pulse-card {
  background:
    radial-gradient(340px 180px at 100% -20%, rgba(165, 220, 246, 0.22), transparent 72%),
    linear-gradient(180deg, #fbfdff 0%, #f2f8fd 100%);
}

body[data-page="dashboard"] .dashboard-signal-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

body[data-page="dashboard"] .dashboard-signal-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid #d4e3ef;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #f3f8fd 100%);
  color: #456278;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

body[data-page="dashboard"] .dashboard-signal-chip.is-ok {
  border-color: rgba(64, 179, 124, 0.28);
  background: rgba(64, 179, 124, 0.1);
  color: #156345;
}

body[data-page="dashboard"] .dashboard-signal-chip.is-warn {
  border-color: rgba(207, 157, 52, 0.28);
  background: rgba(220, 170, 72, 0.12);
  color: #8b5d12;
}

body[data-page="dashboard"] .dashboard-signal-chip.is-danger {
  border-color: rgba(216, 101, 79, 0.26);
  background: rgba(226, 114, 93, 0.12);
  color: #8f2e24;
}

body[data-page="dashboard"] .dashboard-pulse-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

body[data-page="dashboard"] .dashboard-pulse-item {
  display: grid;
  gap: 8px;
  min-height: 154px;
  padding: 16px;
  border: 1px solid #d7e5f1;
  border-radius: 20px;
  background:
    radial-gradient(220px 120px at 100% -26%, rgba(168, 215, 241, 0.2), transparent 72%),
    linear-gradient(180deg, #ffffff 0%, #f6fbff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 12px 22px rgba(12, 39, 62, 0.08);
}

body[data-page="dashboard"] .dashboard-pulse-item.is-ok {
  border-color: rgba(88, 189, 137, 0.28);
}

body[data-page="dashboard"] .dashboard-pulse-item.is-warn {
  border-color: rgba(223, 180, 93, 0.32);
}

body[data-page="dashboard"] .dashboard-pulse-item.is-danger {
  border-color: rgba(220, 106, 85, 0.28);
}

body[data-page="dashboard"] .dashboard-pulse-item.is-empty {
  grid-column: 1 / -1;
}

body[data-page="dashboard"] .dashboard-pulse-item-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

body[data-page="dashboard"] .dashboard-pulse-kind,
body[data-page="dashboard"] .dashboard-pulse-time {
  color: #67859a;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body[data-page="dashboard"] .dashboard-pulse-item strong {
  color: #15314a;
  font-size: 1rem;
  line-height: 1.3;
}

body[data-page="dashboard"] .dashboard-pulse-item p {
  margin: 0;
  color: #49667f;
  line-height: 1.55;
}

body[data-page="dashboard"] .dashboard-pulse-item small {
  color: #63829a;
  line-height: 1.45;
}

body[data-page="dashboard"] .dashboard-slo-card,
body[data-page="dashboard"] .dashboard-map-card {
  min-height: 100%;
}

body[data-page="dashboard"] .dashboard-slo-card {
  background:
    radial-gradient(320px 160px at 100% -24%, rgba(173, 221, 246, 0.26), transparent 72%),
    linear-gradient(180deg, #fbfdff 0%, #f2f8fd 100%);
}

body[data-page="dashboard"] .dashboard-slo-grid .dashboard-kpi-card {
  border-color: #d7e5f1;
  background:
    radial-gradient(240px 120px at 100% -20%, rgba(161, 211, 242, 0.18), transparent 72%),
    linear-gradient(180deg, #ffffff 0%, #f5faff 100%);
}

body[data-page="dashboard"] .dashboard-map-card {
  background:
    radial-gradient(320px 180px at 0% -18%, rgba(165, 219, 248, 0.24), transparent 72%),
    linear-gradient(180deg, #fbfdff 0%, #f1f8fd 100%);
}

body[data-page="dashboard"] .dashboard-map-card .section-header,
body[data-page="dashboard"] .dashboard-slo-card .section-header {
  position: relative;
  z-index: 1;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #d6e4ef;
  align-items: flex-start;
}

body[data-page="dashboard"] .dashboard-map-card .section-header .muted-line,
body[data-page="dashboard"] .dashboard-slo-card .section-header .muted-line {
  margin: 0;
}

body[data-page="dashboard"] .dashboard-map-frame {
  min-height: 390px;
  border-color: #d4e3ef;
  border-radius: 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 12px 20px rgba(10, 38, 58, 0.08);
}

body[data-page="dashboard"] .dashboard-map-empty {
  color: #53708a;
}

body[data-page="dashboard"] .dashboard-map-legend {
  position: relative;
  z-index: 1;
  margin-top: 14px;
}

.layout {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.card {
  padding: 18px;
  animation: enter-up 0.28s ease;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(249, 253, 255, 0.97) 100%);
}

.card h2 {
  margin: 0 0 10px;
  color: var(--ink-strong);
  font-size: 1.18rem;
}

.stats-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid #dbe7f2;
  padding: 14px;
  background:
    radial-gradient(220px 120px at 110% 0%, rgba(35, 147, 218, 0.12) 0%, transparent 55%),
    linear-gradient(165deg, #ffffff 0%, #f4f9ff 76%, #eef6ff 100%);
}

.stat-card::after {
  content: "";
  position: absolute;
  inset: auto auto 0 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, rgba(15, 109, 168, 0.2), rgba(12, 155, 119, 0.58));
}

.stat-card p {
  margin: 0 0 8px;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.73rem;
  letter-spacing: 0.07em;
  font-weight: 700;
}

.stat-card strong {
  color: var(--ink-strong);
  font-size: 1.75rem;
  line-height: 1;
  letter-spacing: -0.02em;
}

#summarySection .stats-grid .stat-card {
  min-height: 118px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 6px;
}

#summarySection .stats-grid .stat-card p {
  margin: 0;
}

#summarySection .stats-grid .stat-card strong {
  display: block;
  width: 100%;
  text-align: center;
}

#summarySection .stats-grid .dashboard-kpi-card {
  --kpi-accent: 15, 109, 168;
  border-color: #d4e5f3;
  background:
    radial-gradient(240px 140px at 108% -8%, rgba(var(--kpi-accent), 0.14) 0%, transparent 60%),
    linear-gradient(162deg, #ffffff 0%, #f4f9ff 78%, #edf6ff 100%);
  transition: transform 0.2s ease, box-shadow 0.24s ease, border-color 0.22s ease, background 0.24s ease;
}

#summarySection .stats-grid .dashboard-kpi-card p,
#summarySection .stats-grid .dashboard-kpi-card strong {
  transition: color 0.24s ease, text-shadow 0.24s ease;
}

#summarySection .stats-grid .dashboard-kpi-card.kpi-companies {
  --kpi-accent: 29, 143, 220;
}

#summarySection .stats-grid .dashboard-kpi-card.kpi-users {
  --kpi-accent: 10, 133, 116;
}

#summarySection .stats-grid .dashboard-kpi-card.kpi-routers {
  --kpi-accent: 44, 118, 212;
}

#summarySection .stats-grid .dashboard-kpi-card.kpi-offline {
  --kpi-accent: 186, 51, 72;
}

#summarySection .stats-grid .dashboard-kpi-card.is-offline strong {
  color: #a92a3f;
}

@media (hover: hover) and (pointer: fine) {
  .sidebar-top-logo:hover .brand-logo {
    transform: translateY(-2px) scale(1.03);
    filter: drop-shadow(0 14px 30px rgba(8, 24, 42, 0.62)) saturate(1.08);
  }

  #summarySection .stats-grid .dashboard-kpi-card:hover {
    transform: translateY(-4px);
    border-color: rgba(var(--kpi-accent), 0.44);
    box-shadow: 0 14px 28px rgba(var(--kpi-accent), 0.22);
    background:
      radial-gradient(250px 150px at 108% -8%, rgba(var(--kpi-accent), 0.24) 0%, transparent 62%),
      linear-gradient(162deg, #ffffff 0%, #f2f9ff 78%, #ebf4ff 100%);
  }

  #summarySection .stats-grid .dashboard-kpi-card:hover p {
    color: #36566f;
  }

  #summarySection .stats-grid .dashboard-kpi-card:hover strong {
    color: #103d64;
    text-shadow: 0 8px 18px rgba(var(--kpi-accent), 0.24);
  }

  #summarySection .stats-grid .dashboard-kpi-card.is-offline:hover strong {
    color: #b12f44;
    text-shadow: 0 8px 18px rgba(186, 51, 72, 0.28);
  }
}

body[data-page="dashboard"] #summarySection .dashboard-summary-grid .dashboard-kpi-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  text-align: left;
  gap: 8px;
  border-color: #d7e4ef;
  background:
    radial-gradient(240px 140px at 108% -8%, rgba(170, 218, 244, 0.14) 0%, transparent 62%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 14px 24px rgba(7, 24, 38, 0.08);
}

body[data-page="dashboard"] #summarySection .dashboard-summary-grid .dashboard-kpi-card p {
  margin: 0;
  color: #6a8195;
}

body[data-page="dashboard"] #summarySection .dashboard-summary-grid .dashboard-kpi-card strong {
  display: block;
  width: auto;
  text-align: left;
  color: #16324b;
  font-size: 2rem;
}

body[data-page="dashboard"] #summarySection .dashboard-summary-grid .dashboard-kpi-card small {
  display: block;
  margin-top: auto;
  color: #6a8195;
}

body[data-page="dashboard"] #summarySection .dashboard-summary-grid .dashboard-kpi-card.is-offline strong {
  color: #b23b4d;
}

@media (hover: hover) and (pointer: fine) {
  body[data-page="dashboard"] #summarySection .dashboard-summary-grid .dashboard-kpi-card:hover {
    transform: translateY(-4px);
    border-color: #b8d8ec;
    box-shadow: 0 16px 28px rgba(10, 35, 54, 0.12);
    background:
      radial-gradient(250px 150px at 108% -8%, rgba(170, 218, 244, 0.18) 0%, transparent 62%),
      linear-gradient(180deg, #ffffff 0%, #f4f9fd 100%);
  }

  body[data-page="dashboard"] #summarySection .dashboard-summary-grid .dashboard-kpi-card:hover p {
    color: #4f7188;
  }

  body[data-page="dashboard"] #summarySection .dashboard-summary-grid .dashboard-kpi-card:hover strong {
    color: #103d64;
    text-shadow: 0 10px 22px rgba(31, 138, 203, 0.12);
  }

  body[data-page="dashboard"] #summarySection .dashboard-summary-grid .dashboard-kpi-card.is-offline:hover strong {
    color: #b23b4d;
    text-shadow: 0 10px 22px rgba(186, 51, 72, 0.14);
  }
}

.dashboard-map-card {
  overflow: hidden;
}

.dashboard-slo-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-slo-card .stat-card {
  min-height: 110px;
  display: grid;
  align-content: center;
}

.dashboard-map-card .section-header {
  margin-bottom: 12px;
}

.dashboard-map-card .section-header .muted-line {
  margin: 0;
}

.dashboard-map-frame {
  position: relative;
  min-height: 360px;
  border: 1px solid #d8e7f3;
  border-radius: 14px;
  overflow: hidden;
  background:
    radial-gradient(360px 200px at -14% -22%, rgba(29, 140, 210, 0.14), transparent 66%),
    linear-gradient(180deg, #f9fcff 0%, #eff6fd 100%);
}

.dashboard-routers-map {
  height: 420px;
  width: 100%;
}

.dashboard-map-empty {
  min-height: 360px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 28px;
  color: #4f6a82;
  font-weight: 600;
}

.dashboard-map-legend {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.dashboard-map-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #38556e;
  font-size: 0.82rem;
  font-weight: 700;
}

.dashboard-map-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.72), 0 0 0 3px rgba(40, 67, 92, 0.15);
}

.dashboard-map-dot.is-online {
  background: #0f8a63;
}

.dashboard-map-dot.is-offline {
  background: #ba3348;
}

.dashboard-map-dot.is-unknown {
  background: #c1891e;
}

.dashboard-router-marker-icon {
  background: transparent !important;
  border: 0 !important;
}

.dashboard-router-marker {
  width: 36px;
  height: 44px;
  filter: drop-shadow(0 5px 8px rgba(10, 38, 60, 0.32));
  transform: translateY(-1px);
}

.dashboard-router-marker svg {
  width: 100%;
  height: 100%;
  display: block;
}

.dashboard-router-cluster-marker {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 2px solid rgba(255, 255, 255, 0.84);
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.34), transparent 40%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, var(--router-cluster-color) 100%);
  box-shadow: 0 12px 18px rgba(11, 41, 64, 0.2);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.92rem;
}

.dashboard-map-popup-cluster ul {
  margin: 4px 0 0;
  padding-left: 16px;
  display: grid;
  gap: 6px;
}

.dashboard-map-popup-cluster li {
  display: grid;
  gap: 2px;
}

.dashboard-map-popup {
  display: grid;
  gap: 4px;
  color: #1f3448;
  font-size: 0.78rem;
  min-width: 190px;
}

.dashboard-map-popup strong {
  font-size: 0.92rem;
  color: #10273c;
}

.dashboard-map-popup small {
  display: block;
  color: #3b5670;
  line-height: 1.35;
}

.dashboard-routers-map .leaflet-popup-content-wrapper {
  border-radius: 11px;
  border: 1px solid #d1e3f2;
  box-shadow: 0 12px 22px rgba(10, 37, 58, 0.16);
}

.dashboard-routers-map .leaflet-popup-content {
  margin: 10px 12px;
}

.dashboard-routers-map .leaflet-control-zoom a {
  color: #12304a;
}

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

.section-header h2 {
  margin-bottom: 0;
}

.inline-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.inline-actions select {
  min-width: 210px;
}

.inline-actions input[type="search"] {
  min-width: 290px;
}

.surface-hero__grid {
  display: grid;
  gap: 22px;
  align-items: stretch;
}

.surface-hero__copy {
  display: grid;
  gap: 16px;
}

.surface-hero__ribbon,
.surface-hero__action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ops-section-kicker {
  letter-spacing: 0.12em;
}

.ops-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ops-summary-card {
  position: relative;
  overflow: hidden;
}

.ops-summary-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, rgba(71, 151, 212, 0.82), rgba(100, 207, 189, 0.7), rgba(231, 184, 91, 0.72));
  opacity: 0.58;
}

.ops-feed-card {
  background:
    radial-gradient(340px 180px at 100% -20%, rgba(165, 220, 246, 0.22), transparent 72%),
    linear-gradient(180deg, #fbfdff 0%, #f2f8fd 100%);
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

table {
  width: 100%;
  min-width: 900px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.89rem;
}

th,
td {
  border-bottom: 1px solid var(--line-soft);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: linear-gradient(180deg, #f5f9fd 0%, #eef4fa 100%);
  color: #4a6278;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

tbody tr:nth-child(even) td {
  background: #fbfdff;
}

tbody tr:hover td {
  background: #eef7ff;
}

tbody tr.router-row-selected td {
  background: #dff0ff;
}

.audit-log-table {
  min-width: 0;
  table-layout: fixed;
}

.audit-log-table th,
.audit-log-table td {
  white-space: normal;
}

.audit-log-table th:nth-child(1),
.audit-log-table td:nth-child(1) {
  width: 140px;
}

.audit-log-table th:nth-child(2),
.audit-log-table td:nth-child(2) {
  width: 150px;
}

.audit-log-table th:nth-child(3),
.audit-log-table td:nth-child(3) {
  width: 26%;
}

.audit-log-table th:nth-child(4),
.audit-log-table td:nth-child(4) {
  width: 18%;
}

.audit-log-table th:nth-child(5),
.audit-log-table td:nth-child(5) {
  width: 14%;
}

.audit-log-table th:nth-child(6),
.audit-log-table td:nth-child(6) {
  width: 110px;
}

.audit-log-table th:nth-child(7),
.audit-log-table td:nth-child(7) {
  width: 132px;
}

.audit-log-table th:nth-child(8),
.audit-log-table td:nth-child(8) {
  width: 32%;
}

.release-table {
  min-width: 0;
  table-layout: fixed;
}

.release-table th,
.release-table td {
  white-space: normal;
}

.release-table th:nth-child(1),
.release-table td:nth-child(1) {
  width: 140px;
}

.release-table th:nth-child(2),
.release-table td:nth-child(2) {
  width: 200px;
}

.release-table th:nth-child(3),
.release-table td:nth-child(3) {
  width: 90px;
}

.release-table th:nth-child(4),
.release-table td:nth-child(4) {
  width: 130px;
}

.release-table th:nth-child(5),
.release-table td:nth-child(5) {
  width: 110px;
}

.release-table th:nth-child(6),
.release-table td:nth-child(6) {
  width: 95px;
}

.release-table th:nth-child(7),
.release-table td:nth-child(7) {
  width: 220px;
}

.release-table th:nth-child(8),
.release-table td:nth-child(8) {
  width: 220px;
}

.audit-nowrap {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.audit-cell-event,
.audit-cell-entity,
.audit-cell-date {
  white-space: nowrap;
}

.audit-cell-status {
  white-space: nowrap;
}

.audit-event-code {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.79rem;
}

.audit-severity {
  display: inline-block;
  margin-top: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.audit-severity-info {
  color: #285f86;
  background: #e4f1fb;
}

.audit-severity-warning {
  color: #8f5c09;
  background: #fff1d9;
}

.audit-severity-security {
  color: #0f6f52;
  background: #e3f7ee;
}

.audit-severity-error {
  color: #9d2437;
  background: #ffe5ea;
}

.audit-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.audit-status-neutral {
  color: #5a6f83;
  background: #edf3f8;
  border-color: #d2dfe9;
}

.audit-status-warning {
  color: #89580b;
  background: #fff1d8;
  border-color: #efd6a8;
}

.audit-status-success {
  color: #0d6b4f;
  background: #e2f6ed;
  border-color: #bde4d3;
}

.audit-status-error {
  color: #9a2236;
  background: #ffe5ea;
  border-color: #f6c4cf;
}

.audit-cell-message,
.audit-cell-actor,
.audit-cell-company {
  overflow: hidden;
}

.audit-line-clamp {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
  line-height: 1.35;
}

.audit-cell-actor,
.audit-cell-company {
  display: table-cell;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit-log-details {
  max-width: 100%;
}

.audit-log-details summary {
  cursor: pointer;
  color: #0f6197;
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audit-log-details-body {
  margin-top: 8px;
  display: grid;
  gap: 6px;
  color: #2f4a61;
  font-size: 0.78rem;
}

.audit-log-details-body p {
  margin: 0;
  word-break: break-word;
}

.audit-latest-deploy-card {
  border: 1px solid #d9e7f3;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fcff 0%, #f1f7ff 100%);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.audit-latest-deploy-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.audit-latest-deploy-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: #3b5970;
  border-radius: 999px;
  border: 1px solid #c4d8e8;
  padding: 2px 10px;
  background: #fff;
}

.audit-latest-deploy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 6px 12px;
  font-size: 0.8rem;
  color: #2f4a61;
}

.audit-latest-deploy-migrations p {
  margin: 0 0 4px;
}

.audit-latest-deploy-list {
  margin: 0;
  padding-left: 18px;
  max-height: 120px;
  overflow: auto;
  color: #2f4a61;
}

.audit-latest-deploy-list li {
  margin: 0 0 2px;
}

.audit-latest-deploy-empty {
  color: #587088;
  font-size: 0.8rem;
}

.audit-latest-deploy-error {
  margin: 0;
  color: #8f2235;
  font-size: 0.8rem;
}

.audit-mysql-block {
  margin: 2px 0 4px;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #d7e6f2;
  background: #f5faff;
}

.audit-mysql-list {
  margin: 0;
  padding-left: 18px;
  max-height: 130px;
  overflow: auto;
  color: #2f4a61;
}

.audit-mysql-list li {
  margin: 0 0 2px;
}

.audit-context-block {
  margin: 0;
  border: 1px solid #dbe8f3;
  border-radius: 8px;
  padding: 8px;
  max-height: 150px;
  overflow: auto;
  background: #f7fbff;
  color: #36526a;
  font-size: 0.72rem;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
}

.row-actions {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
}

.row-actions button {
  border-radius: 8px;
}

.router-table-action-menu {
  position: relative;
  min-width: 0;
}

.router-table-action-menu-portal {
  position: fixed;
  inset: 0;
  z-index: 640;
  pointer-events: none;
}

.router-table-action-menu-portal .router-table-action-list {
  pointer-events: auto;
}

.router-table-action-menu > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  cursor: pointer;
  user-select: none;
  color: #22425d;
  border: 1px solid #c9d9e8;
  border-radius: 9px;
  min-height: 32px;
  min-width: 64px;
  padding: 6px 10px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #ffffff 0%, #edf4fb 100%);
  box-shadow: 0 3px 8px rgba(20, 48, 74, 0.08);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.router-table-action-menu > summary::-webkit-details-marker {
  display: none;
}

.router-table-action-menu > summary:hover {
  transform: translateY(-1px);
}

.router-table-action-menu[open] > summary {
  border-color: #2190d1;
  box-shadow: 0 7px 14px rgba(18, 62, 95, 0.2);
}

.router-table-action-list {
  position: fixed;
  top: var(--router-action-menu-top, 64px);
  left: var(--router-action-menu-left, 10px);
  right: auto;
  bottom: auto;
  z-index: 620;
  min-width: 0;
  width: var(--router-action-menu-width, min(320px, calc(100vw - 20px)));
  max-height: var(--router-action-menu-max-height, min(56vh, 320px));
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding: 10px;
  border: 1px solid #d2e3f1;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fbfe 0%, #edf5fc 100%);
  box-shadow: 0 12px 24px rgba(18, 45, 67, 0.17);
  overscroll-behavior: contain;
}

.router-table-action-menu.is-open-up .router-table-action-list {
  top: auto;
  bottom: var(--router-action-menu-bottom, 10px);
}

.router-table-action-list.is-open-up {
  top: auto;
  bottom: var(--router-action-menu-bottom, 10px);
}

.router-table-action-menu[open] .router-table-action-list {
  animation: router-table-action-menu-in 0.16s ease;
  transform-origin: top right;
}

.router-table-action-list.is-portal-open {
  animation: router-table-action-menu-in 0.16s ease;
  transform-origin: top right;
}

.router-table-action-menu.is-open-up[open] .router-table-action-list {
  transform-origin: bottom right;
}

.router-table-action-list.is-portal-open.is-open-up {
  transform-origin: bottom right;
}

@keyframes router-table-action-menu-in {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.router-table-action-list .router-table-action-btn {
  --router-action-accent: #2a8dc9;
  width: 100%;
  text-align: left;
  min-height: 38px;
  white-space: normal;
  line-height: 1.24;
  border-radius: 10px;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 8px 9px 8px 13px;
  border: 1px solid #cadaec;
  color: #1f4b68;
  background: linear-gradient(180deg, #ffffff 0%, #f2f8ff 100%);
  box-shadow: inset 3px 0 0 var(--router-action-accent), 0 2px 6px rgba(20, 48, 74, 0.08);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.router-table-action-list .router-table-action-btn[data-action="edit-router"] {
  --router-action-accent: #2b86ce;
}

.router-table-action-list .router-table-action-btn[data-action="monitor"],
.router-table-action-list .router-table-action-btn[data-action="test"] {
  --router-action-accent: #138fbe;
}

.router-table-action-list .router-table-action-btn[data-action="snapshot"] {
  --router-action-accent: #157f67;
}

.router-table-action-list .router-table-action-btn[data-action="provision"] {
  --router-action-accent: #2f9a4b;
}

.router-table-action-list .router-table-action-btn[data-action="backup"] {
  --router-action-accent: #2d66be;
}

.router-table-action-list .router-table-action-btn[data-action="reboot"] {
  --router-action-accent: #cf7d1f;
}

.router-table-action-list .router-table-action-btn[data-action="update"] {
  --router-action-accent: #b96315;
}

.router-table-action-list .router-table-action-btn:not(:disabled):hover {
  transform: translateY(-1px);
  border-color: #9fc2df;
  background: linear-gradient(180deg, #ffffff 0%, #eaf4ff 100%);
  box-shadow: inset 3px 0 0 var(--router-action-accent), 0 8px 15px rgba(16, 50, 79, 0.16);
}

.router-table-action-list .router-table-action-btn:focus-visible {
  outline: none;
  border-color: #2892d3;
  box-shadow: inset 3px 0 0 var(--router-action-accent), 0 0 0 2px rgba(40, 146, 211, 0.22);
}

.router-table-action-list .router-table-action-btn:disabled {
  opacity: 0.62;
  color: #5f7588;
  background: linear-gradient(180deg, #f9fbfd 0%, #edf3f8 100%);
  box-shadow: inset 3px 0 0 #b8c9d7;
}

.router-table-action-hint {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px dashed #bfd5e7;
  border-radius: 10px;
  background: linear-gradient(180deg, #fafdff 0%, #eef6fd 100%);
  color: #3f617b;
  font-size: 0.68rem;
  line-height: 1.25;
  display: flex;
  align-items: center;
}

body[data-page="routers"] #routerListSection .row-actions {
  flex-wrap: nowrap;
  justify-content: flex-end;
}

body[data-page="routers"] #routerListSection .router-table-action-menu {
  width: auto;
  min-width: 0;
}

body[data-page="routers"] #routerListSection .router-table-action-menu > summary {
  width: auto;
  min-width: 64px;
}

body[data-page="routers"] #routerListSection .router-table-action-list {
  position: fixed;
  margin-top: 0;
}

body[data-page="routers"] #routerListSection .router-table-action-list .router-table-action-btn {
  white-space: normal;
}

.muted-line {
  margin: 2px 0 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.router-summary-grid .stat-card strong {
  font-size: 1.82rem;
}

.monitor-cards {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
}

.monitor-cards.monitor-cards-xl {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.monitor-cards .stat-card {
  border-color: #d8e7f3;
}

.monitor-cards .router-monitor-card {
  --monitor-accent: 15, 109, 168;
  border-color: #d4e5f3;
  background:
    radial-gradient(245px 145px at 108% -10%, rgba(var(--monitor-accent), 0.14) 0%, transparent 62%),
    linear-gradient(162deg, #ffffff 0%, #f4f9ff 78%, #edf6ff 100%);
  transition: transform 0.2s ease, box-shadow 0.24s ease, border-color 0.22s ease, background 0.24s ease;
}

.monitor-cards .router-monitor-card p,
.monitor-cards .router-monitor-card strong {
  transition: color 0.24s ease, text-shadow 0.24s ease;
}

.monitor-cards .router-monitor-card.kpi-ros {
  --monitor-accent: 29, 143, 220;
}

.monitor-cards .router-monitor-card.kpi-uptime {
  --monitor-accent: 10, 133, 116;
}

.monitor-cards .router-monitor-card.kpi-model {
  --monitor-accent: 44, 118, 212;
}

.monitor-cards .router-monitor-card.kpi-cpu {
  --monitor-accent: 197, 77, 58;
}

.monitor-cards .router-monitor-card.kpi-ros,
.monitor-cards .router-monitor-card.kpi-uptime,
.monitor-cards .router-monitor-card.kpi-model,
.monitor-cards .router-monitor-card.kpi-cpu {
  min-height: 118px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 6px;
}

.monitor-cards .router-monitor-card.kpi-ros p,
.monitor-cards .router-monitor-card.kpi-uptime p,
.monitor-cards .router-monitor-card.kpi-model p,
.monitor-cards .router-monitor-card.kpi-cpu p {
  margin: 0;
  text-align: left;
}

.monitor-cards .router-monitor-card.kpi-ros strong,
.monitor-cards .router-monitor-card.kpi-uptime strong,
.monitor-cards .router-monitor-card.kpi-model strong,
.monitor-cards .router-monitor-card.kpi-cpu strong {
  width: 100%;
  text-align: center;
}

.monitor-cards .router-monitor-card.kpi-memory {
  --monitor-accent: 209, 142, 32;
}

.monitor-cards .router-monitor-card.kpi-disk {
  --monitor-accent: 186, 51, 72;
}

.router-slo-widget-card {
  margin-top: 6px;
  border-color: #d7e6f3;
  background:
    radial-gradient(300px 160px at 92% -16%, rgba(41, 139, 210, 0.16), transparent 68%),
    linear-gradient(180deg, #fbfdff 0%, #f1f7fd 100%);
}

.router-slo-widget-card .section-header {
  margin-bottom: 6px;
}

.router-slo-monitor-grid {
  margin-bottom: 0;
}

.router-slo-monitor-grid .router-monitor-card.kpi-slo-mitigated {
  --monitor-accent: 15, 142, 106;
}

.router-slo-monitor-grid .router-monitor-card.kpi-slo-recurrence {
  --monitor-accent: 214, 128, 27;
}

.router-slo-monitor-grid .router-monitor-card.kpi-slo-ttm {
  --monitor-accent: 32, 122, 201;
}

.router-slo-monitor-grid .router-monitor-card.kpi-slo-open {
  --monitor-accent: 187, 51, 73;
}

.monitor-cards .router-monitor-duo {
  display: grid;
  gap: 4px;
  width: 100%;
}

.monitor-cards .router-monitor-duo-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.monitor-cards .router-monitor-duo-row span {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #587289;
  font-weight: 700;
}

.monitor-cards .router-monitor-duo-row strong {
  font-size: 0.94rem;
  line-height: 1.1;
  text-align: right;
}

.monitor-cards .stat-card strong {
  font-size: 1.15rem;
}

.monitor-cards .stat-card p {
  font-size: 0.7rem;
}

.monitor-cards .stat-card strong.metric-ok {
  color: #0f8a63;
}

.monitor-cards .stat-card strong.metric-warn {
  color: #be7c12;
}

.monitor-cards .stat-card strong.metric-danger {
  color: #b42f45;
}

.monitor-cards .stat-card strong.metric-info {
  color: #0f6298;
}

.monitor-cards .stat-card strong.metric-neutral {
  color: var(--ink-strong);
}

@media (hover: hover) and (pointer: fine) {
  .monitor-cards .router-monitor-card:hover {
    transform: translateY(-4px);
    border-color: rgba(var(--monitor-accent), 0.42);
    box-shadow: 0 14px 28px rgba(var(--monitor-accent), 0.22);
    background:
      radial-gradient(250px 150px at 108% -8%, rgba(var(--monitor-accent), 0.23) 0%, transparent 62%),
      linear-gradient(162deg, #ffffff 0%, #f2f9ff 78%, #ebf4ff 100%);
  }

  .monitor-cards .router-monitor-card:hover p {
    color: #36566f;
  }

  .monitor-cards .router-monitor-card:hover strong {
    text-shadow: 0 8px 18px rgba(var(--monitor-accent), 0.26);
  }
}

.router-detail-actions {
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.router-detail-action-wrap {
  justify-content: flex-end;
}

.router-detail-action-menu {
  position: relative;
  min-width: 220px;
}

.router-detail-action-menu > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  color: #22425d;
  border: 1px solid #c9d9e8;
  border-radius: 9px;
  min-height: 34px;
  padding: 7px 11px;
  font-size: 0.8rem;
  font-weight: 700;
  background: linear-gradient(180deg, #ffffff 0%, #edf4fb 100%);
  box-shadow: 0 3px 8px rgba(20, 48, 74, 0.08);
}

.router-detail-action-menu > summary::-webkit-details-marker {
  display: none;
}

.router-detail-action-menu > summary::after {
  content: '▾';
  font-size: 0.72rem;
  color: #46627a;
  transition: transform 0.2s ease;
}

.router-detail-action-menu[open] > summary::after {
  transform: rotate(180deg);
}

.router-detail-action-menu.is-disabled > summary {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.router-detail-action-list {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 35;
  min-width: 260px;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid #d2e3f1;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fbfe 0%, #edf5fc 100%);
  box-shadow: 0 12px 24px rgba(18, 45, 67, 0.17);
}

.router-detail-action-list button {
  width: 100%;
  text-align: left;
}

.router-tab-shell {
  margin: 8px 0 10px;
}

.router-tab-shell-title {
  margin: 0 0 6px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5f778d;
  font-weight: 700;
}

.router-history-tabs {
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border: 1px solid #d2e3f1;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fbfe 0%, #edf5fc 100%);
  overflow-x: auto;
}

.router-history-tabs button {
  border-radius: 10px;
  padding: 8px 12px;
  border: 1px solid transparent;
  background: transparent;
  color: #335670;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.router-history-tabs button.is-active {
  color: #0f5f95;
  border-color: #b6d4eb;
  background: #fff;
  box-shadow: 0 4px 10px rgba(22, 75, 113, 0.12);
}

.router-history-tabs button:hover {
  border-color: #c6daec;
  background: rgba(255, 255, 255, 0.72);
}

.router-history-panel {
  margin-bottom: 12px;
}

.router-backup-diff-card {
  margin-top: 14px;
  border-top: 1px solid #d4e2ef;
  padding-top: 12px;
}

.router-backup-diff-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.router-backup-diff-head h4 {
  margin: 0;
  font-size: 0.9rem;
  color: #1f3f57;
}

.router-backup-diff-viewer {
  margin-top: 8px;
  max-height: 360px;
  overflow: auto;
  border: 1px solid #d4e2ef;
  border-radius: 10px;
  background: #f8fbff;
}

.router-backup-diff-sections {
  margin-top: -2px;
  margin-bottom: 6px;
}

.router-backup-diff-line {
  display: grid;
  grid-template-columns: 56px 56px 18px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 2px 8px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.73rem;
  line-height: 1.35;
  border-bottom: 1px solid #e4edf5;
}

.router-backup-diff-line:last-child {
  border-bottom: none;
}

.router-backup-diff-line.is-added {
  background: #fde8e8;
}

.router-backup-diff-line.is-removed {
  background: #ffe0e0;
}

.router-backup-diff-line.is-skip {
  background: #eef4fa;
  color: #5a7389;
  font-style: italic;
}

.router-backup-diff-num {
  color: #6b8398;
  text-align: right;
}

.router-backup-diff-marker {
  color: #8aa0b3;
  text-align: center;
}

.router-backup-diff-line.is-added .router-backup-diff-marker,
.router-backup-diff-line.is-removed .router-backup-diff-marker {
  color: #a20000;
  font-weight: 700;
}

.router-backup-diff-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.router-config-tabs {
  margin-bottom: 0;
}

.router-config-panel {
  margin-bottom: 12px;
}

.router-config-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.router-config-actions .secondary {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 0.72rem;
}

.router-config-subtitle {
  margin: 8px 0 6px;
  color: #284a66;
  font-size: 0.95rem;
}

.router-config-table {
  min-width: 0;
  table-layout: fixed;
}

.router-config-table th,
.router-config-table td {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  font-size: 0.8rem;
}

.router-logs-health {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 10px;
}

.router-logs-health .pill {
  font-size: 0.74rem;
}

.router-logs-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.router-logs-filters input,
.router-logs-filters select {
  width: 100%;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid #c9dcec;
  border-radius: 8px;
  background: #fff;
  color: #26475f;
}

.router-logs-filter-date {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
}

.router-logs-filter-date > span {
  font-size: 0.74rem;
  color: #5a7389;
  min-width: 26px;
}

.router-logs-realtime-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  color: #385a73;
  min-height: 34px;
}

.router-logs-realtime-toggle input[type="checkbox"] {
  width: auto;
  min-height: 0;
  margin: 0;
}

.router-log-table {
  min-width: 0;
  table-layout: fixed;
}

.router-log-table th,
.router-log-table td {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.router-log-table th:nth-child(1),
.router-log-table td:nth-child(1) {
  width: 150px;
}

.router-log-table th:nth-child(2),
.router-log-table td:nth-child(2) {
  width: 180px;
}

.router-log-table td:nth-child(3) {
  line-height: 1.35;
}

.router-log-tooltip-target {
  display: inline-block;
  width: 100%;
  cursor: help;
}

.router-temp-blocklist-card {
  margin-bottom: 12px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #d7e4ef;
  background: #f8fbff;
}

.router-security-intro {
  margin-top: -2px;
  margin-bottom: 10px;
}

.router-security-summary-card {
  position: relative;
  overflow: hidden;
  margin-bottom: 10px;
  padding: 10px 11px;
  border-radius: 11px;
  border: 1px solid #c8ddef;
  background:
    radial-gradient(220px 120px at 105% -40%, rgba(170, 217, 247, 0.28), transparent 72%),
    linear-gradient(180deg, #fdfeff 0%, #f2f8ff 100%);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.router-security-persona-toggle {
  display: inline-flex;
  gap: 6px;
  margin-bottom: 8px;
  padding: 4px;
  border: 1px solid #caddf0;
  border-radius: 999px;
  background: linear-gradient(180deg, #fafdff 0%, #eef6ff 100%);
}

.router-security-persona-toggle .secondary {
  min-height: 28px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.72rem;
}

.router-security-persona-toggle .secondary.is-active {
  border-color: #1f93d8;
  background: linear-gradient(160deg, #2ca8ea 0%, #1688ca 65%, #1175b0 100%);
  color: #ffffff;
  box-shadow: 0 6px 14px rgba(16, 97, 151, 0.2);
}

.router-security-mode-help {
  margin: 0 0 8px;
  font-size: 0.75rem;
  color: #41627d;
}

.router-security-summary-card.is-loading {
  border-color: #c7dcf2;
  box-shadow: inset 0 0 0 1px rgba(195, 216, 236, 0.35);
}

.router-security-summary-card.is-ok {
  border-color: #b8e4ce;
  background:
    radial-gradient(240px 130px at 104% -25%, rgba(166, 235, 199, 0.33), transparent 72%),
    linear-gradient(180deg, #fdfffe 0%, #edf9f3 100%);
  box-shadow: 0 8px 20px rgba(53, 134, 98, 0.14);
}

.router-security-summary-card.is-warn {
  border-color: #eed4a3;
  background:
    radial-gradient(240px 130px at 104% -25%, rgba(246, 213, 142, 0.34), transparent 72%),
    linear-gradient(180deg, #fffefb 0%, #fff4dc 100%);
  box-shadow: 0 8px 20px rgba(158, 111, 21, 0.14);
}

.router-security-summary-card.is-danger {
  border-color: #efc1c9;
  background:
    radial-gradient(260px 145px at 104% -25%, rgba(248, 173, 187, 0.34), transparent 72%),
    linear-gradient(180deg, #fffdfd 0%, #fff0f3 100%);
  box-shadow: 0 10px 22px rgba(150, 52, 70, 0.2);
  animation: router-security-danger-pulse 1.6s ease-in-out infinite;
}

@keyframes router-security-danger-pulse {
  0% {
    box-shadow: 0 10px 22px rgba(150, 52, 70, 0.17);
  }
  50% {
    box-shadow: 0 10px 25px rgba(150, 52, 70, 0.28);
  }
  100% {
    box-shadow: 0 10px 22px rgba(150, 52, 70, 0.17);
  }
}

.router-security-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.router-security-summary-head strong {
  color: #244660;
}

.router-security-summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.router-security-summary-chip {
  padding: 7px 8px;
  border-radius: 10px;
  border: 1px solid #d3e2ef;
  background: #f8fbff;
  display: grid;
  gap: 3px;
}

.router-security-summary-chip-label {
  font-size: 0.67rem;
  letter-spacing: 0.02em;
  color: #4d6b82;
}

.router-security-summary-chip strong {
  font-size: 1rem;
  color: #223c52;
}

.router-security-summary-chip.is-ok {
  border-color: #bde4d0;
  background: #edf9f3;
}

.router-security-summary-chip.is-warn {
  border-color: #efd7ad;
  background: #fff5e1;
}

.router-security-summary-chip.is-danger {
  border-color: #efc4cb;
  background: #fff1f4;
}

.router-security-assistant-card {
  margin-top: 8px;
  padding: 9px;
  border: 1px solid #cddff0;
  border-radius: 10px;
  background: linear-gradient(180deg, #fcfeff 0%, #eef6ff 100%);
}

.router-security-assistant-title {
  margin: 0 0 7px;
  font-size: 0.78rem;
  color: #244c68;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.router-security-assistant-input-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px;
  margin-bottom: 7px;
}

.router-security-assistant-input-wrap input {
  min-height: 36px;
}

.router-security-assistant-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 7px;
}

.router-security-assistant-examples .secondary {
  min-height: 30px;
  font-size: 0.73rem;
  padding: 5px 8px;
}

.router-security-assistant-status {
  margin: 0;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid #d4e2ef;
  background: #f6fbff;
  color: #355771;
  font-size: 0.74rem;
  line-height: 1.35;
}

.router-security-assistant-status.is-ok {
  border-color: #c3e6d2;
  background: #eef9f3;
  color: #1b6c4d;
}

.router-security-assistant-status.is-warn {
  border-color: #efdcb7;
  background: #fff7e8;
  color: #8e6115;
}

.router-security-assistant-status.is-danger {
  border-color: #e9c3cb;
  background: #fff1f4;
  color: #8e2c3d;
}

.router-security-assistant-status.is-busy {
  border-color: #c9dced;
  background: #eff6fd;
  color: #275373;
}

.router-security-assistant-preview {
  margin: 0 0 7px;
  padding: 7px 8px;
  border-radius: 8px;
  border: 1px solid #cfe0ee;
  background: #f5fafe;
  color: #345a74;
  font-size: 0.73rem;
  line-height: 1.35;
}

.router-security-assistant-preview.is-warn {
  border-color: #edd6aa;
  background: #fff7e7;
  color: #8f6318;
}

.router-security-assistant-preview.is-danger {
  border-color: #ecc2ca;
  background: #fff2f5;
  color: #8d3042;
}

.router-security-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
  padding: 10px 11px;
  border: 1px solid #d7e4ef;
  border-radius: 10px;
  background: linear-gradient(180deg, #fbfeff 0%, #f2f8ff 100%);
}

.router-security-toolbar-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: #34566f;
}

.router-security-toolbar-item select {
  min-height: 34px;
  min-width: 210px;
}

.router-security-advanced-filters {
  margin-bottom: 12px;
  border: 1px dashed #c8daeb;
  border-radius: 11px;
  background: #f8fbff;
}

.router-security-advanced-filters > summary {
  padding: 9px 11px;
  cursor: pointer;
  color: #2f5774;
  font-weight: 600;
}

.router-security-advanced-filters > summary:hover {
  color: #1f4866;
}

.router-security-advanced-filters .router-security-toolbar {
  margin: 0;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 0 0 11px 11px;
}

.router-security-section {
  padding: 10px;
  border: 1px solid #d4e3f1;
  border-radius: 12px;
  background: linear-gradient(180deg, #fcfeff 0%, #f5faff 100%);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.router-security-section.is-collapsed {
  border-style: dashed;
  background: #f8fbff;
}

.router-security-section-body {
  margin-top: 6px;
  animation: router-security-fade-in 0.2s ease;
}

@keyframes router-security-fade-in {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.router-security-profile-controls {
  display: grid;
  grid-template-columns: 130px 170px 130px auto auto;
  gap: 8px;
  margin-bottom: 8px;
}

.router-security-profile-controls input {
  min-height: 36px;
}

.router-temp-blocklist-head {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
  margin-bottom: 6px;
}

.router-temp-blocklist-head h4 {
  margin: 0;
  font-size: 0.9rem;
}

.router-temp-blocklist-controls {
  display: grid;
  grid-template-columns: 170px 1fr 120px 1.4fr auto auto;
  gap: 8px;
  margin-bottom: 8px;
}

.router-temp-blocklist-controls input {
  min-height: 36px;
}

.router-global-allowlist-controls {
  display: grid;
  grid-template-columns: 130px 1.1fr 1.4fr auto auto;
  gap: 8px;
  margin-bottom: 8px;
}

.router-global-allowlist-controls input {
  min-height: 36px;
}

.router-temp-blocklist-table {
  min-width: 0;
  table-layout: fixed;
}

.router-temp-blocklist-table th,
.router-temp-blocklist-table td {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  vertical-align: top;
}

.router-temp-blocklist-table th:nth-child(1),
.router-temp-blocklist-table td:nth-child(1) {
  width: 160px;
}

.router-temp-blocklist-table th:nth-child(2),
.router-temp-blocklist-table td:nth-child(2) {
  width: 120px;
}

.router-temp-blocklist-table th:nth-child(3),
.router-temp-blocklist-table td:nth-child(3) {
  width: 90px;
}

.router-temp-blocklist-table th:nth-child(4),
.router-temp-blocklist-table td:nth-child(4) {
  width: 140px;
}

.router-temp-blocklist-table th:nth-child(5),
.router-temp-blocklist-table td:nth-child(5) {
  width: 165px;
}

.router-temp-blocklist-table th:nth-child(6),
.router-temp-blocklist-table td:nth-child(6) {
  width: 110px;
}

.router-temp-blocklist-table th:nth-child(7),
.router-temp-blocklist-table td:nth-child(7) {
  width: 180px;
}

.router-temp-blocklist-table th:nth-child(8),
.router-temp-blocklist-table td:nth-child(8) {
  width: 90px;
}

.router-global-allowlist-table th:nth-child(1),
.router-global-allowlist-table td:nth-child(1) {
  width: 110px;
}

.router-global-allowlist-table th:nth-child(2),
.router-global-allowlist-table td:nth-child(2) {
  width: 220px;
}

.router-global-allowlist-table th:nth-child(3),
.router-global-allowlist-table td:nth-child(3) {
  width: 100px;
}

.router-global-allowlist-table th:nth-child(4),
.router-global-allowlist-table td:nth-child(4) {
  width: 150px;
}

.router-global-allowlist-table th:nth-child(5),
.router-global-allowlist-table td:nth-child(5) {
  width: 210px;
}

.router-global-allowlist-table th:nth-child(6),
.router-global-allowlist-table td:nth-child(6) {
  width: 100px;
}

.router-security-table {
  min-width: 0;
  table-layout: fixed;
}

.router-security-table th,
.router-security-table td {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  vertical-align: top;
}

.router-security-table th:nth-child(1),
.router-security-table td:nth-child(1) {
  width: 150px;
}

.router-security-table th:nth-child(2),
.router-security-table td:nth-child(2) {
  width: 130px;
}

.router-security-table th:nth-child(3),
.router-security-table td:nth-child(3) {
  width: 150px;
}

.router-security-table th:nth-child(4),
.router-security-table td:nth-child(4) {
  width: 180px;
}

.router-security-table th:nth-child(5),
.router-security-table td:nth-child(5) {
  width: 220px;
}

.router-security-table th:nth-child(6),
.router-security-table td:nth-child(6) {
  width: 220px;
}

.router-security-table th:nth-child(7),
.router-security-table td:nth-child(7) {
  width: 230px;
}

.router-security-table td:nth-child(6) {
  line-height: 1.35;
}

.router-security-table td:nth-child(7) {
  line-height: 1.35;
}

.router-security-table code {
  display: inline-block;
  margin-top: 3px;
  padding: 2px 5px;
  border-radius: 5px;
  background: #eef4fa;
  border: 1px solid #d6e3ef;
  font-size: 0.7rem;
  line-height: 1.3;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.router-config-cell-mono {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.76rem;
}

.router-config-cell-muted {
  color: #5a7389;
}

.router-config-pill {
  display: inline-block;
  margin-right: 4px;
  margin-bottom: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.67rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
}

.router-config-pill-ok {
  background: #e2f6ec;
  color: #1e6a48;
}

.router-config-pill-warn {
  background: #fff2dc;
  color: #8f5d0e;
}

.router-config-pill-muted {
  background: #e8eef5;
  color: #4f667c;
}

.router-config-editor {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.router-config-editor-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(10, 28, 45, 0.45);
  cursor: pointer;
  box-shadow: none;
}

.router-config-editor-card {
  position: relative;
  width: min(980px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  border: 1px solid #c8dcee;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f9fe 100%);
  box-shadow: 0 22px 54px rgba(12, 34, 55, 0.26);
  padding: 16px;
  z-index: 1;
}

.router-config-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.router-config-editor-head h3 {
  margin: 0;
}

.router-config-editor-form {
  display: grid;
  gap: 12px;
}

.router-config-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
}

.router-config-editor-grid-wide {
  grid-column: span 2;
}

.router-config-editor-fields {
  border: 1px solid #d4e5f2;
  border-radius: 12px;
  padding: 10px;
  background: #fbfdff;
}

.router-config-editor-fields h4 {
  margin: 0 0 8px;
  color: #274762;
}

.router-config-editor-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.router-config-editor-actions button {
  min-width: 190px;
}

.iface-usage-list {
  display: grid;
  gap: 10px;
}

.iface-usage-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.iface-usage-head .muted-line {
  margin: 0;
}

.router-chart-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: flex-end;
  gap: 8px;
}

.router-chart-filter {
  display: grid;
  gap: 4px;
  min-width: 138px;
}

.router-chart-filter > span,
.router-chart-interface-head > span {
  font-size: 0.67rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #60778d;
  font-weight: 700;
}

.router-chart-filter-wide {
  min-width: min(100%, 430px);
  flex: 1 1 360px;
}

.router-chart-filter select {
  min-width: 138px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 0.82rem;
}

.router-chart-interface-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.router-chart-interface-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.router-chart-interface-actions .secondary {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 0.72rem;
}

.router-chart-interface-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(156px, 1fr));
  gap: 6px;
  max-height: 144px;
  overflow: auto;
  padding: 6px;
  border: 1px solid #d5e5f3;
  border-radius: 10px;
  background: #fff;
}

.router-chart-interface-empty {
  font-size: 0.78rem;
  color: #5a7389;
  padding: 2px;
}

.router-chart-interface-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid #dce8f4;
  border-radius: 9px;
  background: #f6fbff;
  padding: 5px 7px;
}

.router-chart-interface-item label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  cursor: pointer;
}

.router-chart-interface-item input[type="checkbox"] {
  margin: 0;
}

.router-chart-interface-name {
  font-size: 0.76rem;
  color: #284a66;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.router-chart-interface-rate {
  font-size: 0.7rem;
  color: #567088;
  font-weight: 700;
  white-space: nowrap;
}

.iface-chart-panel {
  border: 1px solid #d8e6f3;
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 10px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f2f9ff 100%);
}

.iface-chart {
  width: 100%;
  height: 252px;
  display: block;
}

.iface-chart .grid {
  stroke: #d6e6f3;
  stroke-width: 1;
}

.iface-chart .axis {
  stroke: #96aec4;
  stroke-width: 1;
}

.iface-chart .series {
  fill: none;
  stroke-width: 2.2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.iface-chart .series-line {
  stroke-width: 2.4;
}

.iface-chart .series-area {
  opacity: 0.92;
}

.iface-chart .dot {
  r: 3.1;
  stroke: #ffffff;
  stroke-width: 1.2;
}

.iface-chart .axis-label {
  font-size: 11px;
  fill: #5f768d;
}

.iface-chart-legend {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  max-height: 150px;
  overflow: auto;
  padding-right: 2px;
}

.iface-chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  color: #39546b;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid #d7e6f4;
  background: #f5faff;
  white-space: nowrap;
  line-height: 1.2;
}

.iface-chart-legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.iface-chart-legend-item-selectable {
  cursor: pointer;
  font: inherit;
  appearance: none;
  text-align: left;
  transition: transform 0.16s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}

.iface-chart-legend-item-selectable:hover {
  transform: translateY(-1px);
}

.iface-chart-legend-item-selectable:focus-visible {
  outline: 2px solid #4f8ec3;
  outline-offset: 2px;
}

.iface-chart-legend-item-selectable.is-active {
  background: linear-gradient(180deg, #eef7ff 0%, #e3f1ff 100%);
  border-color: #9dc4e3;
  color: #20435f;
  box-shadow: 0 4px 10px rgba(31, 86, 124, 0.16);
}

.iface-chart-legend-item-selectable.is-inactive {
  opacity: 0.56;
  filter: saturate(0.64);
  background: #f4f8fc;
}

.iface-chart-legend-value {
  color: #58728a;
  font-weight: 700;
}

.dhcp-pagination {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.dhcp-pagination-meta {
  font-size: 0.79rem;
  color: #5a7389;
}

.dhcp-pagination-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

tbody tr.dhcp-fixed-row td {
  background: #dff0ff;
}

tbody tr.dhcp-fixed-row:hover td {
  background: #cfe7ff;
}

.iface-row {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: #fff;
  padding: 10px;
}

.iface-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.iface-row-head strong {
  color: var(--ink-strong);
}

.iface-row-head span {
  font-size: 0.78rem;
  color: var(--muted);
}

.iface-bars {
  display: grid;
  gap: 6px;
}

.iface-bar {
  height: 9px;
  border-radius: 999px;
}

.iface-bar.rx {
  background: linear-gradient(90deg, #1b86c8, #51b0e1);
}

.iface-bar.tx {
  background: linear-gradient(90deg, #109975, #4dcfb0);
}

.muted-small {
  margin-top: 5px;
  font-size: 0.76rem;
  line-height: 1.35;
  color: #5f768c;
  white-space: normal;
}

.muted-small.is-danger {
  color: #b42f45;
}

.agent-version-indicator {
  font-weight: 700;
  color: #35526a;
}

.agent-version-indicator.is-outdated {
  color: #b42f45;
}

.agent-version-next {
  color: #b42f45;
  font-weight: 700;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #cfdae4;
  background: #f4f8fb;
  color: #2d4a60;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  margin-right: 6px;
  margin-bottom: 4px;
}

.pill.is-ok {
  background: #e8f9f2;
  border-color: #b6e7d5;
  color: #0b7658;
}

.pill.is-danger {
  background: #fff0f2;
  border-color: #f0c6cf;
  color: #9a2f40;
}

.pill.is-warn {
  background: #fff7e9;
  border-color: #f1dbb0;
  color: #9a6509;
}

.split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.embedded-card {
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-soft);
  background:
    linear-gradient(180deg, #fbfdff 0%, #f4f8fc 100%);
}

.embedded-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--ink-strong);
}

.router-security-radar {
  position: relative;
  overflow: hidden;
  border-color: #d9e6f2;
  background:
    radial-gradient(280px 140px at 90% -20%, rgba(194, 224, 245, 0.42), transparent 70%),
    linear-gradient(180deg, #fbfdff 0%, #f2f7fc 100%);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.router-security-radar.is-loading {
  border-color: #c5dced;
  box-shadow: inset 0 0 0 1px rgba(183, 211, 232, 0.25);
}

.router-security-radar.is-timeout {
  border-color: #edd7ac;
  background:
    radial-gradient(280px 140px at 90% -20%, rgba(250, 220, 156, 0.2), transparent 72%),
    linear-gradient(180deg, #fffdf8 0%, #fff6e6 100%);
}

.router-security-radar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.router-security-radar-head h3 {
  margin: 0;
}

.router-security-radar-meta {
  margin: -1px 0 8px;
  color: #5a7791;
  font-size: 0.74rem;
}

.router-security-radar-items {
  display: grid;
  gap: 8px;
}

.router-security-radar-item {
  border: 1px solid #dbe7f2;
  border-radius: 10px;
  padding: 8px 10px;
  background: #f8fbff;
}

.router-security-radar-item-head {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 6px;
}

.router-security-radar-item-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.router-security-radar-item-head strong {
  color: #20384f;
  font-size: 0.9rem;
}

.router-security-radar-item .router-security-radar-severity-low {
  background: #e9f8f1;
  border-color: #bfe7d5;
  color: #0c7a58;
}

.router-security-radar-item .router-security-radar-severity-medium {
  background: #fff6e6;
  border-color: #efd5a7;
  color: #9a6208;
}

.router-security-radar-item .router-security-radar-severity-high,
.router-security-radar-item .router-security-radar-severity-critical {
  background: #fff0f2;
  border-color: #efc6cf;
  color: #a02f41;
}

.router-security-radar-item-desc,
.router-security-radar-item-when {
  margin: 4px 0 0;
  font-size: 0.8rem;
  line-height: 1.35;
}

.router-security-radar-item-when {
  color: #4f6980;
}

.router-security-radar-empty {
  font-size: 0.82rem;
  color: #4f6980;
}

.router-security-radar-skeleton {
  border: 1px solid #d7e5f1;
  border-radius: 10px;
  padding: 8px;
  background: #f9fcff;
}

.router-security-radar-skeleton-row {
  display: block;
  height: 11px;
  margin: 5px 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #e7f0f8 20%, #f4f9fd 50%, #e7f0f8 80%);
  background-size: 220% 100%;
  animation: router-radar-shimmer 1.2s linear infinite;
}

.router-security-radar-skeleton-row:nth-child(1) {
  width: 46%;
}

.router-security-radar-skeleton-row:nth-child(2) {
  width: 92%;
}

.router-security-radar-skeleton-row:nth-child(3) {
  width: 74%;
}

@keyframes router-radar-shimmer {
  from {
    background-position: 180% 0;
  }
  to {
    background-position: -20% 0;
  }
}

.router-security-radar-ai-actions {
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px dashed #d3e2ef;
  display: grid;
  gap: 8px;
}

.router-security-radar-ai-group {
  display: grid;
  gap: 5px;
}

.router-security-radar-ai-group-title {
  margin: 0;
  font-size: 0.72rem;
  color: #32546d;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-weight: 700;
}

.router-security-radar-ai-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.router-security-radar-ai-btn {
  border: 1px solid #c9dbeb;
  border-radius: 999px;
  min-height: 30px;
  padding: 5px 10px;
  background: #f7fbff;
  color: #244a64;
  font-size: 0.73rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.router-security-radar-ai-btn:hover {
  transform: translateY(-1px);
  background: #ecf5fd;
  border-color: #94bddf;
}

.router-security-radar-ai-btn.is-danger {
  border-color: #efc4cb;
  background: #fff2f5;
  color: #8f2e3f;
}

.router-security-radar-ai-btn.is-warn {
  border-color: #eed9b4;
  background: #fff8ea;
  color: #8d6116;
}

.router-security-radar-ai-btn.is-ok {
  border-color: #bee3d0;
  background: #eef9f3;
  color: #1d6f4f;
}

.router-security-radar-ai-hint {
  margin: 0;
  font-size: 0.74rem;
  color: #54718a;
}

.router-security-radar-actions {
  margin-top: 8px;
}

.router-api-diagnostics-card {
  margin: 8px 0 9px;
  padding: 8px 9px;
  border-radius: 10px;
  border: 1px solid #cfe1ef;
  background: linear-gradient(180deg, #fafdff 0%, #edf6ff 100%);
  display: grid;
  gap: 6px;
}

.router-api-diagnostics-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.router-api-diagnostics-head strong {
  color: #254861;
  font-size: 0.82rem;
}

.router-api-diagnostics-meta {
  margin: 0;
  color: #436680;
  font-size: 0.74rem;
}

.router-api-diagnostics-list {
  display: grid;
  gap: 5px;
}

.router-api-diagnostics-row {
  border: 1px solid #d7e6f2;
  border-radius: 9px;
  padding: 6px 8px;
  background: #f8fcff;
}

.router-api-diagnostics-row strong {
  display: block;
  font-size: 0.76rem;
  color: #24445c;
}

.router-api-diagnostics-row small {
  display: block;
  margin-top: 2px;
  color: #55728a;
  font-size: 0.7rem;
}

.router-api-diagnostics-empty {
  font-size: 0.75rem;
  color: #597790;
}

.router-mitigation-queue-card {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #d6e2ee;
}

.router-block-loading {
  position: relative;
  overflow: hidden;
}

.router-block-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(244, 250, 255, 0) 22%, rgba(229, 241, 251, 0.72) 48%, rgba(244, 250, 255, 0) 74%);
  background-size: 220% 100%;
  animation: router-block-shimmer 1.15s linear infinite;
  pointer-events: none;
}

@keyframes router-block-shimmer {
  from {
    background-position: 180% 0;
  }
  to {
    background-position: -20% 0;
  }
}

.router-history-panel[data-router-history-panel="security"].router-security-focus-mode .router-security-section .muted-line {
  display: none;
}

.router-history-panel[data-router-history-panel="security"].router-security-focus-mode .router-security-section .table-wrap {
  margin-top: 4px;
}

.router-history-panel[data-router-history-panel="security"].router-security-persona-basic .router-security-advanced-only {
  display: none;
}

.router-history-panel[data-router-history-panel="security"].router-security-persona-basic .router-security-summary-card {
  border-color: #b9d8ec;
  background:
    radial-gradient(260px 130px at 102% -26%, rgba(139, 205, 240, 0.34), transparent 72%),
    linear-gradient(180deg, #feffff 0%, #eef7ff 100%);
}

.router-mitigation-queue-table th:nth-child(1),
.router-mitigation-queue-table td:nth-child(1) {
  width: 150px;
}

.router-mitigation-queue-table th:nth-child(2),
.router-mitigation-queue-table td:nth-child(2) {
  width: 110px;
}

.router-mitigation-queue-table th:nth-child(3),
.router-mitigation-queue-table td:nth-child(3) {
  width: 130px;
}

.router-mitigation-queue-table th:nth-child(4),
.router-mitigation-queue-table td:nth-child(4) {
  width: 150px;
}

.router-mitigation-queue-table th:nth-child(5),
.router-mitigation-queue-table td:nth-child(5) {
  width: 130px;
}

.router-mitigation-queue-table th:nth-child(6),
.router-mitigation-queue-table td:nth-child(6) {
  width: 230px;
}

.router-mitigation-queue-table th:nth-child(7),
.router-mitigation-queue-table td:nth-child(7) {
  width: 130px;
}

.router-mitigation-queue-table th:nth-child(8),
.router-mitigation-queue-table td:nth-child(8) {
  width: 90px;
}

.router-mitigation-queue-table th:nth-child(9),
.router-mitigation-queue-table td:nth-child(9) {
  width: 110px;
}

.router-internal-threat-card {
  margin: 8px 0;
  padding: 8px 10px;
  border: 1px solid #d6e3ef;
  border-radius: 10px;
  background: #f7fbff;
}

.router-internal-threat-card.is-empty {
  border-style: dashed;
}

.router-internal-threat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.router-internal-threat-head strong {
  font-size: 0.86rem;
  color: #23415d;
}

.router-internal-threat-card .muted-line {
  margin: 6px 0 0;
  font-size: 0.8rem;
}

#routerInternalThreatToggleBtn {
  margin-top: 6px;
}

.router-internal-threat-details {
  margin-top: 8px;
  display: grid;
  gap: 6px;
}

.router-internal-threat-row {
  border: 1px solid #dce8f3;
  border-radius: 8px;
  background: #ffffff;
  padding: 6px 8px;
  font-size: 0.78rem;
  line-height: 1.35;
}

.router-internal-threat-row strong {
  color: #22415d;
}

.pill.is-neutral {
  background: #e9eef3;
  color: #556b80;
}

/* Router monitor visual refresh */
@keyframes router-shell-enter {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes router-block-pop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

body[data-page="routers"] {
  --router-bg-top: #f6f8fb;
  --router-bg-mid: #f3f6f9;
  --router-bg-bottom: #eef2f6;
  --router-ink-strong: #102131;
  --router-ink: #25384a;
  --router-muted: #5d6f82;
  --router-card-border: #dbe4ed;
  --router-card-shadow: 0 1px 2px rgba(16, 33, 49, 0.05);
  --router-chip-bg: #f5f8fb;
  --router-chip-border: #d7e1ea;
  --router-chip-ink: #344a5f;
  --router-accent-list: #4f86b8;
  --router-accent-monitor: #4f8e75;
  --router-accent-warm: #b8892c;
  background: linear-gradient(180deg, #f7f9fb 0%, #edf2f6 100%);
  background-attachment: scroll;
}

body[data-page="routers"] .dashboard-shell.router-site-shell {
  grid-template-columns: 1fr;
}

body[data-page="routers"] .layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

body[data-page="routers"] .router-site-layout > #routerSiteOverviewCard {
  grid-column: 1 / -1;
}

body[data-page="routers"] .router-site-layout > #routerListSection,
body[data-page="routers"] .router-site-layout > #routerMonitorSection,
body[data-page="routers"] .router-site-layout > #routerTrafficInsightsCard {
  grid-column: 1 / -1;
}

body[data-page="routers"] .router-site-overview-card {
  display: grid;
  gap: 14px;
  padding: 22px;
}

body[data-page="routers"] .router-site-overview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

body[data-page="routers"] .router-site-overview-head h1 {
  margin: 0;
  color: #13263a;
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

body[data-page="routers"] .router-site-overview-state {
  display: grid;
  justify-items: end;
  gap: 6px;
}

body[data-page="routers"] .router-site-overview-state .muted-line {
  margin: 0;
  text-align: right;
}

body[data-page="routers"] .router-site-overview-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

body[data-page="routers"] .router-site-overview-metric {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid #dde6ee;
  border-radius: 16px;
  background: #f9fbfd;
}

body[data-page="routers"] .router-site-overview-metric dt,
body[data-page="routers"] .router-site-overview-metric dd {
  margin: 0;
}

body[data-page="routers"] .router-site-overview-metric dt {
  color: #60758a;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body[data-page="routers"] .router-site-overview-metric dd {
  color: #17364f;
  font-size: 1.55rem;
  line-height: 1;
  font-weight: 800;
}

body[data-page="routers"] .router-site-overview-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

body[data-page="routers"] .router-site-overview-toolbar-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

body[data-page="routers"] .router-site-overview-toolbar-label {
  color: #60758a;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body[data-page="routers"] .router-site-overview-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body[data-page="routers"] .router-site-overview-toolbar-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  min-height: 42px;
  border: 1px solid #d8e3ed;
  border-radius: 12px;
  background: #f9fbfd;
  color: #48667e;
  font-size: 0.84rem;
}

body[data-page="routers"] .router-site-overview-toolbar-toggle input {
  width: auto;
  min-height: auto;
}

body[data-page="routers"] .router-site-bandwidth-card {
  display: grid;
  gap: 12px;
}

body[data-page="routers"] .router-site-bandwidth-chart-frame {
  display: grid;
  gap: 10px;
}

body[data-page="routers"] .router-site-bandwidth-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

body[data-page="routers"] .router-site-panel-head h3 {
  margin: 0;
}

body[data-page="routers"] .router-site-panel-head .muted-line {
  margin: 4px 0 0;
}

body[data-page="routers"] .router-site-bandwidth-bars,
body[data-page="routers"] .router-site-top-sites-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

body[data-page="routers"] .router-site-bandwidth-row,
body[data-page="routers"] .router-site-top-site-row {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

body[data-page="routers"] .router-site-bandwidth-copy,
body[data-page="routers"] .router-site-top-site-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

body[data-page="routers"] .router-site-bandwidth-copy strong,
body[data-page="routers"] .router-site-top-site-copy strong {
  color: #17364f;
  font-size: 0.92rem;
}

body[data-page="routers"] .router-site-bandwidth-copy small,
body[data-page="routers"] .router-site-top-site-copy small,
body[data-page="routers"] .router-site-top-site-value {
  color: #5c778d;
  font-size: 0.76rem;
}

body[data-page="routers"] .router-site-bandwidth-bar,
body[data-page="routers"] .router-site-top-site-bar {
  height: 10px;
  border-radius: 999px;
  background: #e8eef4;
  overflow: hidden;
}

body[data-page="routers"] .router-site-bandwidth-bar > span,
body[data-page="routers"] .router-site-top-site-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

body[data-page="routers"] .router-site-bandwidth-bar > span {
  background: linear-gradient(90deg, #2a96d7, #7dc3ea);
}

body[data-page="routers"] .router-site-top-site-bar > span {
  background: linear-gradient(90deg, #f08a24, #f8bc78);
}

body[data-page="routers"] .router-site-empty-row {
  padding: 14px 0;
  border-top: 1px solid #e3eaf1;
}

body[data-page="routers"] .router-site-empty-row strong,
body[data-page="routers"] .router-site-empty-row p {
  display: block;
  margin: 0;
}

body[data-page="routers"] .router-site-empty-row p {
  margin-top: 4px;
  color: #5c778d;
}

body[data-page="routers"] .router-site-list-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-left: auto;
  align-items: end;
}

body[data-page="routers"] .router-monitor-utility-card {
  display: grid;
  gap: 16px;
  margin: 14px 0 18px;
  border: 1px solid #dde7ef;
  border-radius: 18px;
  background:
    radial-gradient(280px 160px at 100% -18%, rgba(162, 215, 243, 0.16), transparent 72%),
    linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

body[data-page="routers"] .router-monitor-utility-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

body[data-page="routers"] .router-monitor-utility-head h3 {
  margin: 0 0 6px;
  color: #17324a;
  font-size: 1rem;
}

body[data-page="routers"] .router-monitor-utility-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

body[data-page="routers"] .router-monitor-utility-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

body[data-page="routers"] .router-monitor-utility-stat {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid #dce6ef;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 250, 255, 0.98) 100%);
}

body[data-page="routers"] .router-monitor-utility-stat span {
  color: #678298;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body[data-page="routers"] .router-monitor-utility-stat strong {
  color: #143049;
  font-size: 1.5rem;
  line-height: 1.05;
}

body[data-page="routers"] .layout > #routerListSection,
body[data-page="routers"] .layout > #routerMonitorSection {
  min-width: 0;
}

body[data-page="routers"] .router-detail-shell {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

body[data-page="routers"] .router-detail-nav {
  position: sticky;
  top: 84px;
  display: grid;
  gap: 8px;
  align-self: start;
  padding: 14px;
  border: 1px solid #dde6ee;
  border-radius: 16px;
  background: #f8fbfd;
}

body[data-page="routers"] .router-detail-nav-title {
  margin: 0 0 4px;
  color: #60758a;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body[data-page="routers"] .router-detail-nav .secondary {
  justify-content: flex-start;
  width: 100%;
  min-height: 40px;
}

body[data-page="routers"] .router-detail-main {
  min-width: 0;
}

body[data-page="routers"] .card {
  position: relative;
  overflow: hidden;
  border-color: var(--router-card-border);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--router-card-shadow);
  animation: router-shell-enter 0.42s cubic-bezier(0.2, 0.7, 0.1, 1);
}

body[data-page="routers"] .card::before {
  display: none;
}

body[data-page="routers"] .card::after {
  display: none;
}

body[data-page="routers"] #routerListSection::before {
  background: linear-gradient(90deg, rgba(24, 150, 217, 0.92) 0%, rgba(25, 182, 149, 0.84) 100%);
}

body[data-page="routers"] #routerMonitorSection::before {
  background: linear-gradient(90deg, rgba(19, 136, 207, 0.9) 0%, rgba(15, 154, 121, 0.9) 48%, rgba(212, 137, 26, 0.84) 100%);
}

body[data-page="routers"] #routerListSection {
  animation-delay: 0.04s;
}

body[data-page="routers"] #routerMonitorSection {
  animation-delay: 0.11s;
}

body[data-page="routers"] .router-mission-card {
  padding: 24px;
  border-color: #d7e3ef;
  background:
    radial-gradient(520px 260px at -6% -10%, rgba(86, 193, 255, 0.12), transparent 56%),
    radial-gradient(420px 220px at 108% -8%, rgba(70, 219, 186, 0.08), transparent 56%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  color: var(--ink-strong);
  box-shadow: 0 20px 40px rgba(15, 37, 60, 0.08);
}

body[data-page="routers"] .router-mission-card::before {
  height: 4px;
  background: linear-gradient(90deg, rgba(51, 149, 220, 0.92) 0%, rgba(33, 173, 139, 0.88) 46%, rgba(243, 178, 67, 0.88) 100%);
}

body[data-page="routers"] .router-mission-card::after {
  width: 380px;
  height: 380px;
  right: -120px;
  top: -200px;
  background: radial-gradient(circle, rgba(144, 213, 255, 0.16) 0%, rgba(144, 213, 255, 0) 70%);
  opacity: 0.8;
}

body[data-page="routers"] .router-mission-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(330px, 0.92fr);
  gap: 22px;
  align-items: stretch;
}

body[data-page="routers"] .router-mission-copy,
body[data-page="routers"] .router-mission-side {
  display: grid;
  gap: 16px;
}

body[data-page="routers"] .router-mission-card .eyebrow {
  margin: 0;
  color: #6a8497;
  letter-spacing: 0.16em;
}

body[data-page="routers"] .router-mission-card h2,
body[data-page="routers"] .router-section-kicker + h2,
body[data-page="routers"] .router-fleet-node-top strong,
body[data-page="routers"] .router-mission-selected strong {
  font-family: "Avenir Next", "Segoe UI Variable Display", "Segoe UI", sans-serif;
  letter-spacing: -0.03em;
}

body[data-page="routers"] .router-mission-card h2 {
  margin: 0;
  max-width: 12ch;
  color: #13263a;
  font-size: clamp(2rem, 3.6vw, 3.15rem);
  line-height: 0.95;
}

body[data-page="routers"] .router-mission-summary {
  margin: 0;
  max-width: 58ch;
  color: #5b748a;
  font-size: 1rem;
  line-height: 1.65;
}

body[data-page="routers"] .router-mission-ribbon {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

body[data-page="routers"] .router-mission-ribbon-item {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid #d6e4ef;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f9fd 100%);
  color: #4f7087;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body[data-page="routers"] .router-mission-links {
  margin-top: 2px;
}

body[data-page="routers"] .router-mission-card .router-mission-links a.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid #c9dbe9;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f9fd 100%);
  color: #24415b;
  text-decoration: none;
  white-space: nowrap;
  font-weight: 700;
}

body[data-page="routers"] .router-mission-card .router-mission-links .secondary,
body[data-page="routers"] .router-mission-card .router-suite-quick-actions .secondary {
  border-color: #c9dbe9;
  background: linear-gradient(180deg, #ffffff 0%, #f4f9fd 100%);
  color: #24415b;
  box-shadow: 0 8px 16px rgba(15, 37, 60, 0.07);
}

body[data-page="routers"] .router-mission-card .router-mission-links .secondary.is-active {
  border-color: #8dc0e3;
  background: linear-gradient(155deg, #2ca1e3 0%, #1588ca 62%, #1175b2 100%);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(16, 96, 150, 0.24);
}

body[data-page="routers"] .router-mission-card .router-suite-quick-actions .secondary:not(:disabled):hover,
body[data-page="routers"] .router-mission-card .router-mission-links .secondary:hover {
  transform: translateY(-1px);
  border-color: #a9cae2;
  background: linear-gradient(180deg, #ffffff 0%, #eef7ff 100%);
}

body[data-page="routers"] .router-mission-card .router-suite-quick-actions .secondary:disabled {
  opacity: 0.44;
  filter: saturate(0.75);
}

body[data-page="routers"] .router-mission-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

body[data-page="routers"] .router-mission-stat,
body[data-page="routers"] .router-mission-selected,
body[data-page="routers"] .router-mission-selected-stat {
  border: 1px solid #d7e4ef;
  background:
    radial-gradient(220px 120px at 100% -20%, rgba(170, 218, 244, 0.12), transparent 72%),
    linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

body[data-page="routers"] .router-mission-stat {
  padding: 14px 15px;
  border-radius: 18px;
  box-shadow: 0 14px 28px rgba(8, 28, 45, 0.08);
}

body[data-page="routers"] .router-mission-stat-label,
body[data-page="routers"] .router-mission-selected-kicker,
body[data-page="routers"] .router-section-kicker {
  display: block;
  color: #6a8497;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

body[data-page="routers"] .router-section-kicker {
  margin: 0 0 4px;
  color: #5e7f93;
}

body[data-page="routers"] .router-mission-stat strong {
  display: block;
  margin-top: 10px;
  color: #16324b;
  font-size: 1.88rem;
  line-height: 1;
}

body[data-page="routers"] .router-mission-stat small {
  display: block;
  margin-top: 8px;
  color: #6a8195;
  line-height: 1.45;
}

body[data-page="routers"] .router-mission-selected {
  padding: 18px;
  border-radius: 24px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96), 0 16px 30px rgba(7, 25, 39, 0.08);
}

body[data-page="routers"] .router-mission-selected-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

body[data-page="routers"] .router-mission-selected-head strong {
  display: block;
  margin-top: 6px;
  color: #13263a;
  font-size: 1.28rem;
  line-height: 1.05;
}

body[data-page="routers"] .router-mission-selected .muted-line {
  margin: 12px 0 0;
  color: #5b748a;
}

body[data-page="routers"] .router-mission-selected-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 15px;
}

body[data-page="routers"] .router-mission-selected-stat {
  padding: 12px;
  border-radius: 16px;
}

body[data-page="routers"] .router-mission-selected-stat span {
  display: block;
  color: #6b8397;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body[data-page="routers"] .router-mission-selected-stat strong {
  display: block;
  margin-top: 8px;
  color: #16324b;
  font-size: 0.98rem;
  line-height: 1.35;
}

body[data-page="routers"] .router-mission-actions-shell {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #d8e4ef;
}

body[data-page="routers"] .router-mission-actions-note {
  margin: 0;
  color: #5b748a;
  font-size: 0.84rem;
  line-height: 1.55;
}

body[data-page="routers"] .router-mission-card .pill {
  border-color: #d3e0ea;
  background: linear-gradient(180deg, #ffffff 0%, #f2f7fb 100%);
  color: #1f3448;
}

body[data-page="routers"] .router-mission-card .pill.is-ok {
  background: rgba(39, 187, 118, 0.12);
  border-color: rgba(107, 229, 170, 0.26);
  color: #17784f;
}

body[data-page="routers"] .router-mission-card .pill.is-warn {
  background: rgba(219, 163, 58, 0.12);
  border-color: rgba(255, 210, 131, 0.26);
  color: #8c5e10;
}

body[data-page="routers"] .router-mission-card .pill.is-danger {
  background: rgba(218, 94, 76, 0.12);
  border-color: rgba(248, 156, 143, 0.3);
  color: #9f3145;
}

body[data-page="routers"] .section-header {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #d4e6f3;
  align-items: flex-start;
  flex-wrap: wrap;
}

body[data-page="routers"] .section-header h2 {
  margin: 0;
  color: var(--router-ink-strong);
  font-size: 1.24rem;
  letter-spacing: 0.01em;
}

body[data-page="routers"] #routerListSection .inline-actions {
  margin-left: auto;
  justify-content: flex-end;
}

body[data-page="routers"] .router-fleet-toolbar {
  align-items: flex-end;
}

body[data-page="routers"] .router-inline-filter {
  display: grid;
  gap: 6px;
  min-width: 150px;
}

body[data-page="routers"] .router-inline-filter span {
  color: #58788e;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body[data-page="routers"] .router-inline-filter select {
  min-height: 44px;
  border-color: #c5d8e8;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f6fbff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 8px 18px rgba(23, 75, 114, 0.08);
}

body[data-page="routers"] .router-fleet-ops-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  margin-bottom: 14px;
  padding: 16px 18px;
  border: 1px solid #d2e4f0;
  border-radius: 18px;
  background:
    radial-gradient(260px 140px at 100% -30%, rgba(166, 215, 244, 0.22), transparent 72%),
    linear-gradient(180deg, #fcfeff 0%, #f5faff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88), 0 10px 18px rgba(12, 40, 62, 0.06);
}

body[data-page="routers"] .router-fleet-ops-copy {
  display: grid;
  gap: 6px;
}

body[data-page="routers"] .router-fleet-ops-copy h3 {
  margin: 0;
  color: var(--router-ink-strong);
  font-size: 1.04rem;
}

body[data-page="routers"] .router-fleet-ops-copy .muted-line {
  margin: 0;
}

body[data-page="routers"] .router-fleet-ops-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

body[data-page="routers"] .router-batch-activity-card {
  background:
    radial-gradient(320px 180px at 100% -18%, rgba(167, 218, 244, 0.2), transparent 72%),
    linear-gradient(180deg, #fbfdff 0%, #f2f8fd 100%);
}

body[data-page="routers"] .router-batch-activity-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

body[data-page="routers"] .router-batch-activity-item,
body[data-page="routers"] .router-batch-activity-empty {
  display: grid;
  gap: 12px;
  min-height: 220px;
  padding: 18px;
  border: 1px solid #d6e6f1;
  border-radius: 20px;
  background:
    radial-gradient(220px 120px at 100% -24%, rgba(166, 214, 243, 0.18), transparent 72%),
    linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 10px 18px rgba(15, 43, 66, 0.06);
}

body[data-page="routers"] .router-batch-activity-item.is-ok {
  border-color: rgba(88, 189, 137, 0.26);
}

body[data-page="routers"] .router-batch-activity-item.is-warn {
  border-color: rgba(223, 180, 93, 0.32);
}

body[data-page="routers"] .router-batch-activity-item.is-danger {
  border-color: rgba(220, 106, 85, 0.28);
}

body[data-page="routers"] .router-batch-activity-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

body[data-page="routers"] .router-batch-activity-kicker {
  margin: 0 0 6px;
  color: #5a7a92;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

body[data-page="routers"] .router-batch-activity-head strong {
  color: var(--router-ink-strong);
  font-size: 1.05rem;
}

body[data-page="routers"] .router-batch-activity-meta {
  margin: 0;
  color: #55748c;
  line-height: 1.45;
}

body[data-page="routers"] .router-batch-activity-progress {
  height: 10px;
  border-radius: 999px;
  background: #e2edf5;
  overflow: hidden;
}

body[data-page="routers"] .router-batch-activity-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1e72a0 0%, #2bb3a8 100%);
}

body[data-page="routers"] .router-batch-activity-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body[data-page="routers"] .router-batch-activity-stats span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid #d6e4ef;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #537289;
  font-size: 0.76rem;
  font-weight: 700;
}

body[data-page="routers"] .router-batch-activity-results {
  display: grid;
  gap: 10px;
}

body[data-page="routers"] .router-batch-router-result {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d9e7f1;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
}

body[data-page="routers"] .router-batch-router-result strong {
  color: var(--router-ink-strong);
}

body[data-page="routers"] .router-batch-router-result p {
  margin: 4px 0 0;
  color: #5d7a90;
  line-height: 1.4;
}

body[data-page="routers"] .router-batch-activity-actions {
  display: flex;
  justify-content: flex-end;
}

body[data-page="routers"] #routerListSection .inline-actions input[type="search"] {
  min-width: min(380px, 100%);
  min-height: 44px;
  border-color: #c5d8e8;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f6fbff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 8px 18px rgba(23, 75, 114, 0.08);
}

body[data-page="routers"] #routerListSection .inline-actions #reloadRouters {
  min-height: 44px;
  border-radius: 14px;
}

body[data-page="routers"] .muted-line {
  color: var(--router-muted);
}

body[data-page="routers"] #routerDetailsSubtitle {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid #d0e0eb;
  border-radius: 16px;
  background:
    radial-gradient(240px 140px at 100% -36%, rgba(179, 220, 244, 0.26), transparent 74%),
    linear-gradient(180deg, #fbfdff 0%, #f3f9ff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88), 0 10px 18px rgba(11, 39, 61, 0.06);
  line-height: 1.6;
}

body[data-page="routers"] .table-wrap {
  border-color: #dbe4ed;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: none;
}

body[data-page="routers"] th {
  background: #f7f9fc;
  color: #4d6479;
}

body[data-page="routers"] tbody tr td {
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

body[data-page="routers"] tbody tr:nth-child(even) td {
  background: #f8fbff;
}

body[data-page="routers"] tbody tr:hover td {
  background: #ecf6ff;
}

body[data-page="routers"] tbody tr.router-row-selected td,
body[data-page="routers"] tbody tr.dhcp-fixed-row td {
  background: linear-gradient(180deg, #ddf0ff 0%, #d4ecff 100%);
}

body[data-page="routers"] tbody tr.router-row-selected td:first-child,
body[data-page="routers"] tbody tr.dhcp-fixed-row td:first-child {
  box-shadow: inset 4px 0 0 #1a8ece;
}

body[data-page="routers"] #routerListSection .table-wrap {
  padding: 8px 10px 12px;
  background: #ffffff;
}

body[data-page="routers"] #routerListSection .table-wrap table {
  border-collapse: separate;
  border-spacing: 0 8px;
}

body[data-page="routers"] #routerListSection th {
  padding: 0 14px 8px;
  border: 0;
  background: transparent;
  color: #59778d;
  font-size: 0.73rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body[data-page="routers"] #routerListSection tbody tr td {
  padding: 11px 12px;
  vertical-align: top;
  background: #ffffff;
  border-top: 1px solid #e1e8ef;
  border-bottom: 1px solid #e1e8ef;
}

body[data-page="routers"] #routerListSection tbody tr td:first-child {
  border-left: 1px solid #dbe8f4;
  border-radius: 18px 0 0 18px;
}

body[data-page="routers"] #routerListSection tbody tr td:last-child {
  border-right: 1px solid #dbe8f4;
  border-radius: 0 18px 18px 0;
}

body[data-page="routers"] #routerListSection tbody tr:nth-child(even) td {
  background: #fbfcfe;
}

body[data-page="routers"] #routerListSection tbody tr:hover td {
  background: #f4f7fb;
  border-color: #c9d6e2;
}

body[data-page="routers"] #routerListSection tbody tr.router-row-selected td {
  background: #edf4fb;
  border-color: #bfd0de;
}

body[data-page="routers"] #routerListSection tbody tr.router-row-selected td:first-child {
  box-shadow: inset 3px 0 0 #7da8c9;
}

body[data-page="routers"] .router-fleet-source-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

body[data-page="routers"] .router-fleet-node,
body[data-page="routers"] .router-fleet-cell,
body[data-page="routers"] .router-fleet-status-stack {
  display: grid;
  gap: 4px;
}

body[data-page="routers"] .router-fleet-node {
  min-width: 0;
}

body[data-page="routers"] .router-fleet-node-title {
  display: grid;
  gap: 3px;
}

body[data-page="routers"] .router-fleet-node-top strong,
body[data-page="routers"] .router-fleet-cell strong {
  color: var(--router-ink-strong);
  font-size: 0.94rem;
  line-height: 1.25;
}

body[data-page="routers"] .router-fleet-node-id {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid #d3e2ee;
  background: #f6fbff;
  color: #55758b;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body[data-page="routers"] .router-fleet-cell span,
body[data-page="routers"] .router-fleet-inline {
  color: #5d778c;
  font-size: 0.74rem;
  line-height: 1.35;
}

body[data-page="routers"] .router-fleet-inline.is-danger {
  color: #a34940;
  font-weight: 700;
}

body[data-page="routers"] #routerListSection .row-actions {
  display: flex;
  justify-content: flex-end;
}

body[data-page="routers"] #routerListSection .router-table-action-menu > summary,
body[data-page="routers"] .router-detail-action-menu > summary {
  border-color: #dbe4ed;
  background: #ffffff;
  color: #204a68;
}

body[data-page="routers"] #routerListSection .router-table-action-list,
body[data-page="routers"] .router-detail-action-list {
  border-color: #dbe4ed;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 33, 49, 0.05);
}

body[data-page="routers"] .router-detail-action-list {
  min-width: 330px;
  padding: 10px;
  gap: 10px;
}

body[data-page="routers"] .router-detail-action-group {
  display: grid;
  gap: 6px;
  padding: 9px;
  border: 1px solid #e1e8ef;
  border-radius: 11px;
  background: #fbfcfe;
}

body[data-page="routers"] .router-detail-action-group p {
  margin: 0;
  color: #46647c;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
}

body[data-page="routers"] .router-suite-card,
body[data-page="routers-manage"] .router-suite-card {
  display: grid;
  gap: 16px;
  border: 1px solid #cfe1ef;
  border-radius: 18px;
  background:
    radial-gradient(340px 140px at 100% -16%, rgba(31, 143, 215, 0.14), transparent 68%),
    linear-gradient(170deg, #ffffff 0%, #f3f9ff 100%);
  box-shadow: 0 16px 28px rgba(12, 42, 66, 0.08);
}

body[data-page="routers"] .router-suite-card-head,
body[data-page="routers-manage"] .router-suite-card-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

body[data-page="routers"] .router-suite-card-head h2,
body[data-page="routers-manage"] .router-suite-card-head h2 {
  margin: 0 0 6px;
}

body[data-page="routers"] .router-suite-links,
body[data-page="routers-manage"] .router-suite-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body[data-page="routers"] .router-suite-links .secondary,
body[data-page="routers-manage"] .router-suite-links .secondary,
body[data-page="routers"] .router-suite-quick-actions .secondary,
body[data-page="routers-manage"] .router-suite-quick-actions .secondary {
  min-height: 36px;
  border-radius: 999px;
}

body[data-page="routers"] .router-suite-quick-actions,
body[data-page="routers-manage"] .router-suite-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

body[data-page="routers"] .router-workspace-toolbar {
  position: sticky;
  top: 12px;
  z-index: 18;
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid #dbe4ed;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 33, 49, 0.05);
}

body[data-page="routers"] .router-workspace-mode,
body[data-page="routers"] .router-workspace-visibility {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

body[data-page="routers"] .router-workspace-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

body[data-page="routers"] .router-workspace-label {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--router-chip-border);
  background: var(--router-chip-bg);
  color: var(--router-chip-ink);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 700;
}

body[data-page="routers"] .router-workspace-toolbar .secondary {
  min-height: 31px;
  padding: 5px 10px;
  border-radius: 999px;
  border-color: #d7e1ea;
  background: #ffffff;
  color: #365a73;
  font-size: 0.77rem;
  box-shadow: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}

body[data-page="routers"] .router-workspace-toolbar .secondary:hover {
  transform: translateY(-1px);
  border-color: #aaccde;
}

body[data-page="routers"] .router-workspace-toolbar .secondary.is-active {
  border-color: #2692d3;
  background: linear-gradient(155deg, #2ca1e3 0%, #1588ca 62%, #1175b2 100%);
  color: #ffffff;
  box-shadow: 0 7px 14px rgba(16, 96, 150, 0.28);
}

body[data-page="routers"] .router-workspace-toolbar .secondary.is-off {
  opacity: 0.52;
  filter: saturate(0.8);
}

body[data-page="routers"] .router-workspace-toolbar .muted-line {
  margin: 0;
  font-size: 0.78rem;
}

body[data-page="routers"] .router-workspace-group {
  display: grid;
  gap: 14px;
}

body[data-page="routers"] #routerMonitorSection {
  padding: 20px 22px;
}

body[data-page="routers"] #routerMonitorSection .section-header {
  margin-bottom: 16px;
}

body[data-page="routers"] [data-router-workspace-block]:not(.hidden) {
  animation: router-block-pop 0.28s ease both;
}

body[data-page="routers"] #routerMonitorSection.router-workspace-focus .router-detail-main > #routerDetailsSubtitle,
body[data-page="routers"] #routerMonitorSection.router-workspace-focus .router-detail-main > .router-monitor-scopes {
  display: none;
}

body[data-page="routers"] #routerMonitorSection.router-workspace-focus .router-detail-action-wrap {
  display: none;
}

body[data-page="routers"] #routerMonitorSection.router-workspace-focus .router-detail-main > .router-slo-widget-card,
body[data-page="routers"] #routerMonitorSection.router-workspace-focus .router-detail-main > .router-focus-grid,
body[data-page="routers"] #routerMonitorSection.router-workspace-focus .router-detail-main > .router-dhcp-card,
body[data-page="routers"] #routerMonitorSection.router-workspace-focus .router-detail-main > .router-workspace-group,
body[data-page="routers"] #routerMonitorSection.router-workspace-focus .router-detail-main > #routerTrafficSection {
  display: none;
}

body[data-page="routers"] #routerPageRoot.router-workspace-focus #routerListSection .router-fleet-ops-bar {
  display: none;
}

body[data-page="routers"] #routerPageRoot.router-workspace-focus #routerListSection > .section-header,
body[data-page="routers"] #routerPageRoot.router-workspace-focus #routerListSection #routerListMeta {
  display: none;
}

body[data-page="routers"] #routerPageRoot.router-workspace-focus .router-unifi-sidebar-stats,
body[data-page="routers"] #routerPageRoot.router-workspace-focus .router-unifi-sidebar-actions {
  display: none;
}

body[data-page="routers"] #routerMonitorSection.router-workspace-focus .router-detail-main > #routerWorkspaceToolbar .router-workspace-visibility {
  display: none;
}

body[data-page="routers"] #routerMonitorSection.router-workspace-focus .embedded-card {
  padding: 10px;
}

body[data-page="routers"] #routerMonitorSection.router-workspace-focus .router-tab-shell {
  margin: 10px 0 8px;
}

body[data-page="routers"] .router-monitor-scopes {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: -1px 0 13px;
}

body[data-page="routers"] .router-monitor-scope {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--router-chip-border);
  background: var(--router-chip-bg);
  color: #2e4d65;
  font-size: 0.69rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 700;
}

body[data-page="routers"] .router-monitor-scope.is-operational {
  border-color: #abd0e8;
  background: #e9f5ff;
  color: #0f5f96;
}

body[data-page="routers"] .router-monitor-scope.is-threat {
  border-color: #ebd5a0;
  background: #fff6e3;
  color: #8f6006;
}

body[data-page="routers"] .router-monitor-scope.is-network {
  border-color: #badfcf;
  background: #ebf9f2;
  color: #17714f;
}

body[data-page="routers"] .router-monitor-scope.is-history {
  border-color: #d2dde7;
  background: #f2f6fa;
  color: #425c72;
}

body[data-page="routers"] .monitor-cards .router-monitor-card {
  border-color: #cfe2f1;
  border-radius: 15px;
  box-shadow: 0 8px 16px rgba(16, 43, 67, 0.1);
}

body[data-page="routers"] .monitor-cards .router-monitor-card.kpi-ros,
body[data-page="routers"] .monitor-cards .router-monitor-card.kpi-model {
  background:
    radial-gradient(240px 145px at 108% -10%, rgba(49, 156, 223, 0.2) 0%, transparent 62%),
    linear-gradient(162deg, #ffffff 0%, #eff8ff 78%, #e8f3ff 100%);
}

body[data-page="routers"] .monitor-cards .router-monitor-card.kpi-uptime,
body[data-page="routers"] .monitor-cards .router-monitor-card.kpi-memory {
  background:
    radial-gradient(240px 145px at 108% -10%, rgba(24, 168, 128, 0.18) 0%, transparent 62%),
    linear-gradient(162deg, #ffffff 0%, #eefcf7 78%, #e6f6ef 100%);
}

body[data-page="routers"] .monitor-cards .router-monitor-card.kpi-cpu,
body[data-page="routers"] .monitor-cards .router-monitor-card.kpi-disk {
  background:
    radial-gradient(240px 145px at 108% -10%, rgba(219, 145, 28, 0.2) 0%, transparent 62%),
    linear-gradient(162deg, #ffffff 0%, #fff9ef 78%, #fdf1dd 100%);
}

body[data-page="routers"] .monitor-cards .router-monitor-card strong {
  color: var(--router-ink-strong);
}

@media (hover: hover) and (pointer: fine) {
  body[data-page="routers"] .monitor-cards .router-monitor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 26px rgba(10, 40, 64, 0.17);
  }
}

body[data-page="routers"] .embedded-card {
  border-color: #d1e4f2;
  border-radius: 16px;
  background: linear-gradient(175deg, #fcfeff 0%, #f3f9ff 100%);
  box-shadow: 0 10px 18px rgba(13, 43, 67, 0.08);
}

body[data-page="routers"] .embedded-card h3 {
  color: #163a55;
}

body[data-page="routers"] .router-focus-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 14px;
  align-items: stretch;
}

body[data-page="routers"] #routerSecurityRadarCard {
  border-color: #c8deef;
  background:
    radial-gradient(300px 155px at 87% -20%, rgba(168, 212, 239, 0.44), transparent 72%),
    linear-gradient(180deg, #fcfeff 0%, #f1f8ff 100%);
}

body[data-page="routers"] #routerTrafficSection {
  border-color: #c4ddf0;
  background:
    radial-gradient(300px 160px at 10% -24%, rgba(161, 214, 248, 0.36), transparent 72%),
    linear-gradient(180deg, #fbfeff 0%, #eff7ff 100%);
}

body[data-page="routers"] #routerTrafficInsightsCard {
  grid-column: 1 / -1;
  margin: 0 0 14px;
  position: relative;
  z-index: 0;
  border-color: #dbe4ed;
  background: #ffffff;
}

body[data-page="routers"] .router-traffic-insights-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

body[data-page="routers"] .router-traffic-insights-head h3 {
  margin: 0;
}

body[data-page="routers"] .router-traffic-insights-summary {
  margin: 4px 0 0;
  color: #4f728a;
  font-size: 0.77rem;
}

body[data-page="routers"] .router-traffic-insights-summary,
body[data-page="routers"] .router-traffic-insights-meta {
  max-width: 74ch;
}

body[data-page="routers"] .router-traffic-insights-meta {
  margin: 0 0 8px;
  color: #587690;
  font-size: 0.74rem;
}

body[data-page="routers"] .router-traffic-insights-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

body[data-page="routers"] .router-traffic-insights-kpi {
  border: 1px solid #d8e5ef;
  border-radius: 13px;
  padding: 9px 10px;
  background: #fafcfe;
}

body[data-page="routers"] .router-traffic-insights-kpi p {
  margin: 0;
  color: #5a7388;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
}

body[data-page="routers"] .router-traffic-insights-kpi strong {
  display: block;
  margin-top: 5px;
  color: #17364f;
  font-size: 1.05rem;
}

body[data-page="routers"] .router-traffic-insights-kpi small {
  display: block;
  margin-top: 4px;
  color: #5d7b90;
  font-size: 0.7rem;
}

body[data-page="routers"] .router-traffic-insights-protocols {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 4px;
}

body[data-page="routers"] .router-traffic-insights-protocols .pill {
  font-size: 0.68rem;
}

body[data-page="routers"] .router-traffic-insights-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

body[data-page="routers"] .router-traffic-insights-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid #d8e4ee;
  border-radius: 14px;
  padding: 9px;
  background: #ffffff;
  box-shadow: none;
}

body[data-page="routers"] .router-traffic-insights-panel::before {
  content: '';
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--traffic-accent, #7db6de), transparent);
}

body[data-page="routers"] .router-traffic-insights-panel.is-wide {
  grid-column: 1 / -1;
}

body[data-page="routers"] .router-traffic-insights-panel h4 {
  margin: 0 0 8px;
  color: #35556d;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body[data-page="routers"] .router-traffic-insights-list,
body[data-page="routers"] .router-traffic-insights-connection-list {
  display: grid;
  gap: 8px;
}

body[data-page="routers"] .router-traffic-insights-row,
body[data-page="routers"] .router-traffic-insights-connection {
  border: 1px solid #d9e6ef;
  border-left-width: 4px;
  border-left-color: var(--traffic-accent, #b7cde0);
  border-radius: 12px;
  padding: 7px 9px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fcff 100%);
}

body[data-page="routers"] .router-traffic-insights-row-head,
body[data-page="routers"] .router-traffic-insights-connection-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

body[data-page="routers"] .router-traffic-insights-row strong,
body[data-page="routers"] .router-traffic-insights-connection strong {
  display: block;
  color: #1d3b53;
  font-size: 0.84rem;
}

body[data-page="routers"] .router-traffic-insights-row small,
body[data-page="routers"] .router-traffic-insights-connection small {
  display: block;
  margin-top: 2px;
  color: #5b748b;
  font-size: 0.72rem;
  line-height: 1.35;
}

body[data-page="routers"] .router-traffic-insights-row-bar {
  height: 6px;
  margin-top: 8px;
  border-radius: 999px;
  background: rgba(85, 120, 145, 0.12);
  overflow: hidden;
}

body[data-page="routers"] .router-traffic-insights-row-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--traffic-accent, #7db6de), rgba(125, 182, 222, 0.34));
}

body[data-page="routers"] .router-traffic-insights-empty {
  font-size: 0.76rem;
  color: #5b748b;
  padding: 6px 2px;
}

body[data-page="routers"] #routerDhcpSection {
  border-color: #c8e2df;
  background:
    radial-gradient(280px 160px at 88% -22%, rgba(178, 231, 219, 0.3), transparent 72%),
    linear-gradient(180deg, #fdfffe 0%, #f1faf6 100%);
}

body[data-page="routers"] .router-tab-shell {
  margin: 14px 0 12px;
  padding: 11px 12px;
  border: 1px solid #cbdff0;
  border-radius: 16px;
  background:
    radial-gradient(250px 135px at 100% -30%, rgba(178, 220, 244, 0.28), transparent 75%),
    linear-gradient(180deg, #f9fdff 0%, #eef6fd 100%);
}

body[data-page="routers"] .router-tab-shell-title {
  margin-bottom: 8px;
  color: #3e607a;
}

body[data-page="routers"] .router-history-tabs {
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
}

body[data-page="routers"] .router-history-tabs button {
  border: 1px solid #ccdeee;
  background: #f4f9ff;
  color: #33576f;
  border-radius: 999px;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

body[data-page="routers"] .router-history-tabs button:hover {
  transform: translateY(-1px);
}

body[data-page="routers"] .router-history-tabs button.is-active {
  border-color: #2593d4;
  background: linear-gradient(160deg, #2fa8e8 0%, #1487c8 64%, #1174af 100%);
  color: #ffffff;
  box-shadow: 0 8px 15px rgba(19, 95, 149, 0.25);
}

body[data-page="routers"] .router-history-panel {
  border: 1px solid #d3e5f3;
  border-radius: 15px;
  box-shadow: 0 9px 17px rgba(14, 43, 67, 0.08);
}

body[data-page="routers"] .router-logs-filters,
body[data-page="routers"] .router-temp-blocklist-controls,
body[data-page="routers"] .router-security-profile-controls,
body[data-page="routers"] .router-global-allowlist-controls {
  padding: 10px;
  border: 1px solid #d1e3f2;
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfdff 0%, #f1f7ff 100%);
}

body[data-page="routers"] .router-temp-blocklist-card {
  border-color: #cadff0;
  border-radius: 14px;
  background: linear-gradient(180deg, #fcfeff 0%, #f2f8ff 100%);
}

body[data-page="routers"] .router-security-summary-card.is-neutral,
body[data-page="routers"] .router-security-summary-card.is-loading,
body[data-page="routers"] .router-security-summary-card:not(.is-ok):not(.is-warn):not(.is-danger) {
  border-color: #bed7ea;
  background:
    radial-gradient(260px 120px at 100% -38%, rgba(165, 214, 245, 0.36), transparent 75%),
    linear-gradient(180deg, #fdfeff 0%, #eff7ff 100%);
}

body[data-page="routers"] .router-security-assistant-card {
  border-color: #bfd5e7;
  background:
    radial-gradient(220px 110px at 104% -30%, rgba(158, 209, 245, 0.28), transparent 72%),
    linear-gradient(180deg, #fbfeff 0%, #ecf5ff 100%);
}

body[data-page="routers"] .router-security-toolbar {
  border-color: #cbdeee;
  border-radius: 12px;
  background:
    radial-gradient(240px 140px at 102% -36%, rgba(178, 220, 244, 0.36), transparent 75%),
    linear-gradient(180deg, #fcfeff 0%, #f1f8ff 100%);
}

body[data-page="routers"] .router-mitigation-queue-card {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #cddeec;
}

body[data-page="routers"] .pill {
  border-color: #bfd5e6;
  background: #edf6fd;
  color: #2a4d65;
}

@media (max-width: 1280px) {
  body[data-page="routers"] .router-mission-grid {
    grid-template-columns: 1fr;
  }

  body[data-page="routers"] .router-focus-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  body[data-page="dashboard"] .dashboard-pulse-item-head {
    flex-direction: column;
  }

  body[data-page="routers"] .router-mission-card {
    padding: 20px;
  }

  body[data-page="routers"] .router-mission-card h2 {
    max-width: none;
  }

  body[data-page="routers"] .router-mission-actions-shell {
    margin-top: 14px;
  }

  body[data-page="routers"] .router-workspace-toolbar {
    position: static;
    margin-bottom: 10px;
    padding: 9px 10px;
  }

  body[data-page="routers"] .router-workspace-mode,
  body[data-page="routers"] .router-workspace-visibility {
    gap: 5px;
  }

  body[data-page="routers"] .router-workspace-label {
    min-height: 27px;
    font-size: 0.65rem;
  }

  body[data-page="routers"] .router-workspace-toolbar .secondary {
    min-height: 29px;
    font-size: 0.74rem;
  }

  body[data-page="routers"] .router-tab-shell {
    padding: 8px 10px;
  }

  body[data-page="routers"] .table-wrap {
    border-radius: 13px;
  }

  body[data-page="routers"] #routerListSection .inline-actions {
    width: 100%;
    justify-content: flex-start;
  }

  body[data-page="routers"] .router-fleet-ops-bar {
    grid-template-columns: 1fr;
  }

  body[data-page="routers"] .router-fleet-ops-actions {
    justify-content: flex-start;
  }

  body[data-page="routers"] .router-traffic-insights-kpis,
  body[data-page="routers"] .router-traffic-insights-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-page="routers"] #routerListSection .inline-actions input[type="search"] {
    min-width: 0;
    flex: 1 1 100%;
  }

  body[data-page="routers"] #routerListSection .table-wrap {
    padding: 6px;
  }
}

@media (max-width: 700px) {
  body[data-page="routers"] .router-mission-card {
    padding: 18px;
  }

  body[data-page="routers"] .router-mission-ribbon,
  body[data-page="routers"] .router-mission-links,
  body[data-page="routers"] .router-mission-selected-head,
  body[data-page="routers"] .router-mission-actions-shell {
    gap: 8px;
  }

  body[data-page="routers"] .router-mission-stat-grid,
  body[data-page="routers"] .router-mission-selected-grid {
    grid-template-columns: 1fr;
  }

  body[data-page="routers"] .router-fleet-node-top--actions {
    flex-direction: column;
    align-items: flex-start;
  }

  body[data-page="routers"] .router-mission-links .secondary,
  body[data-page="routers"] .router-suite-quick-actions .secondary,
  body[data-page="routers"] .router-fleet-ops-actions .secondary {
    width: 100%;
    justify-content: center;
  }

  body[data-page="routers"] .card {
    border-radius: 16px;
  }

  body[data-page="routers"] .card::before {
    height: 4px;
  }

  body[data-page="routers"] .section-header {
    margin-bottom: 10px;
    padding-bottom: 8px;
  }

  body[data-page="routers"] .router-workspace-toolbar {
    gap: 7px;
  }

  body[data-page="routers"] .router-workspace-mode,
  body[data-page="routers"] .router-workspace-visibility {
    align-items: stretch;
  }

  body[data-page="routers"] .router-workspace-label {
    width: 100%;
    justify-content: center;
  }

  body[data-page="routers"] .router-workspace-toolbar .secondary {
    flex: 1 1 140px;
    justify-content: center;
  }

  body[data-page="routers"] .router-detail-action-list {
    min-width: 0;
  }

  body[data-page="routers"] .router-monitor-scopes {
    margin-bottom: 10px;
  }

  body[data-page="routers"] #routerListSection .table-wrap {
    padding: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-page="routers"] .card,
  body[data-page="routers"] [data-router-workspace-block]:not(.hidden),
  body[data-page="routers"] .card::after {
    animation: none;
  }

  body[data-page="routers"] .router-history-tabs button,
  body[data-page="routers"] .router-workspace-toolbar .secondary,
  body[data-page="routers"] .monitor-cards .router-monitor-card {
    transition: none;
  }
}

.grid-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.grid-form > .embedded-card {
  grid-column: span 2;
}

.grid-form > button,
.grid-form > p,
.grid-form > label.checkbox-inline {
  grid-column: span 2;
}

.company-form-block h3 {
  margin-bottom: 4px;
}

.company-hero-card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(255, 213, 115, 0.36), transparent 38%),
    linear-gradient(135deg, #0f314c 0%, #184c73 52%, #226289 100%);
  color: #f5fbff;
}

.company-hero-card::after {
  content: '';
  position: absolute;
  inset: auto -80px -120px auto;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  filter: blur(6px);
}

.company-hero-card .eyebrow,
.company-hero-card h2,
.company-hero-card .muted-line,
.company-hero-card h3,
.company-hero-card small,
.company-hero-card span,
.company-hero-card strong,
.company-hero-card p {
  color: inherit;
}

.company-hero-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.company-hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.company-hero-actions .pill {
  margin: 0;
}

.company-hero-card .secondary {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.2);
  color: #eef8ff;
}

.company-hero-card .secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

.company-summary-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.company-summary-card {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  padding: 16px;
  display: grid;
  gap: 4px;
}

.company-summary-card span,
.company-summary-card small {
  color: rgba(236, 247, 255, 0.82);
}

.company-summary-card strong {
  font-size: 1.9rem;
  line-height: 1;
}

.company-access-panel {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: rgba(4, 20, 33, 0.24);
  padding: 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.company-access-panel h3 {
  margin-bottom: 4px;
}

.company-access-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.company-access-list .pill {
  margin: 0;
}

.company-list-actions {
  align-items: stretch;
}

.company-list-actions select {
  min-width: 190px;
}

.company-list-grid {
  display: grid;
  gap: 16px;
}

.company-list-card,
.company-list-empty {
  border: 1px solid #d9e6ef;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  padding: 18px;
  box-shadow: 0 18px 28px rgba(13, 44, 68, 0.06);
}

.company-list-card.is-owned {
  border-color: #c3def3;
  box-shadow: 0 18px 32px rgba(18, 77, 116, 0.1);
}

.company-list-card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.company-list-card-title {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.company-list-card-title h3 {
  margin: 0;
  color: #133a59;
  word-break: break-word;
}

.company-list-card-badges,
.company-card-unit-pills,
.company-unit-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.company-list-card-badges .pill,
.company-card-unit-pills .pill,
.company-unit-card-badges .pill {
  margin: 0;
}

.company-card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.company-card-grid,
.company-unit-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.company-card-stat,
.company-unit-card-grid > div {
  border: 1px solid #e1ebf3;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  padding: 12px 14px;
  min-width: 0;
}

.company-card-stat strong,
.company-unit-card-grid strong {
  display: block;
  color: #173d5b;
  word-break: break-word;
}

.company-card-label {
  display: block;
  margin-bottom: 6px;
  color: #668096;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.company-card-units {
  margin-top: 16px;
  border-top: 1px solid #e4edf4;
  padding-top: 14px;
}

.company-list-empty h3 {
  margin-bottom: 6px;
  color: #173d5b;
}

.company-unit-list {
  margin-top: 14px;
}

.company-unit-board {
  display: grid;
  gap: 12px;
}

.company-unit-card {
  border: 1px solid #dbe8f1;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
  padding: 16px;
}

.company-unit-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.company-unit-card-head strong {
  color: #193d59;
}

.company-unit-card-id {
  color: #6a8194;
  font-size: 0.82rem;
  font-weight: 700;
}

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

.company-form-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.company-form-grid .company-field-mini,
.company-form-grid .company-field-short,
.company-form-grid .company-field-medium,
.company-form-grid .company-field-coordinate {
  justify-self: start;
  width: 100%;
}

.company-form-grid .company-field-mini {
  max-width: 110px;
}

.company-form-grid .company-field-short {
  max-width: 170px;
}

.company-form-grid .company-field-medium {
  max-width: 240px;
}

.company-form-grid .company-field-coordinate {
  max-width: 220px;
}

body[data-page="companies"] #companyEditStatusWrap {
  grid-column: 1 / -1;
}

.company-branches-list {
  display: grid;
  gap: 10px;
}

.company-branch-row {
  border: 1px solid #d5e4f1;
  border-radius: 12px;
  background: #ffffff;
  padding: 10px;
}

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

.company-unit-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.user-form-block h3 {
  margin-bottom: 4px;
}

.user-hero-card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(255, 229, 160, 0.3), transparent 34%),
    linear-gradient(135deg, #12324a 0%, #145268 46%, #1f756d 100%);
  color: #f4fbfb;
}

.user-hero-card::after {
  content: '';
  position: absolute;
  inset: auto auto -140px -80px;
  width: 280px;
  height: 280px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  filter: blur(10px);
}

.user-hero-card .eyebrow,
.user-hero-card h2,
.user-hero-card .muted-line,
.user-hero-card h3,
.user-hero-card small,
.user-hero-card span,
.user-hero-card strong,
.user-hero-card p {
  color: inherit;
}

.user-hero-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.user-hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.user-hero-actions .pill {
  margin: 0;
}

.user-hero-card .secondary {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
  color: #eefaf8;
}

.user-hero-card .secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

.user-summary-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.user-summary-card {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  padding: 16px;
  display: grid;
  gap: 4px;
}

.user-summary-card span,
.user-summary-card small {
  color: rgba(236, 249, 247, 0.84);
}

.user-summary-card strong {
  font-size: 1.9rem;
  line-height: 1;
}

.user-access-panel {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: rgba(4, 28, 35, 0.24);
  padding: 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.user-access-panel h3 {
  margin-bottom: 4px;
}

.user-access-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.user-access-list .pill {
  margin: 0;
}

.user-list-actions {
  align-items: stretch;
}

.user-list-actions select {
  min-width: 190px;
}

.user-list-grid {
  display: grid;
  gap: 16px;
}

.user-list-card,
.user-list-empty {
  border: 1px solid #d9e6ef;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  padding: 18px;
  box-shadow: 0 18px 28px rgba(13, 44, 68, 0.06);
}

.user-list-card.is-owned {
  border-color: #c3e6df;
  box-shadow: 0 18px 32px rgba(22, 101, 105, 0.12);
}

.user-list-card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.user-list-card-title {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.user-list-card-title h3 {
  margin: 0;
  color: #133a59;
  word-break: break-word;
}

.user-list-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.user-list-card-badges .pill {
  margin: 0;
}

.user-card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.user-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.user-card-stat {
  border: 1px solid #e1ebf3;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  padding: 12px 14px;
  min-width: 0;
}

.user-card-stat strong {
  display: block;
  color: #173d5b;
  word-break: break-word;
}

.user-card-label {
  display: block;
  margin-bottom: 6px;
  color: #668096;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.user-list-empty h3 {
  margin-bottom: 6px;
  color: #173d5b;
}

.user-form-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.user-form-grid .user-field-medium,
.user-form-grid .password-input-wrap {
  justify-self: start;
  width: 100%;
}

.user-form-grid .user-field-medium {
  max-width: 240px;
}

.user-inline-checks .checkbox-inline,
body[data-page="users"] #userGlobalWrap,
body[data-page="users"] #editUserGlobalWrap {
  grid-column: 1 / -1;
}

.user-form-actions {
  grid-column: span 2;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.user-form-actions button {
  flex: 0 0 auto;
}

body[data-page="logs"] {
  --audit-bg-top: #f5f8ff;
  --audit-bg-mid: #edf4ff;
  --audit-bg-bottom: #f7fbf5;
  --audit-card-border: #caddeb;
  --audit-card-shadow: 0 16px 32px rgba(12, 38, 61, 0.12);
  background:
    radial-gradient(940px 450px at -10% -6%, rgba(40, 134, 221, 0.18), transparent 62%),
    radial-gradient(880px 460px at 108% -4%, rgba(26, 148, 118, 0.12), transparent 62%),
    linear-gradient(165deg, var(--audit-bg-top) 0%, var(--audit-bg-mid) 56%, var(--audit-bg-bottom) 100%);
}

body[data-page="logs"] .layout {
  gap: 20px;
}

body[data-page="logs"] .card {
  position: relative;
  overflow: hidden;
  border-color: var(--audit-card-border);
  border-radius: 20px;
  background: linear-gradient(170deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: var(--audit-card-shadow);
}

body[data-page="logs"] .card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, rgba(24, 135, 216, 0.92) 0%, rgba(16, 164, 116, 0.88) 58%, rgba(214, 146, 33, 0.82) 100%);
}

body[data-page="logs"] .card::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -110px;
  top: -140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(112, 191, 238, 0.3) 0%, rgba(112, 191, 238, 0) 68%);
  pointer-events: none;
  opacity: 0.3;
}

body[data-page="logs"] .audit-hero-card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(255, 226, 152, 0.32), transparent 38%),
    linear-gradient(135deg, #11314a 0%, #155974 46%, #1c6a59 100%);
  color: #f4fbff;
}

body[data-page="logs"] .audit-hero-card::after {
  content: '';
  position: absolute;
  inset: auto -96px -124px auto;
  width: 300px;
  height: 300px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  filter: blur(10px);
}

.audit-hero-card .eyebrow,
.audit-hero-card h2,
.audit-hero-card .muted-line,
.audit-hero-card h3,
.audit-hero-card small,
.audit-hero-card span,
.audit-hero-card strong,
.audit-hero-card p {
  color: inherit;
}

.audit-hero-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.audit-hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.audit-hero-actions .pill {
  margin: 0;
}

.audit-summary-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.audit-summary-card {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  padding: 16px;
  display: grid;
  gap: 4px;
}

.audit-summary-card span,
.audit-summary-card small {
  color: rgba(236, 248, 255, 0.84);
}

.audit-summary-card strong {
  font-size: 1.9rem;
  line-height: 1;
}

.audit-access-panel {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: rgba(4, 24, 37, 0.24);
  padding: 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.audit-access-panel h3 {
  margin-bottom: 4px;
}

.audit-access-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.audit-access-list .pill {
  margin: 0;
}

.audit-filter-shell {
  margin-bottom: 16px;
}

.audit-log-filter-form {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.audit-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.audit-filter-actions button {
  flex: 0 0 auto;
}

.audit-log-list-grid {
  display: grid;
  gap: 16px;
}

.audit-log-list-card,
.audit-log-list-empty {
  border: 1px solid #d9e6ef;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  padding: 18px;
  box-shadow: 0 18px 28px rgba(13, 44, 68, 0.06);
}

.audit-log-list-card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.audit-log-list-card-title {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.audit-log-list-card-title h3 {
  margin: 0;
  color: #133a59;
  word-break: break-word;
}

.audit-log-list-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.audit-log-list-card-badges .pill {
  margin: 0;
}

.audit-log-list-card-side {
  display: grid;
  justify-items: end;
  align-content: flex-start;
  gap: 8px;
  min-width: 150px;
}

.audit-log-card-date {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 12px;
  border: 1px solid #d7e5f0;
  background: rgba(255, 255, 255, 0.9);
  color: #183e5d;
  font-weight: 700;
  text-align: center;
}

.audit-log-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.audit-log-card-stat {
  border: 1px solid #e1ebf3;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  padding: 12px 14px;
  min-width: 0;
}

.audit-log-card-stat strong {
  display: block;
  color: #173d5b;
  word-break: break-word;
}

.audit-log-card-label {
  display: block;
  margin-bottom: 6px;
  color: #668096;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.audit-log-card-details {
  margin-top: 16px;
  border-top: 1px solid #e0ebf3;
  padding-top: 12px;
}

.audit-log-card-details summary {
  cursor: pointer;
  color: #0f6197;
  font-size: 0.82rem;
  font-weight: 700;
}

.audit-log-card-details-body {
  margin-top: 10px;
  display: grid;
  gap: 6px;
  color: #2f4a61;
  font-size: 0.82rem;
}

.audit-log-card-details-body p {
  margin: 0;
  word-break: break-word;
}

.audit-log-list-empty h3 {
  margin-bottom: 6px;
  color: #173d5b;
}

body[data-page="logs"] .dashboard-shell {
  grid-template-columns: 318px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

body[data-page="logs"] .sidebar-column {
  gap: 12px;
}

body[data-page="logs"] .sidebar.card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

body[data-page="logs"] .audit-sidebar-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

body[data-page="logs"] .audit-sidebar-head h1 {
  margin: 2px 0 0;
  font-size: 1.36rem;
  line-height: 1.02;
}

body[data-page="logs"] .audit-sidebar-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

body[data-page="logs"] .audit-sidebar-summary-card {
  padding: 12px;
}

body[data-page="logs"] .audit-sidebar-summary-card strong {
  font-size: 1.42rem;
}

body[data-page="logs"] .audit-sidebar-section {
  display: grid;
  gap: 10px;
}

body[data-page="logs"] .audit-sidebar-section-head {
  display: grid;
  gap: 4px;
}

body[data-page="logs"] .audit-sidebar-kicker {
  color: #6b8295;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

body[data-page="logs"] .audit-preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body[data-page="logs"] .audit-preset-row .secondary {
  min-height: 34px;
  padding: 0 12px;
}

body[data-page="logs"] .audit-filter-shell {
  margin-bottom: 0;
  border-color: #d7e4ef;
  background:
    radial-gradient(220px 120px at 100% -20%, rgba(170, 218, 244, 0.12), transparent 72%),
    linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 10px 18px rgba(15, 37, 60, 0.08);
}

body[data-page="logs"] .audit-filter-head {
  margin-bottom: 0;
}

body[data-page="logs"] .audit-log-filter-form {
  grid-template-columns: 1fr;
}

body[data-page="logs"] .audit-log-filter-form input,
body[data-page="logs"] .audit-log-filter-form select {
  min-height: 40px;
  border-radius: 12px;
}

body[data-page="logs"] .audit-filter-actions {
  justify-content: stretch;
}

body[data-page="logs"] .audit-filter-actions button {
  flex: 1 1 0;
}

body[data-page="logs"] .audit-access-panel {
  padding: 14px;
}

body[data-page="logs"] .audit-log-board {
  display: grid;
  gap: 14px;
  min-height: calc(100vh - 110px);
}

body[data-page="logs"] .audit-log-board-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

body[data-page="logs"] .audit-log-board-head h2 {
  margin: 0;
  color: #173047;
  font-family: "Avenir Next", "Segoe UI Variable Display", "Segoe UI", sans-serif;
  font-size: clamp(1.7rem, 2.8vw, 2.45rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

body[data-page="logs"] .audit-log-board-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

body[data-page="logs"] .audit-log-table-wrap {
  overflow: auto;
  border-radius: 18px;
  border: 1px solid #dde6ee;
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  box-shadow: 0 10px 20px rgba(15, 37, 60, 0.05);
}

body[data-page="logs"] .audit-log-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

body[data-page="logs"] .audit-log-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 12px 14px;
  border-bottom: 1px solid #dde6ee;
  background: linear-gradient(180deg, #f9fbfd 0%, #edf3f8 100%);
  color: #5a7287;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-align: left;
}

body[data-page="logs"] .audit-log-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid #e7edf3;
  background: #ffffff;
  vertical-align: top;
}

body[data-page="logs"] .audit-log-row:hover td {
  background: #f7fbff;
}

body[data-page="logs"] .audit-log-table th:nth-child(1),
body[data-page="logs"] .audit-log-table td:nth-child(1) {
  width: 14%;
}

body[data-page="logs"] .audit-log-table th:nth-child(2),
body[data-page="logs"] .audit-log-table td:nth-child(2) {
  width: 18%;
}

body[data-page="logs"] .audit-log-table th:nth-child(3),
body[data-page="logs"] .audit-log-table td:nth-child(3) {
  width: 46%;
}

body[data-page="logs"] .audit-log-table th:nth-child(4),
body[data-page="logs"] .audit-log-table td:nth-child(4) {
  width: 12%;
}

body[data-page="logs"] .audit-log-table th:nth-child(5),
body[data-page="logs"] .audit-log-table td:nth-child(5) {
  width: 10%;
}

body[data-page="logs"] .audit-cell-stack {
  display: grid;
  gap: 6px;
}

body[data-page="logs"] .audit-cell-subtle {
  color: #5f7588;
  font-size: 0.8rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="logs"] .audit-cell-message-main {
  color: #173047;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="logs"] .audit-cell-message-meta {
  margin-top: 5px;
  color: #667a8c;
  font-size: 0.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="logs"] .audit-event-code {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.79rem;
}

body[data-page="logs"] .audit-severity {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  font-weight: 800;
}

body[data-page="logs"] .audit-severity-info {
  color: #285f86;
  background: #e4f1fb;
}

body[data-page="logs"] .audit-severity-warning {
  color: #8f5c09;
  background: #fff1d9;
}

body[data-page="logs"] .audit-severity-security {
  color: #0f6f52;
  background: #e3f7ee;
}

body[data-page="logs"] .audit-severity-error {
  color: #9d2437;
  background: #ffe5ea;
}

body[data-page="logs"] .audit-log-empty-row td {
  padding: 14px;
  background: #fafcff;
}

body[data-page="releases"] {
  --release-bg-top: #f6f9ff;
  --release-bg-mid: #eef5ff;
  --release-bg-bottom: #f6fbf4;
  --release-card-border: #c9ddec;
  --release-card-shadow: 0 16px 32px rgba(13, 39, 63, 0.12);
  background:
    radial-gradient(940px 450px at -10% -6%, rgba(44, 128, 214, 0.18), transparent 62%),
    radial-gradient(860px 460px at 108% -4%, rgba(17, 148, 113, 0.12), transparent 62%),
    linear-gradient(165deg, var(--release-bg-top) 0%, var(--release-bg-mid) 56%, var(--release-bg-bottom) 100%);
}

body[data-page="releases"] .layout {
  gap: 20px;
}

body[data-page="releases"] .card {
  position: relative;
  overflow: hidden;
  border-color: var(--release-card-border);
  border-radius: 20px;
  background: linear-gradient(170deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: var(--release-card-shadow);
}

body[data-page="releases"] .card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, rgba(28, 142, 219, 0.92) 0%, rgba(24, 164, 116, 0.9) 58%, rgba(217, 150, 41, 0.82) 100%);
}

body[data-page="releases"] .card::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -110px;
  top: -140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(112, 191, 238, 0.3) 0%, rgba(112, 191, 238, 0) 68%);
  pointer-events: none;
  opacity: 0.3;
}

body[data-page="releases"] .release-hero-card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(255, 224, 150, 0.32), transparent 38%),
    linear-gradient(135deg, #112f49 0%, #165773 46%, #186c63 100%);
  color: #f4fbff;
}

body[data-page="releases"] .release-hero-card::after {
  content: '';
  position: absolute;
  inset: auto -96px -124px auto;
  width: 300px;
  height: 300px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  filter: blur(10px);
}

.release-hero-card .eyebrow,
.release-hero-card h2,
.release-hero-card .muted-line,
.release-hero-card h3,
.release-hero-card small,
.release-hero-card span,
.release-hero-card strong,
.release-hero-card p {
  color: inherit;
}

.release-hero-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.release-hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.release-hero-actions .pill {
  margin: 0;
}

.release-summary-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.release-summary-card {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  padding: 16px;
  display: grid;
  gap: 4px;
}

.release-summary-card span,
.release-summary-card small {
  color: rgba(236, 248, 255, 0.84);
}

.release-summary-card strong {
  font-size: 1.9rem;
  line-height: 1;
}

.release-access-panel {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: rgba(4, 23, 36, 0.24);
  padding: 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.release-access-panel h3 {
  margin-bottom: 4px;
}

.release-access-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.release-access-list .pill {
  margin: 0;
}

.release-filter-shell {
  margin-bottom: 18px;
}

.release-filter-form {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.release-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.release-filter-actions button {
  flex: 0 0 auto;
}

.release-list-grid {
  display: grid;
  gap: 16px;
}

.release-list-card,
.release-list-empty {
  border: 1px solid #d9e6ef;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  padding: 18px;
  box-shadow: 0 18px 28px rgba(13, 44, 68, 0.06);
}

.release-list-card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.release-list-card-title {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.release-list-card-title h3 {
  margin: 0;
  color: #133a59;
  word-break: break-word;
}

.release-list-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.release-list-card-badges .pill {
  margin: 0;
}

.release-list-card-side {
  display: grid;
  justify-items: end;
  align-content: flex-start;
  gap: 8px;
  min-width: 150px;
}

.release-card-date,
.release-card-duration {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 12px;
  border: 1px solid #d7e5f0;
  background: rgba(255, 255, 255, 0.9);
  color: #183e5d;
  font-weight: 700;
  text-align: center;
}

.release-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.release-card-stat {
  border: 1px solid #e1ebf3;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  padding: 12px 14px;
  min-width: 0;
}

.release-card-stat strong,
.release-card-stat small {
  display: block;
  color: #173d5b;
  word-break: break-word;
}

.release-card-stat small {
  margin-top: 6px;
  color: #69829a;
}

.release-card-label {
  display: block;
  margin-bottom: 6px;
  color: #668096;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.release-card-details {
  margin-top: 16px;
  border-top: 1px solid #e0ebf3;
  padding-top: 12px;
}

.release-card-details summary {
  cursor: pointer;
  color: #0f6197;
  font-size: 0.82rem;
  font-weight: 700;
}

.release-card-details-body {
  margin-top: 10px;
  display: grid;
  gap: 6px;
  color: #2f4a61;
  font-size: 0.82rem;
}

.release-card-details-body p {
  margin: 0;
  word-break: break-word;
}

.release-card-error {
  color: #9a2236;
}

.release-list-empty h3 {
  margin-bottom: 6px;
  color: #173d5b;
}

body[data-page="routers-manage"] {
  --router-manage-bg-top: #f3f8ff;
  --router-manage-bg-mid: #eaf3ff;
  --router-manage-bg-bottom: #eef8f3;
  --router-manage-card-border: #c8deef;
  --router-manage-card-shadow: 0 16px 32px rgba(11, 33, 54, 0.12);
  background:
    radial-gradient(940px 460px at -12% -6%, rgba(27, 147, 220, 0.18), transparent 62%),
    radial-gradient(860px 440px at 110% -4%, rgba(22, 165, 130, 0.12), transparent 62%),
    linear-gradient(165deg, var(--router-manage-bg-top) 0%, var(--router-manage-bg-mid) 55%, var(--router-manage-bg-bottom) 100%);
}

body[data-page="routers-manage"] .layout {
  gap: 20px;
}

body[data-page="routers-manage"] .card {
  position: relative;
  overflow: hidden;
  border-color: var(--router-manage-card-border);
  border-radius: 20px;
  background: linear-gradient(170deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: var(--router-manage-card-shadow);
}

body[data-page="routers-manage"] .card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, rgba(29, 147, 220, 0.92) 0%, rgba(17, 160, 121, 0.9) 58%, rgba(214, 140, 26, 0.82) 100%);
}

body[data-page="routers-manage"] .card::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -110px;
  top: -140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(112, 191, 238, 0.34) 0%, rgba(112, 191, 238, 0) 68%);
  pointer-events: none;
  opacity: 0.34;
}

.router-manage-form-block h3 {
  margin-bottom: 4px;
}

body[data-page="routers-manage"] .router-manage-hero-card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(255, 221, 144, 0.34), transparent 38%),
    linear-gradient(135deg, #10324c 0%, #155777 48%, #17705a 100%);
  color: #f5fbff;
}

body[data-page="routers-manage"] .router-manage-hero-card::after {
  content: '';
  position: absolute;
  inset: auto -90px -120px auto;
  width: 280px;
  height: 280px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  filter: blur(8px);
}

.router-manage-hero-card .eyebrow,
.router-manage-hero-card h2,
.router-manage-hero-card .muted-line,
.router-manage-hero-card h3,
.router-manage-hero-card small,
.router-manage-hero-card span,
.router-manage-hero-card strong,
.router-manage-hero-card p {
  color: inherit;
}

.router-manage-hero-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.router-manage-hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.router-manage-hero-actions .pill {
  margin: 0;
}

.router-manage-hero-card .secondary {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
  color: #eef8ff;
}

.router-manage-hero-card a.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  text-decoration: none;
  white-space: nowrap;
}

.router-manage-hero-card .secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

.router-manage-summary-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.router-manage-summary-card {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  padding: 16px;
  display: grid;
  gap: 4px;
}

.router-manage-summary-card span,
.router-manage-summary-card small {
  color: rgba(236, 247, 255, 0.82);
}

.router-manage-summary-card strong {
  font-size: 1.9rem;
  line-height: 1;
}

.router-manage-access-panel {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: rgba(4, 20, 33, 0.24);
  padding: 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.router-manage-access-panel h3 {
  margin-bottom: 4px;
}

.router-manage-access-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.router-manage-access-list .pill {
  margin: 0;
}

.router-manage-list-actions {
  align-items: stretch;
}

.router-manage-list-actions select {
  min-width: 190px;
}

.router-manage-list-grid {
  display: grid;
  gap: 16px;
}

.router-manage-card,
.router-manage-list-empty {
  border: 1px solid #d9e6ef;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  padding: 18px;
  box-shadow: 0 18px 28px rgba(13, 44, 68, 0.06);
}

.router-manage-card.is-owned {
  border-color: #c3def3;
  box-shadow: 0 18px 32px rgba(18, 77, 116, 0.1);
}

.router-manage-card.router-row-selected {
  border-color: #89c5ea;
  box-shadow: 0 20px 34px rgba(18, 99, 150, 0.14);
}

.router-manage-card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.router-manage-card-title {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.router-manage-card-title h3 {
  margin: 0;
  color: #133a59;
  word-break: break-word;
}

.router-manage-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.router-manage-card-badges .pill {
  margin: 0;
}

.router-manage-card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.router-manage-card-grid,
.router-manage-card-meta {
  display: grid;
  gap: 12px;
}

.router-manage-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.router-manage-card-stat,
.router-manage-card-meta-item {
  border: 1px solid #e1ebf3;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  padding: 12px 14px;
  min-width: 0;
}

.router-manage-card-meta {
  margin-top: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.router-manage-card-stat strong,
.router-manage-card-meta-item strong {
  display: block;
  color: #173d5b;
  word-break: break-word;
}

.router-manage-card-label {
  display: block;
  margin-bottom: 6px;
  color: #668096;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.router-manage-list-empty h3 {
  margin-bottom: 6px;
  color: #173d5b;
}

.router-manage-form-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.router-manage-form-grid .router-field-short,
.router-manage-form-grid .router-field-medium,
.router-manage-form-grid .password-input-wrap,
.router-manage-form-grid textarea {
  justify-self: start;
  width: 100%;
}

.router-manage-form-grid .router-field-short {
  max-width: 180px;
}

.router-manage-form-grid .router-field-medium {
  max-width: 240px;
}

.router-manage-form-grid textarea {
  grid-column: 1 / -1;
  min-height: 96px;
  resize: vertical;
}

.router-profile-form-shell {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.router-profile-form-column {
  display: grid;
  gap: 8px;
}

.router-profile-form-column label {
  color: #5d7387;
  font-size: 0.8rem;
  font-weight: 700;
}

.router-profile-form-column-wide {
  grid-column: 1 / -1;
}

.router-profile-form-column textarea {
  min-height: 92px;
  resize: vertical;
}

.router-profile-role-palette {
  margin-top: 12px;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #dbe5ee;
  border-radius: 16px;
  background: #f8fbfd;
}

.router-profile-role-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.router-profile-role-head strong,
.router-profile-role-head small {
  display: block;
}

.router-profile-role-head small {
  margin-top: 4px;
  color: #60758a;
}

.router-profile-role-list {
  display: grid;
  gap: 10px;
}

.router-profile-role-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #dde7ef;
  border-radius: 14px;
  background: #ffffff;
}

.router-profile-role-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.router-profile-role-copy strong {
  color: #173d5b;
}

.router-profile-role-copy small {
  color: #60758a;
}

.router-profile-role-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.router-profile-role-empty {
  padding: 6px 2px;
  color: #60758a;
  font-size: 0.9rem;
}

.router-manage-inline-checks .checkbox-inline {
  grid-column: 1 / -1;
}

.router-manage-form-actions {
  grid-column: span 2;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.router-manage-form-actions button {
  flex: 0 0 auto;
}

body[data-page="routers-manage"] .section-header {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #d4e6f3;
  align-items: flex-start;
  flex-wrap: wrap;
}

body[data-page="routers-manage"] .section-header h2 {
  margin: 0;
  color: #133a59;
  font-size: 1.24rem;
}

body[data-page="routers-manage"] .muted-line {
  color: #5b7387;
}

body[data-page="routers-manage"] .router-table-action-menu > summary {
  border-color: #bfd7e8;
  background: linear-gradient(180deg, #ffffff 0%, #eaf5ff 100%);
  color: #204a68;
}

body[data-page="routers-manage"] .router-table-action-list {
  border-color: #c9deee;
  border-radius: 14px;
  background: linear-gradient(180deg, #fcfeff 0%, #edf6ff 100%);
  box-shadow: 0 12px 22px rgba(12, 40, 64, 0.16);
}

.unit-chip {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  border: 1px solid #d5e4f1;
  border-radius: 10px;
  padding: 7px 10px;
  background: #f8fbff;
  color: #31506a;
  font-size: 0.85rem;
}

.unit-chip small {
  color: #5f7488;
  font-size: 0.76rem;
}

.checkbox-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  color: #35506a;
  padding: 6px 0;
}

.checkbox-inline input {
  width: auto;
  min-height: auto;
}

#companyFormMessage,
#companyEditMessage,
#companyUnitFormMessage,
#userFormMessage,
#userEditMessage,
#userPasswordMessage,
#routerFormMessage,
#routerEditMessage {
  min-height: 20px;
  margin: 0;
  color: #2f5772;
  font-size: 0.87rem;
}

pre {
  margin: 0;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #294a66;
  background: #0d2438;
  color: #e6f3ff;
  overflow: auto;
  font-size: 0.84rem;
}

.hidden {
  display: none !important;
}

@keyframes enter-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1360px) {
  .dashboard-shell {
    grid-template-columns: 1fr;
  }

  .sidebar-column {
    position: static;
  }

  .sidebar {
    position: static;
    padding: 18px;
  }

  .nav-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .company-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .audit-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .release-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .user-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .router-manage-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .company-card-grid,
  .company-unit-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .audit-log-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .release-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .user-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .router-manage-card-grid,
  .router-manage-card-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  body[data-page="dashboard"] .dashboard-hero-top,
  body[data-page="dashboard"] .dashboard-focus-grid {
    grid-template-columns: 1fr;
  }

  body[data-page="dashboard"] .dashboard-hero-card {
    padding: 20px;
  }

  body[data-page="dashboard"] .dashboard-hero-copy h2 {
    max-width: none;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-slo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-page="dashboard"] .dashboard-turn-trend-grid,
  body[data-page="dashboard"] .dashboard-turn-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-routers-map {
    height: 360px;
  }

  .dashboard-map-frame,
  .dashboard-map-empty {
    min-height: 320px;
  }

  .monitor-cards,
  .monitor-cards.monitor-cards-xl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split-grid {
    grid-template-columns: 1fr;
  }

  .grid-form {
    grid-template-columns: 1fr;
  }

  .grid-form > .embedded-card {
    grid-column: span 1;
  }

  .grid-form > button,
  .grid-form > p,
  .grid-form > label.checkbox-inline {
    grid-column: span 1;
  }

  .user-form-actions {
    grid-column: span 1;
  }

  .router-manage-form-actions {
    grid-column: span 1;
  }

  .company-form-grid {
    grid-template-columns: 1fr;
  }

  .user-form-grid {
    grid-template-columns: 1fr;
  }

  .router-manage-form-grid {
    grid-template-columns: 1fr;
  }

  .router-profile-form-shell {
    grid-template-columns: 1fr;
  }

  .router-profile-role-row,
  .router-profile-role-head {
    flex-direction: column;
    align-items: stretch;
  }

  .company-hero-top,
  .audit-hero-top,
  .audit-access-panel,
  .audit-log-list-card-head,
  .release-hero-top,
  .release-access-panel,
  .release-list-card-head,
  .company-access-panel,
  .company-list-card-head,
  .company-unit-card-head {
    flex-direction: column;
    align-items: stretch;
  }

  .user-hero-top,
  .user-access-panel,
  .user-list-card-head {
    flex-direction: column;
    align-items: stretch;
  }

  .router-manage-hero-top,
  .router-manage-access-panel,
  .router-manage-card-head {
    flex-direction: column;
    align-items: stretch;
  }

  .company-summary-grid,
  .audit-summary-grid,
  .release-summary-grid,
  .company-card-grid,
  .company-unit-card-grid {
    grid-template-columns: 1fr;
  }

  .audit-log-card-grid,
  .audit-log-filter-form,
  .release-card-grid,
  .release-filter-form {
    grid-template-columns: 1fr;
  }

  .user-summary-grid,
  .user-card-grid {
    grid-template-columns: 1fr;
  }

  .router-manage-summary-grid,
  .router-manage-card-grid,
  .router-manage-card-meta {
    grid-template-columns: 1fr;
  }

  .company-access-list,
  .audit-access-list,
  .release-access-list,
  .company-card-actions,
  .company-unit-actions {
    justify-content: flex-start;
  }

  .audit-filter-actions,
  .release-filter-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .audit-filter-actions button,
  .audit-log-list-card-side,
  .release-filter-actions button,
  .release-list-card-side {
    width: 100%;
  }

  .audit-log-list-card-side,
  .release-list-card-side {
    justify-items: stretch;
    min-width: 0;
  }

  .user-access-list,
  .user-card-actions,
  .user-form-actions {
    justify-content: flex-start;
  }

  .router-manage-access-list,
  .router-manage-card-actions,
  .router-manage-form-actions {
    justify-content: flex-start;
  }

  .inline-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .inline-actions select,
  .inline-actions button,
  .inline-actions input {
    width: 100%;
  }

  .router-temp-blocklist-controls {
    grid-template-columns: 1fr 1fr;
  }

  .router-security-summary-strip {
    grid-template-columns: 1fr 1fr;
  }

  .router-security-assistant-input-wrap {
    grid-template-columns: 1fr;
  }

  .router-security-profile-controls {
    grid-template-columns: 1fr 1fr;
  }

  .router-global-allowlist-controls {
    grid-template-columns: 1fr 1fr;
  }

  .router-security-radar-ai-list {
    display: grid;
    grid-template-columns: 1fr;
  }

  .router-security-radar-ai-btn {
    width: 100%;
    text-align: left;
  }
}

@media (max-width: 700px) {
  body[data-page="dashboard"] .dashboard-hero-card {
    padding: 18px;
  }

  body[data-page="dashboard"] .dashboard-hero-links,
  body[data-page="dashboard"] .dashboard-hero-radar-head {
    gap: 8px;
  }

  body[data-page="dashboard"] .dashboard-hero-radar-grid {
    grid-template-columns: 1fr;
  }

  body[data-page="dashboard"] .dashboard-hero-links a.secondary {
    width: 100%;
  }

  body[data-page="dashboard"] .dashboard-turn-trend-grid,
  body[data-page="dashboard"] .dashboard-turn-grid,
  body[data-page="routers"] .router-batch-activity-list {
    grid-template-columns: 1fr;
  }

  body[data-page="routers"] .router-traffic-insights-head {
    flex-direction: column;
    align-items: stretch;
  }

  body[data-page="routers"] .router-traffic-insights-kpis,
  body[data-page="routers"] .router-traffic-insights-grid {
    grid-template-columns: 1fr;
  }

  body[data-page="dashboard"] .dashboard-turn-lane-head,
  body[data-page="routers"] .router-batch-activity-head,
  body[data-page="routers"] .router-batch-router-result {
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-shell {
    width: calc(100% - 12px);
    padding: 6px;
    margin-top: 8px;
  }

  .card,
  .auth-card {
    border-radius: 16px;
  }

  .dashboard-slo-grid {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 13px;
  }

  .auth-logo {
    width: min(220px, 82%);
  }

  .stats-grid,
  .monitor-cards,
  .monitor-cards.monitor-cards-xl,
  .nav-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-routers-map {
    height: 320px;
  }

  .dashboard-map-frame,
  .dashboard-map-empty {
    min-height: 280px;
  }

  .section-header {
    flex-direction: column;
    align-items: stretch;
  }

  .company-summary-card strong {
    font-size: 1.6rem;
  }

  .audit-summary-card strong {
    font-size: 1.6rem;
  }

  .release-summary-card strong {
    font-size: 1.6rem;
  }

  .inline-actions input[type="search"] {
    min-width: 0;
  }

  .router-detail-action-wrap {
    justify-content: stretch;
  }

  .router-detail-action-menu {
    width: 100%;
    min-width: 0;
  }

  .router-detail-action-menu > summary {
    width: 100%;
  }

  .router-detail-action-list {
    position: static;
    width: 100%;
    min-width: 0;
    margin-top: 6px;
  }

  .router-temp-blocklist-controls {
    grid-template-columns: 1fr;
  }

  .router-security-summary-strip {
    grid-template-columns: 1fr;
  }

  .router-global-allowlist-controls {
    grid-template-columns: 1fr;
  }

  .brand-logo {
    width: min(180px, 100%);
  }

  .router-table-action-menu {
    width: auto;
    min-width: 0;
  }

  .router-table-action-menu > summary {
    width: auto;
    min-width: 58px;
  }

  .router-table-action-list {
    position: fixed;
    width: var(--router-action-menu-width, min(300px, calc(100vw - 14px)));
    min-width: 0;
    max-height: var(--router-action-menu-max-height, min(52vh, 300px));
    margin-top: 0;
    grid-template-columns: 1fr;
  }

  .iface-row-head,
  .iface-usage-head,
  .dhcp-pagination {
    flex-direction: column;
    align-items: flex-start;
  }

  .router-chart-filters {
    width: 100%;
    justify-content: flex-start;
  }

  .router-chart-filter {
    width: 100%;
  }

  .router-chart-filter-wide {
    flex-basis: 100%;
  }

  .router-chart-filter select {
    width: 100%;
  }

  .router-chart-interface-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .router-chart-interface-actions {
    width: 100%;
  }

  .router-chart-interface-actions .secondary {
    flex: 1 1 0;
  }

  .router-chart-interface-list {
    grid-template-columns: 1fr;
    max-height: 180px;
  }

  .router-logs-health {
    align-items: flex-start;
  }

  .router-logs-filters {
    grid-template-columns: 1fr;
  }

  .router-logs-filter-date {
    flex-direction: column;
    align-items: flex-start;
  }

  .router-config-editor {
    padding: 8px;
  }

  .router-config-editor-card {
    max-height: calc(100vh - 16px);
    border-radius: 14px;
    padding: 12px;
  }

  .router-config-editor-head {
    flex-direction: column;
    align-items: stretch;
  }

  .router-config-editor-grid {
    grid-template-columns: 1fr;
  }

  .router-config-editor-grid-wide {
    grid-column: span 1;
  }

  .router-config-editor-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .router-config-editor-actions button {
    min-width: 0;
    width: 100%;
  }
}

body[data-page="ops-health"] {
  --ops-ink: #163142;
  --ops-muted: #547084;
  --ops-panel: rgba(255, 255, 255, 0.92);
  --ops-outline: rgba(43, 92, 119, 0.12);
  --ops-app: #0d8b85;
  --ops-db: #c96a2e;
  --ops-warn: #b8532d;
  background:
    radial-gradient(1200px 480px at 0% -5%, rgba(20, 152, 132, 0.12), transparent 58%),
    radial-gradient(900px 420px at 100% 0%, rgba(212, 131, 47, 0.16), transparent 52%),
    linear-gradient(180deg, #f8fbfd 0%, #edf4f7 48%, #f7fafc 100%);
}

body[data-page="ops-health"] .layout.ops-health-layout {
  gap: 18px;
}

body[data-page="ops-health"] .ops-health-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(23, 74, 101, 0.08);
  background:
    radial-gradient(480px 220px at 105% -10%, rgba(201, 106, 46, 0.18), transparent 60%),
    radial-gradient(360px 240px at -5% 0%, rgba(13, 139, 133, 0.16), transparent 60%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.97) 0%, rgba(243, 249, 252, 0.96) 58%, rgba(234, 243, 247, 0.95) 100%);
  box-shadow: 0 18px 42px rgba(20, 54, 73, 0.08);
}

body[data-page="ops-health"] .ops-health-hero::after {
  content: "";
  position: absolute;
  inset: auto -12% -48% auto;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 106, 46, 0.18) 0%, transparent 72%);
  pointer-events: none;
}

body[data-page="ops-health"] .ops-health-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(260px, 0.95fr);
  gap: 18px;
  align-items: start;
}

body[data-page="ops-health"] .ops-health-kicker {
  margin: 0 0 8px;
  color: #0f7b88;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body[data-page="ops-health"] .ops-health-hero h2,
body[data-page="ops-health"] .ops-health-surface h2,
body[data-page="ops-health"] .ops-health-cluster h3,
body[data-page="ops-health"] .ops-health-subpanel h3 {
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  letter-spacing: -0.02em;
  color: var(--ops-ink);
}

body[data-page="ops-health"] .ops-health-hero h2 {
  margin: 0 0 10px;
  font-size: clamp(1.8rem, 2vw + 1rem, 2.65rem);
  line-height: 1.04;
}

body[data-page="ops-health"] .ops-health-lead {
  margin: 0;
  max-width: 62ch;
  color: var(--ops-muted);
  font-size: 1rem;
  line-height: 1.6;
}

body[data-page="ops-health"] .ops-health-hero-side {
  display: grid;
  gap: 14px;
  justify-items: end;
  text-align: right;
}

body[data-page="ops-health"] .ops-health-hero-side .secondary {
  min-width: 148px;
  border-radius: 999px;
  box-shadow: 0 12px 24px rgba(22, 49, 66, 0.12);
}

body[data-page="ops-health"] .ops-health-signal-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

body[data-page="ops-health"] .ops-health-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(26, 67, 92, 0.08);
  background: rgba(255, 255, 255, 0.88);
  color: var(--ops-ink);
  font-size: 0.86rem;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(20, 54, 73, 0.06);
}

body[data-page="ops-health"] .ops-health-chip::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #a0b9c8;
  box-shadow: 0 0 0 4px rgba(160, 185, 200, 0.16);
}

body[data-page="ops-health"] .ops-health-chip.is-ok::before {
  background: #1e9f69;
  box-shadow: 0 0 0 4px rgba(30, 159, 105, 0.16);
}

body[data-page="ops-health"] .ops-health-chip.is-warn::before {
  background: #d4842a;
  box-shadow: 0 0 0 4px rgba(212, 132, 42, 0.16);
}

body[data-page="ops-health"] .ops-health-chip.is-danger::before {
  background: #cc5a4b;
  box-shadow: 0 0 0 4px rgba(204, 90, 75, 0.16);
}

body[data-page="ops-health"] .ops-health-chip.is-info::before {
  background: #2781c6;
  box-shadow: 0 0 0 4px rgba(39, 129, 198, 0.16);
}

body[data-page="ops-health"] .ops-health-chip.is-neutral::before {
  background: #879aaa;
  box-shadow: 0 0 0 4px rgba(135, 154, 170, 0.16);
}

body[data-page="ops-health"] .ops-health-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

body[data-page="ops-health"] .ops-health-status-grid .stat-card {
  min-height: 122px;
  border: 1px solid rgba(29, 78, 106, 0.08);
  background:
    radial-gradient(220px 120px at 105% -10%, rgba(13, 139, 133, 0.14), transparent 62%),
    linear-gradient(165deg, #ffffff 0%, #f5fafc 72%, #eef5f8 100%);
  box-shadow: 0 14px 30px rgba(17, 52, 71, 0.06);
}

body[data-page="ops-health"] .ops-health-detail-grid,
body[data-page="ops-health"] .ops-health-story-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body[data-page="ops-health"] .ops-health-brief-card {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--ops-outline);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(246, 250, 252, 0.95) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

body[data-page="ops-health"] .ops-health-brief-card h3 {
  margin: 0;
  font-size: 0.96rem;
  color: var(--ops-ink);
}

body[data-page="ops-health"] .ops-health-brief-value {
  margin: 10px 0 8px;
  font-size: 1.55rem;
  line-height: 1.08;
  font-weight: 800;
  color: var(--ops-ink);
}

body[data-page="ops-health"] .ops-health-brief-value.metric-ok {
  color: #1e9f69;
}

body[data-page="ops-health"] .ops-health-brief-value.metric-warn {
  color: #d4842a;
}

body[data-page="ops-health"] .ops-health-brief-value.metric-danger {
  color: #cc5a4b;
}

body[data-page="ops-health"] .ops-health-brief-value.metric-info {
  color: #2781c6;
}

body[data-page="ops-health"] .ops-health-brief-value.metric-neutral {
  color: var(--ops-ink);
}

body[data-page="ops-health"] .ops-health-brief-card ul {
  margin: 0;
  padding-left: 16px;
  color: var(--ops-muted);
  line-height: 1.55;
}

body[data-page="ops-health"] .ops-health-surface {
  border: 1px solid rgba(26, 74, 98, 0.08);
  background: var(--ops-panel);
  box-shadow: 0 16px 36px rgba(17, 52, 71, 0.07);
}

body[data-page="ops-health"] .ops-health-trend-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
}

body[data-page="ops-health"] .ops-health-trend-card {
  padding: 14px 15px;
  border-radius: 18px;
  border: 1px solid rgba(26, 74, 98, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(244, 249, 252, 0.96) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

body[data-page="ops-health"] .ops-health-trend-card.tone-ok {
  border-color: rgba(30, 159, 105, 0.24);
}

body[data-page="ops-health"] .ops-health-trend-card.tone-warn {
  border-color: rgba(212, 132, 42, 0.24);
}

body[data-page="ops-health"] .ops-health-trend-card.tone-danger {
  border-color: rgba(204, 90, 75, 0.24);
}

body[data-page="ops-health"] .ops-health-trend-card.tone-info {
  border-color: rgba(39, 129, 198, 0.24);
}

body[data-page="ops-health"] .ops-health-trend-label {
  display: block;
  margin-bottom: 6px;
  color: var(--ops-muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

body[data-page="ops-health"] .ops-health-trend-card strong {
  display: block;
  color: var(--ops-ink);
  font-size: 1.3rem;
  line-height: 1.1;
}

body[data-page="ops-health"] .ops-health-trend-card small {
  display: block;
  margin-top: 6px;
  color: var(--ops-muted);
  line-height: 1.45;
}

body[data-page="ops-health"] .ops-health-trend-meta {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  color: var(--ops-ink);
  font-size: 0.82rem;
}

body[data-page="ops-health"] #opsHealthInfraSection {
  content-visibility: auto;
  contain-intrinsic-size: 1px 1120px;
}

body[data-page="ops-health"] .ops-health-infra-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

body[data-page="ops-health"] .ops-health-cluster {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(28, 75, 97, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

body[data-page="ops-health"] .ops-health-cluster--app {
  background:
    radial-gradient(260px 120px at 105% -8%, rgba(13, 139, 133, 0.16), transparent 62%),
    linear-gradient(180deg, rgba(250, 255, 254, 0.98) 0%, rgba(237, 248, 246, 0.98) 100%);
}

body[data-page="ops-health"] .ops-health-cluster--db {
  background:
    radial-gradient(260px 120px at 105% -8%, rgba(201, 106, 46, 0.16), transparent 62%),
    linear-gradient(180deg, rgba(255, 252, 248, 0.98) 0%, rgba(248, 241, 235, 0.98) 100%);
}

body[data-page="ops-health"] .ops-health-cluster-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

body[data-page="ops-health"] .ops-health-cluster-head h3 {
  margin: 0 0 6px;
  font-size: 1.18rem;
}

body[data-page="ops-health"] .ops-health-cluster-head p,
body[data-page="ops-health"] .ops-health-subpanel p,
body[data-page="ops-health"] .ops-health-brief-card p {
  margin: 0;
  color: var(--ops-muted);
  line-height: 1.55;
}

body[data-page="ops-health"] .ops-health-cluster-tag {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid rgba(26, 74, 98, 0.08);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ops-ink);
}

body[data-page="ops-health"] .ops-health-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

body[data-page="ops-health"] .ops-health-metric-grid .stat-card {
  min-height: 112px;
  border-radius: 18px;
  border: 1px solid rgba(22, 67, 91, 0.08);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 10px 24px rgba(18, 53, 72, 0.05);
}

body[data-page="ops-health"] .ops-health-subpanel {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(26, 74, 98, 0.08);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

body[data-page="ops-health"] .ops-health-subpanel h3 {
  margin: 0 0 6px;
  font-size: 1.08rem;
}

body[data-page="ops-health"] .ops-health-hotspots {
  display: grid;
  gap: 12px;
  margin: 14px 0 18px;
}

body[data-page="ops-health"] .ops-health-hotspot-card {
  padding: 14px 15px;
  border-radius: 18px;
  border: 1px solid rgba(24, 72, 96, 0.08);
  background: linear-gradient(180deg, rgba(253, 252, 250, 0.98) 0%, rgba(246, 248, 250, 0.98) 100%);
}

body[data-page="ops-health"] .ops-health-hotspot-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

body[data-page="ops-health"] .ops-health-hotspot-top strong {
  font-size: 1rem;
  color: var(--ops-ink);
}

body[data-page="ops-health"] .ops-health-hotspot-meta {
  color: var(--ops-muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

body[data-page="ops-health"] .ops-health-progress {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 10px;
  margin: 10px 0 8px;
  border-radius: 999px;
  background: #e7eef2;
}

body[data-page="ops-health"] .ops-health-progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0d8b85 0%, #d08b2f 100%);
}

body[data-page="ops-health"] .ops-health-rich-text {
  display: grid;
  gap: 12px;
}

body[data-page="ops-health"] .ops-health-rich-text .ops-health-brief-card {
  padding: 15px 16px;
}

body[data-page="ops-health"] .ops-health-rich-text .ops-health-brief-value {
  font-size: 1.15rem;
  margin-top: 8px;
  margin-bottom: 6px;
}

body[data-page="ops-health"] #opsHealthInfraSection .table-wrap {
  border-radius: 18px;
  border: 1px solid rgba(25, 72, 95, 0.08);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 32px rgba(18, 52, 71, 0.05);
}

@media (max-width: 1120px) {
  body[data-page="ops-health"] .ops-health-hero-grid,
  body[data-page="ops-health"] .ops-health-infra-grid,
  body[data-page="ops-health"] .ops-health-detail-grid,
  body[data-page="ops-health"] .ops-health-story-grid {
    grid-template-columns: 1fr;
  }

  body[data-page="ops-health"] .ops-health-trend-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-page="ops-health"] .ops-health-hero-side {
    justify-items: start;
    text-align: left;
  }
}

@media (max-width: 860px) {
  body[data-page="ops-health"] .ops-health-status-grid,
  body[data-page="ops-health"] .ops-health-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-page="routers"] .router-suite-card-head,
  body[data-page="routers-manage"] .router-suite-card-head {
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  body[data-page="ops-health"] .ops-health-status-grid,
  body[data-page="ops-health"] .ops-health-metric-grid {
    grid-template-columns: 1fr;
  }

  body[data-page="ops-health"] .ops-health-trend-grid {
    grid-template-columns: 1fr;
  }

  body[data-page="ops-health"] .ops-health-hero {
    padding: 18px;
  }

  body[data-page="routers"] .router-suite-quick-actions,
  body[data-page="routers-manage"] .router-suite-quick-actions {
    flex-direction: column;
  }

  body[data-page="routers"] .router-suite-quick-actions .secondary,
  body[data-page="routers-manage"] .router-suite-quick-actions .secondary {
    width: 100%;
  }
}

body[data-page="companies"] .company-hero-card,
body[data-page="users"] .user-hero-card,
body[data-page="logs"] .audit-hero-card,
body[data-page="releases"] .release-hero-card,
body[data-page="routers-manage"] .router-manage-hero-card {
  position: relative;
  overflow: hidden;
  border: 1px solid #d6e3ef;
  border-radius: 20px;
  background:
    radial-gradient(520px 260px at -6% -14%, rgba(83, 196, 255, 0.12), transparent 56%),
    radial-gradient(420px 220px at 108% -8%, rgba(74, 220, 188, 0.08), transparent 58%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  color: var(--ink-strong);
  box-shadow: 0 20px 40px rgba(15, 37, 60, 0.08);
}

body[data-page="companies"] .company-hero-card::after,
body[data-page="users"] .user-hero-card::after,
body[data-page="logs"] .audit-hero-card::after,
body[data-page="releases"] .release-hero-card::after,
body[data-page="routers-manage"] .router-manage-hero-card::after {
  background: radial-gradient(circle, rgba(177, 226, 250, 0.16) 0%, rgba(177, 226, 250, 0) 72%);
  opacity: 0.8;
}

body[data-page="companies"] .company-hero-card .secondary,
body[data-page="users"] .user-hero-card .secondary,
body[data-page="logs"] .audit-hero-card .secondary,
body[data-page="releases"] .release-hero-card .secondary,
body[data-page="routers-manage"] .router-manage-hero-card .secondary {
  border: 1px solid #c9dbe9;
  background: linear-gradient(180deg, #ffffff 0%, #f4f9fd 100%);
  color: #24415b;
  box-shadow: 0 8px 16px rgba(15, 37, 60, 0.07);
}

body[data-page="companies"] .company-hero-card .secondary:hover,
body[data-page="users"] .user-hero-card .secondary:hover,
body[data-page="logs"] .audit-hero-card .secondary:hover,
body[data-page="releases"] .release-hero-card .secondary:hover,
body[data-page="routers-manage"] .router-manage-hero-card .secondary:hover {
  transform: translateY(-1px);
  border-color: #a9cae2;
  background: linear-gradient(180deg, #ffffff 0%, #eef7ff 100%);
}

body[data-page="companies"] .company-hero-card .secondary.is-active,
body[data-page="users"] .user-hero-card .secondary.is-active,
body[data-page="logs"] .audit-hero-card .secondary.is-active,
body[data-page="releases"] .release-hero-card .secondary.is-active,
body[data-page="routers-manage"] .router-manage-hero-card .secondary.is-active {
  border-color: #8dc0e3;
  background: linear-gradient(155deg, #2ca1e3 0%, #1588ca 62%, #1175b2 100%);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(16, 96, 150, 0.24);
}

body[data-page="companies"] .company-summary-card,
body[data-page="users"] .user-summary-card,
body[data-page="logs"] .audit-summary-card,
body[data-page="releases"] .release-summary-card,
body[data-page="routers-manage"] .router-manage-summary-card {
  border: 1px solid #d7e4ef;
  border-radius: 16px;
  background:
    radial-gradient(220px 120px at 100% -20%, rgba(170, 218, 244, 0.12), transparent 72%),
    linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 10px 18px rgba(15, 37, 60, 0.08);
}

body[data-page="companies"] .company-summary-card span,
body[data-page="companies"] .company-summary-card small,
body[data-page="users"] .user-summary-card span,
body[data-page="users"] .user-summary-card small,
body[data-page="logs"] .audit-summary-card span,
body[data-page="logs"] .audit-summary-card small,
body[data-page="releases"] .release-summary-card span,
body[data-page="releases"] .release-summary-card small,
body[data-page="routers-manage"] .router-manage-summary-card span,
body[data-page="routers-manage"] .router-manage-summary-card small {
  color: #6a8195;
}

body[data-page="companies"] .company-summary-card strong,
body[data-page="users"] .user-summary-card strong,
body[data-page="logs"] .audit-summary-card strong,
body[data-page="releases"] .release-summary-card strong,
body[data-page="routers-manage"] .router-manage-summary-card strong {
  color: #16324b;
}

body[data-page="companies"] .company-access-panel,
body[data-page="users"] .user-access-panel,
body[data-page="logs"] .audit-access-panel,
body[data-page="releases"] .release-access-panel,
body[data-page="routers-manage"] .router-manage-access-panel {
  border: 1px solid #d7e4ef;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 16px 30px rgba(7, 25, 39, 0.08);
}

body[data-page="companies"] .company-access-panel h3,
body[data-page="users"] .user-access-panel h3,
body[data-page="logs"] .audit-access-panel h3,
body[data-page="releases"] .release-access-panel h3,
body[data-page="routers-manage"] .router-manage-access-panel h3 {
  color: var(--ink-strong);
}

body[data-page="companies"] .company-access-panel .muted-line,
body[data-page="users"] .user-access-panel .muted-line,
body[data-page="logs"] .audit-access-panel .muted-line,
body[data-page="releases"] .release-access-panel .muted-line,
body[data-page="routers-manage"] .router-manage-access-panel .muted-line {
  color: #5b748a;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

body {
  background:
    linear-gradient(180deg, #f7f8fa 0%, #eef2f5 100%);
}

body[data-page] .unifi-topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1fr) minmax(220px, 0.9fr);
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 0 18px;
  border-bottom: 1px solid #e3e8ee;
  background: rgba(248, 250, 252, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

body[data-page] .unifi-topbar-left,
body[data-page] .unifi-topbar-center,
body[data-page] .unifi-topbar-right {
  display: flex;
  align-items: center;
}

body[data-page] .unifi-topbar-center {
  justify-content: center;
}

body[data-page] .unifi-topbar-right {
  justify-content: flex-end;
}

body[data-page] .unifi-console-pill,
body[data-page] .unifi-topbar-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #d8e0e8;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f7fa 100%);
  color: #324453;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

body[data-page] .unifi-console-pill {
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

body[data-page] .unifi-console-pill .unifi-console-text {
  white-space: nowrap;
}

body[data-page] .unifi-topbar-brand {
  color: #b9c1c9;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

body[data-page] .unifi-console-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #8a93a0;
  box-shadow: 0 0 0 4px rgba(138, 147, 160, 0.15);
}

body[data-page] .unifi-console-dot.is-ok {
  background: #18a864;
  box-shadow: 0 0 0 4px rgba(24, 168, 100, 0.14);
}

body[data-page] .dashboard-shell {
  width: 100%;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
}

body[data-page] .sidebar-column {
  position: sticky;
  top: 56px;
  align-self: start;
  height: calc(100vh - 56px);
  overflow: auto;
  padding: 14px 12px 14px 14px;
  gap: 12px;
}

body[data-page] .sidebar-top-logo {
  justify-content: flex-start;
  padding: 0 6px 2px;
}

body[data-page] .brand-logo {
  width: min(154px, 100%);
  filter: drop-shadow(0 6px 14px rgba(15, 23, 42, 0.12));
}

body[data-page] .sidebar.card {
  padding: 16px 14px;
  gap: 16px;
  border: 1px solid #e2e7ee;
  border-radius: 18px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

body[data-page="routers"] .router-unifi-sidebar {
  gap: 14px;
}

body[data-page="routers"] .router-unifi-sidebar > div:first-child {
  display: grid;
  gap: 4px;
}

body[data-page="routers"] .sidebar-top-logo {
  display: none;
}

body[data-page="routers"] .router-unifi-sidebar-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

body[data-page="routers"] .router-unifi-sidebar-stat {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #e0e7ef;
  border-radius: 12px;
  background: #fafbfd;
}

body[data-page="routers"] .router-unifi-sidebar-stat span {
  color: #6b8095;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

body[data-page="routers"] .router-unifi-sidebar-stat strong {
  color: #173047;
  font-size: 1.08rem;
  line-height: 1.05;
}

body[data-page="routers"] .router-unifi-sidebar-section {
  display: grid;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid #e3e9ef;
}

body[data-page="routers"] .router-unifi-sidebar-section label {
  color: #617386;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body[data-page="routers"] .router-unifi-sidebar input[type="search"],
body[data-page="routers"] .router-unifi-sidebar select {
  width: 100%;
  min-height: 38px;
  border: 1px solid #d9e1ea;
  border-radius: 12px;
  background: #ffffff;
  color: #2f4254;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

body[data-page="routers"] .router-unifi-sidebar input[type="search"]::placeholder {
  color: #8b9aab;
}

body[data-page="routers"] .router-unifi-sidebar-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

body[data-page="routers"] .router-unifi-sidebar-actions .secondary {
  width: 100%;
  justify-content: center;
  min-height: 38px;
}

body[data-page="routers"] #routerSidebarScopeSummary {
  margin: 0;
  color: #6c7f92;
  font-size: 0.82rem;
  line-height: 1.45;
}

body[data-page="routers"] #routerMonitorSection {
  position: relative;
  top: auto;
  align-self: start;
  max-height: none;
  overflow: visible;
  z-index: 0;
}

@media (max-width: 1320px) {
  body[data-page="routers"] .layout {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-page="routers"] .router-site-overview-head {
    flex-direction: column;
  }

  body[data-page="routers"] .router-site-overview-state {
    justify-items: start;
  }

  body[data-page="routers"] .router-site-overview-state .muted-line {
    text-align: left;
  }

  body[data-page="routers"] #routerMonitorSection {
    position: static;
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 980px) {
  body[data-page="routers"] .router-site-overview-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-page="routers"] .router-detail-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-page="routers"] .router-detail-nav {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-page="routers"] .router-site-bandwidth-row,
  body[data-page="routers"] .router-site-top-site-row {
    grid-template-columns: 1fr;
  }

  body[data-page="routers"] .router-site-list-toolbar {
    width: 100%;
    margin-left: 0;
  }
}

@media (max-width: 640px) {
  body[data-page="routers"] .router-site-overview-metrics {
    grid-template-columns: 1fr;
  }

  body[data-page="routers"] .router-detail-nav {
    grid-template-columns: 1fr;
  }
}

body[data-page] .sidebar h1 {
  font-size: 1.22rem;
  line-height: 1.06;
}

body[data-page] .welcome {
  color: #607286;
  line-height: 1.5;
}

body[data-page] .nav-grid {
  gap: 6px;
}

body[data-page] .nav-chip {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 4h16v16H4z'/%3E%3C/svg%3E");
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #4a5968;
  box-shadow: none;
}

body[data-page] .nav-chip::before {
  content: "";
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  background: currentColor;
  -webkit-mask: var(--nav-icon) center / contain no-repeat;
  mask: var(--nav-icon) center / contain no-repeat;
  opacity: 0.9;
}

body[data-page] .nav-chip:hover {
  transform: none;
  border-color: #d5dde5;
  background: #f5f8fb;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.66);
}

body[data-page="dashboard"] .nav-link[href$="/dashboard"],
body[data-page="companies"] .nav-link[href$="/companies"],
body[data-page="users"] .nav-link[href$="/users"],
body[data-page="routers"] .nav-link[href$="/routers"],
body[data-page="routers-manage"] .nav-link[href$="/routers/manage"],
body[data-page="logs"] .nav-link[href$="/logs"],
body[data-page="releases"] .nav-link[href$="/releases"],
body[data-page="ops-health"] .nav-link[href$="/ops-health"] {
  border-color: #c9def5;
  background: linear-gradient(180deg, #f4f9ff 0%, #e6f1ff 100%);
  color: #0f67a7;
  box-shadow: inset 3px 0 0 #0f73bb;
}

body[data-page="dashboard"] .nav-link[href$="/dashboard"] {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 4h7v7H4zM13 4h7v4h-7zM13 10h7v10h-7zM4 13h7v7H4z'/%3E%3C/svg%3E");
}

body[data-page="companies"] .nav-link[href$="/companies"] {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 20h16v-2H4zm2-4h3v-3H6zm5 0h3v-5h-3zm5 0h3V6h-3zM4 4v12h2V6h12V4z'/%3E%3C/svg%3E");
}

body[data-page="users"] .nav-link[href$="/users"] {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 12a4 4 0 1 0-4-4a4 4 0 0 0 4 4m-7 8a7 7 0 0 1 14 0z'/%3E%3C/svg%3E");
}

body[data-page="routers"] .nav-link[href$="/routers"] {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 3a7 7 0 0 0-7 7v2H3v2h2v2a7 7 0 0 0 14 0v-2h2v-2h-2v-2a7 7 0 0 0-7-7m0 4a3 3 0 1 1-3 3a3 3 0 0 1 3-3m0 10a5 5 0 0 1-4-2h8a5 5 0 0 1-4 2'/%3E%3C/svg%3E");
}

body[data-page="routers-manage"] .nav-link[href$="/routers/manage"] {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 6h16v2H4zm0 5h16v2H4zm0 5h16v2H4zm13-7h3v3h-3z'/%3E%3C/svg%3E");
}

body[data-page="logs"] .nav-link[href$="/logs"] {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M6 3h9l5 5v13H6zM15 4.5V9h4.5zM8 12h8v2H8zm0 4h8v2H8z'/%3E%3C/svg%3E");
}

body[data-page="releases"] .nav-link[href$="/releases"] {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2l2.2 5.6L20 10l-5.8 2.4L12 18l-2.2-5.6L4 10l5.8-2.4zM5 14l1.1 2.9L9 18l-2.9 1.1L5 22l-1.1-2.9L1 18l2.9-1.1z'/%3E%3C/svg%3E");
}

body[data-page="ops-health"] .nav-link[href$="/ops-health"] {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 12h3l2-5l3 10l2-6h6v2h-4l-3 9l-3-10l-1 3H4z'/%3E%3C/svg%3E");
}

body[data-page] #logoutBtn {
  margin-top: 4px;
  border: 1px solid #d6dfe8;
  background: linear-gradient(180deg, #ffffff 0%, #f4f7fa 100%);
  color: #344656;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
}

body[data-page] .layout {
  padding: 16px 16px 22px;
}

body[data-page] .card,
body[data-page] .stat-card {
  border-color: #e3e8ef;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

body[data-page] .section-header {
  margin-bottom: 12px;
}

body[data-page] .section-header h2 {
  font-size: 1.06rem;
}

body[data-page] .muted-line {
  color: #657585;
}

body[data-page] .pill {
  border-color: #d9e1e8;
  background: linear-gradient(180deg, #ffffff 0%, #f3f6f9 100%);
  color: #314556;
}

body[data-page] .pill.is-ok {
  background: rgba(30, 174, 96, 0.12);
  border-color: rgba(30, 174, 96, 0.18);
  color: #147244;
}

body[data-page] .pill.is-warn {
  background: rgba(217, 154, 42, 0.12);
  border-color: rgba(217, 154, 42, 0.18);
  color: #8a5b13;
}

body[data-page] .pill.is-danger {
  background: rgba(205, 78, 95, 0.12);
  border-color: rgba(205, 78, 95, 0.18);
  color: #a03345;
}

body[data-page] .dashboard-hero-card,
body[data-page] .router-mission-card,
body[data-page] .company-hero-card,
body[data-page] .user-hero-card,
body[data-page] .audit-hero-card,
body[data-page] .release-hero-card,
body[data-page] .router-manage-hero-card,
body[data-page] .ops-health-hero,
body[data-page] .router-suite-card,
body[data-page] .dashboard-turn-card,
body[data-page] .dashboard-pulse-card,
body[data-page] .dashboard-slo-card,
body[data-page] .dashboard-map-card {
  border-color: #e3e8ef;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

body[data-page] .dashboard-hero-card::after,
body[data-page] .router-mission-card::after,
body[data-page] .company-hero-card::after,
body[data-page] .user-hero-card::after,
body[data-page] .audit-hero-card::after,
body[data-page] .release-hero-card::after,
body[data-page] .router-manage-hero-card::after,
body[data-page] .ops-health-hero::after {
  opacity: 0.34;
}

body[data-page] .dashboard-hero-card .dashboard-hero-radar,
body[data-page] .dashboard-hero-card .dashboard-hero-radar-item,
body[data-page] .dashboard-summary-grid .dashboard-kpi-card,
body[data-page] .dashboard-turn-trend-card,
body[data-page] .dashboard-turn-lane,
body[data-page] .dashboard-turn-list-item,
body[data-page] .dashboard-pulse-item,
body[data-page] .dashboard-slo-grid .dashboard-kpi-card,
body[data-page] .dashboard-map-frame,
body[data-page] .router-traffic-insights-card,
body[data-page] .router-fleet-card,
body[data-page] .router-command-deck,
body[data-page] .router-batch-activity-card,
body[data-page] .company-summary-card,
body[data-page] .user-summary-card,
body[data-page] .audit-summary-card,
body[data-page] .release-summary-card,
body[data-page] .router-manage-summary-card,
body[data-page] .company-access-panel,
body[data-page] .user-access-panel,
body[data-page] .audit-access-panel,
body[data-page] .release-access-panel,
body[data-page] .router-manage-access-panel,
body[data-page] .ops-health-status-grid .dashboard-kpi-card,
body[data-page] .ops-health-cluster,
body[data-page] .ops-health-surface {
  border-color: #e3e8ef;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

body[data-page] .dashboard-shell .card::before {
  background: linear-gradient(90deg, rgba(17, 119, 191, 0.9) 0%, rgba(56, 176, 137, 0.78) 52%, rgba(241, 176, 72, 0.82) 100%);
}

body[data-page] .dashboard-shell .card::after {
  opacity: 0.18;
}

body[data-page] .table-wrap,
body[data-page] .router-traffic-insights-panel,
body[data-page] .router-traffic-insights-row,
body[data-page] .router-traffic-insights-connection,
body[data-page] .embedded-card,
body[data-page] .audit-filter-shell,
body[data-page] .release-filter-shell {
  border-color: #e3e8ef;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

body[data-page] .dashboard-shell .secondary,
body[data-page] .dashboard-shell a.secondary {
  border-color: #d7dfe7;
  background: linear-gradient(180deg, #ffffff 0%, #f3f6f9 100%);
  color: #334455;
}

body[data-page] .dashboard-shell .secondary.is-active,
body[data-page] .dashboard-shell a.secondary.is-active {
  border-color: #bcd9f2;
  background: linear-gradient(180deg, #eef7ff 0%, #dcecff 100%);
  color: #0f67a7;
}

body[data-page] {
  background: #f5f7fa;
}

body[data-page] .sidebar-top-logo {
  display: none;
}

body[data-page] .sidebar.card {
  padding: 16px 14px;
  gap: 14px;
}

body[data-page] .sidebar-column {
  gap: 10px;
}

body[data-page] .dashboard-shell {
  gap: 14px;
  padding-top: 8px;
}

body[data-page] .layout {
  gap: 14px;
}

body[data-page] .card,
body[data-page] .stat-card,
body[data-page] .embedded-card,
body[data-page] .table-wrap,
body[data-page] .ops-health-surface,
body[data-page] .ops-health-cluster,
body[data-page] .ops-health-trend-card,
body[data-page] .ops-health-status-grid .dashboard-kpi-card,
body[data-page] .router-traffic-insights-panel,
body[data-page] .router-traffic-insights-row,
body[data-page] .router-traffic-insights-connection,
body[data-page] .router-fleet-card,
body[data-page] .router-command-deck,
body[data-page] .router-batch-activity-card,
body[data-page] .company-summary-card,
body[data-page] .user-summary-card,
body[data-page] .audit-summary-card,
body[data-page] .release-summary-card,
body[data-page] .router-manage-summary-card,
body[data-page] .company-access-panel,
body[data-page] .user-access-panel,
body[data-page] .audit-access-panel,
body[data-page] .release-access-panel,
body[data-page] .router-manage-access-panel {
  border-color: #d9e3ec;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

body[data-page] .dashboard-hero-card,
body[data-page] .router-mission-card,
body[data-page] .company-hero-card,
body[data-page] .user-hero-card,
body[data-page] .audit-hero-card,
body[data-page] .release-hero-card,
body[data-page] .router-manage-hero-card,
body[data-page] .ops-health-hero {
  border-color: #d9e3ec;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

body[data-page] .dashboard-hero-card::before,
body[data-page] .router-mission-card::before,
body[data-page] .company-hero-card::before,
body[data-page] .user-hero-card::before,
body[data-page] .audit-hero-card::before,
body[data-page] .release-hero-card::before,
body[data-page] .router-manage-hero-card::before,
body[data-page] .ops-health-hero::before,
body[data-page] .dashboard-hero-card::after,
body[data-page] .router-mission-card::after,
body[data-page] .company-hero-card::after,
body[data-page] .user-hero-card::after,
body[data-page] .audit-hero-card::after,
body[data-page] .release-hero-card::after,
body[data-page] .router-manage-hero-card::after,
body[data-page] .ops-health-hero::after,
body[data-page] .dashboard-shell .card::before,
body[data-page] .dashboard-shell .card::after {
  content: none !important;
}

body[data-page] .company-summary-card,
body[data-page] .user-summary-card,
body[data-page] .audit-summary-card,
body[data-page] .release-summary-card,
body[data-page] .router-manage-summary-card {
  border-radius: 14px;
}

body[data-page] .pill {
  border-radius: 999px;
}

body[data-page] .section-header h2,
body[data-page] .dashboard-unifi-summary-head h2,
body[data-page] .dashboard-site-directory-head h3,
body[data-page] .audit-log-board-head h2 {
  letter-spacing: -0.03em;
}

@media (max-width: 1180px) {
  body[data-page] .dashboard-shell {
    grid-template-columns: 1fr;
  }

  body[data-page] .sidebar-column {
    position: relative;
    top: 0;
    height: auto;
    overflow: visible;
    padding-right: 14px;
  }
}

@media (max-width: 860px) {
  body[data-page] .unifi-topbar {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 8px;
    padding: 10px 14px;
  }

  body[data-page] .unifi-topbar-center,
  body[data-page] .unifi-topbar-right {
    justify-content: flex-start;
  }

  body[data-page] .layout {
    padding: 14px;
  }

  body[data-page] .sidebar-column {
    padding: 12px 12px 0;
  }
}

body[data-page] .unifi-topbar {
  min-height: 52px;
  border-bottom: 1px solid #e4e9ef;
  background: rgba(250, 251, 253, 0.98);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.84);
  overflow: visible;
}

body[data-page] .unifi-topbar-left,
body[data-page] .unifi-topbar-center,
body[data-page] .unifi-topbar-right {
  min-height: 52px;
}

body[data-page] .unifi-topbar-right {
  gap: 8px;
}

body[data-page] .unifi-topbar-left {
  gap: 8px;
}

body[data-page] .unifi-topbar-left,
body[data-page] .unifi-topbar-right {
  position: relative;
}

body[data-page] .unifi-topbar-toggle {
  cursor: pointer;
}

body[data-page] .unifi-console-pill.unifi-topbar-toggle,
body[data-page] .unifi-topbar-tab.unifi-topbar-toggle {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid transparent;
  background: transparent;
  font: inherit;
}

body[data-page] .unifi-console-pill.unifi-topbar-toggle:focus-visible,
body[data-page] .unifi-topbar-tab.unifi-topbar-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(17, 116, 191, 0.16);
}

body[data-page] .unifi-topbar-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
  padding: 3px;
  border: 1px solid #dde4eb;
  border-radius: 999px;
  background: #f7f9fb;
}

body[data-page] .unifi-topbar-tab {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  color: #7d8b97;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

body[data-page] .unifi-topbar-tab.is-active {
  background: #ffffff;
  color: #1164d3;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}

body[data-page] .unifi-topbar-brand {
  color: #c0c7cf;
  font-size: 0.72rem;
  letter-spacing: 0.11em;
}

body[data-page] .unifi-topbar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid #d8dee5;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #f3f6f9 100%);
  color: #5f7183;
  font-size: 0.86rem;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.05);
}

body[data-page] .unifi-topbar-icon.is-alert {
  color: #1164d3;
}

body[data-page] .unifi-console-pill {
  border-color: #d8dfe6;
  background: linear-gradient(180deg, #ffffff 0%, #f4f7fa 100%);
  color: #314253;
}

body[data-page] .unifi-console-caret {
  color: #8a96a3;
  font-size: 0.74rem;
}

body[data-page] .unifi-topbar-dropdown-wrap {
  position: absolute;
  inset: calc(100% + 8px) 16px auto 16px;
  z-index: 90;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}

body[data-page] .unifi-topbar-dropdown {
  pointer-events: auto;
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 92px);
  padding: 14px;
  border: 1px solid #d8e0e7;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
  overflow: auto;
}

body[data-page] .unifi-topbar-dropdown--console {
  max-width: 560px;
}

body[data-page] .unifi-topbar-dropdown--system {
  width: min(420px, calc(100vw - 32px));
  margin-left: auto;
}

body[data-page] .unifi-topbar-dropdown-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

body[data-page] .unifi-topbar-dropdown-kicker {
  margin: 0 0 4px;
  color: #6c8396;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

body[data-page] .unifi-topbar-dropdown-head h3 {
  margin: 0;
  color: #173047;
  font-size: 1rem;
  line-height: 1.1;
}

body[data-page] .unifi-topbar-dropdown-summary {
  margin: 0 0 12px;
  color: #617589;
  font-size: 0.86rem;
  line-height: 1.45;
}

body[data-page] .unifi-topbar-dropdown-list {
  display: grid;
  gap: 8px;
  max-height: calc(100vh - 220px);
  overflow: auto;
  padding-right: 2px;
}

body[data-page] .unifi-topbar-menu-item {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #dbe3ec;
  border-radius: 16px;
  color: inherit;
  text-decoration: none;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
}

body[data-page] .unifi-topbar-menu-item:hover {
  color: inherit;
  border-color: #cddceb;
  background: #f7fbff;
}

body[data-page] .unifi-topbar-menu-item.is-empty {
  border-style: dashed;
  background: #fbfcfe;
  color: #607384;
}

body[data-page] .unifi-topbar-menu-item-main {
  display: grid;
  gap: 3px;
}

body[data-page] .unifi-topbar-menu-item-main strong {
  color: #173047;
  font-size: 0.95rem;
  line-height: 1.12;
}

body[data-page] .unifi-topbar-menu-item-main span {
  color: #617589;
  font-size: 0.8rem;
  line-height: 1.35;
}

body[data-page] .unifi-topbar-menu-item .pill {
  justify-self: flex-start;
  min-height: 24px;
  padding: 0 9px;
  font-size: 0.68rem;
  white-space: nowrap;
}

body[data-page] .unifi-topbar-menu-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  color: #6b8093;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

body[data-page] .unifi-topbar-menu-item small {
  margin: 0;
  color: #617589;
  font-size: 0.76rem;
  line-height: 1.4;
}

body[data-page] .unifi-topbar-dropdown-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 12px;
}

body[data-page] .unifi-topbar-dropdown-footnote {
  display: block;
  margin-top: 10px;
  color: #7a8996;
  font-size: 0.74rem;
}

body[data-page] .unifi-rail {
  position: fixed;
  inset: 52px auto 0 0;
  z-index: 75;
  width: 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 0 8px;
  border-right: 1px solid #e4e9ef;
  background: rgba(249, 250, 252, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

body[data-page] .unifi-rail-group {
  display: grid;
  gap: 7px;
  padding: 0 9px;
}

body[data-page] .unifi-rail-item {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0 auto;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: #738294;
  box-shadow: none;
}

body[data-page] .unifi-rail-item.is-button {
  padding: 0;
}

body[data-page] .unifi-rail-item:hover {
  transform: none;
  border-color: #dbe2ea;
  background: #eef3f8;
}

body[data-page] .unifi-rail-icon {
  width: 20px;
  height: 20px;
  background: currentColor;
  opacity: 0.96;
  -webkit-mask: var(--rail-icon) center / contain no-repeat;
  mask: var(--rail-icon) center / contain no-repeat;
}

body[data-page] .unifi-rail-icon[data-rail="dashboard"] {
  --rail-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 4h7v7H4zm9 0h7v4h-7zm0 6h7v10h-7zM4 13h7v7H4z'/%3E%3C/svg%3E");
}

body[data-page] .unifi-rail-icon[data-rail="routers"] {
  --rail-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 3a7 7 0 0 0-7 7v2H3v2h2v2a7 7 0 0 0 14 0v-2h2v-2h-2v-2a7 7 0 0 0-7-7m0 4a3 3 0 1 1-3 3a3 3 0 0 1 3-3'/%3E%3C/svg%3E");
}

body[data-page] .unifi-rail-icon[data-rail="users"] {
  --rail-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 12a4 4 0 1 0-4-4a4 4 0 0 0 4 4m-7 8a7 7 0 0 1 14 0z'/%3E%3C/svg%3E");
}

body[data-page] .unifi-rail-icon[data-rail="companies"] {
  --rail-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 20h16v-2H4zm2-4h3v-3H6zm5 0h3v-5h-3zm5 0h3V6h-3zM4 4v12h2V6h12V4z'/%3E%3C/svg%3E");
}

body[data-page] .unifi-rail-icon[data-rail="logs"] {
  --rail-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M6 3h9l5 5v13H6zm9 1.5V9h4.5zM8 12h8v2H8zm0 4h8v2H8z'/%3E%3C/svg%3E");
}

body[data-page] .unifi-rail-icon[data-rail="releases"] {
  --rail-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2l2.3 5.7L20 10l-5.7 2.3L12 18l-2.3-5.7L4 10l5.7-2.3zM5 14l1.1 2.9L9 18l-2.9 1.1L5 22l-1.1-2.9L1 18l2.9-1.1z'/%3E%3C/svg%3E");
}

body[data-page] .unifi-rail-icon[data-rail="ops-health"] {
  --rail-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 12h3l2-5l3 10l2-6h6v2h-4l-3 9l-3-10l-1 3H4z'/%3E%3C/svg%3E");
}

body[data-page] .unifi-rail-icon[data-rail="logout"] {
  --rail-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M10 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h5v-2H5V5h5zm6.4 4.6L15 9l2 2H9v2h8l-2 2l1.4 1.4L20.8 12z'/%3E%3C/svg%3E");
}

body[data-page="dashboard"] .unifi-rail-item[href$="/dashboard"],
body[data-page="companies"] .unifi-rail-item[href$="/companies"],
body[data-page="users"] .unifi-rail-item[href$="/users"],
body[data-page="routers"] .unifi-rail-item[href$="/routers"],
body[data-page="routers-manage"] .unifi-rail-item[href$="/routers/manage"],
body[data-page="logs"] .unifi-rail-item[href$="/logs"],
body[data-page="releases"] .unifi-rail-item[href$="/releases"],
body[data-page="ops-health"] .unifi-rail-item[href$="/ops-health"] {
  border-color: #b9d3ef;
  background: linear-gradient(180deg, #eef7ff 0%, #dcecff 100%);
  color: #0f67a7;
  box-shadow: inset 3px 0 0 #1177bf;
}

body[data-page] .dashboard-shell {
  width: calc(100% - 64px);
  margin: 0 0 18px 64px;
  padding: 10px 10px 0 10px;
}

body[data-page] .workspace-sidebar-brand {
  display: flex;
  align-items: center;
  min-height: 64px;
}

body[data-page] .workspace-sidebar-card {
  display: grid;
  gap: 18px;
  min-height: 420px;
  padding: 20px;
  background:
    radial-gradient(circle at top right, rgba(30, 151, 226, 0.14), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 249, 252, 0.98) 100%);
}

body[data-page] .workspace-sidebar-head {
  display: grid;
  gap: 10px;
}

body[data-page] .workspace-sidebar-kicker {
  color: #178458;
  letter-spacing: 0.12em;
}

body[data-page] .workspace-sidebar-head h1 {
  margin: 0;
  color: #173047;
  font-family: "Avenir Next", "Segoe UI Variable Display", "Segoe UI", sans-serif;
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

body[data-page] .workspace-sidebar-head .welcome {
  min-height: 20px;
}

body[data-page] .workspace-sidebar-copy {
  margin: 0;
  color: #5b7184;
  font-size: 0.95rem;
  line-height: 1.6;
}

body[data-page] .workspace-sidebar-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body[data-page] .workspace-sidebar-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(234, 242, 248, 0.95);
  color: #4c6478;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body[data-page] .workspace-sidebar-panel {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(216, 225, 234, 0.95);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(242, 247, 251, 0.98) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

body[data-page] .workspace-sidebar-panel-kicker {
  color: #1e97e2;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body[data-page] .workspace-sidebar-panel strong {
  color: #173047;
  font-size: 1rem;
  line-height: 1.2;
}

body[data-page] .workspace-sidebar-panel p {
  margin: 0;
  color: #5f7588;
  font-size: 0.88rem;
  line-height: 1.55;
}

body[data-page] .sidebar-column {
  top: 52px;
  height: calc(100vh - 52px);
}

body[data-page] .dashboard-unifi-layout {
  gap: 16px;
}

body[data-page="dashboard"] .dashboard-unifi-summary-card,
body[data-page="dashboard"] .dashboard-unifi-internet-card,
body[data-page="dashboard"] .dashboard-unifi-clients-card,
body[data-page="dashboard"] .dashboard-unifi-chart-card,
body[data-page="dashboard"] .dashboard-unifi-table-card,
body[data-page="dashboard"] .dashboard-unifi-panel {
  border-color: #e2e7ed;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

body[data-page="dashboard"] .dashboard-console-card {
  display: grid;
  gap: 14px;
}

body[data-page="dashboard"] .dashboard-console-header h1 {
  margin: 0;
  color: #173047;
  font-size: 1.42rem;
  line-height: 1.06;
}

body[data-page="dashboard"] .dashboard-console-detail {
  margin: 10px 0 0;
  color: #607283;
  font-size: 0.9rem;
  line-height: 1.5;
}

body[data-page="dashboard"] .dashboard-console-rack {
  display: none;
}

body[data-page="dashboard"] .dashboard-console-metrics {
  display: grid;
  gap: 12px;
}

body[data-page="dashboard"] .dashboard-console-metric {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid #d8e1ea;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f8fb 100%);
}

body[data-page="dashboard"] .dashboard-console-metric-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

body[data-page="dashboard"] .dashboard-console-metric-head span {
  color: #6a8298;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body[data-page="dashboard"] .dashboard-console-metric-head strong {
  color: #19324a;
  font-size: 1rem;
}

body[data-page="dashboard"] .dashboard-console-progress {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: #e4ebf2;
  overflow: hidden;
}

body[data-page="dashboard"] .dashboard-console-progress span {
  display: block;
  width: 50%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1e97e2 0%, #19c19d 100%);
}

body[data-page="dashboard"] .dashboard-console-metric small {
  color: #6a8298;
}

body[data-page="dashboard"] .dashboard-console-live {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #d8e1ea;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f8fb 100%);
}

body[data-page="dashboard"] .dashboard-console-live-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

body[data-page="dashboard"] .dashboard-live-badge,
body[data-page="dashboard"] .dashboard-console-live-meta-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #e8f6ef;
  color: #178458;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

body[data-page="dashboard"] .dashboard-console-live-meta-chip {
  background: #eef4fb;
  color: #5e7389;
}

body[data-page="dashboard"] .dashboard-console-live-title {
  margin: 0;
  color: #173047;
  font-size: 0.96rem;
  font-weight: 700;
}

body[data-page="dashboard"] .dashboard-console-live-meta {
  margin: 0;
  color: #617589;
  font-size: 0.88rem;
  line-height: 1.5;
}

body[data-page="dashboard"] .dashboard-console-live-photo {
  display: none;
}

body[data-page="dashboard"] .dashboard-console-nav {
  display: grid;
  gap: 8px;
}

body[data-page="dashboard"] .dashboard-console-sites {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #d8e1ea;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f8fb 100%);
}

body[data-page="dashboard"] .dashboard-console-sites-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

body[data-page="dashboard"] .dashboard-console-sites-head h2 {
  margin: 0;
  color: #173047;
  font-size: 1rem;
  line-height: 1.1;
}

body[data-page="dashboard"] .dashboard-console-sites-summary {
  margin: 0;
  color: #617589;
  font-size: 0.86rem;
  line-height: 1.45;
}

body[data-page="dashboard"] .dashboard-console-sites-list {
  display: grid;
  gap: 8px;
  max-height: 316px;
  overflow: auto;
  padding-right: 2px;
}

body[data-page="dashboard"] .dashboard-console-sites-list::-webkit-scrollbar {
  width: 8px;
}

body[data-page="dashboard"] .dashboard-console-sites-list::-webkit-scrollbar-track {
  background: transparent;
}

body[data-page="dashboard"] .dashboard-console-sites-list::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: #d6dfe7;
  background-clip: padding-box;
}

body[data-page="dashboard"] .dashboard-console-site-item {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #dbe3ec;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
}

body[data-page="dashboard"] .dashboard-console-site-item.is-empty {
  border-style: dashed;
  background: #fbfcfe;
  color: #607384;
}

body[data-page="dashboard"] .dashboard-console-site-link {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

body[data-page="dashboard"] .dashboard-console-site-link:hover {
  color: inherit;
}

body[data-page="dashboard"] .dashboard-console-site-title {
  display: grid;
  gap: 3px;
}

body[data-page="dashboard"] .dashboard-console-site-title strong {
  color: #173047;
  font-size: 0.95rem;
  line-height: 1.12;
}

body[data-page="dashboard"] .dashboard-console-site-title span {
  color: #617589;
  font-size: 0.8rem;
  line-height: 1.35;
}

body[data-page="dashboard"] .dashboard-console-site-link .pill {
  min-height: 24px;
  padding: 0 9px;
  font-size: 0.68rem;
  white-space: nowrap;
}

body[data-page="dashboard"] .dashboard-console-site-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  color: #6b8093;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

body[data-page="dashboard"] .dashboard-console-site-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

body[data-page="dashboard"] .dashboard-console-site-stats span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef4fb;
  color: #5e7389;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body[data-page="dashboard"] .dashboard-unifi-summary-card {
  display: grid;
  gap: 18px;
}

body[data-page="dashboard"] .dashboard-unifi-summary-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

body[data-page="dashboard"] .dashboard-unifi-summary-head h2 {
  margin: 0;
  color: #173047;
  font-family: "Avenir Next", "Segoe UI Variable Display", "Segoe UI", sans-serif;
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

body[data-page="dashboard"] .dashboard-unifi-range-switch {
  display: inline-flex;
  gap: 8px;
}

body[data-page="dashboard"] .dashboard-unifi-range-switch .secondary {
  min-height: 34px;
  padding: 0 11px;
  border-radius: 12px;
}

body[data-page="dashboard"] .dashboard-unifi-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

body[data-page="dashboard"] .dashboard-unifi-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

body[data-page="dashboard"] .dashboard-unifi-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

body[data-page="dashboard"] .dashboard-unifi-card-kicker {
  display: block;
  margin-bottom: 6px;
  color: #6c8396;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

body[data-page="dashboard"] .dashboard-unifi-internet-card,
body[data-page="dashboard"] .dashboard-unifi-clients-card {
  display: grid;
  gap: 12px;
}

body[data-page="dashboard"] .dashboard-unifi-internet-body,
body[data-page="dashboard"] .dashboard-unifi-clients-body {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

body[data-page="dashboard"] .dashboard-donut {
  position: relative;
  width: 138px;
  height: 138px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid #d6e1ec;
  background:
    conic-gradient(var(--donut-accent, #2b8fe6) calc(var(--donut-value, 0) * 1%), var(--donut-track, #e9eff5) 0);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 8px 18px rgba(15, 23, 42, 0.05);
}

body[data-page="dashboard"] .dashboard-donut::before {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

body[data-page="dashboard"] .dashboard-donut strong,
body[data-page="dashboard"] .dashboard-donut span {
  position: relative;
  z-index: 1;
  text-align: center;
}

body[data-page="dashboard"] .dashboard-donut strong {
  color: #18344f;
  font-size: 1.45rem;
  line-height: 1;
}

body[data-page="dashboard"] .dashboard-donut span {
  color: #6b8093;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: translateY(22px);
}

body[data-page="dashboard"] .dashboard-donut--secondary {
  --donut-accent: #0f8a63;
  --donut-track: #e7f4ef;
}

body[data-page="dashboard"] .dashboard-unifi-network-stats,
body[data-page="dashboard"] .dashboard-unifi-clients-breakdown {
  display: grid;
  gap: 10px;
}

body[data-page="dashboard"] .dashboard-unifi-network-stat,
body[data-page="dashboard"] .dashboard-unifi-client-breakdown {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #dde5ec;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
}

body[data-page="dashboard"] .dashboard-unifi-network-stat span,
body[data-page="dashboard"] .dashboard-unifi-client-breakdown span {
  color: #6c8396;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body[data-page="dashboard"] .dashboard-unifi-network-stat strong,
body[data-page="dashboard"] .dashboard-unifi-client-breakdown strong {
  color: #173047;
  font-size: 1.24rem;
  line-height: 1.05;
}

body[data-page="dashboard"] .dashboard-unifi-clients-list {
  display: grid;
  gap: 0;
  border-top: 1px solid #e4ebf2;
}

body[data-page="dashboard"] .dashboard-unifi-site-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid #e4ebf2;
}

body[data-page="dashboard"] .dashboard-unifi-site-row-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

body[data-page="dashboard"] .dashboard-unifi-site-row-copy strong {
  color: #173047;
  font-size: 0.95rem;
  line-height: 1.2;
}

body[data-page="dashboard"] .dashboard-unifi-site-row-copy p,
body[data-page="dashboard"] .dashboard-unifi-site-row-copy small {
  margin: 0;
  color: #607384;
  line-height: 1.35;
}

body[data-page="dashboard"] .dashboard-unifi-site-row-side {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

body[data-page="dashboard"] .dashboard-unifi-site-row-side .pill {
  min-height: 24px;
  padding: 0 8px;
  font-size: 0.68rem;
}

body[data-page="dashboard"] .dashboard-unifi-site-empty {
  padding: 14px 0;
  color: #607384;
}

body[data-page="dashboard"] .dashboard-unifi-site-empty strong,
body[data-page="dashboard"] .dashboard-unifi-site-empty p {
  display: block;
  margin: 0;
}

body[data-page="dashboard"] .dashboard-unifi-site-empty p {
  margin-top: 4px;
}

body[data-page="dashboard"] .dashboard-unifi-chart-card {
  display: grid;
  gap: 12px;
}

body[data-page="dashboard"] .dashboard-unifi-chart-head {
  align-items: center;
}

body[data-page="dashboard"] .dashboard-unifi-chart-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #5e7185;
  font-size: 0.94rem;
  font-weight: 700;
}

body[data-page="dashboard"] .dashboard-unifi-chart-separator {
  color: #c5cdd6;
}

body[data-page="dashboard"] .dashboard-unifi-chart-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body[data-page="dashboard"] .dashboard-unifi-chart-filter-row .pill {
  min-height: 30px;
  padding: 0 11px;
  font-size: 0.72rem;
}

body[data-page="dashboard"] .dashboard-unifi-chart-frame {
  min-height: 320px;
  border: 1px solid #dce5ed;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82) 0%, rgba(248, 251, 254, 0.96) 100%),
    linear-gradient(180deg, #f9fbfd 0%, #eef4f8 100%);
  overflow: hidden;
}

body[data-page="dashboard"] #dashboardExperienceChart {
  width: 100%;
  height: 100%;
  min-height: 320px;
  display: block;
}

body[data-page="dashboard"] #dashboardExperienceChart .grid {
  stroke: #e5ebf0;
  stroke-width: 1;
}

body[data-page="dashboard"] #dashboardExperienceChart .axis {
  stroke: #cfd7df;
  stroke-width: 1.2;
}

body[data-page="dashboard"] #dashboardExperienceChart .axis-label {
  fill: #7d8da0;
  font-size: 12px;
}

body[data-page="dashboard"] #dashboardExperienceChart .port-track {
  fill: #e7eef5;
}

body[data-page="dashboard"] #dashboardExperienceChart .port-rx {
  fill: #2a93de;
}

body[data-page="dashboard"] #dashboardExperienceChart .port-tx {
  fill: #19b58a;
}

body[data-page="dashboard"] #dashboardExperienceChart .port-label {
  fill: #173047;
  font-size: 13px;
  font-weight: 700;
}

body[data-page="dashboard"] #dashboardExperienceChart .port-subtitle {
  fill: #73879a;
  font-size: 11px;
}

body[data-page="dashboard"] #dashboardExperienceChart .port-value {
  fill: #173047;
  font-size: 12px;
  font-weight: 700;
}

body[data-page="dashboard"] #dashboardExperienceChart .port-legend {
  fill: #607384;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

body[data-page="dashboard"] .dashboard-unifi-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

body[data-page="dashboard"] .dashboard-unifi-panel {
  display: grid;
  gap: 12px;
}

body[data-page="dashboard"] .dashboard-unifi-mini-list {
  display: grid;
  gap: 10px;
}

body[data-page="dashboard"] .dashboard-unifi-mini-item {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid #dbe2ea;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
}

body[data-page="dashboard"] .dashboard-unifi-mini-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

body[data-page="dashboard"] .dashboard-unifi-mini-item strong {
  color: #173047;
  font-size: 0.95rem;
}

body[data-page="dashboard"] .dashboard-unifi-mini-item p,
body[data-page="dashboard"] .dashboard-unifi-mini-item small {
  margin: 0;
  color: #607384;
  line-height: 1.45;
}

body[data-page="dashboard"] .dashboard-unifi-mini-item .pill {
  min-height: 24px;
  padding: 0 8px;
  font-size: 0.68rem;
}

body[data-page="dashboard"] .dashboard-unifi-mini-empty {
  padding: 14px;
  border: 1px dashed #d4dbe3;
  border-radius: 16px;
  background: #fbfcfe;
  color: #607384;
}

body[data-page="dashboard"] .dashboard-unifi-table-card {
  display: grid;
  gap: 12px;
}

body[data-page="dashboard"] .dashboard-unifi-table-wrap {
  overflow: auto;
}

body[data-page="dashboard"] .dashboard-unifi-table {
  min-width: 1040px;
  border-collapse: separate;
  border-spacing: 0;
}

body[data-page="dashboard"] .dashboard-unifi-table th,
body[data-page="dashboard"] .dashboard-unifi-table td {
  padding: 13px 14px;
  border-bottom: 1px solid #e8edf2;
  color: #23425c;
  white-space: nowrap;
}

body[data-page="dashboard"] .dashboard-unifi-table th {
  color: #6c8296;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

body[data-page="dashboard"] .dashboard-unifi-table td {
  font-size: 0.9rem;
}

body[data-page="dashboard"] .dashboard-unifi-table tbody tr:hover td {
  background: #f7fbff;
}

body[data-page="dashboard"] .dashboard-unifi-table .pill {
  min-height: 24px;
  padding: 0 8px;
  font-size: 0.68rem;
}

body[data-page="dashboard"] .dashboard-unifi-table-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

body[data-page="dashboard"] .dashboard-unifi-table-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
}

body[data-page="dashboard"] .dashboard-site-directory-card {
  display: grid;
  gap: 16px;
  padding: 22px 20px;
}

body[data-page="dashboard"] .dashboard-site-directory-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

body[data-page="dashboard"] .dashboard-site-directory-head h3 {
  margin: 0;
  color: #173047;
  font-size: 1.28rem;
  line-height: 1.06;
}

body[data-page="dashboard"] .dashboard-site-directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
}

body[data-page="dashboard"] .dashboard-site-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #d8e3ed;
  border-radius: 18px;
  background:
    radial-gradient(240px 120px at 100% -18%, rgba(170, 218, 244, 0.18), transparent 72%),
    linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 10px 20px rgba(15, 37, 60, 0.08);
}

body[data-page="dashboard"] .dashboard-site-card.is-empty {
  min-height: 132px;
  align-content: center;
}

body[data-page="dashboard"] .dashboard-site-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

body[data-page="dashboard"] .dashboard-site-card-head h4 {
  margin: 0;
  color: #173047;
  font-size: 1rem;
  line-height: 1.1;
}

body[data-page="dashboard"] .dashboard-site-card-kicker {
  display: block;
  margin-bottom: 5px;
  color: #6b8295;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

body[data-page="dashboard"] .dashboard-site-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  color: #5d7588;
  font-size: 0.78rem;
  font-weight: 700;
}

body[data-page="dashboard"] .dashboard-site-card-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

body[data-page="dashboard"] .dashboard-site-card-stats article {
  display: grid;
  gap: 4px;
  padding: 10px 11px;
  border: 1px solid #d8e4ef;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f8fc 100%);
}

body[data-page="dashboard"] .dashboard-site-card-stats strong {
  color: #173047;
  font-size: 1rem;
}

body[data-page="dashboard"] .dashboard-site-card-stats span {
  color: #6d8397;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

body[data-page="dashboard"] .dashboard-site-card-actions {
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 1180px) {
  body[data-page] .dashboard-shell {
    width: calc(100% - 64px);
    margin-left: 64px;
    grid-template-columns: 1fr;
  }

  body[data-page] .sidebar-column {
    position: relative;
    top: 0;
    height: auto;
    overflow: visible;
    padding-right: 14px;
  }

  body[data-page="dashboard"] .dashboard-unifi-top-grid,
  body[data-page="dashboard"] .dashboard-unifi-bottom-grid,
  body[data-page="dashboard"] .dashboard-unifi-kpi-grid {
    grid-template-columns: 1fr;
  }

  body[data-page="dashboard"] .dashboard-unifi-internet-body,
  body[data-page="dashboard"] .dashboard-unifi-clients-body {
    grid-template-columns: 1fr;
  }

  body[data-page] .unifi-rail {
    display: none;
  }

  body[data-page] .dashboard-shell {
    margin-left: 0;
    width: 100%;
  }

  body[data-page] .workspace-sidebar-card {
    min-height: auto;
  }
}

@media (max-width: 860px) {
  body[data-page] .unifi-topbar {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 8px;
    padding: 10px 14px;
  }

  body[data-page] .unifi-topbar-center,
  body[data-page] .unifi-topbar-right {
    justify-content: flex-start;
  }

  body[data-page] .layout {
    padding: 14px;
  }

  body[data-page] .sidebar-column {
    padding: 12px 12px 0;
  }

  body[data-page="dashboard"] .dashboard-unifi-summary-head,
  body[data-page="dashboard"] .dashboard-unifi-card-head {
    flex-direction: column;
  }

  body[data-page="routers"] .router-monitor-utility-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-page="routers"] .router-monitor-utility-actions,
  body[data-page="routers"] .router-workspace-quick-actions {
    justify-content: flex-start;
  }

}

@media (max-width: 620px) {
  body[data-page="routers"] .router-monitor-utility-stats {
    grid-template-columns: 1fr;
  }
}

body[data-page="routers"] .dashboard-shell.router-site-shell {
  grid-template-columns: 312px minmax(0, 1fr);
  align-items: start;
}

body[data-page="routers"] .router-unifi-sidebar-column {
  gap: 12px;
  height: auto;
  overflow: visible;
}

body[data-page="routers"] .router-unifi-sidebar-card {
  display: grid;
  gap: 18px;
  padding: 22px 20px;
  border: 1px solid #dbe4ec;
  border-radius: 26px;
  background:
    radial-gradient(320px 180px at 100% -20%, rgba(166, 214, 243, 0.2), transparent 72%),
    linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 18px 34px rgba(16, 33, 49, 0.08);
}

body[data-page="routers"] .router-unifi-sidebar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

body[data-page="routers"] .router-unifi-sidebar-head h1 {
  margin: 0;
  color: #173047;
  font-size: clamp(1.52rem, 2vw, 1.92rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

body[data-page="routers"] .router-unifi-console-kicker {
  color: #18b26b;
}

body[data-page="routers"] .router-unifi-sidebar-subtitle,
body[data-page="routers"] .router-unifi-sidebar-meta {
  margin: 0;
  color: #607384;
  font-size: 0.9rem;
  line-height: 1.55;
}

body[data-page="routers"] .router-unifi-sidebar-meta {
  font-size: 0.84rem;
}

body[data-page="routers"] .router-unifi-device {
  position: relative;
  min-height: 154px;
  border: 1px solid #dde5ed;
  border-radius: 24px;
  background:
    radial-gradient(160px 90px at 50% 100%, rgba(29, 148, 222, 0.12), transparent 70%),
    linear-gradient(180deg, #ffffff 0%, #f2f6fa 100%);
  overflow: hidden;
}

body[data-page="routers"] .router-unifi-device::before {
  content: "";
  position: absolute;
  inset: auto 22px 22px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(33, 149, 222, 0.1) 0%, rgba(22, 178, 128, 0.22) 55%, rgba(33, 149, 222, 0.1) 100%);
}

body[data-page="routers"] .router-unifi-device-unit {
  position: absolute;
  left: 28px;
  right: 28px;
  height: 28px;
  border: 1px solid #bfcad6;
  border-radius: 8px;
  background:
    linear-gradient(90deg, #dae2eb 0 24%, transparent 24% 58%, #eff4f8 58% 100%),
    linear-gradient(180deg, #fdfefe 0%, #e8edf2 100%);
  box-shadow: 0 12px 18px rgba(15, 30, 44, 0.08);
}

body[data-page="routers"] .router-unifi-device-unit::before,
body[data-page="routers"] .router-unifi-device-unit::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 16px;
  width: 62px;
  height: 10px;
  border-radius: 3px;
  background:
    linear-gradient(90deg, #2c3e50 0 8%, transparent 8% 12%, #2c3e50 12% 20%, transparent 20% 24%, #2c3e50 24% 32%, transparent 32% 36%, #2c3e50 36% 44%, transparent 44% 48%, #2c3e50 48% 56%, transparent 56% 60%, #2c3e50 60% 68%, transparent 68% 72%, #2c3e50 72% 80%, transparent 80% 84%, #2c3e50 84% 92%, transparent 92% 100%);
}

body[data-page="routers"] .router-unifi-device-unit::after {
  inset: 7px auto auto 14px;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(180deg, #2f83ff 0%, #1c5fd2 100%);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.84);
}

body[data-page="routers"] .router-unifi-device-unit--top {
  top: 42px;
}

body[data-page="routers"] .router-unifi-device-unit--bottom {
  top: 80px;
}

body[data-page="routers"] .router-unifi-device-dot {
  position: absolute;
  bottom: 24px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #84b7ea;
  box-shadow: 14px 0 0 #c7d9ea, 28px 0 0 #84b7ea;
}

body[data-page="routers"] .router-unifi-device-dot--left {
  left: calc(50% - 18px);
}

body[data-page="routers"] .router-unifi-device-dot--right {
  display: none;
}

body[data-page="routers"] .router-unifi-sidebar-section {
  display: grid;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid #e5ebf1;
}

body[data-page="routers"] .router-unifi-sidebar-section-head {
  display: grid;
  gap: 6px;
}

body[data-page="routers"] .router-unifi-sidebar-section-title {
  margin: 0;
  color: #6b8295;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body[data-page="routers"] .router-unifi-sidebar-field-grid {
  display: grid;
  gap: 10px;
}

body[data-page="routers"] .router-unifi-sidebar-field-grid label {
  display: grid;
  gap: 6px;
}

body[data-page="routers"] .router-unifi-sidebar-field-grid label span {
  color: #6b8095;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

body[data-page="routers"] .router-unifi-sidebar-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

body[data-page="routers"] .router-unifi-sidebar-actions .secondary {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 12px;
  justify-content: center;
  box-shadow: none;
}

body[data-page="routers"] .router-unifi-sidebar-actions #reloadRouters,
body[data-page="routers"] .router-unifi-sidebar-actions #routerBatchUpdateBtn {
  grid-column: 1 / -1;
}

body[data-page="routers"] .router-unifi-summary-card {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid #dde6ee;
  border-radius: 28px;
  background:
    radial-gradient(380px 180px at 100% -16%, rgba(168, 217, 243, 0.2), transparent 74%),
    linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
  box-shadow: 0 18px 34px rgba(16, 33, 49, 0.08);
}

body[data-page="routers"] .router-unifi-summary-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

body[data-page="routers"] .router-unifi-summary-head h2 {
  margin: 0;
  color: #173047;
  font-size: clamp(1.9rem, 3.6vw, 2.62rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

body[data-page="routers"] .router-unifi-summary-head .muted-line {
  margin: 10px 0 0;
  max-width: 720px;
}

body[data-page="routers"] .router-unifi-kicker {
  color: #2a92dd;
}

body[data-page="routers"] .router-unifi-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.95fr);
  grid-template-areas:
    "bandwidth sitekpi"
    "bandwidth topsites";
  gap: 16px;
  align-items: stretch;
}

body[data-page="routers"] #routerSiteBandwidthCard {
  grid-area: bandwidth;
}

body[data-page="routers"] .router-unifi-site-kpi-card {
  grid-area: sitekpi;
}

body[data-page="routers"] #routerSiteTopSitesCard {
  grid-area: topsites;
}

body[data-page="routers"] .router-unifi-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

body[data-page="routers"] .router-unifi-panel-head h3 {
  margin: 0;
  color: #173047;
  font-size: 1.2rem;
  line-height: 1.06;
}

body[data-page="routers"] .router-unifi-panel-head .muted-line {
  margin: 6px 0 0;
}

body[data-page="routers"] .router-unifi-panel-kicker {
  display: inline-block;
  margin-bottom: 6px;
  color: #6b8295;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

body[data-page="routers"] .router-unifi-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

body[data-page="routers"] .router-unifi-bandwidth-card,
body[data-page="routers"] .router-unifi-site-kpi-card,
body[data-page="routers"] .router-unifi-top-sites-card,
body[data-page="routers"] .router-unifi-table-card {
  border: 1px solid #dbe4ec;
  border-radius: 22px;
  background:
    radial-gradient(280px 140px at 100% -18%, rgba(166, 214, 243, 0.16), transparent 72%),
    linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 12px 24px rgba(15, 37, 60, 0.06);
}

body[data-page="routers"] .router-unifi-bandwidth-card {
  min-height: 100%;
}

body[data-page="routers"] .router-unifi-site-kpi-card {
  display: grid;
  gap: 14px;
}

body[data-page="routers"] .router-unifi-site-kpi-body {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

body[data-page="routers"] .router-unifi-site-ring {
  position: relative;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid #d5e0ea;
  background:
    conic-gradient(#2a92dd 0 58%, #7ed1ed 58% 78%, #e9eff5 78% 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 10px 18px rgba(15, 37, 60, 0.06);
}

body[data-page="routers"] .router-unifi-site-ring::before {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbfe 100%);
}

body[data-page="routers"] .router-unifi-site-ring span,
body[data-page="routers"] .router-unifi-site-ring strong {
  position: relative;
  z-index: 1;
  text-align: center;
}

body[data-page="routers"] .router-unifi-site-ring span {
  color: #6c8296;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: translateY(18px);
}

body[data-page="routers"] .router-unifi-site-ring strong {
  color: #173047;
  font-size: 2rem;
  line-height: 1;
  transform: translateY(-10px);
}

body[data-page="routers"] .router-unifi-site-kpi-list {
  display: grid;
  gap: 10px;
}

body[data-page="routers"] .router-unifi-site-kpi-item {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #dde6ee;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f6f9fc 100%);
}

body[data-page="routers"] .router-unifi-site-kpi-item span {
  color: #6b8095;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body[data-page="routers"] .router-unifi-site-kpi-item strong {
  color: #173047;
  font-size: 1.28rem;
  line-height: 1.05;
}

body[data-page="routers"] .router-unifi-table-card {
  display: grid;
  gap: 12px;
}

body[data-page="routers"] .router-unifi-table-card .table-wrap {
  margin: 0;
  padding: 8px 10px 12px;
}

body[data-page="routers"] .router-batch-activity-card {
  margin: 0;
}

body[data-page="routers"] #routerMonitorSection {
  padding: 22px;
  border: 1px solid #dde6ee;
  border-radius: 28px;
  background:
    radial-gradient(360px 160px at 100% -18%, rgba(168, 217, 243, 0.18), transparent 74%),
    linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
  box-shadow: 0 18px 34px rgba(16, 33, 49, 0.08);
}

body[data-page="routers"] #routerDetailsSubtitle {
  margin: 0 0 16px;
}

@media (max-width: 1360px) {
  body[data-page="routers"] .router-unifi-top-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "sitekpi"
      "bandwidth"
      "topsites";
  }
}

@media (max-width: 1180px) {
  body[data-page="routers"] .dashboard-shell.router-site-shell {
    grid-template-columns: 1fr;
  }

  body[data-page="routers"] .router-unifi-sidebar-column {
    position: relative;
    top: 0;
  }
}

@media (max-width: 860px) {
  body[data-page="routers"] .router-unifi-summary-head,
  body[data-page="routers"] .router-unifi-panel-head {
    flex-direction: column;
  }

  body[data-page="routers"] .router-unifi-site-kpi-body {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  body[data-page="routers"] .router-unifi-sidebar-actions {
    grid-template-columns: 1fr;
  }

  body[data-page="routers"] .router-unifi-sidebar-actions #reloadRouters,
  body[data-page="routers"] .router-unifi-sidebar-actions #routerBatchUpdateBtn {
    grid-column: auto;
  }
}
