:root {
  --teal: #0d9488;
  --teal-dark: #0f766e;
  --teal-soft: rgba(13, 148, 136, 0.14);
  --ink: #0b1220;
  --muted: #5b6b7c;
  --line: #e6ebf1;
  --bg: #f4f7fa;
  --white: #ffffff;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.1);
  --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.06);
  --radius: 18px;
  --font: "DM Sans", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box
}

html {
  scroll-behavior: smooth
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased
}

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

a:hover {
  text-decoration: underline
}

img {
  max-width: 100%;
  display: block
}

code {
  font-size: .88em;
  background: var(--bg);
  padding: .12em .4em;
  border-radius: 6px
}

.container {
  width: min(1140px, 92%);
  margin: 0 auto
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  border: none;
  border-radius: 999px;
  padding: .85rem 1.45rem;
  font-weight: 700;
  font-size: .95rem;
  font-family: inherit;
  cursor: pointer;
  transition: .18s ease;
  text-decoration: none;
  letter-spacing: -.01em
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm)
}

.btn-primary {
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  color: #fff;
  box-shadow: 0 10px 28px rgba(13, 148, 136, .28)
}

.btn-primary:hover {
  filter: brightness(1.05)
}

.btn-ghost {
  background: rgba(255, 255, 255, .7);
  color: var(--ink);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px)
}

.btn-ghost:hover {
  border-color: var(--teal);
  color: var(--teal)
}

.btn-dark {
  background: var(--ink);
  color: #fff
}

.btn-sm {
  padding: .48rem 1rem;
  font-size: .85rem
}

.btn:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid rgba(230, 235, 241, .9)
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 1rem
}

.logo {
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--ink);
  letter-spacing: -.04em;
  text-decoration: none
}

.logo span {
  color: var(--teal)
}

.nav-links {
  display: flex;
  gap: 1.35rem;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0
}

.nav-links a {
  color: var(--muted);
  font-weight: 600;
  font-size: .92rem;
  text-decoration: none
}

.nav-links a:hover {
  color: var(--teal)
}

.nav-actions {
  display: flex;
  gap: .55rem;
  align-items: center;
  flex-wrap: wrap
}

.partner-pill {
  display: none;
  align-items: center;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-size: .75rem;
  font-weight: 800;
  padding: .35rem .75rem;
  border-radius: 999px;
  letter-spacing: .02em
}

.partner-pill.show {
  display: inline-flex
}

.hero {
  position: relative;
  padding: 5rem 0 4rem;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 70% at 85% -20%, var(--teal-soft), transparent 55%),
    radial-gradient(ellipse 50% 40% at 10% 100%, rgba(15, 23, 42, .04), transparent),
    linear-gradient(180deg, #fff 0%, #f8fafc 100%)
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -20% -40% auto;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--teal-soft), transparent 70%);
  pointer-events: none
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .95fr;
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 1
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--teal-dark);
  font-size: .78rem;
  font-weight: 800;
  padding: .4rem .85rem;
  border-radius: 999px;
  margin-bottom: 1.1rem;
  box-shadow: var(--shadow-sm);
  text-transform: uppercase;
  letter-spacing: .04em
}

.hero h1 {
  font-size: clamp(2.15rem, 4.6vw, 3.35rem);
  line-height: 1.08;
  letter-spacing: -.035em;
  margin: 0 0 1.1rem
}

.hero .lead {
  color: var(--muted);
  font-size: 1.12rem;
  margin: 0 0 1.6rem;
  max-width: 34rem
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-bottom: 1.35rem
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  background: var(--ink);
  color: #fff;
  border-radius: 14px;
  padding: .72rem 1.05rem;
  text-decoration: none;
  min-width: 168px;
  box-shadow: var(--shadow-sm)
}

.store-btn:hover {
  text-decoration: none;
  transform: translateY(-2px)
}

.store-btn small {
  display: block;
  font-size: .66rem;
  opacity: .72;
  font-weight: 500
}

.store-btn strong {
  display: block;
  font-size: .95rem;
  letter-spacing: -.02em
}

.hero-card {
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(230, 235, 241, .95);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 1.5rem;
  backdrop-filter: blur(10px)
}

.hero-card h3 {
  margin: 0 0 .9rem;
  font-size: 1.02rem;
  letter-spacing: -.02em
}

.role-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: 1rem
}

.role-tab {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 999px;
  padding: .4rem .8rem;
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  color: var(--muted);
  transition: .15s
}

.role-tab.active {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
  box-shadow: 0 6px 16px rgba(13, 148, 136, .25)
}

.role-panel {
  display: none;
  color: var(--muted);
  font-size: .94rem
}

.role-panel.active {
  display: block;
  animation: fadeIn .25s ease
}

.role-panel ul {
  margin: .55rem 0 0;
  padding-left: 1.15rem
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px)
  }

  to {
    opacity: 1;
    transform: none
  }
}

section {
  padding: 4.5rem 0
}

section.alt {
  background: linear-gradient(180deg, var(--bg), #eef3f7)
}

.section-head {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 2.6rem
}

.section-head h2 {
  margin: 0 0 .55rem;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  letter-spacing: -.03em
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: 0 1px 0 rgba(15, 23, 42, .02);
  transition: .2s ease
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
  border-color: rgba(13, 148, 136, .25)
}

.card .icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  display: grid;
  place-items: center;
  font-weight: 800;
  margin-bottom: .85rem;
  font-size: .95rem
}

.card h3 {
  margin: 0 0 .4rem;
  font-size: 1.08rem;
  letter-spacing: -.02em
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: .95rem
}

.audience {
  border-top: 3px solid var(--teal)
}

.step .num {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  margin-bottom: .8rem;
  box-shadow: 0 8px 18px rgba(13, 148, 136, .3)
}

.download-band {
  background: linear-gradient(135deg, var(--teal-dark), var(--teal));
  color: #fff;
  border-radius: 28px;
  padding: 2.75rem;
  display: grid;
  grid-template-columns: 1.2fr .85fr;
  gap: 1.75rem;
  align-items: center;
  box-shadow: 0 24px 60px rgba(13, 148, 136, .28);
  position: relative;
  overflow: hidden
}

.download-band::before {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  right: -60px;
  top: -80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08)
}

.download-band h2 {
  margin: 0 0 .45rem;
  color: #fff;
  position: relative
}

.download-band p {
  margin: 0 0 1.1rem;
  opacity: .93;
  position: relative
}

.download-band .store-btn {
  background: #fff;
  color: var(--ink)
}

.cta-band {
  background: var(--ink);
  color: #fff;
  border-radius: 28px;
  padding: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow)
}

.cta-band h2 {
  margin: 0 0 .35rem;
  color: #fff
}

.cta-band p {
  margin: 0;
  opacity: .85
}

.page-hero {
  padding: 3.5rem 0 1.5rem;
  background: radial-gradient(ellipse 70% 80% at 50% -30%, var(--teal-soft), transparent)
}

.page-hero h1 {
  margin: 0 0 .6rem;
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
  letter-spacing: -.03em
}

.page-hero p {
  margin: 0;
  color: var(--muted);
  max-width: 40rem;
  font-size: 1.08rem
}

.form-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1.65rem;
  box-shadow: var(--shadow)
}

.field {
  margin-bottom: 1rem
}

.field label {
  display: block;
  font-size: .84rem;
  font-weight: 700;
  margin-bottom: .35rem
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: .72rem .9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
  background: var(--white);
  transition: .15s
}

.field textarea {
  min-height: 110px;
  resize: vertical
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--teal-soft);
  border-color: var(--teal)
}

.alert {
  padding: .8rem .95rem;
  border-radius: 12px;
  font-size: .9rem;
  margin-bottom: 1rem
}

.alert-error {
  background: #fee2e2;
  color: #991b1b
}

.alert-ok {
  background: #dcfce7;
  color: #166534
}

.checklist {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--muted)
}

.checklist li {
  margin-bottom: .5rem
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.75rem 0;
  color: var(--muted);
  font-size: .9rem;
  background: #fafcfd
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 1.5rem
}

.footer-grid h4 {
  margin: 0 0 .65rem;
  color: var(--ink);
  font-size: .88rem;
  letter-spacing: .02em;
  text-transform: uppercase
}

.footer-grid a {
  display: block;
  color: var(--muted);
  margin-bottom: .4rem;
  text-decoration: none;
  font-weight: 500
}

.footer-grid a:hover {
  color: var(--teal)
}

/* Admin */
body.admin-body {
  background: var(--bg);
  min-height: 100vh
}

.admin-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh
}

.sidebar {
  background: linear-gradient(180deg, #0b1220, #111827);
  color: #e2e8f0;
  padding: 1.35rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.4rem
}

.sidebar .logo {
  color: #fff;
  padding: 0 .55rem
}

.sidebar .nav-section {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #64748b;
  padding: .5rem .75rem .25rem;
  font-weight: 700
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: .2rem
}

.sidebar a {
  color: #94a3b8;
  text-decoration: none;
  padding: .68rem .8rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: .9rem
}

.sidebar a:hover,
.sidebar a.active {
  background: rgba(255, 255, 255, .08);
  color: #fff;
  text-decoration: none
}

.sidebar .side-foot {
  margin-top: auto;
  padding: .55rem;
  font-size: .78rem;
  color: #64748b
}

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

.admin-top {
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: .9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 20
}

.admin-content {
  padding: 1.5rem
}

.page-title {
  margin: 0 0 .25rem;
  font-size: 1.45rem;
  letter-spacing: -.02em
}

.page-sub {
  margin: 0 0 1.3rem;
  color: var(--muted);
  font-size: .95rem
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem
}

.kpi {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.15rem;
  box-shadow: var(--shadow-sm)
}

.kpi label {
  display: block;
  font-size: .78rem;
  color: var(--muted);
  margin-bottom: .35rem;
  font-weight: 600
}

.kpi strong {
  font-size: 1.4rem;
  letter-spacing: -.02em
}

.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm)
}

.panel-head {
  padding: .95rem 1.15rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem
}

.panel-head h3 {
  margin: 0;
  font-size: 1rem
}

.table-wrap {
  overflow-x: auto
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem
}

table.data th,
table.data td {
  text-align: left;
  padding: .8rem 1.1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top
}

table.data th {
  color: var(--muted);
  font-weight: 700;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  background: #f8fafc
}

.badge-soft {
  display: inline-block;
  padding: .22rem .55rem;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 700;
  background: var(--teal-soft);
  color: var(--teal-dark)
}

.badge-warn {
  background: #fef3c7;
  color: #b45309
}

.badge-danger {
  background: #fee2e2;
  color: #b91c1c
}

.empty-state {
  text-align: center;
  padding: 2.2rem 1rem;
  color: var(--muted)
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, var(--teal-soft), transparent), var(--bg);
  padding: 1.5rem
}

.auth-card {
  width: min(440px, 100%);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 2.1rem
}

.auth-card h1 {
  margin: 0 0 .35rem;
  font-size: 1.4rem;
  letter-spacing: -.02em
}

.auth-card .sub {
  color: var(--muted);
  margin: 0 0 1.35rem;
  font-size: .95rem
}

.tabs {
  display: flex;
  gap: .4rem;
  margin-bottom: 1.2rem;
  background: var(--bg);
  padding: .3rem;
  border-radius: 12px
}

.tabs button {
  flex: 1;
  border: none;
  background: transparent;
  padding: .55rem;
  border-radius: 10px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  color: var(--muted)
}

.tabs button.active {
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow-sm)
}

.muted {
  color: var(--muted)
}

.hidden {
  display: none !important
}

@media (max-width:960px) {

  .hero-grid,
  .grid-2,
  .grid-3,
  .grid-4,
  .download-band,
  .footer-grid,
  .kpi-grid {
    grid-template-columns: 1fr
  }

  .nav-links {
    display: none
  }

  .admin-shell {
    grid-template-columns: 1fr
  }

  .sidebar {
    flex-direction: row;
    flex-wrap: wrap
  }

  .sidebar nav {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%
  }
}

.partner-card {
  display: block;
  height: 100%
}

.partner-card:hover {
  border-color: var(--teal)
}


/* ── Theme tokens (light default) ── */
:root {
  --surface: #ffffff;
  --surface-2: #f4f7fa;
  --text: #0b1220;
  --text-muted: #5b6b7c;
  --border: #e6ebf1;
  --sidebar-bg: #0b1220;
  --sidebar-text: #94a3b8;
  --sidebar-active: #fff;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --ok: #059669;
  --ok-soft: #ecfdf5;
  --warn: #d97706;
  --warn-soft: #fffbeb;
}

html[data-theme="dark"] {
  --teal: #2dd4bf;
  --teal-dark: #14b8a6;
  --teal-soft: rgba(45, 212, 191, 0.15);
  --ink: #e8eef5;
  --muted: #94a3b8;
  --line: #1e293b;
  --bg: #0b1220;
  --white: #111827;
  --surface: #111827;
  --surface-2: #0b1220;
  --text: #e8eef5;
  --text-muted: #94a3b8;
  --border: #1e293b;
  --sidebar-bg: #020617;
  --sidebar-text: #64748b;
  --sidebar-active: #f1f5f9;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.3);
  --danger-soft: #450a0a;
  --ok-soft: #052e1c;
  --warn-soft: #422006;
}

html[data-theme="dark"] body {
  background: var(--bg);
  color: var(--text);
}

html[data-theme="dark"] .site-header {
  background: rgba(11, 18, 32, 0.9);
  border-color: var(--border);
}

html[data-theme="dark"] .btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .auth-card {
  background: var(--surface);
  border-color: var(--border);
}

html[data-theme="dark"] .admin-top {
  background: var(--surface);
  border-color: var(--border);
}

html[data-theme="dark"] .admin-main {
  background: var(--surface-2);
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background: #0f172a;
  color: var(--text);
  border-color: var(--border);
}

html[data-theme="dark"] .table th {
  background: #0f172a;
}

html[data-theme="dark"] .table td {
  border-color: var(--border);
}

html[data-theme="dark"] .kpi {
  background: var(--surface);
  border-color: var(--border);
}

.hidden {
  display: none !important;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1rem;
}

.theme-toggle:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.admin-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar .logo {
  color: #fff;
  margin-bottom: 1.25rem;
  padding: 0 0.5rem;
}

.sidebar .nav-section {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin: 1rem 0.5rem 0.4rem;
}

.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--sidebar-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  transition: 0.15s;
}

.sidebar nav a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  text-decoration: none;
}

.sidebar nav a.active {
  background: rgba(13, 148, 136, 0.2);
  color: #5eead4;
}

.sidebar .side-foot {
  margin-top: auto;
  padding: 1rem 0.5rem 0.25rem;
  font-size: 0.8rem;
  color: #64748b;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg);
}

.admin-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.5rem;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
}

.admin-content {
  padding: 1.5rem;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
}

.page-title {
  margin: 0 0 0.25rem;
  font-size: 1.55rem;
  letter-spacing: -0.03em;
}

.page-sub {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.kpi {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.1rem;
}

.kpi label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kpi strong {
  display: block;
  font-size: 1.35rem;
  margin-top: 0.25rem;
  letter-spacing: -0.02em;
}

.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--line);
}

.panel-head h3 {
  margin: 0;
  font-size: 0.98rem;
  letter-spacing: -0.02em;
}

.panel-body {
  padding: 1.1rem;
}

.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.table th {
  text-align: left;
  padding: 0.7rem 1rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.table tr:last-child td {
  border-bottom: none;
}

.table tr:hover td {
  background: rgba(13, 148, 136, 0.04);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: capitalize;
}

.badge-ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.badge-warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.badge-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.badge-muted {
  background: var(--bg);
  color: var(--muted);
}

.badge-soft {
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 1rem;
}

.toolbar .search {
  flex: 1;
  min-width: 180px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem 0.85rem;
  font-family: inherit;
  font-size: 0.9rem;
  background: var(--white);
  color: var(--ink);
}

.field {
  margin-bottom: 0.9rem;
}

.field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  font-family: inherit;
  font-size: 0.92rem;
  background: var(--white);
  color: var(--ink);
}

.field textarea {
  min-height: 90px;
  resize: vertical;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

@media (max-width: 700px) {
  .field-row {
    grid-template-columns: 1fr;
  }
}

.alert {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.alert-error {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.alert-ok {
  background: var(--ok-soft);
  color: var(--ok);
  border: 1px solid rgba(5, 150, 105, 0.2);
}

.alert-info {
  background: var(--teal-soft);
  color: var(--teal-dark);
  border: 1px solid rgba(13, 148, 136, 0.2);
}

.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal {
  background: var(--white);
  border-radius: 18px;
  width: min(520px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--line);
}

.modal-head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.modal-body {
  padding: 1.2rem;
}

.modal-foot {
  padding: 0.9rem 1.2rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  filter: brightness(1.05);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: radial-gradient(ellipse 80% 60% at 70% -10%, var(--teal-soft), transparent), var(--bg);
}

.auth-card {
  width: min(420px, 100%);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.auth-card h1 {
  font-size: 1.4rem;
  margin: 0;
  letter-spacing: -0.03em;
}

.auth-card .sub {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0.4rem 0 1.2rem;
}

.tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1.1rem;
  background: var(--bg);
  padding: 0.3rem;
  border-radius: 12px;
}

.tabs button {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.55rem;
  border-radius: 9px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
  color: var(--muted);
}

.tabs button.active {
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

html[data-theme="dark"] .tabs button.active {
  background: #1e293b;
  color: var(--text);
}

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

  .sidebar {
    position: relative;
    height: auto;
  }
}

/* ── Partner hosted helpers ── */
.powered-by a {
  font-weight: 700;
}

.footer-bottom {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  color: var(--muted);
}

/* ── Public site dark theme completeness ── */
html[data-theme="dark"] {
  color-scheme: dark;
}

html[data-theme="dark"] body {
  background: var(--bg);
  color: var(--ink);
}

html[data-theme="dark"] .site-header {
  background: rgba(11, 18, 32, 0.92);
  border-bottom-color: var(--line);
}

html[data-theme="dark"] .logo {
  color: var(--ink);
}

html[data-theme="dark"] .nav-links a {
  color: var(--muted);
}

html[data-theme="dark"] .nav-links a:hover {
  color: var(--teal);
}

html[data-theme="dark"] .hero {
  background:
    radial-gradient(ellipse 90% 70% at 85% -20%, var(--teal-soft), transparent 55%),
    linear-gradient(180deg, #0b1220 0%, #111827 100%);
}

html[data-theme="dark"] .hero h1,
html[data-theme="dark"] .section-head h2,
html[data-theme="dark"] .page-title {
  color: var(--ink);
}

html[data-theme="dark"] .lead,
html[data-theme="dark"] .section-head p {
  color: var(--muted);
}

html[data-theme="dark"] .eyebrow {
  background: var(--white);
  border-color: var(--line);
  color: var(--teal);
}

html[data-theme="dark"] .hero-card {
  background: rgba(17, 24, 39, 0.95);
  border-color: var(--line);
  color: var(--ink);
}

html[data-theme="dark"] .hero-card h3 {
  color: var(--ink);
}

html[data-theme="dark"] .role-tab {
  background: #0f172a;
  border-color: var(--line);
  color: var(--muted);
}

html[data-theme="dark"] .role-tab.active {
  background: var(--teal);
  border-color: var(--teal);
  color: #0b1220;
}

html[data-theme="dark"] .role-panel {
  color: var(--muted);
}

html[data-theme="dark"] section.alt {
  background: linear-gradient(180deg, #0b1220, #0f172a);
}

html[data-theme="dark"] .card {
  background: var(--white);
  border-color: var(--line);
  color: var(--ink);
}

html[data-theme="dark"] .card:hover {
  border-color: var(--teal);
}

html[data-theme="dark"] .card h3 {
  color: var(--ink);
}

html[data-theme="dark"] .card p {
  color: var(--muted);
}

html[data-theme="dark"] .card .icon {
  background: var(--teal-soft);
  color: var(--teal);
}

html[data-theme="dark"] .site-footer {
  background: #0b1220;
  border-top-color: var(--line);
  color: var(--muted);
}

html[data-theme="dark"] .site-footer h4 {
  color: var(--ink);
}

html[data-theme="dark"] .site-footer a {
  color: var(--muted);
}

html[data-theme="dark"] .site-footer a:hover {
  color: var(--teal);
}

html[data-theme="dark"] .footer-bottom {
  border-top-color: var(--line);
}

html[data-theme="dark"] .store-btn {
  background: #1e293b;
}

html[data-theme="dark"] .cta-band {
  background: var(--white);
  border: 1px solid var(--line);
}

html[data-theme="dark"] .page-hero {
  background: radial-gradient(ellipse 70% 80% at 50% -30%, var(--teal-soft), transparent);
}

html[data-theme="dark"] code {
  background: #1e293b;
  color: #e2e8f0;
}

html[data-theme="dark"] .partner-pill {
  background: var(--teal-soft);
  color: var(--teal);
}

html[data-theme="dark"] .btn-ghost {
  background: rgba(17, 24, 39, 0.8);
  color: var(--ink);
  border-color: var(--line);
}

html[data-theme="dark"] .btn-ghost:hover {
  border-color: var(--teal);
  color: var(--teal);
}

html[data-theme="dark"] .auth-page {
  background: radial-gradient(ellipse 80% 60% at 70% -10%, var(--teal-soft), transparent), var(--bg);
}

html[data-theme="dark"] .admin-body,
html[data-theme="dark"] .admin-content {
  color: var(--ink);
}

html[data-theme="dark"] .page-sub {
  color: var(--muted);
}

html[data-theme="dark"] .panel-head {
  border-bottom-color: var(--line);
}

html[data-theme="dark"] .table th {
  color: var(--muted);
}

html[data-theme="dark"] .search {
  background: #0f172a;
  border-color: var(--line);
  color: var(--ink);
}

html[data-theme="dark"] .modal {
  background: var(--white);
  border-color: var(--line);
}

html[data-theme="dark"] .modal-head,
html[data-theme="dark"] .modal-foot {
  border-color: var(--line);
}

html[data-theme="dark"] .empty-state {
  color: var(--muted);
}

html[data-theme="dark"] .muted {
  color: var(--muted) !important;
}

/* Keep download band readable in dark */
html[data-theme="dark"] .download-band {
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}


/* Admin layout spacing */
.admin-content {
  padding: 1.75rem 1.75rem 2.5rem;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.admin-content .page-title {
  margin: 0 0 0.35rem;
}

.admin-content .page-sub {
  margin: 0 0 1.25rem;
}

.admin-content .toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1.25rem;
  padding: 0.15rem 0;
}

.admin-content .panel {
  margin-bottom: 1.25rem;
}

.admin-content .grid-3 {
  gap: 1.25rem;
}

.admin-content .grid-3 .card {
  padding: 1.35rem 1.4rem;
  min-height: 100%;
  box-sizing: border-box;
}

.admin-content .card.empty-state {
  padding: 2.5rem 1.5rem;
}

/* Billing-specific breathing room */
body.admin-body .admin-content #status-panel {
  padding: 1.25rem 1.35rem;
}

body.admin-body .admin-content #plans-heading {
  margin: 1.5rem 0 1rem;
}

body.admin-body .admin-content #platform-toolbar,
body.admin-body .admin-content #partner-cycle-bar {
  padding: 0.75rem 0;
  gap: 0.85rem;
}

@media (max-width: 900px) {
  .admin-content {
    padding: 1.25rem 1rem 2rem;
  }

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