:root {
  --bg-1: #041218;
  --bg-2: #0a2530;
  --bg-3: #103945;
  --panel: rgba(5, 18, 24, 0.74);
  --panel-strong: rgba(2, 12, 18, 0.92);
  --text: #d7edf5;
  --text-soft: #9dc2ce;
  --line: rgba(176, 223, 236, 0.22);
  --cyan: #67f4de;
  --teal: #2fd9ff;
  --amber: #ffd07a;
  --danger: #ff7d7d;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  --radius-lg: 26px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 84% 14%, rgba(103, 244, 222, 0.16), transparent 30%),
    radial-gradient(circle at 22% 82%, rgba(47, 217, 255, 0.14), transparent 28%),
    linear-gradient(145deg, var(--bg-1), var(--bg-2) 45%, var(--bg-3));
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent);
}

.shell {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px;
  display: grid;
  gap: 18px;
}

.panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    linear-gradient(160deg, rgba(103, 244, 222, 0.08), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01)),
    var(--panel);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(103, 244, 222, 0.96), rgba(47, 217, 255, 0.8));
  color: #03222a;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: 0 14px 32px rgba(47, 217, 255, 0.24);
}

.brand-name {
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-subtitle {
  margin-top: 3px;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.topbar-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.view-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  padding: 12px;
}

.view-nav-item {
  appearance: none;
  border: 1px solid rgba(176, 223, 236, 0.18);
  background: rgba(2, 13, 19, 0.58);
  color: var(--text);
  border-radius: 18px;
  padding: 14px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.view-nav-item:hover {
  transform: translateY(-1px);
  border-color: rgba(103, 244, 222, 0.36);
}

.view-nav-item.active {
  background: linear-gradient(110deg, rgba(103, 244, 222, 0.18), rgba(47, 217, 255, 0.12));
  border-color: rgba(103, 244, 222, 0.4);
  box-shadow: 0 12px 28px rgba(47, 217, 255, 0.12);
}

.nav-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan);
}

.nav-icon svg {
  width: 100%;
  height: 100%;
}

.view-panel {
  display: none;
  padding: 22px;
}

.view-panel.is-active {
  display: grid;
  gap: 18px;
}

.hero-split {
  margin: 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.section-kicker {
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.76rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  letter-spacing: -0.03em;
}

.section-copy {
  margin: 0;
  max-width: 52ch;
  color: var(--text-soft);
  line-height: 1.55;
}

.single-column {
  grid-template-columns: 1fr;
}

.location-layout {
  align-items: start;
}

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

.location-card {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(176, 223, 236, 0.18);
  background: rgba(2, 14, 20, 0.5);
}

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

.about-card {
  padding: 20px;
}

.about-avatar {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(103, 244, 222, 0.9), rgba(47, 217, 255, 0.7));
  color: #06232b;
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 14px;
}

.about-card h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.about-card p,
.about-card li {
  color: var(--text-soft);
  line-height: 1.6;
}

.about-card ul {
  margin: 0;
  padding-left: 18px;
}

.dev-contact-form {
  margin-top: 8px;
}

.dev-contact-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 12px;
}

.dev-contact-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  text-align: left;
}

.dev-photo {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(176, 223, 236, 0.35);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.dev-contact-hint {
  color: var(--text-soft);
  font-size: 0.84rem;
  line-height: 1.5;
}

.dev-contact-hint a {
  font-weight: 700;
}

.about-status-list {
  display: grid;
  gap: 12px;
}

.about-status-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(176, 223, 236, 0.12);
}

.about-status-list div:last-child {
  border-bottom: 0;
}

.about-status-list span {
  color: var(--text-soft);
}

.chip {
  min-width: 120px;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid rgba(176, 223, 236, 0.18);
  background: rgba(2, 13, 19, 0.62);
}

.chip span {
  display: block;
  color: var(--text-soft);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.chip-value {
  font-size: 0.92rem;
}

.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.9fr);
  gap: 18px;
  padding: 28px;
  min-height: 320px;
}

.hero-copy {
  display: grid;
  gap: 14px;
  align-content: start;
}

.eyebrow {
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(103, 244, 222, 0.4);
  background: rgba(103, 244, 222, 0.11);
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
  font-size: 0.76rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.05rem, 4.4vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.hero p {
  margin: 0;
  max-width: 66ch;
  color: var(--text-soft);
  line-height: 1.65;
  font-size: 1.03rem;
}

.hero-copy h1,
.panel-head h2 {
  overflow-wrap: anywhere;
}

.hero-metrics {
  display: grid;
  gap: 12px;
  align-content: start;
}

.metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(176, 223, 236, 0.18);
  background: linear-gradient(180deg, rgba(1, 10, 15, 0.86), rgba(5, 20, 28, 0.76));
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.metric:hover,
.stat-card:hover,
.main-panel:hover,
.side-panel:hover {
  transform: translateY(-2px);
  border-color: rgba(103, 244, 222, 0.36);
}

.metric-label,
.stat-label,
.map-label {
  color: var(--amber);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.metric-value,
.stat-value {
  font-weight: 700;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
}

.status-pill::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.status-pill.neutral {
  color: #a7c2cd;
  background: rgba(130, 163, 176, 0.14);
}

.status-pill.ok {
  color: var(--cyan);
  background: rgba(103, 244, 222, 0.14);
}

.status-pill.bad {
  color: var(--danger);
  background: rgba(255, 125, 125, 0.16);
}

.portal-signin-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.portal-signin-row button {
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #002126;
  background: linear-gradient(110deg, var(--cyan), var(--teal));
  box-shadow: 0 10px 30px rgba(47, 217, 255, 0.28);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.portal-signin-row button:hover {
  transform: translateY(-1px);
}

.portal-signin-row button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.portal-signin-status {
  color: var(--text-soft);
  font-size: 0.92rem;
}

.portal-signin-status.ok {
  color: var(--cyan);
}

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

.stat-card {
  padding: 16px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.stat-card .stat-value {
  margin-top: 10px;
}

.stat-detail {
  margin-top: 8px;
  color: var(--text-soft);
  line-height: 1.46;
}

.content-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 14px;
}

.main-panel,
.side-panel {
  padding: 18px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.panel-head h2 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #dff9ff;
}

.inline-action {
  border: 1px solid rgba(103, 244, 222, 0.28);
  background: rgba(103, 244, 222, 0.12);
  color: var(--text);
  border-radius: 12px;
  padding: 8px 12px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.inline-action:hover {
  border-color: rgba(103, 244, 222, 0.5);
}

.inbox-cards {
  display: grid;
  gap: 10px;
}

.inbox-empty {
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(176, 223, 236, 0.28);
  color: var(--text-soft);
  background: rgba(2, 14, 20, 0.35);
}

.inbox-card {
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(176, 223, 236, 0.22);
  background: linear-gradient(180deg, rgba(3, 15, 21, 0.88), rgba(6, 24, 33, 0.78));
}

.inbox-card-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.inbox-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(176, 223, 236, 0.3);
  background: rgba(176, 223, 236, 0.12);
  font-size: 0.74rem;
  font-weight: 700;
}

.inbox-chip-status {
  border-color: rgba(103, 244, 222, 0.34);
  background: rgba(103, 244, 222, 0.14);
  color: var(--cyan);
}

.inbox-from {
  font-weight: 700;
  color: #e8faff;
  margin-bottom: 4px;
}

.inbox-time {
  color: var(--text-soft);
  font-size: 0.84rem;
  margin-bottom: 8px;
}

.inbox-body {
  color: #cdeefe;
  line-height: 1.55;
  padding-top: 8px;
  border-top: 1px solid rgba(176, 223, 236, 0.16);
  word-break: break-word;
}

a {
  color: var(--cyan);
  text-decoration: none;
  font-weight: 700;
}

a:hover {
  text-decoration: underline;
}

.map-box {
  position: relative;
  min-height: 280px;
  display: grid;
  align-content: end;
  gap: 10px;
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(176, 223, 236, 0.22);
  background:
    radial-gradient(circle at 12% 20%, rgba(103, 244, 222, 0.18), transparent 40%),
    linear-gradient(170deg, rgba(1, 11, 16, 0.84), rgba(7, 22, 30, 0.96));
}

.map-box::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 120px;
  background: linear-gradient(180deg, transparent, rgba(103, 244, 222, 0.08));
  pointer-events: none;
}

.map-value {
  font-size: clamp(1.08rem, 2vw, 1.4rem);
  font-weight: 700;
  line-height: 1.4;
  word-break: break-word;
}

.map-distance {
  color: var(--cyan);
  font-weight: 600;
}

.map-hint {
  color: var(--text-soft);
}

pre {
  margin: 0;
  min-height: 280px;
  max-height: 460px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(176, 223, 236, 0.2);
  background: var(--panel-strong);
  color: #ccf0ff;
  font-size: 0.88rem;
}

.sms-form {
  display: grid;
  gap: 8px;
}

.sms-note {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(103, 244, 222, 0.16);
  background: rgba(103, 244, 222, 0.08);
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.5;
}

.sms-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(176, 223, 236, 0.2);
  background: rgba(2, 14, 20, 0.55);
  color: var(--text);
  font-size: 0.92rem;
}

.sms-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--cyan);
}

.sms-form label {
  color: var(--text-soft);
  font-size: 0.86rem;
  font-weight: 500;
}

.sms-form input,
.sms-form textarea {
  width: 100%;
  border: 1px solid rgba(176, 223, 236, 0.28);
  border-radius: var(--radius-sm);
  background: rgba(2, 14, 20, 0.78);
  color: var(--text);
  padding: 10px 12px;
  font-family: inherit;
  outline: none;
}

.sms-form input:focus,
.sms-form textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(103, 244, 222, 0.2);
}

.sms-form textarea {
  resize: vertical;
  min-height: 100px;
}

.sms-form textarea[readonly] {
  background: rgba(2, 14, 20, 0.62);
  color: #c9f6ff;
}

.sms-form button {
  margin-top: 4px;
  border: none;
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #002126;
  background: linear-gradient(110deg, var(--cyan), var(--teal));
  box-shadow: 0 10px 30px rgba(47, 217, 255, 0.24);
  cursor: pointer;
}

.dual-action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.sms-form .button-ghost {
  color: var(--text);
  border: 1px solid rgba(176, 223, 236, 0.3);
  background: rgba(2, 14, 20, 0.7);
  box-shadow: none;
}

.sms-form button:disabled {
  opacity: 0.6;
  box-shadow: none;
  cursor: not-allowed;
}

.sms-status {
  min-height: 20px;
  font-size: 0.9rem;
}

.sms-status.ok {
  color: var(--cyan);
}

.sms-status.error {
  color: var(--danger);
}

.mono {
  font-family: "Space Mono", Consolas, Monaco, monospace;
}

.modem-health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.diag-card {
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(176, 223, 236, 0.22);
  background: linear-gradient(180deg, rgba(3, 15, 21, 0.88), rgba(6, 24, 33, 0.78));
}

.diag-label {
  display: block;
  color: var(--amber);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 8px;
}

.diag-value {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--cyan);
  margin-bottom: 6px;
}

.diag-detail {
  color: var(--text-soft);
  font-size: 0.85rem;
}

.diag-legend {
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(176, 223, 236, 0.16);
  background: rgba(2, 14, 20, 0.4);
}

.diag-legend p {
  margin: 0 0 10px 0;
  color: var(--text-soft);
  font-size: 0.9rem;
  font-weight: 600;
}

.diag-legend ul {
  margin: 0;
  padding-left: 20px;
  color: var(--text-soft);
  font-size: 0.85rem;
  line-height: 1.6;
}

.diag-legend li {
  margin-bottom: 6px;
}

.pulse {
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}

@media (max-width: 980px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-meta {
    justify-content: flex-start;
  }

  .hero,
  .content-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .view-nav,
  .about-grid,
  .location-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .shell {
    padding: 14px;
  }

  .hero,
  .main-panel,
  .side-panel,
  .stat-card {
    padding: 15px;
  }

  .metric {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero h1 {
    line-height: 1.05;
  }

  .brand-mark {
    width: 46px;
    height: 46px;
  }

  .chip {
    min-width: 0;
    width: calc(50% - 5px);
  }

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

  .dual-action-row {
    grid-template-columns: 1fr;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }
}
