:root {
  --bg: #0f0d0d;
  --bg-soft: #171414;
  --panel: rgba(21, 18, 18, 0.78);
  --panel-strong: rgba(17, 14, 14, 0.92);
  --line: rgba(255, 241, 220, 0.12);
  --line-strong: rgba(255, 241, 220, 0.22);
  --text: #fff4e1;
  --text-soft: rgba(255, 244, 225, 0.72);
  --text-dim: rgba(255, 244, 225, 0.52);
  --accent: #f3eed2;
  --accent-deep: #d4be8a;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --container: min(1240px, calc(100vw - 40px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(212, 190, 138, 0.12), transparent 28%),
    radial-gradient(circle at 80% 10%, rgba(255, 241, 220, 0.08), transparent 26%),
    linear-gradient(180deg, #151212 0%, #090808 100%);
  color: var(--text);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 241, 220, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 241, 220, 0.015) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 95%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.page-shell {
  position: relative;
  overflow: hidden;
}

.hidden {
  display: none !important;
}

.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(40px);
  pointer-events: none;
  opacity: 0.55;
}

.ambient-a {
  width: 320px;
  height: 320px;
  background: rgba(212, 190, 138, 0.12);
  top: 10%;
  right: -80px;
}

.ambient-b {
  width: 240px;
  height: 240px;
  background: rgba(255, 241, 220, 0.08);
  left: -60px;
  top: 35%;
}

.ambient-c {
  width: 280px;
  height: 280px;
  background: rgba(182, 144, 73, 0.08);
  right: 12%;
  bottom: 10%;
}

.topbar {
  width: var(--container);
  margin: 20px auto 0;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 13, 13, 0.75);
  backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: sticky;
  top: 16px;
  z-index: 20;
}

.topbar-page {
  position: relative;
  top: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-logo {
  width: 180px;
  max-width: 100%;
}

.brand-meta {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar-nav,
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-nav a {
  color: var(--text-soft);
}

.topbar-nav a.is-active,
.topbar-nav a:hover {
  color: var(--accent);
}

.button {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 13px 20px;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button-primary {
  background: linear-gradient(135deg, #fff5e0 0%, #d7c290 100%);
  color: #131111;
  box-shadow: 0 12px 34px rgba(212, 190, 138, 0.18);
}

.button-secondary {
  background: #ffffff;
  color: #121010;
}

.button-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.button-block {
  width: 100%;
}

.auth-layout,
.workspace-layout {
  width: var(--container);
  margin: 0 auto;
  padding: 30px 0 80px;
}

.auth-stage,
.workspace-header {
  display: grid;
  gap: 24px;
}

.auth-stage {
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  min-height: calc(100vh - 140px);
}

.auth-stage > * {
  min-width: 0;
}

.login-page .auth-stage {
  grid-template-columns: minmax(0, 1.42fr) minmax(440px, 0.58fr);
  align-items: start;
}

.login-page .auth-copy {
  min-width: 0;
  max-width: 760px;
}

.login-page .topbar,
.login-page .auth-layout {
  width: var(--container);
}

.register-page .auth-stage {
  grid-template-columns: minmax(0, 1.34fr) minmax(460px, 0.66fr);
  align-items: start;
}

.register-page .auth-copy {
  min-width: 0;
  max-width: 780px;
}

.eyebrow {
  display: inline-flex;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-soft);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.auth-copy h1,
.workspace-header h1,
.table-head h2,
.panel h2,
.admin-spotlight h3 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.auth-copy h1 {
  font-size: clamp(2.8rem, 5.2vw, 4.9rem);
  margin: 18px 0 18px;
  max-width: 10.5ch;
  line-height: 0.92;
  text-wrap: balance;
}

.register-hero-title {
  max-width: none;
  font-size: clamp(2.1rem, 3.45vw, 3.6rem);
  text-wrap: unset;
  line-height: 0.94;
}

.register-hero-line {
  display: block;
  white-space: nowrap;
}

.login-hero-title {
  max-width: none;
  font-size: clamp(1.48rem, 2.08vw, 2.3rem);
  text-wrap: unset;
  line-height: 0.94;
}

.login-hero-line {
  display: block;
  white-space: nowrap;
  width: max-content;
  max-width: 100%;
}

.login-page .login-switcher-panel {
  max-width: 540px;
  width: 100%;
  justify-self: end;
}

.register-page .panel-register-wide {
  max-width: 100%;
}

.hero-tail {
  white-space: nowrap;
}

.workspace-header h1 {
  font-size: clamp(2.6rem, 5vw, 4.8rem);
  margin: 16px 0 0;
}

.auth-copy p,
.table-card p,
.panel p,
.admin-spotlight p,
.notification-card p,
.empty-card p {
  color: var(--text-soft);
  line-height: 1.7;
}

.bullet-grid,
.summary-grid,
.promo-grid,
.dashboard-grid,
.admin-grid {
  display: grid;
  gap: 18px;
}

.bullet-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 24px;
}

.bullet-card,
.panel,
.summary-card,
.promo-card,
.table-card,
.notification-card,
.admin-spotlight,
.empty-card,
.incoming-banner {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
    var(--panel);
  backdrop-filter: blur(16px);
}

.bullet-card,
.panel,
.summary-card,
.promo-card,
.table-card,
.notification-card,
.admin-spotlight,
.empty-card {
  padding: 24px;
}

.bullet-card strong,
.summary-card strong,
.promo-card strong {
  display: block;
  font-size: 1.35rem;
  margin-bottom: 8px;
}

.bullet-card span,
.summary-card span,
.muted {
  color: var(--text-dim);
}

.auth-panels {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.auth-panels-single {
  grid-template-columns: 1fr;
}

.login-switcher-panel {
  max-width: 680px;
}

.role-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}

.role-switch__button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  transition:
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.role-switch__button.is-active {
  background: linear-gradient(135deg, rgba(255, 245, 224, 0.95), rgba(207, 183, 127, 0.95));
  color: #131111;
}

.role-form {
  margin-top: 18px;
}

.panel-register-wide {
  max-width: 620px;
}

.panel-kicker {
  display: inline-flex;
  color: var(--accent-deep);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.panel h2,
.table-head h2 {
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  margin: 14px 0 0;
}

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

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

.stack-form span {
  color: var(--text-soft);
  font-size: 0.92rem;
}

.stack-form input:not([type="checkbox"]),
.input,
table input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  color: var(--text);
  outline: none;
}

.stack-form input:not([type="checkbox"])::placeholder,
.input::placeholder {
  color: var(--text-dim);
}

.consent-check {
  display: flex !important;
  align-items: flex-start;
  gap: 12px;
  margin-top: 4px;
}

.consent-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--accent-deep);
  flex: 0 0 auto;
}

.consent-check__text {
  color: var(--text-soft);
  line-height: 1.65;
  font-size: 0.92rem;
}

.consent-check__text a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(255, 244, 225, 0.34);
  text-underline-offset: 0.2em;
}

.credentials-note {
  display: grid;
  gap: 8px;
  margin-top: 20px;
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 241, 220, 0.16);
  background: rgba(255, 241, 220, 0.06);
}

.credentials-note span {
  color: var(--text-dim);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.panel-link-line {
  margin-top: 18px;
}

.panel-link-line a {
  color: var(--accent);
}

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

.pill,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-soft);
  border: 1px solid var(--line);
  font-size: 0.85rem;
}

.summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 24px;
}

.dashboard-grid {
  grid-template-columns: 1.15fr 0.85fr;
  margin-top: 18px;
}

.admin-grid {
  grid-template-columns: 0.85fr 1.15fr;
  margin-top: 18px;
}

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

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

.dashboard-grid > *,
.admin-grid > *,
.summary-grid > * {
  min-width: 0;
}

.promo-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

.summary-card strong {
  font-size: 1.65rem;
}

.table-head,
.promo-card-head,
.promo-share-row,
.notification-head,
.admin-spotlight-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.table-head > div,
.admin-spotlight-head > div,
.promo-card-head > div,
.notification-head > div {
  min-width: 0;
  flex: 1 1 320px;
}

.table-head h2,
.admin-spotlight h3 {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.table-card,
.admin-spotlight {
  min-width: 0;
}

.admin-workspace .table-card,
.admin-workspace .admin-spotlight {
  padding: 28px 30px;
}

.admin-workspace .table-head,
.admin-workspace .admin-spotlight-head {
  margin-bottom: 6px;
}

.admin-workspace .table-head .tag,
.admin-workspace .admin-spotlight-head .tag {
  flex: 0 1 auto;
  max-width: 100%;
}

.tag-wrap {
  white-space: normal;
  word-break: break-word;
  text-align: left;
}

.admin-card-form .button[type="submit"] {
  width: 100%;
}

.admin-card-spotlight {
  align-content: start;
}

.admin-card-users .table-wrap,
.admin-grid-bottom .table-wrap {
  margin-top: 20px;
}

.incoming-banner {
  margin-top: 20px;
  padding: 18px 20px;
}

.promo-code {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.promo-share-row {
  flex-wrap: wrap;
  margin-top: 18px;
}

.icon-button {
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
}

.icon-button.primary {
  background: linear-gradient(135deg, rgba(255, 245, 224, 0.95), rgba(207, 183, 127, 0.95));
  color: #111;
  border-color: transparent;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 18px;
}

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

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(255, 241, 220, 0.08);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--text-dim);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

table input {
  min-width: 120px;
}

.notification-stack {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.notification-card h4,
.admin-spotlight h3 {
  margin: 0 0 8px;
}

.empty-card {
  text-align: center;
  padding: 48px 24px;
}

.toast-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: grid;
  gap: 10px;
  z-index: 40;
}

.toast {
  min-width: 260px;
  max-width: 360px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 241, 220, 0.18);
  background: rgba(17, 15, 15, 0.94);
  color: var(--text);
  box-shadow: var(--shadow);
}

.toast strong {
  display: block;
  margin-bottom: 6px;
}

.policy-layout {
  width: var(--container);
  margin: 0 auto;
  padding: 36px 0 40px;
}

.policy-hero {
  display: grid;
  gap: 16px;
  max-width: 860px;
}

.policy-hero h1,
.policy-section h2 {
  font-family: "Cormorant Garamond", serif;
  letter-spacing: -0.03em;
  color: var(--text);
}

.policy-hero h1 {
  font-size: clamp(2.6rem, 5vw, 4.5rem);
  line-height: 0.94;
  margin: 0;
}

.policy-hero p,
.policy-section p,
.policy-section li {
  color: var(--text-soft);
  line-height: 1.75;
}

.policy-sheet {
  margin-top: 28px;
  padding: 34px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
    var(--panel);
  backdrop-filter: blur(16px);
}

.policy-section + .policy-section {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 241, 220, 0.08);
}

.policy-section h2 {
  margin: 0 0 16px;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 0.98;
}

.policy-section p {
  margin: 0 0 14px;
}

.policy-section ul {
  margin: 0;
  padding-left: 22px;
}

.policy-section a,
.policy-hero a,
.site-footer__link {
  color: var(--accent);
}

.site-footer {
  width: var(--container);
  margin: 0 auto 26px;
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 13, 13, 0.7);
  color: var(--text-dim);
}

.site-footer__link {
  text-decoration: underline;
  text-decoration-color: rgba(243, 238, 210, 0.36);
  text-underline-offset: 0.18em;
}

.reveal {
  opacity: 1;
  transform: none;
}

@media (max-width: 1180px) {
  .topbar,
  .auth-layout,
  .workspace-layout {
    width: calc(100vw - 24px);
  }

  .auth-stage,
  .summary-grid,
  .dashboard-grid,
  .admin-grid,
  .admin-grid-top,
  .admin-grid-bottom,
  .promo-grid,
  .bullet-grid {
    grid-template-columns: 1fr 1fr;
  }

  .admin-workspace .table-card,
  .admin-workspace .admin-spotlight {
    padding: 24px;
  }
}

@media (max-width: 760px) {
  .topbar,
  .auth-layout,
  .workspace-layout {
    width: calc(100vw - 24px);
  }

  .topbar,
  .topbar-nav,
  .topbar-actions,
  .table-head,
  .promo-card-head,
  .promo-share-row,
  .notification-head,
  .admin-spotlight-head {
    flex-direction: column;
    align-items: stretch;
  }

  .auth-stage,
  .summary-grid,
  .dashboard-grid,
  .admin-grid,
  .admin-grid-top,
  .admin-grid-bottom,
  .promo-grid,
  .bullet-grid {
    grid-template-columns: 1fr;
  }

  .admin-workspace .table-card,
  .admin-workspace .admin-spotlight {
    padding: 22px 18px;
  }

  .auth-stage {
    min-height: auto;
    padding: 20px 0;
  }

  .register-page .auth-stage {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .login-page .auth-stage {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .role-switch {
    width: 100%;
  }

  .auth-copy h1 {
    font-size: clamp(2.45rem, 11vw, 3.6rem);
    max-width: 100%;
  }

  .register-hero-title {
    max-width: 100%;
    font-size: clamp(2.45rem, 11vw, 3.6rem);
  }

  .register-hero-line {
    white-space: normal;
  }

  .login-hero-title {
    max-width: 100%;
    font-size: clamp(2.45rem, 11vw, 3.6rem);
  }

  .hero-tail {
    white-space: normal;
  }

  .brand {
    flex-wrap: wrap;
  }

  .policy-sheet {
    padding: 24px 18px;
  }

  table {
    min-width: 620px;
  }

  .admin-workspace .table-head > div,
  .admin-workspace .admin-spotlight-head > div {
    flex-basis: 100%;
  }
}
