:root {
  --bg: #03080d;
  --bg-raised: #07121b;
  --panel: rgba(7, 20, 30, 0.86);
  --panel-strong: rgba(9, 27, 40, 0.94);
  --line: rgba(75, 171, 199, 0.22);
  --line-hot: rgba(92, 218, 245, 0.52);
  --cyan: #55e7f4;
  --cyan-soft: #9af7ff;
  --blue: #4c8fff;
  --green: #5ce3af;
  --amber: #f2bc5d;
  --red: #ff647b;
  --text: #d9f3f8;
  --muted: #71909d;
  --dim: #45616d;
  --shadow: 0 20px 70px rgba(0, 0, 0, 0.34);
  --sidebar: 248px;
}

.friday-fiber-cluster-icon {
  display: grid;
  place-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid #63dff1;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(6, 20, 29, 0.74), rgba(2, 10, 15, 0.96));
  box-shadow:
    0 0 0 5px rgba(99, 223, 241, 0.08),
    0 0 18px rgba(99, 223, 241, 0.24);
  color: #dffbff;
  font-family: inherit;
  text-align: center;
}

.friday-fiber-cluster-icon span {
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.friday-fiber-cluster-icon small {
  max-width: 36px;
  margin-top: 2px;
  overflow: hidden;
  color: #9acbd5;
  font-size: 5px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friday-fiber-cluster-icon.friday-state-up {
  border-color: #41e59b;
  box-shadow:
    0 0 0 5px rgba(65, 229, 155, 0.08),
    0 0 18px rgba(65, 229, 155, 0.24);
}

.friday-fiber-cluster-icon.friday-state-degraded {
  border-color: #ffc857;
}

.friday-fiber-cluster-icon.friday-state-down {
  border-color: #ff5566;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 52% -15%, rgba(19, 100, 129, 0.28), transparent 42%),
    radial-gradient(circle at 105% 78%, rgba(14, 63, 108, 0.17), transparent 35%),
    linear-gradient(145deg, #07131c 0%, #03080d 48%, #020509 100%);
  font: 14px/1.55 "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.is-hidden {
  display: none !important;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 12px 18px;
  border: 2px solid #020509;
  border-radius: 3px;
  color: #020509;
  background: #ffffff;
  font-weight: 700;
  text-decoration: underline;
  transform: translateY(calc(-100% - 24px));
  transition: transform 120ms ease;
}

.skip-link:focus {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.7);
  transform: translateY(0);
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.ambient::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image:
    linear-gradient(rgba(84, 212, 239, 0.25) 1px, transparent 1px),
    linear-gradient(90deg, rgba(84, 212, 239, 0.25) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

.ambient-ring {
  position: absolute;
  border: 1px solid rgba(70, 206, 233, 0.08);
  border-radius: 50%;
  width: 62vw;
  height: 62vw;
  right: -28vw;
  top: -34vw;
}

.ring-two {
  width: 42vw;
  height: 42vw;
  right: -14vw;
  top: -20vw;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(350px, 470px);
  align-items: center;
  gap: clamp(40px, 9vw, 150px);
  max-width: 1380px;
  margin: auto;
  padding: 54px 7vw;
}

.login-identity {
  position: relative;
}

.login-identity h1 {
  margin: 4px 0 14px;
  color: #effcff;
  font-size: clamp(50px, 8vw, 104px);
  font-weight: 200;
  line-height: 0.96;
  letter-spacing: 0.12em;
  text-shadow:
    0 0 28px rgba(59, 219, 242, 0.34),
    0 0 80px rgba(30, 139, 182, 0.18);
}

.login-copy {
  max-width: 590px;
  margin: 20px 0 30px;
  color: #91b1bd;
  font-size: 16px;
}

.reactor {
  position: relative;
  width: 92px;
  height: 92px;
  margin-bottom: 30px;
  border: 1px solid rgba(83, 231, 244, 0.6);
  border-radius: 50%;
  box-shadow:
    0 0 28px rgba(46, 210, 234, 0.25),
    inset 0 0 20px rgba(46, 210, 234, 0.16);
}

.reactor::before,
.reactor::after,
.reactor span {
  content: "";
  position: absolute;
  inset: 11px;
  border: 1px dashed rgba(83, 231, 244, 0.68);
  border-radius: 50%;
  animation: spin 14s linear infinite;
}

.reactor::after {
  inset: 24px;
  border-style: solid;
  border-color: rgba(85, 231, 244, 0.34);
  background: radial-gradient(circle, #d5fbff 0 7%, #38d6eb 8% 20%, transparent 22%);
  animation-direction: reverse;
  animation-duration: 8s;
}

.reactor span {
  inset: 34px;
  border: 0;
  background: #a9f8ff;
  box-shadow: 0 0 18px #41dceb;
}

.login-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.login-signals span,
.data-tag,
.severity-legend {
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 5px 8px;
  color: var(--muted);
  background: rgba(5, 18, 27, 0.76);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.login-panel {
  position: relative;
  padding: 34px;
  border: 1px solid var(--line-hot);
  border-radius: 4px;
  background:
    linear-gradient(145deg, rgba(15, 42, 58, 0.88), rgba(4, 13, 21, 0.96));
  box-shadow: var(--shadow), inset 0 1px rgba(133, 240, 255, 0.08);
  clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 24px 100%, 0 calc(100% - 24px));
}

.login-panel::before {
  content: "";
  position: absolute;
  left: 0;
  top: 25%;
  width: 2px;
  height: 40%;
  background: var(--cyan);
  box-shadow: 0 0 16px var(--cyan);
}

.panel-index {
  margin-bottom: 28px;
  color: var(--dim);
  font-size: 9px;
  letter-spacing: 0.22em;
}

.login-panel h2,
.section-heading h2,
.data-card h2,
.data-card h3 {
  margin: 0;
  color: #e7fbff;
  font-weight: 450;
  letter-spacing: 0.02em;
}

.login-panel h2 {
  font-size: 27px;
}

.login-panel > .muted {
  margin: 7px 0 26px;
}

label {
  display: block;
  margin: 17px 0 7px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

input[type="text"],
input[type="password"],
input[type="search"],
textarea,
select {
  width: 100%;
  height: 44px;
  border: 1px solid rgba(79, 164, 190, 0.3);
  border-radius: 3px;
  padding: 0 13px;
  color: #e9fbff;
  background: rgba(2, 11, 17, 0.75);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

textarea {
  height: auto;
  min-height: 96px;
  padding: 12px 13px;
  resize: vertical;
}

input:hover,
input:focus,
textarea:hover,
textarea:focus,
select:hover,
select:focus {
  border-color: rgba(83, 221, 243, 0.62);
  box-shadow: 0 0 0 3px rgba(70, 205, 231, 0.06);
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--cyan) 50%),
    linear-gradient(135deg, var(--cyan) 50%, transparent 50%);
  background-position:
    calc(100% - 17px) 19px,
    calc(100% - 12px) 19px;
  background-repeat: no-repeat;
  background-size: 5px 5px;
  cursor: pointer;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 18px 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0;
  cursor: pointer;
}

.check-row input {
  accent-color: var(--cyan);
}

.primary-button,
.secondary-button,
.icon-button,
.inline-link,
.text-button {
  border: 0;
  cursor: pointer;
}

.primary-button {
  width: 100%;
  min-height: 45px;
  padding: 11px 18px;
  border: 1px solid rgba(89, 230, 245, 0.55);
  border-radius: 3px;
  color: #061116;
  background: linear-gradient(90deg, #4ddfef, #87f5fb);
  box-shadow: 0 0 26px rgba(47, 213, 233, 0.14);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.primary-button:hover {
  filter: brightness(1.08);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.secondary-button {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--cyan);
  background: rgba(9, 34, 46, 0.68);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.form-error,
.form-message {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--amber);
  font-size: 12px;
}

.form-message.ok {
  color: var(--green);
}

.security-note {
  margin: 16px 0 0;
  color: var(--dim);
  font-size: 10px;
  text-align: center;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 26px 18px 18px;
  border-right: 1px solid var(--line);
  background: rgba(3, 11, 17, 0.82);
  backdrop-filter: blur(16px);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 9px 30px;
}

.brand-mark {
  position: relative;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(84, 229, 244, 0.65);
  border-radius: 50%;
  box-shadow: inset 0 0 14px rgba(52, 217, 238, 0.16);
}

.brand-mark::before,
.brand-mark::after,
.brand-mark span {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px dashed rgba(84, 229, 244, 0.4);
  border-radius: 50%;
}

.brand-mark::after {
  inset: 13px;
  border: 0;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
}

.brand-mark span {
  inset: 2px;
  border-style: solid;
  border-color: transparent var(--cyan);
  animation: spin 8s linear infinite;
}

.brand-block strong {
  display: block;
  color: #e6fbff;
  font-size: 16px;
  letter-spacing: 0.13em;
}

.brand-block small {
  color: var(--dim);
  font-size: 8px;
  letter-spacing: 0.2em;
}

.primary-nav {
  display: grid;
  gap: 4px;
}

.nav-button {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 8px;
  padding: 11px 10px;
  border: 1px solid transparent;
  border-radius: 3px;
  color: #718d99;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease;
}

.nav-button:hover {
  color: #bcecf3;
  background: rgba(34, 102, 123, 0.1);
}

.nav-button.active {
  border-color: rgba(83, 218, 240, 0.2);
  color: var(--cyan-soft);
  background: linear-gradient(90deg, rgba(42, 175, 198, 0.16), rgba(8, 36, 49, 0.08));
}

.nav-button.active::before {
  content: "";
  position: absolute;
  left: -19px;
  width: 3px;
  height: 22px;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
}

.nav-code {
  color: var(--dim);
  font: 9px/1 "Courier New", monospace;
}

.sidebar-footer {
  display: grid;
  gap: 19px;
  margin-top: auto;
  padding: 18px 9px 4px;
  border-top: 1px solid var(--line);
}

.sidebar-status {
  display: flex;
  align-items: center;
  gap: 11px;
}

.sidebar-status small,
.clock-block small,
.operator span {
  display: block;
  color: var(--dim);
  font-size: 8px;
  letter-spacing: 0.15em;
}

.sidebar-status strong {
  color: #a9c4cd;
  font-size: 10px;
  letter-spacing: 0.1em;
}

.status-dot,
.pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 11px var(--green);
}

.status-dot.warning {
  background: var(--amber);
  box-shadow: 0 0 11px var(--amber);
}

.status-dot.critical {
  background: var(--red);
  box-shadow: 0 0 11px var(--red);
}

.text-button {
  width: max-content;
  padding: 0;
  color: var(--muted);
  background: transparent;
  font-size: 9px;
  letter-spacing: 0.14em;
}

.text-button:hover {
  color: var(--red);
}

.workspace {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  min-height: 92px;
  padding: 19px clamp(20px, 3vw, 42px);
  border-bottom: 1px solid var(--line);
  background: rgba(3, 11, 17, 0.46);
  backdrop-filter: blur(12px);
}

.topbar h1 {
  margin: 0;
  color: #eefcff;
  font-size: clamp(20px, 2vw, 29px);
  font-weight: 300;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}

.topbar-actions #installAppButton {
  width: auto;
  min-width: 0;
  padding: 8px 11px;
  font-size: 8px;
  white-space: nowrap;
}

.clock-block {
  min-width: 120px;
  text-align: right;
}

.clock-block strong {
  color: var(--cyan-soft);
  font: 400 19px/1.25 "Courier New", monospace;
}

.clock-block span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  text-transform: capitalize;
}

.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--cyan);
  background: rgba(9, 32, 44, 0.64);
  font-size: 20px;
  line-height: 1;
}

.icon-button.loading span {
  display: inline-block;
  animation: spin 1s linear infinite;
}

.operator {
  min-width: 90px;
  padding-left: 20px;
  border-left: 1px solid var(--line);
}

.operator strong {
  display: block;
  color: #c4e6ed;
  font-size: 12px;
  text-transform: uppercase;
}

.operator-role {
  display: block;
  color: var(--cyan);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.connection-banner {
  margin: 16px clamp(20px, 3vw, 42px) 0;
  padding: 10px 14px;
  border: 1px solid rgba(242, 188, 93, 0.3);
  border-radius: 3px;
  color: #f4d39b;
  background: rgba(74, 51, 15, 0.25);
  font-size: 12px;
}

.connection-banner.critical {
  border-color: rgba(255, 100, 123, 0.38);
  color: #ffb3bf;
  background: rgba(70, 17, 27, 0.25);
}

.content {
  width: 100%;
  max-width: 1760px;
  margin: 0 auto;
  padding: 26px clamp(20px, 3vw, 42px) 46px;
}

.view {
  animation: view-in 260ms ease both;
}

.hero-panel {
  position: relative;
  min-height: 258px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  align-items: center;
  overflow: hidden;
  padding: 32px clamp(26px, 4vw, 54px);
  border: 1px solid var(--line);
  border-radius: 5px;
  background:
    linear-gradient(90deg, rgba(8, 29, 43, 0.9), rgba(5, 17, 26, 0.66)),
    radial-gradient(circle at 82% 45%, rgba(44, 189, 217, 0.18), transparent 26%);
  box-shadow: var(--shadow);
}

.hero-panel::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 34%;
  height: 100%;
  opacity: 0.18;
  background-image: radial-gradient(circle, var(--cyan) 1px, transparent 1px);
  background-size: 14px 14px;
  mask-image: linear-gradient(90deg, transparent, black);
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero-copy h2 {
  margin: 0 0 12px;
  color: #eafcff;
  font-size: clamp(30px, 4vw, 55px);
  font-weight: 200;
  line-height: 1.1;
}

.hero-narrative {
  max-width: 760px;
  margin: 0;
  color: #8baab5;
  font-size: 14px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 23px;
  margin-top: 28px;
  color: var(--dim);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.hero-meta b {
  color: var(--muted);
  font-weight: 500;
}

.hero-meta span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-orbit {
  position: relative;
  z-index: 1;
  width: 205px;
  height: 205px;
  justify-self: center;
}

.orbit {
  position: absolute;
  inset: 0;
  border: 1px dashed rgba(87, 225, 244, 0.28);
  border-radius: 50%;
  animation: spin 22s linear infinite;
}

.orbit::before,
.orbit::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
}

.orbit::before {
  left: 22px;
  top: 30px;
}

.orbit::after {
  right: 15px;
  bottom: 54px;
}

.orbit-b {
  inset: 24px;
  border-style: solid;
  border-color: rgba(87, 225, 244, 0.16);
  animation-direction: reverse;
  animation-duration: 16s;
}

.orbit-core {
  position: absolute;
  inset: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(86, 229, 245, 0.35);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(28, 128, 150, 0.23), rgba(3, 12, 19, 0.6));
  box-shadow:
    0 0 45px rgba(40, 199, 225, 0.12),
    inset 0 0 30px rgba(40, 199, 225, 0.1);
}

.orbit-core span {
  color: var(--cyan-soft);
  font-size: 30px;
  font-weight: 300;
}

.orbit-core small {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.18em;
}

.metrics-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 17px;
}

.metrics-heading h2 {
  margin: 0;
  color: #effcff;
  font-size: clamp(25px, 3vw, 38px);
  font-weight: 300;
  letter-spacing: -0.025em;
}

.metrics-subtitle {
  max-width: 620px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.metrics-sync {
  display: grid;
  justify-items: end;
  gap: 7px;
}

.metrics-sync > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan-soft);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.metrics-sync small {
  color: var(--dim);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.metrics-sync b {
  color: var(--muted);
  font-weight: 500;
}

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

.metric-kpi {
  --metric-accent: var(--cyan);
  position: relative;
  min-height: 188px;
  padding: 19px 20px 17px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-top-color: color-mix(in srgb, var(--metric-accent) 62%, transparent);
  border-radius: 5px;
  background:
    linear-gradient(135deg, rgba(10, 33, 46, 0.92), rgba(4, 14, 22, 0.82)),
    radial-gradient(circle at 93% 2%, color-mix(in srgb, var(--metric-accent) 17%, transparent), transparent 42%);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.2);
}

.metric-kpi::after {
  content: "";
  position: absolute;
  right: -37px;
  bottom: -60px;
  width: 145px;
  height: 145px;
  border: 1px solid color-mix(in srgb, var(--metric-accent) 22%, transparent);
  border-radius: 50%;
  box-shadow: inset 0 0 34px color-mix(in srgb, var(--metric-accent) 7%, transparent);
}

.metric-kpi.warning {
  --metric-accent: var(--amber);
}

.metric-kpi.critical {
  --metric-accent: var(--red);
}

.metric-kpi-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.metric-glyph {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--metric-accent) 44%, transparent);
  border-radius: 50%;
  color: var(--metric-accent);
  background: color-mix(in srgb, var(--metric-accent) 8%, transparent);
  box-shadow:
    0 0 20px color-mix(in srgb, var(--metric-accent) 13%, transparent),
    inset 0 0 14px color-mix(in srgb, var(--metric-accent) 8%, transparent);
  font-size: 18px;
}

.metric-source {
  color: var(--dim);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.metric-kpi-label {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.17em;
}

.metric-kpi-value {
  position: relative;
  z-index: 1;
  margin: 4px 0 3px;
  color: #effcff;
  font: 300 clamp(34px, 4vw, 48px)/1 "Segoe UI", Arial, sans-serif;
  text-shadow: 0 0 22px color-mix(in srgb, var(--metric-accent) 19%, transparent);
}

.metric-kpi-value small {
  margin-left: 5px;
  color: var(--metric-accent);
  font-size: 13px;
}

.metric-kpi-detail {
  position: relative;
  z-index: 1;
  color: var(--dim);
  font-size: 9px;
  letter-spacing: 0.02em;
}

.metric-segments {
  position: absolute;
  z-index: 1;
  right: 20px;
  bottom: 18px;
  left: 20px;
  display: flex;
  gap: 3px;
}

.metric-segments i {
  flex: 1;
  height: 4px;
  border-radius: 1px;
  background: rgba(84, 118, 130, 0.18);
}

.metric-segments i.on {
  background: var(--metric-accent);
  box-shadow: 0 0 8px color-mix(in srgb, var(--metric-accent) 38%, transparent);
}

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

.metric-visual-card {
  min-width: 0;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background:
    linear-gradient(145deg, rgba(7, 25, 36, 0.91), rgba(3, 12, 19, 0.88));
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.18);
}

.metric-visual-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.metric-visual-card > header .eyebrow {
  margin: 0;
}

.metric-gauge-card {
  grid-column: span 4;
}

.metric-severity-card {
  grid-column: span 4;
}

.metric-integration-card {
  grid-column: span 4;
}

.health-gauge-layout {
  display: grid;
  grid-template-columns: 142px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  margin-top: 16px;
}

.health-gauge {
  position: relative;
  display: grid;
  width: 142px;
  height: 142px;
  place-items: center;
  border-radius: 50%;
}

.health-gauge-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.health-gauge-track,
.health-gauge-arc {
  fill: none;
  stroke-width: 7;
}

.health-gauge-track {
  stroke: rgba(61, 99, 113, 0.24);
}

.health-gauge-arc {
  stroke: var(--green);
  stroke-linecap: round;
  filter: drop-shadow(0 0 5px rgba(92, 227, 175, 0.64));
  transform: rotate(-90deg);
  transform-origin: 60px 60px;
  transition: stroke-dasharray 380ms ease;
}

.health-gauge.warning .health-gauge-arc {
  stroke: var(--amber);
  filter: drop-shadow(0 0 5px rgba(242, 188, 93, 0.64));
}

.health-gauge.critical .health-gauge-arc {
  stroke: var(--red);
  filter: drop-shadow(0 0 5px rgba(255, 100, 123, 0.64));
}

.health-gauge::before {
  content: "";
  position: absolute;
  inset: 13px;
  border: 1px solid rgba(99, 226, 242, 0.2);
  border-radius: 50%;
  background: #06131c;
  box-shadow: inset 0 0 25px rgba(54, 198, 216, 0.08);
}

.health-gauge > div {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
}

.health-gauge strong {
  color: var(--cyan-soft);
  font-size: 29px;
  font-weight: 300;
}

.health-gauge small {
  color: var(--dim);
  font-size: 7px;
  letter-spacing: 0.12em;
}

.gauge-summary strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}

.gauge-summary p {
  margin: 7px 0 13px;
  color: var(--muted);
  font-size: 10px;
}

.metric-inline-tag {
  display: inline-block;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--dim);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.severity-visual {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  margin-top: 16px;
}

.severity-donut {
  position: relative;
  display: grid;
  width: 128px;
  height: 128px;
  place-items: center;
  border-radius: 50%;
}

.severity-donut svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.severity-arc.s0 {
  fill: #45616d;
}

.severity-arc.s1 {
  fill: #6f8792;
}

.severity-arc.s2 {
  fill: #f2bc5d;
}

.severity-arc.s3 {
  fill: #f39a5f;
}

.severity-arc.s4 {
  fill: #ff7b6d;
}

.severity-arc.s5 {
  fill: #ff4f6d;
}

.severity-track {
  fill: none;
  stroke: rgba(69, 97, 109, 0.45);
  stroke-width: 14;
}

.severity-donut > span {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
}

.severity-donut strong {
  color: var(--text);
  font-size: 28px;
  font-weight: 300;
}

.severity-donut small {
  color: var(--dim);
  font-size: 7px;
  letter-spacing: 0.12em;
}

.severity-legend-list {
  display: grid;
  gap: 5px;
}

.severity-legend-list > div {
  display: grid;
  grid-template-columns: 7px 24px 1fr;
  align-items: center;
  gap: 7px;
  padding: 4px 7px;
  border: 1px solid rgba(75, 171, 199, 0.1);
  border-radius: 2px;
  background: rgba(6, 20, 29, 0.55);
}

.severity-legend-list > div.empty {
  opacity: 0.43;
}

.severity-legend-list i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.severity-legend-list i.s0 {
  background: #45616d;
}

.severity-legend-list i.s1 {
  background: #6f8792;
}

.severity-legend-list i.s2 {
  background: #f2bc5d;
}

.severity-legend-list i.s3 {
  background: #f39a5f;
}

.severity-legend-list i.s4 {
  background: #ff7b6d;
}

.severity-legend-list i.s5 {
  background: #ff4f6d;
  box-shadow: 0 0 7px #ff4f6d;
}

.severity-legend-list span {
  color: var(--dim);
  font-size: 8px;
}

.severity-legend-list strong {
  color: var(--text);
  font-size: 10px;
  font-weight: 500;
  text-align: right;
}

.integration-matrix {
  display: grid;
  gap: 7px;
  margin-top: 16px;
}

.integration-item {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 43px;
  padding: 8px 10px;
  border: 1px solid rgba(75, 171, 199, 0.14);
  border-radius: 3px;
  background: rgba(4, 17, 25, 0.54);
}

.integration-item.offline {
  border-color: rgba(255, 100, 123, 0.24);
  background: rgba(56, 13, 23, 0.18);
}

.integration-item div {
  display: grid;
}

.integration-item strong {
  color: var(--text);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.integration-item small {
  color: var(--dim);
  font-size: 8px;
}

.integration-item b {
  color: var(--green);
  font-size: 7px;
  letter-spacing: 0.11em;
}

.integration-item.offline b {
  color: var(--red);
}

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

.fiber-overview-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 24px;
  margin-bottom: 14px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--cyan);
  border-radius: 4px;
  background:
    linear-gradient(90deg, rgba(9, 35, 47, 0.82), rgba(4, 16, 24, 0.62));
}

.fiber-overview-strip h3 {
  margin: 3px 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 400;
}

.fiber-overview-strip p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.fiber-overview-counts {
  display: flex;
  gap: 22px;
}

.fiber-overview-counts > span {
  display: grid;
  gap: 2px;
}

.fiber-overview-counts small {
  color: var(--dim);
  font-size: 7px;
  letter-spacing: 0.12em;
}

.fiber-overview-counts strong,
.fiber-overview-counts b {
  color: var(--cyan-soft);
  font-size: 19px;
  font-weight: 300;
}

.fiber-overview-counts b {
  font-size: 10px;
}

.fiber-view-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 17px;
}

.fiber-view-heading h2 {
  margin: 0;
  color: #effcff;
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 300;
  letter-spacing: -0.025em;
}

.fiber-view-heading > div > p:last-child {
  max-width: 720px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.fiber-sync-status {
  display: grid;
  justify-items: end;
  gap: 7px;
}

.fiber-sync-status small {
  color: var(--dim);
  font-size: 8px;
  letter-spacing: 0.11em;
}

.fiber-sync-status b {
  color: var(--muted);
  font-weight: 500;
}

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

.fiber-inspector-card {
  grid-column: span 4;
}

.ozmap-config-card {
  margin-top: 12px;
}

.ozmap-config-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 220px));
  align-items: end;
  gap: 9px 12px;
}

.ozmap-config-form > label,
.ozmap-config-form > div label {
  color: var(--dim);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.ozmap-config-form input,
.ozmap-config-form select {
  min-height: 36px;
  border: 1px solid rgba(75, 171, 199, 0.2);
  border-radius: 3px;
  color: var(--text);
  background: rgba(3, 14, 22, 0.88);
}

.ozmap-config-form #ozmapPasswordFields,
.ozmap-config-form #ozmapApiKeyField,
.ozmap-config-form #ozmapOAuthFields {
  display: grid;
  grid-template-columns: minmax(0, 220px);
  gap: 7px;
}

.ozmap-config-form .primary-button,
.ozmap-config-form .form-message,
.ozmap-config-form .security-note,
.ozmap-instance-url {
  grid-column: 1 / -1;
}

.ozmap-instance-url {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.ozmap-instance-url code {
  color: var(--cyan-soft);
}

.fiber-toolbar {
  display: grid;
  grid-template-columns: minmax(190px, 1.4fr) repeat(3, minmax(130px, 0.7fr));
  gap: 7px;
  margin: 14px 0 9px;
}

.fiber-toolbar input,
.fiber-toolbar select {
  min-width: 0;
  min-height: 35px;
  border: 1px solid rgba(75, 171, 199, 0.2);
  border-radius: 3px;
  color: var(--text);
  background: rgba(3, 14, 22, 0.88);
  font-size: 10px;
}

.fiber-layer-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 21px;
  margin-bottom: 10px;
}

.fiber-layer-controls label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border: 1px solid rgba(75, 171, 199, 0.12);
  border-radius: 2px;
  color: var(--muted);
  background: rgba(5, 18, 27, 0.54);
  font-size: 8px;
  cursor: pointer;
}

.fiber-layer-controls input {
  accent-color: var(--cyan);
}

.fiber-category-summary {
  display: grid;
  max-height: 200px;
  gap: 4px;
  margin-bottom: 13px;
  overflow-y: auto;
}

.fiber-category-summary > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 8px;
  border: 1px solid rgba(75, 171, 199, 0.1);
  border-radius: 2px;
  background: rgba(4, 16, 23, 0.48);
}

.fiber-category-summary span {
  color: var(--muted);
  font-size: 9px;
}

.fiber-category-summary strong {
  color: var(--cyan-soft);
  font-size: 11px;
  font-weight: 500;
}

.fiber-map-card {
  grid-column: span 8;
}

.fiber-status-card {
  grid-column: span 4;
}

.fiber-map-card h3,
.fiber-status-card h3 {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 17px;
  font-weight: 400;
}

.falcon-map-frame {
  position: relative;
  min-height: 330px;
  margin-top: 15px;
  overflow: hidden;
  border: 1px solid rgba(75, 171, 199, 0.16);
  border-radius: 3px;
  background:
    radial-gradient(circle at 46% 44%, rgba(18, 91, 111, 0.2), transparent 48%),
    linear-gradient(145deg, rgba(3, 14, 22, 0.86), rgba(5, 27, 38, 0.7));
}

.falcon-map-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 48%, rgba(80, 222, 242, 0.05) 50%, transparent 52%);
  background-size: 100% 22px;
}

#falconMapSvg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.falcon-map-grid line {
  stroke: rgba(74, 150, 174, 0.1);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.falcon-outline-glow {
  fill: none;
  stroke: rgba(82, 227, 243, 0.2);
  stroke-width: 7;
  filter: url("#falconGlow");
}

.falcon-outline {
  fill: url("#falconFill");
  stroke: rgba(98, 231, 247, 0.9);
  stroke-width: 1.4;
  vector-effect: non-scaling-stroke;
}

.fiber-map-element {
  cursor: pointer;
  outline: none;
}

.fiber-map-line {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 3px rgba(85, 231, 244, 0.45));
  vector-effect: non-scaling-stroke;
}

.fiber-resource-ducts .fiber-map-line {
  stroke: #7d91a1;
  stroke-dasharray: 4 4;
  filter: none;
}

.fiber-map-area {
  fill: rgba(76, 143, 255, 0.09);
  stroke: rgba(90, 168, 255, 0.55);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.fiber-resource-projects .fiber-map-area {
  fill: rgba(85, 231, 244, 0.035);
  stroke: rgba(85, 231, 244, 0.26);
}

.fiber-map-halo {
  fill: rgba(85, 231, 244, 0.18);
  transform-box: fill-box;
  transform-origin: center;
}

.fiber-map-marker {
  fill: var(--cyan);
  stroke: #031019;
  stroke-width: 1.2;
  filter: drop-shadow(0 0 4px rgba(85, 231, 244, 0.72));
}

.fiber-resource-pops .fiber-map-marker,
.fiber-resource-olts .fiber-map-marker {
  fill: #a8f8ff;
}

.fiber-resource-poles .fiber-map-marker,
.fiber-resource-points .fiber-map-marker {
  fill: #72919f;
}

.fiber-resource-boxes .fiber-map-marker,
.fiber-resource-junction_boxes .fiber-map-marker {
  fill: #6fa8ff;
}

.fiber-resource-splitters .fiber-map-marker,
.fiber-resource-dios .fiber-map-marker,
.fiber-resource-fusions .fiber-map-marker {
  fill: #9f96ff;
}

.fiber-state-down .fiber-map-marker {
  fill: var(--red);
  filter: drop-shadow(0 0 7px rgba(255, 78, 101, 0.95));
}

.fiber-state-down .fiber-map-halo {
  fill: rgba(255, 78, 101, 0.34);
  animation: fiber-alert-pulse 1.15s ease-out infinite;
}

.fiber-state-down .fiber-map-line {
  stroke: var(--red);
  stroke-dasharray: 5 3;
  filter: drop-shadow(0 0 5px rgba(255, 78, 101, 0.8));
  animation: fiber-alert-dash 1.1s linear infinite;
}

.fiber-state-degraded .fiber-map-marker {
  fill: var(--amber);
  filter: drop-shadow(0 0 6px rgba(255, 194, 75, 0.8));
}

.fiber-state-degraded .fiber-map-halo {
  fill: rgba(255, 194, 75, 0.28);
  animation: fiber-signal-pulse 2s ease-out infinite;
}

.fiber-state-degraded .fiber-map-line {
  stroke: var(--amber);
  filter: drop-shadow(0 0 4px rgba(255, 194, 75, 0.65));
}

.fiber-state-up .fiber-map-marker {
  fill: var(--green);
  filter: drop-shadow(0 0 6px rgba(75, 244, 164, 0.82));
}

.fiber-state-up .fiber-map-halo {
  fill: rgba(75, 244, 164, 0.22);
  animation: fiber-signal-pulse 2.6s ease-out infinite;
}

.fiber-state-up .fiber-map-line {
  stroke: var(--green);
  filter: drop-shadow(0 0 4px rgba(75, 244, 164, 0.6));
}

.fiber-state-unknown .fiber-map-marker {
  fill: #7c919c;
  filter: drop-shadow(0 0 3px rgba(124, 145, 156, 0.42));
}

.fiber-state-unknown .fiber-map-halo {
  fill: rgba(124, 145, 156, 0.1);
}

.fiber-city {
  --city-color: var(--green);
}

.fiber-city.fiber-city-degraded {
  --city-color: var(--amber);
}

.fiber-city.fiber-city-down {
  --city-color: var(--red);
}

.fiber-city.fiber-city-unknown {
  --city-color: #7c919c;
}

.fiber-city-aura {
  fill: color-mix(in srgb, var(--city-color) 10%, transparent);
  stroke: color-mix(in srgb, var(--city-color) 54%, transparent);
  stroke-width: 0.8;
  filter: drop-shadow(0 0 12px var(--city-color));
}

.fiber-city-pulse {
  fill: color-mix(in srgb, var(--city-color) 18%, transparent);
  stroke: var(--city-color);
  stroke-width: 0.7;
  transform-box: fill-box;
  transform-origin: center;
  animation: fiber-city-pulse 2.4s ease-out infinite;
}

.fiber-city.fiber-city-down .fiber-city-pulse {
  animation-duration: 1.15s;
}

.fiber-city-label {
  fill: var(--city-color);
  paint-order: stroke;
  stroke: rgba(2, 10, 16, 0.94);
  stroke-width: 3px;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-anchor: middle;
  filter: drop-shadow(0 0 5px var(--city-color));
}

.fiber-city-count {
  paint-order: stroke;
  stroke: rgba(2, 10, 16, 0.96);
  stroke-width: 2.5px;
  font-size: 5.2px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-anchor: middle;
}

.fiber-city-count-up {
  fill: var(--green);
}

.fiber-city-count-degraded {
  fill: var(--amber);
}

.fiber-city-count-down {
  fill: var(--red);
}

@keyframes fiber-signal-pulse {
  0% { opacity: 0.85; transform: scale(0.72); }
  75%, 100% { opacity: 0; transform: scale(1.75); }
}

@keyframes fiber-alert-pulse {
  0% { opacity: 1; transform: scale(0.65); }
  80%, 100% { opacity: 0; transform: scale(2.1); }
}

@keyframes fiber-alert-dash {
  to { stroke-dashoffset: -16; }
}

@keyframes fiber-city-pulse {
  0% { opacity: 0.7; transform: scale(0.7); }
  85%, 100% { opacity: 0; transform: scale(2.5); }
}

.fiber-map-element:hover .fiber-map-marker,
.fiber-map-element:focus-visible .fiber-map-marker {
  filter: brightness(1.35) drop-shadow(0 0 7px rgba(85, 231, 244, 0.9));
}

.fiber-node {
  --node-color: var(--green);
  cursor: pointer;
  outline: none;
}

.fiber-node.degraded {
  --node-color: var(--amber);
}

.fiber-node.down {
  --node-color: var(--red);
}

.fiber-node.unknown {
  --node-color: var(--dim);
}

.fiber-node .node-halo {
  fill: color-mix(in srgb, var(--node-color) 22%, transparent);
}

.fiber-node .node-core {
  fill: var(--node-color);
  stroke: #031019;
  stroke-width: 1.5;
  filter: drop-shadow(0 0 4px var(--node-color));
}

.fiber-node:hover,
.fiber-node:focus-visible {
  filter: brightness(1.3);
}

.fiber-map-empty {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: min(390px, 76%);
  margin: 0;
  padding: 14px 18px;
  border: 1px solid rgba(85, 231, 244, 0.22);
  border-radius: 3px;
  color: var(--muted);
  background: rgba(3, 13, 20, 0.84);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3);
  font-size: 10px;
  line-height: 1.7;
  text-align: center;
  transform: translate(-50%, -50%);
}

.map-compass {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  justify-items: center;
  color: var(--cyan);
  font-size: 8px;
  font-weight: 700;
}

.map-compass i {
  width: 1px;
  height: 30px;
  margin-top: 2px;
  background: linear-gradient(var(--cyan), transparent);
}

.map-zoom-controls {
  position: absolute;
  right: 13px;
  bottom: 13px;
  z-index: 4;
  display: grid;
  gap: 4px;
}

.map-zoom-controls button {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(85, 231, 244, 0.24);
  border-radius: 2px;
  color: var(--cyan-soft);
  background: rgba(3, 14, 22, 0.88);
  cursor: pointer;
}

.map-zoom-controls button:hover,
.map-zoom-controls button:focus-visible {
  border-color: var(--cyan);
  background: rgba(12, 48, 62, 0.94);
}

.fiber-map-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 11px;
}

.fiber-map-footer small {
  color: var(--dim);
  font-size: 7px;
  text-align: right;
}

.fiber-legend i.fiber-dot {
  background: var(--cyan);
}

.fiber-legend i.fiber-cable {
  width: 12px;
  height: 2px;
  border-radius: 0;
  background: var(--cyan);
}

.fiber-legend i.fiber-zone {
  border: 1px solid #5aa8ff;
  background: rgba(90, 168, 255, 0.18);
}

.fiber-legend i.fiber-problem {
  background: var(--red);
  box-shadow: 0 0 7px var(--red);
}

.fiber-legend i.fiber-signal {
  width: 7px;
  height: 7px;
}

.fiber-legend i.fiber-signal.up {
  background: var(--green);
  box-shadow: 0 0 7px var(--green);
}

.fiber-legend i.fiber-signal.degraded {
  background: var(--amber);
  box-shadow: 0 0 7px var(--amber);
}

.fiber-legend i.fiber-signal.down {
  background: var(--red);
  box-shadow: 0 0 7px var(--red);
}

.fiber-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
}

.fiber-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--dim);
  font-size: 7px;
  letter-spacing: 0.08em;
}

.fiber-legend i,
.fiber-node-row > i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.fiber-legend i.degraded,
.fiber-node-row.degraded > i {
  background: var(--amber);
}

.fiber-legend i.down,
.fiber-node-row.down > i {
  background: var(--red);
  box-shadow: 0 0 8px var(--red);
}

.fiber-legend i.unknown,
.fiber-node-row.unknown > i {
  background: var(--dim);
}

.fiber-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 15px;
}

.fiber-summary-grid > div {
  display: grid;
  gap: 2px;
  padding: 10px;
  border: 1px solid rgba(75, 171, 199, 0.13);
  border-radius: 3px;
  background: rgba(4, 17, 25, 0.56);
}

.fiber-summary-grid small {
  color: var(--dim);
  font-size: 7px;
  letter-spacing: 0.11em;
}

.fiber-summary-grid strong {
  color: var(--text);
  font-size: 24px;
  font-weight: 300;
}

.fiber-summary-grid .fiber-summary-down {
  border-color: rgba(255, 100, 123, 0.22);
}

.fiber-summary-grid .fiber-summary-down strong {
  color: var(--red);
}

.fiber-olt-message {
  min-height: 32px;
  margin: 12px 0;
  color: var(--muted);
  font-size: 9px;
}

.fiber-node-list {
  display: grid;
  max-height: 225px;
  gap: 6px;
  overflow-y: auto;
  scrollbar-color: var(--line-hot) transparent;
}

.fiber-node-row {
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 7px 8px;
  border: 1px solid rgba(75, 171, 199, 0.11);
  border-radius: 2px;
  background: rgba(4, 16, 23, 0.48);
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.fiber-node-row div {
  display: grid;
}

.fiber-node-row strong {
  overflow: hidden;
  color: var(--text);
  font-size: 9px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fiber-node-row small {
  overflow: hidden;
  color: var(--dim);
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fiber-node-row > span {
  color: var(--green);
  font-size: 7px;
  letter-spacing: 0.08em;
}

.fiber-node-row.down > span {
  color: var(--red);
}

.fiber-node-row.degraded > span {
  color: var(--amber);
}

.fiber-detail-card {
  margin-top: 12px;
  padding: 20px;
  border: 1px solid var(--line-hot);
  border-radius: 5px;
  background: linear-gradient(145deg, rgba(7, 25, 36, 0.94), rgba(3, 12, 19, 0.9));
}

.fiber-detail-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.fiber-detail-card h3 {
  margin: 3px 0 0;
  color: var(--text);
  font-size: 20px;
  font-weight: 400;
}

.fiber-detail-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 15px;
}

.fiber-detail-meta > span {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid rgba(75, 171, 199, 0.12);
  border-radius: 3px;
  background: rgba(4, 16, 23, 0.55);
}

.fiber-detail-meta small {
  color: var(--dim);
  font-size: 7px;
  letter-spacing: 0.1em;
}

.fiber-detail-meta strong {
  overflow: hidden;
  color: var(--text);
  font-size: 10px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fiber-detail-json {
  max-height: 230px;
  margin: 12px 0 0;
  padding: 12px;
  overflow: auto;
  border: 1px solid rgba(75, 171, 199, 0.1);
  border-radius: 3px;
  color: #9bc5d0;
  background: rgba(2, 10, 16, 0.76);
  font: 9px/1.55 "Consolas", "Liberation Mono", monospace;
  white-space: pre-wrap;
}

.fiber-relations {
  margin-top: 14px;
}

.fiber-relation-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}

.fiber-relation-summary strong {
  color: var(--cyan-soft);
  font-size: 10px;
}

.fiber-relation-summary span {
  color: var(--muted);
  font-size: 9px;
}

.fiber-relation-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.fiber-relation-list > div {
  display: grid;
  grid-template-columns: minmax(90px, 0.6fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(75, 171, 199, 0.1);
  border-radius: 2px;
  background: rgba(4, 16, 23, 0.45);
}

.fiber-relation-list span,
.fiber-relation-list small {
  color: var(--dim);
  font-size: 8px;
}

.fiber-relation-list strong {
  overflow: hidden;
  color: var(--text);
  font-size: 9px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-tag.warning {
  border-color: rgba(242, 188, 93, 0.36);
  color: var(--amber);
}

.data-tag.critical {
  border-color: rgba(255, 100, 123, 0.4);
  color: var(--red);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.stat-card {
  position: relative;
  min-height: 125px;
  padding: 17px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(7, 22, 32, 0.75);
}

.stat-card::after {
  content: "";
  position: absolute;
  right: -10px;
  bottom: -20px;
  width: 74px;
  height: 74px;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.stat-card .stat-label {
  min-height: 30px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.15em;
}

.stat-card .stat-value {
  margin: 8px 0 3px;
  color: var(--cyan-soft);
  font: 300 31px/1 "Segoe UI", Arial, sans-serif;
}

.stat-card .stat-detail {
  color: var(--dim);
  font-size: 9px;
}

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

.data-card {
  position: relative;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: linear-gradient(145deg, rgba(8, 25, 36, 0.9), rgba(4, 14, 22, 0.82));
  box-shadow: 0 12px 45px rgba(0, 0, 0, 0.17);
}

.span-4 {
  grid-column: span 4;
}

.span-5 {
  grid-column: span 5;
}

.span-7 {
  grid-column: span 7;
}

.span-8 {
  grid-column: span 8;
}

.span-12 {
  grid-column: span 12;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 16px;
}

.card-header h3 {
  font-size: 17px;
}

.split-header {
  align-items: center;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 9px;
  width: min(460px, 55%);
}

.filter-row input {
  min-width: 180px;
}

.inline-link {
  padding: 5px 0;
  color: var(--cyan);
  background: transparent;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.component-list,
.signal-list,
.source-list,
.incident-grid {
  display: grid;
  gap: 8px;
}

.component-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid rgba(76, 156, 180, 0.13);
  border-radius: 3px;
  background: rgba(4, 14, 21, 0.5);
}

.component-row.failed {
  border-color: rgba(255, 100, 123, 0.26);
  background: rgba(70, 17, 27, 0.18);
}

.component-name {
  min-width: 0;
  overflow: hidden;
  color: #b7d6de;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.component-detail {
  max-width: 290px;
  overflow: hidden;
  color: var(--dim);
  font: 9px/1.3 "Courier New", monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.state-chip {
  padding: 3px 6px;
  border: 1px solid rgba(92, 227, 175, 0.28);
  border-radius: 2px;
  color: var(--green);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.state-chip.bad {
  border-color: rgba(255, 100, 123, 0.32);
  color: var(--red);
}

.signal-item {
  padding: 11px 12px;
  border-left: 2px solid var(--amber);
  background: rgba(21, 31, 32, 0.56);
}

.signal-item.critical {
  border-color: var(--red);
}

.signal-item.ok {
  border-color: var(--green);
}

.signal-item strong {
  display: block;
  overflow: hidden;
  color: #cbe6ec;
  font-size: 11px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signal-item span {
  color: var(--dim);
  font-size: 9px;
}

.source-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 11px;
  border: 1px solid rgba(76, 156, 180, 0.14);
  border-radius: 3px;
  background: rgba(4, 14, 21, 0.44);
}

.source-item strong {
  display: block;
  color: #bddbe3;
  font-size: 11px;
  font-weight: 500;
}

.source-item span {
  color: var(--dim);
  font-size: 9px;
}

.default-chip {
  padding: 3px 6px;
  border: 1px solid rgba(85, 231, 244, 0.2);
  border-radius: 2px;
  color: var(--cyan) !important;
  font-size: 8px !important;
}

.incident-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(76, 156, 180, 0.16);
  border-radius: 3px;
  background: rgba(4, 14, 21, 0.54);
}

.incident-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.incident-card h4 {
  margin: 0;
  overflow: hidden;
  color: #c9e5eb;
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.incident-card p {
  margin: 7px 0;
  color: var(--muted);
  font-size: 10px;
}

.incident-card .diagnosis {
  padding-top: 7px;
  border-top: 1px solid var(--line);
  color: #9bbbc5;
}

.incident-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: var(--dim);
  font-size: 8px;
  letter-spacing: 0.06em;
}

.table-wrap {
  width: 100%;
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 10px 9px;
  border-bottom: 1px solid rgba(65, 131, 151, 0.16);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--dim);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.13em;
  white-space: nowrap;
}

td {
  color: #9ebbc4;
  font-size: 10px;
}

td strong {
  color: #cce8ed;
  font-size: 11px;
  font-weight: 500;
}

td .sub-line {
  display: block;
  color: var(--dim);
  font-size: 9px;
}

.severity {
  display: inline-block;
  min-width: 31px;
  padding: 3px 5px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--muted);
  font: 9px/1 "Courier New", monospace;
  text-align: center;
}

.severity.s3,
.severity.s4 {
  border-color: rgba(242, 188, 93, 0.35);
  color: var(--amber);
}

.severity.s5 {
  border-color: rgba(255, 100, 123, 0.4);
  color: var(--red);
}

.availability {
  color: var(--green);
}

.availability.bad {
  color: var(--red);
}

.empty-state {
  margin: 10px 0;
  padding: 20px;
  border: 1px dashed var(--line);
  color: var(--dim);
  font-size: 11px;
  text-align: center;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin: 4px 0 18px;
}

.section-heading h2 {
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 300;
}

.view > .data-card + .data-card {
  margin-top: 14px;
}

.history-panel {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(3, 12, 19, 0.72);
}

.history-panel canvas,
.panel-canvas {
  display: block;
  width: 100%;
  height: 230px;
}

.dashboard-selector {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.dashboard-tile {
  min-height: 105px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: #bcd9df;
  background:
    linear-gradient(135deg, rgba(17, 54, 69, 0.45), rgba(4, 15, 22, 0.84));
  text-align: left;
  cursor: pointer;
}

.dashboard-tile:hover,
.dashboard-tile.active {
  border-color: rgba(85, 231, 244, 0.47);
  color: var(--cyan-soft);
}

.dashboard-tile strong {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 500;
}

.dashboard-tile span {
  color: var(--dim);
  font-size: 9px;
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 10px;
}

.grafana-panel {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(76, 156, 180, 0.17);
  border-radius: 3px;
  background: rgba(3, 12, 19, 0.6);
}

.grafana-panel header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.grafana-panel h4 {
  margin: 0;
  color: #bedce4;
  font-size: 11px;
  font-weight: 500;
}

.grafana-panel small {
  color: var(--dim);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.panel-message {
  margin: 12px 0 0;
  color: var(--dim);
  font-size: 9px;
}

.panel-content {
  min-height: 118px;
}

.panel-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
  gap: 8px;
}

.panel-stat {
  min-height: 92px;
  padding: 12px;
  border: 1px solid rgba(85, 231, 244, 0.14);
  border-radius: 3px;
  background: rgba(4, 16, 24, 0.72);
}

.panel-stat strong {
  display: block;
  margin-bottom: 7px;
  color: var(--cyan-soft);
  font-size: 22px;
  font-weight: 300;
}

.panel-stat span {
  display: block;
  overflow: hidden;
  color: #b2d2da;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel-stat small {
  display: block;
  margin-top: 4px;
  color: var(--dim);
  font-size: 8px;
}

.panel-table {
  max-height: 310px;
  overflow: auto;
  border: 1px solid rgba(76, 156, 180, 0.12);
  border-radius: 3px;
}

.panel-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #06121b;
}

.panel-table table {
  min-width: 420px;
}

.dashboard-render {
  min-height: 300px;
}

.security-grid .data-card {
  margin: 0;
}

.password-form {
  align-self: start;
}

.password-form .primary-button {
  margin-top: 18px;
}

.session-current {
  color: var(--green);
}

.agent-layout {
  align-items: stretch;
}

.agent-thread-list {
  display: grid;
  gap: 6px;
  max-height: 480px;
  margin-top: 14px;
  overflow: auto;
}

.agent-thread {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid rgba(76, 156, 180, 0.14);
  border-radius: 3px;
  color: #a7c5cd;
  background: rgba(4, 14, 21, 0.48);
  text-align: left;
  cursor: pointer;
}

.agent-thread:hover,
.agent-thread.active {
  border-color: rgba(85, 231, 244, 0.4);
  color: var(--cyan-soft);
  background: rgba(13, 47, 61, 0.55);
}

.agent-thread strong {
  display: block;
  overflow: hidden;
  font-size: 11px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-thread span {
  color: var(--dim);
  font-size: 8px;
  letter-spacing: 0.06em;
}

.agent-chat-card {
  min-height: 590px;
  display: flex;
  flex-direction: column;
}

.agent-messages {
  flex: 1;
  min-height: 240px;
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.agent-message {
  max-width: 88%;
  margin: 10px 0;
  padding: 12px 14px;
  border: 1px solid rgba(76, 156, 180, 0.15);
  border-radius: 4px;
  background: rgba(4, 14, 21, 0.6);
  color: #a9c6ce;
  font-size: 11px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.agent-message.user {
  margin-left: auto;
  border-color: rgba(85, 231, 244, 0.25);
  color: #cceaf0;
  background: rgba(12, 45, 58, 0.52);
}

.agent-message.assistant {
  border-left: 2px solid var(--cyan);
}

.agent-message small {
  display: block;
  margin-bottom: 6px;
  color: var(--dim);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.openclaw-command {
  margin-bottom: 18px;
}

.openclaw-banner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(360px, 1fr);
  align-items: center;
  gap: 24px;
  overflow: hidden;
  background:
    linear-gradient(115deg, rgba(8, 35, 48, 0.82), rgba(3, 13, 21, 0.9)),
    radial-gradient(circle at 82% 30%, rgba(85, 231, 244, 0.14), transparent 42%);
}

.openclaw-banner h2 {
  margin: 7px 0;
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 300;
  letter-spacing: 0.04em;
}

.openclaw-signal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.openclaw-signal-grid div {
  min-height: 68px;
  padding: 12px;
  border: 1px solid rgba(85, 231, 244, 0.17);
  border-radius: 3px;
  background: rgba(1, 9, 15, 0.56);
}

.openclaw-signal-grid small {
  display: block;
  margin-bottom: 8px;
  color: var(--dim);
  font-size: 8px;
  letter-spacing: 0.13em;
}

.openclaw-signal-grid strong {
  color: var(--cyan-soft);
  font-size: 12px;
  font-weight: 500;
}

.openclaw-channel-signal {
  grid-column: 1 / -1;
}

.openclaw-channel-signal span {
  display: block;
  margin-top: 6px;
  color: var(--dim);
  font-size: 8px;
  line-height: 1.5;
}

.openclaw-channel-signal.connected strong {
  color: var(--green);
}

.openclaw-channel-signal.warning strong {
  color: var(--amber);
}

.openclaw-channel-signal.offline strong {
  color: var(--dim);
}

.telegram-config-card {
  margin-bottom: 18px;
}

.tts-config-card {
  margin-bottom: 18px;
}

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

.tts-config-field {
  display: grid;
  align-content: start;
  gap: 6px;
}

.tts-config-field label {
  color: var(--dim);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.tts-config-field input:not([type="range"]),
.tts-config-field select {
  min-height: 36px;
  border: 1px solid rgba(85, 231, 244, 0.2);
  border-radius: 3px;
  color: var(--text);
  background: rgba(3, 14, 22, 0.9);
}

.tts-edge-tuning {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.tts-range-field input {
  accent-color: var(--cyan);
}

.tts-range-field output {
  color: var(--cyan-soft);
}

.tts-admin-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

#ttsPreviewAudio {
  width: min(520px, 100%);
  height: 34px;
  margin-top: 8px;
}

.agent-message .tts-play-button {
  margin-top: 8px;
}

.telegram-config-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 260px)) auto;
  align-items: end;
  gap: 10px 12px;
}

.telegram-config-form > div {
  display: grid;
  gap: 6px;
}

.telegram-config-form input {
  min-height: 36px;
  border: 1px solid rgba(85, 231, 244, 0.2);
  border-radius: 3px;
  color: var(--text);
  background: rgba(3, 14, 22, 0.9);
}

.telegram-config-form .form-message,
.telegram-config-form .security-note {
  grid-column: 1 / -1;
}

.openclaw-chat-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.openclaw-events {
  display: grid;
  gap: 6px;
  max-height: 280px;
  overflow: auto;
}

.openclaw-event {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 12px;
  padding: 9px 11px;
  border: 1px solid rgba(76, 156, 180, 0.13);
  border-radius: 3px;
  color: #94b4bd;
  background: rgba(2, 10, 16, 0.56);
  font: 10px/1.5 "Courier New", monospace;
}

.openclaw-event time {
  color: var(--dim);
}

.openclaw-live-message {
  opacity: 0.9;
}

.openclaw-live-message::after {
  display: inline-block;
  width: 6px;
  height: 12px;
  margin-left: 4px;
  background: var(--cyan);
  content: "";
  vertical-align: -2px;
  animation: openclaw-cursor 1s steps(1) infinite;
}

@keyframes openclaw-cursor {
  50% {
    opacity: 0;
  }
}

.agent-composer {
  margin-top: 15px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.composer-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
}

.composer-actions .primary-button {
  width: auto;
  min-width: 180px;
}

.activity-log {
  max-height: 460px;
  margin: 0;
  padding: 15px;
  overflow: auto;
  border: 1px solid rgba(76, 156, 180, 0.14);
  border-radius: 3px;
  color: #8daab3;
  background: #020a10;
  font: 10px/1.65 "Courier New", monospace;
  white-space: pre-wrap;
}

.engineering-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.6fr);
  gap: 18px;
}

.engineering-form {
  padding: 15px;
  border: 1px solid rgba(76, 156, 180, 0.16);
  border-radius: 3px;
  background: rgba(3, 12, 19, 0.55);
}

.engineering-jobs {
  display: grid;
  align-content: start;
  gap: 8px;
  max-height: 640px;
  overflow: auto;
}

.engineering-job {
  padding: 12px 13px;
  border: 1px solid rgba(76, 156, 180, 0.16);
  border-radius: 3px;
  background: rgba(4, 14, 21, 0.55);
}

.engineering-job summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  color: #b9d7df;
  cursor: pointer;
}

.engineering-job summary::-webkit-details-marker {
  display: none;
}

.engineering-job summary strong {
  overflow: hidden;
  font-size: 11px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.engineering-job pre {
  max-height: 320px;
  margin: 12px 0 0;
  padding: 11px;
  overflow: auto;
  border: 1px solid rgba(76, 156, 180, 0.12);
  color: #8eabb4;
  background: #020a10;
  font: 9px/1.55 "Courier New", monospace;
  white-space: pre-wrap;
}

.engineering-job .job-meta {
  margin-top: 8px;
  color: var(--dim);
  font-size: 9px;
}

.engineering-job-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.engineering-job-actions .primary-button,
.engineering-job-actions .secondary-button {
  width: auto;
  min-width: 140px;
  margin: 0;
}

.engineering-job code {
  color: var(--cyan-soft);
  font: 9px/1.4 "Courier New", monospace;
}

.mini-action {
  padding: 5px 7px;
  border: 1px solid rgba(255, 100, 123, 0.24);
  border-radius: 2px;
  color: #e58b9a;
  background: rgba(57, 16, 24, 0.34);
  font-size: 8px;
  cursor: pointer;
}

.app-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: auto;
  padding: 15px clamp(20px, 3vw, 42px);
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 8px;
  letter-spacing: 0.14em;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10;
  max-width: min(430px, calc(100vw - 48px));
  padding: 13px 17px;
  border: 1px solid rgba(85, 231, 244, 0.34);
  border-radius: 3px;
  color: #c6edf3;
  background: rgba(5, 20, 29, 0.96);
  box-shadow: var(--shadow);
  font-size: 11px;
}

.toast.error {
  border-color: rgba(255, 100, 123, 0.45);
  color: #ffc2ca;
}

.skeleton-space {
  min-height: 24px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1250px) {
  .metric-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-gauge-card,
  .metric-severity-card {
    grid-column: span 6;
  }

  .metric-integration-card {
    grid-column: span 12;
  }

  .fiber-map-card,
  .fiber-status-card,
  .fiber-inspector-card {
    grid-column: span 12;
  }

  .ozmap-config-form {
    grid-template-columns: 1fr;
  }

  .ozmap-config-form #ozmapPasswordFields,
  .ozmap-config-form #ozmapApiKeyField,
  .ozmap-config-form #ozmapOAuthFields {
    grid-template-columns: 1fr;
  }

  .fiber-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fiber-detail-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-grid {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }

  .span-4,
  .span-5,
  .span-7,
  .span-8 {
    grid-column: span 6;
  }
}

@media (max-width: 920px) {
  :root {
    --sidebar: 74px;
  }

  .sidebar {
    padding: 23px 10px 14px;
  }

  .brand-block {
    justify-content: center;
    padding: 0 0 26px;
  }

  .brand-block > div:last-child,
  .nav-button span:last-child,
  .sidebar-status > div,
  .text-button {
    display: none;
  }

  .nav-button {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 13px 5px;
  }

  .nav-button.active::before {
    left: -11px;
  }

  .sidebar-status {
    justify-content: center;
  }

  .hero-panel {
    grid-template-columns: minmax(0, 1fr) 165px;
  }

  .health-gauge-layout,
  .severity-visual {
    grid-template-columns: 118px minmax(0, 1fr);
  }

  .health-gauge,
  .severity-donut {
    width: 118px;
    height: 118px;
  }

  .hero-orbit {
    width: 155px;
    height: 155px;
  }

  .orbit-core {
    inset: 41px;
  }

  .orbit-core span {
    font-size: 23px;
  }
}

.voice-latency-card {
  margin-top: 12px;
}

.voice-latency-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.voice-latency-kpis,
.voice-latency-providers {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.voice-latency-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.voice-latency-providers {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.voice-latency-kpis > div,
.voice-latency-providers > div {
  min-height: 72px;
  padding: 12px;
  border: 1px solid rgba(85, 231, 244, 0.14);
  border-radius: 3px;
  background: rgba(2, 10, 16, 0.44);
}

.voice-latency-kpis small,
.voice-latency-providers small {
  display: block;
  color: var(--dim);
  font-size: 8px;
  letter-spacing: 0.11em;
}

.voice-latency-kpis strong,
.voice-latency-providers strong {
  display: block;
  margin-top: 9px;
  color: var(--cyan-soft);
  font-size: 20px;
  font-weight: 300;
}

.voice-latency-stages {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
}

.voice-latency-stage {
  padding: 9px;
  border-left: 1px solid rgba(85, 231, 244, 0.28);
  background: rgba(2, 10, 16, 0.32);
}

.voice-latency-stage span {
  display: block;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.09em;
}

.voice-latency-stage strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font-size: 11px;
  font-weight: 500;
}

.active-speaker-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.active-speaker-grid > div {
  min-height: 66px;
  padding: 11px;
  border: 1px solid rgba(85, 231, 244, 0.14);
  border-radius: 3px;
  background: rgba(2, 10, 16, 0.42);
}

.active-speaker-grid small {
  display: block;
  color: var(--dim);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.active-speaker-grid strong {
  display: block;
  margin-top: 7px;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
}

.voice-profile-enroll {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 150px auto;
  align-items: end;
  gap: 10px;
  margin-top: 13px;
}

.voice-profile-enroll label:not(.check-row) {
  display: block;
  margin-bottom: 6px;
  color: var(--dim);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.voice-profile-enroll .check-row {
  grid-column: 1 / -1;
}

.voice-profile-enroll .primary-button {
  width: auto;
  min-width: 220px;
}

.voice-profile-enroll .primary-button.is-recording {
  border-color: #ff5364;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 44, 76, 0.9), rgba(151, 20, 42, 0.95));
  box-shadow: 0 0 24px rgba(255, 44, 76, 0.32);
}

.voice-profile-enroll .security-note {
  margin: 0;
  align-self: end;
}

.voice-profile-list {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.voice-endpointing-control {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.voice-endpointing-control label {
  color: var(--dim);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.voice-endpointing-control input {
  width: 82px;
}

.voice-endpointing-control span,
.voice-endpointing-control small {
  color: var(--muted);
  font-size: 9px;
}

.voice-profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid rgba(85, 231, 244, 0.12);
  background: rgba(2, 10, 16, 0.34);
}

.voice-profile-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

@media (max-width: 720px) {
  .voice-latency-kpis,
  .voice-latency-providers,
  .voice-latency-stages,
  .active-speaker-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .voice-profile-enroll {
    grid-template-columns: 1fr;
  }

  .login-shell {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 34px 20px;
  }

  .login-identity h1 {
    font-size: 55px;
  }

  .reactor {
    width: 66px;
    height: 66px;
    margin-bottom: 20px;
  }

  .login-panel {
    padding: 25px;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: sticky;
    z-index: 5;
    top: 0;
    width: 100%;
    height: auto;
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand-block {
    display: none;
  }

  .primary-nav {
    display: flex;
    overflow-x: auto;
  }

  .nav-button {
    flex: 0 0 auto;
    width: auto;
    display: flex;
    padding: 8px 11px;
    font-size: 10px;
  }

  .nav-button span:last-child {
    display: inline;
  }

  .nav-button.active::before {
    left: 8px;
    right: 8px;
    top: auto;
    bottom: -11px;
    width: auto;
    height: 2px;
  }

  .sidebar-footer {
    display: none;
  }

  .topbar {
    min-height: 75px;
  }

  .clock-block,
  .operator {
    display: none;
  }

  .content {
    padding-top: 17px;
  }

  .metrics-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .fiber-overview-strip {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .fiber-overview-counts {
    flex-wrap: wrap;
  }

  .fiber-view-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .fiber-sync-status {
    justify-items: start;
  }

  .metrics-sync {
    justify-items: start;
  }

  .metric-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-kpi {
    min-height: 172px;
    padding: 16px;
  }

  .metric-kpi-value {
    font-size: 34px;
  }

  .metric-segments {
    right: 16px;
    left: 16px;
  }

  .metric-gauge-card,
  .metric-severity-card,
  .metric-integration-card {
    grid-column: span 12;
  }

  .fiber-map-card,
  .fiber-status-card,
  .fiber-inspector-card {
    grid-column: span 12;
  }

  .fiber-toolbar {
    grid-template-columns: 1fr;
  }

  .falcon-map-frame {
    min-height: 290px;
  }

  .fiber-map-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .fiber-map-footer small {
    text-align: left;
  }

  .telegram-config-form {
    grid-template-columns: 1fr;
  }

  .tts-config-grid {
    grid-template-columns: 1fr;
  }

  .fiber-detail-meta {
    grid-template-columns: 1fr;
  }

  .health-gauge-layout,
  .severity-visual {
    grid-template-columns: 118px minmax(0, 1fr);
  }

  .hero-panel {
    grid-template-columns: 1fr;
    padding: 25px;
  }

  .hero-orbit {
    position: absolute;
    right: -34px;
    bottom: -51px;
    opacity: 0.36;
  }

  .hero-copy h2 {
    max-width: 85%;
    font-size: 33px;
  }

  .hero-meta {
    flex-direction: column;
    gap: 8px;
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .span-4,
  .span-5,
  .span-7,
  .span-8,
  .span-12 {
    grid-column: span 12;
  }

  .split-header {
    display: block;
  }

  .engineering-layout {
    grid-template-columns: 1fr;
  }

  .openclaw-banner {
    grid-template-columns: 1fr;
  }

  .agent-chat-card .card-header {
    flex-wrap: wrap;
  }

  .openclaw-chat-actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .filter-row {
    width: 100%;
    margin-top: 12px;
  }

  .app-footer {
    display: block;
    text-align: center;
  }

  .app-footer span {
    display: block;
    margin: 4px;
  }
}

.public-access-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.public-access-status-grid div {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(91, 226, 194, 0.16);
  border-radius: 10px;
  background: rgba(5, 24, 33, 0.72);
}

.public-access-status-grid dt {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.public-access-status-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.84rem;
}

@media (max-width: 680px) {
  .public-access-status-grid {
    grid-template-columns: 1fr;
  }
}

/* Clientes FTTH */
.customer-view-heading {
  align-items: flex-end;
}

.customer-heading-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.customer-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.customer-counter {
  position: relative;
  display: grid;
  min-height: 108px;
  padding: 14px 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(9, 28, 40, 0.96), rgba(4, 14, 22, 0.92));
  text-align: left;
  cursor: pointer;
  transition: border-color 120ms ease, transform 120ms ease;
}

.customer-counter::after {
  position: absolute;
  right: -24px;
  bottom: -40px;
  width: 96px;
  height: 96px;
  border: 1px solid rgba(77, 202, 220, 0.12);
  border-radius: 50%;
  content: "";
}

.customer-counter:hover,
.customer-counter.active {
  border-color: var(--line-hot);
  transform: translateY(-1px);
}

.customer-counter small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.customer-counter strong {
  margin: 4px 0 0;
  color: var(--cyan-soft);
  font-size: 27px;
  line-height: 1;
}

.customer-counter span {
  align-self: end;
  margin-top: 10px;
  color: #5f7f89;
  font-size: 8px;
}

.customer-counter[data-customer-status="connected"] {
  border-left: 2px solid var(--green);
}

.customer-counter[data-customer-status="connected"] strong {
  color: var(--green);
}

.customer-counter[data-customer-status="los"],
.customer-counter[data-customer-status="power_fail"] {
  border-left: 2px solid var(--red);
}

.customer-counter[data-customer-status="los"] strong,
.customer-counter[data-customer-status="power_fail"] strong {
  color: var(--red);
}

.customer-counter[data-customer-status="offline"],
.customer-counter[data-customer-status="disabled"],
.customer-counter[data-customer-status="stale"] {
  border-left: 2px solid var(--amber);
}

.customer-counter[data-customer-status="offline"] strong,
.customer-counter[data-customer-status="disabled"] strong,
.customer-counter[data-customer-status="stale"] strong {
  color: var(--amber);
}

.customer-counter.is-loading {
  opacity: 0.65;
}

.customer-controls-card {
  display: grid;
  gap: 12px;
}

.customer-history-card {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.customer-history-filters {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(150px, 0.7fr)
    minmax(130px, 0.55fr) auto;
  gap: 10px;
  align-items: end;
}

.customer-history-filters label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.customer-history-filters input,
.customer-history-filters select {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(79, 177, 199, 0.24);
  border-radius: 2px;
  color: var(--text);
  background: rgba(2, 11, 17, 0.86);
}

.customer-history-selected {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.customer-history-selected > div {
  padding: 10px;
  border: 1px solid rgba(79, 177, 199, 0.15);
  background: rgba(3, 12, 18, 0.56);
}

.customer-history-selected small {
  display: block;
  color: var(--muted);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.07em;
}

.customer-history-selected strong {
  display: block;
  margin-top: 4px;
  color: var(--cyan-soft);
  font-size: 15px;
}

.customer-history-chart {
  min-height: 280px;
  padding: 10px;
  overflow: hidden;
  border: 1px solid rgba(79, 177, 199, 0.15);
  background:
    linear-gradient(rgba(66, 149, 169, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(66, 149, 169, 0.04) 1px, transparent 1px),
    rgba(2, 10, 16, 0.66);
  background-size: 40px 40px;
}

.customer-history-chart svg {
  display: block;
  width: 100%;
  height: 260px;
  overflow: visible;
}

.customer-history-axis {
  fill: var(--muted);
  font-size: 8px;
}

.customer-history-line {
  fill: none;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.customer-history-line.connected {
  stroke: var(--green);
}

.customer-history-line.degraded {
  stroke: var(--amber);
}

.customer-history-line.los {
  stroke: #ff5566;
}

.customer-history-line.offline {
  stroke: #84939a;
}

.customer-history-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.07em;
}

.customer-history-legend span::before {
  display: inline-block;
  width: 8px;
  height: 2px;
  margin-right: 5px;
  vertical-align: middle;
  background: currentColor;
  content: "";
}

.customer-history-legend .connected {
  color: var(--green);
}

.customer-history-legend .degraded {
  color: var(--amber);
}

.customer-history-legend .los {
  color: #ff5566;
}

.customer-history-legend .offline {
  color: #84939a;
}

.customer-filters {
  display: grid;
  grid-template-columns: minmax(260px, 1.7fr) minmax(150px, 0.7fr)
    minmax(180px, 0.8fr) auto;
  gap: 10px;
  align-items: end;
}

.customer-filters label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.customer-filters input,
.customer-filters select {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(79, 177, 199, 0.24);
  border-radius: 2px;
  color: var(--text);
  background: rgba(2, 11, 17, 0.86);
}

.customer-map-toggle {
  display: flex !important;
  min-height: 38px;
  align-items: center;
  gap: 7px !important;
  padding: 0 10px;
  border: 1px solid rgba(79, 177, 199, 0.2);
  white-space: nowrap;
}

.customer-map-toggle input {
  width: auto;
  min-height: auto;
}

.customer-result-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.07em;
}

.customer-table {
  min-height: 250px;
}

.customer-table table {
  min-width: 1120px;
}

.customer-table tbody tr {
  cursor: pointer;
}

.customer-table tbody tr:hover {
  background: rgba(52, 158, 181, 0.08);
}

.customer-identity {
  display: grid;
  gap: 2px;
}

.customer-identity strong {
  color: #e2f8fc;
  font-size: 10px;
}

.customer-identity small,
.customer-service small,
.customer-location small {
  color: var(--muted);
  font-size: 8px;
}

.customer-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border: 1px solid rgba(111, 145, 156, 0.24);
  border-radius: 20px;
  color: #8da7ae;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.customer-state::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.customer-state.connected {
  border-color: rgba(92, 227, 175, 0.3);
  color: var(--green);
}

.customer-state.los,
.customer-state.power_fail {
  border-color: rgba(255, 100, 123, 0.3);
  color: var(--red);
}

.customer-state.offline,
.customer-state.disabled,
.customer-state.stale {
  border-color: rgba(242, 188, 93, 0.3);
  color: var(--amber);
}

.customer-state-detail {
  display: block;
  margin-top: 4px;
  color: var(--dim);
  font-size: 7px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.customer-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding-top: 4px;
}

.customer-pagination span {
  min-width: 130px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
}

.customer-map-card {
  margin-top: 14px;
}

.customer-map {
  min-height: 430px;
  border: 1px solid rgba(79, 177, 199, 0.18);
  background: #041019;
}

.customer-secondary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.customer-olt-health,
.customer-plan-status,
.customer-imports {
  display: grid;
  gap: 7px;
}

.customer-plan-running {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid rgba(242, 188, 93, 0.24);
  color: var(--amber);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.customer-health-row,
.customer-import-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid rgba(79, 177, 199, 0.14);
  background: rgba(3, 13, 19, 0.54);
}

.customer-health-row strong,
.customer-import-row strong {
  color: #bedde4;
  font-size: 9px;
}

.customer-health-row small,
.customer-import-row small {
  display: block;
  color: var(--muted);
  font-size: 8px;
}

.customer-health-row b,
.customer-import-row b {
  align-self: center;
  color: var(--amber);
  font-size: 8px;
  text-align: right;
}

.customer-health-row b.ok,
.customer-import-row b.ok {
  color: var(--green);
}

.customer-detail-dialog {
  width: min(1180px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-hot);
  border-radius: 3px;
  color: var(--text);
  background: #06131c;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.72);
}

.customer-detail-dialog::backdrop {
  background: rgba(0, 4, 8, 0.82);
  backdrop-filter: blur(4px);
}

.customer-detail-dialog > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(6, 25, 35, 0.96);
}

.customer-detail-dialog > header h2 {
  margin: 2px 0 0;
  font-size: 19px;
}

.customer-detail-content {
  max-height: calc(100vh - 130px);
  padding: 18px 20px 24px;
  overflow: auto;
}

.customer-detail-hero {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.customer-detail-metric {
  padding: 10px;
  border: 1px solid rgba(79, 177, 199, 0.16);
  background: rgba(3, 12, 18, 0.6);
}

.customer-detail-metric small {
  display: block;
  color: var(--muted);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.customer-detail-metric strong {
  display: block;
  margin-top: 3px;
  color: #dff9ff;
  font-size: 11px;
}

.customer-detail-section {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(79, 177, 199, 0.16);
  background: rgba(3, 12, 18, 0.46);
}

.customer-detail-section h3 {
  margin: 0 0 8px;
  color: var(--cyan-soft);
  font-size: 10px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.customer-detail-section dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.customer-detail-section dt {
  color: var(--muted);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.customer-detail-section dd {
  margin: 2px 0 0;
  color: #c8e5eb;
  font-size: 9px;
  overflow-wrap: anywhere;
}

.customer-source-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 8px;
}

.customer-source-table th,
.customer-source-table td {
  padding: 6px;
  border-bottom: 1px solid rgba(79, 177, 199, 0.12);
  text-align: left;
  vertical-align: top;
}

.customer-source-table th {
  color: var(--muted);
  font-size: 7px;
  letter-spacing: 0.06em;
}

@media (max-width: 1050px) {
  .customer-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customer-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customer-history-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customer-history-selected {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customer-secondary-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 650px) {
  .customer-view-heading,
  .customer-heading-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .customer-summary-grid,
  .customer-filters,
  .customer-history-filters,
  .customer-history-selected,
  .customer-detail-hero,
  .customer-detail-section dl {
    grid-template-columns: minmax(0, 1fr);
  }

  .customer-counter {
    min-height: 88px;
  }

  .customer-result-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .customer-map {
    min-height: 330px;
  }

  .customer-detail-dialog {
    width: calc(100vw - 12px);
    max-height: calc(100vh - 12px);
  }
}

/* Navegador remoto aislado */
.browser-view-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.browser-view-actions a {
  text-decoration: none;
}

.remote-browser-card {
  display: grid;
  gap: 10px;
  padding: 10px;
}

.remote-browser-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 10px;
  border: 1px solid rgba(79, 177, 199, 0.16);
  background: rgba(3, 12, 18, 0.6);
}

.remote-browser-toolbar strong {
  color: var(--cyan-soft);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.remote-browser-toolbar small {
  color: var(--muted);
  font-size: 7px;
  letter-spacing: 0.06em;
}

#remoteBrowserFrame {
  width: 100%;
  min-height: 68vh;
  border: 1px solid rgba(79, 177, 199, 0.24);
  border-radius: 2px;
  background: #02080d;
}

@media (max-width: 700px) {
  .browser-view-actions,
  .remote-browser-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  #remoteBrowserFrame {
    min-height: 66vh;
  }
}

.files-upload-card,
.files-list-card {
  align-self: start;
}

.files-upload-card input[type="file"] {
  width: 100%;
  margin: 6px 0 12px;
  padding: 10px;
  border: 1px dashed rgba(75, 171, 199, 0.28);
  background: rgba(3, 16, 24, 0.7);
  color: var(--muted);
  font-size: 8px;
}

.files-upload-card textarea {
  width: 100%;
  min-height: 78px;
  margin: 6px 0 12px;
  padding: 10px;
  border: 1px solid rgba(75, 171, 199, 0.2);
  background: rgba(1, 11, 17, 0.86);
  color: var(--text);
  font: inherit;
  resize: vertical;
}

.file-list {
  max-height: 620px;
  margin-top: 12px;
  overflow: auto;
}

.friday-file-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 8px;
}

.friday-file-table th,
.friday-file-table td {
  padding: 9px 8px;
  border-bottom: 1px solid rgba(75, 171, 199, 0.12);
  text-align: left;
  vertical-align: top;
}

.friday-file-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #07141b;
  color: var(--dim);
  font-size: 7px;
  letter-spacing: 0.1em;
}

.friday-file-table td strong,
.friday-file-table td small,
.friday-file-table td code {
  display: block;
}

.friday-file-table td strong {
  max-width: 280px;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friday-file-table td small {
  margin-top: 4px;
  color: var(--dim);
}

.friday-file-table td code {
  margin-top: 5px;
  color: var(--cyan-soft);
  font-size: 6px;
}

.file-actions {
  display: flex;
  min-width: 150px;
  gap: 5px;
  flex-wrap: wrap;
}

.file-actions .mini-action,
.file-actions .danger-button {
  padding: 6px 8px;
  font-size: 7px;
  text-decoration: none;
}

@media (max-width: 900px) {
  .files-list-card {
    overflow: hidden;
  }

  .friday-file-table,
  .friday-file-table tbody,
  .friday-file-table tr,
  .friday-file-table td {
    display: block;
    width: 100%;
  }

  .friday-file-table thead {
    display: none;
  }

  .friday-file-table tr {
    padding: 9px;
    border-bottom: 1px solid rgba(75, 171, 199, 0.16);
  }

  .friday-file-table td {
    padding: 5px 3px;
    border: 0;
  }
}

/* Final cascade guard for the two-map command surface. */
.command-center.geographic-command.geospatial-command {
  height: calc(100dvh - 142px);
  min-height: 690px;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(77, 198, 218, 0.18);
  border-radius: 3px;
  background:
    radial-gradient(circle at 50% -20%, rgba(45, 168, 193, 0.13), transparent 42%),
    linear-gradient(145deg, rgba(5, 19, 27, 0.96), rgba(1, 7, 11, 0.98));
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.24);
}

.command-topline.geospatial-topline {
  min-height: 45px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0;
  padding: 3px 10px 7px;
  border-bottom: 1px solid rgba(78, 192, 214, 0.12);
}

.command-topline.geospatial-topline .geospatial-heading h2 {
  margin: 0;
  color: #dff9fc;
  font-size: clamp(15px, 1.05vw, 19px);
  font-weight: 450;
  letter-spacing: 0.08em;
  line-height: 1.1;
  text-transform: uppercase;
}

.command-topline .geospatial-top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 13px;
}

@media (min-width: 2400px) {
  .command-center.geographic-command.geospatial-command {
    height: calc(100dvh - 190px);
  }
}

@media (max-width: 720px) {
  .command-center.geographic-command.geospatial-command {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .command-topline.geospatial-topline {
    display: flex;
    gap: 7px;
    padding-inline: 3px;
  }

  .command-topline .geospatial-top-actions {
    justify-items: end;
    gap: 7px;
  }
}

.about-friday-dialog {
  width: min(620px, calc(100vw - 28px));
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-hot);
  border-radius: 4px;
  color: var(--text);
  background:
    linear-gradient(145deg, rgba(8, 28, 40, 0.99), rgba(2, 9, 14, 0.99));
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.72);
}

.about-friday-dialog::backdrop {
  background: rgba(0, 5, 9, 0.82);
  backdrop-filter: blur(6px);
}

.about-friday-dialog > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 24px 14px;
  border-bottom: 1px solid var(--line);
}

.about-friday-dialog h2 {
  margin: 0;
  color: #effcff;
  font-size: 38px;
  font-weight: 300;
  letter-spacing: 0.1em;
}

.about-friday-subtitle {
  margin: 0;
  padding: 17px 24px 0;
  color: var(--cyan) !important;
  font-size: 10px !important;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.about-friday-dialog > p:not(.about-friday-subtitle) {
  margin: 12px 24px;
  color: #8ba9b3;
}

.about-friday-dialog dl {
  display: grid;
  gap: 1px;
  margin: 18px 24px;
  border: 1px solid rgba(74, 190, 216, 0.13);
}

.about-friday-dialog dl div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
  padding: 9px 11px;
  background: rgba(4, 17, 25, 0.62);
}

.about-friday-dialog dt {
  color: var(--dim);
  font-size: 9px;
  letter-spacing: 0.06em;
}

.about-friday-dialog dd {
  margin: 0;
  color: #c6e1e6;
  font-size: 10px;
  text-align: right;
}

.about-friday-dialog > footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 24px 20px;
  border-top: 1px solid var(--line);
  color: #5f7c86;
  font-size: 9px;
}

.vision-camera-card,
.vision-enroll-card,
.vision-profiles-card {
  min-width: 0;
}

.vision-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid rgba(85, 231, 244, 0.2);
  border-radius: 4px;
  background:
    linear-gradient(rgba(85, 231, 244, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(85, 231, 244, 0.035) 1px, transparent 1px),
    #020a10;
  background-size: 30px 30px;
}

.vision-stage video,
.vision-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.vision-stage video {
  transform: scaleX(-1);
}

.vision-stage canvas {
  pointer-events: none;
}

.vision-camera-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  padding: 30px;
  color: var(--muted);
  background: rgba(2, 10, 16, 0.74);
  font-size: 11px;
  line-height: 1.7;
  text-align: center;
}

.vision-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 13px;
}

.vision-actions .primary-button,
.vision-actions .secondary-button {
  width: auto;
  min-width: 170px;
}

.vision-actions .check-row {
  margin-left: auto;
}

.vision-actions .check-row + .check-row {
  margin-left: 0;
}

.vision-actions #visionConversationStatus {
  flex-basis: 100%;
  width: fit-content;
  margin-left: auto;
}

.vision-presence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 13px;
}

.vision-presence-grid > div {
  min-height: 65px;
  padding: 10px;
  border: 1px solid rgba(85, 231, 244, 0.12);
  border-radius: 3px;
  background: rgba(2, 10, 16, 0.38);
}

.vision-presence-grid small,
.vision-presence-grid strong {
  display: block;
}

.vision-presence-grid small {
  color: var(--dim);
  font-size: 7px;
  letter-spacing: 0.1em;
}

.vision-presence-grid strong {
  margin-top: 7px;
  color: var(--cyan-soft);
  font-size: 10px;
  font-weight: 500;
}

.vision-recognized-list {
  display: grid;
  gap: 6px;
  margin-top: 13px;
}

.vision-recognized-list > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-left: 2px solid var(--green);
  background: rgba(75, 244, 164, 0.05);
}

.vision-recognized-list strong {
  color: var(--text);
  font-size: 10px;
}

.vision-recognized-list span {
  color: var(--muted);
  font-size: 8px;
}

.vision-profile-form {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.vision-profile-form label,
.vision-edit-dialog label {
  color: var(--dim);
  font-size: 8px;
  letter-spacing: 0.09em;
}

.vision-profile-form input:not([type="checkbox"]),
.vision-profile-form select,
.vision-profile-form textarea,
.vision-edit-dialog input,
.vision-edit-dialog select,
.vision-edit-dialog textarea {
  width: 100%;
  min-height: 36px;
  padding: 8px;
  border: 1px solid rgba(85, 231, 244, 0.2);
  border-radius: 3px;
  color: var(--text);
  background: rgba(3, 14, 22, 0.9);
  font: inherit;
}

.vision-profile-form textarea,
.vision-edit-dialog textarea {
  resize: vertical;
}

.vision-consent-row {
  align-items: flex-start;
  margin: 8px 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.vision-profile-list {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.vision-profile-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto;
  align-items: center;
  gap: 8px 12px;
  padding: 10px;
  border: 1px solid rgba(85, 231, 244, 0.11);
  border-radius: 3px;
  background: rgba(3, 15, 23, 0.45);
}

.vision-profile-row strong,
.vision-profile-row small {
  display: block;
}

.vision-profile-row strong {
  color: var(--text);
  font-size: 10px;
}

.vision-profile-row small {
  margin-top: 4px;
  color: var(--dim);
  font-size: 8px;
}

.vision-profile-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.danger-action {
  border-color: rgba(255, 100, 123, 0.38) !important;
  color: var(--red) !important;
}

.vision-interaction-list {
  display: grid;
  max-height: 380px;
  gap: 5px;
  margin-top: 12px;
  overflow-y: auto;
}

.vision-interaction-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 12px;
  padding: 8px 10px;
  border: 1px solid rgba(85, 231, 244, 0.1);
  background: rgba(3, 14, 22, 0.42);
}

.vision-interaction-row span {
  color: var(--cyan-soft);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.vision-interaction-row small {
  grid-column: 1;
  color: var(--dim);
  font-size: 7px;
}

.vision-interaction-row strong {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--muted);
  font-size: 8px;
}

.vision-edit-dialog {
  width: min(580px, calc(100vw - 30px));
  border: 1px solid rgba(85, 231, 244, 0.35);
  border-radius: 5px;
  color: var(--text);
  background: #061821;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.65);
}

.vision-edit-dialog::backdrop {
  background: rgba(0, 5, 9, 0.76);
  backdrop-filter: blur(4px);
}

.vision-edit-dialog form {
  display: grid;
  gap: 7px;
  padding: 20px;
}

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

.vision-dialog-actions .primary-button,
.vision-dialog-actions .secondary-button {
  width: auto;
}

@media (max-width: 720px) {
  .vision-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .vision-actions .primary-button,
  .vision-actions .secondary-button {
    width: 100%;
  }

  .vision-actions .check-row {
    margin-left: 0;
  }

  .vision-presence-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 440px) {
  .metric-kpi-grid {
    grid-template-columns: 1fr;
  }

  .health-gauge-layout,
  .severity-visual {
    grid-template-columns: 1fr;
    justify-items: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

.fiber-correlation-card {
  margin-top: 16px;
}

.fiber-correlation-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.fiber-correlation-metrics > div {
  padding: 10px 12px;
  border: 1px solid rgba(75, 171, 199, 0.14);
  border-radius: 3px;
  background: rgba(3, 16, 24, 0.62);
}

.fiber-correlation-metrics span {
  display: block;
  color: var(--dim);
  font-size: 7px;
  letter-spacing: 0.1em;
}

.fiber-correlation-metrics strong {
  display: block;
  margin-top: 5px;
  color: var(--cyan-soft);
  font-size: 20px;
  font-weight: 400;
}

.fiber-correlation-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.fiber-correlation-columns h4 {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.fiber-correlation-list {
  display: grid;
  max-height: 250px;
  gap: 5px;
  overflow-y: auto;
}

.fiber-correlation-row {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid rgba(75, 171, 199, 0.11);
  border-radius: 2px;
  background: rgba(4, 16, 23, 0.5);
}

.fiber-correlation-row > i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dim);
}

.fiber-correlation-row > i.up {
  background: var(--green);
  box-shadow: 0 0 7px var(--green);
}

.fiber-correlation-row > i.degraded {
  background: var(--amber);
  box-shadow: 0 0 7px var(--amber);
}

.fiber-correlation-row > i.down {
  background: var(--red);
  box-shadow: 0 0 7px var(--red);
}

.fiber-correlation-row div {
  min-width: 0;
}

.fiber-correlation-row strong,
.fiber-correlation-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fiber-correlation-row strong {
  color: var(--text);
  font-size: 9px;
  font-weight: 500;
}

.fiber-correlation-row small {
  margin-top: 3px;
  color: var(--dim);
  font-size: 7px;
}

.fiber-correlation-row > span {
  color: var(--muted);
  font-size: 7px;
  letter-spacing: 0.08em;
}

.olt-access-card {
  margin-top: 16px;
}

.olt-access-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.olt-access-item {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(75, 171, 199, 0.16);
  border-radius: 3px;
  background: rgba(3, 16, 24, 0.66);
}

.olt-access-item > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.olt-access-item > header small,
.olt-access-item > header strong {
  display: block;
}

.olt-access-item > header small {
  color: var(--dim);
  font-size: 7px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.olt-access-item > header strong {
  margin-top: 4px;
  color: var(--cyan-soft);
  font-size: 11px;
  font-weight: 500;
}

.olt-access-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.olt-access-meta > div {
  min-width: 0;
  padding: 7px 8px;
  border-left: 1px solid rgba(75, 171, 199, 0.2);
  background: rgba(4, 21, 29, 0.45);
}

.olt-access-meta dt {
  color: var(--dim);
  font-size: 6px;
  letter-spacing: 0.1em;
}

.olt-access-meta dd {
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.olt-access-form {
  display: grid;
  gap: 9px;
}

.olt-access-form label {
  display: grid;
  gap: 5px;
  color: var(--dim);
  font-size: 7px;
  letter-spacing: 0.1em;
}

.olt-access-form input {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid rgba(75, 171, 199, 0.22);
  border-radius: 2px;
  outline: none;
  background: rgba(1, 11, 17, 0.86);
  color: var(--text);
  font: inherit;
  font-size: 9px;
  letter-spacing: 0;
}

.olt-access-form input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(75, 171, 199, 0.09);
}

.olt-access-form footer {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.olt-access-form button {
  flex: 1 1 120px;
}

.olt-access-card .error {
  color: var(--red);
}

@media (max-width: 1100px) {
  .olt-access-list {
    grid-template-columns: 1fr;
  }
}

.fiber-operational-context {
  margin: 10px 0;
  padding: 10px;
  border-left: 2px solid var(--cyan);
  background: rgba(6, 30, 40, 0.5);
}

.fiber-operational-context > strong {
  color: var(--cyan-soft);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.fiber-operational-context > p {
  margin: 6px 0;
  color: var(--muted);
  font-size: 8px;
}

.fiber-operational-context > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3px 8px;
  padding: 6px 0;
  border-top: 1px solid rgba(75, 171, 199, 0.1);
}

.fiber-operational-context > div span {
  color: var(--amber);
  font-size: 7px;
  text-transform: uppercase;
}

.fiber-operational-context > div strong {
  color: var(--text);
  font-size: 8px;
  overflow-wrap: anywhere;
}

.fiber-operational-context > div small {
  grid-column: 2;
  color: var(--dim);
  font-size: 7px;
  overflow-wrap: anywhere;
}

@media (max-width: 860px) {
  .fiber-correlation-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fiber-correlation-columns {
    grid-template-columns: minmax(0, 1fr);
  }
}

.wake-assistant {
  position: fixed;
  right: 24px;
  bottom: 70px;
  z-index: 20;
  width: min(350px, calc(100vw - 24px));
  padding: 8px;
  border: 1px solid rgba(85, 231, 244, 0.26);
  border-radius: 6px;
  background:
    linear-gradient(145deg, rgba(5, 24, 34, 0.97), rgba(2, 10, 16, 0.98)),
    radial-gradient(circle at 20% 20%, rgba(85, 231, 244, 0.1), transparent 45%);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(16px);
}

.wake-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px;
  border: 0;
  border-radius: 4px;
  color: var(--text);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.wake-toggle:hover,
.wake-toggle:focus-visible {
  background: rgba(85, 231, 244, 0.07);
}

.wake-reactor {
  position: relative;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(85, 231, 244, 0.4);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(85, 231, 244, 0.28), transparent 64%);
  box-shadow: inset 0 0 12px rgba(85, 231, 244, 0.2);
}

.wake-reactor::before,
.wake-reactor::after,
.wake-reactor i {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.wake-reactor::before {
  inset: 6px;
  border: 1px solid rgba(85, 231, 244, 0.5);
}

.wake-reactor::after {
  inset: 13px;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}

.wake-reactor i {
  inset: -1px;
  border: 1px solid transparent;
  border-top-color: var(--cyan);
  animation: spin 4s linear infinite;
}

.wake-toggle-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.wake-toggle-copy small {
  color: var(--dim);
  font-size: 7px;
  letter-spacing: 0.13em;
}

.wake-toggle-copy strong {
  overflow: hidden;
  color: var(--cyan-soft);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wake-live {
  padding: 9px 11px 7px 57px;
  border-top: 1px solid rgba(85, 231, 244, 0.1);
}

.wake-live p {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.wake-live .security-note {
  margin: 0;
  color: var(--dim);
  font-size: 7px;
}

.wake-assistant.is-listening {
  border-color: rgba(75, 244, 164, 0.58);
}

.wake-assistant.is-listening .wake-reactor {
  border-color: var(--green);
  box-shadow:
    inset 0 0 14px rgba(75, 244, 164, 0.3),
    0 0 18px rgba(75, 244, 164, 0.3);
  animation: wake-breathe 2s ease-in-out infinite;
}

.wake-assistant.is-heard .wake-reactor,
.wake-assistant.is-processing .wake-reactor {
  border-color: var(--amber);
  box-shadow: 0 0 20px rgba(255, 194, 75, 0.4);
}

.wake-assistant.is-speaking .wake-reactor {
  border-color: var(--cyan);
  animation: wake-speaking 0.72s ease-in-out infinite alternate;
}

.wake-assistant.is-error {
  border-color: rgba(255, 100, 123, 0.62);
}

.wake-assistant.is-error .wake-toggle-copy strong {
  color: var(--red);
}

.wake-assistant.is-paused {
  opacity: 0.82;
}

body:has(.wake-assistant:not(.is-hidden)) .toast {
  bottom: 154px;
}

@keyframes wake-breathe {
  0%, 100% { transform: scale(0.92); }
  50% { transform: scale(1.08); }
}

@keyframes wake-speaking {
  from { transform: scale(0.9); }
  to { transform: scale(1.12); }
}

@media (max-width: 720px) {
  .wake-assistant {
    right: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
  }

  body:has(.wake-assistant:not(.is-hidden)) .toast {
    bottom: 160px;
  }
}

.knowledge-hero {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 2fr);
  gap: 14px;
  margin-bottom: 14px;
}

.knowledge-core-card {
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-color: rgba(85, 231, 244, 0.34);
  background:
    radial-gradient(circle at 8% 18%, rgba(85, 231, 244, 0.13), transparent 38%),
    linear-gradient(145deg, rgba(8, 30, 42, 0.96), rgba(3, 13, 22, 0.94));
}

.knowledge-core-card::after {
  content: "";
  position: absolute;
  right: -52px;
  bottom: -70px;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(85, 231, 244, 0.14);
  border-radius: 50%;
  box-shadow:
    0 0 0 24px rgba(85, 231, 244, 0.035),
    0 0 0 52px rgba(85, 231, 244, 0.02);
}

.knowledge-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.knowledge-metric {
  min-height: 128px;
  display: grid;
  align-content: center;
  gap: 7px;
  overflow: hidden;
}

.knowledge-metric::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--cyan), transparent);
  opacity: 0.7;
}

.knowledge-metric small {
  color: var(--dim);
  font-size: 8px;
  letter-spacing: 0.14em;
}

.knowledge-metric strong {
  color: var(--cyan-soft);
  font-size: clamp(24px, 2.5vw, 38px);
  font-weight: 300;
  line-height: 1;
}

.knowledge-metric span {
  color: var(--muted);
  font-size: 9px;
}

.knowledge-browser {
  margin-bottom: 14px;
}

.knowledge-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1.6fr) repeat(2, minmax(130px, 1fr)) auto auto;
  align-items: end;
  gap: 10px;
  padding: 12px;
  margin-bottom: 14px;
  border: 1px solid rgba(65, 131, 151, 0.18);
  border-radius: 3px;
  background: rgba(2, 12, 18, 0.34);
}

.knowledge-toolbar label,
.knowledge-editor label {
  display: grid;
  gap: 7px;
  color: var(--dim);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.knowledge-toolbar input,
.knowledge-toolbar select,
.knowledge-editor input,
.knowledge-editor textarea {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--text);
  background: rgba(3, 15, 23, 0.86);
}

.knowledge-toolbar .knowledge-check {
  min-height: 35px;
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.knowledge-toolbar .knowledge-check input {
  width: auto;
  accent-color: var(--cyan);
}

.knowledge-origin {
  display: inline-flex;
  padding: 3px 6px;
  border: 1px solid rgba(85, 231, 244, 0.2);
  border-radius: 2px;
  color: var(--cyan);
  background: rgba(85, 231, 244, 0.055);
  font-size: 8px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.knowledge-origin.external {
  color: var(--amber);
  border-color: rgba(255, 194, 75, 0.28);
}

.knowledge-origin.model {
  color: #d1a6ff;
  border-color: rgba(209, 166, 255, 0.28);
}

.knowledge-actions {
  display: flex;
  gap: 7px;
}

.knowledge-lower-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.55fr);
  gap: 14px;
  margin-bottom: 14px;
}

.knowledge-editor {
  display: grid;
  gap: 10px;
}

.knowledge-editor .card-header,
.knowledge-editor .primary-button,
.knowledge-editor .form-message,
.knowledge-editor .security-note {
  margin-top: 0;
}

.knowledge-editor textarea {
  min-height: 140px;
  resize: vertical;
}

.knowledge-events {
  display: grid;
  gap: 7px;
  max-height: 430px;
  overflow: auto;
}

.knowledge-event {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 14px;
  padding: 10px 11px;
  border-left: 2px solid rgba(85, 231, 244, 0.28);
  background: rgba(6, 23, 32, 0.6);
}

.knowledge-event strong {
  overflow: hidden;
  color: #cfe9ed;
  font-size: 10px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.knowledge-event small {
  color: var(--dim);
  font-size: 8px;
}

.knowledge-event-tag {
  align-self: center;
  color: var(--cyan);
  font-size: 8px;
  letter-spacing: 0.08em;
}

@media (max-width: 1250px) {
  .knowledge-hero,
  .knowledge-lower-grid {
    grid-template-columns: 1fr;
  }

  .knowledge-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .knowledge-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .knowledge-metric:last-child {
    grid-column: span 2;
  }

  .knowledge-toolbar {
    grid-template-columns: 1fr;
  }
}

/* Command center TV interface */
:root {
  --command-surface: rgba(4, 15, 22, 0.9);
  --command-surface-soft: rgba(7, 24, 34, 0.72);
  --command-border: rgba(74, 190, 216, 0.2);
  --command-glow: rgba(38, 207, 233, 0.14);
}

body {
  background:
    radial-gradient(circle at 72% -12%, rgba(20, 105, 127, 0.2), transparent 38%),
    radial-gradient(circle at 12% 105%, rgba(16, 63, 88, 0.15), transparent 34%),
    linear-gradient(145deg, #061018 0%, #02070b 58%, #010407 100%);
}

button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 4px;
  box-shadow: 0 0 0 7px rgba(85, 231, 244, 0.12);
}

.creator-signature {
  margin: 20px 0 0;
  color: rgba(148, 192, 203, 0.64);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.app-shell {
  display: block;
  min-height: 100vh;
}

.workspace {
  min-height: 100vh;
  width: 100%;
}

.sidebar.command-drawer {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 120;
  width: min(390px, 92vw);
  height: 100vh;
  padding: 18px;
  overflow: auto;
  border-right: 1px solid rgba(85, 231, 244, 0.32);
  background:
    linear-gradient(155deg, rgba(8, 25, 36, 0.99), rgba(2, 8, 13, 0.99));
  box-shadow: 26px 0 80px rgba(0, 0, 0, 0.62);
  transform: translateX(-104%);
  visibility: hidden;
  transition: transform 180ms ease;
}

.app-shell.menu-open .sidebar.command-drawer {
  transform: translateX(0);
  visibility: visible;
}

.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(0, 5, 9, 0.74);
  backdrop-filter: blur(4px);
}

.drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.drawer-header .brand-block {
  padding: 0;
}

.drawer-header .brand-block small {
  max-width: 210px;
  line-height: 1.45;
}

.drawer-close {
  min-width: 48px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--muted);
  background: rgba(5, 20, 29, 0.72);
  cursor: pointer;
  font: 700 9px/1 "Courier New", monospace;
  letter-spacing: 0.1em;
}

.drawer-close:hover,
.drawer-close:focus-visible {
  color: var(--cyan);
  border-color: var(--line-hot);
}

.drawer-kicker {
  margin: 17px 6px 8px;
  color: var(--dim);
  font-size: 8px;
  letter-spacing: 0.2em;
}

.command-menu {
  gap: 2px;
}

.menu-group {
  border-bottom: 1px solid rgba(75, 171, 199, 0.1);
}

.menu-group-toggle {
  width: 100%;
  min-height: 43px;
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 8px;
  border: 0;
  padding: 9px 7px;
  color: #a4c5ce;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.menu-group-toggle > span {
  color: var(--dim);
  font: 9px/1 "Courier New", monospace;
}

.menu-group-toggle strong {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.menu-group-toggle i {
  color: var(--cyan);
  font-style: normal;
  text-align: right;
}

.menu-group-toggle:hover,
.menu-group-toggle:focus-visible {
  color: #e4faff;
  background: rgba(45, 147, 169, 0.09);
}

.menu-submenu {
  display: grid;
  gap: 1px;
  padding: 1px 0 8px 32px;
}

.command-menu .nav-button {
  min-height: 34px;
  display: block;
  padding: 7px 10px;
  border-left: 1px solid rgba(90, 198, 219, 0.15);
  color: #7897a3;
  background: transparent;
  font-size: 11px;
}

.command-menu .nav-button:hover,
.command-menu .nav-button:focus-visible {
  color: #dffaff;
  border-color: var(--cyan);
  background: linear-gradient(90deg, rgba(46, 177, 199, 0.13), transparent);
}

.command-menu .nav-button.active {
  color: var(--cyan-soft);
  border-color: var(--cyan);
  background: linear-gradient(90deg, rgba(46, 177, 199, 0.18), transparent);
}

.command-menu .nav-button.active::before {
  display: none;
}

.sidebar-footer {
  margin-top: 22px;
  padding-bottom: 6px;
}

.drawer-signature {
  margin: 0;
  color: #6c8a96;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  min-height: 82px;
  padding: 14px clamp(18px, 2.4vw, 36px);
  border-bottom-color: rgba(80, 191, 214, 0.16);
  background: rgba(2, 9, 14, 0.88);
  backdrop-filter: blur(16px);
}

.topbar-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-identity > div {
  min-width: 0;
}

.topbar-identity .eyebrow {
  margin-bottom: 3px;
  color: #6e9daa;
  font-size: 8px;
  letter-spacing: 0.16em;
}

.topbar-identity h1 {
  overflow: hidden;
  font-size: clamp(18px, 1.7vw, 25px);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-trigger {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(7, 27, 39, 0.68);
  cursor: pointer;
}

.menu-trigger span {
  display: block;
  height: 1px;
  background: var(--cyan);
}

.menu-trigger span:nth-child(2) {
  width: 72%;
}

.command-drawer .brand-mark span,
.wake-assistant:not(.is-listening) .wake-reactor i {
  animation: none;
}

.topbar-actions {
  gap: 14px;
}

.wake-lock-controls {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
}

.wake-lock-button,
.wake-lock-info {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: #8eafb8;
  background: rgba(7, 24, 34, 0.72);
  cursor: pointer;
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.1em;
}

.wake-lock-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
}

.wake-lock-info {
  width: 34px;
  padding: 0;
}

.wake-lock-button:hover,
.wake-lock-info:hover,
.wake-lock-button[aria-pressed="true"] {
  border-color: rgba(92, 227, 175, 0.45);
  color: var(--green);
}

.wake-lock-button.has-error {
  border-color: rgba(255, 100, 123, 0.45);
  color: #ff9aaa;
}

.wake-lock-icon {
  position: relative;
  width: 12px;
  height: 16px;
  display: inline-block;
  border: 1px solid currentColor;
  border-radius: 2px;
}

.wake-lock-icon::after {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  bottom: 2px;
  height: 2px;
  background: currentColor;
}

.wake-lock-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 150;
  width: min(370px, calc(100vw - 24px));
  padding: 16px;
  border: 1px solid var(--line-hot);
  border-radius: 3px;
  background: rgba(3, 14, 21, 0.98);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65);
}

.wake-lock-panel header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.wake-lock-panel dl {
  display: grid;
  gap: 7px;
  margin: 12px 0;
}

.wake-lock-panel dl div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 10px;
}

.wake-lock-panel dt {
  color: var(--dim);
  font-size: 9px;
}

.wake-lock-panel dd {
  margin: 0;
  color: #b8d8df;
  font-size: 10px;
  text-align: right;
}

.wake-lock-panel p {
  margin: 0;
  color: #75939d;
  font-size: 10px;
  line-height: 1.5;
}

.content {
  max-width: 1920px;
  padding: 18px clamp(18px, 2.4vw, 36px) 58px;
}

.command-center {
  overflow: hidden;
  border: 1px solid var(--command-border);
  border-radius: 4px;
  background:
    linear-gradient(100deg, rgba(10, 37, 51, 0.8), rgba(3, 14, 22, 0.76)),
    radial-gradient(circle at 92% 10%, rgba(57, 204, 225, 0.12), transparent 38%);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.2);
}

.command-center-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(18px, 2.1vw, 30px);
}

.command-center-header h2 {
  margin: 0;
  color: #eefcff;
  font-size: clamp(25px, 3vw, 48px);
  font-weight: 260;
  letter-spacing: 0.015em;
  line-height: 1.08;
}

.command-center-header p:not(.eyebrow) {
  margin: 9px 0 0;
  color: #789aa5;
  font-size: clamp(11px, 1vw, 14px);
}

.command-center-actions {
  flex: 0 0 auto;
  display: grid;
  justify-items: end;
  gap: 7px;
}

.command-live-state {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.command-live-state.warning {
  color: var(--amber);
}

.command-live-state.critical {
  color: var(--red);
}

.command-center-actions small {
  color: var(--dim);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.command-detail-button {
  min-height: 30px;
  border: 1px solid var(--line);
  padding: 0 10px;
  color: #8ab1bb;
  background: rgba(4, 18, 27, 0.6);
  cursor: pointer;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.command-detail-button[aria-expanded="true"] {
  color: var(--cyan);
  border-color: var(--line-hot);
}

.command-overview-line {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr 1.3fr;
  border-top: 1px solid var(--command-border);
}

.command-overview-line > div {
  min-width: 0;
  padding: 13px clamp(14px, 1.8vw, 24px);
  border-right: 1px solid var(--command-border);
}

.command-overview-line > div:last-child {
  border-right: 0;
}

.command-overview-line span {
  display: block;
  margin-bottom: 3px;
  color: var(--dim);
  font-size: 8px;
  letter-spacing: 0.13em;
}

.command-overview-line strong {
  display: block;
  overflow: hidden;
  color: #dff8fc;
  font: 500 clamp(14px, 1.5vw, 20px)/1.2 "Courier New", monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-server-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.command-server-grid .metric-kpi {
  min-height: 132px;
  padding: 15px;
  border-color: var(--command-border);
  border-radius: 3px;
  background: linear-gradient(145deg, rgba(8, 25, 35, 0.88), rgba(3, 12, 18, 0.82));
  box-shadow: none;
}

.command-server-grid .metric-kpi::after {
  opacity: 0.18;
}

.command-server-grid .metric-kpi-value {
  margin: 10px 0 5px;
  font-size: clamp(28px, 2.8vw, 44px);
}

.command-server-grid .metric-kpi-detail {
  margin-bottom: 10px;
  font-size: 9px;
}

.command-live-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.75fr);
  gap: 12px;
  margin-top: 12px;
}

.command-panel {
  min-width: 0;
  border: 1px solid var(--command-border);
  border-radius: 3px;
  background: var(--command-surface-soft);
}

.command-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px 11px;
  border-bottom: 1px solid rgba(74, 190, 216, 0.12);
}

.command-panel h3 {
  margin: 0;
  color: #d8f4f8;
  font-size: 14px;
  font-weight: 450;
}

.command-service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.command-service {
  min-width: 0;
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  padding: 9px 12px;
  border-right: 1px solid rgba(74, 190, 216, 0.1);
  border-bottom: 1px solid rgba(74, 190, 216, 0.1);
}

.command-service:nth-child(4n) {
  border-right: 0;
}

.command-service:nth-last-child(-n + 4) {
  border-bottom: 0;
}

.command-service strong {
  display: block;
  overflow: hidden;
  color: #c6e1e6;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-service small {
  display: block;
  overflow: hidden;
  color: #597681;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-service b {
  color: var(--green);
  font: 600 8px/1 "Courier New", monospace;
}

.command-service.offline b {
  color: var(--red);
}

.command-service.stale b {
  color: var(--amber);
}

.command-center.is-stale {
  border-color: rgba(255, 100, 123, 0.4);
}

.command-center.is-stale .command-live-state {
  color: var(--red);
}

.command-signal-list {
  display: grid;
  gap: 0;
  padding: 2px 13px 9px;
}

.command-signal {
  display: grid;
  grid-template-columns: 4px minmax(0, 1fr);
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(75, 171, 199, 0.09);
}

.command-signal:last-child {
  border-bottom: 0;
}

.command-signal i {
  width: 3px;
  border-radius: 2px;
  background: var(--amber);
}

.command-signal.critical i {
  background: var(--red);
}

.command-signal.ok i {
  background: var(--green);
}

.command-signal strong,
.command-signal span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.command-signal strong {
  color: #cae2e6;
  font-size: 10px;
  font-weight: 550;
  white-space: nowrap;
}

.command-signal span {
  color: #5e7a84;
  font-size: 8px;
}

.command-infra-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.command-infra {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 12px;
  min-height: 86px;
  padding: 12px 14px;
  border: 1px solid var(--command-border);
  border-radius: 3px;
  background: rgba(4, 16, 24, 0.72);
}

.command-infra > span {
  color: #6d8a94;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.command-infra > strong {
  color: #d9f4f7;
  font: 500 18px/1 "Courier New", monospace;
}

.command-infra > small {
  grid-column: 1 / -1;
  color: #55717b;
  font-size: 9px;
}

.command-infra > b {
  align-self: start;
  color: var(--green);
  font: 700 8px/1 "Courier New", monospace;
}

.command-infra.warning > b {
  color: var(--amber);
}

.command-infra.critical > b {
  color: var(--red);
}

.overview-detail {
  margin-top: 18px;
}

.app-footer {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 70;
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 6px clamp(18px, 2.4vw, 36px);
  border-top: 1px solid rgba(75, 171, 199, 0.14);
  color: #496771;
  background: rgba(2, 8, 13, 0.94);
  backdrop-filter: blur(12px);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.app-footer .creator-signature {
  margin: 0;
  color: #71909a;
  font-size: 9px;
}

body.connection-lost .command-live-state,
body.connection-lost #commandPlatformStatus {
  color: var(--red);
}

@media (min-width: 1800px) {
  .topbar {
    min-height: 92px;
  }

  .command-center-header {
    padding-block: 34px;
  }

  .command-server-grid .metric-kpi {
    min-height: 154px;
  }
}

@media (max-width: 1250px) {
  .command-server-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .command-live-grid {
    grid-template-columns: 1fr;
  }

  .command-infra-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .topbar-actions .operator,
  .wake-lock-button span:last-child {
    display: none;
  }

  .wake-lock-button {
    width: 38px;
    justify-content: center;
    padding: 0;
  }

  .command-service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .command-service:nth-child(2n) {
    border-right: 0;
  }

  .command-service:nth-last-child(-n + 4) {
    border-bottom: 1px solid rgba(74, 190, 216, 0.1);
  }

  .command-service:nth-last-child(-n + 2) {
    border-bottom: 0;
  }
}

@media (max-width: 720px) {
  .topbar {
    position: relative;
    min-height: 74px;
    padding: 11px 12px;
  }

  .topbar-identity {
    gap: 9px;
  }

  .topbar-identity .eyebrow {
    display: none;
  }

  .topbar-actions {
    gap: 7px;
  }

  .clock-block {
    min-width: 73px;
  }

  .clock-block small,
  .clock-block span {
    display: none;
  }

  .clock-block strong {
    font-size: 14px;
  }

  .icon-button {
    width: 34px;
    height: 34px;
  }

  .wake-lock-button,
  .wake-lock-info {
    min-height: 34px;
  }

  .content {
    padding: 12px 12px 58px;
  }

  .command-center-header {
    display: grid;
    gap: 16px;
    padding: 18px;
  }

  .command-center-actions {
    justify-items: start;
  }

  .command-overview-line {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .command-overview-line > div:nth-child(2) {
    border-right: 0;
  }

  .command-overview-line > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--command-border);
  }

  .command-server-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .command-infra-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .command-infra:last-child {
    grid-column: span 2;
  }

  .app-footer {
    gap: 8px;
    padding-inline: 12px;
  }

  .app-footer > span:first-child {
    display: none;
  }

  .wake-assistant {
    right: 12px;
    bottom: 42px;
    width: 42px;
    height: 42px;
    padding: 2px;
    overflow: hidden;
    border-radius: 50%;
  }

  .wake-assistant:has(.wake-live:not(.is-hidden)) {
    width: calc(100vw - 24px);
    height: auto;
    overflow: visible;
    border-radius: 6px;
  }

  .wake-toggle {
    height: 100%;
    justify-content: center;
    gap: 8px;
    padding: 3px;
  }

  .wake-reactor {
    flex-basis: 32px;
    width: 32px;
    height: 32px;
  }

  .wake-toggle-copy {
    display: none;
  }

  .wake-assistant:has(.wake-live:not(.is-hidden)) .wake-toggle {
    justify-content: flex-start;
    padding: 6px;
  }

  .wake-assistant:has(.wake-live:not(.is-hidden)) .wake-toggle-copy {
    display: grid;
  }

  .wake-assistant:has(.wake-live:not(.is-hidden)) .wake-toggle-copy small {
    display: none;
  }

  .wake-assistant:has(.wake-live:not(.is-hidden)) .wake-toggle-copy strong {
    font-size: 8px;
  }

  body:has(.wake-assistant:not(.is-hidden)) .toast {
    bottom: 92px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar.command-drawer,
  .view,
  .menu-backdrop {
    animation: none !important;
    transition: none !important;
  }
}

/* FRIDAY geospatial operations: two independent live maps */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.command-center.geospatial-command {
  height: calc(100dvh - 142px);
  min-height: 690px;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border-color: rgba(77, 198, 218, 0.18);
  background:
    radial-gradient(circle at 50% -20%, rgba(45, 168, 193, 0.13), transparent 42%),
    linear-gradient(145deg, rgba(5, 19, 27, 0.96), rgba(1, 7, 11, 0.98));
}

@media (min-width: 721px) and (max-height: 900px) {
  .command-center.geospatial-command {
    height: calc(100dvh - 158px);
    min-height: 560px;
  }
}

.geospatial-topline {
  min-height: 45px;
  flex: 0 0 auto;
  margin: 0;
  padding: 3px 10px 7px;
  border-bottom-color: rgba(78, 192, 214, 0.12);
}

.geospatial-heading {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 13px;
}

.geospatial-heading .eyebrow {
  flex: 0 0 auto;
  margin: 0;
  font-size: 7px;
}

.geospatial-heading h2 {
  overflow: hidden;
  color: #dff9fc;
  font-size: clamp(15px, 1.05vw, 19px);
  font-weight: 450;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.geospatial-top-actions {
  display: flex;
  grid-auto-flow: column;
  align-items: center;
  gap: 13px;
}

.geospatial-top-actions .command-live-state,
.geospatial-top-actions small {
  font-size: 8px;
}

.friday-twin-map-grid {
  min-height: 0;
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
}

.friday-zone-map {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(75, 209, 231, 0.24);
  border-radius: 3px;
  background: #02090d;
  box-shadow:
    inset 0 0 0 1px rgba(61, 188, 210, 0.04),
    0 18px 60px rgba(0, 0, 0, 0.26);
}

.friday-zone-map::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 460;
  pointer-events: none;
  border: 1px solid rgba(88, 233, 250, 0.08);
  box-shadow:
    inset 0 0 65px rgba(0, 6, 10, 0.48),
    inset 0 1px 0 rgba(110, 242, 255, 0.14);
}

.friday-zone-header {
  min-height: 62px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(71, 191, 214, 0.16);
  background:
    linear-gradient(90deg, rgba(7, 34, 46, 0.96), rgba(3, 14, 21, 0.94));
}

.friday-zone-header > div:first-child {
  min-width: 0;
}

.friday-zone-header span,
.friday-zone-header small {
  display: block;
  color: #5a8590;
  font-size: clamp(7px, 0.5vw, 9px);
  letter-spacing: 0.14em;
}

.friday-zone-header h3 {
  margin: 2px 0 1px;
  overflow: hidden;
  color: #ebfdff;
  font-size: clamp(18px, 1.55vw, 28px);
  font-weight: 400;
  letter-spacing: 0.07em;
  line-height: 1;
  text-overflow: ellipsis;
  text-shadow: 0 0 22px rgba(73, 220, 240, 0.2);
  white-space: nowrap;
}

.friday-zone-signals {
  display: grid;
  justify-items: end;
  gap: 4px;
  flex: 0 0 auto;
}

.friday-zone-signals > span:last-child {
  color: #7899a2;
  font: 700 clamp(7px, 0.55vw, 9px)/1 "Courier New", monospace;
  letter-spacing: 0.08em;
}

.friday-state-pill {
  max-width: 260px;
  padding: 4px 8px;
  overflow: hidden;
  border: 1px solid rgba(75, 197, 219, 0.18);
  color: #80a6af;
  background: rgba(4, 21, 30, 0.7);
  font-size: clamp(7px, 0.52vw, 9px);
  font-weight: 750;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friday-state-pill.ok {
  border-color: rgba(65, 229, 155, 0.38);
  color: #4deaa2;
}

.friday-state-pill.warning,
.friday-state-pill.pending {
  border-color: rgba(255, 200, 87, 0.34);
  color: #ffc857;
}

.friday-state-pill.critical {
  border-color: rgba(255, 85, 102, 0.45);
  color: #ff6574;
}

.friday-map-stage {
  position: relative;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
  background:
    linear-gradient(rgba(19, 81, 95, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(19, 81, 95, 0.08) 1px, transparent 1px),
    #02090d;
  background-size: 34px 34px;
}

.friday-leaflet-map {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #02090d;
}

.friday-leaflet-map .leaflet-tile-pane {
  filter: saturate(0.72) contrast(1.1) brightness(0.73);
}

.friday-leaflet-map .leaflet-control-attribution {
  border-radius: 2px 0 0;
  color: #8aabb3;
  background: rgba(1, 8, 12, 0.78);
  font-size: 8px;
}

.friday-leaflet-map .leaflet-control-attribution a {
  color: #72d5e7;
}

.friday-pre-map,
.friday-leaflet-map .leaflet-pane {
  pointer-events: auto;
}

.friday-provider-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 650;
  max-width: calc(100% - 140px);
  padding: 5px 8px;
  overflow: hidden;
  border: 1px solid rgba(77, 198, 220, 0.22);
  color: #78a2ac;
  background: rgba(1, 10, 15, 0.78);
  font: 700 8px/1 "Courier New", monospace;
  letter-spacing: 0.08em;
  pointer-events: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friday-provider-badge[data-provider="mapbox"] {
  color: #71e7f7;
}

.friday-provider-badge[data-provider="fallback"] {
  color: #ffc857;
}

.friday-map-controls {
  position: absolute;
  top: 34px;
  left: 10px;
  z-index: 700;
  display: grid;
  gap: 4px;
}

.friday-map-controls button {
  width: 42px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(83, 211, 232, 0.28);
  border-radius: 2px;
  color: #a5d6df;
  background: rgba(2, 14, 21, 0.88);
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.24);
  cursor: pointer;
  font: 750 9px/1 "Courier New", monospace;
}

.friday-map-controls button:hover,
.friday-map-controls button:focus-visible,
.friday-map-controls button[aria-pressed="true"],
.friday-map-controls button[aria-expanded="true"] {
  border-color: rgba(88, 234, 249, 0.68);
  color: #6deafa;
  background: rgba(8, 42, 54, 0.94);
}

.friday-weather-chip {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 710;
  width: clamp(150px, 13vw, 210px);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1px 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(91, 224, 241, 0.3);
  border-radius: 2px;
  color: #e3fbff;
  background:
    linear-gradient(135deg, rgba(4, 25, 35, 0.92), rgba(2, 11, 17, 0.9));
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  text-align: left;
}

.friday-weather-chip > span {
  grid-column: 1 / -1;
  color: #5c8b96;
  font-size: 7px;
  letter-spacing: 0.16em;
}

.friday-weather-chip strong {
  color: #effeff;
  font: 500 clamp(18px, 1.45vw, 27px)/1 "Courier New", monospace;
}

.friday-weather-chip small {
  max-width: 105px;
  color: #83acb5;
  font-size: clamp(7px, 0.54vw, 9px);
  line-height: 1.25;
  text-align: right;
}

.friday-weather-chip.is-pending {
  border-color: rgba(255, 200, 87, 0.28);
}

.friday-weather-chip.is-pending strong {
  color: #ffc857;
  font-size: 12px;
}

.friday-weather-chip.is-error {
  border-color: rgba(255, 85, 102, 0.42);
}

.friday-weather-detail {
  position: absolute;
  top: 88px;
  right: 10px;
  z-index: 715;
  width: min(315px, calc(100% - 90px));
  max-height: calc(100% - 132px);
  padding: 13px;
  overflow: auto;
  border: 1px solid rgba(89, 220, 238, 0.36);
  border-radius: 3px;
  color: #a9cbd2;
  background:
    linear-gradient(150deg, rgba(5, 25, 35, 0.98), rgba(1, 10, 15, 0.98));
  box-shadow: 0 20px 64px rgba(0, 0, 0, 0.52);
  font-size: 9px;
}

.friday-weather-detail header {
  display: grid;
  gap: 2px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(71, 186, 207, 0.14);
}

.friday-weather-detail header span,
.friday-weather-detail > footer {
  color: #557c87;
  font-size: 7px;
  letter-spacing: 0.1em;
}

.friday-weather-detail header strong {
  color: #e0f8fb;
  font-size: 13px;
  font-weight: 500;
}

.friday-weather-detail header small {
  color: #7197a0;
}

.friday-weather-primary {
  display: grid;
  grid-template-columns: 38px auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
}

.friday-weather-primary > b {
  color: #85eefa;
  font-size: 30px;
  font-weight: 400;
  text-shadow: 0 0 18px rgba(90, 229, 245, 0.34);
}

.friday-weather-primary > strong {
  color: #f0feff;
  font: 500 28px/1 "Courier New", monospace;
}

.friday-weather-primary > span {
  color: #779da7;
}

.friday-weather-detail dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin: 0;
}

.friday-weather-detail dl > div {
  padding: 6px 7px;
  border: 1px solid rgba(71, 186, 207, 0.1);
  background: rgba(6, 28, 38, 0.52);
}

.friday-weather-detail dt {
  color: #597d87;
  font-size: 7px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.friday-weather-detail dd {
  margin: 2px 0 0;
  color: #c7e6eb;
  font: 600 10px/1.2 "Courier New", monospace;
}

.friday-weather-forecast {
  display: grid;
  gap: 4px;
  margin-top: 10px;
}

.friday-weather-forecast h4 {
  margin: 0 0 2px;
  color: #6fcad9;
  font-size: 8px;
  letter-spacing: 0.12em;
}

.friday-weather-forecast > div {
  display: grid;
  grid-template-columns: 82px 80px minmax(0, 1fr);
  gap: 5px;
  align-items: center;
  padding: 4px 0;
  border-top: 1px solid rgba(71, 186, 207, 0.09);
}

.friday-weather-forecast span,
.friday-weather-forecast small {
  color: #70949e;
}

.friday-weather-forecast strong {
  color: #d5f1f4;
  font-size: 9px;
}

.friday-weather-detail > footer {
  margin-top: 9px;
  padding-top: 7px;
  border-top: 1px solid rgba(71, 186, 207, 0.12);
}

.friday-weather-pending {
  padding: 5px 0;
}

.friday-weather-pending strong {
  color: #ffc857;
  font-size: 10px;
  letter-spacing: 0.1em;
}

.friday-weather-pending p {
  margin: 7px 0 0;
  color: #74929a;
  line-height: 1.55;
}

.friday-weather-layer-panel {
  position: absolute;
  top: 34px;
  left: 58px;
  z-index: 720;
  width: 190px;
  display: grid;
  gap: 6px;
  padding: 11px;
  border: 1px solid rgba(88, 224, 242, 0.34);
  border-radius: 3px;
  color: #8fb1b9;
  background: rgba(2, 15, 22, 0.95);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.45);
  font-size: 9px;
}

.friday-weather-layer-panel > strong {
  color: #6edae9;
  font-size: 8px;
  letter-spacing: 0.11em;
}

.friday-weather-layer-panel label {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}

.friday-weather-layer-panel input {
  accent-color: var(--cyan);
}

.friday-weather-layer-panel small {
  padding-top: 5px;
  border-top: 1px solid rgba(71, 186, 207, 0.12);
  color: #567983;
  font-size: 7px;
  letter-spacing: 0.07em;
}

.friday-horizon-field {
  display: grid !important;
  grid-template-columns: 1fr 92px;
}

.friday-horizon-field select {
  min-height: 27px;
  padding: 4px 7px;
  border-radius: 2px;
  background: rgba(4, 20, 28, 0.95);
  font-size: 8px;
}

.friday-map-empty-state {
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: 640;
  width: min(360px, calc(100% - 120px));
  display: grid;
  gap: 5px;
  padding: 12px 15px;
  border: 1px solid rgba(255, 200, 87, 0.24);
  color: #ffc857;
  background: rgba(2, 12, 17, 0.72);
  pointer-events: none;
  text-align: center;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(4px);
}

.friday-map-empty-state strong {
  font-size: 9px;
  letter-spacing: 0.11em;
}

.friday-map-empty-state span {
  color: #6e8b93;
  font-size: 8px;
  line-height: 1.4;
}

.friday-zone-footer {
  min-height: 23px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 10px;
  border-top: 1px solid rgba(70, 187, 208, 0.13);
  color: #587a84;
  background: rgba(2, 12, 18, 0.92);
  font-size: 7px;
  letter-spacing: 0.08em;
}

.friday-operations-footer {
  position: relative;
  z-index: 760;
  min-height: 36px;
  flex: 0 0 auto;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 10px;
  padding: 0 10px 8px;
}

.friday-ops-summary {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid rgba(70, 187, 208, 0.13);
  background: rgba(2, 13, 19, 0.84);
}

.friday-ops-summary > span {
  min-width: 0;
  padding: 5px 9px;
  border-right: 1px solid rgba(70, 187, 208, 0.1);
}

.friday-ops-summary > span:last-child {
  border-right: 0;
}

.friday-ops-summary small,
.friday-ops-summary strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friday-ops-summary small {
  color: #4f727c;
  font-size: 6px;
  letter-spacing: 0.12em;
}

.friday-ops-summary strong {
  margin-top: 2px;
  color: #b9dbe1;
  font: 600 9px/1 "Courier New", monospace;
}

.friday-ops-drawer {
  position: relative;
  flex: 0 0 auto;
}

.friday-geo-refresh {
  min-width: 94px;
  border: 1px solid rgba(78, 201, 220, 0.2);
  color: #76a9b3;
  background: rgba(4, 21, 30, 0.88);
  cursor: pointer;
  font-size: 7px;
  font-weight: 750;
  letter-spacing: 0.1em;
}

.friday-geo-refresh:hover,
.friday-geo-refresh:focus-visible {
  border-color: rgba(85, 231, 244, 0.55);
  color: var(--cyan);
}

.friday-geo-refresh:disabled {
  cursor: wait;
  opacity: 0.72;
}

.friday-ops-drawer summary {
  height: 100%;
  min-height: 33px;
  display: grid;
  place-items: center;
  padding: 0 13px;
  border: 1px solid rgba(70, 187, 208, 0.18);
  color: #79a2ac;
  background: rgba(4, 21, 30, 0.88);
  cursor: pointer;
  font-size: 7px;
  font-weight: 750;
  letter-spacing: 0.1em;
  list-style: none;
}

.friday-ops-drawer summary::-webkit-details-marker {
  display: none;
}

.friday-ops-drawer[open] summary {
  border-color: rgba(85, 231, 244, 0.42);
  color: var(--cyan);
}

.friday-ops-drawer-body {
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  width: min(950px, calc(100vw - 60px));
  max-height: min(55vh, 500px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  padding: 12px;
  overflow: auto;
  border: 1px solid rgba(83, 219, 238, 0.34);
  border-radius: 3px;
  color: #87a7b0;
  background: rgba(2, 14, 21, 0.97);
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.55);
}

.friday-ops-drawer-body > div,
.friday-ops-drawer-body > article {
  padding: 9px;
  border: 1px solid rgba(70, 187, 208, 0.11);
  background: rgba(5, 24, 33, 0.52);
}

.friday-ops-drawer-body .fiber-inventory-kpis {
  grid-column: 1 / -1;
}

.friday-ops-drawer-body > button {
  min-height: 34px;
  border: 1px solid rgba(77, 199, 219, 0.24);
  color: #81b6c0;
  background: rgba(4, 20, 29, 0.9);
  cursor: pointer;
  font-size: 8px;
  letter-spacing: 0.1em;
}

.friday-ops-drawer-body #commandSignalsList,
.friday-ops-drawer-body #commandServiceGrid,
.friday-ops-drawer-body #commandRecentActivity {
  max-height: 180px;
  overflow: auto;
}

.friday-fiber-icon {
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  filter: drop-shadow(0 0 5px rgba(77, 223, 239, 0.6));
}

.friday-fiber-icon span {
  width: 13px;
  height: 13px;
  display: block;
  border: 2px solid #72e9f8;
  border-radius: 50%;
  background: rgba(2, 12, 18, 0.9);
}

.friday-fiber-icon.friday-resource-pops span,
.friday-fiber-icon.friday-resource-olts span {
  width: 18px;
  height: 18px;
  border-width: 2px;
  box-shadow:
    inset 0 0 8px currentColor,
    0 0 12px currentColor;
}

.friday-fiber-icon.friday-resource-boxes span,
.friday-fiber-icon.friday-resource-ctos span,
.friday-fiber-icon.friday-resource-junction_boxes span,
.friday-fiber-icon.friday-resource-splitters span {
  border-radius: 2px;
}

.friday-fiber-icon.friday-resource-olts span,
.friday-fiber-icon.friday-resource-splitters span {
  transform: rotate(45deg);
}

.friday-fiber-icon.friday-state-up span {
  border-color: #41e59b;
  color: #41e59b;
}

.friday-fiber-icon.friday-state-degraded span {
  border-color: #ffc857;
  color: #ffc857;
}

.friday-fiber-icon.friday-state-down span {
  border-color: #ff5566;
  color: #ff5566;
  box-shadow: 0 0 12px rgba(255, 85, 102, 0.85);
}

.friday-fiber-icon.friday-state-unknown span {
  border-color: #63dff1;
  color: #63dff1;
}

.friday-fiber-line {
  filter: drop-shadow(0 0 3px rgba(76, 219, 237, 0.75));
}

.friday-fiber-line.friday-state-down {
  filter: drop-shadow(0 0 4px rgba(255, 85, 102, 0.9));
}

.friday-fiber-popup-shell .leaflet-popup-content-wrapper,
.friday-fiber-popup-shell .leaflet-popup-tip {
  color: #9fbec5;
  background: #061720;
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.55);
}

.friday-fiber-popup-shell .leaflet-popup-content {
  min-width: 220px;
  margin: 12px;
}

.friday-fiber-popup {
  display: grid;
  gap: 5px;
  font-size: 10px;
}

.friday-fiber-popup > span {
  color: #61cfdf;
  font-size: 8px;
  letter-spacing: 0.1em;
}

.friday-fiber-popup > strong {
  color: #e1f9fc;
  font-size: 13px;
  font-weight: 500;
}

.friday-fiber-popup dl {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 3px 7px;
  margin: 3px 0;
}

.friday-fiber-popup dt {
  color: #526f78;
}

.friday-fiber-popup dd {
  margin: 0;
  color: #b1cfd5;
}

.friday-fiber-popup button {
  min-height: 30px;
  border: 1px solid rgba(80, 210, 231, 0.3);
  color: #73dceb;
  background: rgba(5, 26, 36, 0.9);
  cursor: pointer;
  font-size: 8px;
  letter-spacing: 0.08em;
}

@media (min-width: 2400px) {
  .command-center.geospatial-command {
    height: calc(100dvh - 190px);
  }

  .friday-zone-header {
    min-height: 86px;
    padding: 12px 16px;
  }

  .friday-zone-header h3 {
    font-size: 34px;
  }

  .friday-map-controls button {
    width: 54px;
    height: 43px;
    font-size: 12px;
  }

  .friday-weather-chip {
    width: 260px;
    padding: 11px 13px;
  }

  .friday-zone-footer,
  .friday-provider-badge,
  .friday-ops-summary small,
  .friday-ops-drawer summary {
    font-size: 10px;
  }
}

@media (max-width: 1000px) {
  .geospatial-heading .eyebrow {
    display: none;
  }

  .friday-zone-header {
    min-height: 55px;
    padding: 6px 9px;
  }

  .friday-zone-header h3 {
    font-size: 17px;
  }

  .friday-zone-signals > span:last-child {
    display: none;
  }

  .friday-state-pill {
    max-width: 150px;
  }

  .friday-weather-chip {
    width: 142px;
  }

  .friday-weather-chip small {
    max-width: 76px;
  }
}

@media (max-width: 720px) {
  .command-center.geospatial-command {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .geospatial-topline {
    display: flex;
    padding-inline: 3px;
  }

  .geospatial-heading h2 {
    font-size: 13px;
  }

  .friday-twin-map-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .friday-zone-map {
    min-height: min(68vh, 620px);
  }

  .friday-zone-header h3 {
    font-size: 19px;
  }

  .friday-map-controls button {
    width: 40px;
    height: 36px;
  }

  .friday-operations-footer {
    display: grid;
    padding-bottom: 10px;
  }

  .friday-ops-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .friday-ops-summary > span {
    border-bottom: 1px solid rgba(70, 187, 208, 0.1);
  }

  .friday-ops-summary > span:last-child {
    grid-column: 1 / -1;
  }

  .friday-ops-drawer summary {
    min-height: 36px;
  }

  .friday-ops-drawer-body {
    position: fixed;
    right: 10px;
    bottom: 46px;
    left: 10px;
    width: auto;
    max-height: 72vh;
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Geographic command center: Falcón map first */
.command-center.geographic-command {
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.command-topline {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 10px;
  padding: 7px 2px 10px;
  border-bottom: 1px solid rgba(74, 190, 216, 0.16);
}

.command-topline h2 {
  margin: 0;
  color: #effcff;
  font-size: clamp(21px, 2vw, 32px);
  font-weight: 300;
  line-height: 1.1;
}

.command-topline p:not(.eyebrow) {
  margin: 4px 0 0;
  color: #617f89;
  font-size: 10px;
}

.geographic-command-layout {
  height: clamp(520px, calc(100vh - 410px), 780px);
  display: grid;
  grid-template-columns:
    minmax(220px, 0.32fr)
    minmax(0, 1fr)
    minmax(260px, 0.32fr);
  gap: 10px;
}

.geographic-side-panel,
.command-map-column {
  min-width: 0;
  min-height: 0;
}

.geographic-side-panel {
  display: flex;
  flex-direction: column;
  gap: 9px;
  overflow: hidden;
  padding: 12px;
  border: 1px solid var(--command-border);
  border-radius: 3px;
  background:
    linear-gradient(155deg, rgba(7, 24, 35, 0.9), rgba(2, 11, 17, 0.9));
}

.geographic-side-panel > header,
.geographic-right-panel article > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.geographic-side-panel h3 {
  margin: 0;
  color: #d7f1f5;
  font-size: 15px;
  font-weight: 450;
}

.fiber-inventory-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid rgba(74, 190, 216, 0.14);
  border-radius: 3px;
  overflow: hidden;
}

.fiber-inventory-kpis > div {
  min-width: 0;
  min-height: 54px;
  padding: 9px 10px;
  border-right: 1px solid rgba(74, 190, 216, 0.1);
  border-bottom: 1px solid rgba(74, 190, 216, 0.1);
  background: rgba(5, 19, 28, 0.56);
}

.fiber-inventory-kpis > div:nth-child(2n) {
  border-right: 0;
}

.fiber-inventory-kpis > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.fiber-inventory-kpis span {
  display: block;
  color: #567480;
  font-size: 8px;
  letter-spacing: 0.11em;
}

.fiber-inventory-kpis strong {
  display: block;
  margin-top: 4px;
  color: #d9f5f8;
  font: 500 clamp(19px, 1.6vw, 27px)/1 "Courier New", monospace;
}

.fiber-sync-card {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border-left: 2px solid var(--cyan);
  background: rgba(11, 44, 58, 0.34);
}

.fiber-sync-card span {
  color: var(--cyan);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.fiber-sync-card strong {
  color: #b8d8de;
  font-size: 10px;
  font-weight: 550;
}

.fiber-sync-card small {
  color: #58757f;
  font-size: 8px;
}

.fiber-command-note {
  margin: 0;
  color: #526e78;
  font-size: 9px;
  line-height: 1.55;
}

.command-side-action {
  width: 100%;
  min-height: 34px;
  margin-top: auto;
  border: 1px solid rgba(74, 190, 216, 0.22);
  border-radius: 2px;
  color: #8eb7c0;
  background: rgba(5, 23, 32, 0.72);
  cursor: pointer;
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.12em;
}

.command-side-action:hover,
.command-side-action:focus-visible {
  border-color: var(--cyan);
  color: var(--cyan);
}

.command-map-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.command-map-mount {
  flex: 1;
  min-height: 0;
}

.command-map-mount > .fiber-map-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 12px;
  border-color: rgba(74, 190, 216, 0.28);
  background:
    linear-gradient(150deg, rgba(4, 17, 26, 0.94), rgba(3, 13, 20, 0.92)),
    radial-gradient(circle at 50% 50%, rgba(29, 142, 168, 0.12), transparent 55%);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
}

.command-map-mount .fiber-map-card > header {
  flex: 0 0 auto;
}

.command-map-mount .fiber-map-card h3 {
  font-size: clamp(17px, 1.6vw, 23px);
}

.command-map-mount .fiber-toolbar {
  flex: 0 0 auto;
  grid-template-columns: minmax(180px, 1.4fr) repeat(4, minmax(96px, 0.7fr));
  gap: 5px;
  margin: 8px 0 5px;
}

.command-map-mount .fiber-toolbar input,
.command-map-mount .fiber-toolbar select {
  min-height: 30px;
  font-size: 8px;
}

.command-map-mount .fiber-layer-controls {
  flex: 0 0 auto;
  gap: 4px;
  min-height: 18px;
  margin-bottom: 5px;
}

.command-map-mount .fiber-layer-controls label {
  padding: 3px 6px;
  font-size: 7px;
}

.command-map-mount .falcon-map-frame {
  flex: 1;
  min-height: 390px;
  margin-top: 0;
  border-color: rgba(85, 231, 244, 0.24);
}

.command-map-mount #falconMapSvg {
  width: 100%;
  height: 100%;
}

.friday-fixed-city {
  pointer-events: none;
}

.friday-city-halo {
  fill: rgba(82, 229, 244, 0.1);
  stroke: rgba(82, 229, 244, 0.42);
  stroke-width: 1;
}

.friday-city-point {
  fill: #9af7ff;
  filter: drop-shadow(0 0 5px rgba(82, 229, 244, 0.9));
}

.friday-city-label {
  fill: #dffbfd;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  paint-order: stroke;
  stroke: rgba(2, 9, 14, 0.94);
  stroke-width: 4px;
  stroke-linejoin: round;
}

.fiber-city-label,
.fiber-city-count {
  display: none;
}

.command-map-mount .fiber-map-footer {
  flex: 0 0 auto;
  padding-top: 7px;
}

.command-map-mount .fiber-map-empty {
  border: 0;
  background: rgba(3, 13, 20, 0.72);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.command-map-mount .fiber-map-empty span {
  color: #55737d;
  font-size: 8px;
  letter-spacing: 0.02em;
}

.command-map-mount .fiber-legend {
  gap: 9px;
}

.map-command-statusbar {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1.15fr 0.7fr 0.75fr 1.15fr;
  border: 1px solid var(--command-border);
  border-radius: 3px;
  background: rgba(4, 16, 24, 0.86);
}

.map-command-statusbar > div {
  min-width: 0;
  padding: 8px 11px;
  border-right: 1px solid var(--command-border);
}

.map-command-statusbar > div:last-child {
  border-right: 0;
}

.map-command-statusbar span {
  display: block;
  color: #54717b;
  font-size: 7px;
  letter-spacing: 0.11em;
}

.map-command-statusbar strong {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: #d8f4f7;
  font: 500 12px/1.25 "Courier New", monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.geographic-right-panel {
  gap: 8px;
}

.geographic-right-panel .command-signals-panel {
  flex: 0 1 36%;
  display: flex;
  flex-direction: column;
  min-height: 180px;
  overflow: hidden;
  border: 0;
  background: transparent;
}

.geographic-right-panel .command-services-panel {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background: linear-gradient(
    180deg,
    rgba(5, 18, 27, 0.98),
    rgba(3, 13, 20, 0.98)
  );
  border: 0;
  background: transparent;
}

.geographic-right-panel .command-signals-panel > header,
.geographic-right-panel .command-services-panel > header {
  padding: 0 0 8px;
  border-bottom: 1px solid rgba(74, 190, 216, 0.13);
}

.geographic-right-panel .command-signal-list {
  flex: 1;
  min-height: 0;
  max-height: none;
  padding: 4px 0 0;
  overflow: auto;
}

.geographic-right-panel .command-service-grid {
  flex: 1;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr);
  max-height: none;
  overflow: auto;
  border: 1px solid rgba(74, 190, 216, 0.1);
}

.geographic-right-panel .command-service {
  min-height: 24px;
  padding: 2px 7px;
  border-right: 0;
  border-bottom: 1px solid rgba(74, 190, 216, 0.09);
}

.geographic-right-panel .command-service:nth-child(4n) {
  border-right: 0;
}

.geographic-right-panel .command-service:nth-last-child(-n + 4) {
  border-bottom: 1px solid rgba(74, 190, 216, 0.09);
}

.geographic-right-panel .command-service:last-child {
  border-bottom: 0;
}

.geographic-right-panel .command-service small {
  display: none;
}

.command-activity-card {
  flex: 0 0 auto;
  display: grid;
  gap: 5px;
  padding: 8px 0;
  border-top: 1px solid rgba(74, 190, 216, 0.13);
  border-bottom: 1px solid rgba(74, 190, 216, 0.13);
}

.command-activity-card > span {
  color: #54717b;
  font-size: 7px;
  letter-spacing: 0.12em;
}

#commandRecentActivity {
  display: grid;
  gap: 4px;
}

#commandRecentActivity > div {
  display: grid;
  grid-template-columns: 5px minmax(0, 1fr);
  gap: 7px;
  align-items: start;
}

#commandRecentActivity i {
  width: 4px;
  height: 4px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 7px var(--green);
}

#commandRecentActivity i.warning {
  background: var(--amber);
  box-shadow: 0 0 7px var(--amber);
}

#commandRecentActivity strong,
#commandRecentActivity small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#commandRecentActivity strong {
  color: #9fbdc4;
  font-size: 8px;
  font-weight: 550;
}

#commandRecentActivity small,
#commandRecentActivity p {
  margin: 0;
  color: #536f79;
  font-size: 7px;
}

.command-telemetry-ribbon {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
  margin-top: 9px;
}

.command-telemetry-ribbon .metric-kpi {
  height: 82px;
  min-height: 82px;
  max-height: 82px;
  padding: 8px 10px;
  overflow: hidden;
}

.command-telemetry-ribbon .metric-kpi-top {
  position: absolute;
  top: 7px;
  right: 10px;
  margin: 0;
}

.command-telemetry-ribbon .metric-glyph {
  display: none;
}

.command-telemetry-ribbon .metric-source {
  font-size: 7px;
}

.command-telemetry-ribbon .metric-kpi-label {
  margin: 0 0 3px;
  font-size: 8px;
}

.command-telemetry-ribbon .metric-kpi-value {
  margin: 0 0 2px;
  font-size: clamp(17px, 1.4vw, 22px);
}

.command-telemetry-ribbon .metric-kpi-detail {
  display: none;
}

.command-telemetry-ribbon .metric-segments {
  height: 3px;
  right: 10px;
  bottom: 5px;
  left: 10px;
}

.fiber-map-slot {
  grid-column: span 8;
  align-self: stretch;
}

.fiber-map-slot .fiber-map-card,
.fiber-route-map-card {
  width: 100%;
  min-height: 480px;
}

.wake-assistant {
  width: 52px;
  height: 52px;
  padding: 3px;
  overflow: hidden;
  border-radius: 50%;
}

.wake-assistant:has(.wake-live:not(.is-hidden)) {
  width: min(350px, calc(100vw - 24px));
  height: auto;
  overflow: visible;
  border-radius: 6px;
}

.wake-toggle {
  height: 100%;
  justify-content: center;
  padding: 4px;
}

.wake-toggle-copy {
  display: none;
}

.wake-assistant:has(.wake-live:not(.is-hidden)) .wake-toggle {
  justify-content: flex-start;
  padding: 8px;
}

.wake-assistant:has(.wake-live:not(.is-hidden)) .wake-toggle-copy {
  display: grid;
}

@media (max-width: 1450px) {
  .geographic-command-layout {
    grid-template-columns:
      minmax(205px, 0.34fr)
      minmax(0, 1fr)
      minmax(240px, 0.34fr);
  }

  .command-map-mount .fiber-toolbar {
    grid-template-columns: minmax(150px, 1.3fr) repeat(4, minmax(82px, 0.7fr));
  }
}

@media (max-width: 1120px) {
  .geographic-command-layout {
    height: auto;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.42fr);
    grid-template-areas:
      "map right"
      "left right";
  }

  .geographic-map-column {
    grid-area: map;
    min-height: 600px;
  }

  .geographic-left-panel {
    grid-area: left;
  }

  .geographic-right-panel {
    grid-area: right;
  }

  .command-telemetry-ribbon {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .command-topline {
    display: grid;
    gap: 8px;
    padding: 4px 0 9px;
  }

  .command-center-actions {
    justify-items: start;
  }

  .geographic-command-layout {
    display: flex;
    flex-direction: column;
  }

  .geographic-map-column {
    order: -1;
    min-height: 510px;
  }

  .command-map-mount .fiber-map-card {
    padding: 8px;
  }

  .command-map-mount .fiber-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .command-map-mount .fiber-toolbar input {
    grid-column: 1 / -1;
  }

  .command-map-mount .falcon-map-frame {
    min-height: 330px;
  }

  .map-command-statusbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .map-command-statusbar > div:nth-child(2) {
    border-right: 0;
  }

  .map-command-statusbar > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--command-border);
  }

  .command-telemetry-ribbon {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .geographic-left-panel .command-side-action,
  .geographic-right-panel .command-side-action {
    margin-top: 0;
  }

  .wake-assistant {
    width: 42px;
    height: 42px;
    padding: 2px;
  }

  .wake-assistant:has(.wake-live:not(.is-hidden)) {
    width: calc(100vw - 24px);
    height: auto;
    padding: 4px;
  }
}

/* This block intentionally follows the legacy single-map rules. */
[hidden] {
  display: none !important;
}

.topbar {
  min-height: 82px;
  padding-block: 10px;
}

.topbar #connectionBanner {
  position: absolute;
  top: calc(100% + 4px);
  right: clamp(18px, 2.4vw, 36px);
  left: auto;
  z-index: 95;
  width: max-content;
  max-width: min(620px, calc(100vw - 36px));
  margin: 0;
  padding: 6px 9px;
  border-color: rgba(255, 200, 87, 0.38);
  color: #ffd170;
  background: rgba(44, 29, 7, 0.95);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.38);
  font-size: 9px;
}

.command-center.geographic-command.geospatial-command {
  height: calc(100dvh - 158px);
  min-height: 690px;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(77, 198, 218, 0.18);
  background:
    radial-gradient(circle at 50% -20%, rgba(45, 168, 193, 0.13), transparent 42%),
    linear-gradient(145deg, rgba(5, 19, 27, 0.96), rgba(1, 7, 11, 0.98));
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.24);
}

@media (min-width: 721px) and (max-height: 900px) {
  .command-center.geographic-command.geospatial-command {
    height: calc(100dvh - 158px);
    min-height: 560px;
  }
}

.command-topline.geospatial-topline {
  min-height: 45px;
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0;
  padding: 3px 10px 7px;
  border-bottom: 1px solid rgba(78, 192, 214, 0.12);
}

.command-topline.geospatial-topline .geospatial-heading h2 {
  margin: 0;
  color: #dff9fc;
  font-size: clamp(15px, 1.05vw, 19px);
  font-weight: 450;
  letter-spacing: 0.08em;
  line-height: 1.1;
  text-transform: uppercase;
}

.command-topline .geospatial-top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 13px;
}

@media (min-width: 2400px) {
  .content {
    max-width: 3840px;
    padding-inline: clamp(24px, 1.2vw, 48px);
  }

  .topbar {
    min-height: 96px;
  }

  .command-center.geographic-command.geospatial-command {
    height: calc(100dvh - 172px);
  }
}

@media (max-width: 720px) {
  .topbar {
    min-height: 74px;
    padding-block: 11px;
  }

  .command-center.geographic-command.geospatial-command {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .command-topline.geospatial-topline {
    display: flex;
    gap: 7px;
    padding-inline: 3px;
  }

  .command-topline .geospatial-top-actions {
    gap: 7px;
  }
}

/* Automatic weather intelligence layers and diagnostics. */
.friday-weather-chip {
  width: clamp(235px, 17vw, 330px);
}

.friday-weather-chip small {
  max-width: 145px;
}

.friday-weather-chip .friday-weather-facts {
  grid-column: 1 / -1;
  max-width: none;
  margin-top: 3px;
  padding-top: 4px;
  border-top: 1px solid rgba(80, 195, 214, 0.14);
  color: #91b7c0;
  font: 600 8px/1.3 "Courier New", monospace;
  text-align: left;
}

.friday-weather-chip.is-stale,
.friday-weather-chip.has-alert {
  border-color: rgba(255, 200, 87, 0.55);
}

.friday-weather-layer-panel {
  width: 235px;
  max-height: calc(100% - 58px);
  overflow: auto;
}

.friday-weather-diagnostics {
  display: grid;
  gap: 3px;
  padding-top: 6px;
  border-top: 1px solid rgba(71, 186, 207, 0.14);
  color: #638791;
  font: 500 7px/1.4 "Courier New", monospace;
}

.friday-weather-diagnostics span {
  overflow-wrap: anywhere;
}

.friday-weather-legend {
  position: absolute;
  left: 10px;
  bottom: 25px;
  z-index: 660;
  width: min(390px, calc(100% - 22px));
  display: grid;
  gap: 2px;
  padding: 6px 8px;
  border: 1px solid rgba(81, 204, 224, 0.22);
  color: #89abb4;
  background: rgba(1, 10, 15, 0.78);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.3);
  font-size: 7px;
  pointer-events: none;
  backdrop-filter: blur(4px);
}

.friday-weather-legend > div {
  display: grid;
  grid-template-columns: 6px 132px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
}

.friday-weather-legend i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #64838b;
}

.friday-weather-legend i.ok {
  background: #41e59b;
  box-shadow: 0 0 6px rgba(65, 229, 155, 0.65);
}

.friday-weather-legend i.warning {
  background: #ffc857;
  box-shadow: 0 0 6px rgba(255, 200, 87, 0.55);
}

.friday-weather-legend i.error {
  background: #ff5566;
}

.friday-weather-legend b {
  overflow: hidden;
  color: #94bbc4;
  font-size: 7px;
  letter-spacing: 0.06em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friday-weather-legend small {
  overflow: hidden;
  color: #607f88;
  font-size: 7px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friday-weather-legend .friday-legend-alert {
  margin-top: 2px;
  padding-top: 3px;
  border-top: 1px solid rgba(255, 200, 87, 0.16);
}

.friday-weather-fixed-location {
  margin: 0 0 8px;
  padding: 5px 6px;
  border-left: 2px solid #57d6e7;
  color: #82aab3;
  background: rgba(6, 29, 39, 0.55);
  font: 600 8px/1.4 "Courier New", monospace;
}

.friday-weather-primary img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.friday-weather-alerts {
  display: grid;
  gap: 5px;
  margin-top: 9px;
}

.friday-weather-alerts > div {
  padding: 6px 7px;
  border-left: 2px solid #ffc857;
  background: rgba(66, 47, 8, 0.28);
}

.friday-weather-alerts strong,
.friday-weather-alerts span {
  display: inline-block;
  margin-right: 7px;
  color: #ffd170;
  font-size: 8px;
}

.friday-weather-alerts p {
  margin: 3px 0 0;
  color: #b9d5da;
}

.friday-leaflet-map .friday-noaa-geocolor-cloud {
  mix-blend-mode: screen;
  filter: saturate(0.38) contrast(1.25) brightness(0.62);
}

.friday-leaflet-map .friday-noaa-ir-cloud {
  mix-blend-mode: screen;
  filter: grayscale(1) contrast(1.3) brightness(0.82);
}

.friday-leaflet-map .friday-weather-precipitation {
  mix-blend-mode: multiply;
}

.friday-subscriber-panel {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 730;
  width: clamp(230px, 20vw, 270px);
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(86, 219, 238, 0.34);
  border-radius: 3px;
  color: #d9f4f8;
  background:
    linear-gradient(135deg, rgba(4, 25, 35, 0.96), rgba(1, 10, 15, 0.95));
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.friday-subscriber-panel.is-stale {
  border-color: rgba(255, 200, 87, 0.55);
}

.friday-subscriber-panel.is-error {
  border-color: rgba(255, 85, 102, 0.55);
}

.friday-subscriber-panel > header,
.friday-subscriber-panel > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.friday-subscriber-panel > header > div {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.friday-subscriber-panel > header span {
  color: #7dddea;
  font: 700 8px/1.2 "Courier New", monospace;
  letter-spacing: 0.1em;
}

.friday-subscriber-panel > header small,
.friday-subscriber-panel > footer small,
.friday-subscriber-panel > footer span {
  overflow: hidden;
  color: #698c95;
  font: 600 7px/1.3 "Courier New", monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friday-subscriber-panel > footer {
  display: grid;
  justify-items: start;
  gap: 2px;
  padding-top: 4px;
  border-top: 1px solid rgba(79, 197, 217, 0.12);
}

.friday-subscriber-panel > footer span {
  color: #8fc4ce;
  white-space: normal;
}

.friday-subscriber-clear {
  min-height: 22px;
  padding: 4px 7px;
  border: 1px solid rgba(88, 226, 243, 0.34);
  border-radius: 2px;
  color: #80ebf8;
  background: rgba(6, 36, 47, 0.82);
  cursor: pointer;
  font: 700 7px/1 "Courier New", monospace;
  letter-spacing: 0.08em;
}

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

.friday-subscriber-grid button {
  min-width: 0;
  min-height: 42px;
  display: grid;
  grid-template-columns: 6px minmax(0, 1fr) auto;
  gap: 4px;
  align-items: center;
  padding: 5px 6px;
  border: 1px solid rgba(75, 188, 208, 0.14);
  border-radius: 2px;
  color: #8eb2ba;
  background: rgba(3, 20, 28, 0.76);
  cursor: pointer;
  text-align: left;
}

.friday-subscriber-grid button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.friday-subscriber-grid button.is-active,
.friday-subscriber-grid button[aria-pressed="true"] {
  border-color: rgba(110, 239, 253, 0.68);
  background: rgba(8, 48, 61, 0.9);
  box-shadow: inset 0 0 18px rgba(72, 218, 238, 0.08);
}

.friday-subscriber-grid i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #84939a;
}

.friday-subscriber-grid i.connected {
  background: #41e59b;
  box-shadow: 0 0 7px rgba(65, 229, 155, 0.7);
}

.friday-subscriber-grid i.degraded {
  background: #ffc857;
  box-shadow: 0 0 7px rgba(255, 200, 87, 0.65);
}

.friday-subscriber-grid i.los {
  background: #ff5566;
  box-shadow: 0 0 7px rgba(255, 85, 102, 0.65);
}

.friday-subscriber-grid i.offline {
  background: #84939a;
}

.friday-subscriber-grid span {
  overflow: hidden;
  color: #7f9fa7;
  font-size: 7px;
  letter-spacing: 0.06em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friday-subscriber-grid strong {
  color: #e9fcff;
  font: 500 14px/1 "Courier New", monospace;
}

.friday-subscriber-grid
  button[data-friday-subscriber-status="connected"] strong {
  color: #41e59b;
}

.friday-subscriber-grid
  button[data-friday-subscriber-status="degraded"] strong {
  color: #ffc857;
}

.friday-subscriber-grid
  button[data-friday-subscriber-status="los"] strong {
  color: #ff5566;
}

.friday-subscriber-grid
  button[data-friday-subscriber-status="offline"] strong {
  color: #93a3a9;
}

.friday-subscriber-grid button:disabled strong {
  color: #697f87;
}

.friday-weather-chip {
  right: calc(clamp(230px, 20vw, 270px) + 20px);
}

.friday-weather-detail {
  top: 178px;
}

.friday-subscriber-popup {
  min-width: 270px;
  color: #a8c8cf;
  font-size: 9px;
}

.leaflet-popup.friday-subscriber-popup-shell
  .leaflet-popup-content-wrapper,
.leaflet-popup.friday-subscriber-popup-shell .leaflet-popup-tip {
  color: #a8c8cf;
  background:
    linear-gradient(145deg, rgba(5, 27, 37, 0.99), rgba(1, 10, 15, 0.99));
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.58);
}

.leaflet-popup.friday-subscriber-popup-shell
  .leaflet-popup-content-wrapper {
  border: 1px solid rgba(83, 214, 233, 0.32);
  border-radius: 3px;
}

.leaflet-popup.friday-subscriber-popup-shell .leaflet-popup-content {
  margin: 13px 14px;
}

.leaflet-popup.friday-subscriber-popup-shell a.leaflet-popup-close-button {
  color: #74b8c4;
}

.friday-subscriber-popup header {
  display: grid;
  gap: 2px;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(70, 184, 205, 0.15);
}

.friday-subscriber-popup header span,
.friday-subscriber-popup header small {
  color: #5e818a;
  font-size: 7px;
  letter-spacing: 0.08em;
}

.friday-subscriber-popup header strong {
  color: #ebfdff;
  font-size: 13px;
  font-weight: 550;
}

.friday-subscriber-popup-state {
  --subscriber-color: #63dff1;
  display: grid;
  grid-template-columns: 8px 1fr auto;
  gap: 6px;
  align-items: center;
  margin: 7px 0;
  padding: 6px;
  border: 1px solid rgba(93, 218, 236, 0.34);
  background: rgba(6, 36, 46, 0.72);
}

.friday-subscriber-popup-state.is-connected {
  --subscriber-color: #41e59b;
}

.friday-subscriber-popup-state.is-degraded {
  --subscriber-color: #ffc857;
}

.friday-subscriber-popup-state.is-los {
  --subscriber-color: #ff5566;
}

.friday-subscriber-popup-state.is-offline {
  --subscriber-color: #84939a;
}

.friday-subscriber-popup-state i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--subscriber-color);
  box-shadow: 0 0 8px var(--subscriber-color);
}

.friday-subscriber-popup-state strong {
  color: #dff8fb;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.friday-subscriber-popup-state span {
  color: #789ba4;
  font-size: 7px;
}

.friday-subscriber-popup dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin: 0;
}

.friday-subscriber-popup dl > div {
  min-width: 0;
  padding: 5px 6px;
  border: 1px solid rgba(71, 183, 204, 0.1);
  background: rgba(5, 27, 36, 0.5);
}

.friday-subscriber-popup dt {
  color: #587b84;
  font-size: 7px;
}

.friday-subscriber-popup dd {
  margin: 2px 0 0;
  overflow: hidden;
  color: #c6e4e9;
  font: 600 8px/1.3 "Courier New", monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friday-subscriber-popup > p {
  margin: 7px 0 0;
  color: #7698a0;
  line-height: 1.45;
}

.friday-subscriber-popup > footer {
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px solid rgba(70, 184, 205, 0.12);
  color: #5d7f88;
  font-size: 7px;
  line-height: 1.45;
}

.friday-subscriber-loading {
  padding: 16px;
  color: #77dce9;
  font: 700 8px/1.4 "Courier New", monospace;
  letter-spacing: 0.08em;
  text-align: center;
}

.friday-subscriber-loading.is-error {
  color: #ff8995;
}

.friday-subscriber-tooltip {
  border: 1px solid rgba(79, 214, 233, 0.32);
  color: #c9f4f8;
  background: rgba(1, 13, 19, 0.94);
  font: 600 8px/1.2 "Courier New", monospace;
}

@media (max-width: 1000px) {
  .friday-weather-chip {
    width: 185px;
    right: 246px;
  }

  .friday-weather-chip .friday-weather-facts {
    font-size: 7px;
  }

  .friday-subscriber-panel {
    width: 226px;
  }

  .friday-weather-legend {
    width: min(330px, calc(100% - 22px));
  }

  .friday-weather-legend > div {
    grid-template-columns: 6px 112px minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .friday-weather-chip {
    top: 238px;
    right: 8px;
    width: min(230px, calc(100% - 64px));
  }

  .friday-weather-detail {
    top: 308px;
  }

  .friday-subscriber-panel {
    top: 8px;
    right: 8px;
    width: min(218px, calc(100% - 66px));
    gap: 4px;
    padding: 6px;
  }

  .friday-subscriber-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 3px;
  }

  .friday-subscriber-grid button {
    min-height: 31px;
    padding-block: 4px;
  }

  .friday-subscriber-grid strong {
    font-size: 12px;
  }

  .friday-subscriber-panel > header {
    gap: 4px;
  }

  .friday-subscriber-clear {
    min-height: 20px;
    padding-inline: 5px;
    font-size: 6px;
  }

  .friday-subscriber-panel > footer {
    display: grid;
    gap: 2px;
  }

  .friday-subscriber-panel > footer span {
    white-space: normal;
  }

  .friday-weather-legend {
    display: none;
  }
}

/* MikroTik connection registry */
.mikrotik-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 4px 0 14px;
  padding: 4px 2px 14px;
  border-bottom: 1px solid rgba(76, 197, 219, 0.18);
}

.mikrotik-heading h2 {
  margin: 3px 0 5px;
  color: #effdff;
  font-size: clamp(23px, 2.1vw, 34px);
  font-weight: 350;
}

.mikrotik-heading p:not(.eyebrow) {
  max-width: 760px;
  margin: 0;
  color: #75949d;
  font-size: 11px;
  line-height: 1.55;
}

.mikrotik-heading-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.mikrotik-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(380px, 0.75fr);
  gap: 14px;
  align-items: start;
}

.mikrotik-address-book {
  min-width: 0;
  padding: 15px;
}

.mikrotik-filters {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(130px, 0.42fr) minmax(170px, 0.55fr);
  gap: 8px;
  margin: 12px 0;
}

.mikrotik-filters label,
.mikrotik-connection-form label {
  min-width: 0;
  display: grid;
  gap: 5px;
  color: #63868f;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.09em;
}

.mikrotik-filters input,
.mikrotik-filters select,
.mikrotik-connection-form input,
.mikrotik-connection-form select,
.mikrotik-connection-form textarea {
  width: 100%;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid rgba(78, 194, 215, 0.22);
  border-radius: 2px;
  color: #d9f3f6;
  background: rgba(2, 15, 22, 0.88);
  font: 500 11px/1.35 "Courier New", monospace;
}

.mikrotik-connection-form textarea {
  resize: vertical;
}

.mikrotik-filters input:focus,
.mikrotik-filters select:focus,
.mikrotik-connection-form input:focus,
.mikrotik-connection-form select:focus,
.mikrotik-connection-form textarea:focus {
  outline: none;
  border-color: rgba(91, 230, 247, 0.64);
  box-shadow: 0 0 0 2px rgba(80, 219, 239, 0.1);
}

.mikrotik-connection-form small,
.mikrotik-form-panel small {
  color: #577983;
  font-size: 8px;
  line-height: 1.45;
}

.mikrotik-router-list {
  display: grid;
  gap: 7px;
  max-height: min(68vh, 760px);
  overflow: auto;
  padding-right: 3px;
}

.mikrotik-router-card {
  border: 1px solid rgba(72, 186, 207, 0.16);
  border-radius: 3px;
  background: rgba(3, 20, 29, 0.72);
}

.mikrotik-router-card.is-selected {
  border-color: rgba(93, 228, 246, 0.58);
  box-shadow: inset 3px 0 0 #54e4f6;
}

.mikrotik-router-main {
  width: 100%;
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.mikrotik-router-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.mikrotik-router-copy strong {
  overflow: hidden;
  color: #e7fbfe;
  font-size: 13px;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mikrotik-router-copy small {
  overflow: hidden;
  color: #668991;
  font: 500 8px/1.4 "Courier New", monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mikrotik-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #718991;
}

.mikrotik-status-dot.ok {
  background: #42e59c;
  box-shadow: 0 0 8px rgba(66, 229, 156, 0.7);
}

.mikrotik-status-dot.warning {
  background: #ffc857;
  box-shadow: 0 0 8px rgba(255, 200, 87, 0.58);
}

.mikrotik-status-dot.critical {
  background: #ff596b;
  box-shadow: 0 0 8px rgba(255, 89, 107, 0.58);
}

.mikrotik-router-state {
  max-width: 165px;
  overflow: hidden;
  padding: 4px 7px;
  border: 1px solid rgba(83, 193, 212, 0.2);
  color: #76969e;
  font-size: 7px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mikrotik-router-state.ok {
  color: #49eaa1;
  border-color: rgba(73, 234, 161, 0.35);
}

.mikrotik-router-state.warning {
  color: #ffc857;
  border-color: rgba(255, 200, 87, 0.35);
}

.mikrotik-router-state.critical {
  color: #ff6677;
  border-color: rgba(255, 102, 119, 0.38);
}

.mikrotik-router-card > footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-top: 1px solid rgba(72, 186, 207, 0.1);
  color: #516f78;
  font: 600 7px/1.3 "Courier New", monospace;
}

.mikrotik-router-card > footer > div {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.mikrotik-router-card > footer button,
.mikrotik-form-actions button,
.mikrotik-fingerprint-enroll button {
  min-height: 27px;
  padding: 5px 8px;
  border: 1px solid rgba(76, 191, 211, 0.24);
  border-radius: 2px;
  color: #81a9b1;
  background: rgba(4, 23, 32, 0.82);
  cursor: pointer;
  font: 700 7px/1 "Courier New", monospace;
  letter-spacing: 0.06em;
}

.mikrotik-form-panel {
  position: sticky;
  top: 12px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(79, 204, 224, 0.25);
  border-radius: 3px;
  background:
    linear-gradient(150deg, rgba(5, 25, 35, 0.97), rgba(1, 10, 15, 0.98));
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}

.mikrotik-connection-form {
  display: grid;
  gap: 12px;
  padding: 15px;
}

.mikrotik-connection-form > header,
.mikrotik-detail-panel > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(75, 186, 207, 0.13);
}

.mikrotik-connection-form h3,
.mikrotik-detail-panel h3 {
  margin: 2px 0 0;
  color: #dbf7fa;
  font-size: 17px;
  font-weight: 450;
}

.mikrotik-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.mikrotik-form-grid .span-2 {
  grid-column: 1 / -1;
}

.mikrotik-preferences {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 10px;
  padding: 8px;
  border: 1px solid rgba(76, 190, 211, 0.12);
  background: rgba(3, 18, 26, 0.54);
}

.mikrotik-preferences label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #83a5ad;
  font-size: 8px;
}

.mikrotik-preferences input {
  accent-color: var(--cyan);
}

.mikrotik-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mikrotik-form-actions .primary-button,
.mikrotik-form-actions .secondary-button,
.mikrotik-form-actions .text-button {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 8px;
}

.mikrotik-form-actions .danger-button {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 85, 102, 0.38);
  border-radius: 2px;
  color: #ff8290;
  background: rgba(56, 11, 19, 0.42);
  cursor: pointer;
  font: 700 8px/1 "Courier New", monospace;
}

.mikrotik-detail-panel {
  display: grid;
  gap: 10px;
  padding: 15px;
  border-top: 1px solid rgba(79, 204, 224, 0.18);
}

.mikrotik-ficha-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.mikrotik-ficha-grid > span {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 6px 7px;
  border: 1px solid rgba(73, 187, 207, 0.11);
  background: rgba(5, 26, 35, 0.52);
}

.mikrotik-ficha-grid small,
.mikrotik-fingerprint-enroll small {
  color: #557983;
  font-size: 7px;
  letter-spacing: 0.07em;
}

.mikrotik-ficha-grid strong {
  overflow: hidden;
  color: #c9e8ec;
  font: 600 9px/1.35 "Courier New", monospace;
  text-overflow: ellipsis;
}

.mikrotik-permission-audit {
  padding: 8px;
  border-left: 2px solid #41e59b;
  background: rgba(8, 45, 34, 0.3);
}

.mikrotik-permission-audit.warning {
  border-left-color: #ffc857;
  background: rgba(55, 42, 8, 0.3);
}

.mikrotik-permission-audit strong,
.mikrotik-permission-audit span {
  display: inline-block;
  margin-right: 8px;
  color: #9dc2c9;
  font-size: 8px;
}

.mikrotik-permission-audit p,
.mikrotik-probe-message {
  margin: 4px 0 0;
  color: #73949c;
  font-size: 8px;
  line-height: 1.5;
}

.mikrotik-query-status {
  display: grid;
  gap: 4px;
}

.mikrotik-query-status > div {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.mikrotik-query-status span {
  padding: 3px 5px;
  border: 1px solid rgba(76, 190, 211, 0.16);
  color: #7799a1;
  font: 600 7px/1.2 "Courier New", monospace;
}

.mikrotik-query-status span.ok {
  color: #54e7a4;
}

.mikrotik-query-status span.warning {
  color: #ffc857;
}

.mikrotik-detail-panel details {
  padding-top: 7px;
  border-top: 1px solid rgba(73, 186, 206, 0.1);
}

.mikrotik-detail-panel summary {
  color: #6fa3ad;
  cursor: pointer;
  font-size: 8px;
}

.mikrotik-detail-panel pre {
  max-height: 320px;
  overflow: auto;
  padding: 8px;
  color: #8eb6be;
  background: rgba(0, 8, 12, 0.72);
  font: 500 8px/1.45 "Courier New", monospace;
  white-space: pre-wrap;
}

.mikrotik-fingerprint {
  display: block;
  color: #76a1aa;
  font: 600 8px/1.5 "Courier New", monospace;
}

.mikrotik-fingerprint-enroll {
  display: grid;
  gap: 5px;
  padding: 8px;
  border: 1px solid rgba(255, 200, 87, 0.25);
  background: rgba(51, 39, 8, 0.25);
}

.mikrotik-fingerprint-enroll code {
  overflow-wrap: anywhere;
  color: #ffd477;
  font-size: 8px;
}

.mikrotik-empty {
  display: grid;
  gap: 5px;
  padding: 34px 18px;
  border: 1px dashed rgba(77, 193, 214, 0.2);
  color: #6d919a;
  text-align: center;
}

.mikrotik-empty strong {
  color: #8ab1b8;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.mikrotik-empty span {
  font-size: 8px;
}

@media (max-width: 1180px) {
  .mikrotik-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .mikrotik-form-panel {
    position: static;
  }

  .mikrotik-router-list {
    max-height: none;
  }
}

@media (max-width: 720px) {
  .mikrotik-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .mikrotik-heading-actions {
    justify-content: space-between;
  }

  .mikrotik-filters,
  .mikrotik-form-grid,
  .mikrotik-preferences {
    grid-template-columns: minmax(0, 1fr);
  }

  .mikrotik-form-grid .span-2 {
    grid-column: auto;
  }

  .mikrotik-router-card > footer {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .mikrotik-router-card > footer > div {
    width: 100%;
    margin-left: 0;
    flex-wrap: wrap;
  }
}

.direct-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.direct-heading h2 {
  margin: 4px 0 6px;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 500;
}

.direct-heading p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
}

.direct-heading-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.direct-terminal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 330px);
  align-items: start;
  gap: 16px;
}

.direct-terminal-card,
.direct-history-panel,
.direct-engineering-panel {
  border: 1px solid rgba(85, 231, 244, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(3, 18, 24, 0.98), rgba(2, 9, 14, 0.98));
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
}

.direct-terminal-card {
  overflow: hidden;
}

.direct-terminal-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(85, 231, 244, 0.14);
  background: rgba(8, 28, 36, 0.86);
}

.direct-terminal-header > div:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.direct-terminal-header strong,
.direct-terminal-header small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.direct-terminal-header strong {
  color: #d9f8ff;
  font: 600 12px/1.4 var(--mono);
}

.direct-terminal-header small {
  color: #6d959e;
  font: 10px/1.5 var(--mono);
}

.terminal-lights {
  display: flex;
  gap: 6px;
}

.terminal-lights span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ef5d68;
}

.terminal-lights span:nth-child(2) {
  background: #e9bd4f;
}

.terminal-lights span:nth-child(3) {
  background: #5bd18a;
}

.direct-messages {
  min-height: 250px;
  max-height: 420px;
  padding: 14px 16px;
}

.direct-live-panel {
  margin: 0 14px 14px;
  overflow: hidden;
  border: 1px solid rgba(85, 231, 244, 0.14);
  border-radius: 5px;
  background: #01070b;
}

.direct-live-panel header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 11px;
  border-bottom: 1px solid rgba(85, 231, 244, 0.1);
  color: #6f979f;
  font: 700 8px/1.4 var(--mono);
  letter-spacing: 0.1em;
}

.direct-live-panel header span {
  color: #80e7ca;
}

.direct-live-panel header i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: #4ce0a8;
  box-shadow: 0 0 10px #4ce0a8;
}

.direct-live-events {
  min-height: 150px;
  max-height: 300px;
  margin: 0;
  padding: 12px;
  overflow: auto;
  color: #a9d4d8;
  font: 10px/1.6 var(--mono);
  white-space: pre-wrap;
}

.direct-composer {
  margin: 0;
  padding: 14px 16px 16px;
}

.terminal-prompt-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid rgba(85, 231, 244, 0.2);
  border-radius: 6px;
  background: rgba(1, 8, 12, 0.88);
}

.terminal-prompt-row > span {
  color: #62e6bd;
  font: 700 16px/1.5 var(--mono);
}

.terminal-prompt-row textarea {
  width: 100%;
  min-height: 68px;
  padding: 0;
  border: 0;
  outline: 0;
  color: #d8f3f5;
  background: transparent;
  font: 12px/1.65 var(--mono);
  resize: vertical;
}

.direct-history-panel {
  padding: 14px;
}

.direct-history-panel h3 {
  margin: 4px 0 12px;
}

.direct-engineering-panel {
  margin-top: 14px;
  padding: 14px;
}

.direct-engineering-panel > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: #a9cbd1;
  cursor: pointer;
  font: 700 10px/1.4 var(--mono);
  letter-spacing: 0.08em;
}

.direct-engineering-panel[open] > summary {
  margin-bottom: 14px;
}

@media (max-width: 900px) {
  .direct-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .direct-heading-actions {
    justify-content: space-between;
  }

  .direct-terminal-layout {
    grid-template-columns: 1fr;
  }

  .direct-history-panel {
    order: 2;
  }
}

@media (max-width: 620px) {
  .direct-heading-actions,
  .direct-composer .composer-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .direct-composer .composer-actions button {
    width: 100%;
  }

  .direct-messages {
    max-height: 50dvh;
  }

  .direct-live-events {
    max-height: 36dvh;
  }
}
