:root {
  color-scheme: light;
  --font-ui: "Nunito", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Baloo 2", "Nunito", system-ui, sans-serif;
  --font-data: "JetBrains Mono", Consolas, monospace;
  --bg: #eef4f1;
  --surface: #ffffff;
  --surface-rgb: 255 255 255;
  --surface-2: #f4f8f6;
  --surface-3: #e5eee9;
  --page-top: #fbfdfc;
  --auth-bg: #eaf1ed;
  --surface-gradient-end: #f8fbf9;
  --text: #10201a;
  --muted: #61736b;
  --line: #d5e1db;
  --green: #16834d;
  --green-rgb: 22 131 77;
  --green-dark: #073f2c;
  --green-deep: #073f2c;
  --button-green: #1b9659;
  --green-soft: #dff0e7;
  --amber: #c7831d;
  --amber-rgb: 199 131 29;
  --amber-soft: #fff3d8;
  --red: #c83b32;
  --red-rgb: 200 59 50;
  --red-soft: #fde4e2;
  --blue: #246a9f;
  --blue-rgb: 36 106 159;
  --blue-soft: #e3f0f8;
  --shadow: 0 18px 42px rgba(15, 45, 35, 0.11);
  --shadow-soft: 0 8px 22px rgba(15, 45, 35, 0.08);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --surface: #0d0d0d;
  --surface-rgb: 13 13 13;
  --surface-2: #161616;
  --surface-3: #222222;
  --page-top: #050505;
  --auth-bg: #050505;
  --surface-gradient-end: #111111;
  --text: #f2f4f3;
  --muted: #a4aaa7;
  --line: #2d302e;
  --green: #42c27d;
  --green-rgb: 66 194 125;
  --green-dark: #91e0b7;
  --green-deep: #0c4f36;
  --button-green: #2aa968;
  --green-soft: #203f31;
  --amber: #e2a13c;
  --amber-rgb: 226 161 60;
  --amber-soft: #3a2f1d;
  --red: #ef6a61;
  --red-rgb: 239 106 97;
  --red-soft: #3e2423;
  --blue: #58a9df;
  --blue-rgb: 88 169 223;
  --blue-soft: #1c3344;
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
  --shadow-soft: 0 8px 22px rgba(0, 0, 0, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: linear-gradient(180deg, var(--page-top) 0%, var(--bg) 420px);
  font-family: var(--font-ui);
}

h1,
h2,
h3,
.brand-text,
.navbar-links a,
.sidebar-nav a,
button {
  font-family: var(--font-display);
}

input,
select,
textarea {
  font-family: var(--font-ui);
}

a {
  color: inherit;
  text-decoration: none;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 8px;
  color: #fff;
  background: var(--green-deep);
  font-weight: 800;
}

.skip-link:focus {
  top: 16px;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 22px;
  padding: 10px 28px;
  border-bottom: 1px solid var(--line);
  background: rgb(var(--surface-rgb) / 0.92);
  box-shadow: 0 8px 24px rgba(15, 45, 35, 0.06);
  backdrop-filter: blur(18px);
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  width: fit-content;
}

.brand-logo {
  display: block;
  width: min(178px, 42vw);
  height: 48px;
  object-fit: contain;
  object-position: left center;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--green), var(--green-deep));
  font-size: 14px;
  font-weight: 800;
}

.brand-text {
  display: grid;
  gap: 1px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-text small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.navbar-links a {
  min-height: 38px;
  padding: 9px 14px;
  border-radius: 7px;
  color: var(--muted);
  font-weight: 800;
}

.navbar-links a:hover,
.navbar-links a.active {
  color: var(--green-dark);
  background: var(--surface);
  box-shadow: 0 4px 12px rgba(15, 45, 35, 0.08);
}

.navbar-status,
.status-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.navbar-utilities {
  display: inline-flex;
  align-items: center;
  gap: 13px;
}

.theme-switch {
  position: relative;
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  user-select: none;
}

.theme-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.theme-switch-track {
  position: relative;
  display: block;
  width: 42px;
  height: 24px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-3);
  transition: border-color 160ms ease, background 160ms ease;
}

.theme-switch-track::after {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 2px 7px rgba(15, 45, 35, 0.2);
  content: "";
  transition: transform 160ms ease, background 160ms ease;
}

.theme-switch input:checked + .theme-switch-track {
  border-color: var(--green);
  background: var(--green);
}

.theme-switch input:checked + .theme-switch-track::after {
  transform: translateX(18px);
  background: #fff;
}

.theme-switch:focus-within .theme-switch-track {
  outline: 3px solid rgba(66, 194, 125, 0.22);
  outline-offset: 2px;
}

.theme-icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: #17342a;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 24px rgba(15, 45, 35, 0.1);
}

.theme-icon-button:hover,
.theme-icon-button:focus-visible {
  color: var(--green-dark);
  border-color: rgb(var(--green-rgb) / 0.42);
  background: #fff;
}

.theme-icon-button svg {
  width: 20px;
  height: 20px;
}

.theme-icon-moon[hidden],
.theme-icon-sun[hidden] {
  display: none !important;
}

html[data-theme="dark"] .theme-icon-button {
  color: #fff;
  border-color: #303030;
  background: #050505;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.32);
}

.navbar-account {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.logout-form {
  margin: 0;
}

.logout-button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--surface);
  box-shadow: none;
  font-size: 12px;
}

.logout-button:hover {
  color: var(--green-dark);
  border-color: rgba(22, 131, 77, 0.34);
  background: var(--surface-2);
}

.notification-center {
  position: relative;
}

.notification-button {
  position: relative;
  display: grid;
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: rgb(var(--surface-rgb) / 0.94);
  box-shadow: 0 4px 12px rgba(15, 45, 35, 0.07);
}

.notification-button:hover,
.notification-button[aria-expanded="true"] {
  color: var(--green-dark);
  border-color: rgba(22, 131, 77, 0.34);
  background: var(--surface);
}

.notification-button.has-critical {
  color: var(--red);
  border-color: rgba(200, 59, 50, 0.28);
  background: var(--red-soft);
}

.notification-button.attention {
  animation: notification-pulse 600ms ease-in-out 2;
}

.notification-symbol {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 999px;
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.notification-count {
  position: absolute;
  top: -5px;
  right: -6px;
  display: grid;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 999px;
  color: #fff;
  background: var(--red);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 9px;
  font-weight: 900;
}

.notification-count[hidden],
.notification-panel[hidden] {
  display: none;
}

.notification-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 45;
  width: min(370px, calc(100vw - 24px));
  max-height: min(520px, calc(100vh - 92px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 22px 55px rgba(15, 45, 35, 0.2);
}

.notification-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 15px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.notification-panel-header > div {
  display: grid;
  gap: 2px;
}

.notification-panel-header strong {
  font-size: 15px;
}

.notification-panel-header span {
  color: var(--muted);
  font-size: 12px;
}

.notification-panel-header a {
  flex: 0 0 auto;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 900;
}

.notification-list {
  max-height: 410px;
  overflow-y: auto;
}

.notification-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
}

.notification-item:last-child {
  border-bottom: 0;
}

.notification-item:hover {
  background: var(--red-soft);
}

.notification-item-marker {
  width: 9px;
  height: 9px;
  margin-top: 5px;
  border-radius: 999px;
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(200, 59, 50, 0.12);
}

.notification-item-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.notification-item-copy strong,
.notification-item-copy span {
  overflow-wrap: anywhere;
}

.notification-item-copy span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.notification-item-copy time {
  color: var(--muted);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 10px;
}

.notification-empty {
  margin: 0;
  padding: 24px 15px;
  color: var(--muted);
  text-align: center;
}

@keyframes notification-pulse {
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 0 7px rgba(200, 59, 50, 0.12);
  }
}

.status-dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--muted);
  box-shadow: 0 0 0 4px rgba(102, 112, 133, 0.12);
}

.status-dot.online {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(23, 132, 74, 0.15);
}

.status-dot.offline {
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(199, 55, 47, 0.14);
}

.main-content {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 64px;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgb(var(--surface-rgb) / 0.96), var(--surface-2)),
    linear-gradient(90deg, rgba(22, 131, 77, 0.12), transparent);
  box-shadow: var(--shadow-soft);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.page-header h1 {
  margin: 0;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.02;
}

.subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.page-actions {
  display: flex;
  gap: 10px;
}

.button-link,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 7px;
  font: inherit;
  font-family: var(--font-display);
  font-weight: 900;
  cursor: pointer;
}

button:disabled,
button.is-loading {
  cursor: wait;
  opacity: 0.65;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(180deg, var(--button-green), var(--green-deep));
  box-shadow: 0 10px 20px rgba(22, 131, 77, 0.22);
}

.btn-primary:hover {
  background: var(--green-deep);
}

.btn-secondary {
  color: var(--green-dark);
  border-color: var(--line);
  background: rgb(var(--surface-rgb) / 0.92);
  box-shadow: var(--shadow-soft);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.summary-grid.summary-grid-limited {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.auth-page {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: hidden;
  background: #f4f7fb;
}

.auth-shell {
  display: grid;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  grid-template-columns: minmax(0, 58%) minmax(0, 42%);
}

.auth-showcase {
  position: relative;
  min-width: 0;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  color: #fff;
  background: #071d35;
}

.auth-showcase::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(4, 24, 49, 0.94) 0%, rgba(5, 30, 58, 0.76) 45%, rgba(5, 27, 51, 0.28) 78%, rgba(5, 27, 51, 0.18) 100%),
    linear-gradient(180deg, rgba(4, 22, 43, 0.42) 0%, rgba(4, 22, 43, 0.08) 48%, rgba(3, 18, 35, 0.72) 100%);
  content: "";
}

.auth-showcase-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 57% center;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.auth-showcase-content {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  flex-direction: column;
  padding: 52px 64px 38px;
}

.auth-logo {
  display: block;
  object-fit: contain;
  object-position: left center;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.auth-showcase-logo {
  width: 220px;
  height: 72px;
}

body.auth-page .auth-showcase .auth-showcase-logo {
  filter: brightness(0) invert(1);
}

.auth-showcase-copy {
  position: relative;
  z-index: 3;
  width: min(650px, 92%);
  margin-top: 54px;
}

.auth-showcase-kicker {
  margin: 0 0 13px;
  color: #8fcbff;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.auth-showcase-title {
  margin: 0;
  color: #fff;
  font-size: 58px;
  font-weight: 700;
  line-height: 1.08;
  text-wrap: balance;
}

.auth-showcase-subtitle {
  max-width: 590px;
  margin: 19px 0 0;
  color: #d4e2f0;
  font-size: 17px;
  line-height: 1.55;
}

.auth-feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}

.auth-feature-list li {
  display: grid;
  min-width: 145px;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.auth-feature-list li > span:last-child {
  display: grid;
  gap: 1px;
}

.auth-feature-list small {
  color: #b8cbe0;
  font-size: 11px;
  font-weight: 500;
}

.auth-feature-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  backdrop-filter: blur(8px);
}

.auth-feature-icon svg {
  width: 21px;
}

.auth-feature-icon.feature-blue {
  color: #8fc7ff;
  background: rgba(29, 102, 189, 0.32);
}

.auth-feature-icon.feature-amber {
  color: #ffd38a;
  background: rgba(192, 119, 19, 0.3);
}

.auth-feature-icon.feature-green {
  color: #9ee7bb;
  background: rgba(26, 133, 83, 0.3);
}

.auth-network-visual {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.auth-network-links {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.auth-network-links line {
  fill: none;
  stroke: rgba(224, 239, 255, 0.75);
  stroke-dasharray: 4 4;
  stroke-linecap: round;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.auth-network-links-compact {
  display: none;
}

.auth-network-gateway,
.auth-network-marker {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  border-radius: 50%;
  box-shadow: 0 0 0 8px rgba(46, 120, 214, 0.12), 0 0 30px rgba(67, 151, 255, 0.48);
}

.auth-network-gateway {
  top: 82%;
  left: 78%;
  width: 58px;
  height: 58px;
  border: 2px solid rgba(174, 216, 255, 0.84);
  color: #fff;
  background: rgba(12, 77, 154, 0.82);
  transform: translate(-50%, -50%);
}

.auth-network-gateway::before,
.auth-network-gateway::after {
  position: absolute;
  border: 1px solid rgba(126, 190, 255, 0.36);
  border-radius: 50%;
  content: "";
}

.auth-network-gateway::before { inset: -17px; }
.auth-network-gateway::after { inset: -31px; }

.auth-network-gateway svg {
  width: 25px;
}

.auth-network-marker {
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  background: #27a65e;
}

.auth-network-marker.marker-one {
  top: 72%;
  left: 58%;
  transform: translate(-50%, -50%);
}

.auth-network-marker.marker-two {
  top: 57%;
  left: 85%;
  background: #e1a11e;
  transform: translate(-50%, -50%);
}

.auth-network-marker.marker-three {
  top: 50%;
  left: 70%;
  background: #df3c3c;
  transform: translate(-50%, -50%);
}

.auth-showcase-location {
  display: flex;
  position: relative;
  z-index: 3;
  align-items: center;
  gap: 7px;
  margin: auto 0 0;
  color: #c6d8e9;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.auth-showcase-location svg {
  width: 15px;
}

.auth-access {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 100vh;
  min-height: 100svh;
  padding: 64px 44px 42px;
  place-items: center;
  overflow-y: auto;
  background: #f8fafc;
}

html[data-theme="dark"] .auth-access {
  background: #050505;
}

.auth-theme-switch,
.auth-theme-button {
  position: absolute;
  top: 24px;
  right: 28px;
  z-index: 3;
}

.auth-theme-switch > svg {
  width: 17px;
}

.auth-theme-switch-label {
  font-size: 11px;
  font-weight: 700;
}

.auth-login-wrap {
  width: 100%;
  max-width: 520px;
  min-width: 0;
}

.auth-panel {
  width: 100%;
  min-width: 0;
  padding: 44px 46px 40px;
  border: 1px solid #dce4ee;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 22px 58px rgba(25, 53, 84, 0.11);
}

html[data-theme="dark"] .auth-panel {
  border-color: var(--line);
}

.auth-heading {
  margin-bottom: 27px;
  text-align: center;
}

.auth-heading h1,
.auth-heading p {
  margin: 0;
}

.auth-heading .eyebrow {
  margin-bottom: 7px;
  color: #17639f;
}

.auth-heading h1 {
  color: var(--text);
  font-size: 38px;
  line-height: 1.1;
}

.auth-heading p:last-child {
  margin-top: 9px;
  color: var(--muted);
  font-size: 14px;
}

.auth-mobile-logo {
  display: none;
}

.auth-messages {
  margin-bottom: 17px;
}

.auth-message {
  margin: 0;
  padding: 11px 12px;
  border: 1px solid rgba(200, 59, 50, 0.24);
  border-radius: 7px;
  color: var(--red);
  background: var(--red-soft);
  font-size: 13px;
  font-weight: 800;
}

.auth-form {
  display: grid;
  gap: 18px;
}

.auth-field {
  display: grid;
  gap: 8px;
}

.auth-field > span:first-child {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.auth-input-shell {
  display: grid;
  min-height: 52px;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  border: 1px solid #cfd9e5;
  border-radius: 7px;
  color: #718096;
  background: var(--surface);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

html[data-theme="dark"] .auth-input-shell {
  border-color: var(--line);
  background: var(--surface-2);
}

.auth-input-shell:focus-within {
  border-color: #2563b5;
  box-shadow: 0 0 0 3px rgba(37, 99, 181, 0.13);
}

.auth-input-shell > svg {
  width: 18px;
  height: 18px;
}

.auth-page .auth-input-shell input,
.auth-page .auth-input-shell input:focus {
  height: 50px;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  box-shadow: none;
}

.password-control {
  grid-template-columns: 20px minmax(0, 1fr) 36px;
}

.password-toggle {
  display: grid;
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 6px;
  color: #60758d;
  background: transparent;
  box-shadow: none;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  color: #1557c0;
  background: var(--surface-2);
  box-shadow: none;
}

.password-toggle svg {
  width: 19px;
}

.password-toggle [hidden] {
  display: none;
}

.auth-submit {
  display: inline-flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 2px;
  border: 1px solid #1554b7;
  border-radius: 7px;
  color: #fff;
  background: #1554b7;
  box-shadow: 0 10px 22px rgba(21, 84, 183, 0.22);
  font-size: 15px;
  font-weight: 800;
}

.auth-submit:hover,
.auth-submit:focus-visible {
  border-color: #0d4298;
  background: #0d4298;
  box-shadow: 0 12px 25px rgba(21, 84, 183, 0.28);
  transform: translateY(-1px);
}

.auth-submit svg {
  width: 18px;
}

.auth-password-help {
  display: flex;
  min-height: 22px;
  justify-content: flex-end;
  margin-top: -8px;
}

.auth-forgot-password {
  min-height: 28px;
  padding: 0;
  border: 0;
  color: var(--green-deep);
  background: transparent;
  box-shadow: none;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
}

.auth-forgot-password:hover,
.auth-forgot-password:focus-visible {
  color: var(--green);
  background: transparent;
  box-shadow: none;
  text-decoration: underline;
}

.auth-system-status {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 22px;
  padding: 9px 12px;
  border: 1px solid rgba(14, 139, 85, 0.24);
  border-radius: 7px;
  color: #08754b;
  background: #edf9f3;
  font-size: 12px;
  font-weight: 700;
}

html[data-theme="dark"] .auth-system-status {
  color: #7bddaa;
  background: rgba(25, 135, 83, 0.13);
}

.auth-status-icon {
  display: grid;
  place-items: center;
}

.auth-status-icon svg {
  width: 18px;
}

.auth-status-copy {
  display: grid;
}

.auth-status-copy strong {
  font-size: inherit;
}

.auth-status-copy small,
.auth-status-pulse {
  display: none;
}

.auth-access-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.auth-note-icon {
  display: grid;
  place-items: center;
}

.auth-note-icon svg {
  width: 18px;
}

.auth-note-copy {
  display: grid;
}

.auth-note-copy small {
  display: none;
}

input::placeholder {
  color: var(--muted);
  opacity: 0.82;
}

html[data-theme="dark"] .brand-logo,
html[data-theme="dark"] .auth-logo {
  filter: brightness(2.15) saturate(0.72);
}

html[data-theme="dark"] .leaflet-tile-pane {
  filter: brightness(0.7) contrast(1.08) saturate(0.78);
}

html[data-theme="dark"] .leaflet-popup-content-wrapper,
html[data-theme="dark"] .leaflet-popup-tip,
html[data-theme="dark"] .leaflet-control-attribution {
  color: var(--text);
  background: var(--surface);
}

html[data-theme="dark"] .leaflet-control-attribution a {
  color: var(--green-dark);
}

.access-denied {
  max-width: 620px;
  padding: 34px 0;
}

.access-denied h1 {
  margin: 5px 0 8px;
  font-size: 40px;
}

.access-denied > p:not(.eyebrow) {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 16px;
}

.summary-card {
  position: relative;
  display: grid;
  gap: 4px;
  min-height: 118px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgb(var(--surface-rgb) / 0.98), var(--surface-gradient-end));
  box-shadow: var(--shadow-soft);
}

.summary-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--green);
  content: "";
}

.summary-card:nth-child(2)::before {
  background: var(--blue);
}

.summary-card:nth-child(3)::before {
  background: var(--amber);
}

.summary-alert::before {
  background: var(--red);
}

.summary-label,
.summary-note,
.metric-label,
.stat-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.summary-card strong {
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 34px;
  line-height: 1;
}

.summary-card:nth-child(2) strong {
  color: var(--blue);
}

.summary-card:nth-child(3) strong {
  color: var(--amber);
}

.summary-alert strong {
  color: var(--red);
}

.alert-banner-container {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.alert-banner {
  padding: 12px 14px;
  border: 1px solid rgba(199, 55, 47, 0.25);
  border-radius: 8px;
  color: var(--red);
  background: rgba(199, 55, 47, 0.1);
}

.map-panel,
.node-card,
.settings-card,
.chart-card,
.stat-card,
.empty-state,
.node-toolbar {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(var(--surface-rgb) / 0.96);
  box-shadow: var(--shadow);
}

.map-panel {
  position: relative;
  width: min(100%, 760px);
  overflow: hidden;
  margin-bottom: 18px;
}

.map-panel-header,
.node-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
}

.map-panel-header {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
}

.map-panel .map-panel-header {
  padding: 8px 10px;
}

.map-panel-header h2,
.node-toolbar h2,
.chart-card h3,
.settings-card h3 {
  margin: 0;
  font-size: 18px;
}

.map-panel-header p,
.node-toolbar p {
  margin: 2px 0 0;
  color: var(--muted);
}

.map-controls {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.map-control-btn,
.map-action {
  min-height: 28px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--green-dark);
  background: rgb(var(--surface-rgb) / 0.94);
  box-shadow: 0 5px 14px rgba(15, 45, 35, 0.12);
  font-weight: 900;
}

.map-control-btn {
  min-width: 28px;
  font-family: "JetBrains Mono", Consolas, monospace;
  line-height: 1;
}

.map-control-fit {
  min-width: 34px;
  font-family: inherit;
}

.map-control-btn:hover {
  border-color: rgba(23, 132, 74, 0.38);
  background: var(--surface);
}

.map-box {
  position: relative;
  height: 300px;
  overflow: hidden;
  border-top: 1px solid var(--line);
}

.node-map {
  position: relative;
  z-index: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: var(--surface-3);
}

.node-map.leaflet-container {
  width: 100%;
  height: 100%;
}

.map-empty-state {
  display: none;
  position: absolute;
  left: 8px;
  bottom: 8px;
  max-width: calc(100% - 16px);
  padding: 6px 8px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 8px;
  color: var(--muted);
  background: rgb(var(--surface-rgb) / 0.94);
  box-shadow: var(--shadow-soft);
  font-size: 12px;
  font-weight: 800;
}

.map-panel.no-mapped-nodes .map-empty-state {
  display: block;
}

.node-map-marker {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 8px 20px rgba(15, 45, 35, 0.28);
}

.node-map-marker::after {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #fff;
  content: "";
}

.node-map-marker.offline {
  background: var(--red);
}

.google-node-map-marker {
  position: absolute;
  margin: 0;
  padding: 0;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.google-node-map-marker:hover,
.google-node-map-marker:focus-visible {
  box-shadow: 0 10px 26px rgba(15, 45, 35, 0.38), 0 0 0 4px rgba(22, 131, 77, 0.18);
  outline: none;
  transform: translate(-50%, -50%) scale(1.08);
}

.google-node-map-marker.offline:hover,
.google-node-map-marker.offline:focus-visible {
  box-shadow: 0 10px 26px rgba(120, 30, 30, 0.32), 0 0 0 4px rgba(200, 59, 50, 0.16);
}

html[data-theme="dark"] .google-map-container .gm-style-iw-c,
html[data-theme="dark"] .google-map-container .gm-style-iw-tc::after {
  color: var(--text);
  background: var(--surface);
}

html[data-theme="dark"] .google-map-container .gm-style-iw-d {
  overflow: auto !important;
}

html[data-theme="dark"] .google-map-container .gm-ui-hover-effect > span {
  filter: invert(1);
}

.node-map-popup {
  min-width: 185px;
}

.node-map-popup h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.node-map-popup p {
  margin: 0 0 8px;
  color: var(--muted);
}

.node-map-coordinates {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
  margin-bottom: 10px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--green-dark);
  background: var(--surface-2);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
}

.node-map-popup dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 12px;
  margin: 0;
}

.node-map-popup dt {
  color: var(--muted);
}

.node-map-popup dd,
.metric-value,
.stat-value {
  margin: 0;
  font-family: "JetBrains Mono", Consolas, monospace;
  font-weight: 800;
}

.node-toolbar {
  margin-bottom: 14px;
  background: linear-gradient(180deg, var(--surface), var(--surface-gradient-end));
  box-shadow: var(--shadow-soft);
}

.search-field {
  display: grid;
  gap: 6px;
  width: min(360px, 100%);
}

.search-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.search-field input,
select,
input {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.search-field input:focus,
select:focus,
input:focus {
  outline: 3px solid rgba(23, 132, 74, 0.18);
  border-color: rgba(23, 132, 74, 0.58);
}

.node-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(285px, 1fr));
  gap: 16px;
}

.node-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.node-card:hover {
  transform: translateY(-3px);
  border-color: rgba(23, 132, 74, 0.42);
  box-shadow: 0 22px 48px rgba(15, 45, 35, 0.14);
}

.node-card[hidden],
.node-search-empty {
  display: none;
}

.node-search-empty.visible {
  display: block;
  margin-top: 14px;
}

.node-card-header,
.node-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.node-card-header {
  justify-content: space-between;
}

.node-card h3 {
  margin: 0;
  font-size: 20px;
}

.node-id {
  width: fit-content;
  margin: -4px 0 0;
  padding: 4px 7px;
  border-radius: 6px;
  color: var(--muted);
  background: var(--green-soft);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 12px;
  font-weight: 800;
}

.node-location,
.node-last-seen {
  margin: 0;
  color: var(--muted);
}

.node-metrics,
.stat-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.metric {
  display: grid;
  gap: 4px;
  min-height: 74px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
}

.metric-value,
.stat-value {
  font-size: 20px;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 24px;
  color: var(--muted);
  background:
    linear-gradient(180deg, rgb(var(--surface-rgb) / 0.98), var(--surface-2));
}

.empty-state p {
  margin: 0 0 8px;
}

code {
  padding: 2px 5px;
  border-radius: 5px;
  background: var(--surface-3);
  font-family: "JetBrains Mono", Consolas, monospace;
}

.alerts-page-header {
  margin-bottom: 16px;
}

.alert-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.alert-overview-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 92px;
  padding: 15px 17px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(var(--surface-rgb) / 0.96);
  box-shadow: var(--shadow-soft);
}

.alert-overview-item::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--amber);
  content: "";
}

.alert-overview-item.critical::before {
  background: var(--red);
}

.alert-overview-item.archived::before {
  background: var(--blue);
}

.alert-overview-item span,
.alert-overview-item small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.alert-overview-item span {
  align-self: end;
  text-transform: uppercase;
}

.alert-overview-item strong {
  grid-column: 2;
  grid-row: 1 / span 2;
  color: var(--amber);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 34px;
  line-height: 1;
}

.alert-overview-item.critical strong {
  color: var(--red);
}

.alert-overview-item.archived strong {
  color: var(--blue);
}

.alerts-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(var(--surface-rgb) / 0.95);
  box-shadow: var(--shadow-soft);
}

.alert-view-control {
  display: flex;
  gap: 5px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.alert-view-control a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 11px;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 800;
}

.alert-view-control a:hover,
.alert-view-control a[aria-current="page"] {
  color: var(--green-dark);
  background: var(--surface);
  box-shadow: 0 3px 10px rgba(15, 45, 35, 0.09);
}

.alert-view-control a span {
  display: grid;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  place-items: center;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-3);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 10px;
}

.alert-view-control a[aria-current="page"] span {
  color: #fff;
  background: var(--green);
}

.alert-search-form {
  display: flex;
  min-width: min(390px, 100%);
  align-items: flex-end;
  justify-content: flex-end;
  gap: 6px;
}

.alert-search-field {
  display: grid;
  width: min(320px, 100%);
  gap: 6px;
}

.alert-search-field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.alerts-toolbar .alert-search-button {
  display: grid;
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  flex: 0 0 42px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--green-dark);
  background: var(--surface-2);
  box-shadow: none;
}

.alerts-toolbar .alert-search-button:hover,
.alerts-toolbar .alert-search-button:focus-visible {
  border-color: var(--green);
  color: #fff;
  background: var(--green);
  box-shadow: none;
}

.alert-search-button svg {
  width: 18px;
  height: 18px;
}

.alerts-results-summary {
  min-height: 20px;
  margin: 0 2px 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.alerts-live-refresh {
  display: flex;
  width: fit-content;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  padding: 0 12px;
  border: 1px solid rgba(37, 99, 168, 0.25);
  color: var(--blue);
  background: var(--blue-soft);
  box-shadow: none;
  font-size: 12px;
}

.alerts-live-refresh[hidden] {
  display: none;
}

.alerts-live-refresh span {
  font-weight: 900;
}

.alerts-live-refresh svg {
  width: 16px;
}

.alerts-list {
  display: grid;
  gap: 10px;
}

.alert-record {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 13px;
  padding: 16px 17px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--amber);
  border-radius: 8px;
  background: rgb(var(--surface-rgb) / 0.97);
  box-shadow: var(--shadow-soft);
  scroll-margin-top: 90px;
  transition: border-color 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.alert-record[hidden] {
  display: none;
}

.alert-record.severity-critical {
  border-left-color: var(--red);
}

.alert-record.is-archived {
  border-left-color: var(--muted);
  background: rgb(var(--surface-rgb) / 0.82);
  box-shadow: none;
}

.alert-record.is-highlighted {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(200, 59, 50, 0.13), var(--shadow);
}

.alert-record-marker {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  color: var(--amber);
  background: var(--amber-soft);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 13px;
  font-weight: 900;
}

.severity-critical .alert-record-marker {
  color: var(--red);
  background: var(--red-soft);
}

.is-archived .alert-record-marker {
  color: var(--muted);
  background: var(--surface-3);
}

.alert-record-body {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.alert-record-topline,
.alert-record-footer,
.alert-record-badges,
.alert-record-meta {
  display: flex;
  align-items: center;
}

.alert-record-topline,
.alert-record-footer {
  justify-content: space-between;
  gap: 14px;
}

.alert-record-badges,
.alert-record-meta {
  flex-wrap: wrap;
  gap: 7px;
}

.alert-record time {
  color: var(--muted);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 11px;
  text-align: right;
}

.alert-record h2 {
  margin: 0;
  font-size: 19px;
  line-height: 1.2;
}

.alert-record p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.alert-record-footer {
  margin-top: 3px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.alert-record-meta span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.alert-record-meta span + span {
  padding-left: 7px;
  border-left: 1px solid var(--line);
}

.alert-record-footer a {
  flex: 0 0 auto;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 900;
}

.alert-record-footer a:hover {
  text-decoration: underline;
}

.alerts-empty {
  padding: 34px 20px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  background: rgb(var(--surface-rgb) / 0.72);
}

.alerts-empty[hidden] {
  display: none;
}

.alerts-empty strong {
  color: var(--text);
  font-size: 17px;
}

.alerts-empty p {
  margin: 5px 0 0;
}

.alerts-pagination,
.pagination-pages {
  display: flex;
  align-items: center;
  justify-content: center;
}

.alerts-pagination {
  gap: 8px;
  margin-top: 18px;
}

.pagination-pages {
  gap: 5px;
}

.pagination-arrow,
.pagination-page {
  display: grid;
  width: 38px;
  height: 38px;
  min-height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: var(--surface);
  box-shadow: 0 3px 10px rgba(15, 45, 35, 0.06);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 12px;
  font-weight: 800;
}

.pagination-arrow:hover,
.pagination-page:hover,
.pagination-page.is-current {
  border-color: var(--green);
  color: #fff;
  background: var(--green);
}

.pagination-arrow.is-disabled {
  opacity: 0.42;
  box-shadow: none;
}

.pagination-arrow svg {
  width: 18px;
}

.pagination-ellipsis {
  display: grid;
  width: 24px;
  height: 38px;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
}

.badge,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.badge.warning {
  color: var(--amber);
  background: rgba(199, 121, 22, 0.16);
}

.badge.critical {
  color: var(--red);
  background: rgba(199, 55, 47, 0.16);
}

.badge.mlp {
  color: var(--green-dark);
  background: var(--green-soft);
  border: 1px solid rgb(var(--green-rgb) / 0.22);
}

.status-pill.online {
  color: var(--green-dark);
  background: rgba(23, 132, 74, 0.16);
}

.status-pill.offline {
  color: var(--red);
  background: rgba(199, 55, 47, 0.16);
}

.empty-cell {
  color: var(--muted);
  text-align: center;
}

.back-link {
  width: fit-content;
  color: var(--green-dark);
  font-weight: 800;
}

.stat-row {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-bottom: 18px;
}

.stat-card {
  display: grid;
  gap: 8px;
  min-height: 92px;
  padding: 16px;
}

.chart-grid,
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 16px;
}

.chart-section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 8px 0 14px;
}

.chart-section-header h2 {
  margin: 0;
}

.chart-history-status {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

.graph-node-picker {
  display: grid;
  gap: 6px;
  width: min(360px, 100%);
}

.analytics-header-actions {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 12px;
}

.analytics-header-actions .button-link {
  min-height: 42px;
  white-space: nowrap;
}

.analytics-interval-picker {
  display: grid;
  gap: 6px;
  min-width: 142px;
}

.analytics-interval-picker span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.graph-node-picker span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.graph-node-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 2px;
}

.graph-node-summary h2,
.graph-node-summary p {
  margin: 0;
}

.graph-node-summary p {
  margin-top: 4px;
  color: var(--muted);
}

.graph-metric-filters {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(var(--surface-rgb) / 0.94);
  box-shadow: var(--shadow-soft);
}

.graph-filter-label {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.graph-filter-options {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 7px;
}

.metric-filter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  background: var(--surface-2);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.metric-filter:hover {
  border-color: rgba(22, 131, 77, 0.34);
  background: var(--surface);
}

.metric-filter input {
  width: 15px;
  min-width: 15px;
  height: 15px;
  margin: 0;
  padding: 0;
  accent-color: var(--green);
}

.metric-filter:has(input:not(:checked)) {
  color: var(--muted);
  background: var(--surface);
  opacity: 0.7;
}

.metric-filter-swatch {
  width: 17px;
  height: 3px;
  border-radius: 2px;
  background: var(--green);
}

.metric-filter-swatch.tilt {
  background: var(--blue);
}

.metric-filter-swatch.vibration {
  background: var(--red);
}

.metric-filter-swatch.precipitation {
  background: var(--amber);
}

.graph-show-all {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 11px;
  border-color: var(--line);
  color: var(--green-dark);
  background: var(--surface);
  box-shadow: none;
  font-size: 12px;
}

.graph-show-all:disabled {
  color: var(--muted);
  cursor: default;
  opacity: 0.5;
}

.chart-card,
.settings-card {
  padding: 18px;
}

.chart-card h3,
.settings-card h3 {
  margin-bottom: 14px;
}

.settings-card-intro {
  margin: -7px 0 15px;
  color: var(--muted);
  font-size: 13px;
}

.settings-utility-panel {
  display: grid;
  align-content: start;
  gap: 14px;
}

.settings-utility-panel h3,
.settings-utility-panel .settings-card-intro {
  margin-bottom: 0;
}

.settings-install-app {
  width: 100%;
  color: var(--green-dark);
  border-color: rgb(var(--green-rgb) / 0.3);
  background: var(--green-soft);
}

.settings-install-app:hover {
  color: var(--green-dark);
  border-color: rgb(var(--green-rgb) / 0.52);
  background: rgb(var(--green-rgb) / 0.15);
}

.settings-utility-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
}

.settings-utility-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 9px;
  color: var(--green);
  background: var(--green-soft);
}

.settings-utility-icon svg {
  width: 20px;
  height: 20px;
}

.settings-utility-row div,
.settings-utility-meta {
  display: grid;
  gap: 3px;
}

.settings-utility-row span:not(.status-dot),
.settings-utility-meta span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.settings-utility-row strong {
  color: var(--green-dark);
  font-size: 13px;
  text-transform: uppercase;
}

.settings-utility-meta,
.settings-theme-control {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.settings-utility-meta strong {
  font-size: 14px;
}

.settings-theme-control {
  min-height: 36px;
  color: var(--text);
}

.settings-theme-control > svg {
  width: 17px;
}

.settings-theme-control > span:not(.theme-switch-track) {
  margin-right: auto;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

html[data-theme="dark"] .settings-install-app {
  color: #8de1b9;
  border-color: rgba(94, 213, 158, 0.28);
  background: rgba(43, 151, 103, 0.12);
}

html[data-theme="dark"] .settings-install-app:hover {
  color: #a6e9c5;
  background: rgba(43, 151, 103, 0.2);
}

/* Floating navigation dock: shared visual language on desktop and mobile. */
body.app-shell {
  --sidebar-width: 0px;
}

.app-sidebar {
  width: min(280px, 82vw);
  transform: translateX(-104%);
  transition: transform 220ms ease;
}

body.sidebar-open .app-sidebar {
  transform: translateX(0);
}

.app-topbar {
  left: 0;
}

.sidebar-toggle {
  display: grid;
}

.floating-nav {
  position: fixed;
  z-index: 65;
  bottom: 22px;
  left: 50%;
  display: flex;
  max-width: calc(100vw - 32px);
  align-items: center;
  gap: 5px;
  padding: 7px;
  border: 1px solid rgb(255 255 255 / 0.18);
  border-radius: 22px;
  background: rgb(31 41 55 / 0.72);
  box-shadow: 0 18px 46px rgb(5 15 28 / 0.24);
  backdrop-filter: blur(14px) saturate(130%);
  transform: translateX(-50%);
  transition: transform 520ms cubic-bezier(0.22, 1, 0.36, 1), opacity 280ms ease;
}

body.floating-nav-hidden .floating-nav {
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, calc(100% + 42px));
  transition-duration: 260ms;
}

.floating-nav a,
.floating-nav-menu {
  display: grid;
  min-width: 58px;
  min-height: 54px;
  align-content: center;
  justify-items: center;
  gap: 4px;
  padding: 5px 10px;
  border: 0;
  border-radius: 17px;
  color: #c8d4e1;
  background: transparent;
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.floating-nav a:hover,
.floating-nav a:focus-visible,
.floating-nav-menu:hover,
.floating-nav-menu:focus-visible {
  color: #fff;
  background: rgb(255 255 255 / 0.12);
  outline: 0;
}

.floating-nav a.active {
  color: #fff;
  background: rgb(255 255 255 / 0.14);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.04);
}

.floating-nav a.active svg {
  fill: currentColor;
}

.floating-nav svg {
  width: 22px;
  height: 22px;
}

.floating-nav-menu {
  display: none;
}

.floating-nav-overflow[hidden] {
  display: none;
}

.floating-nav-overflow {
  position: fixed;
  z-index: 66;
  bottom: 94px;
  left: 50%;
  display: grid;
  min-width: 196px;
  gap: 4px;
  padding: 7px;
  border: 1px solid rgb(255 255 255 / 0.18);
  border-radius: 16px;
  background: rgb(31 41 55 / 0.76);
  box-shadow: 0 18px 46px rgb(5 15 28 / 0.24);
  backdrop-filter: blur(14px) saturate(130%);
  transform: translateX(-50%);
}

.floating-nav-overflow a {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 11px;
  color: #e3ebf2;
  font-size: 12px;
  font-weight: 800;
}

.floating-nav-overflow a:hover,
.floating-nav-overflow a:focus-visible {
  color: #fff;
  background: rgb(255 255 255 / 0.12);
  outline: 0;
}

.floating-nav-overflow svg {
  width: 18px;
  height: 18px;
}

body.app-shell .main-content {
  padding-bottom: 110px;
}

.fullscreen-button {
  display: grid;
}

@media (max-width: 760px) {
  .app-sidebar {
    width: min(82vw, 292px);
  }

  .floating-nav {
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 10px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 3px;
    max-width: none;
    padding: 5px;
    border-radius: 20px;
    transform: none;
  }

  body.floating-nav-hidden .floating-nav {
    transform: translateY(calc(100% + 30px));
  }

  .floating-nav a,
  .floating-nav-menu {
    min-width: 0;
    min-height: 52px;
    padding: 5px 2px;
    border-radius: 15px;
    font-size: 9px;
  }

  .floating-nav-extended {
    display: none !important;
  }

  .floating-nav-menu {
    display: grid;
  }

  .floating-nav-overflow {
    right: 10px;
    bottom: calc(80px + env(safe-area-inset-bottom));
    left: auto;
    min-width: 190px;
    transform: none;
  }

  body.app-shell .main-content {
    padding-bottom: calc(94px + env(safe-area-inset-bottom));
  }
}

.chart-card-combined {
  grid-column: 1 / -1;
  min-width: 0;
}

.chart-canvas-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
  height: 280px;
}

.chart-canvas-wrap-combined {
  height: 420px;
}

.chart-card canvas {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
}

.network-quality-summary {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.network-quality-summary-header {
  margin-bottom: 11px;
}

.network-quality-summary-header h3,
.network-quality-summary-header p {
  margin: 0;
}

.network-quality-summary-header h3 {
  margin-top: 3px;
  font-size: 20px;
}

.network-quality-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.network-quality-item {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 92px;
  gap: 9px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgb(var(--surface-rgb) / 0.94);
}

.network-quality-item::before {
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--blue);
  content: "";
}

.network-quality-item.delivery::before {
  background: var(--green);
}

.network-quality-item.loss::before {
  background: var(--red);
}

.network-quality-item dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.network-quality-item dd {
  align-self: end;
  margin: 0;
  color: var(--text);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.sensor-records-section {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.sensor-records-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 13px;
}

.sensor-records-header h3,
.sensor-records-header p {
  margin: 0;
}

.sensor-records-header h3 {
  margin-top: 3px;
  font-size: 20px;
}

.sensor-records-header p:last-child {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.sensor-records-header strong {
  color: var(--text);
}

.sensor-records-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.sensor-records-page-size {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.sensor-records-search {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.sensor-records-page-size select {
  width: 72px;
  min-height: 36px;
  padding: 6px 26px 6px 10px;
  border-radius: 7px;
  font-family: "JetBrains Mono", Consolas, monospace;
}

.sensor-records-search input {
  width: min(230px, 46vw);
  min-height: 36px;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 12px;
}

.sensor-records-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(var(--surface-rgb) / 0.94);
  box-shadow: var(--shadow-soft);
}

.sensor-records-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  color: var(--text);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.sensor-records-table th,
.sensor-records-table td {
  padding: 12px 14px;
  white-space: nowrap;
}

.sensor-records-table th {
  padding: 0;
  color: var(--muted);
  background: var(--surface-2);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  text-align: left;
  text-transform: uppercase;
}

.sensor-records-table td {
  border-top: 1px solid var(--line);
  font-family: "JetBrains Mono", Consolas, monospace;
}

.sensor-records-table th + th,
.sensor-records-table td + td {
  border-left: 1px solid var(--line);
}

.sensor-records-table tfoot th {
  padding: 11px 14px;
  border-top: 1px solid var(--line);
}

.sensor-records-sort {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  border: 0;
  border-radius: 0;
  color: var(--muted);
  background: transparent;
  box-shadow: none;
  font-size: 10px;
  font-weight: 900;
  text-align: left;
  text-transform: uppercase;
}

.sensor-records-sort:hover,
.sensor-records-sort:focus-visible,
.sensor-records-sort.is-active {
  color: var(--green-dark);
  background: rgb(var(--green-rgb) / 0.06);
  box-shadow: none;
}

.numeric-column .sensor-records-sort {
  justify-content: flex-end;
  text-align: right;
}

.sensor-records-sort .sort-icon {
  width: 14px;
  min-width: 14px;
  height: 14px;
  opacity: 0.7;
}

.sensor-records-table tbody tr {
  transition: background-color 140ms ease;
}

.sensor-records-table tbody tr:hover,
.sensor-records-table tbody tr.is-latest {
  background: rgb(var(--green-rgb) / 0.07);
}

.sensor-records-table tbody tr:nth-child(even):not(.is-latest) {
  background: var(--surface-2);
}

.sensor-records-table .numeric-column {
  text-align: right;
}

.sensor-records-table .record-time-cell {
  color: var(--muted);
}

.sensor-records-empty {
  height: 86px;
  color: var(--muted);
  font-family: var(--font-ui) !important;
  text-align: center;
}

.sensor-records-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
}

.sensor-records-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.sensor-records-pagination {
  display: flex;
  align-items: center;
  gap: 0;
}

.sensor-records-pagination button {
  min-width: 35px;
  height: 36px;
  margin-left: -1px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--green-dark);
  background: var(--surface);
  box-shadow: none;
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 11px;
}

.sensor-records-pagination button:hover:not(:disabled) {
  border-color: rgb(var(--green-rgb) / 0.46);
  background: rgb(var(--green-rgb) / 0.08);
}

.sensor-records-pagination button:disabled {
  color: var(--muted);
  cursor: default;
  opacity: 0.45;
}

.sensor-records-pagination > button:first-child {
  margin-left: 0;
  border-radius: 7px 0 0 7px;
}

.sensor-records-pagination > button:last-child {
  border-radius: 0 7px 7px 0;
}

.sensor-records-pages {
  display: flex;
}

.sensor-records-pagination .sensor-records-page-number.is-current {
  z-index: 1;
  border-color: var(--green);
  color: #fff;
  background: var(--green);
}

.sensor-records-page-ellipsis {
  display: grid;
  min-width: 35px;
  height: 36px;
  margin-left: -1px;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--surface);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 11px;
}

.form-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

label {
  color: var(--muted);
  font-weight: 800;
}

.form-row label {
  min-width: 90px;
}

.system-log {
  min-height: 220px;
  max-height: 360px;
  overflow: auto;
  padding: 12px;
  border-radius: 8px;
  background: #111827;
  color: #d9e8dc;
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 13px;
}

.system-log-line {
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.system-log-line.warning {
  color: #ffe0a3;
}

.system-log-line.error {
  color: #ffb4ad;
}

.toast-container {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  display: grid;
  gap: 8px;
}

.toast {
  max-width: 360px;
  padding: 12px 14px;
  border-radius: 8px;
  color: #fff;
  background: #111827;
  box-shadow: var(--shadow);
}

/* Dashboard */
.dashboard-page {
  position: relative;
  isolation: isolate;
}

.dashboard-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
  padding: 2px 2px 16px;
  animation: dashboard-header-enter 600ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.dashboard-header::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, rgb(var(--green-rgb) / 0.72), var(--line) 36%, transparent);
  content: "";
  transform-origin: left;
  animation: dashboard-line-reveal 800ms 140ms ease both;
}

.dashboard-header h1 {
  margin: 0;
  font-size: 36px;
  line-height: 1.05;
}

.dashboard-subtitle {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.dashboard-subtitle #active-alert-summary {
  color: var(--text);
  font-weight: 800;
}

.dashboard-actions {
  flex: 0 0 auto;
}

.dashboard-header-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.dashboard-header-meta time {
  min-width: 114px;
  text-align: right;
}

.dashboard-live-chip {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid rgb(var(--green-rgb) / 0.22);
  border-radius: 7px;
  color: var(--green-dark);
  background: rgb(var(--green-rgb) / 0.08);
}

.dashboard-live-signal {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 4px rgb(var(--green-rgb) / 0.12);
  animation: status-heartbeat 2.6s ease-in-out infinite;
}

.dashboard-page .summary-grid {
  gap: 10px;
  margin-bottom: 14px;
}

.dashboard-page .summary-card {
  --summary-accent: var(--green-rgb);
  min-height: 112px;
  gap: 9px;
  padding: 14px 15px 13px 17px;
  border-color: rgb(var(--summary-accent) / 0.16);
  background: rgb(var(--surface-rgb) / 0.98);
  box-shadow: 0 6px 18px rgba(15, 45, 35, 0.06);
  animation: dashboard-card-enter 520ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.dashboard-page .summary-card:nth-child(1) {
  animation-delay: 100ms;
}

.dashboard-page .summary-card:nth-child(2) {
  animation-delay: 165ms;
}

.dashboard-page .summary-card:nth-child(3) {
  animation-delay: 230ms;
}

.dashboard-page .summary-card:nth-child(4) {
  animation-delay: 295ms;
}

.dashboard-page .summary-card:hover {
  border-color: rgb(var(--summary-accent) / 0.38);
  box-shadow: 0 13px 28px rgb(var(--summary-accent) / 0.12);
  transform: translateY(-2px);
}

.dashboard-page .summary-card::before {
  inset: 12px auto 12px 0;
  width: 3px;
  height: auto;
  border-radius: 0 3px 3px 0;
  background: rgb(var(--summary-accent));
  transform-origin: center;
  animation: summary-accent-reveal 560ms 220ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.dashboard-page .summary-online {
  --summary-accent: var(--blue-rgb);
}

.dashboard-page .summary-mapped {
  --summary-accent: var(--amber-rgb);
}

.dashboard-page .summary-critical {
  --summary-accent: var(--red-rgb);
}

.summary-card-heading,
.summary-value-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.summary-indicator {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgb(var(--summary-accent));
  box-shadow: 0 0 0 4px rgb(var(--summary-accent) / 0.12);
}

.summary-indicator::after {
  position: absolute;
  inset: -5px;
  border: 1px solid rgb(var(--summary-accent) / 0.42);
  border-radius: inherit;
  content: "";
  animation: signal-ring 2.8s 800ms ease-out infinite;
}

.dashboard-page .summary-total::before {
  background: rgb(255 255 255 / 0.78);
}

.dashboard-page .summary-online::before {
  background: var(--blue);
}

.dashboard-page .summary-mapped::before {
  background: var(--amber);
}

.dashboard-page .summary-critical::before {
  background: var(--red);
}

.dashboard-page .summary-card strong {
  color: var(--text);
  font-size: 29px;
  font-variant-numeric: tabular-nums;
}

.dashboard-page .summary-total {
  color: #fff;
  border-color: transparent;
  background: var(--green-deep);
  box-shadow: 0 12px 28px rgb(var(--green-rgb) / 0.18);
}

.dashboard-page .summary-total:hover {
  border-color: transparent;
  box-shadow: 0 16px 32px rgb(var(--green-rgb) / 0.24);
}

.dashboard-page .summary-total strong,
.dashboard-page .summary-total .summary-label {
  color: #fff;
}

.dashboard-page .summary-total .summary-note,
.dashboard-page .summary-total .summary-value-row span {
  color: rgb(255 255 255 / 0.72);
}

.dashboard-page .summary-total .summary-indicator {
  background: #fff;
  box-shadow: 0 0 0 4px rgb(255 255 255 / 0.14);
}

.dashboard-page .summary-total .summary-indicator::after {
  border-color: rgb(255 255 255 / 0.42);
}

.dashboard-page .summary-online strong {
  color: var(--blue);
}

.dashboard-page .summary-mapped strong {
  color: var(--amber);
}

.dashboard-page .summary-critical strong {
  color: var(--red);
}

.summary-value-row span {
  align-self: flex-end;
  padding-bottom: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.dashboard-page .summary-note {
  line-height: 1.35;
  text-transform: none;
}

.dashboard-insights {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(310px, 0.8fr);
  gap: 12px;
  margin-bottom: 18px;
}

.dashboard-insights-limited {
  grid-template-columns: 1fr;
}

.dashboard-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(var(--surface-rgb) / 0.98);
  box-shadow: 0 8px 24px rgba(15, 45, 35, 0.07);
  animation: dashboard-panel-enter 560ms 280ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.dashboard-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 17px 12px;
  border-bottom: 1px solid var(--line);
}

.dashboard-panel-header h2 {
  margin: 0;
  font-size: 19px;
  line-height: 1.15;
}

.dashboard-panel-header .section-kicker {
  margin-bottom: 3px;
  font-size: 10px;
}

.dashboard-panel-link {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--green-dark);
  background: var(--surface-2);
  font-size: 11px;
  font-weight: 900;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.dashboard-panel-link:hover,
.dashboard-panel-link:focus-visible {
  border-color: rgb(var(--green-rgb) / 0.34);
  background: var(--green-soft);
  transform: translateY(-1px);
}

.network-health-content {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  min-height: 224px;
  padding: 18px 20px 20px;
}

.availability-ring {
  position: relative;
  display: grid;
  width: 148px;
  height: 148px;
  place-items: center;
  justify-self: center;
  border-radius: 50%;
  background: conic-gradient(var(--green) var(--availability), var(--surface-3) 0);
  box-shadow: inset 0 0 0 1px rgb(var(--green-rgb) / 0.08);
  animation: availability-ring-enter 760ms 360ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  transition: background 320ms ease;
}

.availability-ring::before {
  position: absolute;
  inset: 15px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(15, 45, 35, 0.08);
  content: "";
}

.availability-ring > div {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 3px;
  text-align: center;
}

.availability-ring strong {
  color: var(--green-dark);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 31px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.availability-ring span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.health-progress-list {
  display: grid;
  gap: 17px;
}

.health-progress-row {
  display: grid;
  gap: 8px;
}

.health-progress-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.health-progress-copy strong {
  color: var(--text);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.health-progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-3);
}

.health-progress-fill {
  display: block;
  width: var(--progress);
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transform-origin: left;
  animation: health-progress-enter 800ms 420ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  transition: width 320ms ease;
}

.health-progress-fill.progress-mapped {
  background: var(--amber);
}

.health-progress-fill.progress-critical {
  background: var(--red);
}

.priority-alert-panel {
  display: flex;
  min-height: 100%;
  flex-direction: column;
}

.dashboard-page .alert-banner-container.priority-alert-list {
  flex: 1;
  gap: 0;
  margin: 0;
  padding: 0 16px;
}

.dashboard-page .priority-alert-list .alert-banner,
.dashboard-page .priority-alert-list .alert-banner.severity-warning,
.dashboard-page .priority-alert-list .alert-banner.severity-critical {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 10px;
  min-height: 0;
  padding: 13px 2px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.dashboard-page .priority-alert-list .alert-banner:last-child {
  border-bottom: 0;
}

.dashboard-page .priority-alert-list .alert-banner:hover,
.dashboard-page .priority-alert-list .alert-banner:focus-visible {
  color: var(--green-dark);
  background: transparent;
  box-shadow: none;
  transform: translateX(2px);
}

.priority-alert-list .alert-banner-severity {
  grid-column: 1;
  min-width: 0;
  font-size: 9px;
}

.priority-alert-list .alert-banner-copy {
  grid-column: 1 / -1;
  grid-row: 2;
}

.priority-alert-list .alert-banner-copy strong {
  font-size: 13px;
}

.priority-alert-list .alert-banner-copy span {
  font-size: 12px;
}

.priority-alert-list .alert-banner-action {
  grid-column: 2;
  grid-row: 1;
  font-size: 10px;
}

.alert-clear-state {
  display: grid;
  min-height: 142px;
  place-content: center;
  gap: 4px;
  color: var(--muted);
  text-align: center;
}

.alert-clear-state strong {
  color: var(--green-dark);
  font-size: 16px;
}

.alert-clear-state span {
  font-size: 12px;
}

.priority-alert-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  padding: 9px 17px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: var(--surface-2);
  font-size: 10px;
  font-weight: 800;
}

.priority-alert-footer span:first-child {
  color: var(--red);
}

.dashboard-page .alert-banner-container {
  margin-bottom: 20px;
}

.dashboard-page .alert-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  min-height: 58px;
  padding: 10px 14px;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  animation: alert-banner-enter 440ms calc(310ms + var(--alert-delay, 0ms)) cubic-bezier(0.2, 0.8, 0.2, 1) both;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.dashboard-page .alert-banner:hover,
.dashboard-page .alert-banner:focus-visible {
  box-shadow: 0 12px 28px rgb(var(--red-rgb) / 0.12);
  transform: translateX(3px);
}

.dashboard-page .alert-banner.severity-warning {
  border-color: rgba(199, 131, 29, 0.36);
  background: linear-gradient(90deg, var(--amber-soft), var(--surface) 38%);
}

.dashboard-page .alert-banner.severity-critical {
  border-color: rgba(200, 59, 50, 0.34);
  background: linear-gradient(90deg, var(--red-soft), var(--surface) 38%);
}

.alert-banner-severity {
  min-width: 66px;
  color: var(--amber);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.severity-critical .alert-banner-severity {
  color: var(--red);
}

.alert-banner-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.alert-banner-copy span {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alert-banner-action {
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 900;
}

.map-page .map-panel {
  width: 100%;
  margin: 4px 0 28px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.map-page .map-panel-header {
  padding: 0 2px 12px;
  border: 0;
  background: transparent;
}

.section-kicker {
  margin: 0 0 5px;
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.map-page .map-panel-header h2,
.dashboard-page .dashboard-node-toolbar h2 {
  font-size: 23px;
}

.map-page .map-panel-header p:not(.section-kicker) {
  margin-top: 3px;
  font-size: 14px;
}

.map-legend {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.map-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(22, 131, 77, 0.12);
}

.legend-dot.offline {
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(200, 59, 50, 0.11);
}

.map-page .map-box {
  height: clamp(420px, calc(100vh - 300px), 680px);
  min-height: 420px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.map-page .map-controls {
  top: 12px;
  right: 12px;
}

.map-page .map-control-btn {
  min-width: 36px;
  min-height: 36px;
  padding: 5px 10px;
  border-radius: 7px;
}

.map-page .map-control-fit {
  min-width: 58px;
}

.node-section {
  margin-top: 0;
}

.dashboard-page .dashboard-node-toolbar {
  align-items: flex-end;
  margin-bottom: 14px;
  padding: 0 2px 13px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  animation: dashboard-toolbar-enter 520ms 340ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.node-toolbar-heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.node-toolbar-heading span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.node-toolbar-controls {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px;
}

.segmented-control {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 44px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.segmented-control button {
  min-height: 36px;
  padding: 0 11px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  box-shadow: none;
  font-size: 13px;
}

.segmented-control button:hover,
.segmented-control button.active {
  color: var(--green-dark);
  background: var(--surface);
  box-shadow: 0 3px 9px rgba(15, 45, 35, 0.08);
}

.dashboard-page .search-field {
  width: min(300px, 100%);
}

.dashboard-page .search-field input {
  background: rgb(var(--surface-rgb) / 0.95);
}

.dashboard-page .node-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 12px;
}

.dashboard-page .node-card {
  --node-accent: var(--green-rgb);
  position: relative;
  gap: 0;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 45, 35, 0.07);
  animation: node-card-enter 520ms calc(380ms + var(--node-delay, 0ms)) cubic-bezier(0.2, 0.8, 0.2, 1) both;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.dashboard-page .node-card[data-node-status="offline"] {
  --node-accent: var(--red-rgb);
}

.dashboard-page .node-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 1;
  width: 3px;
  background: rgb(var(--node-accent) / 0.82);
  content: "";
  transform: scaleY(0.34);
  transform-origin: center;
  transition: transform 220ms ease;
}

.dashboard-page .node-card:hover {
  border-color: rgb(var(--node-accent) / 0.36);
  box-shadow: 0 18px 38px rgb(var(--node-accent) / 0.13);
  transform: translateY(-4px);
}

.dashboard-page .node-card:hover::before,
.dashboard-page .node-card:focus-visible::before {
  transform: scaleY(1);
}

.dashboard-page .node-card:focus-visible {
  outline: 3px solid rgba(22, 131, 77, 0.2);
  outline-offset: 2px;
}

.dashboard-page .node-card-header {
  align-items: flex-start;
  padding: 16px 16px 10px;
}

.dashboard-page .node-card-title {
  align-items: flex-start;
  min-width: 0;
}

.dashboard-page .node-card-title > div {
  min-width: 0;
}

.dashboard-page .node-card-title .status-dot {
  margin-top: 5px;
}

.dashboard-page .status-dot.online {
  animation: status-heartbeat 2.6s ease-in-out infinite;
}

.dashboard-page .node-card h3 {
  overflow-wrap: anywhere;
  font-size: 18px;
}

.dashboard-page .node-location {
  margin-top: 3px;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.node-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 16px 14px;
}

.dashboard-page .node-id {
  margin: 0;
  padding: 0;
  color: var(--green-dark);
  background: transparent;
}

.dashboard-page .node-last-seen {
  overflow: hidden;
  font-size: 12px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-page .node-metrics {
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgb(var(--surface-rgb) / 0.72);
}

.dashboard-page .metric {
  min-height: 72px;
  gap: 5px;
  padding: 12px 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  transition: background-color 180ms ease;
}

.dashboard-page .metric:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.dashboard-page .metric:nth-child(-n + 2) {
  border-bottom: 1px solid var(--line);
}

.dashboard-page .metric-label {
  font-size: 10px;
}

.dashboard-page .metric-value {
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.node-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 10px 16px;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 900;
}

.node-card-footer span:last-child {
  font-size: 18px;
  line-height: 1;
  transition: transform 180ms ease;
}

.dashboard-page .node-card:hover .node-card-footer span:last-child {
  transform: translateX(4px);
}

.dashboard-page .node-card.node-card-updated {
  animation: node-card-live-update 680ms ease;
}

.dashboard-page .node-card.node-card-revealed {
  animation: node-card-reveal 340ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.dashboard-page .metric.metric-updated {
  animation: metric-live-update 720ms ease;
}

.dashboard-page .metric-value.value-updated,
.dashboard-page .summary-card strong.value-updated {
  animation: value-pop 440ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes dashboard-panel-enter {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

@keyframes availability-ring-enter {
  from {
    opacity: 0;
    transform: rotate(-14deg) scale(0.88);
  }
}

@keyframes health-progress-enter {
  from {
    transform: scaleX(0);
  }
}

@keyframes dashboard-header-enter {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
}

@keyframes dashboard-line-reveal {
  from {
    opacity: 0;
    transform: scaleX(0);
  }
}

@keyframes dashboard-card-enter {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

@keyframes summary-accent-reveal {
  from {
    transform: scaleY(0);
  }
}

@keyframes signal-ring {
  0% {
    opacity: 0.58;
    transform: scale(0.58);
  }
  68%,
  100% {
    opacity: 0;
    transform: scale(1.7);
  }
}

@keyframes alert-banner-enter {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }
}

@keyframes dashboard-toolbar-enter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

@keyframes node-card-enter {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
}

@keyframes node-card-reveal {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
}

@keyframes node-card-live-update {
  36% {
    border-color: rgb(var(--node-accent) / 0.52);
    box-shadow: 0 12px 34px rgb(var(--node-accent) / 0.17);
  }
}

@keyframes metric-live-update {
  35% {
    background: rgb(var(--node-accent) / 0.1);
  }
}

@keyframes value-pop {
  45% {
    color: rgb(var(--summary-accent, var(--node-accent, var(--green-rgb))));
    transform: translateY(-1px) scale(1.06);
  }
}

@keyframes status-heartbeat {
  50% {
    box-shadow: 0 0 0 6px rgb(var(--green-rgb) / 0.08);
    transform: scale(1.06);
  }
}

.mobile-nav {
  display: none;
}

@media (max-width: 860px) {
  .navbar {
    grid-template-columns: 1fr auto;
    padding: 12px 16px;
  }

  .navbar-links {
    display: none;
  }

  .brand-text small {
    display: none;
  }

  .brand-logo {
    width: min(150px, 48vw);
    height: 42px;
  }

  .navbar-utilities {
    gap: 10px;
  }

  .navbar .theme-switch {
    gap: 0;
  }

  .navbar .theme-switch-label {
    display: none;
  }

  .main-content {
    width: min(100% - 24px, 1240px);
    padding-bottom: 92px;
  }

  .toast-container {
    right: 12px;
    bottom: 92px;
    left: 12px;
  }

  .toast {
    max-width: none;
  }

  .dashboard-header {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .dashboard-header-meta {
    justify-content: space-between;
  }

  .dashboard-header-meta time {
    min-width: 0;
  }

  .dashboard-insights {
    grid-template-columns: 1fr;
  }

  .dashboard-actions {
    width: 100%;
  }

  .dashboard-actions .button-link {
    flex: 1;
  }

  .page-header,
  .node-toolbar,
  .map-panel-header {
    align-items: stretch;
    flex-direction: column;
  }

  .page-actions {
    width: 100%;
  }

  .page-actions .button-link {
    flex: 1;
  }

  .alerts-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .alert-view-control,
  .alert-search-form,
  .alert-search-field {
    width: 100%;
  }

  .alert-view-control a {
    flex: 1;
  }

  .graph-node-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .graph-metric-filters {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .graph-filter-label {
    width: 100%;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .node-toolbar-controls {
    width: 100%;
    justify-content: space-between;
  }

  .dashboard-page .search-field {
    flex: 1;
  }

  .dashboard-page .dashboard-node-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .map-panel {
    width: 100%;
  }

  .map-box {
    height: 260px;
  }

  .map-page .map-box {
    height: clamp(380px, calc(100vh - 300px), 560px);
    min-height: 380px;
  }

  .mobile-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgb(var(--surface-rgb) / 0.92);
    box-shadow: 0 16px 44px rgba(17, 24, 39, 0.18);
    backdrop-filter: blur(16px);
  }

  .mobile-nav.mobile-nav-limited {
    grid-template-columns: repeat(3, 1fr);
  }

  .mobile-nav a {
    display: grid;
    gap: 3px;
    min-height: 52px;
    place-items: center;
    border-radius: 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
  }

  .mobile-nav a span {
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 8px;
    background: var(--surface-2);
    font-size: 11px;
  }

  .mobile-nav a.active {
    color: var(--green-dark);
    background: var(--surface-2);
  }
}

@media (max-width: 620px) {
  .stat-row {
    grid-template-columns: 1fr;
  }

  .dashboard-header h1 {
    font-size: 34px;
  }

  .dashboard-header-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .dashboard-live-chip {
    min-height: 31px;
    padding: 6px 9px;
  }

  .network-health-content {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 18px 16px 20px;
  }

  .availability-ring {
    width: 132px;
    height: 132px;
  }

  .availability-ring strong {
    font-size: 28px;
  }

  .dashboard-panel-header {
    padding: 14px 15px 11px;
  }

  .dashboard-panel-link {
    padding: 7px 8px;
  }

  .dashboard-page .alert-banner-container.priority-alert-list {
    padding: 0 14px;
  }

  .navbar {
    gap: 10px;
  }

  .brand-logo {
    width: min(125px, 36vw);
  }

  .navbar-status {
    font-size: 12px;
  }

  #ws-status-text {
    display: none;
  }

  .navbar-account {
    padding-left: 7px;
  }

  .logout-button {
    padding: 0 8px;
    font-size: 11px;
  }

  .summary-grid.summary-grid-limited {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-grid.summary-grid-limited .summary-card:last-child {
    grid-column: 1 / -1;
  }

  .access-denied h1 {
    font-size: 32px;
  }

  .notification-panel {
    position: fixed;
    top: 70px;
    left: 12px;
    right: 12px;
    width: auto;
    max-height: calc(100vh - 94px);
  }

  .notification-list {
    max-height: calc(100vh - 176px);
  }

  .graph-metric-filters {
    align-items: stretch;
    flex-direction: column;
    gap: 9px;
  }

  .graph-filter-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-filter {
    min-width: 0;
  }

  .metric-filter:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .graph-show-all {
    width: 100%;
  }

  .dashboard-page .summary-grid {
    gap: 10px;
  }

  .dashboard-page .summary-card {
    min-height: 124px;
    padding: 14px 13px 13px 15px;
  }

  .dashboard-page .summary-card strong {
    font-size: 27px;
  }

  .dashboard-page .summary-note {
    font-size: 11px;
  }

  .dashboard-page .alert-banner {
    grid-template-columns: 1fr auto;
    gap: 5px 10px;
  }

  .alert-banner-severity {
    grid-column: 1;
  }

  .alert-banner-copy {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .alert-banner-action {
    grid-column: 2;
    grid-row: 1;
  }

  .alert-banner-copy span {
    white-space: normal;
  }

  .node-toolbar-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .segmented-control {
    width: 100%;
  }

  .segmented-control button {
    flex: 1;
  }

  .dashboard-page .search-field {
    width: 100%;
  }

  .dashboard-page .node-card-header {
    gap: 8px;
  }

  .node-card-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .dashboard-page .node-last-seen {
    text-align: left;
  }

  .form-row {
    align-items: stretch;
    flex-direction: column;
  }

  .form-row label {
    min-width: 0;
  }

  .alert-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .alert-overview-item {
    min-height: 80px;
    padding: 12px 13px;
  }

  .alert-overview-item.archived {
    grid-column: 1 / -1;
  }

  .alert-overview-item strong {
    font-size: 28px;
  }

  .alert-view-control {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .alert-view-control a {
    min-width: 0;
  }

  .alerts-pagination {
    max-width: 100%;
    gap: 4px;
  }

  .pagination-pages {
    min-width: 0;
    max-width: calc(100% - 76px);
    justify-content: flex-start;
    overflow-x: auto;
    padding: 2px;
    scrollbar-width: thin;
  }

  .pagination-arrow,
  .pagination-page {
    width: 34px;
    height: 34px;
    min-height: 34px;
    flex-basis: 34px;
  }

  .pagination-ellipsis {
    width: 18px;
    height: 34px;
    flex: 0 0 18px;
  }

  .alert-record {
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 10px;
    padding: 14px 13px;
  }

  .alert-record-marker {
    width: 25px;
    height: 25px;
  }

  .alert-record-topline,
  .alert-record-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .alert-record time {
    text-align: left;
  }

  .alert-record-footer a {
    width: 100%;
    padding-top: 3px;
  }

  .map-box {
    height: 230px;
  }

  .map-page .map-box {
    height: clamp(340px, calc(100vh - 320px), 520px);
    min-height: 340px;
  }

  .chart-section-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .chart-history-status {
    text-align: left;
  }

  .chart-canvas-wrap {
    height: 240px;
  }

  .chart-canvas-wrap-combined {
    height: 340px;
  }

  .network-quality-metrics {
    grid-template-columns: 1fr;
  }

  .network-quality-item {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    min-height: 64px;
    gap: 12px;
    padding: 14px;
  }

  .network-quality-item dd {
    align-self: center;
    font-size: 22px;
    text-align: right;
  }

  .sensor-records-header,
  .sensor-records-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .sensor-records-page-size,
  .sensor-records-search,
  .sensor-records-pagination,
  .sensor-records-controls {
    width: 100%;
  }

  .sensor-records-controls {
    align-items: stretch;
    flex-direction: column;
    gap: 9px;
  }

  .sensor-records-page-size {
    justify-content: space-between;
  }

  .sensor-records-search {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .sensor-records-search input {
    width: 100%;
  }

  .sensor-records-pagination {
    justify-content: space-between;
    overflow-x: auto;
  }

  .sensor-records-pages {
    flex: 1;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Command center shell */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.app-shell {
  --sidebar-width: 220px;
  --topbar-height: 74px;
  min-width: 320px;
  background: #f4f7fb;
}

html[data-theme="dark"] body.app-shell {
  background: var(--bg);
}

html[data-theme="dark"] .app-sidebar {
  border-right: 1px solid #202020;
  background: #030303;
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.3);
}

html[data-theme="dark"] .sidebar-nav a:hover,
html[data-theme="dark"] .sidebar-nav a.active {
  border-color: #303a35;
  background: #171a18;
}

html[data-theme="dark"] .sidebar-gateway {
  border-color: #292d2b;
  background: #101110;
}

.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  display: flex;
  width: var(--sidebar-width);
  min-height: 100vh;
  flex-direction: column;
  overflow-y: auto;
  color: #d9e7f6;
  background: #071d35;
  box-shadow: 10px 0 30px rgba(7, 29, 53, 0.12);
}

.sidebar-brand {
  display: flex;
  min-height: var(--topbar-height);
  align-items: center;
  padding: 12px 21px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.sidebar-brand img {
  display: block;
  width: 158px;
  height: 48px;
  object-fit: contain;
  object-position: left center;
  filter: brightness(0) invert(1);
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.sidebar-nav {
  display: grid;
  gap: 7px;
  padding: 22px 14px;
}

.sidebar-nav a {
  position: relative;
  display: flex;
  min-height: 50px;
  align-items: center;
  gap: 13px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #b8c9dc;
  font-size: 14px;
  font-weight: 600;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.sidebar-nav a::before {
  position: absolute;
  top: 11px;
  bottom: 11px;
  left: -15px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: #54a0ff;
  content: "";
  opacity: 0;
  transform: scaleY(0.4);
  transition: opacity 160ms ease, transform 160ms ease;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  color: #fff;
  border-color: rgba(107, 164, 255, 0.2);
  background: #123d74;
  transform: translateX(2px);
}

.sidebar-nav a.active::before {
  opacity: 1;
  transform: scaleY(1);
}

.sidebar-nav svg {
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
}

.sidebar-gateway {
  display: grid;
  gap: 14px;
  margin: auto 14px 18px;
  padding: 15px;
  border: 1px solid rgba(133, 181, 235, 0.15);
  border-radius: 8px;
  background: #0c2b4d;
}

.sidebar-gateway-heading {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.sidebar-gateway-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 7px;
  color: #70b7ff;
  background: rgba(58, 135, 218, 0.15);
}

.sidebar-gateway-icon svg {
  width: 19px;
}

.sidebar-gateway-heading div,
.sidebar-gateway-meta {
  display: grid;
  gap: 2px;
}

.sidebar-gateway-heading span,
.sidebar-gateway-meta span {
  color: #8fa8c2;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.sidebar-gateway-heading strong {
  color: #50d38a;
  font-size: 12px;
  text-transform: uppercase;
}

.sidebar-gateway-meta {
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.sidebar-gateway-meta strong {
  color: #fff;
  font-size: 12px;
}

.sidebar-theme-control {
  min-height: 32px;
  padding-top: 11px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  color: #b8c9dc;
}

.sidebar-theme-control > svg {
  width: 16px;
}

.sidebar-theme-control > span:not(.theme-switch-track) {
  margin-right: auto;
  font-size: 10px;
  text-transform: uppercase;
}

.app-topbar {
  position: fixed;
  top: 0;
  right: 0;
  left: var(--sidebar-width);
  z-index: 50;
  display: flex;
  height: var(--topbar-height);
  align-items: center;
  gap: 20px;
  padding: 0 24px;
  border-bottom: 1px solid #dfe6ef;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 4px 18px rgba(15, 38, 65, 0.04);
  backdrop-filter: blur(14px);
}

.alert-feedback-form {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(220px, 1.5fr) auto;
  gap: 0.75rem;
  align-items: end;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.alert-feedback-form label {
  display: grid;
  gap: 0.35rem;
}

.alert-feedback-form label > span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.alert-feedback-form select,
.alert-feedback-form input {
  width: 100%;
}

@media (max-width: 760px) {
  .alert-feedback-form {
    grid-template-columns: 1fr;
  }
}

.topbar-mobile-brand,
.mobile-theme-button {
  display: none;
}

.topbar-brand-logo {
  display: flex;
  width: 56px;
  height: 48px;
  flex: 0 0 56px;
  align-items: center;
  justify-content: center;
}

.topbar-brand-logo img {
  display: block;
  width: 54px;
  max-height: 42px;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.topbar-mobile-brand img {
  display: block;
  max-width: 100%;
  height: 36px;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

html[data-theme="dark"] .app-topbar {
  border-color: var(--line);
  background: rgb(var(--surface-rgb) / 0.96);
}

.topbar-title {
  display: grid;
  min-width: 240px;
  gap: 1px;
}

.topbar-title strong {
  color: var(--text);
  font-size: 18px;
  line-height: 1.2;
}

.topbar-title span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.topbar-utilities {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
  margin-left: auto;
}

.topbar-clock,
.topbar-gateway-status,
.topbar-account {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.topbar-clock {
  padding-right: 14px;
  border-right: 1px solid var(--line);
}

.topbar-clock svg {
  width: 17px;
  color: #315a88;
}

.topbar-clock-divider {
  width: 1px;
  height: 15px;
  margin: 0 3px;
  background: var(--line);
}

.topbar-gateway-status {
  min-width: 145px;
  justify-content: center;
  padding: 0 13px;
  border-radius: 8px;
  color: #176947;
  background: #e7f7ef;
}

html[data-theme="dark"] .topbar-gateway-status {
  color: var(--green-dark);
  background: var(--green-soft);
}

.topbar-gateway-status strong {
  text-transform: uppercase;
}

.topbar-icon-button {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  min-height: 38px;
  flex: 0 0 38px;
  padding: 0;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #233d5d;
  background: transparent;
  box-shadow: none;
}

.topbar-icon-button:hover,
.topbar-icon-button:focus-visible {
  border-color: var(--line);
  color: #1554ad;
  background: var(--surface-2);
  box-shadow: none;
}

.topbar-icon-button svg {
  width: 19px;
  height: 19px;
}

.sidebar-toggle {
  display: none;
}

.topbar-account {
  min-width: 0;
  max-width: 190px;
  padding-left: 7px;
  border-left: 1px solid var(--line);
}

.topbar-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #1557c0;
}

.topbar-avatar svg {
  width: 18px;
}

.topbar-account-email {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
}

.topbar-user-install {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid rgb(var(--green-rgb) / 0.32);
  border-radius: 11px;
  color: var(--green-dark);
  background: var(--green-soft);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.topbar-user-install:hover {
  border-color: rgb(var(--green-rgb) / 0.55);
  background: rgb(var(--green-rgb) / 0.16);
}

.topbar-user-install svg {
  width: 16px;
  height: 16px;
}

.topbar-user-install[hidden] {
  display: none;
}

.app-topbar .logout-form {
  display: flex;
}

.app-topbar .logout-button {
  width: 38px;
  min-height: 38px;
  padding: 0;
  border: 1px solid transparent;
  color: var(--muted);
  background: transparent;
  box-shadow: none;
  font-size: 0;
}

.app-topbar .notification-button {
  color: #233d5d;
  background: transparent;
}

.app-topbar .notification-button.has-critical {
  border-color: rgba(220, 38, 38, 0.2);
  color: #dc2626;
  background: #fff1f1;
}

.app-topbar .notification-count {
  top: -3px;
  right: -3px;
}

.app-topbar .notification-panel {
  top: calc(100% + 13px);
  right: -58px;
}

.sidebar-scrim {
  display: none;
}

.sidebar-scrim[hidden] {
  display: none !important;
}

body.app-shell .main-content {
  width: auto;
  max-width: none;
  min-height: 100vh;
  margin: 0 0 0 var(--sidebar-width);
  padding: calc(var(--topbar-height) + 20px) 24px 48px;
}

/* Dashboard command center */
.dashboard-command-center {
  width: min(100%, 1480px);
  margin: 0 auto;
}

.command-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 14px;
  animation: command-rise 420ms ease both;
}

.command-header .eyebrow {
  margin-bottom: 4px;
  color: #2563a8;
}

.command-header h1 {
  margin: 0;
  font-size: 27px;
  line-height: 1.1;
}

.command-header p:last-child {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.command-header-status {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.command-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.command-summary-grid-limited {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.command-summary-card {
  display: grid;
  min-width: 0;
  min-height: 110px;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  padding: 14px 16px;
  border: 1px solid #dfe7f0;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 5px 16px rgba(25, 53, 84, 0.06);
  animation: command-rise 440ms ease both;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.command-summary-card:nth-child(2) { animation-delay: 50ms; }
.command-summary-card:nth-child(3) { animation-delay: 100ms; }
.command-summary-card:nth-child(4) { animation-delay: 150ms; }

.command-summary-card:hover {
  border-color: #bdcce0;
  box-shadow: 0 10px 24px rgba(25, 53, 84, 0.1);
  transform: translateY(-2px);
}

html[data-theme="dark"] .command-summary-card,
html[data-theme="dark"] .ops-panel {
  border-color: var(--line);
}

.command-summary-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 50%;
}

.command-summary-icon svg {
  width: 28px;
  height: 28px;
}

.summary-active-nodes .command-summary-icon {
  color: #145ed1;
  background: #e8f0ff;
}

.summary-high-risk .command-summary-icon {
  color: #dc2626;
  background: #fee8e8;
}

.summary-moderate-risk .command-summary-icon {
  color: #e87900;
  background: #fff0de;
}

.summary-low-risk .command-summary-icon {
  color: #078651;
  background: #e4f7ee;
}

.summary-gateway .command-summary-icon {
  color: #098a57;
  background: #e4f7ee;
}

.command-summary-card > div {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 1px 8px;
}

.command-summary-label {
  grid-column: 1 / -1;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.command-summary-card strong {
  min-width: 0;
  color: #1554b7;
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 28px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.summary-high-risk strong { color: #dc2626; }
.summary-moderate-risk strong { color: #e87900; }
.summary-low-risk strong { color: #078651; }
.summary-gateway strong { color: #078651; }

.command-summary-card strong.gateway-word {
  font-family: inherit;
  font-size: 17px;
  text-transform: uppercase;
}

.command-summary-card small {
  display: flex;
  min-width: 0;
  grid-column: 1 / -1;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
}

.mini-status-dot.green { background: #0b9b62; }
.mini-status-dot.red { background: #e12d2d; }
.mini-status-dot.amber { background: #ec8a00; }

.command-primary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(330px, 0.88fr);
  gap: 14px;
  margin-bottom: 14px;
}

.ops-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dfe7f0;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 5px 18px rgba(25, 53, 84, 0.06);
  animation: command-rise 500ms 100ms ease both;
}

.ops-panel-header {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.ops-panel-header > div {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.ops-panel-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.ops-panel-title svg {
  width: 18px;
  color: #275f9f;
}

.ops-panel-header small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-panel-header > a,
.live-label {
  color: #1557c0;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.icon-link {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  background: var(--surface-2);
}

.icon-link svg {
  width: 16px;
}

.dashboard-map-box,
.dashboard-page .dashboard-map-box {
  position: relative;
  height: 390px;
  min-height: 390px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
}

.dashboard-map-box .node-map {
  width: 100%;
  height: 100%;
  min-height: 390px;
}

.dashboard-map-controls {
  top: 12px;
  right: 12px;
  bottom: auto;
  left: auto;
  display: grid;
  gap: 5px;
}

.dashboard-map-controls .map-control-btn {
  display: grid;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  place-items: center;
  border-radius: 6px;
}

.dashboard-map-controls svg {
  width: 16px;
}

.dashboard-map-legend {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 12px;
  border: 1px solid rgba(219, 228, 238, 0.9);
  border-radius: 7px;
  color: #24364d;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 5px 14px rgba(20, 40, 65, 0.12);
  font-size: 10px;
  font-weight: 700;
}

.dashboard-map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.risk-focus-panel {
  display: flex;
  min-height: 438px;
  flex-direction: column;
}

.risk-focus-header {
  display: grid;
  min-height: 56px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  color: #fff;
  background: #d82b2b;
}

.risk-focus-panel.severity-warning .risk-focus-header {
  background: #df7a00;
}

.risk-focus-header svg {
  width: 22px;
}

.risk-focus-header strong {
  font-size: 16px;
  text-transform: uppercase;
}

.risk-focus-header time {
  font-size: 10px;
  font-weight: 700;
}

.risk-focus-body {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  padding: 15px 16px;
}

.risk-focus-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.risk-focus-title > div {
  min-width: 0;
}

.risk-focus-title span:first-child {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.risk-focus-title h2 {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
  color: #d82b2b;
  font-size: 20px;
}

.severity-warning .risk-focus-title h2 {
  color: #d97200;
}

.risk-severity-label {
  flex: 0 0 auto;
  padding: 5px 7px;
  border-radius: 5px;
  color: #b91c1c;
  background: #feeaea;
  font-size: 9px;
  font-weight: 800;
}

.severity-warning .risk-severity-label {
  color: #b65f00;
  background: #fff0dd;
}

.risk-message {
  margin: 7px 0 9px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.risk-metric-list {
  margin: 0;
  border-top: 1px solid var(--line);
}

.risk-metric-list > div {
  display: grid;
  min-height: 54px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.risk-metric-list dt {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
}

.risk-metric-list dt > span {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.risk-metric-list dt small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.risk-metric-list svg {
  width: 17px;
  flex: 0 0 17px;
  color: #34516f;
}

.risk-metric-list dd {
  margin: 0;
  color: #d82b2b;
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 15px;
  font-weight: 700;
  text-align: right;
}

.severity-warning .risk-metric-list dd {
  color: #d97200;
}

.risk-metric-list dd.risk-coordinate {
  max-width: 118px;
  color: var(--muted);
  font-size: 9px;
  overflow-wrap: anywhere;
}

.risk-focus-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
}

.risk-focus-actions .button-link {
  min-width: 0;
  min-height: 38px;
  padding: 8px 10px;
  gap: 6px;
  font-size: 10px;
}

.risk-focus-actions svg {
  width: 15px;
}

.risk-clear-state,
.observer-panel {
  display: grid;
  min-height: 438px;
  place-content: center;
  justify-items: center;
  gap: 8px;
  padding: 30px;
  text-align: center;
}

.risk-clear-state > span,
.observer-panel-icon {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 50%;
  color: #078651;
  background: #e4f7ee;
}

.risk-clear-state svg,
.observer-panel-icon svg {
  width: 30px;
}

.risk-clear-state h2,
.observer-panel h2 {
  margin: 0;
  font-size: 21px;
}

.risk-clear-state p:last-child,
.observer-panel > p:not(.eyebrow) {
  max-width: 260px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.observer-panel .button-link {
  margin-top: 8px;
}

.command-secondary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(330px, 1.25fr);
  gap: 14px;
  margin-bottom: 14px;
}

.compact-chart-wrap {
  position: relative;
  height: 190px;
  min-height: 190px;
  padding: 11px 10px 8px;
}

.compact-chart-wrap canvas {
  width: 100% !important;
  height: 100% !important;
}

.command-alert-list,
.dashboard-page .alert-banner-container.command-alert-list {
  display: grid;
  gap: 0;
  min-height: 190px;
  margin: 0;
  padding: 0 13px;
}

.dashboard-page .command-alert-list .alert-banner,
.dashboard-page .command-alert-list .alert-banner.severity-warning,
.dashboard-page .command-alert-list .alert-banner.severity-critical {
  display: grid;
  min-height: 58px;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 10px;
  align-content: center;
  padding: 9px 1px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.dashboard-page .command-alert-list .alert-banner:last-child {
  border-bottom: 0;
}

.command-alert-list .alert-banner-severity {
  grid-column: 1;
  width: fit-content;
  padding: 3px 6px;
  border-radius: 4px;
  color: #fff;
  background: #e12d2d;
  font-size: 8px;
}

.command-alert-list .severity-warning .alert-banner-severity {
  background: #e98a00;
}

.command-alert-list .alert-banner-copy {
  grid-column: 1 / -1;
  grid-row: 2;
  min-width: 0;
}

.command-alert-list .alert-banner-copy strong {
  font-size: 11px;
}

.command-alert-list .alert-banner-copy span {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-alert-list time,
.command-alert-list .alert-banner-action {
  grid-column: 2;
  grid-row: 1;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.recent-alerts-panel .priority-alert-footer {
  min-height: 35px;
  padding: 8px 13px;
}

.observer-summary-content {
  display: grid;
  min-height: 225px;
  place-content: center;
  justify-items: center;
  gap: 4px;
}

.observer-summary-content strong {
  color: #1557c0;
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 34px;
}

.observer-summary-content span {
  color: var(--muted);
  font-size: 11px;
}

.observer-summary-content a {
  margin-top: 8px;
  color: #1557c0;
  font-size: 11px;
  font-weight: 800;
}

.link-quality-panel {
  margin-bottom: 18px;
}

.link-quality-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.link-quality-node {
  min-width: 0;
  padding: 13px 15px 15px;
  border-right: 1px solid var(--line);
}

.link-quality-node:last-child {
  border-right: 0;
}

.link-quality-node-title {
  display: grid;
  min-width: 0;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  margin-bottom: 11px;
}

.link-quality-node-title strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-quality-node-title small {
  color: var(--muted);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 9px;
}

.link-quality-node dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.link-quality-node dl > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.link-quality-node dt {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.link-quality-node dd {
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-node-section {
  padding-top: 0;
}

.dashboard-command-center .dashboard-node-toolbar {
  margin-bottom: 11px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.dashboard-command-center .node-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-command-center .node-card {
  border-color: #dfe7f0;
  box-shadow: 0 4px 15px rgba(25, 53, 84, 0.055);
}

.dashboard-command-center .node-card:hover {
  box-shadow: 0 12px 26px rgba(25, 53, 84, 0.11);
}

.dashboard-command-center .node-card-footer svg {
  width: 17px;
  transition: transform 160ms ease;
}

.dashboard-command-center .node-card:hover .node-card-footer svg {
  transform: translateX(3px);
}

@keyframes command-rise {
  from {
    opacity: 0;
    transform: translateY(9px);
  }
}

@media (max-width: 1320px) {
  .topbar-clock time:first-of-type,
  .topbar-clock-divider,
  .topbar-account-email {
    display: none;
  }

  .topbar-account {
    padding-left: 0;
    border-left: 0;
  }

  .command-secondary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .recent-alerts-panel {
    grid-column: 1 / -1;
  }

  .command-alert-list,
  .dashboard-page .alert-banner-container.command-alert-list {
    min-height: 0;
  }
}

@media (max-width: 1120px) {
  .topbar-title strong {
    font-size: 15px;
  }

  .topbar-gateway-status span:not(.status-dot) {
    display: none;
  }

  .topbar-gateway-status {
    min-width: 94px;
  }

  .command-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .command-primary-grid {
    grid-template-columns: minmax(0, 1.55fr) minmax(290px, 0.8fr);
  }

  .dashboard-command-center .node-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  body.app-shell {
    --sidebar-width: 0px;
  }

  .app-sidebar {
    width: 220px;
    transform: translateX(-104%);
    transition: transform 220ms ease;
  }

  body.sidebar-open .app-sidebar {
    transform: translateX(0);
  }

  .app-topbar {
    left: 0;
    padding: 0 16px;
  }

  .sidebar-toggle {
    display: grid;
  }

  .sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 55;
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: rgba(6, 18, 32, 0.48);
    backdrop-filter: blur(2px);
  }

  body.app-shell .main-content {
    margin-left: 0;
    padding-right: 16px;
    padding-left: 16px;
  }

  .command-primary-grid {
    grid-template-columns: 1fr;
  }

  .risk-focus-panel,
  .risk-clear-state,
  .observer-panel {
    min-height: 0;
  }

  .risk-focus-actions {
    margin-top: 12px;
  }
}

@media (max-width: 760px) {
  body.app-shell {
    --topbar-height: 66px;
  }

  .app-topbar {
    position: fixed;
    gap: 9px;
    padding: 0 12px;
  }

  .topbar-title {
    display: none;
  }

  .topbar-brand-logo {
    display: none;
  }

  .topbar-title strong {
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar-title span,
  .topbar-clock,
  .topbar-gateway-status,
  .topbar-account {
    display: none;
  }

  .topbar-utilities {
    gap: 4px;
    margin-left: auto;
  }

  .sidebar-toggle,
  .topbar-utilities {
    position: relative;
    z-index: 2;
  }

  .topbar-mobile-brand {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
    display: flex;
    width: 68px;
    height: 42px;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%);
  }

  html[data-theme="dark"] .topbar-mobile-brand img {
    filter: brightness(0) invert(1);
  }

  .mobile-theme-button {
    display: grid;
  }

  body.app-shell .main-content {
    padding-top: calc(var(--topbar-height) + 14px);
    padding-right: 12px;
    padding-bottom: 92px;
    padding-left: 12px;
  }

  .command-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }

  .command-header h1 {
    font-size: 23px;
  }

  .command-header-status {
    width: 100%;
    justify-content: space-between;
  }

  .command-summary-grid,
  .command-summary-grid-limited {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .command-summary-card {
    min-height: 104px;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 9px;
    padding: 12px;
  }

  .command-summary-icon {
    width: 42px;
    height: 42px;
  }

  .command-summary-icon svg {
    width: 21px;
    height: 21px;
  }

  .command-summary-card strong {
    font-size: 23px;
  }

  .command-summary-card strong.gateway-word {
    font-size: 13px;
  }

  .command-summary-card small {
    font-size: 9px;
  }

  .dashboard-map-box,
  .dashboard-page .dashboard-map-box,
  .dashboard-map-box .node-map {
    height: 320px;
    min-height: 320px;
  }

  .command-secondary-grid {
    grid-template-columns: 1fr;
  }

  .recent-alerts-panel {
    grid-column: auto;
  }

  .link-quality-grid {
    grid-template-columns: 1fr;
  }

  .link-quality-node {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .link-quality-node:last-child {
    border-bottom: 0;
  }

  .dashboard-command-center .node-grid {
    grid-template-columns: 1fr;
  }

  .mobile-nav a {
    display: grid;
    min-width: 0;
    grid-template-rows: 22px auto;
    gap: 3px;
  }

  .mobile-nav a svg {
    width: 20px;
    height: 20px;
  }

  .mobile-nav a span {
    display: block;
    width: auto;
    height: auto;
    overflow: hidden;
    color: inherit;
    background: transparent;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .app-topbar .notification-panel {
    top: 70px;
    right: 12px;
    left: 12px;
  }
}

@media (max-width: 430px) {
  .command-summary-grid,
  .command-summary-grid-limited {
    grid-template-columns: 1fr;
  }

  .command-summary-card {
    min-height: 92px;
  }

  .risk-focus-actions {
    grid-template-columns: 1fr;
  }

  .dashboard-map-box,
  .dashboard-page .dashboard-map-box,
  .dashboard-map-box .node-map {
    height: 285px;
    min-height: 285px;
  }

  .dashboard-map-legend {
    gap: 8px;
    padding: 7px 9px;
  }
}

@media (max-width: 1180px) {
  .auth-shell {
    grid-template-columns: minmax(0, 52%) minmax(0, 48%);
  }

  .auth-showcase-content {
    padding: 42px 40px 32px;
  }

  .auth-showcase-logo {
    width: 190px;
    height: 64px;
  }

  .auth-showcase-copy {
    width: 100%;
    margin-top: 42px;
  }

  .auth-showcase-title {
    font-size: 48px;
  }

  .auth-showcase-subtitle {
    font-size: 15px;
  }

  .auth-feature-list {
    gap: 14px;
  }

  .auth-feature-list li {
    min-width: 130px;
  }

  .auth-network-links-default {
    display: none;
  }

  .auth-network-links-compact {
    display: inline;
  }

  .auth-network-gateway {
    top: 86%;
  }

  .auth-network-marker.marker-one {
    top: 74%;
  }

  .auth-network-marker.marker-two {
    top: 62%;
    left: 86%;
  }

  .auth-network-marker.marker-three {
    top: 68%;
    left: 68%;
  }

  .auth-access {
    padding-right: 32px;
    padding-left: 32px;
  }
}

@media (max-width: 980px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-showcase {
    display: none;
  }

  .auth-access {
    min-height: 100vh;
    min-height: 100svh;
    padding: 70px 24px 34px;
  }

  .auth-mobile-logo {
    display: block;
    width: 152px;
    height: 58px;
    margin: 0 auto 18px;
  }
}

@media (max-width: 560px) {
  .auth-access {
    align-items: start;
    padding: 64px 12px 24px;
  }

  .auth-theme-switch,
  .auth-theme-button {
    top: 16px;
    right: 16px;
  }

  .auth-theme-switch-label {
    display: none;
  }

  .auth-panel {
    padding: 28px 20px 25px;
  }

  .auth-heading {
    margin-bottom: 23px;
  }

  .auth-heading h1 {
    font-size: 32px;
  }

  .auth-heading p:last-child {
    font-size: 13px;
  }

  .auth-form {
    gap: 16px;
  }

  .auth-system-status {
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left;
  }

  .auth-access-note {
    margin-top: 18px;
  }
}

@media (min-width: 981px) and (max-height: 760px) {
  .auth-showcase-content {
    padding: 28px 42px 24px;
  }

  .auth-showcase-logo {
    width: 175px;
    height: 56px;
  }

  .auth-showcase-copy {
    margin-top: 24px;
  }

  .auth-showcase-kicker {
    margin-bottom: 8px;
  }

  .auth-showcase-title {
    font-size: 44px;
  }

  .auth-showcase-subtitle {
    margin-top: 12px;
    font-size: 14px;
  }

  .auth-feature-list {
    margin-top: 18px;
  }

  .auth-network-links-default {
    display: none;
  }

  .auth-network-links-compact {
    display: inline;
  }

  .auth-network-gateway {
    top: 86%;
  }

  .auth-network-marker.marker-one {
    top: 74%;
  }

  .auth-network-marker.marker-two {
    top: 62%;
    left: 86%;
  }

  .auth-network-marker.marker-three {
    top: 68%;
    left: 68%;
  }

  .auth-access {
    padding: 42px 30px 25px;
  }

  .auth-panel {
    padding: 30px 38px 28px;
  }

  .auth-heading {
    margin-bottom: 19px;
  }

  .auth-heading h1 {
    font-size: 34px;
  }

  .auth-form {
    gap: 13px;
  }

  .auth-input-shell {
    min-height: 48px;
  }

  .auth-system-status {
    margin-top: 15px;
  }

  .auth-access-note {
    margin-top: 16px;
  }
}

/* User management */
.user-page-header {
  align-items: center;
}

.user-account-summary {
  display: grid;
  min-width: 290px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

.user-account-summary span {
  display: grid;
  min-height: 66px;
  place-content: center;
  padding: 8px 15px;
  text-align: center;
}

.user-account-summary span + span {
  border-left: 1px solid var(--line);
}

.user-account-summary strong {
  color: var(--green-dark);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 22px;
}

.user-account-summary small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.user-flash-list {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.user-flash {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  border: 1px solid rgba(22, 131, 77, 0.24);
  border-radius: 7px;
  color: var(--green-dark);
  background: var(--green-soft);
  font-size: 13px;
  font-weight: 700;
}

.user-flash.error {
  border-color: rgba(200, 59, 50, 0.24);
  color: var(--red);
  background: var(--red-soft);
}

.user-flash svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.user-management-layout {
  display: grid;
  grid-template-columns: minmax(285px, 340px) minmax(0, 1fr);
  align-items: start;
  gap: 16px;
}

.user-create-panel,
.user-directory-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.user-create-panel {
  padding: 18px;
}

.user-panel-header {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 18px;
}

.user-panel-header h2,
.user-panel-header p,
.user-directory-header h2,
.user-directory-header p {
  margin: 0;
}

.user-panel-header h2,
.user-directory-header h2 {
  font-size: 20px;
}

.user-panel-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 7px;
  color: var(--green-dark);
  background: var(--green-soft);
}

.user-panel-icon svg {
  width: 21px;
  height: 21px;
}

.user-create-form {
  display: grid;
  gap: 13px;
}

.user-form-field {
  display: grid;
  gap: 6px;
}

.user-form-field > span {
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.user-field-hint {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

[data-barangay-scope-field].is-optional > span::after {
  color: var(--muted);
  content: " (Admin sees all)";
  font-weight: 600;
  text-transform: none;
}

.user-form-field input,
.user-form-field select {
  width: 100%;
  min-height: 42px;
  font-size: 13px;
}

.user-access-guide {
  display: grid;
  gap: 8px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.user-access-guide > div {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.user-access-guide svg {
  width: 17px;
  height: 17px;
  color: var(--green-dark);
}

.user-access-guide strong {
  color: var(--text);
}

.user-create-button {
  width: 100%;
  gap: 8px;
  margin-top: 3px;
}

.user-create-button svg {
  width: 17px;
  height: 17px;
}

.user-directory-panel {
  overflow: hidden;
}

.user-directory-header {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 17px;
  border-bottom: 1px solid var(--line);
}

.user-total-count {
  padding: 6px 9px;
  border-radius: 6px;
  color: var(--green-dark);
  background: var(--green-soft);
  font-size: 11px;
  font-weight: 800;
}

.user-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.user-table {
  width: 100%;
  min-width: 1020px;
  border-collapse: collapse;
  font-size: 12px;
}

.user-scope-input {
  width: 100%;
  min-width: 125px;
  min-height: 34px;
  padding: 6px 8px;
  font-size: 11px;
}

.user-scope-all {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.node-barangay-form {
  display: grid;
  min-width: 165px;
  grid-template-columns: minmax(110px, 1fr) 34px;
  gap: 6px;
}

.node-barangay-form input {
  grid-column: 1;
}

.node-barangay-form button {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.node-barangay-form input {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 6px 8px;
  font-size: 11px;
}

.node-barangay-form button {
  display: grid;
  width: 34px;
  min-height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--green-dark);
  background: var(--green-soft);
  cursor: pointer;
}

.node-barangay-form button:hover {
  border-color: var(--green);
}

.node-barangay-form svg {
  width: 15px;
  height: 15px;
}

.user-table th,
.user-table td {
  padding: 13px 12px;
  text-align: left;
  vertical-align: top;
}

.user-table th {
  color: var(--muted);
  background: var(--surface-2);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.user-table td {
  border-top: 1px solid var(--line);
}

.user-table tbody tr:hover {
  background: rgb(var(--green-rgb) / 0.045);
}

.user-table tbody tr.is-inactive {
  background: var(--surface-2);
  opacity: 0.72;
}

.user-identity-cell {
  display: grid;
  min-width: 205px;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
}

.user-avatar-small {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  color: var(--green-dark);
  background: var(--green-soft);
}

.user-avatar-small svg {
  width: 18px;
  height: 18px;
}

.user-identity-cell > span:last-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.user-identity-cell strong,
.user-identity-cell small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-name-input {
  width: 100%;
  min-height: 32px;
  padding: 5px 8px;
  border-color: transparent;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.user-name-input:hover,
.user-name-input:focus {
  border-color: rgb(var(--green-rgb) / 0.45);
  background: var(--surface);
}

.user-identity-cell small {
  color: var(--muted);
  font-size: 10px;
}

.user-identity-cell em {
  width: fit-content;
  color: var(--blue);
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

.user-role-select,
.user-status-select {
  min-height: 36px;
  padding: 6px 28px 6px 9px;
  font-size: 11px;
}

.user-role-select {
  min-width: 168px;
}

.user-status-select {
  min-width: 100px;
}

.user-access-badge,
.user-state-badge {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  border-radius: 6px;
  color: var(--green-dark);
  background: var(--green-soft);
  font-size: 10px;
  font-weight: 800;
}

.user-state-badge > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

.user-created-cell {
  color: var(--muted);
  font-family: "JetBrains Mono", Consolas, monospace;
  white-space: nowrap;
}

.user-row-actions {
  display: grid;
  min-width: 126px;
  gap: 7px;
}

.user-row-actions form {
  margin: 0;
}

.user-save-access,
.user-password-reset summary,
.user-delete-trigger {
  display: inline-flex;
  width: 100%;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--green-dark);
  background: var(--surface);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.user-save-access:hover,
.user-password-reset summary:hover {
  border-color: rgb(var(--green-rgb) / 0.45);
  background: var(--green-soft);
}

.user-save-access svg,
.user-password-reset summary svg,
.user-delete-trigger svg {
  width: 15px;
  height: 15px;
}

.user-password-reset summary {
  list-style: none;
}

.user-password-reset summary::-webkit-details-marker {
  display: none;
}

.user-password-reset[open] summary {
  color: #fff;
  border-color: var(--green);
  background: var(--green);
}

.user-password-reset > form {
  display: grid;
  min-width: 230px;
  gap: 9px;
  margin-top: 7px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}

.user-password-reset label {
  display: grid;
  gap: 4px;
}

.user-password-reset label span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.user-password-reset input {
  width: 100%;
  min-height: 36px;
  font-size: 11px;
}

.user-password-reset button {
  min-height: 36px;
  font-size: 10px;
}

.user-delete-trigger {
  color: var(--red);
}

.user-delete-trigger:hover {
  border-color: rgba(200, 59, 50, 0.45);
  background: var(--red-soft);
}

.user-delete-dialog {
  width: min(430px, calc(100vw - 32px));
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 12px;
  overflow: visible;
  color: var(--text);
  background: transparent;
}

.user-delete-dialog::backdrop {
  background: rgba(9, 18, 14, 0.62);
  backdrop-filter: blur(3px);
}

.user-delete-dialog-card {
  position: relative;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(9, 18, 14, 0.3);
}

.user-delete-dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  background: var(--surface-2);
  cursor: pointer;
}

.user-delete-dialog-close:hover {
  color: var(--text);
  border-color: rgb(var(--green-rgb) / 0.35);
}

.user-delete-dialog-close svg {
  width: 17px;
  height: 17px;
}

.user-delete-dialog-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 50%;
  color: var(--red);
  background: var(--red-soft);
}

.user-delete-dialog-icon svg {
  width: 23px;
  height: 23px;
}

.user-delete-dialog h2 {
  margin: 4px 0 8px;
  font-size: 23px;
}

.user-delete-dialog-copy {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.user-delete-dialog-account {
  display: grid;
  gap: 3px;
  margin: 18px 0;
  padding: 12px 14px;
  border: 1px solid rgba(200, 59, 50, 0.22);
  border-radius: 8px;
  background: var(--red-soft);
}

.user-delete-dialog-account strong,
.user-delete-dialog-account span {
  overflow-wrap: anywhere;
}

.user-delete-dialog-account strong {
  font-size: 13px;
}

.user-delete-dialog-account span {
  color: var(--muted);
  font-size: 11px;
}

.user-delete-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}

.user-delete-cancel,
.user-delete-confirm {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 15px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.user-delete-cancel {
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--surface);
}

.user-delete-cancel:hover {
  background: var(--surface-2);
}

.user-delete-confirm {
  border: 1px solid var(--red);
  color: #fff;
  background: var(--red);
}

.user-delete-confirm:hover {
  filter: brightness(0.92);
}

.user-delete-confirm svg {
  width: 15px;
  height: 15px;
}

@media (max-width: 520px) {
  .user-delete-dialog-card {
    padding: 22px 18px 18px;
  }

  .user-delete-dialog-actions {
    flex-direction: column-reverse;
  }

  .user-delete-cancel,
  .user-delete-confirm {
    width: 100%;
  }
}

.user-delete-dialog[open] {
  animation: user-dialog-in 140ms ease-out;
}

@keyframes user-dialog-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.user-delete-dialog p {
  margin: 0;
}

.node-account-summary {
  grid-template-columns: repeat(4, minmax(78px, 1fr));
  min-width: 390px;
}

.node-management-layout {
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
}

.node-coordinate-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.node-registry-table {
  min-width: 930px;
}

.node-identity-cell {
  display: grid;
  min-width: 170px;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
}

.node-identity-cell > span:last-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.node-identity-cell strong,
.node-identity-cell small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.node-identity-cell strong {
  color: var(--text);
  font-size: 12px;
}

.node-identity-cell small,
.node-location-cell,
.node-coordinate-cell {
  color: var(--muted);
  font-size: 10px;
}

.node-coordinate-cell {
  font-family: "JetBrains Mono", Consolas, monospace;
  white-space: nowrap;
}

.node-registry-status {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  border-radius: 6px;
  color: var(--muted);
  background: var(--surface-2);
  font-size: 10px;
  font-weight: 800;
}

.node-registry-status > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
}

.node-registry-status.online {
  color: var(--green-dark);
  background: var(--green-soft);
}

.node-registry-status.online > span {
  background: var(--green);
}

.node-open-link {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--green-dark);
  background: var(--surface);
  font-size: 10px;
  font-weight: 800;
  text-decoration: none;
}

.node-open-link:hover {
  border-color: rgb(var(--green-rgb) / 0.45);
  background: var(--green-soft);
}

.node-open-link svg {
  width: 14px;
  height: 14px;
}

.node-registry-empty {
  padding: 32px 16px !important;
  color: var(--muted);
  text-align: center !important;
}

@media (max-width: 1050px) {
  .user-management-layout,
  .node-management-layout {
    grid-template-columns: 1fr;
  }

  .user-create-panel {
    width: 100%;
  }
}

@media (max-width: 860px) {
  .mobile-nav.mobile-nav-producer {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 3px;
  }

  .user-page-header {
    align-items: stretch;
  }

  .user-account-summary {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 560px) {
  .user-create-panel {
    padding: 15px;
  }

  .user-account-summary span {
    min-height: 58px;
    padding: 7px;
  }

  .user-account-summary strong {
    font-size: 19px;
  }

  .node-account-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .node-coordinate-fields {
    grid-template-columns: 1fr;
  }

  .mobile-nav.mobile-nav-producer {
    left: 6px;
    right: 6px;
    gap: 2px;
    padding: 5px;
  }
}

/* Mobile application polish */
@media (max-width: 760px) {
  body.app-shell {
    --topbar-height: 60px;
    min-width: 0;
  }

  body.app-shell.sidebar-open {
    overflow: hidden;
  }

  .app-sidebar {
    width: min(82vw, 292px);
    box-shadow: 18px 0 42px rgba(3, 14, 28, 0.26);
  }

  .app-topbar {
    gap: 7px;
    padding: 0 9px;
  }

  .topbar-title strong {
    font-size: 12px;
  }

  .topbar-icon-button,
  .app-topbar .logout-button {
    width: 40px;
    min-height: 40px;
    flex-basis: 40px;
  }

  body.app-shell .main-content {
    padding: calc(var(--topbar-height) + 12px) 10px calc(18px + env(safe-area-inset-bottom));
  }

  .mobile-nav,
  .mobile-nav.mobile-nav-producer,
  .mobile-nav.mobile-nav-limited {
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    left: 8px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    padding: 5px;
    border-radius: 10px;
  }

  .mobile-nav.mobile-nav-limited {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .mobile-nav a,
  .mobile-nav .mobile-nav-more {
    display: grid;
    min-width: 0;
    min-height: 52px;
    grid-template-rows: 21px auto;
    gap: 3px;
    padding: 5px 2px;
    place-items: center;
    border: 0;
    border-radius: 7px;
    color: var(--muted);
    background: transparent;
    box-shadow: none;
    font-size: 10px;
    font-weight: 800;
  }

  .mobile-nav a.active,
  .mobile-nav .mobile-nav-more.active {
    color: var(--green-dark);
    background: var(--surface-2);
  }

  .mobile-nav a svg,
  .mobile-nav .mobile-nav-more svg {
    width: 19px;
    height: 19px;
  }

  .mobile-nav a span,
  .mobile-nav .mobile-nav-more span {
    display: block;
    width: 100%;
    overflow: hidden;
    color: inherit;
    background: transparent;
    font-size: 9px;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .page-header {
    gap: 12px;
    margin-bottom: 14px;
    padding: 16px;
  }

  .page-header h1 {
    font-size: 28px;
    line-height: 1.08;
  }

  .subtitle,
  .graph-node-summary p {
    font-size: 13px;
    line-height: 1.45;
  }

  .eyebrow {
    margin-bottom: 5px;
    font-size: 10px;
  }

  .command-header {
    margin-bottom: 11px;
  }

  .command-header h1 {
    font-size: 24px;
  }

  .command-header p:last-child {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.4;
  }

  .command-header-status {
    font-size: 10px;
  }

  .dashboard-live-chip {
    min-height: 30px;
    padding: 5px 8px;
  }

  .command-summary-grid,
  .command-summary-grid-limited {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 11px;
  }

  .command-summary-card {
    min-height: 100px;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 8px;
    padding: 10px;
  }

  .command-summary-icon {
    width: 36px;
    height: 36px;
  }

  .command-summary-icon svg {
    width: 19px;
    height: 19px;
  }

  .command-summary-label {
    font-size: 11px;
  }

  .command-summary-card strong {
    font-size: 21px;
  }

  .command-summary-card strong.gateway-word {
    font-size: 12px;
  }

  .command-summary-card small {
    overflow: visible;
    font-size: 8px;
    line-height: 1.25;
    text-overflow: clip;
    white-space: normal;
  }

  .command-primary-grid,
  .command-secondary-grid {
    gap: 11px;
    margin-bottom: 11px;
  }

  .ops-panel-header {
    min-height: 46px;
    padding: 9px 11px;
  }

  .dashboard-map-box,
  .dashboard-page .dashboard-map-box,
  .dashboard-map-box .node-map {
    height: 272px;
    min-height: 272px;
  }

  .dashboard-map-legend {
    right: 8px;
    bottom: 8px;
    gap: 8px;
    padding: 6px 8px;
  }

  .risk-focus-header {
    min-height: 50px;
    padding: 10px 13px;
  }

  .risk-focus-body {
    padding: 13px;
  }

  .risk-metric-list > div {
    min-height: 50px;
  }

  .compact-chart-wrap {
    height: 168px;
    min-height: 168px;
  }

  .link-quality-panel {
    margin-bottom: 12px;
  }

  .link-quality-node {
    padding: 11px 12px 13px;
  }

  .dashboard-command-center .dashboard-node-toolbar {
    padding: 12px;
  }

  .dashboard-page .node-card {
    gap: 10px;
    padding: 14px;
  }

  .dashboard-page .metric {
    min-height: 64px;
    padding: 10px;
  }

  .dashboard-page .metric-value {
    font-size: 17px;
  }

  .graph-node-summary {
    gap: 8px;
    margin-bottom: 14px;
  }

  .graph-node-summary h2,
  .chart-section-header h2 {
    font-size: 23px;
  }

  .graph-metric-filters,
  .chart-card,
  .settings-card {
    padding: 12px;
  }

  .graph-filter-options {
    gap: 6px;
  }

  .metric-filter {
    min-height: 38px;
    padding: 7px 8px;
    font-size: 11px;
  }

  .chart-canvas-wrap-combined {
    height: 290px;
  }

  .sensor-records-section {
    margin-top: 16px;
    padding-top: 16px;
  }

  .sensor-records-table-wrap,
  .user-table-wrap {
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
  }

  .network-quality-summary {
    margin-top: 14px;
    padding-top: 14px;
  }

  .network-quality-item {
    min-height: 58px;
    padding: 12px;
  }

  .network-quality-item dd {
    font-size: 19px;
  }

  .map-page-heading {
    gap: 12px;
  }

  .map-page .page-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .map-page .map-box {
    height: clamp(330px, calc(100svh - 292px), 470px);
    min-height: 330px;
  }

  .settings-card .status-row {
    align-items: center;
    flex-direction: row;
  }

  .settings-card .form-row:last-child {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .stat-card {
    min-height: 82px;
    padding: 12px;
  }

  .stat-value {
    font-size: 18px;
  }

  .user-management-layout,
  .node-management-layout {
    gap: 12px;
  }

  .user-create-panel {
    padding: 14px;
  }

  .user-directory-header {
    min-height: 64px;
    padding: 12px 14px;
  }

  .user-table-wrap {
    padding: 10px;
    overflow: visible;
  }

  .user-table,
  .node-registry-table {
    display: block;
    min-width: 0;
  }

  .user-table thead {
    display: none;
  }

  .user-table tbody {
    display: grid;
    gap: 10px;
  }

  .user-table tbody tr {
    display: grid;
    gap: 10px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
  }

  .user-table td,
  .user-table td + td {
    display: grid;
    min-width: 0;
    grid-template-columns: 88px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    padding: 0;
    border: 0;
  }

  .user-table td::before {
    color: var(--muted);
    content: attr(data-label);
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .user-table td:first-child {
    grid-template-columns: 1fr;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
  }

  .user-table td:first-child::before {
    display: none;
  }

  .user-identity-cell,
  .node-identity-cell {
    min-width: 0;
  }

  .user-role-select,
  .user-status-select,
  .user-access-badge,
  .user-state-badge,
  .node-registry-status,
  .node-open-link {
    width: 100%;
    min-width: 0;
  }

  .user-row-actions {
    min-width: 0;
  }

  .user-password-reset > form {
    min-width: 0;
  }

  .node-registry-empty {
    display: block !important;
    padding: 24px 12px !important;
  }

  .alert-overview-item {
    min-height: 74px;
    padding: 11px 13px;
  }

  .alert-overview-item strong {
    font-size: 26px;
  }

  .alerts-toolbar {
    gap: 10px;
    padding: 10px;
  }

  .alert-view-control a {
    min-height: 38px;
    padding: 0 7px;
    font-size: 11px;
  }

  .alert-record {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 9px;
    padding: 13px 11px;
  }

  .alert-record h2 {
    font-size: 17px;
  }

  .alert-record p {
    font-size: 13px;
  }
}

@media (max-width: 560px) {
  body.auth-page {
    min-width: 0;
  }

  .auth-access {
    padding: 54px 10px 20px;
  }

  .auth-theme-switch,
  .auth-theme-button {
    top: 12px;
    right: 12px;
  }

  .auth-panel {
    padding: 23px 17px 21px;
  }

  .auth-mobile-logo {
    width: 128px;
    height: 48px;
    margin-right: auto;
    margin-bottom: 12px;
    margin-left: auto;
    object-position: center;
  }

  .auth-heading {
    margin-bottom: 19px;
  }

  .auth-heading h1 {
    font-size: 29px;
  }

  .auth-input-shell,
  .auth-submit {
    min-height: 50px;
  }

  .auth-system-status {
    padding: 11px 12px;
    font-size: 11px;
  }

  .user-account-summary span {
    min-height: 52px;
  }
}

@media (max-width: 340px) {
  .command-summary-grid,
  .command-summary-grid-limited,
  .stat-row {
    grid-template-columns: 1fr;
  }
}

/* Mobile login presentation */
@media (max-width: 560px) {
  body.auth-page {
    position: relative;
    min-height: 100svh;
    background: #edf4f1;
  }

  body.auth-page::before,
  body.auth-page::after {
    position: fixed;
    inset: 0;
    pointer-events: none;
    content: "";
  }

  body.auth-page::before {
    z-index: 0;
    background-image:
      linear-gradient(180deg, rgba(242, 248, 247, 0.08) 0%, rgba(237, 245, 241, 0.42) 55%, rgba(237, 245, 241, 0.96) 100%),
      url("../img/lews-login-mountain.png");
    background-position: 58% center;
    background-size: cover;
  }

  body.auth-page::after {
    z-index: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(244, 249, 247, 0.16) 55%, rgba(237, 245, 241, 0.72) 100%);
  }

  html[data-theme="dark"] body.auth-page {
    background: #030706;
  }

  html[data-theme="dark"] body.auth-page::before {
    filter: brightness(0.44) saturate(0.78);
  }

  html[data-theme="dark"] body.auth-page::after {
    background: linear-gradient(180deg, rgba(2, 7, 6, 0.18) 0%, rgba(2, 7, 6, 0.58) 72%, rgba(2, 5, 4, 0.94) 100%);
  }

  .auth-shell {
    position: relative;
    z-index: 1;
  }

  .auth-access,
  html[data-theme="dark"] .auth-access {
    display: flex;
    min-height: 100svh;
    flex-direction: column;
    align-items: center;
    padding: 116px 14px 44px;
    overflow: visible;
    background: transparent;
  }

  .auth-theme-switch,
  .auth-theme-button {
    top: 24px;
    right: 20px;
  }

  html[data-theme="dark"] .auth-theme-switch {
    color: #e8f3ee;
  }

  .auth-theme-switch > svg {
    width: 20px;
    height: 20px;
  }

  .auth-theme-switch-label {
    display: inline;
    font-size: 14px;
    font-weight: 800;
  }

  .auth-theme-switch .theme-switch-track {
    width: 48px;
    height: 28px;
  }

  .auth-theme-switch .theme-switch-track::after {
    width: 22px;
    height: 22px;
  }

  .auth-theme-switch input:checked + .theme-switch-track::after {
    transform: translateX(20px);
  }

  .auth-login-wrap {
    width: 100%;
    max-width: 430px;
    margin-right: auto;
    margin-left: auto;
  }

  .auth-panel {
    padding: 29px 20px 25px;
    border: 1px solid rgba(188, 207, 199, 0.82);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 24px 56px rgba(22, 57, 43, 0.18);
    backdrop-filter: blur(12px);
    animation: auth-mobile-rise 520ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }

  html[data-theme="dark"] .auth-panel {
    border-color: rgba(113, 151, 134, 0.28);
    background: rgba(5, 10, 8, 0.93);
    box-shadow: 0 24px 58px rgba(0, 0, 0, 0.42);
  }

  .auth-mobile-logo {
    display: block;
    width: 176px;
    height: 76px;
    margin: 0 auto 13px;
    object-fit: contain;
    object-position: center;
  }

  .auth-heading {
    display: flex;
    align-items: center;
    flex-direction: column;
  }

  .auth-heading {
    margin-bottom: 25px;
  }

  .auth-heading .eyebrow {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    padding: 0 16px;
    border-radius: 999px;
    color: #185b3d;
    background: rgba(26, 112, 72, 0.08);
    font-size: 11px;
    letter-spacing: 1.5px;
  }

  html[data-theme="dark"] .auth-heading .eyebrow {
    color: #8fe0b4;
    background: rgba(68, 171, 117, 0.12);
  }

  .auth-heading h1 {
    font-size: 36px;
    line-height: 1.04;
  }

  .auth-heading p:last-child {
    max-width: 310px;
    margin: 10px auto 0;
    font-size: 14px;
    line-height: 1.45;
  }

  .auth-form {
    gap: 15px;
  }

  .auth-field {
    gap: 8px;
  }

  .auth-field > span:first-child {
    font-size: 14px;
  }

  .auth-input-shell {
    min-height: 58px;
    padding: 0 15px;
    border-color: #b9d0c5;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 8px 18px rgba(26, 83, 58, 0.05);
  }

  html[data-theme="dark"] .auth-input-shell {
    border-color: rgba(123, 167, 147, 0.3);
    background: rgba(18, 23, 21, 0.9);
  }

  .auth-input-shell:focus-within {
    border-color: #238453;
    box-shadow: 0 0 0 3px rgba(35, 132, 83, 0.14);
  }

  .auth-input-shell > svg {
    width: 20px;
    height: 20px;
  }

  .auth-page .auth-input-shell input,
  .auth-page .auth-input-shell input:focus {
    height: 56px;
    font-size: 15px;
  }

  .auth-password-help {
    margin-top: -10px;
  }

  .auth-forgot-password {
    min-height: 30px;
    font-size: 13px;
  }

  .auth-submit {
    min-height: 58px;
    margin-top: 0;
    border-color: #0c6841;
    border-radius: 8px;
    background: linear-gradient(180deg, #178454 0%, #075b38 100%);
    box-shadow: 0 13px 25px rgba(7, 91, 56, 0.22);
    font-size: 17px;
  }

  .auth-submit:hover,
  .auth-submit:focus-visible {
    border-color: #06482e;
    background: linear-gradient(180deg, #126f48 0%, #06482e 100%);
    box-shadow: 0 14px 28px rgba(7, 91, 56, 0.28);
  }

  .auth-system-status {
    display: grid;
    min-height: 76px;
    grid-template-columns: 38px minmax(0, 1fr) 28px;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding: 12px 13px;
    border-color: rgba(26, 133, 78, 0.25);
    border-radius: 8px;
    background: rgba(232, 247, 239, 0.86);
    text-align: left;
  }

  .auth-status-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #fff;
    background: #239052;
    animation: auth-status-breathe 2.8s 700ms ease-in-out infinite;
  }

  .auth-status-icon svg {
    width: 21px;
    height: 21px;
    stroke-width: 2.6;
  }

  .auth-status-copy {
    gap: 2px;
    min-width: 0;
  }

  .auth-status-copy strong {
    color: #157143;
    font-size: 12px;
    line-height: 1.25;
  }

  .auth-status-copy small {
    display: block;
    color: #587166;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.3;
  }

  .auth-status-pulse {
    display: block;
    width: 28px;
    color: rgba(25, 139, 79, 0.22);
  }

  html[data-theme="dark"] .auth-system-status {
    border-color: rgba(61, 178, 113, 0.25);
    background: rgba(11, 67, 42, 0.28);
  }

  html[data-theme="dark"] .auth-status-copy strong {
    color: #82dda9;
  }

  html[data-theme="dark"] .auth-status-copy small {
    color: #a5bdb1;
  }

  .auth-access-note {
    display: grid;
    min-height: 78px;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    justify-content: stretch;
    gap: 12px;
    margin: 18px 0 0;
    padding: 14px 18px;
    border: 1px solid rgba(184, 204, 195, 0.78);
    border-radius: 8px;
    color: #17372c;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 14px 32px rgba(24, 62, 47, 0.1);
    text-align: left;
    backdrop-filter: blur(10px);
    animation: auth-mobile-rise 520ms 120ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }

  html[data-theme="dark"] .auth-access-note {
    border-color: rgba(115, 153, 136, 0.24);
    color: #eaf4ef;
    background: rgba(8, 14, 12, 0.78);
  }

  .auth-note-icon {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(22, 117, 72, 0.26);
    border-radius: 50%;
    color: #187448;
    background: rgba(232, 247, 239, 0.9);
  }

  .auth-note-icon svg {
    width: 23px;
    height: 23px;
  }

  .auth-note-copy {
    gap: 2px;
    min-width: 0;
  }

  .auth-note-copy strong {
    font-size: 14px;
    line-height: 1.25;
  }

  .auth-note-copy small {
    display: block;
    color: #63786f;
    font-size: 11px;
    line-height: 1.3;
  }

  html[data-theme="dark"] .auth-note-copy small {
    color: #9eb4aa;
  }
}

@keyframes auth-mobile-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes auth-status-breathe {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(35, 144, 82, 0);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(35, 144, 82, 0.1);
  }
}

/* Installable mobile app */
.install-app-button[hidden] {
  display: none !important;
}

.install-app-button {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid rgba(112, 183, 255, 0.34);
  border-radius: 8px;
  color: #e8f4ff;
  background: rgba(79, 154, 235, 0.14);
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.install-app-button:hover {
  border-color: rgba(112, 183, 255, 0.66);
  background: rgba(79, 154, 235, 0.24);
  transform: translateY(-1px);
}

.install-app-button:focus-visible {
  outline: 3px solid rgba(84, 160, 255, 0.32);
  outline-offset: 2px;
}

.install-app-button svg {
  width: 17px;
  height: 17px;
}

.auth-access-actions {
  display: grid;
  justify-items: center;
  gap: 13px;
  margin-top: 22px;
}

.auth-access-actions .auth-access-note {
  margin: 0;
}

.auth-install-app {
  min-width: 188px;
  color: var(--green-dark);
  border-color: rgb(var(--green-rgb) / 0.28);
  background: var(--green-soft);
}

.auth-install-app:hover {
  color: var(--green-dark);
  border-color: rgb(var(--green-rgb) / 0.5);
  background: rgb(var(--green-rgb) / 0.15);
}

html[data-theme="dark"] .auth-install-app {
  color: #8de1b9;
  border-color: rgba(94, 213, 158, 0.28);
  background: rgba(43, 151, 103, 0.12);
}

@media (display-mode: standalone) {
  body.app-shell {
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  .app-topbar {
    padding-top: env(safe-area-inset-top, 0);
  }

  .mobile-nav {
    padding-bottom: max(6px, env(safe-area-inset-bottom, 0));
  }

  .install-app-button {
    display: none !important;
  }
}

/* Keep the floating dock clear of page content after responsive overrides. */
body.app-shell {
  --sidebar-width: 0px;
}

.app-sidebar {
  width: min(280px, 82vw);
  transform: translateX(-104%);
}

body.sidebar-open .app-sidebar {
  transform: translateX(0);
}

.app-topbar {
  left: 0;
}

.sidebar-toggle {
  display: grid;
}

body.app-shell .main-content {
  padding-bottom: 110px;
}

@media (max-width: 760px) {
  body.app-shell .main-content {
    padding-bottom: calc(94px + env(safe-area-inset-bottom));
  }
}

/* Use the entire workspace on wide displays instead of centering a narrow dashboard. */
.dashboard-command-center {
  width: 100%;
  max-width: none;
  margin: 0;
}
