﻿@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Space+Mono:wght@400;700&family=Playfair+Display:wght@500;700&display=swap");

:root {
  color-scheme: dark;
  --bg: #010103;
  --bg-2: #05060a;
  --bg-3: #0a0d14;
  --ink: #f2f2f2;
  --muted: rgba(242, 242, 242, 0.6);
  --accent: #ffffff;
  --glass: rgba(7, 9, 14, 0.78);
  --glass-strong: rgba(9, 11, 18, 0.9);
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.72);
  --glow: 0 0 0 1px rgba(255, 255, 255, 0.035), 0 0 18px rgba(129, 169, 255, 0.06);
}

.admin-shell-host {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

body.is-admin-route {
  overflow: hidden;
}

body.is-admin-route .site-nav,
body.is-admin-route #notifications-panel,
body.is-admin-route #starfield,
body.is-admin-route .bg-noise,
body.is-admin-route .bg-orb {
  display: none !important;
}

body.is-admin-route .page {
  width: 100vw;
  max-width: none;
  min-height: 100vh;
  padding: 0;
  margin: 0;
}

body.is-admin-route #admin-panel,
body.is-admin-route [data-route-panel="admin"] {
  padding: 0 !important;
  margin: 0 !important;
}

.admin-shell {
  min-height: calc(100vh - 120px);
  background: rgba(8, 14, 24, 0.92);
  color: #eef4ff;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  overflow: hidden;
}

.admin-topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
  min-height: 58px;
  padding: 0 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.86);
}

.admin-live {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #9aa7bc;
}

.admin-live i {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 999px;
  background: #64748b;
}

.admin-live.is-connected i {
  background: #35b37e;
  box-shadow: 0 0 0 6px rgba(53, 179, 126, 0.14);
}

.admin-body {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 720px;
}

.admin-sidebar {
  padding: 1rem;
  background: rgba(2, 6, 23, 0.58);
  border-right: 1px solid rgba(148, 163, 184, 0.16);
}

.admin-sidebar a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #cbd5e1;
  text-decoration: none;
  padding: 0.72rem 0.8rem;
  border-radius: 8px;
  margin-bottom: 0.25rem;
}

.admin-sidebar a.is-active,
.admin-sidebar a:hover {
  background: rgba(59, 130, 246, 0.16);
  color: #ffffff;
}

.admin-sidebar b {
  min-width: 1.4rem;
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  text-align: center;
  font-size: 0.75rem;
}

.admin-main {
  padding: 1rem;
  overflow-x: auto;
}

.admin-page__head,
.admin-filter,
.admin-queue-strip,
.admin-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.admin-page__head h1 {
  font-size: clamp(1.5rem, 2vw, 2.2rem);
  margin: 0.15rem 0 0;
}

.admin-stat-grid,
.admin-grid {
  display: grid;
  gap: 1rem;
}

.admin-stat-grid {
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  margin-bottom: 1rem;
}

.admin-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.admin-grid--three {
  grid-template-columns: 0.85fr 1.15fr 1fr;
}

.admin-stat,
.admin-panel,
.admin-alert-card {
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.72);
  border-radius: 8px;
  padding: 1rem;
}

.admin-stat span,
.admin-stat small {
  display: block;
  color: #94a3b8;
}

.admin-stat strong {
  display: block;
  font-size: 1.55rem;
  line-height: 1.2;
  margin: 0.3rem 0;
}

.admin-panel h2 {
  margin-top: 0;
  font-size: 1.05rem;
}

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  margin-bottom: 1.25rem;
}

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

.admin-table th,
.admin-table td {
  padding: 0.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: #94a3b8;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.16rem 0.5rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  color: #dbeafe;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.admin-badge--success,
.admin-badge--active,
.admin-badge--sent {
  background: rgba(53, 179, 126, 0.2);
  color: #86efac;
}

.admin-badge--failed,
.admin-badge--critical,
.admin-error {
  background: rgba(220, 38, 38, 0.16);
  color: #fecaca;
}

.admin-badge--running,
.admin-badge--warning {
  background: rgba(245, 158, 11, 0.18);
  color: #fde68a;
}

.admin-alert-row,
.admin-queue-strip span {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0;
}

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

.admin-mini {
  min-height: 0;
  padding: 0.35rem 0.55rem;
  font-size: 0.82rem;
}

.admin-inline-input,
.admin-filter input,
.admin-panel input,
.admin-panel select,
.admin-panel textarea {
  width: 100%;
  color: #f8fafc;
  background: rgba(2, 6, 23, 0.46);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  padding: 0.62rem 0.7rem;
}

.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
}

.admin-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
}

.admin-modal__panel {
  position: relative;
  width: min(560px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  overflow: auto;
  background: #0f172a;
  color: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  padding: 1.05rem;
}

.admin-modal__panel footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(130, 148, 170, 0.12);
}

.admin-modal__body {
  margin-top: 0.9rem;
}

.admin-modal-form {
  display: grid;
  gap: 0.85rem;
}

.admin-modal-field {
  display: grid;
  gap: 0.38rem;
  min-width: 0;
}

.admin-modal-field--compact {
  max-width: 18rem;
}

.admin-modal-field label {
  color: #8ea0b8;
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-modal-field input,
.admin-modal-field select,
.admin-modal-field textarea {
  width: 100%;
  min-width: 0;
  color: #f8fafc;
  background: rgba(1, 1, 3, 0.32);
  border: 1px solid rgba(130, 148, 170, 0.22);
  border-radius: 8px;
  padding: 0.62rem 0.7rem;
}

.admin-modal-field textarea {
  resize: vertical;
  line-height: 1.45;
}

.admin-step,
.admin-note {
  padding: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  margin-bottom: 0.6rem;
}

.admin-step pre,
.admin-table pre,
.admin-panel pre {
  overflow: auto;
  max-height: 360px;
  font-size: 0.78rem;
  white-space: pre-wrap;
}

.admin-loader,
.admin-empty {
  color: #94a3b8;
  padding: 1rem;
}

@media (max-width: 980px) {
  .admin-body,
  .admin-grid--two,
  .admin-grid--three,
  .admin-stat-grid {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    display: flex;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  }

  .admin-sidebar a {
    white-space: nowrap;
  }
}

/* Admin console refinement layer */
.admin-shell-host {
  width: min(1520px, calc(100vw - 2rem));
  margin: 1rem auto 3rem;
}

body.is-admin-route .admin-shell-host {
  width: 100vw;
  min-height: 100vh;
  margin: 0;
}

.admin-shell {
  background: #0b1018;
  color: #edf2f7;
  border-color: rgba(130, 148, 170, 0.24);
  box-shadow: 0 24px 80px rgba(1, 7, 18, 0.38);
}

body.is-admin-route .admin-shell {
  min-height: 100vh;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.admin-topbar {
  min-height: 72px;
  padding: 0.85rem 1.15rem;
  background: #111823;
  border-bottom-color: rgba(130, 148, 170, 0.18);
}

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

.admin-topbar__title span {
  color: #8ea0b8;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.admin-topbar__title strong {
  color: #ffffff;
  font-size: 1.35rem;
  line-height: 1.2;
}

.admin-topbar__actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-workspace-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 40px;
  padding: 0.35rem 0.7rem 0.35rem 0.42rem;
  border: 1px solid rgba(130, 148, 170, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: #d7dee9;
  text-decoration: none;
}

.admin-workspace-link:hover {
  background: rgba(255, 255, 255, 0.075);
  color: #ffffff;
}

.admin-workspace-link > span:first-child {
  display: grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 999px;
  background: #172235;
  color: #d9e8ff;
  font-size: 0.72rem;
  font-weight: 900;
}

.admin-workspace-link strong,
.admin-workspace-link small {
  display: block;
  line-height: 1.1;
}

.admin-workspace-link strong {
  font-size: 0.82rem;
}

.admin-workspace-link small {
  margin-top: 0.12rem;
  color: #8493a8;
  font-size: 0.68rem;
}

.admin-topbar__pill,
.admin-user-pill,
.admin-live {
  border: 1px solid rgba(130, 148, 170, 0.22);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
  min-height: 34px;
  padding: 0.4rem 0.75rem;
  color: #d7dee9;
  font-size: 0.85rem;
}

.admin-topbar__pill {
  cursor: pointer;
}

.admin-topbar__pill:hover {
  background: rgba(255, 255, 255, 0.08);
}

.admin-body {
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: calc(100vh - 190px);
}

body.is-admin-route .admin-body {
  min-height: calc(100vh - 72px);
}

body.is-admin-route .admin-main {
  max-height: calc(100vh - 72px);
  overflow: auto;
}

body.is-admin-route .admin-sidebar {
  max-height: calc(100vh - 72px);
  min-height: 0;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.admin-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.85rem;
  background: #090d14;
}

.admin-sidebar__brand,
.admin-sidebar__footer a,
.admin-sidebar__nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.admin-sidebar__brand {
  padding: 0.68rem 0.65rem 0.82rem;
  border-bottom: 1px solid rgba(130, 148, 170, 0.14);
}

.admin-sidebar__brand strong,
.admin-sidebar__text strong {
  display: block;
  color: #ffffff;
  font-size: 0.88rem;
  line-height: 1.15;
}

.admin-sidebar__brand small,
.admin-sidebar__text small {
  display: block;
  color: #8493a8;
  font-size: 0.7rem;
  line-height: 1.25;
  margin-top: 0.16rem;
}

.admin-sidebar__mark,
.admin-sidebar__icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 1.95rem;
  height: 1.95rem;
  border-radius: 8px;
  background: #172235;
  color: #d9e8ff;
  font-weight: 900;
  font-size: 0.78rem;
}

.admin-sidebar__mark {
  background: #1f6feb;
  color: #ffffff;
}

.admin-sidebar__nav {
  display: grid;
  gap: 0.3rem;
  min-height: 0;
}

.admin-sidebar__nav a,
.admin-sidebar__footer a {
  position: relative;
  padding: 0.58rem 0.62rem;
  border: 1px solid transparent;
  color: #cdd6e3;
  text-decoration: none;
  border-radius: 8px;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.admin-sidebar__nav a:hover,
.admin-sidebar__footer a:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(130, 148, 170, 0.16);
}

.admin-sidebar__nav a.is-active {
  background: rgba(31, 111, 235, 0.18);
  border-color: rgba(76, 139, 245, 0.36);
}

.admin-sidebar__nav a.is-active::before {
  content: "";
  position: absolute;
  left: -1rem;
  top: 0.75rem;
  bottom: 0.75rem;
  width: 3px;
  border-radius: 999px;
  background: #4c8bf5;
}

.admin-sidebar__nav a.is-active .admin-sidebar__icon {
  background: #1f6feb;
  color: #ffffff;
}

.admin-sidebar__text {
  min-width: 0;
  flex: 1;
}

.admin-sidebar__footer {
  margin-top: auto;
  padding-top: 0.72rem;
  border-top: 1px solid rgba(130, 148, 170, 0.14);
}

.admin-main {
  padding: 1.25rem;
  background: #0f1520;
}

.admin-main.is-loading {
  position: relative;
}

.admin-page-loading-bar {
  position: sticky;
  top: 0;
  z-index: 15;
  height: 3px;
  margin: -1.25rem -1.25rem 1rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.045);
}

.admin-page-loading-bar::before {
  content: "";
  display: block;
  width: 42%;
  height: 100%;
  background: linear-gradient(90deg, transparent, #4c8bf5, #35b37e, transparent);
  animation: admin-loading-sweep 1.2s ease-in-out infinite;
}

.admin-skeleton {
  display: block;
  width: 100%;
  height: 0.92rem;
  margin: 0.28rem 0;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.045));
  background-size: 220% 100%;
  animation: admin-shimmer 1.15s linear infinite;
}

.admin-skeleton.is-short {
  width: 62%;
}

.admin-table-wrap--loading .admin-table td {
  height: 3rem;
}

@keyframes admin-loading-sweep {
  from {
    transform: translateX(-120%);
  }
  to {
    transform: translateX(260%);
  }
}

.admin-page {
  display: grid;
  gap: 1rem;
}

.admin-page__head {
  margin-bottom: 0;
  padding: 1rem;
  border: 1px solid rgba(130, 148, 170, 0.16);
  background: #141c29;
  border-radius: 8px;
}

.admin-page__head h1 {
  color: #ffffff;
}

.admin-page__head .eyebrow {
  color: #8ea0b8;
  margin-bottom: 0.25rem;
}

.admin-dashboard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.admin-dashboard-head__actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.admin-dashboard-head__actions label {
  display: grid;
  gap: 0.25rem;
  min-width: 10.5rem;
}

.admin-dashboard-head__actions label span {
  color: #8ea0b8;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-dashboard-head__actions select {
  min-height: 38px;
  color: #f8fafc;
  border: 1px solid rgba(130, 148, 170, 0.2);
  border-radius: 8px;
  padding: 0.48rem 2rem 0.48rem 0.6rem;
}

.admin-dashboard-custom-date {
  display: none;
}

.admin-dashboard-custom-date.is-visible {
  display: grid;
}

.admin-dashboard-head__actions input[type="date"] {
  min-height: 38px;
  color: #f8fafc;
  color-scheme: dark;
  background: linear-gradient(180deg, rgba(16, 21, 33, 0.96), rgba(5, 6, 10, 0.96));
  border: 1px solid rgba(130, 148, 170, 0.24);
  border-radius: 8px;
  padding: 0.48rem 0.6rem;
}

.admin-dashboard-head__actions select,
.admin-email-field select,
.admin-modal-field select,
.admin-users-filter select,
.admin-filter select,
.admin-panel select {
  appearance: none;
  color-scheme: dark;
  background:
    linear-gradient(45deg, transparent 50%, #9fb0c6 50%) calc(100% - 1rem) 52% / 0.42rem 0.42rem no-repeat,
    linear-gradient(135deg, #9fb0c6 50%, transparent 50%) calc(100% - 0.72rem) 52% / 0.42rem 0.42rem no-repeat,
    linear-gradient(180deg, rgba(16, 21, 33, 0.96), rgba(5, 6, 10, 0.96));
  border-color: rgba(130, 148, 170, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.admin-dashboard-head__actions select:hover,
.admin-email-field select:hover,
.admin-modal-field select:hover,
.admin-users-filter select:hover,
.admin-filter select:hover,
.admin-panel select:hover {
  border-color: rgba(156, 177, 208, 0.34);
  background:
    linear-gradient(45deg, transparent 50%, #dbe3ee 50%) calc(100% - 1rem) 52% / 0.42rem 0.42rem no-repeat,
    linear-gradient(135deg, #dbe3ee 50%, transparent 50%) calc(100% - 0.72rem) 52% / 0.42rem 0.42rem no-repeat,
    linear-gradient(180deg, rgba(21, 29, 42, 0.98), rgba(8, 10, 16, 0.98));
}

.admin-dashboard-head__actions select:focus,
.admin-email-field select:focus,
.admin-modal-field select:focus,
.admin-users-filter select:focus,
.admin-filter select:focus,
.admin-panel select:focus {
  border-color: rgba(76, 139, 245, 0.6);
  outline: 2px solid rgba(76, 139, 245, 0.18);
  outline-offset: 2px;
}

.admin-dashboard-head__actions select option,
.admin-email-field select option,
.admin-modal-field select option,
.admin-users-filter select option,
.admin-filter select option,
.admin-panel select option {
  color: #f8fafc;
  background: #090d14;
}

.admin-stat-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 0;
}

.admin-stat,
.admin-panel,
.admin-alert-card {
  background: #151d2a;
  border-color: rgba(130, 148, 170, 0.16);
  box-shadow: 0 10px 28px rgba(1, 7, 18, 0.18);
}

.admin-stat {
  position: relative;
  min-height: 126px;
  overflow: hidden;
}

.admin-stat::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #708096;
}

.admin-stat--blue::before {
  background: #4c8bf5;
}

.admin-stat--green::before {
  background: #35b37e;
}

.admin-stat--amber::before {
  background: #f5a524;
}

.admin-stat strong {
  color: #ffffff;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
}

.admin-stat span {
  color: #a8b5c7;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.admin-stat small {
  color: #8ea0b8;
}

.admin-grid {
  gap: 1rem;
}

.admin-grid--two {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  margin-bottom: 0;
}

.admin-panel h2 {
  color: #ffffff;
  margin-bottom: 0.8rem;
}

.admin-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.8rem;
}

.admin-panel__head h2 {
  margin-bottom: 0;
}

.admin-panel__head span {
  color: #8ea0b8;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-panel h3 {
  color: #dfe7f2;
  font-size: 0.95rem;
}

.admin-panel canvas {
  width: 100%;
  min-height: 180px;
}

.admin-chart-panel {
  display: grid;
  gap: 0.75rem;
}

.admin-chart-details,
.admin-chart-points {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.admin-chart-details span,
.admin-chart-points span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2rem;
  padding: 0.34rem 0.55rem;
  border: 1px solid rgba(130, 148, 170, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: #9fb0c6;
  font-size: 0.76rem;
  font-weight: 800;
}

.admin-chart-details span b,
.admin-chart-points span b {
  color: #ffffff;
}

.admin-chart-points {
  padding-top: 0.15rem;
}

.admin-chart-points span {
  background: rgba(1, 1, 3, 0.22);
}

.admin-filter,
.admin-tabs,
.admin-queue-strip {
  margin-bottom: 0;
  padding: 0.75rem;
  border: 1px solid rgba(130, 148, 170, 0.14);
  background: #141c29;
  border-radius: 8px;
}

.admin-tabs {
  justify-content: flex-start;
}

.admin-tabs button {
  border: 1px solid rgba(130, 148, 170, 0.18);
  background: #111823;
  color: #cdd6e3;
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
}

.admin-tabs button.is-active,
.admin-tabs button:hover {
  color: #ffffff;
  border-color: rgba(76, 139, 245, 0.44);
  background: rgba(31, 111, 235, 0.16);
}

.admin-table-wrap {
  background: #151d2a;
  border-color: rgba(130, 148, 170, 0.16);
  box-shadow: 0 10px 28px rgba(1, 7, 18, 0.16);
  overflow: visible;
}

.admin-table {
  font-size: 0.9rem;
}

.admin-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #111823;
  color: #9fb0c6;
  letter-spacing: 0;
}

.admin-table td {
  color: #dbe3ee;
  border-bottom-color: rgba(130, 148, 170, 0.1);
}

.admin-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.035);
}

.admin-table a {
  color: #8bb7ff;
  font-weight: 800;
}

.admin-niche-chart {
  display: grid;
  gap: 0.62rem;
}

.admin-niche-row {
  display: grid;
  grid-template-columns: minmax(8rem, 0.85fr) minmax(8rem, 1fr) auto auto;
  align-items: center;
  gap: 0.7rem;
}

.admin-niche-row span {
  min-width: 0;
  color: #dbe3ee;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-niche-row div {
  height: 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.admin-niche-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1f6feb, #35b37e);
}

.admin-niche-row b {
  min-width: 2rem;
  color: #ffffff;
  text-align: right;
}

.admin-niche-row small {
  min-width: 3rem;
  color: #8ea0b8;
  text-align: right;
}

.admin-badge {
  border: 1px solid rgba(130, 148, 170, 0.16);
  background: #202a3a;
  color: #dbe3ee;
}

.admin-badge--pending,
.admin-badge--draft,
.admin-badge--neutral {
  background: #202a3a;
  color: #dbe3ee;
}

.admin-badge--running,
.admin-badge--sending {
  background: rgba(76, 139, 245, 0.16);
  color: #9cc4ff;
}

.admin-badge--success,
.admin-badge--active,
.admin-badge--sent,
.admin-badge--verified,
.admin-badge--yes {
  background: rgba(53, 179, 126, 0.16);
  color: #9ff0c8;
}

.admin-badge--failed,
.admin-badge--critical,
.admin-badge--suspended,
.admin-badge--no {
  background: rgba(220, 69, 69, 0.16);
  color: #ffb4b4;
}

.admin-badge--warning,
.admin-badge--acknowledged {
  background: rgba(245, 165, 36, 0.16);
  color: #ffd58a;
}

.admin-mini,
.admin-panel .ghost,
.admin-page__head .ghost,
.admin-filter .ghost {
  border-radius: 8px;
  border: 1px solid rgba(130, 148, 170, 0.18);
  background: rgba(255, 255, 255, 0.035);
  color: #dbe3ee;
}

.admin-mini:hover,
.admin-panel .ghost:hover,
.admin-page__head .ghost:hover,
.admin-filter .ghost:hover {
  background: rgba(255, 255, 255, 0.075);
}

.admin-panel .primary,
.admin-page__head .primary,
.admin-modal__panel .primary {
  border-radius: 8px;
  background: #1f6feb;
  color: #ffffff;
}

.admin-alert-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 0.65rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(130, 148, 170, 0.1);
}

.admin-alert-row:last-child {
  border-bottom: 0;
}

.admin-alert-card {
  display: grid;
  gap: 0.7rem;
}

.admin-alert-card h2 {
  margin: 0;
  color: #ffffff;
  font-size: 1.05rem;
}

.admin-queue-strip {
  justify-content: flex-start;
}

.admin-queue-strip span {
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(130, 148, 170, 0.14);
  background: #111823;
  border-radius: 999px;
  color: #b9c5d6;
}

.admin-queue-strip b {
  color: #ffffff;
}

.admin-loader,
.admin-error-state {
  display: grid;
  gap: 0.8rem;
  padding: 1.25rem;
  background: #151d2a;
  border: 1px solid rgba(130, 148, 170, 0.16);
  border-radius: 8px;
}

.admin-loader span {
  display: block;
  height: 70px;
  border-radius: 8px;
  background: linear-gradient(90deg, #151d2a, #202a3a, #151d2a);
  background-size: 220% 100%;
  animation: admin-shimmer 1.3s infinite linear;
}

.admin-loader p,
.admin-error-state p {
  color: #9fb0c6;
  margin: 0;
}

.admin-error-state strong {
  color: #ffffff;
  font-size: 1.1rem;
}

@keyframes admin-shimmer {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -100% 0;
  }
}

.admin-modal__panel {
  background: #151d2a;
  box-shadow: 0 24px 80px rgba(1, 7, 18, 0.5);
}

.admin-modal__panel h2 {
  color: #ffffff;
  margin-top: 0;
}

.admin-note,
.admin-step {
  background: #111823;
}

.admin-step summary {
  cursor: pointer;
  color: #dbe3ee;
  font-weight: 800;
}

.admin-step pre,
.admin-table pre,
.admin-panel pre {
  background: #090d14;
  border: 1px solid rgba(130, 148, 170, 0.14);
  border-radius: 8px;
  padding: 0.75rem;
  color: #dbe3ee;
}

@media (max-width: 1180px) {
  .admin-body {
    grid-template-columns: 240px minmax(0, 1fr);
  }

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

@media (max-width: 860px) {
  .admin-shell-host {
    width: calc(100vw - 1rem);
    margin-top: 0.5rem;
  }

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

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

  .admin-dashboard-head__actions {
    justify-content: flex-start;
    width: 100%;
  }

  .admin-topbar__actions {
    justify-content: flex-start;
  }

  .admin-body,
  .admin-grid--two,
  .admin-grid--three,
  .admin-stat-grid {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    padding: 0.75rem;
  }

  .admin-sidebar__brand,
  .admin-sidebar__footer {
    display: none;
  }

  .admin-sidebar__nav {
    display: flex;
    gap: 0.55rem;
  }

  .admin-sidebar__nav a {
    min-width: 150px;
  }

  .admin-sidebar__nav a.is-active::before {
    display: none;
  }
}

@media (max-width: 640px) {
  .admin-niche-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .admin-niche-row div {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .admin-niche-row small {
    display: none;
  }

  .admin-main {
    padding: 0.75rem;
  }

  .admin-table {
    min-width: 0;
  }

  .admin-table thead {
    display: none;
  }

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

  .admin-table tr {
    padding: 0.75rem;
    border-bottom: 1px solid rgba(130, 148, 170, 0.14);
  }

  .admin-table td {
    display: grid;
    grid-template-columns: 8rem minmax(0, 1fr);
    gap: 0.75rem;
    border-bottom: 0;
    padding: 0.35rem 0;
  }

  .admin-table td::before {
    content: attr(data-label);
    color: #8ea0b8;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
  }

  .admin-alert-row {
    grid-template-columns: 1fr;
  }
}

.admin-page__subhead {
  margin: 0.35rem 0 0;
  color: #9fb0c6;
  max-width: 52rem;
}

.admin-users-hero {
  align-items: stretch;
}

.admin-users-hero__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(86px, 1fr));
  gap: 0.6rem;
  min-width: min(520px, 100%);
}

.admin-users-hero__stats span {
  display: grid;
  gap: 0.15rem;
  align-content: center;
  min-height: 72px;
  padding: 0.7rem;
  border: 1px solid rgba(130, 148, 170, 0.14);
  background: #111823;
  border-radius: 8px;
  color: #8ea0b8;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-users-hero__stats b {
  color: #ffffff;
  font-size: 1.25rem;
  line-height: 1;
}

.admin-users-filter {
  display: grid;
  grid-template-columns: minmax(180px, 1.25fr) minmax(118px, 0.75fr) minmax(126px, 0.78fr) minmax(122px, 0.82fr) minmax(122px, 0.82fr) minmax(132px, auto);
  align-items: end;
  gap: 0.5rem;
}

.admin-users-filter label {
  display: grid;
  gap: 0.28rem;
  min-width: 0;
}

.admin-users-filter label span {
  color: #8ea0b8;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-users-filter input,
.admin-users-filter select {
  min-width: 0;
  height: 38px;
  padding: 0.48rem 0.55rem;
  font-size: 0.84rem;
}

.admin-filter__actions,
.admin-row-actions,
.admin-status-stack {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.admin-filter__actions {
  justify-content: flex-end;
  flex-wrap: nowrap;
  min-width: 132px;
}

.admin-filter__actions .ghost,
.admin-filter__actions .primary {
  min-height: 38px;
  padding: 0.48rem 0.65rem;
  font-size: 0.84rem;
  white-space: nowrap;
}

.admin-user-cell {
  display: grid;
  grid-template-columns: 2.35rem minmax(0, 1fr);
  align-items: center;
  gap: 0.7rem;
}

.admin-user-cell strong {
  display: block;
  color: #ffffff;
  line-height: 1.2;
}

.admin-user-cell small,
.admin-muted {
  display: block;
  color: #9fb0c6;
  line-height: 1.35;
}

.admin-book-cell {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.admin-book-cell strong,
.admin-book-cell small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.admin-book-cell strong {
  display: block;
  color: #ffffff;
  line-height: 1.25;
}

.admin-book-cell small {
  display: block;
  color: #9fb0c6;
  line-height: 1.3;
}

.admin-execution-detail-head {
  align-items: flex-start;
}

.admin-execution-book-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.75rem;
  max-width: 70rem;
}

.admin-execution-book-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: min(100%, 28rem);
  padding: 0.35rem 0.55rem;
  border: 1px solid rgba(130, 148, 170, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: #dbe3ee;
  overflow-wrap: anywhere;
}

.admin-execution-book-meta b {
  color: #8ea0b8;
  font-size: 0.68rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.admin-user-avatar {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 8px;
  background: #1f6feb;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 900;
}

.admin-row-actions {
  min-width: 0;
  flex-wrap: nowrap;
}

.admin-users-page .admin-table {
  table-layout: fixed;
}

.admin-users-page .admin-table th:nth-child(1),
.admin-users-page .admin-table td:nth-child(1) {
  width: 25%;
}

.admin-users-page .admin-table th:nth-child(2),
.admin-users-page .admin-table td:nth-child(2) {
  width: 16%;
}

.admin-users-page .admin-table th:nth-child(3),
.admin-users-page .admin-table td:nth-child(3) {
  width: 16%;
}

.admin-users-page .admin-table th:nth-child(4),
.admin-users-page .admin-table td:nth-child(4) {
  width: 13%;
}

.admin-users-page .admin-table th:nth-child(5),
.admin-users-page .admin-table td:nth-child(5) {
  width: 15%;
}

.admin-users-page .admin-table th:nth-child(6),
.admin-users-page .admin-table td:nth-child(6) {
  width: 14%;
}

.admin-users-page .admin-table th,
.admin-users-page .admin-table td {
  padding: 0.72rem;
}

.admin-users-page .admin-row-actions {
  position: relative;
  display: inline-flex;
  min-width: 0;
}

.admin-users-page .admin-row-actions .admin-mini {
  min-width: 0;
  min-height: 38px;
  padding: 0.42rem 0.75rem;
  border-radius: 999px;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
}

.admin-action-menu {
  position: relative;
}

.admin-action-menu__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.admin-action-menu__panel {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 20;
  display: grid;
  min-width: 190px;
  padding: 0.35rem;
  border: 1px solid rgba(130, 148, 170, 0.2);
  border-radius: 8px;
  background: #111823;
  box-shadow: 0 18px 50px rgba(1, 7, 18, 0.45);
}

.admin-action-menu__panel[hidden] {
  display: none;
}

.admin-action-menu__panel a,
.admin-action-menu__panel button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 38px;
  padding: 0.55rem 0.7rem;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #dbe3ee;
  font: inherit;
  font-size: 0.88rem;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.admin-action-menu__panel a:hover,
.admin-action-menu__panel button:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
}

.admin-users-page .admin-user-cell {
  min-width: 0;
}

.admin-users-page .admin-user-cell span:last-child,
.admin-users-page .admin-user-cell strong,
.admin-users-page .admin-user-cell small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-email-page {
  gap: 1rem;
}

.admin-email-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.18fr);
  gap: 1rem;
  align-items: start;
}

.admin-email-builder,
.admin-email-history {
  min-width: 0;
}

.admin-email-builder {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
}

.admin-email-history {
  padding: 1rem;
}

.admin-email-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(130, 148, 170, 0.12);
}

.admin-email-panel-head h2 {
  margin: 0;
}

.admin-email-panel-head .eyebrow {
  margin-bottom: 0.18rem;
  color: #8ea0b8;
}

.admin-email-panel-head > span {
  display: inline-grid;
  gap: 0.08rem;
  min-width: 7.5rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid rgba(130, 148, 170, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: #9fb0c6;
  font-size: 0.72rem;
  font-weight: 800;
  text-align: right;
  text-transform: uppercase;
}

.admin-email-panel-head > span b {
  color: #ffffff;
  font-size: 1.2rem;
  line-height: 1.1;
}

.admin-email-field {
  display: grid;
  gap: 0.38rem;
  min-width: 0;
}

.admin-email-field--compact {
  max-width: 18rem;
}

.admin-email-field label {
  color: #8ea0b8;
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-email-field input,
.admin-email-field select,
.admin-email-field textarea {
  min-width: 0;
  border-color: rgba(130, 148, 170, 0.2);
  background: rgba(1, 1, 3, 0.32);
}

.admin-email-field textarea {
  resize: vertical;
  line-height: 1.45;
}

.admin-email-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 0.2rem;
}

.admin-email-history .admin-table-wrap {
  margin-bottom: 0;
}

.admin-email-history .admin-table {
  min-width: 680px;
}

.admin-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(130, 148, 170, 0.14);
  background: #141c29;
  border-radius: 8px;
  color: #9fb0c6;
}

.admin-pagination div {
  display: flex;
  gap: 0.5rem;
}

.admin-pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

@media (max-width: 1180px) {
  .admin-email-layout {
    grid-template-columns: 1fr;
  }

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

  .admin-filter__actions {
    justify-content: flex-start;
  }

  .admin-users-page .admin-table {
    table-layout: auto;
  }

  .admin-users-page .admin-row-actions {
    justify-content: start;
  }
}

@media (max-width: 980px) {
  .admin-users-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-filter__actions {
    justify-content: stretch;
  }

  .admin-filter__actions .ghost,
  .admin-filter__actions .primary {
    flex: 1;
  }
}

@media (max-width: 760px) {
  .admin-users-hero__stats,
  .admin-users-filter {
    grid-template-columns: 1fr;
  }

  .admin-row-actions {
    min-width: 0;
  }
}

/* BookPlant admin background layer */
body.is-admin-route {
  background:
    radial-gradient(circle at 50% 8%, rgba(101, 122, 176, 0.12), transparent 18%),
    radial-gradient(circle at 16% 78%, rgba(43, 54, 92, 0.1), transparent 24%),
    radial-gradient(circle at 84% 24%, rgba(76, 91, 142, 0.08), transparent 20%),
    linear-gradient(180deg, var(--bg), var(--bg-2) 48%, var(--bg-3));
}

.admin-shell {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.055), transparent 34%),
    linear-gradient(180deg, rgba(7, 9, 14, 0.96), rgba(1, 1, 3, 0.98));
}

.admin-topbar,
.admin-sidebar,
.admin-page__head,
.admin-filter,
.admin-tabs,
.admin-queue-strip,
.admin-pagination,
.admin-modal__panel,
.admin-action-menu__panel {
  background: var(--glass);
}

.admin-main {
  background:
    radial-gradient(circle at 70% 4%, rgba(255, 255, 255, 0.035), transparent 24%),
    linear-gradient(180deg, rgba(5, 6, 10, 0.9), rgba(1, 1, 3, 0.94));
}

.admin-stat,
.admin-panel,
.admin-alert-card,
.admin-table-wrap,
.admin-loader,
.admin-error-state {
  background: var(--glass-strong);
}

.admin-table th,
.admin-note,
.admin-step,
.admin-step pre,
.admin-table pre,
.admin-panel pre,
.admin-queue-strip span,
.admin-users-hero__stats span {
  background: rgba(255, 255, 255, 0.045);
}

.admin-modal__backdrop {
  background: rgba(1, 1, 3, 0.72);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Space Grotesk", "Inter", sans-serif;
  background:
    radial-gradient(circle at 50% 8%, rgba(101, 122, 176, 0.12), transparent 18%),
    radial-gradient(circle at 16% 78%, rgba(43, 54, 92, 0.1), transparent 24%),
    radial-gradient(circle at 84% 24%, rgba(76, 91, 142, 0.08), transparent 20%),
    radial-gradient(circle at 50% 52%, rgba(10, 14, 24, 0.24), transparent 34%),
    linear-gradient(180deg, var(--bg), var(--bg-2) 48%, var(--bg-3));
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
}

.bg-noise {
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.08'/%3E%3C/svg%3E");
  opacity: 0.2;
  pointer-events: none;
  z-index: -3;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(12px);
  z-index: -2;
  opacity: 0.28;
  background: radial-gradient(circle, rgba(210, 220, 255, 0.16), transparent 72%);
  pointer-events: none;
  animation: orb-float 28s ease-in-out infinite, orb-glow 10s ease-in-out infinite;
  will-change: transform;
  box-shadow: 0 0 130px rgba(120, 138, 190, 0.16);
}

#starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 1;
  mix-blend-mode: screen;
}

.orb-1 {
  width: 360px;
  height: 360px;
  top: -140px;
  left: -80px;
  animation-duration: 36s;
}

.orb-2 {
  width: 300px;
  height: 300px;
  bottom: -120px;
  right: -40px;
  background: radial-gradient(circle, rgba(142, 154, 204, 0.18), transparent 72%);
  animation-duration: 44s;
  animation-delay: -12s;
}

.orb-3 {
  width: 200px;
  height: 200px;
  top: 40%;
  right: 12%;
  background: radial-gradient(circle, rgba(214, 224, 255, 0.2), transparent 66%);
  animation-duration: 32s;
  animation-delay: -6s;
}

.orb-4 {
  width: 260px;
  height: 260px;
  top: 12%;
  right: 38%;
  background: radial-gradient(circle, rgba(124, 129, 176, 0.16), transparent 72%);
  animation-duration: 40s;
  animation-delay: -18s;
}

.orb-5 {
  width: 180px;
  height: 180px;
  bottom: 18%;
  left: 6%;
  background: radial-gradient(circle, rgba(166, 176, 216, 0.18), transparent 69%);
  animation-duration: 34s;
  animation-delay: -10s;
}

.orb-6 {
  width: 140px;
  height: 140px;
  top: 62%;
  left: 48%;
  background: radial-gradient(circle, rgba(196, 208, 244, 0.16), transparent 66%);
  animation-duration: 30s;
  animation-delay: -22s;
}

@keyframes orb-float {
  0% {
    transform: translate3d(0, 0, 0);
  }
  25% {
    transform: translate3d(28px, -22px, 0);
  }
  50% {
    transform: translate3d(-24px, 18px, 0);
  }
  75% {
    transform: translate3d(18px, 26px, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

@keyframes orb-glow {
  0%,
  100% {
    opacity: 0.22;
    box-shadow: 0 0 90px rgba(132, 144, 190, 0.12);
  }
  50% {
    opacity: 0.36;
    box-shadow: 0 0 150px rgba(164, 176, 224, 0.18);
  }
}

.page {
  display: grid;
  gap: 0;
}

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 12px 24px;
  z-index: 50;
  max-width: 100%;
  margin: 0;
  background: linear-gradient(180deg, rgba(11, 11, 11, 0.8), transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 18px;
  transition: transform 0.3s ease-out;
  transform: translateY(0);
}

.site-nav.is-hidden {
  transform: translateY(-100%);
}

.site-nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-family: "Space Mono", "Space Grotesk", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.site-nav__brand-btn {
  appearance: none;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  padding: 0;
  flex: 0 0 auto;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.site-nav__brand-btn:hover {
  opacity: 1;
}

.site-nav__brand-btn.is-active {
  opacity: 1;
}

.site-nav__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  width: clamp(140px, 18vw, 200px);
  padding: 0;
  margin-left: 6px;
  border-radius: 0;
  background: transparent;
  border: none;
}

.site-nav__logo img {
  height: auto;
  width: 100%;
  max-width: none;
  object-fit: contain;
  display: block;
}

.site-nav__actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0;
  border-radius: 999px;
  position: sticky;
  top: 12px;
  z-index: 35;
}

.site-nav__actions .is-active {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.site-nav__notification-btn {
  position: relative;
}

.notification-bell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.notification-bell svg {
  width: 20px;
  height: 20px;
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.7rem;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.28);
}

#analytics-usage-chart {
  display: block;
  width: 100% !important;
  height: 100% !important;
  margin-top: 0;
}

#analytics-status-chart {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: 320px;
  margin: 0 auto;
}

.site-nav__mobile-toggle {
  display: none;
  margin-left: auto;
  position: sticky;
  top: 18px;
  z-index: 36;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: transparent;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 14px;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.burger {
  width: 22px;
  height: 16px;
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
}

.burger__bar {
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  transition: transform 0.25s ease, opacity 0.2s ease;
  transform-origin: center;
}

.site-nav__mobile-toggle.is-open {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.24);
  transform: scale(0.96);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.site-nav__mobile-toggle.is-open .burger__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-nav__mobile-toggle.is-open .burger__bar:nth-child(2) {
  opacity: 0;
}

.site-nav__mobile-toggle.is-open .burger__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-nav__actions.is-open {
  display: flex;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@media (max-width: 768px) {
  .site-nav {
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    padding: 16px 20px;
  }

  .site-nav__actions {
    display: none;
    position: absolute;
    top: 100%;
    right: 12px;
    left: auto;
    width: min(280px, calc(100vw - 36px));
    margin-left: 0;
    margin-top: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 12px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(165deg, rgba(16, 16, 16, 0.96), rgba(10, 10, 10, 0.92));
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.36);
    backdrop-filter: blur(16px) saturate(140%);
    z-index: 30;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transform-origin: top right;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
  }

  .site-nav__mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav__actions button {
    width: 100%;
    justify-content: flex-start;
    text-align: left;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: var(--ink);
    padding: 13px 16px;
    font-size: 0.95rem;
    border-radius: 14px;
    box-shadow: none;
  }

  .site-nav__actions button:hover {
    background: rgba(255, 255, 255, 0.12);
  }

  .site-nav__actions .icon-btn {
    width: 100%;
    height: 48px;
    border-radius: 14px;
  }

  .site-nav__actions.is-open {
    display: flex;
  }

  .site-nav__actions[hidden] {
    display: none !important;
  }
}

@media (min-width: 769px) {
  .site-nav__mobile-toggle {
    display: none !important;
  }

  .site-nav__actions {
    display: inline-flex !important;
    position: static;
    padding: 0;
    width: auto;
    flex-direction: row;
    gap: 12px;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .site-nav__actions.is-open {
    display: inline-flex !important;
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    width: auto !important;
    flex-direction: row !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.icon-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

.notifications-panel {
  position: fixed;
  top: 84px;
  right: 24px;
  width: min(420px, calc(100vw - 32px));
  max-height: min(70vh, 720px);
  overflow: auto;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background: rgba(14, 14, 14, 0.92);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px) saturate(140%);
  display: grid;
  gap: 16px;
  z-index: 45;
}

.notifications-panel[hidden] {
  display: none !important;
}

.notifications-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.notifications-panel__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.notifications-panel__head h2 {
  font-size: 1.1rem;
}

.notifications-panel__mark-all {
  flex: 0 0 auto;
}

.notifications-panel__list {
  display: grid;
  gap: 10px;
}

@media (max-width: 768px) {
  .notifications-panel {
    top: 76px;
    right: 16px;
    left: 16px;
    width: auto;
    max-height: min(65vh, calc(100vh - 108px));
    padding: 18px;
  }
}

.notification-item {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.notification-item.is-unread {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

.notification-item__body {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  padding: 16px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.notification-item__content {
  display: grid;
  gap: 6px;
}

.notification-item__content span,
.notification-item__content time {
  color: var(--muted);
  font-size: 0.92rem;
}

.notification-item__tone {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 999px;
}

.notification-item__tone--info {
  background: #7dd3fc;
}

.notification-item__tone--success {
  background: #4ade80;
}

.notification-item__tone--warning {
  background: #fbbf24;
}

.notification-item__tone--error {
  background: #f87171;
}

.notifications-empty {
  color: var(--muted);
  padding: 8px 4px;
}

.site-nav__actions .ghost,
.site-nav__actions .icon-btn {
  min-height: 38px;
  box-shadow: none;
}

.site-nav__actions .ghost {
  padding: 9px 18px;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

.site-nav__actions .ghost:hover,
.site-nav__actions .icon-btn:hover {
  transform: translateY(0);
}

.toast-stack {
  position: fixed;
  right: 22px;
  top: 22px;
  display: grid;
  gap: 12px;
  z-index: 60;
  pointer-events: none;
}

.toast {
  min-width: 240px;
  max-width: 360px;
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(12, 12, 12, 0.85);
  color: var(--ink);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  opacity: 0;
  transform: translateY(-8px);
  animation: toast-in 0.25s ease forwards;
}

.toast.success {
  border-color: rgba(34, 197, 94, 0.55);
  box-shadow: 0 18px 40px rgba(34, 197, 94, 0.12);
}

.toast.error {
  border-color: rgba(180, 35, 24, 0.55);
  box-shadow: 0 18px 40px rgba(180, 35, 24, 0.2);
}

.toast.info {
  border-color: rgba(14, 107, 168, 0.55);
}

.toast.is-leaving {
  animation: toast-out 0.2s ease forwards;
}

@keyframes toast-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(-6px);
  }
}

.hero {
  display: grid;
  gap: 18px;
}

.eyebrow {
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  font-size: 0.65rem;
  color: var(--muted);
}

.hero h1 {
  font-family: "Space Mono", "Space Grotesk", sans-serif;
  font-size: clamp(2.6rem, 4vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: 0.02em;
}

.subhead {
  max-width: 800px;
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1rem;
  letter-spacing: 0.01em;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
    align-content: center;
}

.chips span {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.75rem;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.landing {
  display: grid;
  gap: 0;
}

.promo-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 232, 214, 0.16), rgba(203, 255, 219, 0.12));
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 244, 231, 0.9);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  justify-content: center;
  margin-bottom: 20px;
}

.promo-strip p {
  flex: 1;
  font-size: 0.92rem;
  line-height: 1.5;
}

.promo-strip__icon {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #f9d6a3;
}

.promo-strip__cta {
  flex: 0 0 auto;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  min-height: 100vh;
  padding: 100px 24px 80px;
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
}

.landing-hero__content,
.landing-hero__preview {
  display: grid;
}

.landing-hero__content h1 {
  font-family: "Space Mono", "Space Grotesk", sans-serif;
  font-size: clamp(2.8rem, 5vw, 4.2rem);
  line-height: 1.08;
  letter-spacing: 0.01em;
}

.landing-hero__prompt {
  display: none;
}

.landing-hero__content .subhead {
  max-width: 60ch;
  font-size: 1.05rem;
}

.landing-hero__meta {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.62);
}

.landing-hero__preview {
  position: relative;
  overflow: hidden;
  align-self: stretch;
  min-height: 440px;
  padding: 28px;
  background:
    radial-gradient(circle at top right, rgba(255, 225, 185, 0.22), transparent 34%),
    radial-gradient(circle at bottom left, rgba(186, 255, 214, 0.12), transparent 38%),
    linear-gradient(180deg, rgba(255, 248, 240, 0.12), rgba(255, 255, 255, 0.03));
}

.landing-hero__mini-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
  min-height: 100%;
  min-width: 0;
}

.landing-hero__mini-list article {
  display: grid;
  gap: 10px;
  padding: 18px;
  min-height: 180px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.22);
  transform-origin: center bottom;
  --card-base-x: 0px;
  --card-base-y: 0px;
  --card-base-rotate: 0deg;
  --card-float-x: 0px;
  --card-float-y: 0px;
  --card-float-rotate: 0deg;
}

.landing-hero__mini-list article:nth-child(1) {
  --card-base-x: -10px;
  --card-base-y: 12px;
  --card-base-rotate: -8deg;
  --card-float-x: -4px;
  --card-float-y: -8px;
  --card-float-rotate: -0.8deg;
  --card-float-delay: -0.4s;
  text-align: right;
}

.landing-hero__mini-list article:nth-child(2) {
  --card-base-x: 0px;
  --card-base-y: 40px;
  --card-base-rotate: -1deg;
  --card-float-x: 3px;
  --card-float-y: -10px;
  --card-float-rotate: 0.45deg;
  background: linear-gradient(180deg, rgba(255, 232, 214, 0.18), rgba(255, 255, 255, 0.04));
  --card-float-delay: -1.6s;
}

.landing-hero__mini-list article:nth-child(3) {
  --card-base-x: 10px;
  --card-base-y: 16px;
  --card-base-rotate: 7deg;
  --card-float-x: 4px;
  --card-float-y: -7px;
  --card-float-rotate: 0.8deg;
  --card-float-delay: -2.7s;
}

.landing-hero__mini-list h3,
.landing-rating strong,
.feature-card h3,
.showcase-book h3,
.benefit-card h3,
.template-card h3,
.faq-item h3 {
  font-size: 1.1rem;
  line-height: 1.3;
}

.landing-hero__mini-list p,
.landing-rating span,
.feature-card p,
.showcase-book p,
.benefit-card p,
.template-card p,
.faq-item p,
.testimonial-card p,
.landing-metric span {
  color: rgba(242, 242, 242, 0.72);
  line-height: 1.7;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

.landing-rating {
  display: grid;
  gap: 10px;
  align-self: stretch;
  width: 100%;
  padding: 22px 24px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 244, 231, 0.14), rgba(255, 255, 255, 0.05)),
    rgba(7, 7, 7, 0.46);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(16px);
}

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

.landing-stat {
  gap: 10px;
  min-height: 0;
  padding: 22px;
}

.landing-stat strong {
  font-family: "Space Mono", "Space Grotesk", sans-serif;
  font-size: 0.96rem;
}

.landing-stat span {
  color: rgba(242, 242, 242, 0.7);
  line-height: 1.65;
}

.landing-rating strong,
.landing-metric strong {
  font-family: "Space Mono", monospace;
  font-size: 1rem;
}

.landing-section {
  display: grid;
  gap: 32px;
  min-height: 100vh;
  padding: 80px 24px;
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
  justify-content: center;
}

.landing-section__head {
  display: grid;
  gap: 12px;
  max-width: 920px;
  margin: 0 auto;
  text-align: center;
}

.landing-section__head h2,
.landing-final h2 {
  font-family: "Space Mono", "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  line-height: 1.15;
  letter-spacing: 0.01em;
}

.landing-proof__grid,
.feature-grid,
.showcase-grid,
.benefit-grid,
.template-grid,
.testimonial-grid,
.faq-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}

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

.landing-metric,
.feature-card,
.showcase-book,
.benefit-card,
.template-card,
.testimonial-card,
.faq-item {
  display: grid;
  gap: 14px;
  min-height: 100%;
  padding: 28px;
}

.feature-card__number,
.showcase-book__label {
  font-family: "Space Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.58);
}

.pricing-preview {
  min-height: 100vh;
  padding: 80px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pricing-preview__panel,
.landing-final {
  min-height: 100vh;
  padding: 80px 24px;
  display: grid;
  gap: 24px;
  align-items: center;
  justify-items: center;
}

.landing-final > * {
  max-width: 800px;
}

.landing-reveal {
  opacity: var(--reveal-opacity, 1);
  transform:
    perspective(var(--tilt-perspective, 900px))
    translate3d(
      calc(var(--reveal-x, 0px) + var(--depth-x, 0px) + var(--hover-shift-x, 0px)),
      calc(var(--reveal-y, 0px) + var(--depth-y, 0px) + var(--hover-shift-y, 0px)),
      0
    )
    rotateX(var(--tilt-x, 0deg))
    rotateY(var(--tilt-y, 0deg))
    rotate(var(--reveal-rotate, 0deg))
    scale(var(--reveal-scale, 1));
  filter: blur(var(--reveal-blur, 0px));
  will-change: opacity, transform, filter;
}

.landing {
  position: relative;
}

.landing-promo-band {
  min-height: auto;
  padding-top: 8px;
  padding-bottom: 8px;
}

.promo-strip {
  position: relative;
  overflow: hidden;
}

.promo-strip::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.14) 50%, transparent 80%);
  transform: translateX(-120%);
  animation: promo-sheen 7s ease-in-out infinite;
  pointer-events: none;
}

.landing-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 0;
  padding: 120px 32px 88px;
  background: transparent;
  border: none;
}

.landing-hero::before,
.landing-hero::after {
  content: none;
}

.landing-hero__headline-wrap {
  display: grid;
  gap: 14px;
}

.landing-hero__headline-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 244, 231, 0.86);
}

.landing-hero__headline-kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f9d6a3;
  box-shadow: 0 0 16px rgba(249, 214, 163, 0.65);
}

.landing-hero__prompt {
  display: grid;
  gap: 8px;
  max-width: 42rem;
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  box-shadow: 0 20px 36px rgba(0, 0, 0, 0.18);
}

.landing-hero__prompt span {
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(242, 242, 242, 0.56);
}

.landing-hero__prompt strong {
  font-size: 1rem;
  line-height: 1.7;
  font-weight: 500;
}

.landing-hero__signals {
  display: flex;
  align-items: center;
  gap: 14px;
}

.landing-hero__pulse {
  position: relative;
  width: 26px;
  height: 42px;
}

.landing-hero__pulse::before,
.landing-hero__pulse::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid rgba(203, 255, 217, 0.88);
  border-bottom: 2px solid rgba(203, 255, 217, 0.88);
  transform: translateX(-50%) rotate(45deg);
}

.landing-hero__pulse::before {
  bottom: 10px;
  opacity: 0.95;
}

.landing-hero__pulse::after {
  bottom: 2px;
  opacity: 0.55;
}

.landing-hero__pulse span {
  position: absolute;
  left: 50%;
  border-radius: 50%;
  transform: translateX(-50%);
}

.landing-hero__pulse span:first-child {
  top: 2px;
  width: 18px;
  height: 18px;
  background: rgba(196, 255, 220, 0.22);
  animation: landing-pulse 2.4s ease-out infinite;
}

.landing-hero__pulse span:last-child {
  top: 6px;
  width: 10px;
  height: 10px;
  background: #cbffd9;
  box-shadow: 0 0 18px rgba(203, 255, 217, 0.7);
  animation: landing-pulse-dot 2.4s ease-in-out infinite;
}

.landing-cta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.landing-cta__label {
  position: relative;
  z-index: 1;
}

.landing-cta__line {
  position: absolute;
  inset: auto 18px 10px;
  height: 1px;
  background: currentColor;
  opacity: 0.34;
  transform: scaleX(0.18);
  transform-origin: left center;
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.landing-cta:hover .landing-cta__line,
.landing-cta:focus-visible .landing-cta__line {
  transform: scaleX(1);
  opacity: 0.8;
}

.landing-hero__preview {
  min-height: 420px;
  padding: 0;
  border-radius: 34px;
  transition: transform 0.32s ease, box-shadow 0.32s ease;
}

.landing-hero__preview-shell {
  display: grid;
  height: 100%;
  gap: 18px;
  padding: 0;
  transform-style: preserve-3d;
  min-width: 0;
  overflow: hidden;
}

.landing-hero__preview-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
  min-width: 0;
}

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

.landing-hero__preview-copy h2 {
  font-family: "Space Mono", "Space Grotesk", sans-serif;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1.12;
}

.landing-hero__preview-copy p:last-child {
  color: rgba(242, 242, 242, 0.7);
  line-height: 1.65;
}

.landing-float-card {
  transition: transform 0.35s ease, border-color 0.35s ease, background 0.35s ease;
  transform-style: preserve-3d;
  min-width: 0;
  animation: hero-float-card 8s ease-in-out infinite;
  animation-delay: var(--card-float-delay, 0s);
}

.landing-hero__hud {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: end;
  width: 100%;
  margin-top: 10px;
}

.landing-hero__status-card {
  display: grid;
  gap: 8px;
  padding: 20px;
  border-radius: 24px;
  background: rgba(8, 8, 8, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
}

.landing-hero__status-label {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(242, 242, 242, 0.56);
}

.landing-hero__status-card strong {
  font-family: "Space Mono", monospace;
  font-size: 0.94rem;
}

.landing-hero__status-card p {
  font-size: 0.9rem;
  color: rgba(242, 242, 242, 0.68);
  line-height: 1.6;
}

.landing-hero__mini-list article {
  min-height: 160px;
  min-width: 0;
}

.landing-hero__mini-list article:nth-child(2) {
  min-height: 176px;
}

.landing-hero__status-card {
  padding-top: 18px;
  padding-bottom: 18px;
}

.landing-rating strong {
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  letter-spacing: 0.04em;
}

.landing-rating span {
  max-width: none;
  color: rgba(248, 248, 248, 0.88);
}

.landing-hero__preview-copy,
.landing-hero__mini-list,
.landing-hero__hud {
  align-content: start;
}

.landing-hero__preview-copy p:last-child,
.landing-hero__status-card p {
  max-width: 42ch;
}

.landing-hero__preview.card {
  box-shadow: 0 24px 44px rgba(0, 0, 0, 0.24);
}

.landing-lift-card {
  position: relative;
  transition: border-color 0.32s ease, background 0.32s ease, box-shadow 0.32s ease;
  transform-style: preserve-3d;
}

.landing-lift-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at var(--pointer-x, 50%) var(--pointer-y, 50%), rgba(255, 255, 255, 0.16), transparent 42%);
  opacity: 0;
  transition: opacity 0.28s ease;
  pointer-events: none;
}

.landing-lift-card:hover,
.landing-lift-card:focus-within {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 26px 48px rgba(0, 0, 0, 0.28);
}

.landing-lift-card:hover::after,
.landing-lift-card:focus-within::after {
  opacity: 1;
}

.showcase-book::before {
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.showcase-book:hover::before,
.showcase-book:focus-within::before {
  transform: translateY(-8px) rotate(-3deg);
  opacity: 1;
}

.landing-final {
  text-align: center;
}

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

.landing-metric {
  position: relative;
  min-height: auto;
  display: grid;
  align-items: end;
  overflow: hidden;
  min-height: 360px;
  padding: 0;
  background: #0b0d12;
}

.landing-metric::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(4, 6, 10, 0.08) 0%, rgba(4, 6, 10, 0.18) 38%, rgba(4, 6, 10, 0.84) 100%),
    linear-gradient(135deg, rgba(255, 215, 173, 0.16), transparent 42%);
  pointer-events: none;
}

.landing-metric__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.landing-metric__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.landing-metric__content {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 10px;
  padding: 24px;
  align-content: end;
}

.landing-metric__content strong {
  text-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

.landing-metric__content span {
  max-width: 28ch;
  color: rgba(248, 248, 248, 0.9);
  text-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

.feature-card {
  position: relative;
  overflow: hidden;
  min-height: auto;
}

.feature-card::before {
  content: "";
  position: absolute;
  inset: auto 24px 24px;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.2), transparent);
}

.showcase-section {
  min-height: 100vh;
  padding: 80px 24px;
  display: grid;
  gap: 40px;
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
  justify-content: center;
}

.showcase-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.showcase-book {
  position: relative;
  min-height: auto;
  align-content: end;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.2)),
    linear-gradient(140deg, rgba(255, 233, 210, 0.18), rgba(255, 255, 255, 0.02));
  padding: 32px;
  padding-right: 136px;
  isolation: isolate;
}

.showcase-book:nth-child(2) {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.22)),
    linear-gradient(140deg, rgba(203, 255, 219, 0.16), rgba(255, 255, 255, 0.02));
}

.showcase-book:nth-child(3) {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.22)),
    linear-gradient(140deg, rgba(207, 225, 255, 0.16), rgba(255, 255, 255, 0.02));
}

.showcase-book::before {
  content: "";
  position: absolute;
  inset: 22px 22px auto auto;
  width: 88px;
  height: 118px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02)),
    url("/static/card_images/showcase-business-strategy.svg") center / cover no-repeat;
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.24);
  z-index: 0;
}

.showcase-book:nth-child(2)::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02)),
    url("/static/card_images/showcase-self-help.svg") center / cover no-repeat;
}

.showcase-book:nth-child(3)::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02)),
    url("/static/card_images/showcase-educational-product.svg") center / cover no-repeat;
}

.showcase-book > * {
  position: relative;
  z-index: 1;
}

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

.benefit-card {
  min-height: auto;
}

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

.template-card {
  min-height: auto;
  align-content: end;
  padding: 28px;
}

.template-card::before {
  content: "";
  width: 64px;
  height: 84px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.05));
  box-shadow: 0 16px 26px rgba(0, 0, 0, 0.2);
}

.testimonials-section {
  min-height: 100vh;
  padding: 80px 24px;
  display: grid;
  gap: 40px;
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
  justify-content: center;
}

.testimonial-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.testimonial-card {
  min-height: auto;
  padding: 32px;
}

.pricing-preview__panel {
  min-height: 100vh;
  padding: 0;
  align-items: center;
  justify-items: center;
  text-align: center;
  gap: 10px;
}

.pricing-preview__panel .subhead {
  max-width: 800px;
  margin-inline: auto;
  line-height: 1.55;
  margin-top: -10px;
}

.pricing-preview__panel .actions {
  justify-self: center;
  align-self: center;
  justify-content: center;
}

@media (min-width: 981px) {
  .pricing-preview__panel {
    padding-left: 0;
    padding-right: 0;
  }
}

.landing-templates {
  min-height: 100vh;
  padding: 80px 24px;
  display: grid;
  gap: 40px;
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
  justify-content: center;
}

.faq-section {
  min-height: 100vh;
  padding: 80px 24px;
  display: grid;
  gap: 40px;
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
  justify-content: center;
}

.faq-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.landing .card {
  border-radius: 24px;
}

.workspace-panel,
.billing-panel,
.analytics-panel {
  display: grid;
  gap: 24px;
  padding: 120px 24px 80px;
  max-width: 1180px;
  margin: 0 auto;
}

[data-route-panel]:not([data-route-panel="home"]) {
  padding-top: 100px !important;
}

.workspace-hero h1 {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
}

.card {
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
  padding: 18px;
  border-radius: 28px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(24px) saturate(140%);
}

#billing-panel.card,
#analytics-panel.card {
  border-radius: 0;
}

#book-form {
  display: grid;
  gap: 22px;
  border-radius: 20px;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  background: none;
}

.field {
  display: grid;
  gap: 0;
  position: relative;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.85rem;
  color: var(--muted);
}

.field > span {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  padding: 0 6px;
  background: transparent;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.65rem;
  color: var(--muted);
  pointer-events: none;
  transition: transform 0.2s ease, top 0.2s ease, color 0.2s ease;
}

.field:focus-within > span {
  color: var(--accent);
}

.field.is-invalid > span {
  color: #fca5a5;
}

.field-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  color: rgba(226, 232, 240, 0.7);
  pointer-events: none;
  z-index: 1;
  transition: color 0.2s ease, transform 0.2s ease;
}

.field-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.field:focus-within .field-icon {
  color: var(--accent);
  transform: translateY(-50%) scale(1.03);
}

input,
textarea,
select {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.95rem;
  padding: 20px 16px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--glass-strong);
  color: var(--ink);
  box-shadow: var(--glow);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.12), var(--glow);
}

input:hover,
textarea:hover,
select:hover {
  transform: translateY(-1px);
}

.field.is-invalid input,
.field.is-invalid textarea,
.field.is-invalid select {
  border-color: rgba(248, 113, 113, 0.9);
  box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.12);
}

.field-error {
  display: block;
  margin-top: 8px;
  padding: 0 4px;
  color: #fca5a5;
  font-size: 0.75rem;
  line-height: 1.45;
}

.field-hint {
  display: block;
  margin-top: 8px;
  padding: 0 4px;
  color: rgba(203, 213, 225, 0.76);
  font-size: 0.74rem;
  line-height: 1.45;
}

.field--niche input {
  padding-left: 52px;
  padding-right: 18px;
  background:
    linear-gradient(135deg, rgba(33, 96, 159, 0.18), rgba(8, 145, 178, 0.08)),
    var(--glass-strong);
  border-color: rgba(96, 165, 250, 0.2);
}

.field--niche input:hover {
  border-color: rgba(125, 211, 252, 0.34);
}

.field--niche input:focus {
  border-color: rgba(125, 211, 252, 0.56);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.14), var(--glow);
}

.field--niche > span {
  left: 46px;
}

.field-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 20;
  display: grid;
  gap: 6px;
  max-height: 320px;
  overflow-y: auto;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(9, 12, 24, 0.96);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.field-suggestions[hidden] {
  display: none !important;
}

.field-suggestions__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 4px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.field-suggestions__title {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(186, 230, 253, 0.84);
}

.field-suggestions__caption {
  font-size: 0.72rem;
  color: rgba(203, 213, 225, 0.66);
}

.field-suggestion {
  display: block;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 11px 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
  color: var(--ink);
  text-align: left;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.field-suggestion:hover,
.field-suggestion:focus-visible,
.field-suggestion.is-active {
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.18), rgba(255, 255, 255, 0.06));
  border-color: rgba(125, 211, 252, 0.3);
  transform: translateY(-1px);
  outline: none;
}

.field-suggestion__label {
  display: block;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.field-suggestion__value {
  display: block;
  margin-top: 5px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

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

input::placeholder,
textarea::placeholder {
  color: transparent;
}

input::placeholder,
textarea::placeholder {
  font-size: 1.02rem;
}

input:focus + span,
textarea:focus + span,
input:not(:placeholder-shown) + span,
textarea:not(:placeholder-shown) + span,
select:focus + span,
select:valid + span {
  top: 0;
  transform: translateY(-50%);
  color: var(--accent);
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, rgba(233, 236, 241, 0.7) 50%),
    linear-gradient(135deg, rgba(233, 236, 241, 0.7) 50%, transparent 50%),
    linear-gradient(to right, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.12));
  background-position: calc(100% - 22px) 24px, calc(100% - 16px) 24px,
    calc(100% - 46px) 16px;
  background-size: 6px 6px, 6px 6px, 1px 20px;
  background-repeat: no-repeat;
  padding-right: 52px;
  cursor: pointer;
}

select:focus {
  background-image: linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.85) 50%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.85) 50%, transparent 50%),
    linear-gradient(to right, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.22));
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.primary,
.ghost {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.95rem;
  padding: 14px 28px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary {
  background: linear-gradient(120deg, #ffffff, #d9d9d9);
  color: #0b0b0b;
  box-shadow: 0 18px 40px rgba(255, 255, 255, 0.18);
}

.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 45px rgba(255, 255, 255, 0.25);
}

.ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--ink);
}

.ghost:hover {
  background: rgba(255, 255, 255, 0.06);
}

.google-btn {
  background: #ffffff;
  color: #333;
  border: 1px solid #ccc;
  font-weight: 700;
}

.google-btn:hover {
  background: #f1f1f1;
}

/* Google Material Button Styles - Theme Integrated */
.gsi-material-button {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.95), rgba(217, 217, 217, 0.95));
  background-image: none;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.3;
  margin: 0;
  max-width: 100%;
  overflow: visible;
  padding: 14px 28px;
  position: relative;
  text-align: center;
  text-transform: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
  width: 100%;
  max-width: 100%;
  color: #ffffff;
  box-shadow: 0 18px 40px rgba(255, 255, 255, 0.18);
}

.gsi-material-button:hover {
  background: linear-gradient(120deg, #ffffff, #e8e8e8);
  color: #0b0b0b;
  transform: translateY(-2px);
  box-shadow: 0 22px 45px rgba(255, 255, 255, 0.25);
}

.gsi-material-button:active {
  transform: translateY(0);
  box-shadow: 0 18px 40px rgba(255, 255, 255, 0.18);
}

.gsi-material-button:disabled {
  cursor: default;
  opacity: 0.6;
  transform: none;
}

.gsi-material-button-state {
  bottom: 0;
  display: none;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.gsi-material-button:disabled .gsi-material-button-state {
  display: block;
  background-color: transparent;
  border-radius: 999px;
}

.gsi-material-button-content-wrapper {
  align-items: center;
  display: flex;
  flex-direction: row;
  justify-content: center;
  position: relative;
  z-index: 1;
  gap: 12px;
  color: inherit;
}

.gsi-material-button-icon {
  align-items: center;
  display: flex;
  flex-direction: row;
  height: 20px;
  justify-content: center;
  width: 20px;
  flex-shrink: 0;
}

.gsi-material-button-icon svg {
  display: block;
  height: 20px;
  width: 20px;
}

.gsi-material-button-contents {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
  text-transform: none;
  color: inherit;
}

.gsi-material-button:disabled .gsi-material-button-contents {
  opacity: 0.6;
}

.status {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.9rem;
  color: var(--accent);
  min-height: 1.2em;
}

.auth-page {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.hidden {
  display: none !important;
}

/* Route panel isolation and visibility */
[data-route-panel] {
  display: none;
  grid-column: 1;
  grid-row: 1;
}

[data-route-panel]:not([hidden]) {
  display: block;
}

[data-route-panel][hidden] {
  display: none !important;
}

.billing-plan-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 1.25rem;
}

.billing-current-column,
.billing-upgrade-column {
  grid-column: 1;
}

.billing-upgrade-heading {
  margin-top: 0;
  margin-bottom: 1.1rem;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(242, 242, 242, 0.78);
  border-bottom: 1px solid rgba(255,255,255,0.12);
  padding-bottom: 0.75rem;
}

.billing-upgrade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.billing-plan-card {
  background: rgba(255,255,255,0.05);
  min-height: 220px;
  height: 100%;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.billing-plans-grid--all {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: stretch;
  gap: 20px;
  margin-top: 1rem;
}

.billing-plans-grid--all .billing-plan-card {
  min-height: 260px;
  padding: 22px;
}

.billing-plans-grid--all .billing-plan-card .primary {
  margin-top: auto;
}

.billing-plan-card.current-subscription {
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.1), rgba(74, 222, 128, 0.05));
  border: 2px solid rgba(74, 222, 128, 0.3);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 14px 30px rgba(0,0,0,0.16);
}

.billing-card-actions {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.billing-plan-note {
  color: rgba(242, 242, 242, 0.72);
  font-size: 0.92rem;
  line-height: 1.55;
}

.billing-upgrade-empty {
  padding: 14px;
  background: rgba(255,255,255,0.06);
  border: 1px dashed rgba(255,255,255,0.2);
  border-radius: 10px;
  color: #d1d5db;
}

@media (min-width: 1100px) {
  .billing-plan-layout {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .billing-upgrade-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }

  .billing-current-column,
  .billing-upgrade-column {
    padding: 0;
  }
}

.billing-plan-card h3 {
  margin-top: 0;
  margin-bottom: 0.15rem;
  font-size: 1.15rem;
}

.billing-plan-card p {
  margin: 0;
  max-width: 62ch;
}

.analytics-dashboard {
  display: grid;
  gap: 22px;
}

.analytics-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.analytics-stat-card,
.analytics-panel-card,
.analytics-kpi-card,
.analytics-request-item {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
}

.analytics-stat-card {
  display: grid;
  gap: 10px;
  padding: 18px 20px;
  border-radius: 18px;
}

.analytics-stat-label,
.analytics-kpi-label {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.analytics-stat-value,
.analytics-kpi-value {
  font-family: "Space Mono", "Space Grotesk", sans-serif;
  font-size: clamp(1.3rem, 2vw, 2rem);
  color: var(--ink);
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.analytics-grid--secondary {
  align-items: start;
}

.analytics-panel-card {
  display: grid;
  gap: 18px;
  padding: 22px;
  border-radius: 22px;
}

.analytics-card-head {
  display: grid;
  gap: 8px;
}

.analytics-card-head h2 {
  font-family: "Space Mono", "Space Grotesk", sans-serif;
  font-size: 1.15rem;
}

.analytics-card-head p {
  color: var(--muted);
  font-size: 0.95rem;
}

.analytics-chart-wrap {
  position: relative;
  height: 260px;
}

.analytics-chart-wrap--donut {
  height: 300px;
}

.analytics-chart-empty {
  margin-top: 14px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.analytics-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
}

.analytics-kpi-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 18px;
  min-width: 0;
}

@media (min-width: 980px) {
  .analytics-kpi-card--wide {
    grid-column: 1 / -1;
  }
}

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

.analytics-request-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 18px;
}

.analytics-request-main {
  display: grid;
  gap: 4px;
}

.analytics-request-main strong {
  font-size: 1rem;
}

.analytics-request-main span,
.analytics-request-meta time {
  color: var(--muted);
  font-size: 0.9rem;
}

.analytics-request-meta {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.analytics-request-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 6px 10px;
  border-radius: 999px;
  text-transform: capitalize;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  border: 1px solid transparent;
}

.analytics-request-status--success {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.28);
  color: #7ee6a2;
}

.analytics-request-status--pending {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.28);
  color: #ffd27a;
}

.analytics-request-status--failed {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.28);
  color: #ff9c9c;
}

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

.projects-list {
  display: grid;
  gap: 16px;
}

.project-card,
.project-empty {
  display: grid;
  gap: 16px;
  padding: 22px;
}

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

.project-card__title-wrap {
  display: grid;
  gap: 6px;
}

.project-card__title-wrap h2 {
  margin: 0;
  font-size: 1.2rem;
}

.project-card__title-wrap p:last-child {
  margin: 0;
  color: var(--muted);
}

.project-card__status-group {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.project-storage-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-card__meta {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.93rem;
}

.project-card__files {
  display: grid;
  gap: 10px;
}

.project-card__files > span {
  color: var(--muted);
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-card__file-links,
.project-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.project-file-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-decoration: none;
  font-size: 0.84rem;
  letter-spacing: 0.06em;
}

.project-file-link:hover {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
}

.project-card__title,
.project-card__subtitle,
.project-card__pill,
.project-card__meta-line,
.project-card__action {
  display: block;
  height: 14px;
  border-radius: 999px;
}

.project-card__title {
  height: 18px;
}

.project-card__subtitle {
  height: 12px;
}

.project-card__meta-line {
  width: 100%;
}

.project-card__action {
  width: 120px;
  height: 40px;
}

.auth-hero {
  max-width: 720px;
}

.auth-card {
  max-width: 520px;
}

@media (min-width: 980px) {
  .auth-page {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    gap: 56px;
  }

  .auth-hero {
    grid-column: 1;
  }

  .auth-card {
    grid-column: 2;
    justify-self: end;
  }
}

.auth-head {
  display: grid;
  gap: 8px;
  padding: 8px 6px 18px;
}

.auth-head h2 {
  font-family: "Space Mono", "Space Grotesk", sans-serif;
  font-size: 1.8rem;
}

.auth-head p {
  color: var(--muted);
  font-size: 0.95rem;
}

.auth-panels {
  display: grid;
}

.auth-panel {
  display: none;
  gap: 22px;
}

.auth-panel.is-active {
  display: grid;
}

#forgot-password {
  white-space: nowrap;
}

.status.error {
  color: #b42318;
}

.status.success {
  color: #22c55e;
}

.auth-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 90;
}

.billing-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 90;
}

.storage-warning-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 90;
}

.billing-modal.is-open {
  display: block;
}

.storage-warning-modal.is-open {
  display: block;
}

.billing-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 6, 6, 0.42);
  backdrop-filter: blur(7px) saturate(120%);
}

.storage-warning-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 6, 6, 0.42);
  backdrop-filter: blur(7px) saturate(120%);
}

.billing-modal__panel {
  position: relative;
  width: min(1080px, 94vw);
  margin: 6vh auto;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(150deg, rgba(18, 18, 18, 0.94), rgba(10, 10, 10, 0.9));
  box-shadow: var(--shadow);
  max-height: 88vh;
  overflow: auto;
}

.storage-warning-modal__panel {
  position: relative;
  width: min(760px, 92vw);
  margin: 10vh auto;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    radial-gradient(circle at top right, rgba(255, 214, 102, 0.14), transparent 40%),
    linear-gradient(150deg, rgba(18, 18, 18, 0.96), rgba(10, 10, 10, 0.92));
  box-shadow: var(--shadow);
  max-height: 84vh;
  overflow: auto;
}

.billing-modal__content {
  padding: 32px;
  display: grid;
  gap: 20px;
}

.storage-warning-modal__content {
  padding: 32px;
  display: grid;
  gap: 20px;
}

.billing-modal__hero h2 {
  font-family: "Space Mono", "Space Grotesk", sans-serif;
  font-size: clamp(1.8rem, 2.8vw, 2.6rem);
}

.storage-warning-modal__hero h2 {
  font-family: "Space Mono", "Space Grotesk", sans-serif;
  font-size: clamp(1.6rem, 2.4vw, 2.3rem);
}

.billing-modal__close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  z-index: 2;
}

.storage-warning-modal__close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  z-index: 2;
}

.billing-modal__close:hover {
  background: rgba(255, 255, 255, 0.16);
}

.storage-warning-modal__close:hover {
  background: rgba(255, 255, 255, 0.16);
}

body.billing-modal-open {
  overflow: hidden;
}

body.storage-warning-modal-open {
  overflow: hidden;
}

body.auth-modal-open .site-nav,
body.auth-modal-open .notifications-panel,
body.billing-modal-open .site-nav,
body.billing-modal-open .notifications-panel,
body.storage-warning-modal-open .site-nav,
body.storage-warning-modal-open .notifications-panel {
  visibility: hidden;
  pointer-events: none;
}

.auth-modal.is-open {
  display: block;
}

.auth-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 6, 6, 0.35);
  backdrop-filter: blur(6px) saturate(120%);
}

.auth-modal__panel {
  position: relative;
  width: min(980px, 94vw);
  margin: 4vh auto;
  overflow: visible;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(150deg, rgba(18, 18, 18, 0.9), rgba(10, 10, 10, 0.84));
  box-shadow: var(--shadow);
}

.auth-modal__content .page {
  padding: 36px 32px 36px;
  gap: 28px;
}

.auth-modal__content .hero {
  gap: 12px;
}

.auth-modal__content .hero h1 {
  font-size: clamp(2rem, 3.2vw, 3rem);
}

.auth-modal__content .subhead {
  max-width: 560px;
}

.auth-modal__close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  z-index: 2;
}

.auth-modal__close:hover {
  background: rgba(255, 255, 255, 0.16);
}

body.auth-modal-open {
  overflow: hidden;
}

@media (max-width: 700px) {
  .page {
    padding: 0;
  }

  .site-nav {
    padding: 12px 18px;
    top: 0;
  }

  [data-route-panel]:not([data-route-panel="home"]) {
    padding-top: 90px !important;
  }

  .promo-strip {
    border-radius: 16px;
    display: grid;
    grid-template-columns: 1fr;
    justify-items: start;
    align-items: start;
    margin: 0 18px 16px 18px;
    padding: 18px;
    gap: 12px;
  }

  .promo-strip__icon {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    letter-spacing: 0.12em;
    font-size: 0.68rem;
  }

  .promo-strip p {
    flex: initial;
    font-size: 0.88rem;
    line-height: 1.6;
  }

  .promo-strip__cta {
    width: 100%;
    justify-content: center;
  }

  .landing-hero,
  .landing-section,
  .showcase-section,
  .testimonials-section,
  .landing-templates,
  .faq-section,
  .pricing-preview {
    min-height: auto;
    padding: 60px 18px 40px;
    gap: 24px;
  }

  .landing-hero {
    grid-template-columns: 1fr;
    gap: 20px;
    border-radius: 0;
    min-height: 100svh;
    padding: 96px 18px 40px;
  }

  .landing-hero__content {
    min-height: calc(100svh - 96px);
    align-content: stretch;
    align-items: stretch;
    justify-content: space-evenly;
    gap: 0;
    padding-block: 12px 20px;
  }

  .landing-hero__content > * {
    margin: 0;
  }

  .landing-hero__content .actions {
    margin-top: 10px;
  }

  .landing-hero__content h1 {
    font-size: clamp(3rem, 8.8vw, 3.5rem);
    line-height: 1.25;
    letter-spacing: 0.035em;
  }

  .landing-hero__headline-kicker {
    font-size: 0.65rem;
    letter-spacing: 0.12em;
  }

  .landing-section__head h2,
  .landing-final h2 {
    font-size: clamp(1.4rem, 4vw, 2rem);
  }

  .landing-hero__preview {
    min-height: 0;
    padding: 0;
  }

  .landing-hero__preview-shell {
    padding: 0;
  }

  .landing-hero__preview-grid {
    grid-template-columns: 1fr;
  }

  .landing-hero__prompt {
    padding: 16px;
  }

  .landing-hero__mini-list {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .landing-hero__mini-list article,
  .landing-hero__mini-list article:nth-child(1),
  .landing-hero__mini-list article:nth-child(2),
  .landing-hero__mini-list article:nth-child(3) {
    min-height: auto;
  }

  .landing-hero__signals {
    flex-wrap: wrap;
  }

  .landing-hero__hud {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .promo-strip,
  .landing-hero__stats,
  .landing-hero__mini-list,
  .landing-proof__grid,
  .feature-grid,
  .showcase-grid,
  .benefit-grid,
  .template-grid,
  .testimonial-grid,
  .faq-list,
  .pricing-preview__panel {
    grid-template-columns: 1fr;
    justify-items: stretch;
    min-height: auto;
    padding-top: 0;
    padding-bottom: 0;
  }

  .landing-hero {
    min-height: 100svh;
  }

  .pricing-preview__panel .actions {
    justify-self: stretch;
  }

  .showcase-book {
    min-height: auto;
  }

  .card {
    padding: 24px;
    border-radius: 18px;
  }

  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .workspace-panel {
    padding: 100px 18px 40px;
  }

  .workspace-hero h1 {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
  }

  .auth-modal__panel {
    width: 94vw;
    margin: 4vh auto;
    max-height: 92vh;
    overflow: auto;
  }

  .billing-modal__panel {
    width: 94vw;
    margin: 5vh auto;
    max-height: 90vh;
  }

  .storage-warning-modal__panel {
    width: 94vw;
    margin: 8vh auto;
    max-height: 88vh;
  }

  .billing-modal__content {
    padding: 24px 18px;
  }

  .storage-warning-modal__content {
    padding: 24px 18px;
  }

  .auth-modal__content .page {
    padding: 28px 18px 28px;
  }

  .toast-stack {
    right: 16px;
    left: 16px;
    top: auto;
    bottom: 18px;
  }

  .toast {
    max-width: none;
  }

  .analytics-request-item {
    align-items: start;
    flex-direction: column;
  }

  .analytics-request-meta {
    justify-items: start;
  }

  .project-card__head {
    flex-direction: column;
  }

  .project-card__status-group {
    justify-items: start;
  }
}

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

  .landing-reveal {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}

@keyframes promo-sheen {
  0%,
  100% {
    transform: translateX(-120%);
  }
  40%,
  60% {
    transform: translateX(120%);
  }
}

@keyframes landing-pulse {
  0% {
    transform: translateX(-50%) scale(0.55) translateY(0);
    opacity: 0.8;
  }
  80%,
  100% {
    transform: translateX(-50%) scale(1.75) translateY(10px);
    opacity: 0;
  }
}

@keyframes landing-pulse-dot {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(7px);
  }
}

@keyframes hero-float-card {
  0%,
  100% {
    transform: translate3d(var(--card-base-x), var(--card-base-y), 0) rotate(var(--card-base-rotate));
  }
  33% {
    transform:
      translate3d(
        calc(var(--card-base-x) + var(--card-float-x)),
        calc(var(--card-base-y) + var(--card-float-y)),
        0
      )
      rotate(calc(var(--card-base-rotate) + var(--card-float-rotate)));
  }
  66% {
    transform:
      translate3d(
        calc(var(--card-base-x) - (var(--card-float-x) * 0.55)),
        calc(var(--card-base-y) + 8px),
        0
      )
      rotate(calc(var(--card-base-rotate) - (var(--card-float-rotate) * 0.6)));
  }
}
