:root {
  --bg: #f6efe6;
  --bg-secondary: #fdf9f2;
  --panel: rgba(255, 251, 246, 0.8);
  --line: rgba(109, 36, 53, 0.14);
  --text: #2b1f21;
  --muted: #7c6770;
  --cyan: #486d63;
  --mint: #7c9a87;
  --red: #b24b58;
  --amber: #d5ab63;
  --blue: #7a8ca4;
  --pink: #d59aae;
  --shadow: 0 26px 70px rgba(48, 24, 31, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(213, 171, 99, 0.18), transparent 24%),
    radial-gradient(circle at left center, rgba(178, 75, 88, 0.08), transparent 26%),
    linear-gradient(180deg, #efe2d1 0%, #f7eee4 38%, #fcfaf6 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(109, 36, 53, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(109, 36, 53, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.35), transparent);
}

.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(239, 226, 209, 0.76), rgba(252, 250, 246, 0.95)),
    radial-gradient(circle at top right, rgba(178, 75, 88, 0.16), transparent 26%);
  backdrop-filter: blur(8px);
}

.splash-screen.hidden {
  display: none;
}

.splash-panel {
  width: min(720px, 100%);
  padding: 32px;
  border-radius: 30px;
  border: 1px solid rgba(109, 36, 53, 0.12);
  background: linear-gradient(180deg, rgba(255, 251, 246, 0.96), rgba(247, 238, 228, 0.92));
  box-shadow: var(--shadow);
  text-align: center;
}

.splash-panel h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 0.94;
  margin: 0 0 16px;
}

.splash-text,
.splash-hint {
  color: var(--muted);
  line-height: 1.7;
}

.splash-hint {
  margin-top: 14px;
  font-size: 0.92rem;
}

.splash-avatars {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 18px;
}

.login-form {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.google-auth-card {
  display: grid;
  gap: 14px;
  text-align: left;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(109, 36, 53, 0.12);
  background: rgba(255, 252, 248, 0.76);
}

.google-signin-slot {
  min-height: 44px;
}

.field {
  text-align: left;
}

.field span {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-weight: 700;
}

.field input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(109, 36, 53, 0.12);
  background: rgba(255, 252, 248, 0.9);
  color: var(--text);
  font: inherit;
}

.login-button {
  border: 0;
  border-radius: 18px;
  padding: 14px 16px;
  font: inherit;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, #6d2435, #bf7c54 70%, #d5ab63);
  cursor: pointer;
  box-shadow: 0 16px 30px rgba(109, 36, 53, 0.2);
}

.sky-backdrop {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.sun-glow {
  position: absolute;
  top: 48px;
  right: 8%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(213, 171, 99, 0.48), rgba(213, 171, 99, 0.08) 46%, transparent 70%);
  filter: blur(14px);
}

.cloud {
  position: absolute;
  background: rgba(109, 36, 53, 0.06);
  border-radius: 26px;
  filter: blur(0);
  box-shadow:
    28px 18px 0 0 rgba(213, 171, 99, 0.1),
    90px -12px 0 0 rgba(109, 36, 53, 0.05),
    144px 6px 0 0 rgba(124, 154, 135, 0.08);
  animation: drift 34s linear infinite;
}

.cloud-one {
  top: 110px;
  left: -120px;
  width: 110px;
  height: 34px;
}

.cloud-two {
  top: 220px;
  left: -220px;
  width: 140px;
  height: 40px;
  animation-duration: 34s;
}

.cloud-three {
  top: 360px;
  left: -180px;
  width: 120px;
  height: 36px;
  animation-duration: 40s;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 20px;
  width: min(1440px, calc(100% - 32px));
  margin: 16px auto;
}

.sidebar,
.hero,
.panel,
.stat-card {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.sidebar {
  position: sticky;
  top: 16px;
  align-self: start;
  min-height: calc(100vh - 32px);
  border-radius: 28px;
  padding: 22px;
  background: linear-gradient(180deg, rgba(255, 251, 246, 0.9), rgba(249, 241, 232, 0.88));
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.sidebar-cast {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}

.cast-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 252, 248, 0.72);
  border: 1px solid rgba(109, 36, 53, 0.08);
  position: relative;
  overflow: hidden;
}

.cast-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, rgba(109, 36, 53, 0.7), rgba(213, 171, 99, 0.7), rgba(124, 154, 135, 0.6));
}

.cast-card strong {
  display: block;
  margin-bottom: 4px;
}

.cast-card p:last-child {
  color: var(--muted);
  line-height: 1.45;
}

.brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: white;
  background: linear-gradient(135deg, #6d2435, #d5ab63);
  box-shadow: 0 12px 28px rgba(109, 36, 53, 0.22);
}

.dossier-tag {
  display: inline-flex;
  align-items: center;
  margin: 0 0 8px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(109, 36, 53, 0.16);
  background: rgba(109, 36, 53, 0.06);
  color: #6d2435;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.avatar {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(180deg, #fff8f2, #f6dfd7);
  box-shadow: 0 10px 22px rgba(109, 36, 53, 0.12);
}

.avatar.large {
  width: 88px;
  height: 88px;
}

.avatar-halo {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(213, 171, 99, 0.4);
}

.avatar-face {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58%;
  height: 58%;
  transform: translate(-50%, -35%);
  border-radius: 46% 46% 50% 50%;
  background: #ffe0cf;
}

.guardian-avatar::before,
.guardian-avatar::after,
.angel-avatar::before,
.angel-avatar::after {
  content: "";
  position: absolute;
}

.guardian-avatar::before {
  left: 10px;
  top: 8px;
  width: 36px;
  height: 22px;
  border-radius: 40% 40% 26% 26%;
  background: linear-gradient(180deg, #27323f, #4a5d77);
}

.guardian-avatar::after {
  left: 11px;
  bottom: 11px;
  width: 34px;
  height: 12px;
  border-radius: 999px;
  background: rgba(73, 93, 119, 0.18);
}

.angel-avatar::before {
  left: 9px;
  top: 8px;
  width: 38px;
  height: 24px;
  border-radius: 50% 50% 42% 42%;
  background: linear-gradient(180deg, #f2a9b8, #d7b36d);
}

.angel-avatar::after {
  left: 13px;
  bottom: 12px;
  width: 30px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 182, 207, 0.22);
}

.eyebrow {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  color: var(--muted);
}

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

h1 {
  font-size: 1.6rem;
  font-family: "Cormorant Garamond", serif;
  letter-spacing: 0.02em;
}

.side-nav {
  display: grid;
  gap: 10px;
}

.nav-button,
.primary-button,
.ghost-button,
.table-action {
  border: 0;
  border-radius: 16px;
  font: inherit;
  color: var(--text);
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease, border-color 160ms ease;
}

.nav-button {
  text-align: left;
  padding: 14px 16px;
  background: rgba(255, 252, 248, 0.7);
  border: 1px solid rgba(109, 36, 53, 0.12);
}

.nav-button.active {
  background: linear-gradient(135deg, rgba(109, 36, 53, 0.1), rgba(213, 171, 99, 0.18));
  border-color: rgba(109, 36, 53, 0.24);
  box-shadow: inset 0 0 0 1px rgba(213, 171, 99, 0.22);
}

.nav-button:hover,
.primary-button:hover,
.ghost-button:hover,
.table-action:hover,
.login-button:hover {
  transform: translateY(-1px);
}

.sidebar-note {
  margin-top: 24px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 252, 248, 0.76);
  border: 1px solid rgba(109, 36, 53, 0.1);
}

.agent-profile-card {
  display: grid;
  gap: 14px;
}

.agent-profile-body {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.agent-profile-avatar {
  width: 62px;
  height: 62px;
  border-radius: 18px;
  border: 1px solid rgba(109, 36, 53, 0.16);
  background:
    linear-gradient(135deg, rgba(109, 36, 53, 0.16), rgba(213, 171, 99, 0.28)),
    rgba(255, 252, 248, 0.95);
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #6d2435;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.38);
}

.agent-profile-avatar.has-photo {
  color: transparent;
}

.agent-profile-text {
  min-width: 0;
}

.agent-profile-text strong {
  display: block;
  margin: 0 0 4px;
  font-size: 1.05rem;
}

.agent-profile-text p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  word-break: break-word;
}

.agent-profile-badge {
  display: inline-flex;
  margin-top: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(72, 109, 99, 0.18);
  background: rgba(72, 109, 99, 0.08);
  color: #3d6457;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.mission-state-card {
  margin-top: 16px;
}

.sidebar-note strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.sidebar-note p:last-child {
  color: var(--muted);
  line-height: 1.5;
}

.sidebar-logout-button {
  width: 100%;
  margin-top: 14px;
}

.main-content {
  min-width: 0;
}

.hero {
  border-radius: 30px;
  padding: 28px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  background:
    linear-gradient(135deg, rgba(255, 251, 246, 0.94), rgba(247, 238, 228, 0.94)),
    radial-gradient(circle at top right, rgba(213, 171, 99, 0.16), transparent 24%);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(109, 36, 53, 0.08);
  border-radius: 24px;
  pointer-events: none;
}

.hero::before {
  content: "MISSION DOSSIER";
  position: absolute;
  top: 18px;
  right: 26px;
  color: rgba(109, 36, 53, 0.14);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.2rem;
  letter-spacing: 0.28em;
}

.hero h2 {
  max-width: 760px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.2rem, 4vw, 4.5rem);
  line-height: 0.92;
  margin-bottom: 16px;
}

.hero-text {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.75;
  font-size: 1rem;
}

.hero-side {
  display: grid;
  gap: 12px;
  justify-items: end;
}

.hero-status {
  white-space: nowrap;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(124, 154, 135, 0.12);
  border: 1px solid rgba(124, 154, 135, 0.24);
  color: #486d63;
}

.hero-badge {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(109, 36, 53, 0.08);
  border: 1px solid rgba(109, 36, 53, 0.18);
  color: #6d2435;
  font-weight: 700;
}

.dashboard-section {
  display: none;
  margin-top: 20px;
}

.dashboard-section.active {
  display: block;
  animation: rise 260ms ease;
}

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

.section-header h3 {
  font-size: 2.15rem;
  font-family: "Cormorant Garamond", serif;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.primary-button,
.ghost-button {
  padding: 12px 16px;
}

.primary-button {
  background: linear-gradient(135deg, rgba(109, 36, 53, 0.12), rgba(213, 171, 99, 0.22));
  border: 1px solid rgba(109, 36, 53, 0.16);
}

.ghost-button {
  background: rgba(255, 252, 248, 0.76);
  border: 1px solid rgba(109, 36, 53, 0.1);
}

.danger-button {
  color: #9f5d59;
  border-color: rgba(255, 140, 130, 0.22);
  background: rgba(255, 140, 130, 0.08);
}

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

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

.stat-card {
  border-radius: 22px;
  padding: 20px;
  background: linear-gradient(180deg, rgba(255, 252, 248, 0.98), rgba(247, 238, 228, 0.9));
  position: relative;
  overflow: hidden;
}

.mini-stat-card {
  border-radius: 20px;
  padding: 18px;
  border: 1px solid rgba(109, 36, 53, 0.1);
  background: rgba(255, 252, 248, 0.82);
}

.mini-stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.5rem;
}

.mini-stat-card p:last-child {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.55;
}

.mini-stat-card.alert {
  border-color: rgba(255, 147, 136, 0.24);
  background: rgba(255, 147, 136, 0.08);
}

.stat-card strong {
  display: block;
  margin-top: 10px;
  font-size: 2rem;
}

.stat-card p:last-child {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.55;
}

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

.panel {
  border-radius: 24px;
  padding: 22px;
  min-width: 0;
  background: linear-gradient(180deg, rgba(255, 252, 248, 0.96), rgba(249, 241, 232, 0.88));
  position: relative;
  overflow: hidden;
}

.stat-card::before,
.panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, rgba(109, 36, 53, 0.7), rgba(213, 171, 99, 0.7));
}

.panel.chart-panel {
  margin-top: 16px;
}

.firmware-panel {
  margin-top: 16px;
}

.mission-response-panel {
  margin-bottom: 16px;
}

.ssh-panel {
  margin-top: 16px;
}

.ssh-terminal-shell {
  margin-top: 16px;
  border-radius: 22px;
  border: 1px solid rgba(109, 36, 53, 0.12);
  background:
    radial-gradient(circle at top right, rgba(213, 171, 99, 0.08), transparent 28%),
    linear-gradient(180deg, #241b1d, #181214);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.ssh-terminal-output {
  margin: 0;
  min-height: 248px;
  max-height: 388px;
  overflow: auto;
  padding: 18px 18px 10px;
  color: #efe5d8;
  font: 500 0.95rem/1.5 "SFMono-Regular", "Menlo", "Consolas", monospace;
  white-space: pre;
}

.ssh-terminal-entry {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 0 18px 18px;
}

.ssh-terminal-prompt {
  color: #d5ab63;
  font: 700 0.92rem/1 "SFMono-Regular", "Menlo", "Consolas", monospace;
  white-space: nowrap;
}

.ssh-terminal-controls {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.ssh-terminal-input {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #efe5d8;
  font: 500 0.95rem/1.5 "SFMono-Regular", "Menlo", "Consolas", monospace;
  outline: none;
}

.ssh-terminal-input::placeholder {
  color: rgba(239, 229, 216, 0.42);
}

.firmware-topline {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.firmware-state-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
}

.mission-badge {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.inline-mission-badge {
  min-height: 44px;
  padding: 12px 14px;
  align-self: center;
  white-space: nowrap;
}

.firmware-state-badge.tone-success {
  color: #30594f;
  background: rgba(124, 154, 135, 0.18);
  border-color: rgba(124, 154, 135, 0.32);
}

.firmware-state-badge.tone-progress {
  color: #8b6330;
  background: rgba(213, 171, 99, 0.22);
  border-color: rgba(213, 171, 99, 0.34);
}

.firmware-state-badge.tone-error {
  color: #8b3c47;
  background: rgba(178, 75, 88, 0.14);
  border-color: rgba(178, 75, 88, 0.26);
}

.firmware-state-badge.tone-neutral {
  color: #6d2435;
  background: rgba(109, 36, 53, 0.08);
  border-color: rgba(109, 36, 53, 0.18);
}

.firmware-description {
  color: var(--muted);
  line-height: 1.65;
}

.panel-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

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

.detail-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 252, 248, 0.68);
  border: 1px solid rgba(109, 36, 53, 0.08);
}

.detail-item span:last-child {
  color: var(--muted);
}

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

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(109, 36, 53, 0.1);
  text-align: left;
}

th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
  background: rgba(109, 36, 53, 0.03);
}

td {
  font-size: 0.95rem;
}

.empty-state-cell {
  padding: 26px 12px;
  color: var(--muted);
  text-align: center;
}

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

.status-pill.online {
  color: #2c6a63;
  background: rgba(127, 216, 202, 0.18);
  border: 1px solid rgba(127, 216, 202, 0.28);
}

.status-pill.offline {
  color: #9f5d59;
  background: rgba(255, 147, 136, 0.14);
  border: 1px solid rgba(255, 147, 136, 0.24);
}

.role-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  border: 1px solid transparent;
}

.role-pill.wan {
  color: #2c6a63;
  background: rgba(127, 216, 202, 0.18);
  border-color: rgba(127, 216, 202, 0.28);
}

.role-pill.lan {
  color: #57718f;
  background: rgba(125, 159, 255, 0.12);
  border-color: rgba(125, 159, 255, 0.2);
}

.role-pill.poe {
  color: #8f6b24;
  background: rgba(255, 199, 117, 0.2);
  border-color: rgba(255, 199, 117, 0.3);
}

.role-pill.sfp {
  color: #8f5fa3;
  background: rgba(229, 187, 255, 0.2);
  border-color: rgba(229, 187, 255, 0.3);
}

.link-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  color: #57718f;
  background: rgba(125, 159, 255, 0.12);
  border: 1px solid rgba(125, 159, 255, 0.2);
}

.traffic-cell {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.traffic-stack {
  display: grid;
  gap: 8px;
}

.traffic-value {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.sparkline {
  width: 92px;
  height: 24px;
  display: block;
}

.sparkline polyline {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ap-row-warning td {
  background: rgba(255, 147, 136, 0.05);
}

.ap-health {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  border: 1px solid transparent;
}

.ap-health.good {
  color: #2c6a63;
  background: rgba(127, 216, 202, 0.18);
  border-color: rgba(127, 216, 202, 0.28);
}

.ap-health.warning {
  color: #8f6b24;
  background: rgba(255, 199, 117, 0.2);
  border-color: rgba(255, 199, 117, 0.3);
}

.ap-health.error {
  color: #9f5d59;
  background: rgba(255, 147, 136, 0.14);
  border-color: rgba(255, 147, 136, 0.24);
}

.table-actions {
  display: flex;
  gap: 8px;
}

.table-action {
  padding: 8px 12px;
  background: rgba(255, 252, 248, 0.82);
  border: 1px solid rgba(109, 36, 53, 0.12);
}

.chart-area {
  width: 100%;
  height: 300px;
}

#usage-chart {
  width: 100%;
  height: 100%;
}

.chart-legend {
  display: flex;
  gap: 18px;
  margin-top: 14px;
  color: var(--muted);
}

.legend {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  margin-right: 8px;
}

.legend.inbound {
  background: var(--cyan);
}

.legend.outbound {
  background: var(--amber);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: 340px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(160, 205, 255, 0.2);
  color: var(--text);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drift {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(calc(100vw + 260px));
  }
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    min-height: auto;
  }

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

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

  .panel-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100% - 18px, 100%);
    margin: 9px auto 18px;
  }

  .hero,
  .sidebar,
  .panel,
  .stat-card {
    border-radius: 22px;
  }

  .hero,
  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-side {
    justify-items: start;
  }

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

  .mini-stats-grid {
    grid-template-columns: 1fr;
  }

  .actions {
    width: 100%;
  }

  .primary-button,
  .ghost-button {
    width: 100%;
  }

  .splash-panel {
    padding: 24px 18px;
  }

  .splash-avatars {
    gap: 10px;
  }
}
