:root {
  --bg: #f7f8f6;
  --surface: #ffffff;
  --surface-soft: #fbfcfa;
  --ink: #0b0d0a;
  --ink-soft: #3b4038;
  --muted: #737a70;
  --line: #e3e7df;
  --line-strong: #cfd7c8;
  --green: #8cff00;
  --green-deep: #56b900;
  --green-soft: #ecffd9;
  --warning: #ffb020;
  --shadow: 0 18px 50px rgba(11, 13, 10, 0.08);
  --radius: 8px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  background: var(--bg);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 14px 20px;
  color: #f7f8f6;
  background:
    radial-gradient(circle at 24px 48px, rgba(140, 255, 0, 0.22), transparent 92px),
    linear-gradient(150deg, #020402 0%, #090c08 52%, #000 100%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 138px;
  padding: 0 12px;
  margin-bottom: 24px;
  font-weight: 800;
  line-height: 1.04;
  font-size: 18px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--green);
}

.brand-with-logo {
  gap: 16px;
}

.logo-mark {
  width: 214px;
  height: 124px;
  overflow: visible;
}

.brand-logo {
  display: block;
  width: 214px;
  height: 124px;
  object-fit: contain;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav button,
.support button {
  width: 100%;
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: rgba(247, 248, 246, 0.86);
  font-size: 15px;
  font-weight: 650;
  text-align: left;
}

.nav button:hover,
.support button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.nav button.active {
  position: relative;
  background: rgba(255, 255, 255, 0.08);
  color: var(--green);
}

.nav button.active::before {
  content: "";
  position: absolute;
  left: 0;
  width: 3px;
  height: 32px;
  border-radius: 0 4px 4px 0;
  background: var(--green);
}

.icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  display: inline-block;
}

.sidebar-bottom {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 20px;
  display: grid;
  gap: 20px;
}

.profile-card {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  padding: 14px 12px;
  background: rgba(255, 255, 255, 0.04);
}

.profile-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 48% 32%, #f1c7a5 0 18%, transparent 19%),
    linear-gradient(135deg, #161d16, #a66a47 54%, #f1d0b9 55%, #6b3a23);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #fff;
  font-weight: 800;
  font-size: 12px;
}

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

.profile-name {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
}

.profile-handle,
.label {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.verified {
  width: fit-content;
  margin-top: 8px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #006c3c;
  color: #ddffe7;
  font-size: 11px;
  font-weight: 800;
}

.role-pill {
  margin: -10px 18px 22px;
  padding: 7px 10px;
  border: 1px solid rgba(140, 255, 0, 0.24);
  border-radius: 999px;
  color: var(--green);
  background: rgba(140, 255, 0, 0.08);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.balance-card {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.25);
}

.balance-card span {
  display: block;
  color: rgba(247, 248, 246, 0.72);
  font-size: 11px;
}

.balance-card strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
}

.support {
  display: grid;
  gap: 6px;
}

.support-title {
  margin: 0 0 2px 10px;
  color: rgba(247, 248, 246, 0.78);
  font-size: 12px;
}

.main {
  min-width: 0;
  padding: 16px 20px 22px;
}

.topbar {
  min-height: 54px;
  display: grid;
  grid-template-columns: minmax(240px, 488px) auto;
  align-items: center;
  justify-content: end;
  gap: 18px;
  margin-bottom: 16px;
}

.search {
  position: relative;
}

.search .icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #0d110c;
}

.search input {
  width: 100%;
  height: 46px;
  padding: 0 18px 0 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  outline: none;
  color: var(--ink);
  font-size: 14px;
}

.search input:focus {
  border-color: var(--green-deep);
  box-shadow: 0 0 0 4px rgba(140, 255, 0, 0.18);
}

.user-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.role-switch {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.role-switch button {
  min-width: 78px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.role-switch button.active {
  background: var(--ink);
  color: var(--green);
}

.sidebar-role-switch {
  display: none;
}

.hidden-switch {
  display: none !important;
}

.bell {
  position: relative;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 4px;
}

.badge {
  position: absolute;
  top: -3px;
  right: -2px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--green);
  color: #071006;
  font-size: 10px;
  font-weight: 900;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-chip strong {
  display: block;
  font-size: 13px;
}

.user-chip span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(520px, 1fr) minmax(380px, 478px);
  gap: 28px;
  align-items: start;
}

.view-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 34px rgba(11, 13, 10, 0.04);
  padding: 16px;
}

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.kpi {
  min-height: 96px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.kpi span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.kpi strong {
  display: block;
  margin-top: 16px;
  font-size: 26px;
  line-height: 1;
}

.compact {
  width: fit-content;
  min-width: 150px;
  padding: 0 16px;
}

.empty-state {
  min-height: 420px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  text-align: center;
}

.empty-state h2,
.work-card h3 {
  margin: 0;
}

.empty-state p {
  max-width: 430px;
  margin: 0 0 6px;
  color: var(--muted);
  line-height: 1.5;
}

.empty-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-deep);
}

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

.work-card {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.work-top,
.table-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.work-top p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.mini-stats span {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 11px;
}

.mini-stats strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
}

.split-panel,
.wallet-grid,
.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 16px;
}

.data-table {
  display: grid;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.referrals-table {
  grid-template-columns: minmax(220px, 1fr) 110px 90px 130px;
}

.wallet-table {
  grid-template-columns: 150px minmax(180px, 1fr) 150px 130px;
}

.data-table > div {
  min-height: 54px;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 13px;
}

.data-table > div:nth-last-child(-n + 4) {
  border-bottom: 0;
}

.table-head {
  min-height: 42px !important;
  background: var(--surface-soft);
  color: var(--muted) !important;
  font-size: 11px !important;
  font-weight: 850;
  text-transform: uppercase;
}

.table-brand .logo {
  width: 38px;
  height: 38px;
  font-size: 12px;
}

.table-brand span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.tall-chart {
  min-height: 280px;
}

.wallet-hero {
  min-height: 290px;
  padding: 24px;
  border-radius: var(--radius);
  color: #fafff7;
  background:
    radial-gradient(circle at 86% 16%, rgba(140, 255, 0, 0.34), transparent 110px),
    linear-gradient(135deg, #090c08, #010201);
}

.wallet-hero span {
  color: rgba(250, 255, 247, 0.72);
  font-size: 13px;
  font-weight: 750;
}

.wallet-hero strong {
  display: block;
  margin-top: 18px;
  font-size: clamp(42px, 6vw, 68px);
  line-height: 0.95;
}

.wallet-hero p {
  max-width: 420px;
  margin: 18px 0 28px;
  color: rgba(250, 255, 247, 0.72);
  line-height: 1.5;
}

.large-fees {
  gap: 14px;
}

.asset-library {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.asset-pack {
  display: grid;
  gap: 14px;
}

.form-panel {
  display: grid;
  gap: 14px;
}

.form-panel label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.form-panel input,
.form-panel select {
  height: 42px;
  min-width: 0;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
}

.check-list {
  display: grid;
  gap: 10px;
}

.check-list div {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.check-list strong {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-deep);
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.business-model {
  margin-top: 16px;
}

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

.business-steps div {
  min-height: 132px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.business-steps strong {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--green);
}

.business-steps span {
  display: block;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.45;
}

.builder-layout {
  display: grid;
  grid-template-columns: minmax(420px, 0.86fr) minmax(420px, 1.14fr);
  gap: 18px;
  align-items: start;
}

.builder-preview {
  position: sticky;
  top: 16px;
}

.form-panel textarea {
  min-height: 112px;
  resize: vertical;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  line-height: 1.45;
}

.business-board {
  grid-template-columns: 1fr;
}

.ambassador-table {
  grid-template-columns: minmax(220px, 1fr) minmax(170px, 0.8fr) 90px 90px 90px 110px;
}

.admin-table {
  grid-template-columns: minmax(210px, 1fr) minmax(150px, 0.7fr) minmax(190px, 0.9fr) 92px 110px;
}

.users-table {
  grid-template-columns: minmax(220px, 1fr) 110px minmax(150px, 0.8fr) 110px 120px;
}

.system-table {
  grid-template-columns: 140px 160px minmax(250px, 1fr) minmax(210px, 0.9fr);
}

.table-brand small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.empty-table-message {
  grid-column: 1 / -1;
  justify-content: center;
  color: var(--muted) !important;
  text-align: center;
}

.status-chip {
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-deep);
  font-size: 11px;
  font-weight: 850;
}

.status-chip.medium {
  background: #fff6d7;
  color: #936400;
}

.status-chip.high {
  background: #ffe5df;
  color: #b83415;
}

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

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

.price-card {
  display: grid;
  gap: 14px;
}

.price-card > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.price-card > strong {
  font-size: clamp(38px, 6vw, 58px);
  line-height: 0.95;
}

.price-card p,
.upload-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.selected-price {
  border-color: var(--green-deep);
  box-shadow: 0 0 0 1px rgba(140, 255, 0, 0.34) inset;
}

.upload-card {
  min-height: 270px;
  display: grid;
  align-content: center;
  gap: 14px;
}

.upload-card h2 {
  margin: 0;
}

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

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(320px, 0.55fr);
  gap: 18px;
  align-items: stretch;
  padding: 22px;
  background:
    radial-gradient(circle at 14% 10%, rgba(140, 255, 0, 0.22), transparent 260px),
    var(--bg);
}

.auth-panel {
  display: grid;
  align-content: center;
  gap: 20px;
  padding: clamp(24px, 5vw, 56px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-brand {
  color: var(--ink);
  padding: 0;
  margin: 0;
}

.auth-panel h1 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.95;
  font-weight: 950;
}

.auth-panel p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

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

.auth-card {
  min-height: 132px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--ink);
  text-align: left;
}

.auth-card:hover {
  border-color: var(--green-deep);
  box-shadow: 0 0 0 1px rgba(140, 255, 0, 0.34) inset;
}

.passive-card {
  cursor: default;
}

.passive-card:hover {
  border-color: var(--line);
  box-shadow: none;
}

.auth-card span,
.auth-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.auth-card strong {
  font-size: 22px;
}

.auth-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.auth-mode-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.auth-mode-switch button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.auth-mode-switch button.active {
  background: var(--ink);
  color: var(--green);
}

.form-note {
  margin: -6px 0 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.auth-form input,
.auth-form select {
  height: 44px;
  min-width: 0;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
}

.signout-btn {
  min-height: 34px;
}

.page-title {
  margin: 18px 0 6px;
  font-size: clamp(34px, 4vw, 44px);
  line-height: 0.98;
  font-weight: 900;
}

.lede {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.filter,
.sort select {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
}

.filter.active {
  border-color: var(--green-deep);
  background: var(--green-soft);
}

.list-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}

.sort {
  display: flex;
  align-items: center;
  gap: 8px;
}

.campaign-list {
  display: grid;
  gap: 8px;
}

.campaign-row {
  min-height: 82px;
  display: grid;
  grid-template-columns: 68px minmax(180px, 1fr) 92px 100px 92px 42px;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: left;
  color: var(--ink);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.campaign-row:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: 0 10px 26px rgba(11, 13, 10, 0.06);
}

.campaign-row.selected {
  border-color: var(--green-deep);
  background: linear-gradient(90deg, rgba(140, 255, 0, 0.12), rgba(255, 255, 255, 0.98));
  box-shadow: 0 0 0 1px rgba(140, 255, 0, 0.3) inset;
}

.logo {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #0b0d0a;
  color: #fff;
  font-weight: 900;
  font-size: 17px;
  line-height: 0.95;
  text-align: center;
  letter-spacing: 0;
}

.image-logo {
  overflow: hidden;
  padding: 0;
}

.image-logo img,
.asset-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.asset-thumb {
  height: 96px;
  border-radius: 6px;
  margin-bottom: 10px;
}

.logo.ag1 {
  background: radial-gradient(circle at 70% 16%, #147f54, #052016 66%);
}

.logo.lmnt {
  background: #050505;
  border: 1px solid #222;
}

.logo.vuori {
  background: linear-gradient(#ffd932, #50b8e9 58%, #fbfbf7 59%);
  color: #111;
  font-family: Georgia, serif;
  font-size: 15px;
}

.logo.cal {
  background: #006aff;
}

.logo.oura {
  background: #090909;
  font-size: 14px;
  font-weight: 500;
}

.logo.fresh {
  background: linear-gradient(135deg, #91df21, #34ad13);
  font-size: 12px;
}

.logo.custom {
  background: linear-gradient(135deg, #0b0d0a 0%, #1f3d16 58%, #77e100 100%);
  color: #fafff7;
}

.row-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.row-title strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
}

.tag {
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-deep);
  font-size: 11px;
  font-weight: 850;
}

.row-sub {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.metric {
  min-width: 0;
  padding-left: 16px;
  border-left: 1px solid var(--line);
  text-align: center;
}

.metric strong {
  display: block;
  font-size: 16px;
}

.metric span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.select-dot {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  justify-self: end;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
}

.selected .select-dot {
  border-color: var(--green-deep);
  background: var(--green-deep);
  color: #fff;
  font-size: 16px;
}

.pager {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 18px 0 24px;
}

.pager button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
}

.pager .current {
  background: var(--ink);
  color: #fff;
}

.performance {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 34px rgba(11, 13, 10, 0.04);
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-heading h2,
.detail h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
}

.section-heading span,
.section-heading button {
  color: var(--green-deep);
  font-size: 12px;
  font-weight: 750;
}

.section-heading button {
  border: 0;
  background: transparent;
  padding: 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.stat {
  min-width: 0;
  padding: 12px 10px;
  border-right: 1px solid var(--line);
}

.stat:last-child {
  border-right: 0;
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.stat strong {
  display: block;
  margin-top: 12px;
  font-size: 20px;
  line-height: 1;
}

.stat em {
  display: block;
  margin-top: 10px;
  color: var(--green-deep);
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
}

.chart {
  min-height: 150px;
  display: flex;
  align-items: end;
  gap: 7px;
  padding: 16px 10px 26px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(to top, rgba(140, 255, 0, 0.13), transparent 68%),
    linear-gradient(to bottom, transparent 0 32%, rgba(227, 231, 223, 0.7) 33% 34%, transparent 35% 65%, rgba(227, 231, 223, 0.7) 66% 67%, transparent 68%);
}

.bar {
  flex: 1;
  min-width: 6px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(#69d700, #a5ff40);
}

.timeline {
  display: flex;
  justify-content: space-between;
  padding: 8px 6px 0;
  color: var(--muted);
  font-size: 11px;
}

.detail {
  position: sticky;
  top: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.detail-header {
  display: grid;
  grid-template-columns: 62px 1fr 28px;
  gap: 12px;
  align-items: start;
  padding: 24px 18px 16px;
}

.close-btn {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: var(--ink);
}

.rating {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.star {
  color: var(--warning);
  font-weight: 900;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 18px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.detail-cell {
  min-height: 76px;
  padding: 14px 12px;
  border-right: 1px solid var(--line);
}

.detail-cell:last-child {
  border-right: 0;
}

.detail-cell span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.detail-cell strong {
  display: block;
  margin-top: 8px;
  font-size: 19px;
}

.progress-list {
  display: grid;
  gap: 16px;
  padding: 0 18px 18px;
}

.progress-row {
  display: grid;
  grid-template-columns: 88px 1fr 48px;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 750;
}

.track {
  height: 7px;
  border-radius: 999px;
  background: #e8eee4;
  overflow: hidden;
}

.track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green-deep), var(--green));
}

.panel-section {
  padding: 16px 18px;
  border-top: 1px solid var(--line);
}

.assets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.asset-card {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px;
  overflow: hidden;
  background: #063a2b;
  color: #fafff7;
}

.asset-card:nth-child(2) {
  background: linear-gradient(135deg, #073921, #0b5a36);
}

.asset-card:nth-child(3) {
  background: #f0f2ed;
  color: #142016;
}

.asset-card strong {
  display: block;
  font-family: Georgia, serif;
  font-size: 21px;
  line-height: 0.95;
  font-weight: 500;
}

.asset-card span {
  display: block;
  color: inherit;
  opacity: 0.72;
  font-size: 12px;
  font-weight: 800;
}

.copy-box {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 14px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.52;
}

.link-box {
  display: grid;
  grid-template-columns: 1fr 72px;
  gap: 8px;
  align-items: center;
}

.link-box input {
  height: 40px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  color: var(--ink);
  background: var(--surface);
  font-size: 13px;
}

.primary-btn,
.link-box button {
  min-height: 40px;
  border: 0;
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--green), #70dc00);
  color: #071006;
  font-weight: 900;
  font-size: 13px;
}

.fees {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  font-size: 12px;
}

.fee-list {
  display: grid;
  gap: 8px;
}

.fee-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-soft);
}

.fee-line.total {
  padding-top: 7px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-weight: 900;
}

.earned {
  color: var(--green-deep);
  font-weight: 900;
}

.join-row {
  padding: 10px 18px 18px;
}

.primary-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.primary-btn.joined {
  background: #0b0d0a;
  color: var(--green);
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  min-width: min(340px, calc(100vw - 44px));
  padding: 14px 16px;
  border: 1px solid rgba(140, 255, 0, 0.36);
  border-radius: var(--radius);
  background: #0b0d0a;
  color: #fafff7;
  box-shadow: var(--shadow);
  transform: translateY(24px);
  opacity: 0;
  pointer-events: none;
  transition: transform 180ms ease, opacity 180ms ease;
}

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

.toast strong {
  color: var(--green);
}

.toast span {
  display: block;
  margin-top: 4px;
  color: rgba(250, 255, 247, 0.78);
  font-size: 12px;
  line-height: 1.4;
}

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

  .workspace {
    grid-template-columns: 1fr;
  }

  .detail {
    position: static;
  }

  .campaign-board,
  .asset-library,
  .split-panel,
  .wallet-grid,
  .settings-grid,
  .business-steps,
  .builder-layout {
    grid-template-columns: 1fr;
  }

  .builder-preview {
    position: static;
  }
}

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

  .sidebar {
    position: static;
    height: auto;
    padding: 16px;
  }

  .brand {
    min-height: 86px;
    margin-bottom: 12px;
    padding: 0;
  }

  .logo-mark,
  .brand-logo {
    width: 150px;
    height: 86px;
  }

  .role-pill {
    display: none;
  }

  .sidebar-role-switch {
    display: grid;
    width: 100%;
    margin: 0 0 12px;
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
  }

  .sidebar-role-switch button {
    color: rgba(247, 248, 246, 0.78);
  }

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

  .nav button {
    justify-content: center;
    min-height: 44px;
    padding: 0 10px;
    font-size: 13px;
  }

  .nav button span:last-child,
  .support,
  .sidebar-bottom {
    display: none;
  }

  .main {
    padding: 14px;
  }

  .topbar {
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .user-actions {
    display: none;
  }

  .view-header {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .referrals-table,
  .wallet-table,
  .ambassador-table,
  .admin-table,
  .users-table,
  .system-table {
    min-width: 680px;
  }

  .pricing-grid,
  .wide-assets {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .auth-shell {
    padding: 12px;
  }

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

  .campaign-row {
    grid-template-columns: 58px minmax(0, 1fr) 36px;
    min-height: 78px;
  }

  .campaign-row .metric {
    display: none;
  }

  .performance,
  .fees,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-cell {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .detail-cell:last-child {
    border-bottom: 0;
  }

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

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

  .page-title {
    font-size: 34px;
  }
}

@media (max-width: 480px) {
  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .filter {
    justify-content: center;
    padding: 0 10px;
  }

  .list-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .stats,
  .assets,
  .kpi-strip {
    grid-template-columns: 1fr;
  }

  .link-box {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
