:root {
  color-scheme: dark;
  --bg: #05070c;
  --bg-2: #08111c;
  --panel: rgba(15, 22, 34, 0.78);
  --panel-2: rgba(20, 26, 39, 0.92);
  --ink: #f7f4ef;
  --muted: #aab0bd;
  --line: rgba(255, 255, 255, 0.11);
  --gold: #f4c261;
  --gold-2: #fff0b8;
  --purple: #8a45ff;
  --violet: #d75cff;
  --green: #43d26f;
  --red: #ff5c5c;
  --blue: #35c5e8;
  --shadow: 0 18px 70px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 68% 8%, rgba(116, 63, 224, 0.26), transparent 34%),
    radial-gradient(circle at 22% 14%, rgba(244, 194, 97, 0.12), transparent 28%),
    linear-gradient(135deg, #030407 0%, #07101c 50%, #05070c 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100dvh;
  overflow-wrap: anywhere;
}

body::before {
  background-image:
    radial-gradient(circle, rgba(255, 221, 151, 0.55) 0 1px, transparent 1px),
    radial-gradient(circle, rgba(152, 93, 255, 0.42) 0 1px, transparent 1px);
  background-position: 0 0, 40px 70px;
  background-size: 150px 150px, 210px 210px;
  content: "";
  inset: 0;
  opacity: 0.22;
  pointer-events: none;
  position: fixed;
  z-index: -1;
}

a {
  color: inherit;
}

#root,
main,
section,
article,
aside,
header,
nav,
div,
form,
label,
input,
button,
a {
  min-width: 0;
}

.public-menu-toggle,
.sidebar-toggle,
.sidebar-close {
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--line);
  color: var(--ink);
  display: none;
  min-height: 44px;
  min-width: 44px;
  padding: 0;
}

.topbar {
  align-items: center;
  background: rgba(5, 8, 13, 0.76);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  min-height: 70px;
  padding: 0 34px;
  position: sticky;
  top: 0;
  z-index: 4;
}

body.immersive .topbar {
  display: none;
}

body.sidebar-open {
  overflow: hidden;
}

.brand {
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  letter-spacing: 0.08em;
  text-decoration: none;
}

nav {
  align-items: center;
  display: flex;
  gap: 18px;
}

nav a {
  color: var(--muted);
  text-decoration: none;
}

button,
.button {
  align-items: center;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 750;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
  text-decoration: none;
}

.button.gold,
button.gold {
  background: linear-gradient(135deg, #f8d77c, #d69430);
  color: #15100a;
}

.button.gradient {
  background: linear-gradient(100deg, #6d35d7, #903cf0 48%, #f4bd54);
  color: white;
}

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

.cosmic-hero {
  display: grid;
  gap: 42px;
  grid-template-columns: minmax(280px, 0.8fr) minmax(520px, 1.2fr);
  min-height: calc(100dvh - 70px);
  overflow: hidden;
  padding: 7vh 6vw 5vh;
}

.hero-copy {
  align-self: center;
  max-width: 520px;
}

.eyebrow {
  color: var(--violet);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.cosmic-hero h1 {
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(54px, 8vw, 104px);
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 0.95;
  margin: 18px 0;
}

.cosmic-hero p {
  color: var(--muted);
  font-size: 19px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.brand-mark {
  align-items: center;
  background:
    radial-gradient(circle, rgba(244, 194, 97, 0.2), transparent 58%),
    conic-gradient(from 30deg, rgba(244, 194, 97, 0.2), rgba(138, 69, 255, 0.32), rgba(244, 194, 97, 0.2));
  border: 1px solid rgba(244, 194, 97, 0.55);
  border-radius: 50%;
  box-shadow: 0 0 34px rgba(244, 194, 97, 0.16);
  color: var(--gold-2);
  display: inline-flex;
  flex: 0 0 auto;
  font-family: Georgia, "Times New Roman", serif;
  height: 56px;
  justify-content: center;
  width: 56px;
}

.brand-mark span {
  font-size: 35px;
}

.brand-mark.large {
  height: 126px;
  width: 126px;
}

.brand-mark.large span {
  font-size: 88px;
}

.phone-stage {
  align-items: center;
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(2, minmax(min(100%, 260px), 360px));
  justify-content: center;
}

.phone-card {
  aspect-ratio: 9 / 18.6;
  background:
    radial-gradient(circle at 54% 23%, rgba(244, 194, 97, 0.28), transparent 18%),
    radial-gradient(circle at 48% 38%, rgba(138, 69, 255, 0.32), transparent 28%),
    linear-gradient(180deg, rgba(7, 9, 15, 0.98), rgba(9, 11, 18, 0.96));
  border: 1px solid rgba(244, 194, 97, 0.58);
  border-radius: 34px;
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  max-height: min(43rem, calc(100dvh - 40px));
  min-width: 0;
  padding: 30px;
}

.phone-status {
  display: flex;
  font-weight: 700;
  justify-content: space-between;
}

.constellation,
.matrix-orbit {
  aspect-ratio: 1;
  border: 1px solid rgba(244, 194, 97, 0.18);
  border-radius: 50%;
  margin: auto;
  position: relative;
  width: min(82%, 290px);
}

.constellation::before,
.matrix-orbit::before {
  border: 1px solid rgba(244, 194, 97, 0.22);
  border-radius: 50%;
  content: "";
  inset: 19%;
  position: absolute;
}

.constellation b,
.matrix-orbit span {
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 36px;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: rotate(calc(var(--i) * 60deg)) translate(110px) rotate(calc(var(--i) * -60deg));
}

.orb-number,
.giant-number {
  color: var(--gold-2);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 108px;
  line-height: 1;
  text-shadow: 0 0 28px rgba(244, 194, 97, 0.5);
}

.orb-number {
  align-items: center;
  background: radial-gradient(circle, rgba(244, 194, 97, 0.15), transparent 64%);
  border: 1px solid rgba(244, 194, 97, 0.4);
  border-radius: 50%;
  display: flex;
  height: 210px;
  justify-content: center;
  margin: 24px auto 12px;
  width: 210px;
}

.orb-number.small {
  font-size: 70px;
  height: 150px;
  width: 150px;
}

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

.mini-grid span {
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}

.mini-grid b {
  color: var(--gold);
  display: block;
}

.section {
  margin: 0 auto;
  max-width: 1220px;
  padding: 48px 24px;
}

.dark-band {
  border-top: 1px solid var(--line);
}

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

.feature-row,
.glass-panel,
.metric-card,
.premium-card,
.stat-tile {
  background: linear-gradient(180deg, rgba(21, 28, 42, 0.82), rgba(10, 16, 27, 0.82));
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.feature-row {
  display: flex;
  gap: 16px;
  padding: 20px;
}

.feature-row span {
  color: var(--gold);
  font-size: 26px;
}

.feature-row h3,
.feature-row p {
  margin: 0 0 8px;
}

.product-shell {
  display: grid;
  grid-template-columns: 300px 1fr;
  min-height: 100dvh;
  width: 100%;
}

.cosmic-sidebar {
  background: rgba(4, 10, 18, 0.86);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 20px 16px;
}

.sidebar-brand {
  color: var(--gold);
  display: grid;
  gap: 2px 12px;
  grid-template-columns: 58px 1fr;
  text-decoration: none;
}

.sidebar-brand .brand-mark {
  grid-row: span 2;
}

.sidebar-brand strong {
  align-self: end;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  letter-spacing: 0.06em;
}

.sidebar-brand small {
  color: var(--ink);
}

.side-nav {
  align-items: stretch;
  display: grid;
  gap: 6px;
}

.side-link {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #d7dbe4;
  display: flex;
  gap: 13px;
  min-height: 45px;
  padding: 0 13px;
  text-decoration: none;
}

.side-link span {
  color: var(--gold);
  width: 22px;
}

.side-link.active {
  background: linear-gradient(90deg, rgba(120, 55, 218, 0.45), rgba(120, 55, 218, 0.16));
  border-color: rgba(179, 99, 255, 0.78);
  color: #f7edff;
}

.premium-card {
  margin-top: auto;
  padding: 20px;
}

.premium-card strong {
  color: var(--gold);
  font-size: 18px;
}

.premium-card p {
  color: var(--muted);
}

.product-main {
  min-width: 0;
  padding: 16px 24px 28px;
  width: 100%;
}

.product-topbar {
  align-items: center;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 20px;
}

.search-box {
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  max-width: 520px;
  width: min(520px, 45vw);
  padding: 0 12px;
}

.search-box input,
input {
  background: transparent;
  border: 0;
  color: var(--ink);
  flex: 1;
  font: inherit;
  min-height: 45px;
  outline: 0;
}

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

.top-actions small {
  color: var(--gold);
  display: block;
}

.chip,
.icon-chip {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  color: var(--ink);
  position: relative;
}

.language-select {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.language-select select {
  appearance: none;
  background:
    linear-gradient(135deg, rgba(74, 45, 126, 0.98), rgba(38, 31, 74, 0.98));
  border-color: rgba(196, 142, 255, 0.75);
  color: #ffffff;
  min-height: 42px;
  padding: 0 36px 0 12px;
}

.language-select select:focus {
  box-shadow: 0 0 0 3px rgba(138, 69, 255, 0.28);
  outline: 0;
}

.language-select select option {
  background: #3b236f;
  color: #ffffff;
}

.language-select select option:checked,
.language-select select option:hover {
  background: #7c3aed;
  color: #ffffff;
}

.icon-chip b {
  background: var(--purple);
  border-radius: 999px;
  font-size: 11px;
  padding: 2px 6px;
  position: absolute;
  right: -7px;
  top: -7px;
}

.avatar {
  background:
    radial-gradient(circle at 50% 35%, #f0b889 0 13px, transparent 14px),
    radial-gradient(circle at 50% 77%, #2d65d4 0 19px, transparent 20px),
    #1a2230;
  border: 1px solid rgba(244, 194, 97, 0.55);
  border-radius: 50%;
  height: 48px;
  width: 48px;
}

.avatar.woman {
  background:
    radial-gradient(circle at 50% 35%, #f3bd91 0 13px, transparent 14px),
    radial-gradient(circle at 50% 77%, #b739b0 0 19px, transparent 20px),
    #241126;
}

.avatar.big {
  height: 84px;
  width: 84px;
}

.avatar.tiny {
  display: inline-block;
  height: 24px;
  width: 24px;
}

.auth-screen {
  display: grid;
  min-height: calc(100dvh - 100px);
  place-items: center;
}

.auth-panel {
  max-width: 520px;
  padding: 34px;
  text-align: center;
  width: 100%;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.form-grid input {
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 13px;
}

.form-grid.horizontal {
  grid-template-columns: minmax(0, 1fr) minmax(150px, 170px) auto;
}

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

.split-actions button,
.form-grid button:not(.ghost-button) {
  background: linear-gradient(100deg, #6d35d7, #903cf0 48%, #f4bd54);
  color: white;
}

.dashboard-hero {
  background:
    radial-gradient(circle at 82% 28%, rgba(244, 194, 97, 0.22), transparent 18%),
    radial-gradient(circle at 62% 20%, rgba(138, 69, 255, 0.3), transparent 30%),
    linear-gradient(180deg, rgba(19, 25, 38, 0.84), rgba(10, 16, 27, 0.78));
  margin-bottom: 18px;
  padding: 28px;
}

.dashboard-hero h1 {
  font-size: 32px;
  margin: 0 0 8px;
}

.dashboard-hero p,
.glass-panel p,
.notice {
  color: var(--muted);
}

.dashboard-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
}

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

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

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

.glass-panel {
  padding: 20px;
}

.glass-panel h2,
.glass-panel h3,
.glass-panel header {
  margin-top: 0;
}

.glass-panel header,
.forecast-row,
.date-row,
.report-row,
.admin-table div {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.forecast-card header span,
.forecast-row span,
.key-grid a,
.dates-card a,
.reports-card a {
  color: var(--gold);
  text-decoration: none;
}

.forecast-row,
.date-row,
.report-row {
  border-bottom: 1px solid var(--line);
  gap: 12px;
  padding: 12px 0;
}

.forecast-row p,
.date-row small,
.report-row small {
  color: var(--muted);
  display: block;
  margin: 2px 0 0;
}

.numbers {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin-top: 18px;
}

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

.number-tile {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 16px;
}

.number-tile strong {
  color: var(--gold);
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 38px;
}

.number-tile span {
  color: var(--muted);
}

.ring,
.donut,
.score-orb {
  align-items: center;
  background: conic-gradient(var(--purple), var(--violet), var(--gold), var(--green), var(--blue), var(--purple));
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  font-size: 34px;
  font-weight: 800;
  height: 150px;
  justify-content: center;
  margin: 10px auto;
  width: 150px;
}

.ring::after,
.donut::after {
  background: var(--panel-2);
  border-radius: 50%;
  content: "";
  height: 98px;
  position: absolute;
  width: 98px;
  z-index: -1;
}

.energy-card .ring,
.donut {
  position: relative;
}

.right-rail {
  display: grid;
  gap: 16px;
}

.ai-card,
.calendar-card {
  background: linear-gradient(180deg, rgba(21, 28, 42, 0.82), rgba(10, 16, 27, 0.82));
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
}

.ai-card header,
.calendar-card header {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.online {
  color: var(--green);
}

.mentor-orb {
  align-items: center;
  background: radial-gradient(circle, #c095ff, #4b178c 55%, transparent 72%);
  border-radius: 50%;
  box-shadow: 0 0 42px rgba(138, 69, 255, 0.56);
  display: flex;
  font-size: 72px;
  height: 150px;
  justify-content: center;
  margin: 18px auto;
  width: 150px;
}

.prompt-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  margin: 8px 0;
  width: 100%;
}

.calendar-grid {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(7, 1fr);
  margin: 18px 0;
  text-align: center;
}

.calendar-grid span,
.calendar-grid b {
  align-items: center;
  border-radius: 50%;
  display: flex;
  height: 34px;
  justify-content: center;
}

.calendar-grid b {
  color: var(--muted);
  font-weight: 500;
}

.calendar-grid .great {
  border: 1px solid var(--green);
  color: #b5ffc6;
}

.calendar-grid .neutral {
  border: 1px solid var(--gold);
  color: var(--gold);
}

.calendar-grid .warn {
  border: 1px solid var(--red);
  color: #ffb1b1;
}

.dot {
  border-radius: 50%;
  display: inline-block;
  height: 12px;
  margin-left: 8px;
  width: 12px;
}

.dot.great {
  background: var(--green);
}

.dot.neutral {
  background: var(--gold);
}

.dot.warn {
  background: var(--red);
}

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

.premium-banner {
  align-items: center;
  background: linear-gradient(90deg, rgba(120, 55, 218, 0.54), rgba(244, 194, 97, 0.22));
  border: 1px solid rgba(179, 99, 255, 0.5);
  border-radius: 14px;
  display: flex;
  justify-content: space-between;
  padding: 20px;
}

.premium-banner strong {
  font-size: 22px;
}

.premium-banner button {
  background: linear-gradient(135deg, #f8d77c, #d69430);
}

.stat-tile {
  padding: 20px;
  text-align: center;
}

.stat-tile b {
  display: block;
  font-size: 28px;
}

.matrix-panel,
.compatibility-panel,
.report-preview,
.ai-full {
  min-height: 620px;
}

.matrix-orbit {
  margin: 44px auto;
  width: min(100%, 360px);
}

.people-row {
  align-items: center;
  display: flex;
  gap: 28px;
  justify-content: center;
  margin: 38px 0;
}

.score-orb {
  color: var(--gold);
}

.wave,
.line-chart {
  background:
    linear-gradient(180deg, transparent 0 23%, rgba(255, 255, 255, 0.08) 24% 25%, transparent 26% 48%, rgba(255, 255, 255, 0.08) 49% 50%, transparent 51%),
    linear-gradient(120deg, transparent 0 12%, rgba(138, 69, 255, 0.85) 13% 14%, transparent 15% 28%, rgba(138, 69, 255, 0.9) 29% 30%, transparent 31% 44%, rgba(138, 69, 255, 0.85) 45% 46%, transparent 47%);
  border-radius: 12px;
  height: 180px;
}

.mic-button {
  background: radial-gradient(circle, #d5a9ff, #601ec2);
  border-radius: 50%;
  height: 88px;
  margin: 20px auto;
  width: 88px;
}

.premium-list p {
  border-bottom: 1px solid var(--line);
  padding: 11px 0;
}

.report-cover {
  border: 1px solid var(--line);
  border-radius: 14px;
  margin: 24px auto;
  max-width: 360px;
  padding: 26px;
}

.admin-metrics {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 18px;
}

.metric-card {
  padding: 22px;
}

.metric-card span {
  color: var(--gold);
  font-size: 30px;
}

.metric-card small {
  color: var(--muted);
  display: block;
}

.metric-card strong {
  display: block;
  font-size: 28px;
  margin: 8px 0;
}

.metric-card em {
  color: var(--green);
  font-style: normal;
}

.admin-table {
  display: grid;
  gap: 10px;
}

.admin-table div {
  background: rgba(255, 255, 255, 0.035);
  border-radius: 9px;
  padding: 9px;
}

.admin-table em {
  background: rgba(67, 210, 111, 0.15);
  border-radius: 7px;
  color: var(--green);
  font-style: normal;
  padding: 5px 9px;
}

.line-chart {
  background:
    linear-gradient(180deg, transparent 0 23%, rgba(255, 255, 255, 0.08) 24% 25%, transparent 26% 48%, rgba(255, 255, 255, 0.08) 49% 50%, transparent 51%),
    linear-gradient(160deg, transparent 0 12%, rgba(138, 69, 255, 0.8) 13% 16%, transparent 17% 31%, rgba(138, 69, 255, 0.9) 32% 35%, transparent 36% 52%, rgba(138, 69, 255, 0.8) 53% 56%, transparent 57%);
}

.gold-line {
  background:
    linear-gradient(180deg, transparent 0 23%, rgba(255, 255, 255, 0.08) 24% 25%, transparent 26% 48%, rgba(255, 255, 255, 0.08) 49% 50%, transparent 51%),
    linear-gradient(160deg, transparent 0 12%, rgba(244, 194, 97, 0.9) 13% 16%, transparent 17% 31%, rgba(244, 194, 97, 0.9) 32% 35%, transparent 36% 52%, rgba(244, 194, 97, 0.9) 53% 56%, transparent 57%);
}

.map-shape {
  background: radial-gradient(circle at 40% 40%, rgba(138, 69, 255, 0.75), transparent 38%), radial-gradient(circle at 62% 48%, rgba(138, 69, 255, 0.6), transparent 32%), #142235;
  border-radius: 58% 42% 48% 52%;
  height: 180px;
}

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

.quick-actions button {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: var(--ink);
}

@media (max-width: 1440px) {
  .product-shell {
    grid-template-columns: 270px 1fr;
  }

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

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

@media (max-width: 1280px) {
  .dashboard-layout,
  .cosmic-hero {
    grid-template-columns: 1fr;
  }

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

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

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

  .sidebar-toggle,
  .sidebar-close {
    display: inline-flex;
  }

  .cosmic-sidebar {
    bottom: 0;
    left: 0;
    max-width: min(86vw, 340px);
    overflow-y: auto;
    position: fixed;
    top: 0;
    transform: translateX(-105%);
    transition: transform 180ms ease;
    width: min(86vw, 340px);
    z-index: 20;
  }

  body.sidebar-open .cosmic-sidebar {
    transform: translateX(0);
  }

  body.sidebar-open::after {
    background: rgba(0, 0, 0, 0.58);
    content: "";
    inset: 0;
    position: fixed;
    z-index: 19;
  }

  .sidebar-close {
    align-self: end;
  }

  .product-topbar {
    align-items: center;
  }

  .search-box {
    width: 100%;
  }

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

  .span-2 {
    grid-column: span 1;
  }
}

@media (max-width: 760px) {
  .topbar {
    align-items: center;
    flex-direction: row;
    min-height: 62px;
    padding: 10px 14px;
  }

  .public-menu-toggle {
    display: inline-flex;
  }

  .topbar nav {
    background: rgba(5, 8, 13, 0.98);
    border: 1px solid var(--line);
    border-radius: 12px;
    display: none;
    left: 12px;
    padding: 12px;
    position: absolute;
    right: 12px;
    top: calc(100% + 8px);
  }

  body.public-menu-open .topbar nav {
    display: flex;
  }

  nav,
  .product-topbar,
  .top-actions,
  .premium-banner {
    align-items: stretch;
    flex-direction: column;
  }

  .phone-stage,
  .content-grid,
  .admin-grid,
  .admin-metrics,
  .bottom-stats,
  .form-grid.horizontal,
  .right-rail,
  .numbers.compact,
  .mini-grid {
    grid-template-columns: 1fr;
  }

  .product-main,
  .cosmic-hero {
    padding: 14px;
  }

  .search-box {
    min-width: 0;
  }

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

  .cosmic-hero h1 {
    font-size: clamp(38px, 14vw, 58px);
    letter-spacing: 0.08em;
  }

  .orb-number,
  .giant-number {
    font-size: 82px;
  }

  .orb-number {
    height: 170px;
    width: 170px;
  }

  .constellation b,
  .matrix-orbit span {
    transform: rotate(calc(var(--i) * 60deg)) translate(clamp(72px, 28vw, 110px)) rotate(calc(var(--i) * -60deg));
  }
}

@media (max-width: 575px) {
  .product-topbar {
    gap: 10px;
  }

  .top-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .avatar {
    height: 40px;
    width: 40px;
  }

  .premium-banner,
  .split-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

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

@media (max-width: 374px) {
  .product-main,
  .cosmic-hero,
  .section {
    padding-left: 10px;
    padding-right: 10px;
  }

  .glass-panel,
  .ai-card,
  .calendar-card,
  .premium-card,
  .metric-card {
    padding: 14px;
  }

  .calendar-grid {
    gap: 5px;
  }

  .calendar-grid span,
  .calendar-grid b {
    height: 30px;
  }
}

@media (max-height: 700px) and (max-width: 991px) {
  .cosmic-sidebar {
    padding-bottom: 12px;
  }

  .premium-card {
    margin-top: 0;
  }
}
