:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #617086;
  --soft: #f5f7fb;
  --paper: #ffffff;
  --line: #d9e0ea;
  --navy: #172033;
  --teal: #047c82;
  --teal-soft: #e7f7f6;
  --amber: #b56b00;
  --amber-soft: #fff3dc;
  --rose: #b3445b;
  --green: #217b54;
  --shadow: 0 22px 55px rgba(23, 32, 51, 0.14);
  --shadow-soft: 0 10px 28px rgba(23, 32, 51, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: var(--soft);
  color: var(--ink);
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
  transform: none;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(115deg, rgba(23, 32, 51, 0.78), rgba(4, 124, 130, 0.54)),
    url("https://images.unsplash.com/photo-1516321318423-f06f85e504b3?auto=format&fit=crop&w=1800&q=80")
      center/cover;
}

.login-shell {
  width: min(1120px, 100%);
  min-height: 690px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  overflow: hidden;
  background: var(--paper);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.brand-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
  padding: clamp(32px, 5vw, 64px);
  color: #fff;
  background:
    linear-gradient(rgba(23, 32, 51, 0.88), rgba(23, 32, 51, 0.82)),
    url("https://images.unsplash.com/photo-1551836022-d5d88e9218df?auto=format&fit=crop&w=1200&q=80")
      center/cover;
}

.badge {
  width: fit-content;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.88rem;
  font-weight: 700;
}

.brand-panel h1 {
  max-width: 620px;
  margin: 0;
  font-size: clamp(2.5rem, 5vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.brand-panel p {
  max-width: 620px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.08rem;
  line-height: 1.7;
}

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

.feature-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  align-items: start;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.feature-icon,
.section-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--teal-soft);
  font-size: 1.32rem;
}

.text-icon {
  color: #035f65;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
}

.feature-item h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.feature-item p {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.92rem;
  line-height: 1.45;
}

.auth-panel {
  display: grid;
  align-content: center;
  padding: clamp(28px, 5vw, 60px);
  background: #fbfcff;
}

.auth-card {
  width: min(420px, 100%);
  margin: 0 auto;
}

.auth-card h2 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 4vw, 3rem);
}

.auth-card > p {
  margin: 0 0 30px;
  color: var(--muted);
  line-height: 1.55;
}

.form-field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.form-field label {
  color: #39475c;
  font-size: 0.92rem;
  font-weight: 700;
}

.form-field input,
.form-field textarea {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.form-field textarea {
  min-height: 110px;
  padding: 14px 16px;
  line-height: 1.5;
  resize: vertical;
}

.form-field select,
td select,
td input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.form-field select {
  min-height: 54px;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus,
td select:focus,
td input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(4, 124, 130, 0.16);
}

.button-row {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

.button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 800;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

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

.button-primary {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 12px 24px rgba(23, 32, 51, 0.2);
}

.button-secondary {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}

.button-accent {
  background: var(--teal);
  color: #fff;
}

.compact {
  min-height: 40px;
  padding: 0 13px;
}

.helper-text {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.full-width {
  width: 100%;
}

.helper-copy,
.status-line,
.session-label {
  color: var(--muted);
}

.session-label {
  font-size: 0.92rem;
  font-weight: 700;
}

.app-screen {
  min-height: 100vh;
  background:
    linear-gradient(180deg, #eef7f7 0, #f6f8fb 360px),
    var(--soft);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid rgba(217, 224, 234, 0.8);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ghost-button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.link-clean {
  color: inherit;
  text-decoration: none;
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.page-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.page-links a,
.footer a {
  color: var(--teal);
  font-weight: 800;
  text-decoration: none;
}

.page-links a:hover,
.footer a:hover {
  text-decoration: underline;
}

.page-links.stacked {
  justify-content: center;
  margin-top: 18px;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 56px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 26px;
}

.hero-copy {
  padding: clamp(28px, 5vw, 48px);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.82)),
    url("https://images.unsplash.com/photo-1588072432836-e10032774350?auto=format&fit=crop&w=1600&q=80")
      center/cover;
  box-shadow: var(--shadow-soft);
}

.eyebrow {
  width: fit-content;
  margin: 0 0 16px;
  border-radius: 999px;
  padding: 7px 12px;
  background: var(--teal-soft);
  color: #035f65;
  font-size: 0.84rem;
  font-weight: 900;
}

.hero h1 {
  max-width: 780px;
  margin: 0 0 14px;
  font-size: clamp(2.15rem, 4.5vw, 4.1rem);
  line-height: 1;
  letter-spacing: 0;
}

.hero p {
  max-width: 720px;
  margin: 0;
  color: #4f5d72;
  font-size: 1.08rem;
  line-height: 1.65;
}

.status-card {
  display: grid;
  align-content: space-between;
  gap: 24px;
  padding: 26px;
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.status-card h2,
.panel h2,
.guide-card h2,
.setup-card h2,
.subscription h2 {
  margin: 0;
  letter-spacing: 0;
}

.progress-ring {
  width: 150px;
  height: 150px;
  margin: 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--teal) var(--progress), #e3e9f2 0);
}

.progress-ring span {
  display: grid;
  place-items: center;
  width: 116px;
  height: 116px;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 2rem;
  font-weight: 900;
}

.subscription {
  margin-bottom: 26px;
  border: 1px solid #f1d5aa;
  border-radius: 8px;
  padding: 24px;
  background: var(--amber-soft);
  box-shadow: var(--shadow-soft);
}

.subscription-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 20px;
  align-items: center;
}

.subscription p {
  margin: 10px 0 0;
  color: #5f4b2d;
  line-height: 1.58;
}

.price-card {
  border-radius: 8px;
  padding: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.price {
  font-size: 2.5rem;
  font-weight: 900;
}

.price-note {
  margin: 2px 0 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

.alerts-grid,
.sections-grid,
.platform-grid,
.checklist-grid {
  display: grid;
  gap: 16px;
}

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

.alert-card,
.section-card,
.guide-card,
.setup-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.alert-card {
  padding: 16px;
}

.alert-card h3 {
  margin: 0 0 7px;
  font-size: 1rem;
}

.alert-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.sections-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 26px;
}

.section-card {
  padding: 20px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.section-title h2 {
  margin: 0;
  font-size: 1.2rem;
}

.steps-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps-list li {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  align-items: start;
  min-height: 46px;
  padding: 10px;
  border-radius: 8px;
  background: #f7f9fc;
  color: #425069;
  line-height: 1.42;
}

.step-number {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 900;
}

.setup-card {
  padding: 24px;
  margin-bottom: 26px;
}

.setup-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.setup-header p {
  margin: 8px 0 0;
  color: var(--muted);
}

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

.check-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #f7f9fc;
}

.check-item:has(input:checked) {
  border-color: rgba(33, 123, 84, 0.35);
  background: #edf8f1;
}

.check-item input {
  width: 20px;
  height: 20px;
  accent-color: var(--green);
}

.platform-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 26px;
}

.guide-card {
  padding: 24px;
}

.guide-card h2 {
  margin-bottom: 20px;
  font-size: 1.45rem;
}

.guide-block + .guide-block {
  margin-top: 22px;
}

.guide-block h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.guide-block ol {
  margin: 0;
  padding-left: 22px;
  color: #46546a;
  line-height: 1.62;
}

.footer {
  padding: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

.admin-container {
  display: grid;
  gap: 22px;
}

.admin-hero {
  padding: clamp(28px, 5vw, 46px);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.84)),
    url("https://images.unsplash.com/photo-1554224155-6726b3ff858f?auto=format&fit=crop&w=1600&q=80")
      center/cover;
  box-shadow: var(--shadow-soft);
}

.admin-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(2.2rem, 4vw, 4rem);
  line-height: 1;
}

.admin-hero p:not(.eyebrow) {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

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

.metric-card {
  display: grid;
  gap: 10px;
  min-height: 118px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.metric-card span {
  color: var(--muted);
  font-weight: 800;
}

.metric-card strong {
  font-size: clamp(1.7rem, 3vw, 2.6rem);
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.6fr);
  gap: 18px;
}

.admin-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.panel-header h2 {
  margin: 0;
  font-size: 1.2rem;
}

.admin-form {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.content-form {
  max-height: 760px;
  overflow: auto;
}

.panel-note {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.stripe-help {
  display: grid;
  gap: 8px;
  padding: 18px 20px;
  color: #3d4b61;
}

.stripe-help p {
  margin: 0;
}

.stripe-help code {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 6px;
  background: #f8fafc;
}

.page-list {
  display: grid;
  gap: 14px;
  padding: 0 20px 20px;
}

.page-edit {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.page-edit-actions {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}

.public-page {
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 54px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.public-page h1 {
  margin: 0 0 18px;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1;
}

.page-body {
  color: #405069;
  font-size: 1.05rem;
  line-height: 1.7;
}

.page-body p {
  margin: 0 0 18px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

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

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: #3b485c;
  background: #f8fafc;
  font-size: 0.82rem;
  text-transform: uppercase;
}

td {
  color: #344158;
  font-size: 0.92rem;
}

tr:last-child td {
  border-bottom: 0;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 20;
  max-width: min(360px, calc(100% - 40px));
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  box-shadow: var(--shadow);
  transform: translateY(16px);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

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

@media (max-width: 900px) {
  .login-shell,
  .hero,
  .subscription-top,
  .platform-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .brand-panel {
    min-height: 520px;
  }

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

@media (max-width: 620px) {
  .login-screen {
    padding: 0;
  }

  .login-shell {
    min-height: 100vh;
    border-radius: 0;
  }

  .brand-panel {
    min-height: auto;
  }

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

  .topbar-actions {
    width: 100%;
  }

  .page-links {
    align-items: flex-start;
  }

  .topbar-actions .ghost-button,
  .topbar-actions .button {
    flex: 1;
  }

  .sections-grid,
  .alerts-grid,
  .metric-grid,
  .checklist-grid {
    grid-template-columns: 1fr;
  }

  .setup-header {
    flex-direction: column;
  }

  .page-edit-actions {
    grid-template-columns: 1fr;
  }
}
