:root {
  --bg: #09131e;
  --bg-soft: #102133;
  --panel: rgba(10, 25, 38, 0.8);
  --panel-strong: rgba(16, 34, 50, 0.94);
  --line: rgba(157, 197, 224, 0.18);
  --line-strong: rgba(255, 214, 128, 0.24);
  --text: #eff6fb;
  --muted: #98b6cb;
  --muted-strong: #bdd3e3;
  --brand: #f0b561;
  --brand-deep: #ce7f22;
  --sea: #68d0df;
  --mint: #92f0b4;
  --danger: #ff8d8d;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.35);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(235, 179, 86, 0.12), transparent 38%),
    radial-gradient(circle at top right, rgba(102, 210, 223, 0.14), transparent 32%),
    linear-gradient(180deg, #09131e 0%, #081019 48%, #050b12 100%);
  color: var(--text);
  font-family: "Manrope", sans-serif;
}

body {
  overflow-x: hidden;
}

.page-shell {
  position: relative;
  min-height: 100vh;
  isolation: isolate;
}

.ambient {
  position: fixed;
  inset: auto;
  border-radius: 999px;
  filter: blur(18px);
  opacity: 0.45;
  pointer-events: none;
  z-index: -1;
}

.ambient-one {
  top: 6%;
  left: -8%;
  width: 320px;
  height: 320px;
  background: rgba(255, 191, 105, 0.25);
}

.ambient-two {
  top: 24%;
  right: -8%;
  width: 360px;
  height: 360px;
  background: rgba(88, 194, 221, 0.18);
}

.ambient-three {
  bottom: 6%;
  left: 22%;
  width: 420px;
  height: 420px;
  background: rgba(94, 120, 255, 0.09);
}

.app-shell {
  width: min(1360px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.hidden {
  display: none !important;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 800;
}

.auth-stage {
  min-height: calc(100vh - 80px);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: center;
}

.auth-hero,
.auth-card,
.panel,
.metric-card,
.spotlight-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(16, 33, 49, 0.82), rgba(8, 18, 29, 0.92));
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.auth-hero {
  padding: 42px;
  border-radius: var(--radius-xl);
}

.auth-hero::before,
.auth-card::before,
.panel::before,
.spotlight-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 210, 140, 0.6), transparent);
}

.auth-hero h1,
.topbar h1,
.suite-head h2,
.auth-card h2 {
  margin: 0;
  font-family: "Syne", sans-serif;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.auth-hero h1 {
  max-width: 13ch;
  font-size: clamp(2.8rem, 7vw, 5.7rem);
}

.hero-copy {
  max-width: 40rem;
  margin: 22px 0 0;
  color: var(--muted-strong);
  font-size: 1.05rem;
  line-height: 1.72;
}

.signal-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.signal-chip {
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.signal-title {
  display: block;
  margin-bottom: 6px;
  font-weight: 800;
}

.signal-copy,
.muted-copy,
.panel-copy,
.metric-foot,
.panel-foot {
  color: var(--muted);
  line-height: 1.6;
}

.auth-panel {
  display: flex;
  justify-content: stretch;
}

.auth-card {
  width: 100%;
  padding: 32px;
  border-radius: var(--radius-xl);
}

.auth-card h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  max-width: 15ch;
}

.stack-form {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.stack-form.compact {
  margin-top: 14px;
}

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

.stack-form span {
  font-size: 0.86rem;
  color: var(--muted-strong);
  font-weight: 700;
}

.stack-form small {
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--muted);
}

input,
textarea,
select,
button {
  font: inherit;
}

input,
textarea,
select {
  width: 100%;
  padding: 14px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(4, 11, 19, 0.8);
  color: var(--text);
  outline: none;
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}

textarea {
  resize: vertical;
  min-height: 96px;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(240, 181, 97, 0.75);
  background: rgba(6, 15, 24, 0.92);
  transform: translateY(-1px);
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.primary-btn {
  background: linear-gradient(135deg, var(--brand), #ffc575 54%, #ffdcb0);
  color: #2c1803;
  box-shadow: 0 18px 40px rgba(206, 127, 34, 0.35);
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.ghost-btn.danger {
  color: #ffd3d3;
  border-color: rgba(255, 141, 141, 0.28);
  background: rgba(255, 141, 141, 0.08);
}

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
}

.primary-btn:disabled,
.ghost-btn:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.inline-feedback {
  min-height: 1.3em;
  margin: 10px 0 0;
  font-size: 0.9rem;
}

.inline-feedback[data-tone="error"] {
  color: var(--danger);
}

.inline-feedback[data-tone="success"] {
  color: #98efc9;
}

.inline-feedback[data-tone="warning"] {
  color: #ffd089;
}

.reset-box {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-lg);
}

.reset-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.reset-head h3 {
  margin: 0;
  font-family: "Syne", sans-serif;
  font-size: 1.15rem;
  line-height: 1.15;
}

.reset-pill {
  flex: 0 0 auto;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted-strong);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.reset-box .stack-form {
  margin-top: 0;
}

.reset-box .ghost-btn {
  width: 100%;
}

.dashboard {
  display: grid;
  gap: 22px;
  animation: panel-rise 420ms ease;
}

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

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.topbar h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.account-pill {
  display: grid;
  gap: 3px;
  min-width: 180px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
}

.account-pill span {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.hero-grid,
.panel-grid {
  display: grid;
  gap: 18px;
}

.hero-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
}

.spotlight-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-column: span 2;
  gap: 18px;
  min-height: 230px;
  padding: 26px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(255, 207, 123, 0.18), transparent 44%),
    linear-gradient(140deg, rgba(16, 32, 48, 0.96), rgba(7, 17, 26, 0.92));
}

.spotlight-copy {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.spotlight-card h2 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-family: "Syne", sans-serif;
  line-height: 0.98;
  letter-spacing: -0.05em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.spotlight-meters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-content: start;
  min-width: 0;
}

.meter-card,
.metric-card {
  border-radius: var(--radius-lg);
  padding: 22px;
}

.meter-card {
  min-height: 124px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.meter-label,
.metric-label {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.meter-card strong,
.metric-card strong {
  display: block;
  margin-top: 8px;
  line-height: 1.02;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.meter-card strong {
  font-size: clamp(1.2rem, 1.25vw + 0.95rem, 1.85rem);
}

.metric-card strong {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
}

.metric-card {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: var(--radius-lg);
}

.stat-card {
  min-height: 196px;
}

.stat-card-span-2 {
  grid-column: span 2;
}

.metric-value-tight {
  font-size: clamp(1.34rem, 0.95vw + 0.95rem, 1.94rem) !important;
  line-height: 0.98 !important;
  white-space: normal !important;
  text-wrap: balance;
}

.chart-panel {
  min-height: 410px;
}

.chart-wrap {
  position: relative;
  overflow: hidden;
  margin-top: 18px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 20% 20%, rgba(104, 208, 223, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(7, 18, 29, 0.95), rgba(11, 25, 38, 0.9));
  scrollbar-width: thin;
  scrollbar-color: rgba(104, 208, 223, 0.42) rgba(255, 255, 255, 0.04);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.share-chart-shell {
  display: grid;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.share-chart-shell.scrollable {
  min-width: 1120px;
}

.share-chart-shell.fit {
  width: 100%;
  min-width: 0;
}

.share-chart-shell.compact {
  gap: 8px;
}

.share-chart-shell.compact.scrollable {
  min-width: 680px;
}

.share-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.share-chart-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #183149;
  background: linear-gradient(135deg, #9be0ec, #c6f2d3);
  box-shadow: 0 12px 28px rgba(104, 208, 223, 0.18);
}

.share-chart-note {
  max-width: 46ch;
  color: var(--muted-strong);
  font-size: 0.92rem;
  line-height: 1.45;
}

.share-chart-scroll {
  position: relative;
  max-height: 460px;
  overflow: hidden;
  padding: 12px 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background:
    radial-gradient(circle at top left, rgba(104, 208, 223, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(5, 13, 22, 0.92), rgba(10, 20, 31, 0.96));
  scrollbar-width: thin;
  scrollbar-color: rgba(154, 240, 180, 0.44) rgba(255, 255, 255, 0.04);
  -webkit-overflow-scrolling: touch;
}

.share-chart-svg {
  display: block;
  width: 100%;
  height: auto;
  min-width: 1120px;
  font-family: "Manrope", sans-serif;
  shape-rendering: geometricPrecision;
  text-rendering: geometricPrecision;
}

.share-chart-shell.fit .share-chart-scroll {
  overflow: hidden;
}

.share-chart-shell.fit .share-chart-svg {
  width: 100%;
  min-width: 0;
}

.share-chart-shell.scrollable .share-chart-scroll {
  overflow: auto;
}

.share-chart-shell.scrollable .share-chart-svg {
  min-width: 1120px;
}

.share-chart-shell.compact.scrollable .share-chart-scroll {
  max-height: 300px;
  padding: 6px 6px 8px;
}

.share-chart-shell.compact.scrollable .share-chart-svg {
  min-width: 680px;
}

.share-chart-shell.compact.fit .share-chart-scroll {
  max-height: 300px;
  padding: 6px 6px 8px;
}

.share-chart-shell.compact.fit .share-chart-note {
  font-size: 0.78rem;
  line-height: 1.35;
}

.share-chart-shell.compact.fit .share-chart-svg {
  width: 100%;
  min-width: 0;
}

.share-chart-shell.compact.scrollable .share-chart-note,
.share-chart-shell.compact.fit .share-chart-note {
  font-size: 0.78rem;
  line-height: 1.35;
}

.share-chart-shell.compact .share-chart-foot {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  font-size: 0.74rem;
}

.share-chart-shell.compact .share-chart-foot span {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
  align-items: flex-start;
  line-height: 1.25;
  word-break: break-word;
}

.share-chart-shell.compact .share-chart-foot span::before {
  margin-top: 3px;
}

.share-chart-shell.scrollable .share-chart-scroll {
  touch-action: pan-x pinch-zoom;
}

.share-chart-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted-strong);
  font-size: 0.98rem;
}

.share-chart-foot span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.share-chart-foot span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, #68d0df, #92f0b4);
  box-shadow: 0 0 14px rgba(104, 208, 223, 0.4);
}

.chart-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  color: var(--muted-strong);
  font-size: 1rem;
}

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

.cap-row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) repeat(4, minmax(0, 0.65fr));
  gap: 10px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.cap-row.header {
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted-strong);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.cap-row strong {
  font-size: 0.95rem;
}

.cap-cell {
  min-width: 0;
}

.cap-cell span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 3px;
}

.cap-status {
  justify-self: end;
}

.share-adjusters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.share-adjusters .ghost-btn {
  min-height: 36px;
  padding: 0 12px;
  font-size: 0.8rem;
}

.inline-link-btn {
  border: 0;
  background: transparent;
  color: var(--sea);
  padding: 0;
  font-weight: 800;
  cursor: pointer;
}

.panel {
  padding: 22px;
  border-radius: var(--radius-lg);
}

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

.panel-head,
.suite-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.panel-head h2,
.suite-head h2 {
  margin: 0;
  font-family: "Syne", sans-serif;
  font-size: 1.6rem;
}

.progress-panel {
  display: grid;
  gap: 14px;
}

.progress-panel.accent {
  background:
    radial-gradient(circle at top right, rgba(240, 181, 97, 0.12), transparent 44%),
    linear-gradient(180deg, rgba(14, 31, 46, 0.9), rgba(8, 18, 29, 0.95));
}

.progress-track {
  width: 100%;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.progress-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #67d2df, #96ecb5);
  transition: width 260ms ease;
}

.progress-fill.warm {
  background: linear-gradient(90deg, #cf7f22, #ffd490);
}

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

.snapshot-chip {
  padding: 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.snapshot-chip span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}

.snapshot-chip strong {
  display: block;
  margin-top: 6px;
  font-size: 1.1rem;
}

.timeline-list {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

.timeline-item {
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
}

.timeline-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.timeline-head strong {
  font-size: 1rem;
}

.timeline-kicker,
.timeline-meta {
  color: var(--muted);
  font-size: 0.84rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.status-pill.queued,
.status-pill.processing {
  color: #ffd695;
  background: rgba(255, 180, 81, 0.12);
}

.status-pill.sent,
.status-pill.active,
.status-pill.credit {
  color: #9bf3bf;
  background: rgba(110, 217, 152, 0.12);
}

.status-pill.failed,
.status-pill.disabled,
.status-pill.debit {
  color: #ffb3b3;
  background: rgba(255, 125, 125, 0.12);
}

.admin-suite {
  display: grid;
  gap: 18px;
}

.admin-grid {
  grid-template-columns: 0.95fr 1.05fr;
}

.account-admin-list {
  display: grid;
  gap: 14px;
  margin-top: 10px;
}

.account-card {
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.account-card-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.account-card h3 {
  margin: 0;
  font-size: 1.2rem;
}

.account-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

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

.account-form-grid .full {
  grid-column: 1 / -1;
}

.create-account-grid {
  margin-top: 0;
}

.create-account-grid label {
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.create-account-grid .share-field {
  border-color: rgba(127, 241, 221, 0.32);
  background:
    linear-gradient(180deg, rgba(113, 236, 214, 0.12), rgba(113, 236, 214, 0.04)),
    rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.create-account-grid .share-field span {
  color: #c9fff0;
}

.create-account-grid .note-field {
  border-color: rgba(255, 201, 111, 0.22);
}

.create-account-grid .note-field textarea {
  min-height: 108px;
}

.inline-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.empty-state {
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(255, 255, 255, 0.14);
  color: var(--muted);
  text-align: center;
}

.toast-stack {
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: grid;
  gap: 10px;
  width: min(340px, calc(100vw - 32px));
  z-index: 20;
}

.toast {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(8, 18, 29, 0.94);
  box-shadow: 0 24px 44px rgba(0, 0, 0, 0.35);
}

.toast.success {
  border-color: rgba(146, 240, 180, 0.34);
}

.toast.error {
  border-color: rgba(255, 141, 141, 0.34);
}

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

@keyframes gentle-pulse {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
}

@keyframes chart-stream {
  0% {
    stroke-dashoffset: 40;
    opacity: 0.48;
  }
  50% {
    opacity: 1;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 0.48;
  }
}

@keyframes chart-beam {
  0% {
    stroke-dashoffset: 32;
    opacity: 0.16;
  }
  50% {
    opacity: 0.46;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 0.16;
  }
}

@keyframes chart-live-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.96;
  }
  50% {
    transform: scale(1.18);
    opacity: 1;
  }
}

.metric-card,
.panel,
.spotlight-card,
.auth-card {
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
  animation: panel-rise 520ms ease both;
}

.metric-card:hover,
.panel:hover,
.spotlight-card:hover,
.auth-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 214, 128, 0.26);
}

.chart-point {
  animation: none;
}

.chart-point.latest {
  animation: chart-live-pulse 1.8s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

.chart-point.latest circle {
  filter: drop-shadow(0 0 14px rgba(155, 240, 181, 0.85));
}

.chart-live-segment {
  stroke-dasharray: 20 14;
  animation: chart-stream 1.7s linear infinite;
  filter: drop-shadow(0 0 10px rgba(104, 208, 223, 0.28));
}

.chart-live-beam {
  stroke-dasharray: 9 10;
  animation: chart-beam 1.9s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 1380px) and (min-width: 1121px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1120px) {
  .auth-stage,
  .hero-grid,
  .split-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

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

  .spotlight-card {
    min-height: 0;
  }

  .stat-card-span-2 {
    grid-column: auto;
  }
}

@media (max-width: 1320px) and (min-width: 1121px) {
  .topbar {
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .spotlight-meters {
    grid-template-columns: 1fr;
  }

  .meter-card {
    min-height: 0;
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100vw - 20px, 100%);
    padding-top: 20px;
  }

  .auth-hero,
  .auth-card,
  .panel,
  .metric-card,
  .spotlight-card {
    padding: 18px;
  }

  .signal-row,
  .snapshot-grid,
  .account-form-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .spotlight-meters {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .account-pill {
    width: 100%;
  }

  .reset-head {
    flex-direction: column;
  }

  .reset-pill {
    width: 100%;
    text-align: center;
  }

  .chart-wrap {
    margin-top: 12px;
    padding: 4px;
    max-height: none;
    border-radius: 18px;
  }

  .share-chart-shell {
    width: 100%;
    min-width: 0;
    gap: 8px;
  }

  .share-chart-shell.scrollable {
    min-width: 680px;
  }

  .share-chart-shell.fit {
    width: 100%;
    min-width: 0;
  }

  .share-chart-scroll {
    max-height: none;
    padding: 2px;
    border-radius: 14px;
  }

  .share-chart-shell.scrollable .share-chart-scroll {
    overflow: auto;
    touch-action: pan-x pinch-zoom;
  }

  .share-chart-shell.fit .share-chart-scroll {
    overflow: hidden;
  }

  .share-chart-shell.scrollable .share-chart-svg {
    min-width: 680px;
  }

  .share-chart-shell.fit .share-chart-svg {
    width: 100%;
    min-width: 0;
  }

  .share-chart-note {
    display: none;
  }

  .share-chart-foot {
    font-size: 0.74rem;
  }

  .share-chart-head,
  .share-chart-foot {
    gap: 8px;
    font-size: 0.84rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .share-chart-shell.compact .share-chart-foot {
    display: none;
  }

  .chart-panel .panel-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  #chartPointLabel {
    display: none;
  }

  .chart-panel .panel-copy {
    display: none;
  }

  .chart-panel {
    min-height: unset;
  }

  .share-chart-chip {
    min-height: 24px;
    padding: 0 10px;
    font-size: 0.7rem;
  }

  .chart-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin-top: 10px;
    font-size: 0.88rem;
  }

  #chartRangeLabel {
    min-width: 0;
  }

  #chartValueLabel {
    color: var(--text);
    font-size: 1.12rem;
    font-weight: 800;
  }
}
