:root {
  --bg: #edf2f7;
  --bg-soft: #f5f8fc;
  --bg-elevated: #ffffff;
  --bg-sunken: #e8edf4;
  --ink-strong: #0f2236;
  --ink: #1e3550;
  --muted: #5a6f84;
  --muted-soft: #8099b0;
  --line: #cdd8e6;
  --line-soft: #e2ebf4;

  --brand: #0c68a3;
  --brand-strong: #09497a;
  --brand-soft: #e3f2ff;
  --brand-glow: rgba(12, 104, 163, 0.16);

  --accent: #0a9470;
  --warn: #c97f10;
  --danger: #b02d41;

  --status-ok: #0a9470;
  --status-warn: #c97f10;
  --status-danger: #b02d41;
  --status-neutral: #5a6f84;

  --radius-xl: 20px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 8px;
  --radius-xs: 6px;

  --shadow-lg: 0 16px 42px rgba(12, 30, 50, 0.13);
  --shadow-md: 0 8px 22px rgba(12, 30, 50, 0.09);
  --shadow-sm: 0 3px 10px rgba(12, 30, 50, 0.06);
  --shadow-xs: 0 1px 4px rgba(12, 30, 50, 0.05);

  --grad-surface: linear-gradient(180deg, #ffffff 0%, #f5f8fc 100%);
  --grad-brand: linear-gradient(135deg, #1482c9 0%, #0c68a3 55%, #093e6e 100%);
  --grad-subtle: linear-gradient(180deg, #fbfdff 0%, #f2f7fc 100%);

  --t-fast: 0.12s ease;
  --t-base: 0.18s ease;
  --t-slow: 0.28s ease;

  --z-base: 1;
  --z-above: 10;
  --z-dropdown: 80;
  --z-modal: 200;
}

*,
*::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, var(--bg-soft) 0%, var(--bg) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Scrollbar styling — subtle, matches design */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--muted-soft);
  background-clip: padding-box;
  border: 2px solid transparent;
}

h1,
h2,
h3,
h4,
th {
  font-family: "Avenir Next", "Segoe UI Variable Display", "Segoe UI", sans-serif;
  letter-spacing: -0.005em;
  color: var(--ink-strong);
}

h1 { font-weight: 800; }
h2 { font-weight: 700; }
h3 { font-weight: 700; }
h4 { font-weight: 700; }

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

a {
  color: inherit;
  transition: color var(--t-fast);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.auth-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(680px 360px at 18% 12%, rgba(12, 104, 163, 0.18), transparent 60%),
    radial-gradient(560px 320px at 88% 88%, rgba(10, 148, 112, 0.12), transparent 65%),
    radial-gradient(420px 240px at 50% 50%, rgba(82, 180, 255, 0.06), transparent 60%),
    linear-gradient(170deg, #eaf3fa 0%, #dde9f4 100%);
  background-attachment: fixed;
  position: relative;
  overflow: hidden;
}

.auth-body::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 37, 60, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 37, 60, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: -1px -1px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, #000 30%, transparent 80%);
}

html[data-theme="dark"] .auth-body {
  background:
    radial-gradient(680px 360px at 18% 12%, rgba(82, 180, 255, 0.18), transparent 60%),
    radial-gradient(560px 320px at 88% 88%, rgba(67, 207, 170, 0.10), transparent 65%),
    radial-gradient(420px 240px at 50% 50%, rgba(82, 180, 255, 0.04), transparent 60%),
    linear-gradient(170deg, #07111d 0%, #0a1624 100%);
}

html[data-theme="dark"] .auth-body::before {
  background-image:
    linear-gradient(rgba(82, 180, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(82, 180, 255, 0.04) 1px, transparent 1px);
}

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

.auth-card {
  width: min(440px, 94vw);
  padding: 38px 36px 32px;
  position: relative;
  overflow: hidden;
  animation: enter-up 0.4s cubic-bezier(0.21, 0.7, 0.21, 1);
  border: 1px solid rgba(255, 255, 255, 0.6);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(247, 251, 255, 0.96) 100%);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow:
    0 30px 70px rgba(15, 37, 60, 0.22),
    0 8px 16px rgba(15, 37, 60, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  z-index: 1;
}

html[data-theme="dark"] .auth-card {
  border-color: rgba(82, 180, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(16, 30, 46, 0.92) 0%, rgba(10, 22, 36, 0.94) 100%);
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.55),
    0 8px 16px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

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

.auth-logo-block::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 240px;
  height: 100px;
  background: radial-gradient(closest-side, rgba(12, 104, 163, 0.22), transparent 70%);
  z-index: -1;
  pointer-events: none;
}

html[data-theme="dark"] .auth-logo-block::before {
  background: radial-gradient(closest-side, rgba(82, 180, 255, 0.22), transparent 70%);
}

.auth-logo {
  width: min(220px, 76%);
  height: auto;
  filter: drop-shadow(0 6px 14px rgba(12, 60, 100, 0.22));
}

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

.auth-card h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink-strong);
  text-align: center;
}

.auth-card p {
  margin: 8px 0 22px;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
  line-height: 1.5;
}

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

.auth-inline-link {
  display: inline-flex;
  align-self: flex-end;
  align-items: center;
  margin: -2px 0 8px;
  color: var(--brand);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
  transition: color var(--t-fast);
}

.auth-inline-link:hover {
  color: var(--brand-strong);
  text-decoration: underline;
}

.auth-message {
  min-height: 20px;
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 700;
  text-align: center;
}

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

.auth-card form > button[type="submit"] {
  margin-top: 6px;
  width: 100%;
  min-height: 44px;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  background: var(--grad-brand);
  box-shadow: 0 8px 18px rgba(10, 79, 126, 0.28);
}

.auth-card form > button[type="submit"]:hover {
  box-shadow: 0 12px 24px rgba(10, 79, 126, 0.34);
}

html[data-theme="dark"] .auth-card label {
  color: var(--ink);
}

.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: 42px;
  padding: 10px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  color: var(--ink-strong);
  transition: border-color var(--t-base), box-shadow var(--t-base), background var(--t-base);
}

input:hover:not(:focus):not(:disabled),
select:hover:not(:focus):not(:disabled),
textarea:hover:not(:focus):not(:disabled) {
  border-color: #b0c8df;
}

input::placeholder,
select:invalid,
textarea::placeholder {
  color: var(--muted-soft);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
  background: var(--bg-elevated);
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background: rgba(13, 24, 38, 0.85);
  border-color: var(--line);
  color: var(--ink);
}

html[data-theme="dark"] input:hover:not(:focus):not(:disabled),
html[data-theme="dark"] select:hover:not(:focus):not(:disabled),
html[data-theme="dark"] textarea:hover:not(:focus):not(:disabled) {
  border-color: rgba(82, 180, 255, 0.4);
}

html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(82, 180, 255, 0.2);
  background: rgba(16, 30, 48, 0.95);
}

button {
  border: 0;
  border-radius: var(--radius-sm);
  min-height: 40px;
  padding: 10px 16px;
  background: var(--grad-brand);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform var(--t-fast), box-shadow var(--t-base), filter var(--t-base), background var(--t-base);
  box-shadow: 0 6px 14px rgba(10, 79, 126, 0.22);
}

button:hover {
  transform: translateY(-1px);
  filter: saturate(1.05) brightness(1.03);
  box-shadow: 0 8px 18px rgba(10, 79, 126, 0.28);
}

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

button.secondary {
  color: #1e3d57;
  border: 1px solid var(--line);
  background: var(--grad-surface);
  box-shadow: var(--shadow-xs);
  transition: transform var(--t-fast), box-shadow var(--t-base), background var(--t-base), border-color var(--t-base);
}

button.secondary:hover {
  border-color: #b0c8df;
  background: linear-gradient(180deg, #ffffff 0%, #e8f2fc 100%);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

button.secondary.is-active {
  color: var(--brand-strong);
  border-color: #85bada;
  background: linear-gradient(180deg, #e8f5ff 0%, #d5ecff 100%);
  box-shadow: 0 3px 8px rgba(12, 80, 140, 0.14);
}

html[data-theme="dark"] button.secondary {
  color: var(--ink);
  border-color: var(--line);
  background: linear-gradient(180deg, rgba(20, 36, 54, 0.95) 0%, rgba(13, 24, 38, 0.95) 100%);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

html[data-theme="dark"] button.secondary:hover {
  border-color: var(--line);
  background: linear-gradient(180deg, rgba(28, 46, 66, 0.95) 0%, rgba(18, 32, 50, 0.95) 100%);
  transform: translateY(-1px);
}

html[data-theme="dark"] button.secondary.is-active {
  color: var(--brand);
  border-color: var(--brand-soft);
  background: linear-gradient(180deg, rgba(82, 180, 255, 0.13) 0%, rgba(82, 180, 255, 0.07) 100%);
}

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: var(--brand);
  font-weight: 800;
}

html[data-theme="dark"] .eyebrow {
  color: var(--brand);
}

.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: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.section-header > div:first-child {
  min-width: 0;
  flex: 1 1 240px;
}

.section-header h2 {
  margin-bottom: 0;
  font-size: 1.16rem;
  letter-spacing: -0.015em;
  color: var(--ink-strong);
}

.section-header .muted-line {
  margin-top: 2px;
  margin-bottom: 0;
  font-size: 0.86rem;
}

.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, var(--bg-soft) 0%, var(--bg-sunken) 100%);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom-color: var(--line);
}

tbody tr {
  transition: background var(--t-fast);
}

tbody tr:nth-child(even) td {
  background: rgba(245, 248, 252, 0.55);
}

tbody tr:hover td {
  background: var(--brand-soft);
}

tbody tr.router-row-selected td {
  background: #dff0ff;
  box-shadow: inset 3px 0 0 var(--brand);
}

html[data-theme="dark"] th {
  background: linear-gradient(180deg, rgba(15, 27, 42, 0.95) 0%, rgba(9, 18, 30, 0.95) 100%);
  color: var(--muted);
  border-bottom-color: var(--line);
}

html[data-theme="dark"] th,
html[data-theme="dark"] td {
  border-bottom-color: var(--line-soft);
}

html[data-theme="dark"] tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.018);
}

html[data-theme="dark"] tbody tr:hover td {
  background: rgba(82, 180, 255, 0.08);
}

html[data-theme="dark"] tbody tr.router-row-selected td {
  background: rgba(82, 180, 255, 0.14);
  box-shadow: inset 3px 0 0 var(--brand);
}

.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;
  gap: 5px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--bg-soft);
  color: #2d4a60;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 3px 9px;
  margin-right: 6px;
  margin-bottom: 4px;
  white-space: nowrap;
}

.pill.is-ok {
  background: #e3f7ee;
  border-color: #a3dcc4;
  color: #055c3f;
}

.pill.is-danger {
  background: #fde8ec;
  border-color: #f0a3af;
  color: #6b0f1f;
}

.pill.is-warn {
  background: #fff3d6;
  border-color: #f0c882;
  color: #6b3e04;
}

html[data-theme="dark"] .pill {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
  color: var(--muted);
}

html[data-theme="dark"] .pill.is-ok {
  color: #6ee7b7;
  border-color: #1d5f43;
  background: rgba(67, 207, 170, 0.1);
}

html[data-theme="dark"] .pill.is-warn {
  color: #fcd34d;
  border-color: #5a3e0a;
  background: rgba(237, 180, 64, 0.1);
}

html[data-theme="dark"] .pill.is-danger {
  color: #fca5a5;
  border-color: #5a1020;
  background: rgba(255, 106, 122, 0.1);
}

html[data-theme="dark"] .pill.is-neutral {
  color: var(--muted);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
}

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

.embedded-card {
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-soft);
  background: var(--grad-subtle);
  transition: border-color var(--t-base), box-shadow var(--t-base);
}

.embedded-card:hover {
  border-color: var(--line);
  box-shadow: var(--shadow-xs);
}

.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-top-sites-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

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-top-site-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

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

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-top-site-bar {
  height: 10px;
  border-radius: 999px;
  background: #e8eef4;
  overflow: hidden;
}

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

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: 100;
  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-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: 50px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(248, 251, 254, 0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9), 0 2px 8px rgba(12, 30, 50, 0.05);
  overflow: visible;
}

html[data-theme="dark"] body[data-page] .unifi-topbar {
  background: rgba(8, 15, 26, 0.97);
  border-bottom-color: var(--line-soft);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03), 0 2px 8px rgba(0, 0, 0, 0.22);
}

body[data-page] .unifi-topbar-left,
body[data-page] .unifi-topbar-center,
body[data-page] .unifi-topbar-right {
  min-height: 50px;
}

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: var(--brand);
  box-shadow: 0 2px 6px rgba(12, 30, 50, 0.07);
}

body[data-page] .unifi-topbar-brand {
  color: #b2bbc5;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

html[data-theme="dark"] body[data-page] .unifi-topbar-brand {
  color: #4a6278;
}

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-status {
  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: 50px auto 0 0;
  z-index: var(--z-dropdown);
  width: 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 0 10px;
  border-right: 1px solid var(--line-soft);
  background: rgba(250, 252, 254, 0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: width var(--t-slow);
}

html[data-theme="dark"] body[data-page] .unifi-rail {
  background: rgba(6, 12, 21, 0.97);
  border-right-color: var(--line-soft);
}

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: var(--brand-soft);
  background: linear-gradient(180deg, var(--brand-soft) 0%, #d0e9ff 100%);
  color: var(--brand);
  box-shadow: inset 3px 0 0 var(--brand);
}

html[data-theme="dark"] body[data-page="dashboard"] .unifi-rail-item[href$="/dashboard"],
html[data-theme="dark"] body[data-page="companies"] .unifi-rail-item[href$="/companies"],
html[data-theme="dark"] body[data-page="users"] .unifi-rail-item[href$="/users"],
html[data-theme="dark"] body[data-page="routers"] .unifi-rail-item[href$="/routers"],
html[data-theme="dark"] body[data-page="routers-manage"] .unifi-rail-item[href$="/routers/manage"],
html[data-theme="dark"] body[data-page="logs"] .unifi-rail-item[href$="/logs"],
html[data-theme="dark"] body[data-page="releases"] .unifi-rail-item[href$="/releases"],
html[data-theme="dark"] body[data-page="ops-health"] .unifi-rail-item[href$="/ops-health"] {
  border-color: var(--brand-soft);
  background: linear-gradient(180deg, rgba(82, 180, 255, 0.14) 0%, rgba(82, 180, 255, 0.07) 100%);
  color: var(--brand);
  box-shadow: inset 3px 0 0 var(--brand);
}

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

/* Product UI foundation v1: uma camada visual comum para reduzir ruido entre paginas. */
:root {
  --product-bg: #eef3f7;
  --product-bg-grid: rgba(42, 89, 123, 0.05);
  --product-surface: rgba(255, 255, 255, 0.94);
  --product-surface-strong: #ffffff;
  --product-ink: #12283a;
  --product-muted: #617588;
  --product-line: #d9e4ec;
  --product-line-soft: #ebf1f6;
  --product-blue: #136c9f;
  --product-blue-soft: #e7f3fb;
  --product-green: #0d9877;
  --product-amber: #c98416;
  --product-red: #b83a4b;
  --product-radius: 24px;
  --product-shadow: 0 18px 38px rgba(19, 42, 62, 0.1);
}

body[data-page] {
  color: var(--product-ink);
  background:
    linear-gradient(90deg, var(--product-bg-grid) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(180deg, #f8fbfd 0%, var(--product-bg) 100%);
}

body[data-page] .unifi-topbar {
  border-bottom: 1px solid rgba(217, 228, 236, 0.92);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 251, 253, 0.94) 100%);
  box-shadow: 0 12px 28px rgba(20, 40, 58, 0.08);
  backdrop-filter: blur(18px);
}

body[data-page] .unifi-topbar-brand {
  color: var(--product-ink);
  font-weight: 900;
  letter-spacing: -0.04em;
}

body[data-page] .unifi-console-pill,
body[data-page] .unifi-topbar-tab {
  border-color: var(--product-line);
  background: var(--product-surface-strong);
  color: #25465f;
}

body[data-page] .unifi-topbar-tab.is-active,
body[data-page] .unifi-console-pill:hover,
body[data-page] .unifi-topbar-tab:hover {
  border-color: rgba(19, 108, 159, 0.32);
  background: linear-gradient(180deg, #ffffff 0%, var(--product-blue-soft) 100%);
  color: #0c527e;
}

body[data-page] .unifi-topbar-dropdown {
  border: 1px solid var(--product-line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 60px rgba(19, 42, 62, 0.18);
}

body[data-page] .unifi-rail {
  border-right: 1px solid rgba(217, 228, 236, 0.78);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(245, 249, 252, 0.92) 100%);
  box-shadow: 12px 0 28px rgba(20, 40, 58, 0.05);
}

body[data-page="dashboard"] .unifi-rail-item[href$="/dashboard"],
body[data-page="routers"] .unifi-rail-item[href$="/routers"],
body[data-page="routers-manage"] .unifi-rail-item[href$="/routers/manage"],
body[data-page="users"] .unifi-rail-item[href$="/users"],
body[data-page="companies"] .unifi-rail-item[href$="/companies"],
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"] {
  background: linear-gradient(180deg, #eef8ff 0%, #dff0fb 100%);
  box-shadow: inset 0 0 0 1px rgba(19, 108, 159, 0.18), 0 8px 18px rgba(19, 108, 159, 0.13);
}

body[data-page] .dashboard-shell {
  width: min(1760px, calc(100% - 40px));
  gap: 20px;
  margin-top: 20px;
}

body[data-page] .layout {
  gap: 20px;
}

body[data-page] .card,
body[data-page] .embedded-card,
body[data-page] .sidebar.card,
body[data-page] .workspace-sidebar-card {
  border-color: var(--product-line);
  background:
    radial-gradient(360px 180px at 100% -18%, rgba(95, 172, 220, 0.11), transparent 72%),
    linear-gradient(180deg, var(--product-surface-strong) 0%, rgba(248, 251, 253, 0.98) 100%);
  box-shadow: var(--product-shadow);
}

body[data-page] .card,
body[data-page] .embedded-card {
  border-radius: var(--product-radius);
}

body[data-page] .section-header,
body[data-page] .dashboard-unifi-summary-head,
body[data-page] .dashboard-unifi-card-head,
body[data-page] .router-unifi-summary-head,
body[data-page] .router-unifi-panel-head,
body[data-page] .router-suite-card-head {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--product-line-soft);
}

body[data-page] .eyebrow,
body[data-page] .dashboard-section-kicker,
body[data-page] .dashboard-unifi-card-kicker,
body[data-page] .router-unifi-panel-kicker,
body[data-page] .router-section-kicker {
  color: #597487;
  letter-spacing: 0.13em;
}

body[data-page] h1,
body[data-page] h2,
body[data-page] h3 {
  color: var(--product-ink);
}

body[data-page] .muted-line,
body[data-page] .welcome {
  color: var(--product-muted);
}

body[data-page] .pill {
  border: 1px solid rgba(159, 180, 197, 0.45);
  background: #f4f8fb;
  color: #4d6478;
  font-weight: 850;
}

body[data-page] .pill.is-ok {
  border-color: rgba(13, 152, 119, 0.24);
  background: #e8f7f2;
  color: #08755b;
}

body[data-page] .pill.is-warn {
  border-color: rgba(201, 132, 22, 0.28);
  background: #fff4de;
  color: #8a5708;
}

body[data-page] .pill.is-danger {
  border-color: rgba(184, 58, 75, 0.28);
  background: #ffecef;
  color: #963041;
}

body[data-page] button,
body[data-page] .secondary {
  border-radius: 12px;
}

body[data-page] button.secondary,
body[data-page] a.secondary,
body[data-page] summary.secondary {
  border-color: var(--product-line);
  background: linear-gradient(180deg, #ffffff 0%, #f1f6fa 100%);
  color: #25465f;
  box-shadow: 0 4px 10px rgba(20, 48, 74, 0.07);
}

body[data-page] button.secondary:hover,
body[data-page] a.secondary:hover,
body[data-page] summary.secondary:hover {
  border-color: rgba(19, 108, 159, 0.28);
  background: linear-gradient(180deg, #ffffff 0%, #eaf4fb 100%);
}

body[data-page] .table-wrap {
  border: 1px solid var(--product-line-soft);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

body[data-page] table {
  border-collapse: separate;
  border-spacing: 0;
}

body[data-page] th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f7fafc;
  color: #667c8d;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

body[data-page] td {
  color: #244058;
}

body[data-page] tbody tr:hover td {
  background: #f8fbfd;
}

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

body[data-page="routers"] .router-detail-nav {
  top: 86px;
  border: 1px solid var(--product-line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 24px rgba(19, 42, 62, 0.07);
}

body[data-page="routers"] .router-detail-nav button.secondary {
  justify-content: flex-start;
  text-align: left;
  box-shadow: none;
}

body[data-page="routers"] .router-detail-nav button.secondary.is-active,
body[data-page] button.secondary.is-active {
  border-color: rgba(19, 108, 159, 0.34);
  background: linear-gradient(180deg, #eef8ff 0%, #dceffb 100%);
  color: #0c527e;
}

body[data-page="routers"] .router-unifi-sidebar-card,
body[data-page="dashboard"] .dashboard-console-card {
  position: relative;
  overflow: hidden;
}

body[data-page="routers"] .router-unifi-device,
body[data-page="dashboard"] .dashboard-console-rack,
body[data-page="dashboard"] .dashboard-console-live-photo {
  opacity: 0.82;
}

@media (max-width: 1180px) {
  body[data-page] .dashboard-shell {
    width: calc(100% - 24px);
    margin-top: 14px;
  }

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

  body[data-page="routers"] .router-detail-nav {
    position: relative;
    top: 0;
    display: flex;
    overflow-x: auto;
    padding: 10px;
  }
}

@media (max-width: 680px) {
  body[data-page] .dashboard-shell {
    width: 100%;
    padding: 8px;
  }

  body[data-page] .card,
  body[data-page] .embedded-card,
  body[data-page] .sidebar.card {
    border-radius: 18px;
  }
}

/* Product UI foundation v2: menos repeticao visual na tela de Sites/Roteadores. */
body[data-page="routers"] .router-product-context-details {
  gap: 10px;
}

body[data-page="routers"] .router-product-context-details summary {
  display: grid;
  gap: 4px;
  cursor: pointer;
  list-style: none;
}

body[data-page="routers"] .router-product-context-details summary::-webkit-details-marker {
  display: none;
}

body[data-page="routers"] .router-product-context-details summary::after {
  content: "Abrir indicadores";
  width: fit-content;
  margin-top: 4px;
  padding: 5px 9px;
  border: 1px solid var(--product-line);
  border-radius: 999px;
  background: #f5f9fc;
  color: #557085;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body[data-page="routers"] .router-product-context-details[open] summary::after {
  content: "Recolher indicadores";
}

body[data-page="routers"] .router-product-context-details .router-unifi-sidebar-stats {
  margin-top: 8px;
}

body[data-page="routers"] .router-product-admin-actions a.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 10px;
  text-decoration: none;
}

body[data-page="routers"] .router-product-batch-actions {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--product-line-soft);
  border-radius: 18px;
  background: rgba(247, 251, 253, 0.84);
}

body[data-page="routers"] .router-product-batch-actions .router-unifi-sidebar-actions {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

body[data-page="routers"] .router-product-batch-actions .router-unifi-sidebar-actions .secondary {
  min-height: 36px;
  box-shadow: none;
}

body[data-page="routers"] .router-product-batch-actions .router-unifi-sidebar-actions #routerBatchUpdateBtn {
  grid-column: auto;
}

body[data-page="routers"] .router-batch-activity-list {
  margin-top: 4px;
}

body[data-page="routers"] .router-unifi-summary-card {
  gap: 20px;
}

body[data-page="routers"] .router-unifi-summary-card > .router-batch-activity-card,
body[data-page="routers"] .router-unifi-summary-card > .router-unifi-table-card {
  margin-top: 0;
}

body[data-page="routers"] .router-unifi-sidebar-card {
  gap: 16px;
}

body[data-page="routers"] .router-unifi-sidebar-card .router-unifi-sidebar-subtitle {
  font-weight: 700;
}

body[data-page="routers"] .router-unifi-sidebar-card .router-unifi-sidebar-meta {
  padding: 10px 12px;
  border: 1px solid var(--product-line-soft);
  border-radius: 14px;
  background: rgba(247, 251, 253, 0.82);
}

@media (max-width: 1180px) {
  body[data-page="routers"] .router-product-batch-actions .router-unifi-sidebar-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-page="routers"] .router-product-batch-actions #routerBatchUpdateBtn {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  body[data-page="routers"] .router-product-batch-actions .router-unifi-sidebar-actions {
    grid-template-columns: 1fr;
  }

  body[data-page="routers"] .router-product-batch-actions #routerBatchUpdateBtn {
    grid-column: auto;
  }
}

/* Theme controls and dark mode. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body[data-page] .unifi-theme-toggle {
  cursor: pointer;
  min-height: 28px;
  padding: 0;
}

body[data-page] .unifi-theme-toggle.is-dark-active {
  border-color: rgba(119, 184, 255, 0.34);
  background: linear-gradient(180deg, #1b3550 0%, #11273d 100%);
  color: #d9ecff;
}

.auth-theme-toggle {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.6) !important;
  box-shadow: 0 4px 14px rgba(15, 37, 60, 0.12) !important;
}

html[data-theme="dark"] .auth-theme-toggle {
  background: rgba(20, 36, 54, 0.6) !important;
  border-color: rgba(82, 180, 255, 0.18) !important;
  color: var(--ink) !important;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #070f1c;
  --bg-soft: #0a1624;
  --bg-elevated: #0e1d2e;
  --bg-sunken: #060d17;
  --ink-strong: #ecf4ff;
  --ink: #d4e4f0;
  --muted: #8aa4bc;
  --muted-soft: #5d7c96;
  --line: #1e3d58;
  --line-soft: #172f47;
  --brand: #52b4ff;
  --brand-strong: #90ceff;
  --brand-soft: #0c2840;
  --brand-glow: rgba(82, 180, 255, 0.18);
  --accent: #43cfaa;
  --warn: #edb440;
  --danger: #ff6a7a;
  --status-ok: #43cfaa;
  --status-warn: #edb440;
  --status-danger: #ff6a7a;
  --status-neutral: #8aa4bc;
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.38);
  --shadow-md: 0 10px 26px rgba(0, 0, 0, 0.28);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.20);
  --shadow-xs: 0 1px 4px rgba(0, 0, 0, 0.18);
  --grad-surface: linear-gradient(180deg, rgba(16, 29, 46, 0.98) 0%, rgba(9, 18, 30, 0.98) 100%);
  --grad-subtle: linear-gradient(180deg, rgba(14, 26, 42, 0.96) 0%, rgba(7, 14, 23, 0.96) 100%);
  --product-bg: #070f1c;
  --product-bg-grid: rgba(110, 170, 220, 0.055);
  --product-surface: rgba(12, 24, 40, 0.94);
  --product-surface-strong: #0e1c2c;
  --product-ink: #ecf4ff;
  --product-muted: #8aa4bc;
  --product-line: #1e3d58;
  --product-line-soft: #172f47;
  --product-blue: #6abfff;
  --product-blue-soft: #0c2840;
  --product-green: #43cfaa;
  --product-amber: #edb440;
  --product-red: #ff6a7a;
  --product-shadow: 0 20px 48px rgba(0, 0, 0, 0.42);
  --dark-grid: rgba(110, 170, 220, 0.055);
  --dark-glow-blue: rgba(60, 140, 205, 0.20);
  --dark-glow-green: rgba(40, 190, 148, 0.12);
}

html[data-theme="dark"] body,
html[data-theme="dark"] body[data-page],
html[data-theme="dark"] body.auth-body {
  color: var(--product-ink);
  background:
    radial-gradient(920px 460px at -8% -10%, rgba(61, 139, 203, 0.2), transparent 62%),
    radial-gradient(720px 360px at 108% 0%, rgba(45, 194, 151, 0.12), transparent 60%),
    linear-gradient(90deg, var(--product-bg-grid) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(180deg, #091522 0%, #050b13 100%);
}

html[data-theme="dark"] body[data-page="dashboard"] {
  background:
    radial-gradient(900px 420px at -8% -6%, rgba(65, 155, 220, 0.2), transparent 60%),
    radial-gradient(760px 380px at 108% -2%, rgba(42, 196, 151, 0.13), transparent 60%),
    linear-gradient(180deg, #091522 0%, #050b13 100%);
}

html[data-theme="dark"] .auth-card,
html[data-theme="dark"] body[data-page] .card,
html[data-theme="dark"] body[data-page] .embedded-card,
html[data-theme="dark"] body[data-page] .sidebar.card,
html[data-theme="dark"] body[data-page] .workspace-sidebar-card,
html[data-theme="dark"] body[data-page="dashboard"] .card,
html[data-theme="dark"] body[data-page="dashboard"] .dashboard-hero-card,
html[data-theme="dark"] body[data-page="routers"] .router-unifi-sidebar-card,
html[data-theme="dark"] body[data-page="routers"] .router-unifi-summary-card,
html[data-theme="dark"] body[data-page="routers"] #routerMonitorSection {
  border-color: var(--product-line);
  background:
    radial-gradient(420px 220px at 100% -16%, rgba(96, 178, 244, 0.12), transparent 72%),
    linear-gradient(180deg, rgba(17, 33, 50, 0.98) 0%, rgba(10, 22, 36, 0.98) 100%);
  color: var(--product-ink);
  box-shadow: var(--product-shadow);
}

html[data-theme="dark"] .auth-card::before,
html[data-theme="dark"] body[data-page] .card::before,
html[data-theme="dark"] body[data-page="dashboard"] .card::before {
  background: linear-gradient(90deg, rgba(95, 185, 255, 0.86) 0%, rgba(76, 214, 172, 0.82) 55%, rgba(240, 184, 74, 0.72) 100%);
}

html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] th,
html[data-theme="dark"] .auth-card h1,
html[data-theme="dark"] body[data-page] h1,
html[data-theme="dark"] body[data-page] h2,
html[data-theme="dark"] body[data-page] h3,
html[data-theme="dark"] body[data-page="dashboard"] .dashboard-unifi-summary-head h2,
html[data-theme="dark"] body[data-page="routers"] .router-unifi-summary-head h2,
html[data-theme="dark"] body[data-page="routers"] .router-unifi-panel-head h3 {
  color: var(--product-ink);
}

html[data-theme="dark"] p,
html[data-theme="dark"] label,
html[data-theme="dark"] .auth-card p,
html[data-theme="dark"] .muted-line,
html[data-theme="dark"] .welcome,
html[data-theme="dark"] body[data-page] .muted-line,
html[data-theme="dark"] body[data-page] .welcome {
  color: var(--product-muted);
}

html[data-theme="dark"] .eyebrow,
html[data-theme="dark"] body[data-page] .eyebrow,
html[data-theme="dark"] body[data-page] .dashboard-section-kicker,
html[data-theme="dark"] body[data-page] .dashboard-unifi-card-kicker,
html[data-theme="dark"] body[data-page] .router-unifi-panel-kicker,
html[data-theme="dark"] body[data-page] .router-section-kicker {
  color: #8fb4cf;
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  border-color: var(--product-line);
  background: #0b1a2a;
  color: var(--product-ink);
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: #6e879b;
}

html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus {
  border-color: rgba(113, 194, 255, 0.72);
  background: #102235;
  box-shadow: 0 0 0 4px rgba(95, 185, 255, 0.16);
}

html[data-theme="dark"] button.secondary,
html[data-theme="dark"] a.secondary,
html[data-theme="dark"] summary.secondary,
html[data-theme="dark"] #logoutBtn {
  border-color: var(--product-line);
  background: linear-gradient(180deg, #13283d 0%, #0d1d2e 100%);
  color: #d8ebfb;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}

html[data-theme="dark"] button.secondary:hover,
html[data-theme="dark"] a.secondary:hover,
html[data-theme="dark"] summary.secondary:hover {
  border-color: rgba(113, 194, 255, 0.4);
  background: linear-gradient(180deg, #18334d 0%, #10243a 100%);
}

html[data-theme="dark"] body[data-page] button.secondary.is-active,
html[data-theme="dark"] body[data-page] a.secondary.is-active,
html[data-theme="dark"] body[data-page] summary.secondary.is-active {
  border-color: rgba(113, 194, 255, 0.55);
  background: linear-gradient(180deg, #153959 0%, #102b43 100%);
  color: #dff2ff;
}

html[data-theme="dark"] body[data-page] .unifi-topbar,
html[data-theme="dark"] body[data-page] .unifi-rail {
  border-color: rgba(38, 63, 88, 0.92);
  background: linear-gradient(180deg, rgba(13, 28, 44, 0.96) 0%, rgba(8, 18, 31, 0.94) 100%);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] body[data-page] .unifi-topbar-brand {
  color: #e7f4ff;
}

html[data-theme="dark"] body[data-page] .unifi-console-pill,
html[data-theme="dark"] body[data-page] .unifi-topbar-tab,
html[data-theme="dark"] body[data-page] .unifi-topbar-icon {
  border-color: var(--product-line);
  background: linear-gradient(180deg, #13283d 0%, #0d1d2e 100%);
  color: #c8dced;
}

html[data-theme="dark"] body[data-page] .unifi-topbar-tab.is-active,
html[data-theme="dark"] body[data-page] .unifi-console-pill:hover,
html[data-theme="dark"] body[data-page] .unifi-topbar-tab:hover,
html[data-theme="dark"] body[data-page] .unifi-topbar-icon:hover {
  border-color: rgba(113, 194, 255, 0.42);
  background: linear-gradient(180deg, #18334d 0%, #102b43 100%);
  color: #e0f1ff;
}

html[data-theme="dark"] body[data-page] .unifi-topbar-dropdown {
  border-color: var(--product-line);
  background: rgba(12, 25, 40, 0.98);
  box-shadow: 0 28px 68px rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"] body[data-page] .unifi-topbar-menu-item,
html[data-theme="dark"] body[data-page] .dashboard-turn-lane,
html[data-theme="dark"] body[data-page] .dashboard-turn-trend-card,
html[data-theme="dark"] body[data-page] .dashboard-pulse-item,
html[data-theme="dark"] body[data-page] .stat-card,
html[data-theme="dark"] body[data-page] .router-product-batch-actions,
html[data-theme="dark"] body[data-page="routers"] .router-unifi-site-kpi-item,
html[data-theme="dark"] body[data-page="routers"] .router-unifi-sidebar-card .router-unifi-sidebar-meta,
html[data-theme="dark"] body[data-page="routers"] .router-detail-nav,
html[data-theme="dark"] body[data-page="dashboard"] .dashboard-unifi-network-stat,
html[data-theme="dark"] body[data-page="dashboard"] .dashboard-unifi-client-breakdown {
  border-color: var(--product-line);
  background: linear-gradient(180deg, rgba(17, 34, 52, 0.94) 0%, rgba(11, 24, 38, 0.94) 100%);
  color: var(--product-ink);
}

html[data-theme="dark"] body[data-page] .table-wrap,
html[data-theme="dark"] body[data-page] table {
  border-color: var(--product-line);
  background: rgba(8, 18, 31, 0.6);
}

html[data-theme="dark"] body[data-page] th {
  background: #102235;
  color: #9bb4c8;
}

html[data-theme="dark"] body[data-page] td {
  border-color: var(--product-line-soft);
  color: #d4e4f0;
}

html[data-theme="dark"] body[data-page] tbody tr:hover td {
  background: rgba(28, 57, 85, 0.52);
}

html[data-theme="dark"] body[data-page] .pill {
  border-color: rgba(143, 180, 207, 0.28);
  background: #13283d;
  color: #c9dcec;
}

html[data-theme="dark"] body[data-page] .pill.is-ok {
  border-color: rgba(76, 214, 172, 0.28);
  background: #0d332d;
  color: #9ef0d6;
}

html[data-theme="dark"] body[data-page] .pill.is-warn {
  border-color: rgba(240, 184, 74, 0.34);
  background: #39290d;
  color: #ffd78a;
}

html[data-theme="dark"] body[data-page] .pill.is-danger {
  border-color: rgba(255, 118, 137, 0.34);
  background: #3a1520;
  color: #ffb4c0;
}

html[data-theme="dark"] body[data-page="routers"] .router-unifi-site-ring,
html[data-theme="dark"] body[data-page="dashboard"] .dashboard-donut {
  border-color: var(--product-line);
  background:
    conic-gradient(#72c2ff 0 58%, #4cd6ac 58% 78%, #20364d 78% 100%);
}

html[data-theme="dark"] body[data-page="routers"] .router-unifi-site-ring::before,
html[data-theme="dark"] body[data-page="dashboard"] .dashboard-donut::before {
  background: linear-gradient(180deg, #102235 0%, #0b1a2a 100%);
}

html[data-theme="dark"] body[data-page="routers"] .router-site-bandwidth-chart-frame,
html[data-theme="dark"] body[data-page="routers"] .iface-chart-panel,
html[data-theme="dark"] body[data-page="dashboard"] .dashboard-unifi-chart-frame {
  border-color: var(--product-line);
  background:
    linear-gradient(180deg, rgba(13, 28, 44, 0.82) 0%, rgba(8, 18, 31, 0.96) 100%);
}

html[data-theme="dark"] .auth-logo,
html[data-theme="dark"] .brand-logo {
  filter: drop-shadow(0 10px 22px rgba(95, 185, 255, 0.16));
}

/* Routers cockpit redesign. */
body[data-page="routers"] .router-product-cockpit {
  display: grid;
  gap: 18px;
  padding: 24px;
  border-radius: 32px;
  background:
    radial-gradient(640px 300px at 100% -18%, rgba(42, 146, 221, 0.16), transparent 70%),
    radial-gradient(460px 240px at -8% 0%, rgba(16, 163, 127, 0.13), transparent 68%),
    linear-gradient(180deg, #ffffff 0%, #f6fbff 100%);
}

body[data-page="routers"] .router-product-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 4px 2px 16px;
  border-bottom: 1px solid var(--product-line-soft);
}

body[data-page="routers"] .router-product-hero-copy {
  display: grid;
  gap: 8px;
}

body[data-page="routers"] .router-product-hero-copy h2 {
  margin: 0;
  color: #102b43;
  font-size: clamp(2.15rem, 4.8vw, 4rem);
  line-height: 0.9;
  letter-spacing: -0.075em;
}

body[data-page="routers"] .router-product-hero-copy .muted-line {
  max-width: 760px;
  margin: 0;
  font-size: 0.98rem;
}

body[data-page="routers"] .router-product-hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

body[data-page="routers"] .router-product-metric-grid {
  display: grid;
  grid-template-columns: 1.1fr repeat(4, minmax(150px, 1fr));
  gap: 12px;
}

body[data-page="routers"] .router-product-metric-card {
  position: relative;
  min-height: 128px;
  display: grid;
  align-content: space-between;
  gap: 10px;
  padding: 16px;
  border: 1px solid #dce7ef;
  border-radius: 22px;
  background:
    radial-gradient(180px 110px at 100% 0%, rgba(42, 146, 221, 0.12), transparent 70%),
    linear-gradient(180deg, #ffffff 0%, #f7fbfe 100%);
  overflow: hidden;
  box-shadow: 0 12px 24px rgba(15, 37, 60, 0.06);
}

body[data-page="routers"] .router-product-metric-card::after {
  content: "";
  position: absolute;
  inset: auto 14px 12px auto;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(42, 146, 221, 0.1);
}

body[data-page="routers"] .router-product-metric-card.is-primary {
  color: #ffffff;
  border-color: rgba(42, 146, 221, 0.4);
  background:
    radial-gradient(260px 160px at 100% 0%, rgba(126, 209, 237, 0.32), transparent 72%),
    linear-gradient(145deg, #0f6da8 0%, #0d8abf 52%, #10a37f 100%);
}

body[data-page="routers"] .router-product-metric-card.is-warn {
  border-color: rgba(201, 132, 22, 0.25);
  background:
    radial-gradient(180px 110px at 100% 0%, rgba(242, 169, 59, 0.18), transparent 70%),
    linear-gradient(180deg, #fffaf0 0%, #fff6e2 100%);
}

body[data-page="routers"] .router-product-metric-card span,
body[data-page="routers"] .router-product-metric-card small {
  position: relative;
  z-index: 1;
}

body[data-page="routers"] .router-product-metric-card span {
  color: #64798c;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body[data-page="routers"] .router-product-metric-card strong {
  position: relative;
  z-index: 1;
  color: #102b43;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

body[data-page="routers"] .router-product-metric-card small {
  color: #6d8397;
  font-size: 0.76rem;
  font-weight: 700;
}

body[data-page="routers"] .router-product-metric-card.is-primary span,
body[data-page="routers"] .router-product-metric-card.is-primary strong,
body[data-page="routers"] .router-product-metric-card.is-primary small {
  color: #ffffff;
}

body[data-page="routers"] .router-product-visual-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(340px, 1.1fr) minmax(320px, 1fr);
  gap: 14px;
  align-items: stretch;
}

body[data-page="routers"] .router-product-health-card,
body[data-page="routers"] .router-product-map-card,
body[data-page="routers"] .router-product-destinations-card,
body[data-page="routers"] .router-product-bandwidth-card,
body[data-page="routers"] .router-product-table-card {
  padding: 18px;
  border: 1px solid #dbe6ef;
  border-radius: 24px;
  background:
    radial-gradient(260px 150px at 100% -16%, rgba(126, 209, 237, 0.12), transparent 74%),
    linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
  box-shadow: 0 12px 26px rgba(15, 37, 60, 0.06);
}

body[data-page="routers"] .router-product-donut-wrap,
body[data-page="routers"] .router-product-destinations-body {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

body[data-page="routers"] .router-product-donut {
  position: relative;
  width: 148px;
  height: 148px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid #d6e1eb;
  background: conic-gradient(#e8eef4 0 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 12px 26px rgba(15, 37, 60, 0.08);
}

body[data-page="routers"] .router-product-donut::before {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbfe 100%);
}

body[data-page="routers"] .router-product-donut strong,
body[data-page="routers"] .router-product-donut span {
  position: relative;
  z-index: 1;
  text-align: center;
}

body[data-page="routers"] .router-product-donut strong {
  color: #102b43;
  font-size: 1.8rem;
  line-height: 0.95;
}

body[data-page="routers"] .router-product-donut span {
  color: #697f92;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transform: translateY(24px);
}

body[data-page="routers"] .router-product-donut-legend {
  display: grid;
  gap: 8px;
}

body[data-page="routers"] .router-product-donut-legend article {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid #e1e9f0;
  border-radius: 14px;
  background: #f8fbfd;
}

body[data-page="routers"] .router-product-donut-legend i,
body[data-page="routers"] .router-site-top-site-copy i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

body[data-page="routers"] .router-product-donut-legend .is-online { background: #10a37f; }
body[data-page="routers"] .router-product-donut-legend .is-offline { background: #d94a5d; }
body[data-page="routers"] .router-product-donut-legend .is-attention { background: #f2a93b; }
body[data-page="routers"] .router-product-donut-legend .is-favorite { background: #7d6be8; }

body[data-page="routers"] .router-product-donut-legend span {
  color: #5e7488;
  font-size: 0.82rem;
  font-weight: 800;
}

body[data-page="routers"] .router-product-donut-legend strong {
  color: #173047;
}

body[data-page="routers"] .router-product-health-map {
  min-height: 230px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
  gap: 10px;
}

body[data-page="routers"] .router-product-map-node {
  position: relative;
  min-height: 74px;
  display: grid;
  gap: 4px;
  align-content: center;
  padding: 12px 12px 12px 34px;
  border: 1px solid #e0e8ef;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
  overflow: hidden;
}

body[data-page="routers"] .router-product-map-node > span {
  position: absolute;
  left: 12px;
  top: 15px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #9aabba;
  box-shadow: 0 0 0 5px rgba(154, 171, 186, 0.14);
}

body[data-page="routers"] .router-product-map-node.is-online > span {
  background: #10a37f;
  box-shadow: 0 0 0 5px rgba(16, 163, 127, 0.14);
}

body[data-page="routers"] .router-product-map-node.is-offline > span {
  background: #d94a5d;
  box-shadow: 0 0 0 5px rgba(217, 74, 93, 0.14);
}

body[data-page="routers"] .router-product-map-node.is-attention > span {
  background: #f2a93b;
  box-shadow: 0 0 0 5px rgba(242, 169, 59, 0.16);
}

body[data-page="routers"] .router-product-map-node strong {
  color: #173047;
  font-size: 0.86rem;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="routers"] .router-product-map-node small {
  color: #6d8397;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

body[data-page="routers"] .router-product-map-empty {
  min-height: 160px;
  display: grid;
  place-items: center;
  border: 1px dashed #cfdae4;
  border-radius: 18px;
  color: #6d8397;
}

body[data-page="routers"] .router-site-top-site-copy strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

body[data-page="routers"] .router-product-destinations-card .router-site-top-sites-list {
  min-width: 0;
  margin-top: 0;
}

body[data-page="routers"] .router-product-destinations-card .router-site-top-site-row {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "copy value"
    "bar bar";
  padding: 10px 0;
  border-bottom: 1px solid #e3eaf1;
}

body[data-page="routers"] .router-product-destinations-card .router-site-top-site-row:last-child {
  border-bottom: 0;
}

body[data-page="routers"] .router-product-destinations-card .router-site-top-site-copy {
  grid-area: copy;
}

body[data-page="routers"] .router-product-destinations-card .router-site-top-site-bar {
  grid-area: bar;
}

body[data-page="routers"] .router-product-destinations-card .router-site-top-site-value {
  grid-area: value;
  justify-self: end;
  font-weight: 800;
  white-space: nowrap;
}

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

@media (max-width: 1500px) {
  body[data-page="routers"] .router-product-metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body[data-page="routers"] .router-product-visual-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  body[data-page="routers"] .router-product-destinations-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 920px) {
  body[data-page="routers"] .router-product-hero {
    flex-direction: column;
  }

  body[data-page="routers"] .router-product-hero-badges {
    justify-content: flex-start;
  }

  body[data-page="routers"] .router-product-metric-grid,
  body[data-page="routers"] .router-product-visual-grid,
  body[data-page="routers"] .router-product-donut-wrap,
  body[data-page="routers"] .router-product-destinations-body {
    grid-template-columns: 1fr;
  }

  body[data-page="routers"] .router-product-donut {
    justify-self: center;
  }
}

html[data-theme="dark"] body[data-page="routers"] .router-product-cockpit,
html[data-theme="dark"] body[data-page="routers"] .router-product-health-card,
html[data-theme="dark"] body[data-page="routers"] .router-product-map-card,
html[data-theme="dark"] body[data-page="routers"] .router-product-destinations-card,
html[data-theme="dark"] body[data-page="routers"] .router-product-bandwidth-card,
html[data-theme="dark"] body[data-page="routers"] .router-product-table-card,
html[data-theme="dark"] body[data-page="routers"] .router-product-metric-card,
html[data-theme="dark"] body[data-page="routers"] .router-product-donut-legend article,
html[data-theme="dark"] body[data-page="routers"] .router-product-map-node {
  border-color: var(--product-line);
  background:
    radial-gradient(260px 150px at 100% -16%, rgba(95, 185, 255, 0.12), transparent 74%),
    linear-gradient(180deg, rgba(17, 34, 52, 0.94) 0%, rgba(10, 22, 36, 0.96) 100%);
}

html[data-theme="dark"] body[data-page="routers"] .router-product-metric-card.is-primary {
  background:
    radial-gradient(260px 160px at 100% 0%, rgba(126, 209, 237, 0.24), transparent 72%),
    linear-gradient(145deg, #0f3b5d 0%, #0b5f83 52%, #0d8066 100%);
}

html[data-theme="dark"] body[data-page="routers"] .router-product-metric-card.is-warn {
  background:
    radial-gradient(180px 110px at 100% 0%, rgba(242, 169, 59, 0.15), transparent 70%),
    linear-gradient(180deg, #241b0c 0%, #19150d 100%);
}

html[data-theme="dark"] body[data-page="routers"] .router-product-hero-copy h2,
html[data-theme="dark"] body[data-page="routers"] .router-product-metric-card strong,
html[data-theme="dark"] body[data-page="routers"] .router-product-donut strong,
html[data-theme="dark"] body[data-page="routers"] .router-product-donut-legend strong,
html[data-theme="dark"] body[data-page="routers"] .router-product-map-node strong {
  color: var(--product-ink);
}

html[data-theme="dark"] body[data-page="routers"] .router-product-metric-card span,
html[data-theme="dark"] body[data-page="routers"] .router-product-metric-card small,
html[data-theme="dark"] body[data-page="routers"] .router-product-donut span,
html[data-theme="dark"] body[data-page="routers"] .router-product-donut-legend span,
html[data-theme="dark"] body[data-page="routers"] .router-product-map-node small {
  color: var(--product-muted);
}

html[data-theme="dark"] body[data-page="routers"] .router-product-donut::before {
  background: linear-gradient(180deg, #102235 0%, #0b1a2a 100%);
}

html[data-theme="dark"] body[data-page="routers"] .router-product-destinations-card .router-site-top-site-row {
  border-bottom-color: var(--product-line);
}

/* Routers cockpit product polish. */
body[data-page="routers"] .dashboard-shell.router-site-shell {
  width: auto;
  max-width: none;
  margin: 0 0 0 64px;
  padding: 18px 24px 28px;
  grid-template-columns: minmax(238px, 280px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

body[data-page="routers"] .router-unifi-sidebar-column,
body[data-page="routers"] .router-site-layout,
body[data-page="routers"] .router-product-cockpit,
body[data-page="routers"] .router-product-cockpit > *,
body[data-page="routers"] .router-product-health-card,
body[data-page="routers"] .router-product-map-card,
body[data-page="routers"] .router-product-destinations-card,
body[data-page="routers"] .router-product-bandwidth-card,
body[data-page="routers"] .router-product-table-card,
body[data-page="routers"] .router-product-table-card .table-wrap,
body[data-page="routers"] .router-batch-activity-card,
body[data-page="routers"] .router-unifi-panel-head,
body[data-page="routers"] .router-unifi-panel-actions,
body[data-page="routers"] .router-site-bandwidth-chart-frame {
  min-width: 0;
  max-width: 100%;
}

body[data-page="routers"] .router-unifi-sidebar-card {
  padding: 18px;
  border-radius: 24px;
}

body[data-page="routers"] .router-unifi-device {
  min-height: 118px;
}

body[data-page="routers"] .router-product-cockpit {
  gap: 16px;
  padding: 18px;
  overflow-x: clip;
  overflow-y: visible;
  border-radius: 28px;
  background:
    radial-gradient(560px 240px at 100% -22%, rgba(42, 146, 221, 0.12), transparent 70%),
    linear-gradient(180deg, #ffffff 0%, #f5f8fb 100%);
}

body[data-page="routers"] .router-product-hero {
  align-items: center;
  min-width: 0;
  padding: 4px 0 14px;
}

body[data-page="routers"] .router-product-hero-copy h2 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  letter-spacing: -0.06em;
}

body[data-page="routers"] .router-product-metric-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

body[data-page="routers"] .router-product-metric-card {
  min-height: 104px;
  padding: 14px;
  border-radius: 18px;
  box-shadow: 0 10px 20px rgba(15, 37, 60, 0.05);
}

body[data-page="routers"] .router-product-metric-card::after {
  width: 32px;
  height: 32px;
}

body[data-page="routers"] .router-product-metric-card strong {
  font-size: clamp(1.32rem, 2.1vw, 2rem);
}

body[data-page="routers"] .router-product-visual-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(292px, 0.65fr);
  grid-template-areas:
    "map status"
    "map destinations";
  gap: 14px;
  align-items: stretch;
}

body[data-page="routers"] .router-product-map-card {
  grid-area: map;
}

body[data-page="routers"] .router-product-health-card {
  grid-area: status;
}

body[data-page="routers"] .router-product-destinations-card {
  grid-area: destinations;
}

body[data-page="routers"] .router-product-health-card,
body[data-page="routers"] .router-product-map-card,
body[data-page="routers"] .router-product-destinations-card,
body[data-page="routers"] .router-product-bandwidth-card,
body[data-page="routers"] .router-product-table-card {
  padding: 16px;
  border-radius: 20px;
  box-shadow: 0 10px 22px rgba(15, 37, 60, 0.05);
}

body[data-page="routers"] .router-product-donut-wrap,
body[data-page="routers"] .router-product-destinations-body {
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 12px;
}

body[data-page="routers"] .router-product-donut {
  width: 118px;
  height: 118px;
  aspect-ratio: 1;
}

body[data-page="routers"] .router-product-donut::before {
  inset: 15px;
}

body[data-page="routers"] .router-product-donut strong {
  font-size: 1.42rem;
}

body[data-page="routers"] .router-product-donut span {
  font-size: 0.6rem;
  transform: translateY(19px);
}

body[data-page="routers"] .router-product-donut-legend article {
  min-height: 30px;
  padding: 7px 9px;
}

body[data-page="routers"] .router-product-health-map {
  min-height: 286px;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  align-content: start;
}

body[data-page="routers"] .router-product-map-node {
  min-height: 68px;
  border-radius: 16px;
}

body[data-page="routers"] .router-product-map-empty.is-compact {
  min-height: 68px;
  border-style: solid;
  font-weight: 800;
}

body[data-page="routers"] .router-product-destinations-card .router-site-top-site-row {
  gap: 8px;
  padding: 8px 0;
}

body[data-page="routers"] .router-product-bandwidth-card .router-unifi-panel-head,
body[data-page="routers"] .router-product-bandwidth-card .router-unifi-panel-actions,
body[data-page="routers"] .router-product-bandwidth-card .router-site-overview-toolbar-group {
  flex-wrap: wrap;
}

body[data-page="routers"] .router-product-bandwidth-card .router-unifi-panel-actions {
  justify-content: flex-start;
}

body[data-page="routers"] .router-product-bandwidth-card .router-site-overview-toolbar-group,
body[data-page="routers"] .router-product-bandwidth-card .router-inline-filter {
  flex: 1 1 210px;
  min-width: 0;
}

body[data-page="routers"] .router-product-bandwidth-card .router-inline-filter select,
body[data-page="routers"] .router-product-bandwidth-card .router-site-bandwidth-chart-frame,
body[data-page="routers"] .router-product-bandwidth-card .iface-chart {
  width: 100%;
}

body[data-page="routers"] .router-product-table-card .table-wrap {
  overflow-x: auto;
}

body[data-page="routers"] #routerListSection .table-wrap table {
  width: 100%;
  min-width: 720px;
}

@media (max-width: 1440px) {
  body[data-page="routers"] .router-product-metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1260px) {
  body[data-page="routers"] .router-product-visual-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "map"
      "status"
      "destinations";
  }
}

@media (max-width: 1180px) {
  body[data-page="routers"] .dashboard-shell.router-site-shell {
    margin: 0;
    padding: 14px;
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-page="routers"] .router-unifi-sidebar-column {
    position: relative;
    top: 0;
  }
}

@media (max-width: 820px) {
  body[data-page="routers"] .router-product-hero {
    align-items: flex-start;
  }

  body[data-page="routers"] .router-product-metric-grid,
  body[data-page="routers"] .router-product-donut-wrap,
  body[data-page="routers"] .router-product-destinations-body {
    grid-template-columns: 1fr;
  }

  body[data-page="routers"] .router-product-donut {
    justify-self: center;
  }
}

@media (max-width: 560px) {
  body[data-page="routers"] .dashboard-shell.router-site-shell {
    padding: 10px;
  }

  body[data-page="routers"] .router-product-cockpit {
    padding: 14px;
    border-radius: 22px;
  }
}

/* Routers page redesign v3. */
body[data-page="routers"] .dashboard-shell.router-site-shell {
  width: auto;
  max-width: none;
  margin: 0 0 0 64px;
  padding: 18px 24px 28px;
  grid-template-columns: minmax(238px, 278px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

body[data-page="routers"] .router-unifi-sidebar-column {
  gap: 16px;
}

body[data-page="routers"] .router-unifi-sidebar-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: 24px;
}

body[data-page="routers"] .router-site-orchestrator {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: 30px;
  overflow: visible;
  background:
    radial-gradient(580px 240px at 100% -18%, rgba(42, 146, 221, 0.12), transparent 72%),
    linear-gradient(180deg, #ffffff 0%, #f5f8fb 100%);
}

body[data-page="routers"] .router-site-orchestrator-head,
body[data-page="routers"] .router-site-bandwidth-surface .router-unifi-panel-head,
body[data-page="routers"] .router-site-destinations-card .router-unifi-panel-head,
body[data-page="routers"] .router-site-fleet-card .router-unifi-panel-head,
body[data-page="routers"] .router-site-batch-card .router-unifi-panel-head {
  min-width: 0;
}

body[data-page="routers"] .router-site-orchestrator-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--product-line-soft);
}

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

body[data-page="routers"] .router-site-orchestrator-copy h2 {
  margin: 0;
  color: #102b43;
  font-size: clamp(1.95rem, 3.4vw, 3rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

body[data-page="routers"] .router-site-orchestrator-copy .muted-line {
  margin: 0;
  max-width: 760px;
}

body[data-page="routers"] .router-site-orchestrator-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

body[data-page="routers"] .router-overview-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

body[data-page="routers"] .router-overview-stat,
body[data-page="routers"] .router-site-map-card,
body[data-page="routers"] .router-site-health-card,
body[data-page="routers"] .router-site-attention-card,
body[data-page="routers"] .router-site-bandwidth-surface,
body[data-page="routers"] .router-site-destinations-card,
body[data-page="routers"] .router-site-fleet-card,
body[data-page="routers"] .router-site-batch-card {
  min-width: 0;
  border: 1px solid #dbe6ef;
  border-radius: 22px;
  background:
    radial-gradient(260px 140px at 100% -18%, rgba(126, 209, 237, 0.11), transparent 72%),
    linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
  box-shadow: 0 12px 26px rgba(15, 37, 60, 0.05);
}

body[data-page="routers"] .router-overview-stat {
  position: relative;
  display: grid;
  gap: 8px;
  align-content: space-between;
  min-height: 112px;
  padding: 14px;
  overflow: hidden;
}

body[data-page="routers"] .router-overview-stat::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(42, 146, 221, 0.08);
}

body[data-page="routers"] .router-overview-stat span,
body[data-page="routers"] .router-overview-stat small,
body[data-page="routers"] .router-overview-stat strong {
  position: relative;
  z-index: 1;
}

body[data-page="routers"] .router-overview-stat span {
  color: #62798d;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body[data-page="routers"] .router-overview-stat strong {
  color: #102b43;
  font-size: clamp(1.34rem, 2.4vw, 2.15rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

body[data-page="routers"] .router-overview-stat small {
  color: #6f8497;
  font-size: 0.78rem;
  font-weight: 700;
}

body[data-page="routers"] .router-overview-stat.is-primary {
  border-color: rgba(42, 146, 221, 0.3);
  background:
    radial-gradient(260px 160px at 100% 0%, rgba(126, 209, 237, 0.26), transparent 72%),
    linear-gradient(145deg, #0f6da8 0%, #0d8abf 55%, #10a37f 100%);
}

body[data-page="routers"] .router-overview-stat.is-primary span,
body[data-page="routers"] .router-overview-stat.is-primary strong,
body[data-page="routers"] .router-overview-stat.is-primary small {
  color: #ffffff;
}

body[data-page="routers"] .router-overview-stat.is-warn {
  background:
    radial-gradient(180px 110px at 100% 0%, rgba(242, 169, 59, 0.16), transparent 70%),
    linear-gradient(180deg, #fffaf0 0%, #fff4dc 100%);
}

body[data-page="routers"] .router-site-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(310px, 0.92fr);
  gap: 14px;
  align-items: start;
}

body[data-page="routers"] .router-site-side-stack {
  display: grid;
  gap: 14px;
}

body[data-page="routers"] .router-site-map-card,
body[data-page="routers"] .router-site-health-card,
body[data-page="routers"] .router-site-attention-card,
body[data-page="routers"] .router-site-bandwidth-surface,
body[data-page="routers"] .router-site-destinations-card,
body[data-page="routers"] .router-site-fleet-card,
body[data-page="routers"] .router-site-batch-card {
  padding: 16px;
}

body[data-page="routers"] .router-site-map-grid {
  min-height: 316px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 10px;
  align-content: start;
}

body[data-page="routers"] .router-site-map-grid .router-product-map-node {
  min-height: 72px;
}

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

body[data-page="routers"] .router-site-health-donut {
  position: relative;
  width: 118px;
  height: 118px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid #d6e1eb;
  background: conic-gradient(#e8eef4 0 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 12px 22px rgba(15, 37, 60, 0.07);
}

body[data-page="routers"] .router-site-health-donut::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbfe 100%);
}

body[data-page="routers"] .router-site-health-donut strong,
body[data-page="routers"] .router-site-health-donut span {
  position: relative;
  z-index: 1;
  text-align: center;
}

body[data-page="routers"] .router-site-health-donut strong {
  color: #102b43;
  font-size: 1.42rem;
  line-height: 0.95;
}

body[data-page="routers"] .router-site-health-donut span {
  color: #6d8397;
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transform: translateY(18px);
}

body[data-page="routers"] .router-site-health-donut--small {
  width: 106px;
  height: 106px;
}

body[data-page="routers"] .router-site-health-donut--small::before {
  inset: 13px;
}

body[data-page="routers"] .router-site-health-donut--small strong {
  font-size: 1.25rem;
}

body[data-page="routers"] .router-site-health-legend {
  display: grid;
  gap: 8px;
}

body[data-page="routers"] .router-site-health-legend article {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 32px;
  padding: 8px 10px;
  border: 1px solid #e1e9f0;
  border-radius: 14px;
  background: #f8fbfd;
}

body[data-page="routers"] .router-site-health-legend i {
  width: 10px;
  height: 10px;
  display: inline-block;
  border-radius: 999px;
}

body[data-page="routers"] .router-site-health-legend .is-online { background: #10a37f; }
body[data-page="routers"] .router-site-health-legend .is-offline { background: #d94a5d; }
body[data-page="routers"] .router-site-health-legend .is-attention { background: #f2a93b; }
body[data-page="routers"] .router-site-health-legend .is-favorite { background: #7d6be8; }

body[data-page="routers"] .router-site-health-legend span {
  color: #5f768a;
  font-size: 0.82rem;
  font-weight: 800;
}

body[data-page="routers"] .router-site-health-legend strong {
  color: #173047;
}

body[data-page="routers"] .router-site-signal-box {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e6edf4;
}

body[data-page="routers"] .router-site-panel-note {
  margin: 0;
  color: #6b8092;
  font-size: 0.8rem;
}

body[data-page="routers"] .router-site-signal-list {
  display: grid;
  gap: 8px;
}

body[data-page="routers"] .router-site-signal-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid #e3ebf1;
  border-radius: 14px;
  background: #f8fbfd;
}

body[data-page="routers"] .router-site-signal-row strong {
  min-width: 34px;
  color: #173047;
  font-size: 1.15rem;
  line-height: 1;
}

body[data-page="routers"] .router-site-signal-row span,
body[data-page="routers"] .router-site-signal-row small {
  display: block;
}

body[data-page="routers"] .router-site-signal-row span {
  color: #1a344b;
  font-size: 0.83rem;
  font-weight: 800;
}

body[data-page="routers"] .router-site-signal-row small {
  margin-top: 2px;
  color: #6d8397;
  font-size: 0.76rem;
}

body[data-page="routers"] .router-site-signal-row.is-danger strong { color: #c43b4f; }
body[data-page="routers"] .router-site-signal-row.is-warn strong { color: #c9851a; }
body[data-page="routers"] .router-site-signal-row.is-positive strong { color: #0f8e6d; }

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

body[data-page="routers"] .router-site-attention-row,
body[data-page="routers"] .router-site-attention-empty {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e2ebf1;
  border-radius: 16px;
  background: #f8fbfd;
}

body[data-page="routers"] .router-site-attention-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

body[data-page="routers"] .router-site-attention-copy {
  min-width: 0;
}

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

body[data-page="routers"] .router-site-attention-copy strong {
  color: #173047;
  font-size: 0.94rem;
}

body[data-page="routers"] .router-site-attention-copy p {
  margin-top: 4px;
  color: #30495e;
  font-size: 0.82rem;
  font-weight: 700;
}

body[data-page="routers"] .router-site-attention-copy small {
  margin-top: 3px;
  color: #6d8397;
  font-size: 0.75rem;
}

body[data-page="routers"] .router-site-traffic-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.9fr);
  gap: 14px;
  align-items: start;
}

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

body[data-page="routers"] .router-site-destinations-card .router-site-top-sites-list {
  margin-top: 0;
}

body[data-page="routers"] .router-site-destinations-card .router-site-top-site-row {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "copy value"
    "bar bar";
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #e3eaf1;
}

body[data-page="routers"] .router-site-destinations-card .router-site-top-site-row:last-child {
  border-bottom: 0;
}

body[data-page="routers"] .router-site-destinations-card .router-site-top-site-copy {
  grid-area: copy;
}

body[data-page="routers"] .router-site-destinations-card .router-site-top-site-bar {
  grid-area: bar;
}

body[data-page="routers"] .router-site-destinations-card .router-site-top-site-value {
  grid-area: value;
  justify-self: end;
  white-space: nowrap;
  font-weight: 800;
}

body[data-page="routers"] .router-site-bandwidth-surface .router-unifi-panel-actions {
  flex-wrap: wrap;
  justify-content: flex-start;
}

body[data-page="routers"] .router-site-bandwidth-surface .router-site-overview-toolbar-group,
body[data-page="routers"] .router-site-bandwidth-surface .router-inline-filter {
  flex: 1 1 210px;
  min-width: 0;
}

body[data-page="routers"] .router-site-bandwidth-surface .router-inline-filter select,
body[data-page="routers"] .router-site-bandwidth-surface .router-site-bandwidth-chart-frame,
body[data-page="routers"] .router-site-bandwidth-surface .iface-chart {
  width: 100%;
}

body[data-page="routers"] .router-site-fleet-card .table-wrap {
  overflow-x: auto;
}

body[data-page="routers"] .router-site-fleet-card .table-wrap table {
  width: 100%;
  min-width: 720px;
}

@media (max-width: 1460px) {
  body[data-page="routers"] .router-overview-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1280px) {
  body[data-page="routers"] .router-site-main-grid,
  body[data-page="routers"] .router-site-traffic-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 1180px) {
  body[data-page="routers"] .dashboard-shell.router-site-shell {
    margin: 0;
    padding: 14px;
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-page="routers"] .router-unifi-sidebar-column {
    position: relative;
    top: 0;
  }
}

@media (max-width: 820px) {
  body[data-page="routers"] .router-site-orchestrator-head,
  body[data-page="routers"] .router-site-attention-row {
    grid-template-columns: 1fr;
  }

  body[data-page="routers"] .router-site-orchestrator-head {
    display: grid;
  }

  body[data-page="routers"] .router-site-orchestrator-badges {
    justify-content: flex-start;
  }

  body[data-page="routers"] .router-overview-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  body[data-page="routers"] .router-site-health-donut,
  body[data-page="routers"] .router-site-health-donut--small {
    justify-self: center;
  }
}

@media (max-width: 560px) {
  body[data-page="routers"] .dashboard-shell.router-site-shell {
    padding: 10px;
  }

  body[data-page="routers"] .router-site-orchestrator {
    padding: 14px;
    border-radius: 22px;
  }

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

html[data-theme="dark"] body[data-page="routers"] .router-site-orchestrator,
html[data-theme="dark"] body[data-page="routers"] .router-overview-stat,
html[data-theme="dark"] body[data-page="routers"] .router-site-map-card,
html[data-theme="dark"] body[data-page="routers"] .router-site-health-card,
html[data-theme="dark"] body[data-page="routers"] .router-site-attention-card,
html[data-theme="dark"] body[data-page="routers"] .router-site-bandwidth-surface,
html[data-theme="dark"] body[data-page="routers"] .router-site-destinations-card,
html[data-theme="dark"] body[data-page="routers"] .router-site-fleet-card,
html[data-theme="dark"] body[data-page="routers"] .router-site-batch-card,
html[data-theme="dark"] body[data-page="routers"] .router-site-health-legend article,
html[data-theme="dark"] body[data-page="routers"] .router-site-signal-row,
html[data-theme="dark"] body[data-page="routers"] .router-site-attention-row,
html[data-theme="dark"] body[data-page="routers"] .router-site-attention-empty {
  border-color: var(--product-line);
  background:
    radial-gradient(260px 150px at 100% -16%, rgba(95, 185, 255, 0.12), transparent 74%),
    linear-gradient(180deg, rgba(17, 34, 52, 0.94) 0%, rgba(10, 22, 36, 0.96) 100%);
}

html[data-theme="dark"] body[data-page="routers"] .router-overview-stat.is-primary {
  background:
    radial-gradient(260px 160px at 100% 0%, rgba(126, 209, 237, 0.24), transparent 72%),
    linear-gradient(145deg, #0f3b5d 0%, #0b5f83 52%, #0d8066 100%);
}

html[data-theme="dark"] body[data-page="routers"] .router-overview-stat.is-warn {
  background:
    radial-gradient(180px 110px at 100% 0%, rgba(242, 169, 59, 0.15), transparent 70%),
    linear-gradient(180deg, #241b0c 0%, #19150d 100%);
}

html[data-theme="dark"] body[data-page="routers"] .router-site-orchestrator-copy h2,
html[data-theme="dark"] body[data-page="routers"] .router-overview-stat strong,
html[data-theme="dark"] body[data-page="routers"] .router-site-health-donut strong,
html[data-theme="dark"] body[data-page="routers"] .router-site-health-legend strong,
html[data-theme="dark"] body[data-page="routers"] .router-site-signal-row span,
html[data-theme="dark"] body[data-page="routers"] .router-site-attention-copy strong,
html[data-theme="dark"] body[data-page="routers"] .router-site-attention-copy p {
  color: var(--product-ink);
}

html[data-theme="dark"] body[data-page="routers"] .router-overview-stat span,
html[data-theme="dark"] body[data-page="routers"] .router-overview-stat small,
html[data-theme="dark"] body[data-page="routers"] .router-site-health-donut span,
html[data-theme="dark"] body[data-page="routers"] .router-site-health-legend span,
html[data-theme="dark"] body[data-page="routers"] .router-site-panel-note,
html[data-theme="dark"] body[data-page="routers"] .router-site-signal-row small,
html[data-theme="dark"] body[data-page="routers"] .router-site-attention-copy small {
  color: var(--product-muted);
}

html[data-theme="dark"] body[data-page="routers"] .router-site-health-donut::before {
  background: linear-gradient(180deg, #102235 0%, #0b1a2a 100%);
}

html[data-theme="dark"] body[data-page="routers"] .router-site-destinations-card .router-site-top-site-row,
html[data-theme="dark"] body[data-page="routers"] .router-site-signal-box {
  border-color: var(--product-line);
}

/* Market-grade operations polish: calm shell, compact surfaces and fewer visual distractions. */
body.dashboard-body[data-page] {
  --tool-bg: #f3f6f8;
  --tool-surface: #ffffff;
  --tool-surface-muted: #f8fafb;
  --tool-border: #d9e1e8;
  --tool-border-strong: #c6d1dc;
  --tool-text: #172637;
  --tool-muted: #607286;
  --tool-muted-strong: #43566a;
  --tool-accent: #1268a8;
  --tool-accent-soft: #e8f2fb;
  --tool-ok: #147d64;
  --tool-warn: #b77614;
  --tool-danger: #b23a4b;
  --tool-radius: 8px;
  --tool-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  --tool-shadow-raised: 0 8px 22px rgba(15, 23, 42, 0.08);
  color: var(--tool-text);
  background: var(--tool-bg);
  background-attachment: scroll;
}

body.dashboard-body[data-page] h1,
body.dashboard-body[data-page] h2,
body.dashboard-body[data-page] h3,
body.dashboard-body[data-page] th {
  letter-spacing: 0;
}

body.dashboard-body[data-page] .unifi-topbar {
  min-height: 52px;
  border-bottom: 1px solid var(--tool-border);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.dashboard-body[data-page] .unifi-topbar-left,
body.dashboard-body[data-page] .unifi-topbar-center,
body.dashboard-body[data-page] .unifi-topbar-right {
  min-height: 52px;
}

body.dashboard-body[data-page] .unifi-topbar-brand {
  color: var(--tool-muted-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
}

body.dashboard-body[data-page] .unifi-console-pill,
body.dashboard-body[data-page] .unifi-topbar-tab,
body.dashboard-body[data-page] .unifi-topbar-icon {
  border-radius: var(--tool-radius);
}

body.dashboard-body[data-page] .unifi-console-pill,
body.dashboard-body[data-page] .unifi-topbar-tabs {
  border-color: var(--tool-border);
  background: var(--tool-surface-muted);
  box-shadow: none;
}

body.dashboard-body[data-page] .unifi-topbar-tab {
  color: var(--tool-muted-strong);
  font-size: 0.77rem;
  letter-spacing: 0;
}

body.dashboard-body[data-page] .unifi-topbar-tab.is-active {
  color: var(--tool-accent);
  background: var(--tool-surface);
  box-shadow: var(--tool-shadow);
}

body.dashboard-body[data-page] .unifi-topbar-icon {
  width: 32px;
  height: 32px;
  border-color: var(--tool-border);
  color: var(--tool-muted-strong);
  background: var(--tool-surface);
  box-shadow: none;
}

body.dashboard-body[data-page] .unifi-topbar-icon.is-status::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--tool-ok);
  box-shadow: 0 0 0 3px rgba(20, 125, 100, 0.14);
}

body.dashboard-body[data-page] .unifi-topbar-dropdown {
  border-color: var(--tool-border);
  border-radius: var(--tool-radius);
  background: var(--tool-surface);
  box-shadow: var(--tool-shadow-raised);
}

body.dashboard-body[data-page] .unifi-topbar-dropdown-kicker,
body.dashboard-body[data-page] .unifi-topbar-menu-item-meta {
  letter-spacing: 0.04em;
}

body.dashboard-body[data-page] .unifi-topbar-menu-item {
  border-color: var(--tool-border);
  border-radius: var(--tool-radius);
  background: var(--tool-surface);
  box-shadow: none;
}

body.dashboard-body[data-page] .unifi-topbar-menu-item:hover {
  border-color: var(--tool-border-strong);
  background: var(--tool-surface-muted);
}

body.dashboard-body[data-page] .unifi-rail {
  inset: 52px auto 0 0;
  width: 56px;
  border-right: 1px solid var(--tool-border);
  background: #fbfcfd;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.dashboard-body[data-page] .unifi-rail-group {
  gap: 6px;
  padding: 0 8px;
}

body.dashboard-body[data-page] .unifi-rail-item {
  width: 40px;
  height: 40px;
  border-radius: var(--tool-radius);
  color: #627489;
}

body.dashboard-body[data-page] .unifi-rail-item:hover {
  border-color: var(--tool-border);
  background: var(--tool-surface-muted);
}

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: #b8d3e9;
  color: var(--tool-accent);
  background: var(--tool-accent-soft);
  box-shadow: inset 3px 0 0 var(--tool-accent);
}

body.dashboard-body[data-page] .dashboard-shell {
  width: auto;
  max-width: none;
  margin: 0 0 0 56px;
  padding: 16px 20px 24px;
  gap: 16px;
  grid-template-columns: minmax(230px, 260px) minmax(0, 1fr);
}

body.dashboard-body[data-page="routers"] .dashboard-shell.router-site-shell {
  margin-left: 56px;
  padding: 16px 20px 24px;
  grid-template-columns: minmax(250px, 280px) minmax(0, 1fr);
  gap: 16px;
}

body.dashboard-body[data-page] .sidebar-column {
  top: 52px;
  height: calc(100vh - 52px);
  padding: 0;
}

body.dashboard-body[data-page] .layout {
  min-width: 0;
  gap: 16px;
  padding: 0;
}

body.dashboard-body[data-page] .card,
body.dashboard-body[data-page] .embedded-card,
body.dashboard-body[data-page] .stat-card,
body.dashboard-body[data-page] .workspace-sidebar-card,
body.dashboard-body[data-page] .dashboard-unifi-summary-card,
body.dashboard-body[data-page] .dashboard-unifi-internet-card,
body.dashboard-body[data-page] .dashboard-unifi-clients-card,
body.dashboard-body[data-page] .dashboard-unifi-chart-card,
body.dashboard-body[data-page] .dashboard-unifi-table-card,
body.dashboard-body[data-page] .dashboard-unifi-panel,
body.dashboard-body[data-page] .company-summary-card,
body.dashboard-body[data-page] .user-summary-card,
body.dashboard-body[data-page] .release-summary-card,
body.dashboard-body[data-page] .router-manage-summary-card,
body.dashboard-body[data-page] .ops-health-surface,
body.dashboard-body[data-page] .ops-health-trend-card,
body.dashboard-body[data-page] .router-site-orchestrator,
body.dashboard-body[data-page] .router-overview-stat,
body.dashboard-body[data-page] .router-site-map-card,
body.dashboard-body[data-page] .router-site-health-card,
body.dashboard-body[data-page] .router-site-attention-card,
body.dashboard-body[data-page] .router-site-bandwidth-surface,
body.dashboard-body[data-page] .router-site-destinations-card,
body.dashboard-body[data-page] .router-site-fleet-card,
body.dashboard-body[data-page] .router-site-batch-card,
body.dashboard-body[data-page] .router-unifi-panel {
  border: 1px solid var(--tool-border);
  border-radius: var(--tool-radius);
  background: var(--tool-surface);
  box-shadow: var(--tool-shadow);
}

body.dashboard-body[data-page] .card::before,
body.dashboard-body[data-page] .card::after,
body.dashboard-body[data-page] .embedded-card::before,
body.dashboard-body[data-page] .embedded-card::after {
  display: none;
}

body.dashboard-body[data-page] .workspace-sidebar-card,
body.dashboard-body[data-page] .sidebar.card {
  min-height: 0;
  padding: 16px;
  gap: 14px;
  background: var(--tool-surface);
  box-shadow: var(--tool-shadow);
}

body.dashboard-body[data-page] .workspace-sidebar-head h1,
body.dashboard-body[data-page] .dashboard-console-header h1,
body.dashboard-body[data-page] .router-site-orchestrator-copy h2 {
  color: var(--tool-text);
  font-size: 1.45rem;
  line-height: 1.12;
  letter-spacing: 0;
}

body.dashboard-body[data-page] .workspace-sidebar-copy,
body.dashboard-body[data-page] .workspace-sidebar-panel p,
body.dashboard-body[data-page] .muted-line,
body.dashboard-body[data-page] .dashboard-console-detail,
body.dashboard-body[data-page] .router-site-panel-note {
  color: var(--tool-muted);
}

body.dashboard-body[data-page] .workspace-sidebar-chip,
body.dashboard-body[data-page] .pill,
body.dashboard-body[data-page] .ops-health-chip {
  border-radius: 999px;
  letter-spacing: 0.02em;
  box-shadow: none;
}

body.dashboard-body[data-page] .workspace-sidebar-chip,
body.dashboard-body[data-page] .workspace-sidebar-panel {
  border-color: var(--tool-border);
  border-radius: var(--tool-radius);
  background: var(--tool-surface-muted);
  box-shadow: none;
}

body.dashboard-body[data-page] .section-header,
body.dashboard-body[data-page] .company-hero-top,
body.dashboard-body[data-page] .user-hero-top,
body.dashboard-body[data-page] .release-hero-top,
body.dashboard-body[data-page] .router-manage-hero-top,
body.dashboard-body[data-page] .audit-log-board-head,
body.dashboard-body[data-page] .ops-health-hero-grid,
body.dashboard-body[data-page] .router-site-orchestrator-head {
  gap: 14px;
  padding: 0;
}

body.dashboard-body[data-page] .company-hero-card,
body.dashboard-body[data-page] .user-hero-card,
body.dashboard-body[data-page] .release-hero-card,
body.dashboard-body[data-page] .router-manage-hero-card,
body.dashboard-body[data-page] .ops-health-hero,
body.dashboard-body[data-page] .audit-log-board,
body.dashboard-body[data-page] .dashboard-console-card,
body.dashboard-body[data-page] .router-site-orchestrator {
  padding: 18px;
}

body.dashboard-body[data-page] .company-summary-grid,
body.dashboard-body[data-page] .user-summary-grid,
body.dashboard-body[data-page] .release-summary-grid,
body.dashboard-body[data-page] .router-manage-summary-grid,
body.dashboard-body[data-page] .ops-health-status-grid,
body.dashboard-body[data-page] .router-overview-strip,
body.dashboard-body[data-page] .dashboard-kpi-grid {
  gap: 12px;
}

body.dashboard-body[data-page] .company-summary-card,
body.dashboard-body[data-page] .user-summary-card,
body.dashboard-body[data-page] .release-summary-card,
body.dashboard-body[data-page] .router-manage-summary-card,
body.dashboard-body[data-page] .stat-card,
body.dashboard-body[data-page] .router-overview-stat {
  padding: 14px;
  background: var(--tool-surface);
}

body.dashboard-body[data-page] .router-overview-stat.is-primary,
body.dashboard-body[data-page] .router-overview-stat.is-warn {
  color: var(--tool-text);
  background: var(--tool-surface);
}

body.dashboard-body[data-page] .router-overview-stat.is-primary strong,
body.dashboard-body[data-page] .router-overview-stat.is-primary span,
body.dashboard-body[data-page] .router-overview-stat.is-primary small,
body.dashboard-body[data-page] .router-overview-stat.is-warn strong,
body.dashboard-body[data-page] .router-overview-stat.is-warn span,
body.dashboard-body[data-page] .router-overview-stat.is-warn small {
  color: inherit;
}

body.dashboard-body[data-page] .dashboard-console-rack,
body.dashboard-body[data-page] .dashboard-console-live-photo,
body.dashboard-body[data-page] .router-unifi-device {
  display: none;
}

body.dashboard-body[data-page] table {
  border-collapse: separate;
  border-spacing: 0;
}

body.dashboard-body[data-page] .table-wrap {
  border: 1px solid var(--tool-border);
  border-radius: var(--tool-radius);
  background: var(--tool-surface);
  box-shadow: none;
}

body.dashboard-body[data-page] th {
  color: var(--tool-muted-strong);
  background: var(--tool-surface-muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

body.dashboard-body[data-page] td {
  color: var(--tool-text);
  border-color: var(--tool-border);
}

body.dashboard-body[data-page] tbody tr:hover {
  background: #f8fbfd;
}

body.dashboard-body[data-page] input,
body.dashboard-body[data-page] select,
body.dashboard-body[data-page] textarea {
  min-height: 40px;
  border-color: var(--tool-border);
  border-radius: var(--tool-radius);
  background: var(--tool-surface);
  color: var(--tool-text);
  box-shadow: none;
}

body.dashboard-body[data-page] input:focus,
body.dashboard-body[data-page] select:focus,
body.dashboard-body[data-page] textarea:focus {
  border-color: #8eb8da;
  background: var(--tool-surface);
  box-shadow: 0 0 0 3px rgba(18, 104, 168, 0.14);
}

body.dashboard-body[data-page] button,
body.dashboard-body[data-page] a.secondary,
body.dashboard-body[data-page] .secondary {
  border-radius: var(--tool-radius);
  box-shadow: none;
}

body.dashboard-body[data-page] button:not(.secondary):not(.unifi-topbar-toggle):not(.unifi-rail-item),
body.dashboard-body[data-page] a.button-primary {
  background: #1268a8;
  box-shadow: none;
}

body.dashboard-body[data-page] button:hover,
body.dashboard-body[data-page] .secondary:hover,
body.dashboard-body[data-page] a.secondary:hover {
  transform: none;
}

body.dashboard-body[data-page] .secondary,
body.dashboard-body[data-page] a.secondary,
body.dashboard-body[data-page] button.secondary {
  border-color: var(--tool-border);
  color: var(--tool-muted-strong);
  background: var(--tool-surface);
}

body.dashboard-body[data-page] .secondary.is-active,
body.dashboard-body[data-page] button.secondary.is-active,
body.dashboard-body[data-page] a.secondary.is-active {
  border-color: #b8d3e9;
  color: var(--tool-accent);
  background: var(--tool-accent-soft);
}

body.dashboard-body[data-page] .router-site-main-grid,
body.dashboard-body[data-page] .router-site-traffic-grid,
body.dashboard-body[data-page] .dashboard-unifi-layout,
body.dashboard-body[data-page] .ops-health-detail-grid {
  gap: 16px;
}

body.dashboard-body[data-page] .router-site-health-donut,
body.dashboard-body[data-page] .router-site-health-donut--small {
  box-shadow: none;
}

body.dashboard-body[data-page] .router-site-map-grid {
  border-radius: var(--tool-radius);
}

body.dashboard-body[data-page] .router-site-map-pin {
  border-radius: 999px;
}

@media (max-width: 1180px) {
  body.dashboard-body[data-page] .unifi-rail {
    display: none;
  }

  body.dashboard-body[data-page] .dashboard-shell,
  body.dashboard-body[data-page="routers"] .dashboard-shell.router-site-shell {
    margin: 0;
    padding: 14px;
    grid-template-columns: minmax(0, 1fr);
  }

  body.dashboard-body[data-page] .sidebar-column {
    position: relative;
    top: 0;
    height: auto;
  }
}

@media (max-width: 720px) {
  body.dashboard-body[data-page] .unifi-topbar-center {
    display: none;
  }

  body.dashboard-body[data-page] .unifi-topbar {
    padding-inline: 8px;
  }

  body.dashboard-body[data-page] .dashboard-shell,
  body.dashboard-body[data-page="routers"] .dashboard-shell.router-site-shell {
    padding: 10px;
  }

  body.dashboard-body[data-page] .company-hero-card,
  body.dashboard-body[data-page] .user-hero-card,
  body.dashboard-body[data-page] .release-hero-card,
  body.dashboard-body[data-page] .router-manage-hero-card,
  body.dashboard-body[data-page] .ops-health-hero,
  body.dashboard-body[data-page] .audit-log-board,
  body.dashboard-body[data-page] .dashboard-console-card,
  body.dashboard-body[data-page] .router-site-orchestrator {
    padding: 14px;
  }
}

html[data-theme="dark"] body.dashboard-body[data-page] {
  --tool-bg: #0f151c;
  --tool-surface: #141d26;
  --tool-surface-muted: #101821;
  --tool-border: #283544;
  --tool-border-strong: #344557;
  --tool-text: #e8eef4;
  --tool-muted: #9aabba;
  --tool-muted-strong: #c0ccd8;
  --tool-accent: #79bff2;
  --tool-accent-soft: #14283a;
  --tool-ok: #54c49f;
  color: var(--tool-text);
  background: var(--tool-bg);
}

html[data-theme="dark"] body.dashboard-body[data-page] .unifi-topbar,
html[data-theme="dark"] body.dashboard-body[data-page] .unifi-rail,
html[data-theme="dark"] body.dashboard-body[data-page] .card,
html[data-theme="dark"] body.dashboard-body[data-page] .embedded-card,
html[data-theme="dark"] body.dashboard-body[data-page] .stat-card,
html[data-theme="dark"] body.dashboard-body[data-page] .workspace-sidebar-card,
html[data-theme="dark"] body.dashboard-body[data-page] .router-site-orchestrator,
html[data-theme="dark"] body.dashboard-body[data-page] .router-overview-stat,
html[data-theme="dark"] body.dashboard-body[data-page] .router-site-map-card,
html[data-theme="dark"] body.dashboard-body[data-page] .router-site-health-card,
html[data-theme="dark"] body.dashboard-body[data-page] .router-site-attention-card,
html[data-theme="dark"] body.dashboard-body[data-page] .router-site-bandwidth-surface,
html[data-theme="dark"] body.dashboard-body[data-page] .router-site-destinations-card,
html[data-theme="dark"] body.dashboard-body[data-page] .router-site-fleet-card,
html[data-theme="dark"] body.dashboard-body[data-page] .router-site-batch-card,
html[data-theme="dark"] body.dashboard-body[data-page] .router-unifi-panel {
  border-color: var(--tool-border);
  background: var(--tool-surface);
  box-shadow: none;
}

html[data-theme="dark"] body.dashboard-body[data-page] .workspace-sidebar-chip,
html[data-theme="dark"] body.dashboard-body[data-page] .workspace-sidebar-panel,
html[data-theme="dark"] body.dashboard-body[data-page] .table-wrap,
html[data-theme="dark"] body.dashboard-body[data-page] input,
html[data-theme="dark"] body.dashboard-body[data-page] select,
html[data-theme="dark"] body.dashboard-body[data-page] textarea,
html[data-theme="dark"] body.dashboard-body[data-page] .secondary,
html[data-theme="dark"] body.dashboard-body[data-page] a.secondary,
html[data-theme="dark"] body.dashboard-body[data-page] button.secondary {
  border-color: var(--tool-border);
  color: var(--tool-text);
  background: var(--tool-surface-muted);
}

html[data-theme="dark"] body.dashboard-body[data-page] th,
html[data-theme="dark"] body.dashboard-body[data-page] tbody tr:hover {
  background: var(--tool-surface-muted);
}

html[data-theme="dark"] body.dashboard-body[data-page] td {
  border-color: var(--tool-border);
}

body.dashboard-body[data-page="routers"] .router-site-primary-card {
  margin-top: 14px;
  border-color: var(--tool-border);
  background: linear-gradient(180deg, var(--tool-surface), var(--tool-surface-muted));
}

body.dashboard-body[data-page="routers"] .router-primary-head {
  align-items: center;
  gap: 14px;
}

body.dashboard-body[data-page="routers"] .router-primary-head h3 {
  margin: 2px 0 4px;
  color: var(--tool-text);
}

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

body.dashboard-body[data-page="routers"] .router-primary-kpi-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

body.dashboard-body[data-page="routers"] .router-primary-kpi {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--tool-border);
  border-radius: var(--tool-radius);
  background: var(--tool-surface);
}

body.dashboard-body[data-page="routers"] .router-primary-kpi span {
  display: block;
  color: var(--tool-muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.dashboard-body[data-page="routers"] .router-primary-kpi strong {
  display: block;
  margin-top: 6px;
  color: var(--tool-text);
  font-size: 1rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

body.dashboard-body[data-page="routers"] .router-primary-kpi small {
  display: block;
  margin-top: 5px;
  color: var(--tool-muted);
  font-size: 0.72rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

body.dashboard-body[data-page="routers"] .router-fleet-cell span {
  overflow-wrap: anywhere;
}

@media (max-width: 1280px) {
  body.dashboard-body[data-page="routers"] .router-primary-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body.dashboard-body[data-page="routers"] .router-primary-head,
  body.dashboard-body[data-page="routers"] .router-primary-actions {
    align-items: stretch;
    justify-content: stretch;
  }

  body.dashboard-body[data-page="routers"] .router-primary-actions > * {
    width: 100%;
  }

  body.dashboard-body[data-page="routers"] .router-primary-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  body.dashboard-body[data-page="routers"] .router-primary-kpi-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

html[data-theme="dark"] body.dashboard-body[data-page="routers"] .router-site-primary-card,
html[data-theme="dark"] body.dashboard-body[data-page="routers"] .router-primary-kpi {
  border-color: var(--tool-border);
  background: var(--tool-surface-muted);
}

/* Routers EdgeOps cockpit: market-grade visual layer. */
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] {
  --router-bg: #eef3ee;
  --router-bg-2: #e7f1ef;
  --router-panel: rgba(255, 255, 255, 0.88);
  --router-panel-solid: #ffffff;
  --router-ink: #10201f;
  --router-muted: #62716f;
  --router-line: rgba(25, 55, 52, 0.12);
  --router-line-strong: rgba(25, 55, 52, 0.22);
  --router-blue: #136f8f;
  --router-teal: #0f8f76;
  --router-green: #1d9a69;
  --router-amber: #c68422;
  --router-red: #c44555;
  --router-sand: #f6efe1;
  --router-radius-lg: 28px;
  --router-radius-md: 18px;
  --router-shadow: 0 18px 50px rgba(18, 42, 39, 0.12);
  --router-shadow-soft: 0 8px 24px rgba(18, 42, 39, 0.08);
  overflow-x: hidden;
  color: var(--router-ink);
  background:
    radial-gradient(900px 420px at 86% -10%, rgba(19, 111, 143, 0.2), transparent 68%),
    radial-gradient(740px 360px at 5% 8%, rgba(29, 154, 105, 0.18), transparent 72%),
    linear-gradient(135deg, var(--router-bg) 0%, var(--router-bg-2) 54%, #f7f1e5 100%);
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .dashboard-shell.router-site-shell {
  grid-template-columns: minmax(250px, 294px) minmax(0, 1fr);
  gap: 18px;
  padding: 18px 22px 32px;
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-layout,
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-layout > *,
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-orchestrator,
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-command-deck,
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-detail-main {
  min-width: 0;
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-unifi-sidebar-card,
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-orchestrator,
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-command-deck {
  border: 1px solid var(--router-line);
  border-radius: var(--router-radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.76)),
    radial-gradient(420px 210px at 0% 0%, rgba(246, 239, 225, 0.72), transparent 74%);
  box-shadow: var(--router-shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-unifi-sidebar-card {
  position: sticky;
  top: 70px;
  padding: 18px;
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-unifi-sidebar-head h1,
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-orchestrator-copy h2 {
  color: var(--router-ink);
  font-family: "Aptos Display", "Sora", "Trebuchet MS", sans-serif;
  letter-spacing: -0.045em;
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-orchestrator {
  position: relative;
  gap: 18px;
  padding: 22px;
  overflow: hidden;
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-orchestrator::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(16, 32, 31, 0.04), transparent 42%),
    radial-gradient(360px 180px at 88% 0%, rgba(19, 111, 143, 0.18), transparent 72%);
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-orchestrator > * {
  position: relative;
  z-index: 1;
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-orchestrator-head {
  align-items: flex-start;
  border-bottom: 1px solid var(--router-line);
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-unifi-kicker,
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-unifi-console-kicker,
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-unifi-panel-kicker {
  color: var(--router-blue);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-orchestrator-copy h2 {
  max-width: 860px;
  font-size: clamp(2.4rem, 4vw, 4.4rem);
  line-height: 0.9;
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .muted-line,
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-panel-note,
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-unifi-sidebar-subtitle,
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-unifi-sidebar-meta {
  color: var(--router-muted);
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-overview-strip {
  grid-template-columns: minmax(210px, 1.15fr) repeat(3, minmax(150px, 1fr));
  gap: 12px;
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-overview-stat,
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-market-intelligence-card,
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-primary-card,
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-map-card,
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-health-card,
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-attention-card,
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-bandwidth-surface,
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-destinations-card,
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-fleet-card,
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-batch-card,
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-security-radar,
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-traffic-card,
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-dhcp-card,
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-config-panel,
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-history-panel {
  min-width: 0;
  border: 1px solid var(--router-line);
  border-radius: var(--router-radius-md);
  background: var(--router-panel);
  box-shadow: var(--router-shadow-soft);
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-overview-stat {
  min-height: 126px;
  padding: 16px;
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-overview-stat::after {
  right: -18px;
  bottom: -24px;
  width: 84px;
  height: 84px;
  background: rgba(19, 111, 143, 0.1);
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-overview-stat strong {
  color: var(--router-ink);
  font-size: clamp(1.65rem, 2.2vw, 2.4rem);
  overflow-wrap: anywhere;
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-overview-stat--duo strong {
  font-size: clamp(1.18rem, 1.8vw, 1.65rem);
  letter-spacing: -0.04em;
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-overview-stat.is-ok {
  border-color: rgba(29, 154, 105, 0.24);
  background:
    radial-gradient(180px 110px at 100% 0%, rgba(29, 154, 105, 0.15), transparent 70%),
    linear-gradient(180deg, #f2fbf5 0%, #e6f5eb 100%);
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-overview-stat.is-primary {
  background:
    radial-gradient(180px 110px at 100% 0%, rgba(255, 255, 255, 0.22), transparent 70%),
    linear-gradient(145deg, #0e4f65 0%, #0f8f76 100%);
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-overview-stat.is-primary span,
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-overview-stat.is-primary strong,
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-overview-stat.is-primary small {
  color: #ffffff;
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-overview-stat.is-warn {
  border-color: rgba(198, 132, 34, 0.24);
  background:
    radial-gradient(180px 110px at 100% 0%, rgba(198, 132, 34, 0.18), transparent 70%),
    linear-gradient(180deg, #fffaf0 0%, #f8ead2 100%);
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-market-intelligence-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-market-intelligence-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 247, 0.9)),
    radial-gradient(180px 100px at 100% 0%, rgba(19, 111, 143, 0.08), transparent 70%);
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-market-intelligence-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: #ffffff;
  background: var(--router-blue);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-market-intelligence-card.is-availability .router-market-intelligence-icon { background: var(--router-green); }
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-market-intelligence-card.is-availability.is-warn .router-market-intelligence-icon { background: var(--router-amber); }
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-market-intelligence-card.is-availability.is-danger .router-market-intelligence-icon { background: var(--router-red); }
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-market-intelligence-card.is-capacity .router-market-intelligence-icon { background: var(--router-blue); }
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-market-intelligence-card.is-lifecycle .router-market-intelligence-icon { background: var(--router-amber); }
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-market-intelligence-card.is-risk .router-market-intelligence-icon { background: var(--router-red); }

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-market-intelligence-card p,
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-market-intelligence-card strong,
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-market-intelligence-card small {
  display: block;
  margin: 0;
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-market-intelligence-card p {
  color: var(--router-muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-market-intelligence-card strong {
  margin-top: 4px;
  color: var(--router-ink);
  font-size: 1.35rem;
  letter-spacing: -0.04em;
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-market-intelligence-card small {
  margin-top: 2px;
  color: var(--router-muted);
  font-size: 0.76rem;
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-primary-kpi-grid {
  grid-template-columns: repeat(7, minmax(126px, 1fr));
  overflow-x: auto;
  padding-bottom: 3px;
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-primary-kpi {
  border-color: var(--router-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-main-grid {
  grid-template-columns: minmax(0, 1.46fr) minmax(330px, 0.84fr);
  gap: 16px;
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-traffic-grid {
  grid-template-columns: minmax(0, 1.38fr) minmax(330px, 0.86fr);
  gap: 16px;
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-map-grid {
  min-height: 360px;
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
  gap: 12px;
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-product-map-node {
  position: relative;
  min-height: 126px;
  align-content: start;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--router-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  overflow: hidden;
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-product-map-node::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: #9aa8a5;
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-product-map-node.is-online::before { background: var(--router-green); }
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-product-map-node.is-offline::before { background: var(--router-red); }
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-product-map-node.is-attention::before { background: var(--router-amber); }

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-product-map-node > span {
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-product-map-node strong,
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-product-map-node small,
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-product-map-node em,
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-product-map-node i {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-product-map-node strong {
  color: var(--router-ink);
  font-size: 0.95rem;
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-product-map-node small,
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-product-map-node em,
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-product-map-node i {
  color: var(--router-muted);
  font-style: normal;
  font-size: 0.74rem;
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-health-donut {
  border-color: var(--router-line);
  background: conic-gradient(#dfe8e4 0 100%);
  box-shadow: inset 0 0 0 10px rgba(255, 255, 255, 0.34), var(--router-shadow-soft);
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-health-donut::before {
  background: var(--router-panel-solid);
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-health-legend article,
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-signal-row,
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-attention-row,
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-attention-empty {
  border-color: var(--router-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.66);
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-bandwidth-chart-frame,
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .iface-chart-panel,
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--router-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-fleet-card .table-wrap table {
  min-width: 840px;
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] table {
  width: 100%;
  table-layout: auto;
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] th {
  color: var(--router-muted);
  background: rgba(246, 239, 225, 0.78);
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] td {
  color: var(--router-ink);
  border-color: var(--router-line);
  vertical-align: top;
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] tbody tr:hover {
  background: rgba(19, 111, 143, 0.05);
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .secondary,
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] a.secondary,
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] button.secondary {
  border-color: var(--router-line);
  color: var(--router-ink);
  background: rgba(255, 255, 255, 0.72);
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .secondary:hover,
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] a.secondary:hover,
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] button.secondary:hover {
  border-color: var(--router-line-strong);
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(18, 42, 39, 0.08);
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-theme-toggle [data-theme-icon] {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: var(--router-ink);
  font-size: 0.72rem;
  font-weight: 900;
}

html[data-theme="dark"] body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] {
  --router-bg: #071210;
  --router-bg-2: #0c1a18;
  --router-panel: rgba(13, 28, 26, 0.86);
  --router-panel-solid: #0e1e1c;
  --router-ink: #edf6f2;
  --router-muted: #9db1ad;
  --router-line: rgba(198, 222, 214, 0.14);
  --router-line-strong: rgba(198, 222, 214, 0.28);
  --router-sand: #1c261f;
  background:
    radial-gradient(900px 420px at 86% -10%, rgba(64, 171, 210, 0.18), transparent 68%),
    radial-gradient(740px 360px at 5% 8%, rgba(34, 182, 130, 0.15), transparent 72%),
    linear-gradient(135deg, var(--router-bg) 0%, var(--router-bg-2) 58%, #15120b 100%);
}

html[data-theme="dark"] body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-unifi-sidebar-card,
html[data-theme="dark"] body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-orchestrator,
html[data-theme="dark"] body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-command-deck,
html[data-theme="dark"] body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-overview-stat,
html[data-theme="dark"] body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-market-intelligence-card,
html[data-theme="dark"] body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-primary-card,
html[data-theme="dark"] body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-map-card,
html[data-theme="dark"] body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-health-card,
html[data-theme="dark"] body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-attention-card,
html[data-theme="dark"] body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-bandwidth-surface,
html[data-theme="dark"] body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-destinations-card,
html[data-theme="dark"] body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-fleet-card,
html[data-theme="dark"] body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-batch-card,
html[data-theme="dark"] body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-security-radar,
html[data-theme="dark"] body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-traffic-card,
html[data-theme="dark"] body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-dhcp-card,
html[data-theme="dark"] body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-config-panel,
html[data-theme="dark"] body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-history-panel {
  border-color: var(--router-line);
  background:
    linear-gradient(180deg, rgba(13, 28, 26, 0.9), rgba(8, 19, 18, 0.88)),
    radial-gradient(300px 160px at 100% 0%, rgba(64, 171, 210, 0.11), transparent 72%);
  box-shadow: none;
}

html[data-theme="dark"] body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-overview-stat.is-primary {
  background: linear-gradient(145deg, #0d4051 0%, #0f745f 100%);
}

html[data-theme="dark"] body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-overview-stat.is-warn {
  background:
    radial-gradient(180px 110px at 100% 0%, rgba(198, 132, 34, 0.15), transparent 70%),
    linear-gradient(180deg, #221b0d 0%, #17140e 100%);
}

html[data-theme="dark"] body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-overview-stat.is-ok {
  background:
    radial-gradient(180px 110px at 100% 0%, rgba(29, 154, 105, 0.16), transparent 70%),
    linear-gradient(180deg, #0f241b 0%, #0c1b15 100%);
}

html[data-theme="dark"] body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-primary-kpi,
html[data-theme="dark"] body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-product-map-node,
html[data-theme="dark"] body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-health-legend article,
html[data-theme="dark"] body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-signal-row,
html[data-theme="dark"] body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-attention-row,
html[data-theme="dark"] body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-attention-empty,
html[data-theme="dark"] body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-bandwidth-chart-frame,
html[data-theme="dark"] body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .iface-chart-panel,
html[data-theme="dark"] body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .table-wrap,
html[data-theme="dark"] body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .secondary,
html[data-theme="dark"] body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] a.secondary,
html[data-theme="dark"] body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] button.secondary {
  border-color: var(--router-line);
  color: var(--router-ink);
  background: rgba(12, 26, 24, 0.76);
}

html[data-theme="dark"] body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] th {
  color: var(--router-muted);
  background: rgba(28, 38, 31, 0.72);
}

html[data-theme="dark"] body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] td {
  color: var(--router-ink);
  border-color: var(--router-line);
}

html[data-theme="dark"] body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-health-donut::before {
  background: var(--router-panel-solid);
}

@media (max-width: 1360px) {
  body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-overview-strip,
  body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-market-intelligence-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-main-grid,
  body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-traffic-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 1180px) {
  body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .dashboard-shell.router-site-shell {
    grid-template-columns: minmax(0, 1fr);
    margin: 0;
  }

  body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-unifi-sidebar-card {
    position: relative;
    top: 0;
  }
}

@media (max-width: 720px) {
  body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .dashboard-shell.router-site-shell {
    padding: 10px;
  }

  body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-orchestrator {
    padding: 16px;
    border-radius: 22px;
  }

  body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-orchestrator-copy h2 {
    font-size: clamp(2rem, 12vw, 3rem);
  }

  body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-overview-strip,
  body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-market-intelligence-grid,
  body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-health-body,
  body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-site-destinations-body {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Collapsible navigation rail and router control dock. */
body.dashboard-body[data-page] .unifi-rail {
  width: 56px;
  transition: width 180ms ease;
}

body.dashboard-body[data-page] .unifi-rail-item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  justify-content: start;
  align-items: center;
  gap: 10px;
  width: 40px;
  overflow: hidden;
  padding: 0 10px;
  white-space: nowrap;
  transition: width 180ms ease, background 160ms ease, border-color 160ms ease;
}

body.dashboard-body[data-page] .unifi-rail-label {
  min-width: 0;
  overflow: hidden;
  color: currentColor;
  font-size: 0.82rem;
  font-weight: 800;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 160ms ease, transform 160ms ease;
}

body.dashboard-body[data-page] .unifi-rail-icon[data-rail="menu"] {
  --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 6h16v2H4zm0 5h16v2H4zm0 5h16v2H4z'/%3E%3C/svg%3E");
}

body.dashboard-body[data-page].is-rail-expanded .unifi-rail {
  width: 216px;
}

body.dashboard-body[data-page].is-rail-expanded .unifi-rail-item {
  width: 192px;
  place-items: center start;
}

body.dashboard-body[data-page].is-rail-expanded .unifi-rail-label {
  opacity: 1;
  transform: translateX(0);
}

body.dashboard-body[data-page].is-rail-expanded .dashboard-shell,
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"].is-rail-expanded .dashboard-shell.router-site-shell {
  margin-left: 216px;
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .dashboard-shell.router-site-shell {
  grid-template-columns: minmax(0, 1fr);
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-control-dock {
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) auto minmax(280px, 0.9fr);
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--router-line);
  border-radius: var(--router-radius-md);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.62)),
    radial-gradient(240px 120px at 100% 0%, rgba(15, 143, 118, 0.09), transparent 72%);
  box-shadow: var(--router-shadow-soft);
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-control-dock-copy {
  min-width: 0;
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-control-dock-copy h3,
body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-control-dock-copy p {
  margin: 0;
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-control-dock-copy h3 {
  margin-top: 4px;
  color: var(--router-ink);
  font-size: 1.1rem;
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-control-dock-fields {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(150px, 0.6fr);
  gap: 10px;
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-control-dock-fields label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-control-dock-fields label span {
  color: var(--router-muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-control-dock-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-control-dock-summary {
  grid-column: 1 / -1;
  margin: -2px 0 0;
  color: var(--router-muted);
  font-size: 0.8rem;
}

html[data-theme="dark"] body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-control-dock {
  border-color: var(--router-line);
  background:
    linear-gradient(180deg, rgba(13, 28, 26, 0.86), rgba(8, 19, 18, 0.8)),
    radial-gradient(240px 120px at 100% 0%, rgba(64, 171, 210, 0.1), transparent 72%);
}

@media (max-width: 1180px) {
  body.dashboard-body[data-page].is-rail-expanded .dashboard-shell,
  body.dashboard-body[data-page="routers"][data-router-product="edge-ops"].is-rail-expanded .dashboard-shell.router-site-shell,
  body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .dashboard-shell.router-site-shell {
    margin: 0;
  }
}

@media (max-width: 900px) {
  body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-control-dock {
    grid-template-columns: minmax(0, 1fr);
  }

  body.dashboard-body[data-page="routers"][data-router-product="edge-ops"] .router-control-dock-fields {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ═══════════════════════════════════════════════════════════════
   PAGE-LEVEL HERO POLISH — additive accents for legacy hero cards
   Applies to: dashboard-hero-card, user-hero-card, company-hero-card,
   release-hero-card, ops-health-hero, router-manage-hero-card,
   audit-hero-card. Existing rules keep their gradients; this layer
   adds a top accent stripe and a chipified eyebrow for consistency.
   ═══════════════════════════════════════════════════════════════ */
.dashboard-hero-card,
.user-hero-card,
.company-hero-card,
.release-hero-card,
.ops-health-hero,
.router-manage-hero-card,
.audit-hero-card {
  position: relative;
  overflow: hidden;
}

.dashboard-hero-card::before,
.user-hero-card::before,
.company-hero-card::before,
.release-hero-card::before,
.ops-health-hero::before,
.router-manage-hero-card::before,
.audit-hero-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand) 0%, #1395c8 50%, var(--accent) 100%);
  z-index: 1;
  pointer-events: none;
}

/* Brand-chip eyebrow style for heroes */
.dashboard-hero-card > .dashboard-hero-top > div > .eyebrow,
.user-hero-card .user-hero-top .eyebrow,
.company-hero-card .company-hero-top .eyebrow,
.release-hero-card .release-hero-top .eyebrow,
.ops-health-hero .ops-health-hero-top .eyebrow,
.audit-hero-card .audit-hero-top .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

html[data-theme="dark"] .dashboard-hero-card > .dashboard-hero-top > div > .eyebrow,
html[data-theme="dark"] .user-hero-card .user-hero-top .eyebrow,
html[data-theme="dark"] .company-hero-card .company-hero-top .eyebrow,
html[data-theme="dark"] .release-hero-card .release-hero-top .eyebrow,
html[data-theme="dark"] .ops-health-hero .ops-health-hero-top .eyebrow,
html[data-theme="dark"] .audit-hero-card .audit-hero-top .eyebrow {
  background: rgba(82, 180, 255, 0.14);
  color: var(--brand);
}

/* Polished h2 inside heroes */
.dashboard-hero-card h2,
.user-hero-card h2,
.company-hero-card h2,
.release-hero-card h2,
.ops-health-hero h2,
.router-manage-hero-card h2,
.audit-hero-card h2 {
  letter-spacing: -0.018em;
  color: var(--ink-strong);
}

/* ═══════════════════════════════════════════════════════════════
   PAGE HERO — reusable block for page headers (partials/page_hero.php)
   ═══════════════════════════════════════════════════════════════ */
.page-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 4px;
}

.page-hero-copy {
  min-width: 0;
  flex: 1 1 320px;
}

.page-hero-copy h2 {
  margin: 0 0 6px;
  font-size: 1.45rem;
  letter-spacing: -0.015em;
  color: var(--ink-strong);
}

.page-hero-copy .eyebrow {
  margin: 0 0 4px;
}

.page-hero-copy .muted-line {
  margin: 0;
  font-size: 0.92rem;
}

.page-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

@media (max-width: 720px) {
  .page-hero {
    flex-direction: column;
  }
  .page-hero-meta {
    width: 100%;
  }
}

/* ═══════════════════════════════════════════════════════════════
   ROUTERS PAGE v2 — New layout classes (Phase 2 overhaul)
   ═══════════════════════════════════════════════════════════════ */

/* ── Page header bar ── */
body[data-page="routers"] .router-page-header {
  position: sticky;
  top: 50px;
  z-index: calc(var(--z-dropdown) - 10);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(246, 249, 252, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 8px rgba(12, 30, 50, 0.05);
  border-radius: 0;
  margin-bottom: 0;
  max-width: 100%;
}

html[data-theme="dark"] body[data-page="routers"] .router-page-header {
  background: rgba(8, 14, 24, 0.97);
  border-bottom-color: var(--line-soft);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

body[data-page="routers"] .router-page-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 240px;
  min-width: 0;
  flex-wrap: wrap;
}

body[data-page="routers"] .router-page-header-left label {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  margin: 0;
}

body[data-page="routers"] .router-page-header-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  flex: 0 1 auto;
  justify-content: flex-end;
  min-width: 0;
}

body[data-page="routers"] .router-page-header-right .secondary,
body[data-page="routers"] .router-page-header-right a.secondary {
  min-height: 32px;
  padding: 5px 10px;
  font-size: 0.78rem;
  white-space: nowrap;
}

body[data-page="routers"] .router-page-header .router-overview-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
}

body[data-page="routers"] .router-page-header .router-overview-strip::-webkit-scrollbar {
  display: none;
}

body[data-page="routers"] .router-page-header .router-overview-stat {
  min-height: unset;
  padding: 5px 11px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

body[data-page="routers"] .router-page-header .router-overview-stat span {
  display: none;
}

body[data-page="routers"] .router-page-header .router-overview-stat strong {
  font-size: 0.9rem;
  line-height: 1;
}

body[data-page="routers"] .router-page-header .router-overview-stat small {
  font-size: 0.72rem;
  color: var(--muted);
}

body[data-page="routers"] .router-page-header input[type="search"],
body[data-page="routers"] .router-page-header select {
  min-height: 34px;
  padding: 6px 11px;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  color: var(--ink);
}

/* ── Fleet grid: primary card + table side by side (legacy, kept for compat) ── */
body[data-page="routers"] .router-fleet-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

@media (max-width: 1200px) {
  body[data-page="routers"] .router-fleet-grid {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════════
   BANDWIDTH CARD — premium makeover for #routerSiteBandwidthCard
   ═══════════════════════════════════════════════════════════════ */
body[data-page="routers"] #routerSiteBandwidthCard {
  position: relative;
  overflow: hidden;
  padding: 18px 20px 16px;
  border: 1px solid #c9def0;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(520px 220px at 100% -20%, rgba(15, 109, 168, 0.12), transparent 65%),
    radial-gradient(360px 180px at 0% 110%, rgba(12, 155, 119, 0.08), transparent 65%),
    linear-gradient(180deg, #ffffff 0%, #f0f7fd 100%);
  box-shadow: var(--shadow-md);
}

/* Top accent stripe */
body[data-page="routers"] #routerSiteBandwidthCard::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand) 0%, #1395c8 50%, var(--accent) 100%);
}

html[data-theme="dark"] body[data-page="routers"] #routerSiteBandwidthCard {
  border-color: var(--product-line);
  background:
    radial-gradient(520px 220px at 100% -20%, rgba(82, 180, 255, 0.12), transparent 65%),
    radial-gradient(360px 180px at 0% 110%, rgba(67, 207, 170, 0.06), transparent 65%),
    linear-gradient(180deg, rgba(15, 27, 42, 0.98) 0%, rgba(9, 18, 30, 0.98) 100%);
}

html[data-theme="dark"] body[data-page="routers"] #routerSiteBandwidthCard::before {
  background: linear-gradient(90deg, var(--brand) 0%, var(--accent) 100%);
}

/* Header polish */
body[data-page="routers"] #routerSiteBandwidthCard .router-unifi-panel-head {
  align-items: flex-start;
  margin-bottom: 4px;
}

body[data-page="routers"] #routerSiteBandwidthCard .router-unifi-panel-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body[data-page="routers"] #routerSiteBandwidthCard .router-unifi-panel-kicker::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 0 rgba(12, 104, 163, 0.5);
  animation: bvBandwidthPulse 2s infinite;
}

@keyframes bvBandwidthPulse {
  0%   { box-shadow: 0 0 0 0 rgba(12, 104, 163, 0.5); }
  70%  { box-shadow: 0 0 0 6px rgba(12, 104, 163, 0); }
  100% { box-shadow: 0 0 0 0 rgba(12, 104, 163, 0); }
}

html[data-theme="dark"] body[data-page="routers"] #routerSiteBandwidthCard .router-unifi-panel-kicker {
  background: rgba(82, 180, 255, 0.14);
  color: var(--brand);
}

html[data-theme="dark"] body[data-page="routers"] #routerSiteBandwidthCard .router-unifi-panel-kicker::before {
  background: var(--brand);
  animation: bvBandwidthPulseDark 2s infinite;
}

@keyframes bvBandwidthPulseDark {
  0%   { box-shadow: 0 0 0 0 rgba(82, 180, 255, 0.55); }
  70%  { box-shadow: 0 0 0 6px rgba(82, 180, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(82, 180, 255, 0); }
}

body[data-page="routers"] #routerSiteBandwidthCard h3 {
  margin: 8px 0 4px;
  font-size: 1.18rem;
  letter-spacing: -0.015em;
  color: var(--ink-strong);
}

body[data-page="routers"] #routerSiteBandwidthCard .muted-line {
  font-size: 0.86rem;
  margin: 0;
}

/* Mode buttons → segmented control */
body[data-page="routers"] #routerSiteBandwidthCard .router-site-overview-toolbar-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

body[data-page="routers"] #routerSiteBandwidthCard .router-site-overview-toolbar-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

body[data-page="routers"] #routerSiteBandwidthCard .router-site-overview-toolbar-actions {
  display: inline-flex;
  flex-wrap: nowrap;
  padding: 3px;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-elevated);
  box-shadow: var(--shadow-xs);
}

body[data-page="routers"] #routerSiteBandwidthCard .router-site-overview-toolbar-actions .secondary {
  margin: 0;
  min-height: 30px;
  padding: 4px 14px;
  font-size: 0.76rem;
  font-weight: 700;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
  transition: color var(--t-fast), background var(--t-base), box-shadow var(--t-base);
  transform: none !important;
}

body[data-page="routers"] #routerSiteBandwidthCard .router-site-overview-toolbar-actions .secondary:hover {
  background: rgba(12, 104, 163, 0.06);
  color: var(--ink);
  border-color: transparent;
  box-shadow: none;
  transform: none !important;
}

body[data-page="routers"] #routerSiteBandwidthCard .router-site-overview-toolbar-actions .secondary.is-active {
  background: var(--grad-brand);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 10px rgba(12, 104, 163, 0.28);
}

html[data-theme="dark"] body[data-page="routers"] #routerSiteBandwidthCard .router-site-overview-toolbar-actions {
  background: rgba(20, 36, 54, 0.6);
  border-color: var(--line);
}

html[data-theme="dark"] body[data-page="routers"] #routerSiteBandwidthCard .router-site-overview-toolbar-actions .secondary {
  color: var(--product-muted);
}

html[data-theme="dark"] body[data-page="routers"] #routerSiteBandwidthCard .router-site-overview-toolbar-actions .secondary.is-active {
  background: linear-gradient(135deg, #2596d8 0%, #1078b8 100%);
  color: #fff;
}

/* Period select polish */
body[data-page="routers"] #routerSiteBandwidthCard .router-inline-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

body[data-page="routers"] #routerSiteBandwidthCard .router-inline-filter > span {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

body[data-page="routers"] #routerSiteBandwidthCard .router-inline-filter select {
  width: auto;
  min-height: 32px;
  padding: 5px 32px 5px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid var(--line);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%235a6f84' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E") right 12px center / 10px no-repeat,
    var(--bg-elevated);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color var(--t-base), box-shadow var(--t-base);
}

body[data-page="routers"] #routerSiteBandwidthCard .router-inline-filter select:hover {
  border-color: var(--brand);
}

body[data-page="routers"] #routerSiteBandwidthCard .router-inline-filter select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}

/* Chart frame */
body[data-page="routers"] #routerSiteBandwidthCard .router-site-bandwidth-chart-frame {
  margin-top: 10px;
  padding: 12px 8px 6px;
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.6) 0%, rgba(243, 249, 255, 0.4) 100%);
  border: 1px solid var(--line-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

html[data-theme="dark"] body[data-page="routers"] #routerSiteBandwidthCard .router-site-bandwidth-chart-frame {
  background: linear-gradient(180deg, rgba(8, 15, 26, 0.4) 0%, rgba(6, 12, 21, 0.3) 100%);
  border-color: var(--line-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

body[data-page="routers"] #routerSiteBandwidthCard .iface-chart {
  height: 268px;
  color: var(--muted);
}

body[data-page="routers"] #routerSiteBandwidthCard .iface-chart .axis-label {
  fill: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

html[data-theme="dark"] body[data-page="routers"] #routerSiteBandwidthCard .iface-chart .axis-label {
  fill: var(--muted);
}

/* Legend polish */
body[data-page="routers"] #routerSiteBandwidthCard .iface-chart-legend {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line-soft);
  max-height: none;
  gap: 8px;
}

body[data-page="routers"] #routerSiteBandwidthCard .iface-chart-legend-item {
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--line-soft);
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--ink);
  box-shadow: var(--shadow-xs);
  transition: transform var(--t-fast), box-shadow var(--t-base), border-color var(--t-base);
}

body[data-page="routers"] #routerSiteBandwidthCard .iface-chart-legend-item:hover {
  border-color: var(--brand);
}

body[data-page="routers"] #routerSiteBandwidthCard .iface-chart-legend-swatch {
  width: 9px;
  height: 9px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.7);
}

body[data-page="routers"] #routerSiteBandwidthCard .iface-chart-legend-value {
  color: var(--ink-strong);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

html[data-theme="dark"] body[data-page="routers"] #routerSiteBandwidthCard .iface-chart-legend-item {
  background: rgba(20, 36, 54, 0.6);
  border-color: var(--line);
  color: var(--ink);
}

html[data-theme="dark"] body[data-page="routers"] #routerSiteBandwidthCard .iface-chart-legend-swatch {
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.4);
}

/* ── Unified primary + fleet card ── */
body[data-page="routers"] .router-fleet-unified .router-fleet-table-block {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

body[data-page="routers"] .router-fleet-unified .router-fleet-subhead {
  margin-bottom: 10px;
}

body[data-page="routers"] .router-fleet-unified .router-fleet-subhead .router-unifi-panel-kicker {
  display: block;
  margin-bottom: 2px;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 800;
}

body[data-page="routers"] .router-fleet-unified .router-fleet-subhead h4 {
  margin: 0 0 4px;
  font-size: 1rem;
  color: var(--ink-strong);
}

body[data-page="routers"] .router-fleet-unified .router-fleet-subhead p {
  margin: 0;
}

/* ── Detail view: full-width card overrides ── */
body[data-page="routers"] .router-detail-view {
  padding: 0;
  overflow: visible;
}

/* ── Detail header: identity + KPIs + actions ── */
body[data-page="routers"] .router-detail-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--grad-subtle);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  max-width: 100%;
}

body[data-page="routers"] .router-detail-header > .router-detail-header-identity {
  flex: 0 1 auto;
  min-width: 0;
}

body[data-page="routers"] .router-detail-header > .router-detail-header-kpis {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
}

body[data-page="routers"] .router-detail-header > .router-detail-action-wrap {
  flex: 0 0 auto;
  margin-left: auto;
}

html[data-theme="dark"] body[data-page="routers"] .router-detail-header {
  background: linear-gradient(180deg, rgba(15, 27, 42, 0.98) 0%, rgba(9, 18, 30, 0.98) 100%);
  border-bottom-color: var(--product-line);
}

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

body[data-page="routers"] .router-detail-header-identity .router-section-kicker {
  margin: 0 0 2px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

body[data-page="routers"] .router-detail-header-identity h2 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--ink-strong);
}

body[data-page="routers"] .router-detail-header-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}

body[data-page="routers"] .router-detail-header-kpis .stat-card,
body[data-page="routers"] .router-detail-header-kpis .router-monitor-card {
  flex: 0 1 auto;
  min-width: 80px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-soft);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-xs);
}

body[data-page="routers"] .router-detail-header-kpis .stat-card p,
body[data-page="routers"] .router-detail-header-kpis .stat-card > p {
  font-size: 0.66rem;
  margin: 0 0 2px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

body[data-page="routers"] .router-detail-header-kpis .stat-card strong {
  font-size: 0.9rem;
  letter-spacing: -0.01em;
}

/* (responsive grid template removed — flex-wrap handles narrow widths now) */

/* ── Horizontal tab strip (replaces sidebar nav) ── */
body[data-page="routers"] .router-detail-tabs {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 2px;
  padding: 0 16px;
  min-height: 44px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg-soft);
  overflow-x: auto;
  scrollbar-width: none;
}

body[data-page="routers"] .router-detail-tabs::-webkit-scrollbar {
  display: none;
}

body[data-page="routers"] .router-detail-tabs .secondary {
  flex-shrink: 0;
  min-height: 34px;
  padding: 6px 12px;
  font-size: 0.78rem;
  border-radius: 999px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
  transition: color var(--t-fast), background var(--t-fast), border-color var(--t-fast);
  transform: none !important;
}

body[data-page="routers"] .router-detail-tabs .secondary:hover {
  background: var(--bg-elevated);
  color: var(--ink);
  border-color: var(--line-soft);
  box-shadow: none;
  transform: none !important;
}

body[data-page="routers"] .router-detail-tabs .secondary.is-active {
  background: var(--bg-elevated);
  color: var(--brand);
  border-color: var(--line);
  box-shadow: var(--shadow-xs);
}

html[data-theme="dark"] body[data-page="routers"] .router-detail-tabs {
  background: rgba(10, 18, 30, 0.6);
  border-bottom-color: var(--product-line);
}

html[data-theme="dark"] body[data-page="routers"] .router-detail-tabs .secondary {
  color: var(--product-muted);
}

html[data-theme="dark"] body[data-page="routers"] .router-detail-tabs .secondary:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--product-ink);
}

html[data-theme="dark"] body[data-page="routers"] .router-detail-tabs .secondary.is-active {
  background: rgba(82, 180, 255, 0.1);
  color: var(--brand);
  border-color: var(--product-line);
}

/* ── Detail content area ── */
body[data-page="routers"] .router-detail-content {
  padding: 18px 20px;
  display: grid;
  gap: 16px;
  min-width: 0;
  max-width: 100%;
}

/* ── Overflow safety net for routers page sub-blocks ── */
body[data-page="routers"] .router-site-shell,
body[data-page="routers"] .router-site-layout,
body[data-page="routers"] #routerListSection,
body[data-page="routers"] #routerMonitorSection {
  min-width: 0;
  max-width: 100%;
}

body[data-page="routers"] .router-detail-content > section,
body[data-page="routers"] .router-detail-content > div {
  min-width: 0;
  max-width: 100%;
}

body[data-page="routers"] .router-fleet-grid > section,
body[data-page="routers"] .router-site-traffic-grid > section {
  min-width: 0;
  max-width: 100%;
}

/* ── Safety: old sidebar layout neutralised ── */
body[data-page="routers"] .router-detail-shell {
  display: contents;
}

body[data-page="routers"] .router-detail-nav.is-sidebar {
  display: none;
}

/* ── Fleet KPI grid inside new layout ── */
body[data-page="routers"] .router-fleet-kpi-grid {
  margin-bottom: 14px;
}

/* ═══════════════════════════════════════════════════════════════
   MULTI-PAGE POLISH — patterns reused across backoffice views
   ═══════════════════════════════════════════════════════════════ */

/* ── Summary cards inside hero (users, companies) ── */
.user-summary-card,
.company-summary-card {
  position: relative;
  overflow: hidden;
  transition: transform var(--t-base), background var(--t-base), border-color var(--t-base), box-shadow var(--t-base);
}

.user-summary-card::after,
.company-summary-card::after {
  content: "";
  position: absolute;
  inset: auto auto 0 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, rgba(255,255,255,0.55) 0%, rgba(255,255,255,0.05) 100%);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--t-base);
}

.user-summary-card:hover,
.company-summary-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 28px rgba(4, 18, 30, 0.22);
}

.user-summary-card:hover::after,
.company-summary-card:hover::after {
  opacity: 1;
}

.user-summary-card strong,
.company-summary-card strong {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* ── Pagination polish (used in audit log, dhcp, security tables) ── */
.dhcp-pagination {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-soft);
  background: var(--grad-subtle);
}

.dhcp-pagination-meta {
  font-size: 0.8rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.dhcp-pagination-actions .secondary {
  min-height: 30px;
  padding: 4px 10px;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
}

.dhcp-pagination-actions .secondary[disabled],
.dhcp-pagination-actions .secondary[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

html[data-theme="dark"] .dhcp-pagination {
  background: rgba(20, 36, 54, 0.4);
  border-color: var(--line-soft);
}

/* ── Workspace sidebar refinement ── */
body[data-page] .workspace-sidebar-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(15, 109, 168, 0.08);
  color: var(--brand);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  width: fit-content;
}

html[data-theme="dark"] body[data-page] .workspace-sidebar-kicker {
  background: rgba(82, 180, 255, 0.14);
  color: var(--brand);
}

body[data-page] .workspace-sidebar-panel {
  transition: border-color var(--t-base), box-shadow var(--t-base);
}

body[data-page] .workspace-sidebar-panel:hover {
  border-color: var(--brand-soft);
  box-shadow: 0 6px 16px rgba(15, 37, 60, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

body[data-page] .workspace-sidebar-chip {
  border: 1px solid transparent;
  transition: border-color var(--t-base), background var(--t-base), color var(--t-base);
}

body[data-page] .workspace-sidebar-chip:hover {
  border-color: var(--brand-soft);
  background: var(--brand-soft);
  color: var(--brand-strong);
}

html[data-theme="dark"] body[data-page] .workspace-sidebar-chip:hover {
  border-color: rgba(82, 180, 255, 0.28);
  background: rgba(82, 180, 255, 0.16);
  color: var(--brand);
}

/* ── Audit/log/release/ops health page tables: refined empty states ── */
body[data-page="logs"] .audit-log-table tbody:empty::before,
body[data-page="releases"] tbody:empty::before,
body[data-page="ops-health"] tbody:empty::before {
  content: "Sem registros para exibir.";
  display: block;
  padding: 32px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 0.86rem;
  font-style: italic;
}

/* ── Form labels refinement (used everywhere with inputs) ── */
body[data-page="users"] form label,
body[data-page="companies"] form label,
body[data-page="routers-manage"] form label {
  display: grid;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-transform: uppercase;
}

body[data-page="users"] form label input,
body[data-page="users"] form label select,
body[data-page="users"] form label textarea,
body[data-page="companies"] form label input,
body[data-page="companies"] form label select,
body[data-page="companies"] form label textarea,
body[data-page="routers-manage"] form label input,
body[data-page="routers-manage"] form label select,
body[data-page="routers-manage"] form label textarea {
  text-transform: none;
  font-size: 0.9rem;
  font-weight: normal;
  letter-spacing: normal;
  color: var(--ink-strong);
}

/* ── Inline checkbox labels ── */
.checkbox-inline {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem !important;
  font-weight: 600 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  color: var(--ink) !important;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-soft);
  background: var(--bg-soft);
  transition: border-color var(--t-base), background var(--t-base);
}

.checkbox-inline:hover {
  border-color: var(--brand-soft);
  background: var(--brand-soft);
}

.checkbox-inline input[type="checkbox"] {
  width: auto !important;
  min-height: 0;
  margin: 0;
  accent-color: var(--brand);
  cursor: pointer;
}

/* ── Iface row hover (used on detail page) ── */
.iface-row {
  transition: border-color var(--t-base), box-shadow var(--t-base), transform var(--t-base);
}

.iface-row:hover {
  border-color: var(--brand-soft);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

html[data-theme="dark"] .iface-row {
  background: rgba(20, 36, 54, 0.4);
}

/* ── Generic empty-state utility ── */
.empty-state {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 36px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
  border: 1px dashed var(--line-soft);
  border-radius: var(--radius-md);
  background: var(--bg-soft);
}

.empty-state strong {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
}

/* ── Releases page: timeline-ish polish ── */
body[data-page="releases"] .release-summary-card {
  position: relative;
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
}

body[data-page="releases"] .release-summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(4, 18, 30, 0.22);
  border-color: rgba(255, 255, 255, 0.32);
}

/* ── Ops Health: status lights pulse ── */
body[data-page="ops-health"] .pill.is-ok::before,
body[data-page="ops-health"] .pill.is-warn::before,
body[data-page="ops-health"] .pill.is-danger::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 4px;
}

body[data-page="ops-health"] .pill.is-ok::before {
  background: var(--status-ok);
  box-shadow: 0 0 0 0 rgba(10, 148, 112, 0.5);
  animation: bvOpsHealthPulse 2.4s infinite;
}

body[data-page="ops-health"] .pill.is-warn::before {
  background: var(--status-warn);
}

body[data-page="ops-health"] .pill.is-danger::before {
  background: var(--status-danger);
}

@keyframes bvOpsHealthPulse {
  0%   { box-shadow: 0 0 0 0 rgba(10, 148, 112, 0.5); }
  70%  { box-shadow: 0 0 0 6px rgba(10, 148, 112, 0); }
  100% { box-shadow: 0 0 0 0 rgba(10, 148, 112, 0); }
}

/* ── Sidebar logo block soft elevation ── */
.sidebar-top-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 12px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-soft);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--t-base);
}

.sidebar-top-logo:hover {
  box-shadow: var(--shadow-sm);
}

.sidebar-top-logo .brand-logo {
  max-width: 100%;
  max-height: 44px;
  width: auto;
  height: auto;
  filter: drop-shadow(0 2px 4px rgba(15, 37, 60, 0.15));
}

html[data-theme="dark"] .sidebar-top-logo {
  background: rgba(16, 30, 46, 0.7);
  border-color: var(--line);
}

/* ═══════════════════════════════════════════════════════════════
   DASHBOARD V2 — full-width main area, console folded into hero
   ═══════════════════════════════════════════════════════════════ */

/* Single-column shell (eliminates the 292px sidebar column) */
body[data-page="dashboard"] .dashboard-shell.dashboard-v2-shell {
  grid-template-columns: minmax(0, 1fr);
  width: min(1620px, calc(100% - 24px));
}

body[data-page="dashboard"] .dashboard-v2-layout {
  display: grid;
  gap: 16px;
  align-items: start;
}

/* ── Hero band: 2-col grid + radar strip ── */
body[data-page="dashboard"] .dashboard-v2-hero {
  position: relative;
  overflow: hidden;
  padding: 26px 26px 22px;
  border: 1px solid #c9def0;
  background:
    radial-gradient(720px 320px at 105% -10%, rgba(15, 109, 168, 0.18), transparent 60%),
    radial-gradient(560px 280px at -8% 110%, rgba(10, 148, 112, 0.12), transparent 65%),
    linear-gradient(180deg, #ffffff 0%, #eef6fc 100%);
  box-shadow: var(--shadow-md);
}

html[data-theme="dark"] body[data-page="dashboard"] .dashboard-v2-hero {
  border-color: var(--line);
  background:
    radial-gradient(720px 320px at 105% -10%, rgba(82, 180, 255, 0.18), transparent 60%),
    radial-gradient(560px 280px at -8% 110%, rgba(67, 207, 170, 0.10), transparent 65%),
    linear-gradient(180deg, rgba(15, 27, 42, 0.98) 0%, rgba(9, 18, 30, 0.98) 100%);
}

body[data-page="dashboard"] .dashboard-v2-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
}

@media (max-width: 1100px) {
  body[data-page="dashboard"] .dashboard-v2-hero-grid {
    grid-template-columns: 1fr;
  }
}

body[data-page="dashboard"] .dashboard-v2-hero-identity {
  display: grid;
  align-content: start;
  gap: 14px;
}

body[data-page="dashboard"] .dashboard-v2-hero-identity h1 {
  margin: 6px 0 4px;
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--ink-strong);
}

body[data-page="dashboard"] .dashboard-v2-hero-identity .welcome:empty {
  display: none;
}

body[data-page="dashboard"] .dashboard-v2-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.6);
}

html[data-theme="dark"] body[data-page="dashboard"] .dashboard-v2-hero-meta {
  background: rgba(20, 36, 54, 0.4);
}

body[data-page="dashboard"] .dashboard-v2-hero-meta p {
  margin: 0;
  flex: 1 1 240px;
  min-width: 0;
}

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

/* ── Console panel inside hero ── */
body[data-page="dashboard"] .dashboard-v2-console {
  display: grid;
  gap: 14px;
  padding: 18px 18px 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

body[data-page="dashboard"] .dashboard-v2-console::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand) 0%, var(--accent) 100%);
}

html[data-theme="dark"] body[data-page="dashboard"] .dashboard-v2-console {
  background: rgba(20, 36, 54, 0.6);
  border-color: var(--line);
}

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

body[data-page="dashboard"] .dashboard-v2-console-head strong {
  display: block;
  margin-top: 4px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink-strong);
}

body[data-page="dashboard"] .dashboard-v2-console .dashboard-console-detail {
  margin: 0;
  font-size: 0.86rem;
}

body[data-page="dashboard"] .dashboard-v2-console-metrics {
  display: grid;
  gap: 10px;
}

body[data-page="dashboard"] .dashboard-v2-console-metrics .dashboard-console-metric {
  display: grid;
  gap: 4px;
}

body[data-page="dashboard"] .dashboard-v2-console-metrics .dashboard-console-metric-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 700;
}

body[data-page="dashboard"] .dashboard-v2-console-metrics .dashboard-console-metric-head strong {
  font-size: 0.94rem;
  color: var(--ink-strong);
  font-variant-numeric: tabular-nums;
}

body[data-page="dashboard"] .dashboard-v2-console-metrics .dashboard-console-progress {
  position: relative;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(15, 109, 168, 0.08);
  overflow: hidden;
}

body[data-page="dashboard"] .dashboard-v2-console-metrics .dashboard-console-progress > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--grad-brand);
  transition: width var(--t-slow);
}

body[data-page="dashboard"] .dashboard-v2-console-metrics .dashboard-console-metric small {
  font-size: 0.72rem;
  color: var(--muted-soft);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
}

body[data-page="dashboard"] .dashboard-v2-console-live {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-soft);
  background: var(--grad-subtle);
  display: grid;
  gap: 6px;
}

body[data-page="dashboard"] .dashboard-v2-console-live-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

body[data-page="dashboard"] .dashboard-v2-console-live .dashboard-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(186, 51, 72, 0.12);
  color: var(--danger);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body[data-page="dashboard"] .dashboard-v2-console-live .dashboard-live-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 0 rgba(186, 51, 72, 0.5);
  animation: bvLivePulse 1.6s infinite;
}

@keyframes bvLivePulse {
  0%   { box-shadow: 0 0 0 0 rgba(186, 51, 72, 0.55); }
  70%  { box-shadow: 0 0 0 6px rgba(186, 51, 72, 0); }
  100% { box-shadow: 0 0 0 0 rgba(186, 51, 72, 0); }
}

body[data-page="dashboard"] .dashboard-v2-console-live .dashboard-console-live-meta-chip {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

body[data-page="dashboard"] .dashboard-v2-console-live .dashboard-console-live-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink-strong);
}

body[data-page="dashboard"] .dashboard-v2-console-live .dashboard-console-live-meta {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ── Radar strip below hero grid ── */
body[data-page="dashboard"] .dashboard-v2-radar-strip {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 720px) {
  body[data-page="dashboard"] .dashboard-v2-radar-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

body[data-page="dashboard"] .dashboard-v2-radar-item {
  position: relative;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
  overflow: hidden;
}

body[data-page="dashboard"] .dashboard-v2-radar-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--brand);
  opacity: 0.7;
}

body[data-page="dashboard"] .dashboard-v2-radar-item:hover {
  transform: translateY(-2px);
  border-color: var(--brand-soft);
  box-shadow: var(--shadow-sm);
}

body[data-page="dashboard"] .dashboard-v2-radar-item span {
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

body[data-page="dashboard"] .dashboard-v2-radar-item strong {
  display: block;
  font-size: 1.32rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--ink-strong);
  font-variant-numeric: tabular-nums;
}

html[data-theme="dark"] body[data-page="dashboard"] .dashboard-v2-radar-item {
  background: rgba(20, 36, 54, 0.5);
  border-color: var(--line);
}

body[data-page="dashboard"] .dashboard-v2-radar-meta {
  margin: 12px 0 0;
  font-size: 0.82rem;
}

/* ── Focus grid (turn + pulse) — better proportion ── */
body[data-page="dashboard"] .dashboard-v2-focus-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

@media (max-width: 1100px) {
  body[data-page="dashboard"] .dashboard-v2-focus-grid {
    grid-template-columns: 1fr;
  }
}

body[data-page="dashboard"] .dashboard-v2-drilldown-lane {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

/* ── Traffic grid (clients + destinations) ── */
body[data-page="dashboard"] .dashboard-v2-traffic-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

@media (max-width: 1100px) {
  body[data-page="dashboard"] .dashboard-v2-traffic-grid {
    grid-template-columns: 1fr;
  }
}

/* ── KPI card on dashboard refinement ── */
body[data-page="dashboard"] .dashboard-v2-kpi-card .stats-grid {
  margin-top: 4px;
}

/* ── Chart card refinement ── */
body[data-page="dashboard"] .dashboard-unifi-chart-card {
  position: relative;
  overflow: hidden;
}

body[data-page="dashboard"] .dashboard-unifi-chart-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand) 0%, #1395c8 50%, var(--accent) 100%);
}

body[data-page="dashboard"] .dashboard-unifi-chart-frame {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: var(--grad-subtle);
}

html[data-theme="dark"] body[data-page="dashboard"] .dashboard-unifi-chart-frame {
  background: rgba(20, 36, 54, 0.4);
  border-color: var(--line-soft);
}

body[data-page="dashboard"] .dashboard-unifi-chart-meta span {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

/* ── Table card refinement ── */
body[data-page="dashboard"] .dashboard-unifi-table-card {
  position: relative;
  overflow: hidden;
}

body[data-page="dashboard"] .dashboard-unifi-table-wrap {
  margin-top: 4px;
}


/* ═══════════════════════════════════════════════════════════════
   DASHBOARD V2 — sub-block polish (turn lanes, pulse, donut, chart)
   ═══════════════════════════════════════════════════════════════ */

/* ── Turn lanes: card-style with column accent ── */
body[data-page="dashboard"] .dashboard-turn-card {
  position: relative;
  overflow: hidden;
}

body[data-page="dashboard"] .dashboard-turn-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand) 0%, var(--accent) 100%);
}

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

@media (max-width: 720px) {
  body[data-page="dashboard"] .dashboard-turn-grid {
    grid-template-columns: 1fr;
  }
}

body[data-page="dashboard"] .dashboard-turn-lane {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: var(--bg-soft);
}

body[data-page="dashboard"] .dashboard-turn-lane-head h3 {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand);
}

html[data-theme="dark"] body[data-page="dashboard"] .dashboard-turn-lane {
  background: rgba(20, 36, 54, 0.4);
  border-color: var(--line-soft);
}

/* Turn list items: refined shadow, hover */
body[data-page="dashboard"] .dashboard-turn-list-item {
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
  background: var(--bg-elevated);
  border-color: var(--line-soft);
  border-radius: var(--radius-md);
  padding: 12px;
  position: relative;
}

body[data-page="dashboard"] .dashboard-turn-list-item:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  border-color: var(--brand-soft);
}

body[data-page="dashboard"] .dashboard-turn-list-item.is-ok {
  border-left: 3px solid var(--status-ok);
  padding-left: 14px;
}

body[data-page="dashboard"] .dashboard-turn-list-item.is-warn {
  border-left: 3px solid var(--status-warn);
  padding-left: 14px;
}

body[data-page="dashboard"] .dashboard-turn-list-item.is-danger {
  border-left: 3px solid var(--status-danger);
  padding-left: 14px;
}

body[data-page="dashboard"] .dashboard-turn-list-item strong {
  font-size: 0.94rem;
  color: var(--ink-strong);
}

body[data-page="dashboard"] .dashboard-turn-list-item p,
body[data-page="dashboard"] .dashboard-turn-list-item small {
  color: var(--muted);
}

html[data-theme="dark"] body[data-page="dashboard"] .dashboard-turn-list-item {
  background: rgba(20, 36, 54, 0.6);
  border-color: var(--line);
}

/* Turn trend cards */
body[data-page="dashboard"] .dashboard-turn-trend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

body[data-page="dashboard"] .dashboard-turn-trend-card {
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: var(--grad-subtle);
  display: grid;
  gap: 4px;
  transition: border-color var(--t-base), box-shadow var(--t-base);
}

body[data-page="dashboard"] .dashboard-turn-trend-card:not(.is-empty):hover {
  border-color: var(--brand-soft);
  box-shadow: var(--shadow-xs);
}

body[data-page="dashboard"] .dashboard-turn-trend-card span {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

body[data-page="dashboard"] .dashboard-turn-trend-card strong {
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink-strong);
  font-variant-numeric: tabular-nums;
}

body[data-page="dashboard"] .dashboard-turn-trend-card small {
  font-size: 0.78rem;
  color: var(--muted);
}

/* Drill-down list: action chips */
body[data-page="dashboard"] .dashboard-turn-drilldown-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body[data-page="dashboard"] .dashboard-turn-drilldown-list a.secondary {
  min-height: 36px;
  padding: 7px 14px;
  font-size: 0.82rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  color: var(--ink);
  box-shadow: var(--shadow-xs);
  transition: transform var(--t-fast), border-color var(--t-base), box-shadow var(--t-base);
}

body[data-page="dashboard"] .dashboard-turn-drilldown-list a.secondary:hover {
  transform: translateY(-1px);
  border-color: var(--brand);
  box-shadow: var(--shadow-sm);
}

body[data-page="dashboard"] .dashboard-turn-drilldown-list a.secondary.is-primary {
  background: var(--brand-soft);
  color: var(--brand-strong);
  border-color: var(--brand);
}

/* ── Pulse card: signal bar + timeline polish ── */
body[data-page="dashboard"] .dashboard-pulse-card {
  position: relative;
  overflow: hidden;
}

body[data-page="dashboard"] .dashboard-pulse-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--warn) 100%);
}

body[data-page="dashboard"] .dashboard-signal-bar {
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  margin-bottom: 14px;
}

body[data-page="dashboard"] .dashboard-signal-chip {
  min-height: 30px;
  padding: 4px 11px;
  font-size: 0.74rem;
  border-radius: 999px;
  position: relative;
  font-variant-numeric: tabular-nums;
}

body[data-page="dashboard"] .dashboard-signal-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  background: currentColor;
  opacity: 0.7;
}

body[data-page="dashboard"] .dashboard-signal-chip.is-ok::before {
  animation: bvOpsHealthPulse 2.4s infinite;
}

html[data-theme="dark"] body[data-page="dashboard"] .dashboard-signal-bar {
  background: rgba(20, 36, 54, 0.4);
  border-color: var(--line-soft);
}

/* Pulse list: timeline-style cards */
body[data-page="dashboard"] .dashboard-pulse-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

body[data-page="dashboard"] .dashboard-pulse-item {
  position: relative;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-xs);
  min-height: 0;
  transition: border-color var(--t-base), box-shadow var(--t-base);
}

body[data-page="dashboard"] .dashboard-pulse-item:hover {
  border-color: var(--brand-soft);
  box-shadow: var(--shadow-sm);
}

body[data-page="dashboard"] .dashboard-pulse-item.is-ok {
  border-left: 3px solid var(--status-ok);
}

body[data-page="dashboard"] .dashboard-pulse-item.is-warn {
  border-left: 3px solid var(--status-warn);
}

body[data-page="dashboard"] .dashboard-pulse-item.is-danger {
  border-left: 3px solid var(--status-danger);
}

body[data-page="dashboard"] .dashboard-pulse-item.is-empty {
  text-align: center;
  padding: 28px 16px;
  font-style: italic;
  color: var(--muted);
  border-style: dashed;
  background: var(--bg-soft);
}

body[data-page="dashboard"] .dashboard-pulse-item.is-empty strong {
  display: block;
  font-style: normal;
  font-size: 0.94rem;
  margin-bottom: 4px;
  color: var(--ink);
}

body[data-page="dashboard"] .dashboard-pulse-item strong {
  font-size: 0.94rem;
  color: var(--ink-strong);
}

body[data-page="dashboard"] .dashboard-pulse-item p,
body[data-page="dashboard"] .dashboard-pulse-item small {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

html[data-theme="dark"] body[data-page="dashboard"] .dashboard-pulse-item {
  background: rgba(20, 36, 54, 0.6);
  border-color: var(--line);
}

/* ── Donut: refined ring + center text ── */
body[data-page="dashboard"] .dashboard-donut {
  width: 152px;
  height: 152px;
  border: 0;
  background:
    conic-gradient(
      var(--donut-accent, var(--brand)) calc(var(--donut-value, 0) * 1%),
      var(--donut-track, var(--line-soft)) 0
    );
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.85),
    0 12px 28px rgba(15, 23, 42, 0.10);
  flex-shrink: 0;
}

body[data-page="dashboard"] .dashboard-donut::before {
  inset: 14px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.95), rgba(248, 251, 254, 0.85));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -8px 20px rgba(15, 37, 60, 0.04);
}

body[data-page="dashboard"] .dashboard-donut strong {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--ink-strong);
  font-variant-numeric: tabular-nums;
}

body[data-page="dashboard"] .dashboard-donut span {
  transform: translateY(24px);
  font-size: 0.66rem;
  color: var(--muted);
}

body[data-page="dashboard"] .dashboard-donut--secondary {
  --donut-accent: var(--accent);
  --donut-track: rgba(10, 148, 112, 0.12);
}

html[data-theme="dark"] body[data-page="dashboard"] .dashboard-donut {
  --donut-track: rgba(82, 180, 255, 0.12);
  box-shadow:
    inset 0 0 0 1px rgba(82, 180, 255, 0.16),
    0 12px 28px rgba(0, 0, 0, 0.34);
}

html[data-theme="dark"] body[data-page="dashboard"] .dashboard-donut::before {
  background:
    radial-gradient(circle at 30% 30%, rgba(20, 36, 54, 0.95), rgba(10, 22, 36, 0.95));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] body[data-page="dashboard"] .dashboard-donut--secondary {
  --donut-track: rgba(67, 207, 170, 0.14);
}

/* Clients breakdown items: hover + accent */
body[data-page="dashboard"] .dashboard-unifi-client-breakdown {
  position: relative;
  overflow: hidden;
  transition: transform var(--t-base), border-color var(--t-base), box-shadow var(--t-base);
}

body[data-page="dashboard"] .dashboard-unifi-client-breakdown::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: var(--brand);
  opacity: 0.6;
}

body[data-page="dashboard"] .dashboard-unifi-client-breakdown:nth-child(2)::before {
  background: var(--muted);
  opacity: 0.4;
}

body[data-page="dashboard"] .dashboard-unifi-client-breakdown:nth-child(3)::before {
  background: var(--warn);
}

body[data-page="dashboard"] .dashboard-unifi-client-breakdown:hover {
  transform: translateX(2px);
  border-color: var(--brand-soft);
  box-shadow: var(--shadow-xs);
}

body[data-page="dashboard"] .dashboard-unifi-client-breakdown strong {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

html[data-theme="dark"] body[data-page="dashboard"] .dashboard-unifi-client-breakdown {
  background: rgba(20, 36, 54, 0.5);
  border-color: var(--line);
}

/* ── MikroTik ports chart: brand-aligned colors + better grid ── */
body[data-page="dashboard"] #dashboardExperienceChart .grid {
  stroke: var(--line-soft);
  stroke-width: 1;
  stroke-dasharray: 3 5;
  opacity: 0.7;
}

body[data-page="dashboard"] #dashboardExperienceChart .axis {
  stroke: var(--line);
  stroke-width: 1;
}

body[data-page="dashboard"] #dashboardExperienceChart .axis-label {
  fill: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

body[data-page="dashboard"] #dashboardExperienceChart .port-track {
  fill: var(--bg-sunken);
  rx: 4;
}

body[data-page="dashboard"] #dashboardExperienceChart .port-rx {
  fill: #1e90d8;
}

body[data-page="dashboard"] #dashboardExperienceChart .port-tx {
  fill: #0fae84;
}

body[data-page="dashboard"] #dashboardExperienceChart .port-label {
  fill: var(--ink-strong);
  font-size: 12px;
  font-weight: 700;
}

body[data-page="dashboard"] #dashboardExperienceChart .port-subtitle {
  fill: var(--muted);
  font-size: 10px;
}

body[data-page="dashboard"] #dashboardExperienceChart .port-value {
  fill: var(--ink-strong);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

body[data-page="dashboard"] #dashboardExperienceChart .port-legend {
  fill: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

html[data-theme="dark"] body[data-page="dashboard"] #dashboardExperienceChart .port-track {
  fill: rgba(82, 180, 255, 0.06);
}

/* ── Top destinations / clients list (table-row style) ── */
body[data-page="dashboard"] .dashboard-unifi-clients-list {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

body[data-page="dashboard"] .dashboard-unifi-site-empty {
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--line-soft);
  background: var(--bg-soft);
  text-align: center;
  color: var(--muted);
}

body[data-page="dashboard"] .dashboard-unifi-site-empty strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
}

/* ── Fleet table polish ── */
body[data-page="dashboard"] .dashboard-unifi-table {
  font-size: 0.86rem;
}

body[data-page="dashboard"] .dashboard-unifi-table th {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

body[data-page="dashboard"] .dashboard-unifi-table tbody tr {
  cursor: default;
  transition: background var(--t-fast);
}

body[data-page="dashboard"] .dashboard-unifi-table tbody td {
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}

body[data-page="dashboard"] .dashboard-unifi-table tbody td:first-child {
  font-weight: 700;
  color: var(--ink-strong);
  font-variant-numeric: normal;
}

/* SLO grid card hover */
body[data-page="dashboard"] .dashboard-slo-grid .dashboard-kpi-card {
  transition: transform var(--t-base), border-color var(--t-base), box-shadow var(--t-base);
}

body[data-page="dashboard"] .dashboard-slo-grid .dashboard-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-soft);
}


/* ═══════════════════════════════════════════════════════════════
   RAIL V2 — modernized side navigation
   ═══════════════════════════════════════════════════════════════ */

/* Background: gradient + soft brand glow */
body.dashboard-body[data-page] .unifi-rail {
  width: 64px;
  padding: 14px 0 12px;
  border-right: 1px solid var(--line-soft);
  background:
    radial-gradient(180px 320px at 50% -40px, rgba(15, 109, 168, 0.10), transparent 65%),
    linear-gradient(180deg, rgba(252, 254, 255, 0.96) 0%, rgba(244, 248, 252, 0.96) 100%);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.7), 4px 0 16px rgba(15, 37, 60, 0.04);
  transition: width 220ms cubic-bezier(0.21, 0.7, 0.21, 1);
}

html[data-theme="dark"] body.dashboard-body[data-page] .unifi-rail {
  background:
    radial-gradient(180px 320px at 50% -40px, rgba(82, 180, 255, 0.16), transparent 65%),
    linear-gradient(180deg, rgba(8, 16, 28, 0.96) 0%, rgba(6, 12, 21, 0.96) 100%);
  border-right-color: rgba(82, 180, 255, 0.10);
  box-shadow: 1px 0 0 rgba(82, 180, 255, 0.05), 4px 0 16px rgba(0, 0, 0, 0.4);
}

/* Section dividers */
body.dashboard-body[data-page] .unifi-rail-group {
  padding: 0 10px;
  gap: 4px;
  position: relative;
}

body.dashboard-body[data-page] .unifi-rail-group + .unifi-rail-group::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 16px;
  right: 16px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-soft), transparent);
}

html[data-theme="dark"] body.dashboard-body[data-page] .unifi-rail-group + .unifi-rail-group::before {
  background: linear-gradient(90deg, transparent, rgba(82, 180, 255, 0.16), transparent);
}

/* Items: refined */
body.dashboard-body[data-page] .unifi-rail-item {
  position: relative;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 44px;
  height: 44px;
  margin: 0 auto;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-decoration: none;
  cursor: pointer;
  transition:
    width 220ms cubic-bezier(0.21, 0.7, 0.21, 1),
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

body.dashboard-body[data-page] .unifi-rail-item:hover {
  border-color: transparent;
  background: var(--brand-soft);
  color: var(--brand);
  transform: none;
}

body.dashboard-body[data-page] .unifi-rail-item:active {
  transform: scale(0.96);
}

html[data-theme="dark"] body.dashboard-body[data-page] .unifi-rail-item {
  color: var(--muted);
}

html[data-theme="dark"] body.dashboard-body[data-page] .unifi-rail-item:hover {
  background: rgba(82, 180, 255, 0.10);
  color: var(--brand);
}

/* Icons: animation on hover */
body.dashboard-body[data-page] .unifi-rail-icon {
  width: 20px;
  height: 20px;
  background: currentColor;
  opacity: 0.92;
  transition: transform 180ms ease, opacity 180ms ease;
}

body.dashboard-body[data-page] .unifi-rail-item:hover .unifi-rail-icon {
  opacity: 1;
  transform: scale(1.06);
}

/* Labels (visible only when expanded) */
body.dashboard-body[data-page] .unifi-rail-label {
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 200ms ease, transform 200ms ease;
}

/* ── Active state: floating pill with stronger presence ── */
body.dashboard-body[data-page="dashboard"] .unifi-rail-item[href$="/dashboard"],
body.dashboard-body[data-page="companies"] .unifi-rail-item[href$="/companies"],
body.dashboard-body[data-page="users"] .unifi-rail-item[href$="/users"],
body.dashboard-body[data-page="routers"] .unifi-rail-item[href$="/routers"],
body.dashboard-body[data-page="routers-manage"] .unifi-rail-item[href$="/routers/manage"],
body.dashboard-body[data-page="logs"] .unifi-rail-item[href$="/logs"],
body.dashboard-body[data-page="releases"] .unifi-rail-item[href$="/releases"],
body.dashboard-body[data-page="ops-health"] .unifi-rail-item[href$="/ops-health"] {
  background: linear-gradient(135deg, rgba(12, 104, 163, 0.14) 0%, rgba(12, 104, 163, 0.06) 100%);
  border-color: transparent;
  color: var(--brand);
  box-shadow:
    0 6px 16px rgba(12, 104, 163, 0.18),
    inset 0 0 0 1px rgba(12, 104, 163, 0.18);
}

body.dashboard-body[data-page="dashboard"] .unifi-rail-item[href$="/dashboard"]::after,
body.dashboard-body[data-page="companies"] .unifi-rail-item[href$="/companies"]::after,
body.dashboard-body[data-page="users"] .unifi-rail-item[href$="/users"]::after,
body.dashboard-body[data-page="routers"] .unifi-rail-item[href$="/routers"]::after,
body.dashboard-body[data-page="routers-manage"] .unifi-rail-item[href$="/routers/manage"]::after,
body.dashboard-body[data-page="logs"] .unifi-rail-item[href$="/logs"]::after,
body.dashboard-body[data-page="releases"] .unifi-rail-item[href$="/releases"]::after,
body.dashboard-body[data-page="ops-health"] .unifi-rail-item[href$="/ops-health"]::after {
  content: "";
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 24px;
  border-radius: 0 4px 4px 0;
  background: var(--grad-brand);
  box-shadow: 0 4px 8px rgba(12, 104, 163, 0.32);
}

body.dashboard-body[data-page="dashboard"] .unifi-rail-item[href$="/dashboard"] .unifi-rail-icon,
body.dashboard-body[data-page="companies"] .unifi-rail-item[href$="/companies"] .unifi-rail-icon,
body.dashboard-body[data-page="users"] .unifi-rail-item[href$="/users"] .unifi-rail-icon,
body.dashboard-body[data-page="routers"] .unifi-rail-item[href$="/routers"] .unifi-rail-icon,
body.dashboard-body[data-page="routers-manage"] .unifi-rail-item[href$="/routers/manage"] .unifi-rail-icon,
body.dashboard-body[data-page="logs"] .unifi-rail-item[href$="/logs"] .unifi-rail-icon,
body.dashboard-body[data-page="releases"] .unifi-rail-item[href$="/releases"] .unifi-rail-icon,
body.dashboard-body[data-page="ops-health"] .unifi-rail-item[href$="/ops-health"] .unifi-rail-icon {
  opacity: 1;
  transform: scale(1.05);
}

html[data-theme="dark"] body.dashboard-body[data-page="dashboard"] .unifi-rail-item[href$="/dashboard"],
html[data-theme="dark"] body.dashboard-body[data-page="companies"] .unifi-rail-item[href$="/companies"],
html[data-theme="dark"] body.dashboard-body[data-page="users"] .unifi-rail-item[href$="/users"],
html[data-theme="dark"] body.dashboard-body[data-page="routers"] .unifi-rail-item[href$="/routers"],
html[data-theme="dark"] body.dashboard-body[data-page="routers-manage"] .unifi-rail-item[href$="/routers/manage"],
html[data-theme="dark"] body.dashboard-body[data-page="logs"] .unifi-rail-item[href$="/logs"],
html[data-theme="dark"] body.dashboard-body[data-page="releases"] .unifi-rail-item[href$="/releases"],
html[data-theme="dark"] body.dashboard-body[data-page="ops-health"] .unifi-rail-item[href$="/ops-health"] {
  background: linear-gradient(135deg, rgba(82, 180, 255, 0.16) 0%, rgba(82, 180, 255, 0.06) 100%);
  border-color: transparent;
  color: var(--brand);
  box-shadow:
    0 6px 16px rgba(82, 180, 255, 0.20),
    inset 0 0 0 1px rgba(82, 180, 255, 0.22);
}

/* ── Floating label tooltip when rail is collapsed (hover only) ── */
body.dashboard-body[data-page]:not(.is-rail-expanded) .unifi-rail-item:hover::before {
  content: attr(aria-label);
  position: absolute;
  left: 56px;
  top: 50%;
  transform: translateY(-50%);
  z-index: calc(var(--z-dropdown) + 5);
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--ink-strong);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  animation: bvRailTooltipIn 180ms 80ms forwards;
}

@keyframes bvRailTooltipIn {
  from { opacity: 0; transform: translateY(-50%) translateX(-4px); }
  to   { opacity: 1; transform: translateY(-50%) translateX(0); }
}

html[data-theme="dark"] body.dashboard-body[data-page]:not(.is-rail-expanded) .unifi-rail-item:hover::before {
  background: rgba(20, 36, 54, 0.96);
  border-color: rgba(82, 180, 255, 0.18);
  color: var(--ink-strong);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
}

/* Suppress tooltip when expanded (label is visible inline) */
body.dashboard-body[data-page].is-rail-expanded .unifi-rail-item:hover::before {
  display: none;
}

/* ── Expanded mode: align icons left, labels visible ── */
body.dashboard-body[data-page].is-rail-expanded .unifi-rail {
  width: 220px;
}

body.dashboard-body[data-page].is-rail-expanded .unifi-rail-item {
  width: 196px;
  place-items: center start;
  padding: 0 14px;
}

body.dashboard-body[data-page].is-rail-expanded .unifi-rail-label {
  opacity: 1;
  transform: translateX(0);
}

/* When expanded, active item uses fuller styling */
body.dashboard-body[data-page="dashboard"].is-rail-expanded .unifi-rail-item[href$="/dashboard"]::after,
body.dashboard-body[data-page="companies"].is-rail-expanded .unifi-rail-item[href$="/companies"]::after,
body.dashboard-body[data-page="users"].is-rail-expanded .unifi-rail-item[href$="/users"]::after,
body.dashboard-body[data-page="routers"].is-rail-expanded .unifi-rail-item[href$="/routers"]::after,
body.dashboard-body[data-page="routers-manage"].is-rail-expanded .unifi-rail-item[href$="/routers/manage"]::after,
body.dashboard-body[data-page="logs"].is-rail-expanded .unifi-rail-item[href$="/logs"]::after,
body.dashboard-body[data-page="releases"].is-rail-expanded .unifi-rail-item[href$="/releases"]::after,
body.dashboard-body[data-page="ops-health"].is-rail-expanded .unifi-rail-item[href$="/ops-health"]::after {
  height: 28px;
}

body.dashboard-body[data-page].is-rail-expanded .dashboard-shell {
  margin-left: 220px;
}

/* ── Bottom group (logout): visually distinct ── */
body.dashboard-body[data-page] .unifi-rail-group.is-bottom .unifi-rail-item:hover {
  background: rgba(186, 51, 72, 0.10);
  color: var(--danger);
}

html[data-theme="dark"] body.dashboard-body[data-page] .unifi-rail-group.is-bottom .unifi-rail-item:hover {
  background: rgba(255, 106, 122, 0.14);
  color: var(--danger);
}

body.dashboard-body[data-page] .unifi-rail-group.is-bottom .unifi-rail-item:hover .unifi-rail-icon {
  transform: scale(1.06) translateX(2px);
}

/* ── Shell offset transition matches expand animation ── */
body.dashboard-body[data-page] .dashboard-shell {
  transition: margin-left 220ms cubic-bezier(0.21, 0.7, 0.21, 1);
}


/* ═══════════════════════════════════════════════════════════════
   DASHBOARD V3 — Network Operations Center layout
   ═══════════════════════════════════════════════════════════════ */

/* Single column shell (overrides v2) */
body[data-page="dashboard"] .dashboard-shell.dashboard-v3-shell {
  grid-template-columns: minmax(0, 1fr);
  width: min(1620px, calc(100% - 24px));
}

body[data-page="dashboard"] .dashboard-v3-layout {
  display: grid;
  gap: 14px;
  align-items: start;
}

/* ── STATUS BANNER ── */
body[data-page="dashboard"] .dashboard-v3-status {
  position: relative;
  overflow: hidden;
  padding: 24px 26px 18px;
  border: 1px solid #c4d8ed;
  background:
    radial-gradient(800px 380px at 100% -20%, rgba(15, 109, 168, 0.18), transparent 60%),
    radial-gradient(620px 300px at -10% 110%, rgba(10, 148, 112, 0.10), transparent 65%),
    linear-gradient(180deg, #ffffff 0%, #ebf4fb 100%);
  box-shadow: var(--shadow-md);
}

body[data-page="dashboard"] .dashboard-v3-status::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand) 0%, #1395c8 50%, var(--accent) 100%);
}

html[data-theme="dark"] body[data-page="dashboard"] .dashboard-v3-status {
  border-color: var(--line);
  background:
    radial-gradient(800px 380px at 100% -20%, rgba(82, 180, 255, 0.20), transparent 60%),
    radial-gradient(620px 300px at -10% 110%, rgba(67, 207, 170, 0.10), transparent 65%),
    linear-gradient(180deg, rgba(15, 27, 42, 0.98) 0%, rgba(9, 18, 30, 0.98) 100%);
}

body[data-page="dashboard"] .dashboard-v3-status-grid {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 18px;
  align-items: center;
}

@media (max-width: 1100px) {
  body[data-page="dashboard"] .dashboard-v3-status-grid {
    grid-template-columns: auto 1fr;
  }
}

/* Pulse ring (status indicator) */
body[data-page="dashboard"] .dashboard-v3-status-pulse {
  position: relative;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

body[data-page="dashboard"] .dashboard-v3-pulse-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, transparent 0%, transparent 55%, rgba(10, 148, 112, 0.22) 60%, rgba(10, 148, 112, 0.04) 80%, transparent 100%);
  animation: bvPulseRing 2.4s infinite ease-out;
}

body[data-page="dashboard"] .dashboard-v3-pulse-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow:
    0 0 0 4px rgba(10, 148, 112, 0.18),
    0 0 14px rgba(10, 148, 112, 0.55),
    inset 0 -2px 4px rgba(0, 0, 0, 0.18);
}

@keyframes bvPulseRing {
  0%   { transform: scale(0.7); opacity: 1; }
  100% { transform: scale(1.3); opacity: 0; }
}

body[data-page="dashboard"] .dashboard-v3-status-headline h1 {
  margin: 4px 0 6px;
  font-size: clamp(1.5rem, 2.2vw, 1.95rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--ink-strong);
}

body[data-page="dashboard"] .dashboard-v3-status-line {
  margin: 0;
  font-size: 0.94rem;
  color: var(--muted);
  line-height: 1.5;
}

body[data-page="dashboard"] .dashboard-v3-status-headline .welcome:empty {
  display: none;
}

body[data-page="dashboard"] .dashboard-v3-status-headline-stats {
  display: grid;
  gap: 6px;
  align-content: center;
  text-align: right;
}

body[data-page="dashboard"] .dashboard-v3-status-figure strong {
  display: block;
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: var(--ink-strong);
  font-variant-numeric: tabular-nums;
}

body[data-page="dashboard"] .dashboard-v3-status-figure span {
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}

body[data-page="dashboard"] .dashboard-v3-status-badge {
  justify-self: end;
}

body[data-page="dashboard"] .dashboard-v3-status-actions {
  display: grid;
  gap: 6px;
  justify-items: end;
  align-content: center;
}

body[data-page="dashboard"] .dashboard-v3-status-profile-line {
  margin: 0;
  font-size: 0.78rem;
  text-align: right;
  max-width: 260px;
}

body[data-page="dashboard"] .dashboard-v3-status-actions .dashboard-hero-links {
  margin: 4px 0 0;
}

@media (max-width: 1100px) {
  body[data-page="dashboard"] .dashboard-v3-status-headline-stats,
  body[data-page="dashboard"] .dashboard-v3-status-actions {
    grid-column: 1 / -1;
    text-align: left;
    justify-items: start;
  }
  body[data-page="dashboard"] .dashboard-v3-status-figure {
    text-align: left;
  }
  body[data-page="dashboard"] .dashboard-v3-status-profile-line {
    text-align: left;
  }
}

/* KPI strip inside banner */
body[data-page="dashboard"] .dashboard-v3-kpi-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}

@media (max-width: 1100px) {
  body[data-page="dashboard"] .dashboard-v3-kpi-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  body[data-page="dashboard"] .dashboard-v3-kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

body[data-page="dashboard"] .dashboard-v3-kpi {
  position: relative;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  display: grid;
  gap: 2px;
  transition: transform var(--t-base), border-color var(--t-base), box-shadow var(--t-base);
}

body[data-page="dashboard"] .dashboard-v3-kpi:hover {
  transform: translateY(-2px);
  border-color: var(--brand-soft);
  box-shadow: var(--shadow-sm);
}

body[data-page="dashboard"] .dashboard-v3-kpi.is-offline {
  border-color: rgba(186, 51, 72, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 232, 236, 0.8) 0%, var(--bg-elevated) 100%);
}

body[data-page="dashboard"] .dashboard-v3-kpi.is-offline strong {
  color: var(--danger);
}

body[data-page="dashboard"] .dashboard-v3-kpi-label {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

body[data-page="dashboard"] .dashboard-v3-kpi strong {
  font-size: 1.32rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--ink-strong);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

body[data-page="dashboard"] .dashboard-v3-kpi small {
  font-size: 0.66rem;
  color: var(--muted-soft);
  font-weight: 600;
}

html[data-theme="dark"] body[data-page="dashboard"] .dashboard-v3-kpi {
  background: rgba(20, 36, 54, 0.5);
  border-color: var(--line);
}

html[data-theme="dark"] body[data-page="dashboard"] .dashboard-v3-kpi.is-offline {
  background: rgba(255, 106, 122, 0.12);
}

body[data-page="dashboard"] .dashboard-v3-status-foot {
  margin: 14px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

/* ── FLEET DECK ── */
body[data-page="dashboard"] .dashboard-v3-fleet-deck {
  position: relative;
  overflow: hidden;
  padding: 20px 24px;
}

body[data-page="dashboard"] .dashboard-v3-fleet-deck::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand) 0%, var(--accent) 100%);
}

body[data-page="dashboard"] .dashboard-v3-fleet-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

body[data-page="dashboard"] .dashboard-v3-fleet-head h2 {
  margin: 4px 0 4px;
  font-size: 1.32rem;
  letter-spacing: -0.02em;
  color: var(--ink-strong);
}

body[data-page="dashboard"] .dashboard-v3-fleet-head .muted-line {
  margin: 0;
}

body[data-page="dashboard"] .dashboard-v3-fleet-wrap {
  border-radius: var(--radius-md);
  border: 1px solid var(--line-soft);
}

body[data-page="dashboard"] .dashboard-v3-fleet-table th {
  background: var(--bg-soft);
}

body[data-page="dashboard"] .dashboard-v3-fleet-table tbody tr {
  cursor: default;
  transition: background var(--t-fast);
}

body[data-page="dashboard"] .dashboard-v3-fleet-table tbody tr:hover td {
  background: var(--brand-soft);
}

body[data-page="dashboard"] .dashboard-v3-fleet-table td:first-child {
  font-weight: 700;
  color: var(--ink-strong);
}

/* ── OPS GRID — 3 columns ── */
body[data-page="dashboard"] .dashboard-v3-ops-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

@media (max-width: 1280px) {
  body[data-page="dashboard"] .dashboard-v3-ops-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  body[data-page="dashboard"] .dashboard-v3-attention {
    grid-column: 1 / -1;
  }
}

@media (max-width: 880px) {
  body[data-page="dashboard"] .dashboard-v3-ops-grid {
    grid-template-columns: 1fr;
  }
  body[data-page="dashboard"] .dashboard-v3-attention {
    grid-column: auto;
  }
}

/* Atencao card with collapsible blocks */
body[data-page="dashboard"] .dashboard-v3-attention {
  position: relative;
}

body[data-page="dashboard"] .dashboard-v3-attention-tabs {
  display: grid;
  gap: 8px;
}

body[data-page="dashboard"] .dashboard-v3-att-block {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  overflow: hidden;
  transition: border-color var(--t-base), box-shadow var(--t-base);
}

body[data-page="dashboard"] .dashboard-v3-att-block[open] {
  border-color: var(--brand-soft);
  box-shadow: var(--shadow-xs);
}

body[data-page="dashboard"] .dashboard-v3-att-block summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink-strong);
  user-select: none;
  transition: background var(--t-fast);
}

body[data-page="dashboard"] .dashboard-v3-att-block summary::-webkit-details-marker { display: none; }

body[data-page="dashboard"] .dashboard-v3-att-block summary::after {
  content: "▾";
  font-size: 0.72rem;
  color: var(--muted);
  transition: transform var(--t-base);
}

body[data-page="dashboard"] .dashboard-v3-att-block[open] summary::after {
  transform: rotate(180deg);
}

body[data-page="dashboard"] .dashboard-v3-att-block summary:hover {
  background: var(--brand-soft);
}

body[data-page="dashboard"] .dashboard-v3-att-summary-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

body[data-page="dashboard"] .dashboard-v3-att-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

body[data-page="dashboard"] .dashboard-v3-att-dot.is-warn { background: var(--status-warn); box-shadow: 0 0 0 2px rgba(201, 127, 16, 0.18); }
body[data-page="dashboard"] .dashboard-v3-att-dot.is-danger { background: var(--status-danger); box-shadow: 0 0 0 2px rgba(176, 45, 65, 0.18); }
body[data-page="dashboard"] .dashboard-v3-att-dot.is-neutral { background: var(--muted); box-shadow: 0 0 0 2px rgba(90, 111, 132, 0.18); }

body[data-page="dashboard"] .dashboard-v3-att-block .dashboard-turn-list {
  padding: 0 14px 12px;
}

body[data-page="dashboard"] .dashboard-v3-drilldown {
  margin-top: 14px;
  padding: 14px;
  border: 1px dashed var(--line-soft);
  border-radius: var(--radius-md);
  background: var(--bg-soft);
}

html[data-theme="dark"] body[data-page="dashboard"] .dashboard-v3-att-block {
  background: rgba(20, 36, 54, 0.4);
  border-color: var(--line-soft);
}

html[data-theme="dark"] body[data-page="dashboard"] .dashboard-v3-drilldown {
  background: rgba(20, 36, 54, 0.3);
}

/* SLO card mini grid */
body[data-page="dashboard"] .dashboard-v3-slo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

body[data-page="dashboard"] .dashboard-v3-slo-card-mini {
  position: relative;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  display: grid;
  gap: 4px;
  overflow: hidden;
  transition: transform var(--t-base), border-color var(--t-base), box-shadow var(--t-base);
}

body[data-page="dashboard"] .dashboard-v3-slo-card-mini::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--accent);
  opacity: 0.7;
}

body[data-page="dashboard"] .dashboard-v3-slo-card-mini:hover {
  transform: translateY(-2px);
  border-color: var(--brand-soft);
  box-shadow: var(--shadow-sm);
}

body[data-page="dashboard"] .dashboard-v3-slo-card-mini span {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

body[data-page="dashboard"] .dashboard-v3-slo-card-mini strong {
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink-strong);
  font-variant-numeric: tabular-nums;
}

body[data-page="dashboard"] .dashboard-v3-slo-card-mini small {
  font-size: 0.7rem;
  color: var(--muted-soft);
}

html[data-theme="dark"] body[data-page="dashboard"] .dashboard-v3-slo-card-mini {
  background: rgba(20, 36, 54, 0.5);
  border-color: var(--line);
}

/* ── PERF GRID (chart + clients) ── */
body[data-page="dashboard"] .dashboard-v3-perf-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

@media (max-width: 1100px) {
  body[data-page="dashboard"] .dashboard-v3-perf-grid {
    grid-template-columns: 1fr;
  }
}

body[data-page="dashboard"] .dashboard-v3-chart-card {
  display: flex;
  flex-direction: column;
}

body[data-page="dashboard"] .dashboard-v3-chart-card .dashboard-unifi-chart-frame {
  flex: 1;
  min-height: 280px;
}

body[data-page="dashboard"] .dashboard-v3-clients {
  display: flex;
  flex-direction: column;
}

/* ── DESTINATIONS — full width ── */
body[data-page="dashboard"] .dashboard-v3-destinations {
  position: relative;
  overflow: hidden;
}

body[data-page="dashboard"] .dashboard-v3-destinations::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--warn) 100%);
}

/* ── SYSTEM HEALTH STRIP (bottom) ── */
body[data-page="dashboard"] .dashboard-v3-system-health {
  position: relative;
  overflow: hidden;
  padding: 20px 24px;
  display: grid;
  gap: 16px;
}

body[data-page="dashboard"] .dashboard-v3-system-health::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand) 0%, #7c66db 100%);
  opacity: 0.6;
}

body[data-page="dashboard"] .dashboard-v3-sys-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

body[data-page="dashboard"] .dashboard-v3-sys-head h3 {
  margin: 4px 0 4px;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--ink-strong);
}

body[data-page="dashboard"] .dashboard-v3-sys-live {
  flex: 0 1 380px;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: var(--grad-subtle);
}

body[data-page="dashboard"] .dashboard-v3-sys-live-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

body[data-page="dashboard"] .dashboard-v3-sys-live .dashboard-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(186, 51, 72, 0.12);
  color: var(--danger);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body[data-page="dashboard"] .dashboard-v3-sys-live .dashboard-live-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--danger);
  animation: bvLivePulse 1.6s infinite;
}

body[data-page="dashboard"] .dashboard-v3-sys-live .dashboard-console-live-meta-chip {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

body[data-page="dashboard"] .dashboard-v3-sys-live .dashboard-console-live-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink-strong);
}

body[data-page="dashboard"] .dashboard-v3-sys-live .dashboard-console-live-meta {
  margin: 2px 0 0;
  font-size: 0.8rem;
  line-height: 1.5;
}

body[data-page="dashboard"] .dashboard-v3-sys-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}

@media (max-width: 720px) {
  body[data-page="dashboard"] .dashboard-v3-sys-metrics {
    grid-template-columns: 1fr;
  }
}

body[data-page="dashboard"] .dashboard-v3-sys-metrics .dashboard-console-metric-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 700;
}

body[data-page="dashboard"] .dashboard-v3-sys-metrics .dashboard-console-metric-head strong {
  font-size: 0.96rem;
  color: var(--ink-strong);
  font-variant-numeric: tabular-nums;
}

body[data-page="dashboard"] .dashboard-v3-sys-metrics .dashboard-console-progress {
  position: relative;
  width: 100%;
  height: 6px;
  margin-top: 4px;
  border-radius: 999px;
  background: rgba(15, 109, 168, 0.08);
  overflow: hidden;
}

body[data-page="dashboard"] .dashboard-v3-sys-metrics .dashboard-console-progress > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--grad-brand);
  transition: width var(--t-slow);
}

body[data-page="dashboard"] .dashboard-v3-sys-metrics small {
  display: block;
  margin-top: 3px;
  font-size: 0.7rem;
  color: var(--muted-soft);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
}

