@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&family=Sora:wght@400;600;700&family=JetBrains+Mono:wght@400;600&display=swap");

:root {
  --bg: #0a0f18;
  --bg-soft: #0f1624;
  --panel: rgba(12, 18, 30, 0.82);
  --panel-strong: rgba(10, 14, 22, 0.94);
  --border: rgba(120, 165, 255, 0.18);
  --glow: rgba(77, 210, 255, 0.25);
  --text: #e5eefc;
  --muted: #9aa9c6;
  --accent: #4dd2ff;
  --accent-2: #f6c14a;
  --danger: #ff6b6b;
  --success: #3ddc97;
  --shadow: rgba(5, 10, 20, 0.55);
  font-family: "Manrope", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: radial-gradient(circle at top left, rgba(77, 210, 255, 0.08), transparent 40%),
    radial-gradient(circle at 20% 70%, rgba(246, 193, 74, 0.1), transparent 45%),
    linear-gradient(160deg, #05070d, #0b1220 45%, #0e1b2d);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 90px 90px;
  opacity: 0.35;
  pointer-events: none;
  z-index: -2;
}

.backdrop {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 85% 15%, rgba(77, 210, 255, 0.18), transparent 45%),
    radial-gradient(circle at 15% 85%, rgba(246, 193, 74, 0.18), transparent 50%);
  pointer-events: none;
  z-index: -1;
}

.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 250px;
  padding: 2rem 1.6rem;
  background: rgba(9, 13, 22, 0.88);
  border-right: 1px solid rgba(120, 165, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(77, 210, 255, 0.2), rgba(77, 210, 255, 0.05));
  border: 1px solid rgba(77, 210, 255, 0.35);
  color: var(--accent);
  font-family: "Sora", sans-serif;
  font-size: 1.3rem;
}

.brand-title {
  font-family: "Sora", sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
}

.brand-sub {
  color: var(--muted);
  font-size: 0.85rem;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.nav-link {
  text-decoration: none;
  color: var(--muted);
  padding: 0.6rem 0.9rem;
  border-radius: 14px;
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  font-weight: 600;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  border-color: rgba(77, 210, 255, 0.35);
  background: rgba(77, 210, 255, 0.08);
  box-shadow: 0 6px 18px rgba(77, 210, 255, 0.15);
}

.sidebar-meta {
  margin-top: auto;
  padding: 1rem;
  border-radius: 16px;
  background: rgba(15, 21, 35, 0.7);
  border: 1px solid rgba(120, 165, 255, 0.12);
}

.meta-label {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.meta-value {
  margin-top: 0.4rem;
  font-weight: 600;
}

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

.topbar {
  padding: 1.6rem 2.6rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-title {
  font-family: "Sora", sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
}

.topbar-sub {
  color: var(--muted);
  font-size: 0.9rem;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tag {
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(77, 210, 255, 0.18);
  border: 1px solid rgba(77, 210, 255, 0.4);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.8rem;
}

.content {
  padding: 0 2.6rem 3rem;
  animation: fadeUp 0.6s ease-out;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.75rem;
  color: var(--accent);
  margin: 0 0 0.5rem;
}

.page-header h1 {
  margin: 0 0 0.5rem;
  font-family: "Sora", sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
}

.sub {
  margin: 0;
  color: var(--muted);
  max-width: 540px;
}

.header-meta {
  display: grid;
  gap: 0.7rem;
  justify-items: end;
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--success);
}

.live-indicator .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 12px rgba(61, 220, 151, 0.9);
  animation: pulse 1.6s infinite;
}

.stamp {
  color: var(--muted);
  font-size: 0.85rem;
}

.grid {
  display: grid;
  gap: 1.4rem;
}

.dashboard-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

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

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

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

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

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1.5rem;
  box-shadow: 0 20px 50px var(--shadow);
  position: relative;
  overflow: hidden;
  animation: cardRise 0.6s ease-out both;
  animation-delay: var(--delay, 0s);
}

.card-glow::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(77, 210, 255, 0.35);
  box-shadow: inset 0 0 40px rgba(77, 210, 255, 0.08);
  pointer-events: none;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.card-header h3 {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: 1rem;
}

.pill {
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  border: 1px solid rgba(77, 210, 255, 0.4);
  background: rgba(77, 210, 255, 0.12);
}

.pill.accent {
  color: var(--accent-2);
  border-color: rgba(246, 193, 74, 0.4);
  background: rgba(246, 193, 74, 0.12);
}

.pill.warn {
  color: #ff9f68;
  border-color: rgba(255, 159, 104, 0.4);
  background: rgba(255, 159, 104, 0.12);
}

.pill.danger {
  color: var(--danger);
  border-color: rgba(255, 107, 107, 0.4);
  background: rgba(255, 107, 107, 0.12);
}

.metric-big {
  font-size: 2.3rem;
  font-weight: 700;
}

.metric-sub {
  color: var(--muted);
  font-size: 0.9rem;
}

.metric-row {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.metric-stack {
  margin-bottom: 0.8rem;
}

.stats-list {
  display: grid;
  gap: 1rem;
}

.stat-top {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  position: relative;
}

.bar span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, rgba(77, 210, 255, 0.85), rgba(125, 236, 255, 0.6));
  border-radius: inherit;
  transition: width 0.4s ease;
}

.bar.dual span:first-child {
  background: linear-gradient(90deg, rgba(61, 220, 151, 0.9), rgba(61, 220, 151, 0.5));
}

.bar.dual span:last-child {
  background: linear-gradient(90deg, rgba(246, 193, 74, 0.9), rgba(246, 193, 74, 0.5));
  position: absolute;
  left: 0;
}

.progress {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  margin: 1rem 0 0.6rem;
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, rgba(246, 193, 74, 0.9), rgba(255, 209, 110, 0.6));
  transition: width 0.4s ease;
}

.meta-line {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.35rem;
}

.card-foot {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.country-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.country-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  background: rgba(77, 210, 255, 0.1);
  border: 1px solid rgba(77, 210, 255, 0.3);
  font-size: 0.85rem;
}

.country-badge.ghost {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--muted);
}

.flag {
  font-size: 1rem;
}

.state-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}

.state-pill {
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.state-pill.ok {
  color: var(--success);
  background: rgba(61, 220, 151, 0.12);
  border: 1px solid rgba(61, 220, 151, 0.4);
}

.state-pill.warn {
  color: #ff9f68;
  background: rgba(255, 159, 104, 0.12);
  border: 1px solid rgba(255, 159, 104, 0.4);
}

.state-pill.danger {
  color: var(--danger);
  background: rgba(255, 107, 107, 0.12);
  border: 1px solid rgba(255, 107, 107, 0.4);
}

.error-list {
  display: grid;
  gap: 0.8rem;
}

.error-item {
  padding: 0.8rem 1rem;
  border-radius: 16px;
  background: rgba(255, 107, 107, 0.08);
  border: 1px solid rgba(255, 107, 107, 0.2);
}

.error-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.error-message {
  color: var(--muted);
  font-size: 0.85rem;
}

.empty {
  color: var(--muted);
  font-size: 0.9rem;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1.6rem;
  box-shadow: 0 20px 50px var(--shadow);
}

.panel-stack {
  display: grid;
  gap: 1.6rem;
}

.panel-stack .panel-header {
  margin-bottom: 0;
}

.panel-header {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.panel-header h1 {
  margin: 0 0 0.4rem;
  font-family: "Sora", sans-serif;
}

.panel-header p {
  margin: 0;
  color: var(--muted);
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.inline-form input,
.inline-form textarea,
.stack textarea {
  border: 1px solid rgba(120, 165, 255, 0.2);
  border-radius: 12px;
  padding: 0.55rem 0.75rem;
  font-size: 0.95rem;
  background: rgba(10, 14, 22, 0.6);
  color: var(--text);
}

.inline-form input[type="number"] {
  width: 110px;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

thead th {
  text-align: left;
  font-weight: 600;
  color: var(--muted);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(120, 165, 255, 0.18);
}

tbody td {
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(120, 165, 255, 0.08);
}

.mono {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  word-break: break-all;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-weight: 600;
  background: linear-gradient(120deg, rgba(77, 210, 255, 0.9), rgba(77, 210, 255, 0.6));
  color: #041018;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 20px rgba(77, 210, 255, 0.3);
}

.btn.ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(77, 210, 255, 0.4);
}

.stack {
  display: grid;
  gap: 1rem;
}

.form-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.form-field input,
.form-field select {
  border: 1px solid rgba(120, 165, 255, 0.2);
  border-radius: 12px;
  padding: 0.55rem 0.75rem;
  font-size: 0.95rem;
  background: rgba(10, 14, 22, 0.6);
  color: var(--text);
}

.service-grid {
  display: grid;
  gap: 0.6rem 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
}

.form-hint {
  color: var(--muted);
  font-size: 0.85rem;
}

.stat-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.live-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.2rem;
  align-items: center;
  margin-bottom: 0.8rem;
}

.live-row .meta-line {
  margin-top: 0;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.stat-item strong {
  color: var(--text);
  font-size: 1.1rem;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardRise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  70% {
    transform: scale(1.4);
    opacity: 0.4;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@media (max-width: 1100px) {
  .sidebar {
    width: 210px;
  }

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

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

  .span-3 {
    grid-column: span 6;
  }
}

@media (max-width: 900px) {
  .layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 10;
  }

  .nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .sidebar-meta {
    margin-left: auto;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
  }

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

  .span-3,
  .span-4,
  .span-6 {
    grid-column: span 12;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
