* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--canvas);
  font: var(--font-text-14-r);
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 8px 12px;
  background: var(--brand);
  color: #fff;
}
.skip-link:focus { top: 12px; }

.login-view {
  position: relative;
  display: grid;
  grid-template-columns: minmax(420px, 47%) minmax(0, 1fr);
  min-height: 100vh;
  background: #fff;
}
.auth-visual {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: #001240;
}
.auth-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.auth-visual-login {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: none;
  min-height: 0;
}
.login-mode .auth-visual-login { display: block; }
.login-mode .auth-visual-register { display: none; }
.login-mode { grid-template-columns: 1fr; }
.auth-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  padding: 44px clamp(32px, 7vw, 104px);
  background: #fff;
}
.login-mode .auth-panel {
  align-self: center;
  justify-self: center;
  width: min(606px, calc(100vw - 48px));
  min-height: auto;
  margin: 0 auto;
  padding: 44px 56px;
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(0, 17, 62, .16);
}
.login-mode .auth-tabs { display: none; }
.login-mode .login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  padding: 0;
}
.auth-tabs {
  display: flex;
  width: min(500px, 100%);
  margin: 0 auto 18px;
  padding: 4px;
  background: #f2f6fa;
  border-radius: 6px;
}
.auth-tab {
  flex: 1;
  min-height: 34px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--body-text);
  font-size: 13px;
  font-weight: 500;
}
.auth-tab.active {
  background: #fff;
  color: var(--brand);
  box-shadow: 0 2px 8px rgba(15, 27, 61, .08);
}
.login-panel {
  width: min(500px, 100%);
  margin: 0 auto;
  padding: 28px 0;
}
.eyebrow {
  margin: 0;
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.login-panel h1 { margin: 4px 0 12px; font: var(--font-text-24-b); color: var(--blue-black); }
.login-note { color: var(--muted); font-size: 12px; }
.login-panel label { display: grid; gap: 6px; margin-top: 16px; }
.login-panel label span { color: var(--body-text); font-size: 13px; font-weight: 500; }
.login-panel input,
.login-panel select {
  min-height: 42px;
  padding: 9px 11px;
  background: #fff;
  border: 1px solid var(--control-border);
  border-radius: 4px;
  color: var(--text);
}
.login-panel input:focus,
.login-panel select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 91, 255, .12);
  outline: none;
}
.form-error { margin: 10px 0 0; color: var(--danger); font-size: 12px; }
.auth-switch {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.auth-switch button {
  border: 0;
  background: transparent;
  color: var(--brand);
  font-weight: 700;
}
.auth-switch button:hover { text-decoration: underline; }
.auth-switch button:focus-visible,
.auth-tab:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.legal-declaration {
  margin-top: 14px;
  padding: 12px;
  background: #f8fbff;
  border: 1px solid var(--border);
  border-radius: 4px;
}
.legal-declaration p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.68;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background .16s, color .16s, border-color .16s;
}
.button.primary { background: var(--brand-gradient); color: #fff; }
.button.primary:hover { filter: brightness(1.08); }
.button.secondary { background: #fff; border-color: #d7e0ec; color: var(--body-text); }
.button.secondary:hover { background: #f7f9fc; }
.button.danger { background: var(--danger); color: #fff; }
.button.small { min-height: 30px; padding: 5px 10px; font-size: 12px; }
.button.wide { width: 100%; margin-top: 20px; }
.button:disabled { opacity: .48; cursor: not-allowed; }
.button:focus-visible,
.icon-button:focus-visible,
.nav-item:focus-visible,
.nav-parent:focus-visible,
.chip:focus-visible,
.avatar:focus-visible,
.account-menu-item:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.app-view { min-height: 100vh; }
.sidebar {
  position: fixed;
  z-index: 30;
  top: 56px;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  width: 216px;
  background: #fff;
  border-right: 1px solid var(--border);
  padding: 12px 10px 16px;
  transition: width .18s, transform .2s;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0;
  margin: 0;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: var(--brand-gradient);
  border-radius: 7px;
  color: #fff;
  font-weight: 700;
}
.brand-text strong { display: block; font-size: 13px; }
.brand-text small { display: block; color: var(--muted); font-size: 10px; }
.topbar-brand { flex: 0 0 auto; color: var(--blue-black); white-space: nowrap; }
.topbar-brand .brand-mark { width: 28px; height: 28px; border-radius: 6px; }
.topbar-brand .brand-text strong { color: var(--blue-black); font-size: 13px; }
.topbar-demo-note {
  margin-left: 8px;
  color: var(--nav-text);
  font-size: 11px;
  line-height: 1.3;
  white-space: nowrap;
}
.demo-note-compact { display: none; }
.nav { display: flex; flex: 1; flex-direction: column; gap: 3px; overflow: auto; }
.nav-section { width: 100%; }
.nav-direct .nav-parent { width: 100%; }
.nav-parent-row { display: flex; align-items: stretch; width: 100%; }
.nav-parent {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  min-height: 38px;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--side-text);
  font-weight: 500;
  text-align: left;
}
.nav-parent-toggle {
  display: grid;
  place-items: center;
  width: 34px;
  min-height: 38px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--side-icon);
}
.nav-parent-toggle:hover { background: #f2f6fa; color: var(--side-text); }
.nav-parent-toggle .nav-chevron { margin: 0; }
.nav-section.open .nav-parent-toggle .nav-chevron { transform: rotate(90deg); color: var(--brand); }
.nav-parent.active { background: #eaf0ff; color: var(--brand); font-weight: 700; }
.nav-parent:hover { background: #f2f6fa; color: var(--blue-black); }
.nav-chevron { margin-left: auto; color: var(--side-icon); font-size: 12px; transition: transform .16s; }
.nav-section.open .nav-chevron { transform: rotate(90deg); color: var(--brand); }
.nav-children {
  display: none;
  margin: 1px 8px 4px 25px;
  padding-left: 7px;
  border-left: 1px solid var(--border);
}
.nav-section.open .nav-children { display: block; }
.nav-children .nav-item { min-height: 34px; width: 100%; }
.nav-group {
  margin: 10px 8px 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--side-text);
  text-align: left;
}
.nav-item:hover { background: #f2f6fa; color: var(--blue-black); }
.nav-item.active { background: #eaf0ff; color: var(--brand); font-weight: 700; }
.nav-icon { display: grid; place-items: center; width: 18px; color: var(--side-icon); }
.nav-icon svg { width: 17px; height: 17px; }
.nav-item.active .nav-icon { color: var(--brand); }
.nav-label { flex: 1; min-width: 0; }
.profile-entry {
  margin: auto 8px 12px;
  height: 44px;
  flex: 0 0 auto;
  padding: 10px;
  border: 0;
  border-radius: 4px;
  background: var(--brand-gradient);
  color: #fff;
  box-shadow: 0 6px 16px rgba(0, 91, 255, .18);
}
.profile-entry:hover,
.profile-entry.active {
  background: var(--brand-gradient);
  color: #fff;
  filter: brightness(1.06);
}
.profile-entry .nav-icon { color: rgba(255, 255, 255, .86); }
.sidebar-toggle {
  display: flex;
  place-items: center;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 44px;
  flex: 0 0 auto;
  margin: 0 8px 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--side-icon);
  font-size: 14px;
}
.sidebar-toggle:hover { background: #f2f6fa; color: var(--side-text); }

.workspace {
  min-width: 0;
  min-height: 100vh;
  margin-left: 216px;
  padding-top: 56px;
  display: flex;
  flex-direction: column;
}
.topbar {
  position: fixed;
  right: 0;
  left: 0;
  z-index: 35;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  min-height: 56px;
  padding: 0 24px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.topbar-spacer { flex: 1; min-width: 0; }
.topbar-tools { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.topbar-clock {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  min-width: 270px;
  margin-right: 4px;
  color: var(--nav-text);
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
}
.topbar-clock > div {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 7px;
}
.topbar-clock strong {
  color: var(--side-text);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.topbar-clock span {
  color: var(--nav-text);
  font-size: 10px;
}
.topbar-clock span small {
  display: none;
}
.topbar-clock > div > small {
  color: var(--nav-text);
  font-size: 9px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.icon-button.circular {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #eef3fa;
  color: #52627d;
}
.icon-button.circular svg { width: 17px; height: 17px; }
.icon-button.circular:hover { background: #e2ebf8; color: var(--brand); }
.topbar-menu { position: relative; }
.topbar-dropdown {
  position: absolute;
  z-index: 70;
  top: calc(100% + 8px);
  right: 0;
  display: none;
  min-width: 148px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(20, 40, 80, .13);
}
.topbar-menu.open .topbar-dropdown { display: block; }
.topbar-dropdown button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 36px;
  padding: 7px 9px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--body-text);
  font-size: 12px;
  text-align: left;
}
.topbar-dropdown button:hover,
.topbar-dropdown button[aria-checked="true"] { background: var(--row-hover); color: var(--brand); font-weight: 500; }
.topbar-dropdown button[aria-checked="true"]::after { content: "✓"; }
.icon-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}
.icon-button:hover { background: #f2f6fa; color: var(--text); }
.notice { position: relative; }
.notice span {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  background: var(--danger);
  border-radius: 50%;
}
.wallet {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-right: 6px;
  padding: 6px 10px;
  background: #eaf0ff;
  border: 0;
  border-radius: 999px;
  color: var(--body-text);
  font-size: 11px;
  text-decoration: none;
}
.wallet strong { color: var(--brand); }
.wallet:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.wallet-menu { position: relative; }
.wallet-popover {
  position: absolute;
  z-index: 60;
  top: calc(100% + 8px);
  right: 6px;
  width: 260px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.wallet-popover::before { content: ""; position: absolute; top: -9px; right: 0; left: 0; height: 9px; }
.wallet-popover-hero { display: grid; gap: 4px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.wallet-popover-hero > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wallet-popover span { color: var(--muted); font-size: 12px; }
.wallet-popover-hero small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.wallet-popover .button { width: 100%; }
.scenario-control {
  display: grid;
  gap: 1px;
  margin: 0 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}
.scenario-control select {
  min-height: 32px;
  padding: 3px 8px;
  border: 1px solid var(--control-border);
  border-radius: 4px;
  background: #fff;
  color: var(--body-text);
  font-size: 11px;
}
.account-menu { position: relative; }
.avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  background: var(--brand-gradient);
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  transition: box-shadow .16s, transform .16s;
}
.avatar:hover { transform: translateY(-1px); }
.account-menu.open .avatar { box-shadow: 0 0 0 3px rgba(0, 91, 255, .16); }
.account-dropdown {
  position: absolute;
  z-index: 60;
  top: calc(100% + 8px);
  right: 0;
  width: 226px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 91, 255, .15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .16s, transform .16s, visibility .16s;
}
.account-dropdown::before {
  content: "";
  position: absolute;
  top: -8px;
  right: 0;
  left: 0;
  height: 8px;
}
.account-menu.open .account-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.account-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--blue-black);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  transition: background .16s;
}
.account-menu-item + .account-menu-item { margin-top: 2px; }
.account-menu-item:hover,
.account-menu-item:focus-visible { background: var(--row-hover); }
.account-menu-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  background: #eaf0ff;
  border-radius: 8px;
  color: var(--brand);
  transition: background .16s, color .16s;
}
.account-menu-icon svg { width: 17px; height: 17px; }
.account-menu-item:hover .account-menu-icon,
.account-menu-item:focus-visible .account-menu-icon {
  background: #dce8ff;
  color: var(--brand-deep);
}
.kyc-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 24px;
  background: #fffbea;
  border-bottom: 1px solid #f2e4b4;
  color: #8a5b00;
  font-size: 14px;
  line-height: 1.6;
}
.kyc-banner div { display: flex; gap: 7px; }

.main {
  flex: 1;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 26px 15px 20px;
}
.page-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}
.page-header h1 { margin: 0; font: var(--font-text-24-b); }
.page-header p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.page-actions-top { justify-content: flex-end; margin-bottom: 12px; }
.page-actions-top.page-actions-start { justify-content: flex-start; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.dashboard-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dashboard-number-link {
  display: inline-block;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--brand);
  font: inherit;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.dashboard-number-link:hover { text-decoration: underline; }
.dashboard-number-link:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.dashboard-metrics .dashboard-number-link { display: block; margin-top: 6px; font: var(--font-text-24-b); }
@media (max-width: 767px) {
  .dashboard-number-link { min-width: 36px; min-height: 36px; }
}
.metric { padding: 15px 16px; }
.metric span { display: block; color: var(--muted); font-size: 12px; }
.metric strong { display: block; margin-top: 6px; font: var(--font-text-24-b); font-variant-numeric: tabular-nums; }
.metric small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.metric-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.metric-header span { min-width: 0; }
.metric-header .button { flex: 0 0 auto; }
.dashboard-wallet-card {
  position: relative;
  padding-right: 116px;
}
.dashboard-wallet-card .metric-header .button {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
}
.grid-2 {
  display: grid;
  grid-template-columns: minmax(300px, 5fr) minmax(360px, 7fr);
  gap: 16px;
  align-items: start;
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--border);
}
.panel-header h2 { margin: 0; font: var(--font-text-14-m); }
.panel-body { padding: 16px 18px; }

.chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 220px;
  padding: 16px 18px 0;
}
.chart-column { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 7px; }
.chart-column i {
  display: block;
  min-height: 12px;
  border-radius: 3px 3px 0 0;
  background: var(--brand-gradient);
}
.chart-x {
  display: flex;
  gap: 8px;
  padding: 7px 18px 16px;
  color: var(--muted);
  font-size: 10px;
}
.chart-x span { flex: 1; text-align: center; }

.link-box { display: grid; gap: 10px; }
.deep-link-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.campaign-page { min-width: 0; }
.campaign-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 0 12px; }
.campaign-toolbar > strong { color: var(--blue-black); font-size: 14px; }
.campaign-list th, .campaign-list td { text-align: center; font-variant-numeric: tabular-nums; }
.campaign-list th:first-child, .campaign-list td:first-child { min-width: 160px; }
.campaign-list th:last-child, .campaign-list td:last-child { min-width: 180px; }
.campaign-list td > strong { font-weight: 500; }
.campaign-link { display: inline-flex; align-items: center; justify-content: center; gap: 6px; max-width: 300px; }
.campaign-link > a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--brand); font-size: 12px; }
.campaign-number-link { padding: 5px 8px; border: 0; border-radius: 4px; background: transparent; color: var(--brand); font: inherit; font-variant-numeric: tabular-nums; cursor: pointer; }
.campaign-number-link:hover { background: var(--row-hover); text-decoration: underline; }
.campaign-number-link:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.campaign-data-metrics .campaign-number-link { justify-self: start; padding: 0; color: var(--brand); font: var(--font-text-24-b); }
.campaign-list .table-actions { justify-content: center; }
.campaign-copy { width: 30px; height: 30px; flex: none; border-radius: 4px; background: transparent; color: var(--muted); }
.campaign-copy:hover { background: var(--row-hover); color: var(--brand); }
.campaign-copy svg { width: 15px; height: 15px; }
.campaign-data-modal.full { padding: 0; align-items: stretch; }
.campaign-data-backdrop { position: absolute; inset: 0; }
.campaign-data-modal.full .campaign-data-drawer { display: flex; flex-direction: column; width: min(800px, 100vw); overflow: hidden; padding: 0; }
.campaign-data-drawer .modal-head { flex: none; margin: 0; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.campaign-data-drawer .modal-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.campaign-data-body { flex: 1; min-height: 0; overflow-y: auto; padding: 20px 24px; }
.campaign-data-period { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; font-size: 13px; }
.campaign-data-period select { min-height: 32px; border: 1px solid var(--control-border); border-radius: 4px; padding: 4px 8px; background: var(--surface); color: var(--body-text); font-size: 13px; }
.campaign-data-period > span { color: var(--muted); font-size: 12px; }
.campaign-data-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 16px; margin-bottom: 22px; }
.campaign-data-metrics > div, .campaign-data-rates > div { min-width: 0; display: grid; gap: 8px; }
.campaign-data-metrics span, .campaign-data-rates span { color: var(--muted); font-size: 12px; }
.campaign-data-metrics strong { color: var(--text); font: var(--font-text-24-b); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.campaign-data-rates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; border-block: 1px solid var(--border); padding: 18px 0; margin-bottom: 24px; }
.campaign-data-rates strong { color: var(--brand); font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.campaign-breakdown { margin-top: 24px; min-width: 0; }
.campaign-breakdown h3 { font-size: 14px; color: var(--blue-black); margin: 0 0 12px; }
.campaign-breakdown table { min-width: 610px; }
.campaign-breakdown th, .campaign-breakdown td { text-align: center; font-variant-numeric: tabular-nums; }
.campaign-breakdown th:last-child, .campaign-breakdown td:last-child { position: static; box-shadow: none; }
.campaign-empty { padding: 30px 12px; text-align: center; color: var(--muted); font-size: 13px; background: var(--surface-soft); }
.campaign-data-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 24px; border-top: 1px solid var(--border); flex: none; }
@media (max-width: 767px) {
  .campaign-toolbar { align-items: flex-start; flex-direction: column; }
  .campaign-list .table-wrap { scroll-padding-inline: 8px 188px; }
  .campaign-list th:first-child, .campaign-list td:first-child { position: static; }
  .campaign-copy { width: 36px; height: 36px; }
  .campaign-number-link { min-width: 36px; min-height: 36px; }
  .campaign-data-drawer .modal-head, .campaign-data-body { padding: 18px; }
  .campaign-data-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .campaign-data-rates { gap: 12px; }
  .campaign-data-rates span { line-height: 1.6; min-height: 38px; }
  .campaign-data-footer { padding: 14px 18px; }
  .campaign-data-footer .button, .campaign-data-period select { min-height: 36px; }
}
.deep-link-page > .card { min-width: 0; }
.deep-link-body { display: grid; gap: 18px; }
.deep-link-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; max-width: 1040px; }
.deep-link-desktop-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 688px; }
.deep-link-fields .field { min-width: 0; }
.deep-link-fields .field > span { font-size: 13px; }
.deep-link-fields select { min-width: 0; width: 100%; }
.deep-link-result { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.deep-link-result .button { min-width: 84px; min-height: 32px; white-space: nowrap; }
.deep-link-result .link-text { min-width: 0; font-size: 12px; line-height: 1.6; }
@media (max-width: 767px) {
  .deep-link-fields { grid-template-columns: minmax(0, 1fr); max-width: none; gap: 12px; }
  .deep-link-result { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .deep-link-result .button { justify-self: end; min-height: 36px; }
}
.link-text {
  padding: 10px 12px;
  background: #f7f9fc;
  border: 1px dashed var(--control-border);
  border-radius: 5px;
  color: var(--blue-black);
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
  overflow-wrap: anywhere;
}
.helper { color: var(--muted); font-size: 11px; }
.dashboard-promotion-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.dashboard-promotion-grid > .card { min-width: 0; }
.dashboard-link-card { border-radius: 8px; }
.dashboard-materials {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 8px;
}
.dashboard-materials .panel-header { flex: 0 0 auto; }
.dashboard-materials .panel-header h2 { white-space: normal; }
.dashboard-material-banner {
  position: relative;
  display: flex;
  flex: 1;
  min-height: 180px;
  overflow: hidden;
  background: var(--surface);
  color: var(--blue-black);
  text-decoration: none;
}
.dashboard-material-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  width: 64%;
  padding: 20px;
}
.dashboard-material-label { color: var(--brand); font-size: 11px; font-weight: 700; }
.dashboard-material-copy strong { max-width: 14em; font-size: 20px; line-height: 1.5; text-wrap: balance; }
.dashboard-material-types { font-size: 12px; line-height: 1.6; color: var(--muted); }
.dashboard-material-cta { display: inline-flex; align-items: center; gap: 10px; color: var(--brand); font-size: 13px; font-weight: 600; }
.dashboard-material-image { position: absolute; right: 0; top: 0; width: 36%; height: 100%; object-fit: cover; object-position: 52% 46%; }
.dashboard-material-banner:hover .dashboard-material-cta { text-decoration: underline; }
.dashboard-material-banner:focus-visible { outline: 2px solid var(--brand); outline-offset: -3px; }
.dashboard-guidance-stack { display: grid; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 16px; min-width: 0; }
.dashboard-guidance-stack .tutorial-card { min-height: 0; }
.dashboard-guidance-stack .tutorial-copy { padding: 16px 20px; }
.dashboard-guidance-stack .tutorial-copy .eyebrow { margin-bottom: 4px; }
.dashboard-guidance-stack .tutorial-copy h2 { margin: 0; font: var(--font-text-16-m); }
.dashboard-guidance-stack .tutorial-copy p { font-size: 13px; margin-top: 6px; line-height: 1.6; }
.dashboard-client-status { min-width: 0; display: flex; flex-direction: column; }
.dashboard-client-status h2 { display: flex; align-items: center; gap: 9px; }
.dashboard-status-icon { display: flex; color: var(--side-icon); }
.dashboard-status-icon svg { width: 18px; height: 18px; }
.dashboard-client-status .panel-header { padding: 14px 20px; }
.dashboard-status-body { display: flex; flex: 1; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; }
.dashboard-status-body p { margin: 0; color: var(--body-text); font-size: 13px; line-height: 1.7; }
.dashboard-status-body .button { flex-shrink: 0; min-height: 36px; padding-right: 20px; padding-left: 20px; }
@media (max-width: 991px) {
  .dashboard-promotion-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  .dashboard-guidance-stack { grid-template-rows: auto auto; }
}
@media (max-width: 479px) {
  .dashboard-link-card .panel-header { flex-wrap: wrap; gap: 8px; }
  .dashboard-material-copy { padding: 16px; }
  .dashboard-material-copy strong { font-size: 18px; }
  .dashboard-status-body { align-items: stretch; flex-direction: column; gap: 12px; }
}
.dashboard-link-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.dashboard-link-picker {
  position: relative;
  display: grid;
  gap: 6px;
  min-width: 0;
}
.dashboard-link-picker-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid var(--control-border);
  border-radius: 4px;
  background: #fff;
  color: var(--body-text);
  text-align: left;
}
.dashboard-link-picker-button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dashboard-link-picker-button small { color: var(--muted); }
.dashboard-link-options {
  position: absolute;
  z-index: 70;
  top: calc(100% + 6px);
  left: 0;
  display: none;
  width: min(320px, 100%);
  padding: 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 14px 36px rgba(15, 27, 61, .16);
}
.dashboard-link-picker.open .dashboard-link-options { display: block; }
.dashboard-link-options input {
  width: 100%;
  min-height: 34px;
  margin-bottom: 8px;
  padding: 6px 9px;
  border: 1px solid var(--control-border);
  border-radius: 4px;
}
.dashboard-link-options input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 91, 255, .12);
  outline: none;
}
.dashboard-link-option-list {
  max-height: 260px;
  overflow-y: auto;
}
.dashboard-link-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 36px;
  padding: 6px 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--body-text);
  text-align: left;
}
.dashboard-link-option:hover,
.dashboard-link-option:focus-visible {
  background: var(--row-hover);
  outline: none;
}
.dashboard-link-option.selected {
  color: var(--brand);
  font-weight: 700;
}
.dashboard-link-option strong { color: var(--brand); }
.dashboard-link-empty {
  padding: 16px 8px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.dashboard-link-address {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  grid-column: 1 / -1;
  margin-top: 2px;
}
.dashboard-summary { margin-top: 16px; }
.dashboard-summary-filter {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dashboard-summary-filter span {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.dashboard-summary-filter select {
  min-height: 32px;
  padding: 6px 28px 6px 9px;
  border: 1px solid var(--control-border);
  border-radius: 4px;
  background: #fff;
  color: var(--body-text);
}
.dashboard-summary-filter select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 91, 255, .12);
  outline: none;
}
.dashboard-summary-table-wrap { padding: 6px 18px 16px; }
.dashboard-summary-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
}
.dashboard-summary-table th,
.dashboard-summary-table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--table-row-border);
  text-align: left;
}
.dashboard-summary-table th {
  background: var(--table-header-bg);
  color: var(--table-header-text);
  font-size: 12px;
  font-weight: var(--table-header-weight);
}
.dashboard-summary-table td {
  color: var(--body-text);
  font-size: 13px;
}
.dashboard-summary-table th:last-child,
.dashboard-summary-table td:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.tutorial-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: calc((100% - 16px) / 2);
  align-items: stretch;
  min-height: 170px;
  margin-top: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color .16s, box-shadow .16s;
}
.tutorial-card:hover,
.tutorial-card:focus-visible {
  border-color: #b8cdf7;
  box-shadow: 0 14px 30px rgba(0, 91, 255, .1);
  outline: none;
}
.tutorial-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 28px;
}
.tutorial-copy .eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
}
.tutorial-copy h2 { margin: 0; color: var(--blue-black); font: var(--font-text-18-b); }
.tutorial-copy p { max-width: 620px; margin: 8px 0 0; color: var(--muted); }
.table-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.table-wrap td small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.toolbar-spacer { flex: 1; }
.field { display: grid; min-width: 140px; gap: 5px; }
.field span { color: var(--muted); font-size: 11px; }
.field input,
.field select {
  min-height: 32px;
  padding: 6px 9px;
  background: #fff;
  border: 1px solid var(--control-border);
  border-radius: 4px;
}
.field input:focus,
.field select:focus {
  /* D-06: unified focus halo — same standard as the dropdown component (00I). */
  border-color: transparent;
  box-shadow: 0 0 0 3px rgba(0, 91, 255, 0.22), 0 1px 2px rgba(15, 34, 58, 0.04);
  outline: none;
}

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  min-height: 28px;
  padding: 4px 10px;
  background: #fff;
  border: 1px solid #d7e0ec;
  border-radius: 999px;
  color: var(--body-text);
  font-size: 11px;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.active { background: #f0f7ff; border-color: var(--brand); color: var(--brand); font-weight: 700; }

.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; min-width: 720px; border-collapse: collapse; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--table-row-border); text-align: left; white-space: nowrap; }
th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--table-header-bg);
  color: var(--table-header-text);
  font-size: 12px;
  font-weight: var(--table-header-weight);
}
td { color: var(--body-text); font-size: var(--table-body-size); }
tbody tr:hover td { background: var(--row-hover); }
th:first-child,
td:first-child {
  position: sticky;
  left: 0;
  z-index: 3;
  background: var(--surface);
}
th:first-child { background: var(--table-header-bg); }
tbody tr:hover td:first-child { background: var(--row-hover); }
th:last-child,
td:last-child {
  position: sticky;
  right: 0;
  z-index: 3;
  background: var(--surface);
  box-shadow: -6px 0 8px -8px rgba(20, 40, 80, .2);
}
th:last-child { background: var(--table-header-bg); }
.numeric { text-align: right; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 18px;
  color: var(--muted);
  font-size: 11px;
}
.pagination { display: flex; gap: 5px; }
.pagination button {
  min-width: 28px;
  height: 28px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--body-text);
}
.pagination button.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }
.pagination button:disabled { opacity: .4; cursor: default; }

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: var(--control-weight);
  white-space: nowrap;
}
.tag-ok { background: var(--ok-bg); color: var(--ok); }
.tag-warning { background: var(--warning-bg); color: var(--warning); }
.tag-danger { background: var(--danger-bg); color: var(--danger); }
.tag-info { background: var(--info-bg); color: var(--info); }
.tag-muted { background: #edf1f4; color: var(--muted); }

.tabs {
  display: flex;
  gap: 4px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow-x: auto;
}
.tabs button {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 6px 14px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
}
.tabs button.active { background: #eaf0ff; color: var(--brand); font-weight: 700; }

.empty-state {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 220px;
  color: var(--muted);
  text-align: center;
}
.empty-state strong { color: var(--text); }
.state-panel {
  display: grid;
  place-items: center;
  gap: 12px;
  min-height: 320px;
  padding: 32px;
  text-align: center;
}
.state-panel h2 { margin: 0; font-size: 18px; }
.state-panel p { max-width: 480px; margin: 0; color: var(--muted); }
.state-panel code {
  padding: 3px 7px;
  background: #f2f6fa;
  border-radius: 4px;
  color: var(--blue-black);
  font-family: ui-monospace, Menlo, monospace;
}

.loading-page { display: grid; gap: 16px; }
.loading-page > p {
  margin: 0;
  color: var(--muted);
  font: var(--font-text-14-r);
}
.skeleton-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.skeleton-card { display: grid; gap: 9px; padding: 16px; }
.skeleton-card i,
.skeleton-card b,
.skeleton-card small,
.skeleton-table-card header i,
.skeleton-table-card header b,
.skeleton-table span {
  display: block;
  border-radius: 4px;
  background: var(--surface-soft);
  animation: skeleton-pulse 1.2s ease-in-out infinite;
}
.skeleton-card i { width: 42%; height: 12px; }
.skeleton-card b { width: 72%; height: 28px; }
.skeleton-card small { width: 55%; height: 11px; }
.skeleton-table-card { overflow-x: auto; }
.skeleton-table-card header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 18px; border-bottom: 1px solid var(--border); }
.skeleton-table-card header i { width: 140px; height: 14px; }
.skeleton-table-card header b { width: 72px; height: 12px; }
.skeleton-table { display: grid; min-width: 720px; }
.skeleton-table > div { display: grid; grid-template-columns: repeat(6, minmax(120px, 1fr)); }
.skeleton-table > div:first-child { background: var(--surface-accent); }
.skeleton-table span { height: 41px; margin: 10px 12px; }
.skeleton-table > div + div { border-top: 1px solid var(--table-row-border); }
@keyframes skeleton-pulse {
  0%, 100% { opacity: .58; }
  50% { opacity: 1; }
}
@media (max-width: 1199px) {
  .skeleton-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .skeleton-cards { grid-template-columns: 1fr; }
}

.filter-drawer {
  /* geometry unified in drawer.css (.aff-drawer); body-scroll variant keeps padding */
  padding: 22px;
  background: #fff;
  overflow: auto;
}
.drawer-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 18px;
  background: #fff;
}
.overlay {
  position: fixed;
  z-index: 40;
  inset: 0;
  background: rgba(15, 27, 61, .35);
}

.modal-layer {
  position: fixed;
  z-index: 42;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 27, 61, .38);
}
.modal-card {
  position: relative;
  z-index: 45;
  width: min(620px, 94vw);
  max-height: 92vh;
  padding: 22px;
  overflow: auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 22px 70px rgba(15, 27, 61, .22);
}
.modal-layer.full { display: flex; justify-content: flex-end; }
.modal-layer.full .modal-card {
  width: min(680px, 100vw);
  height: 100vh;
  max-height: none;
  border-radius: 0;
}
.modal-layer.screen {
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
}
.account-modal {
  position: relative;
  z-index: 45;
  display: flex;
  width: 100%;
  height: 100vh;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
}
@supports (height: 100dvh) {
  .account-modal { height: 100dvh; }
}
.account-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 28px;
  border-bottom: 1px solid var(--border);
}
.account-modal-head p { margin: 0; color: var(--brand); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.account-modal-head h2 { margin: 2px 0 0; font: var(--font-text-20-b); color: var(--blue-black); }
.account-modal-body {
  flex: 1;
  overflow: auto;
  padding: 28px;
  background: var(--canvas);
}
.account-modal-content {
  width: min(1080px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 16px;
}
.account-section {
  padding: 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.account-section h3 { margin: 0 0 16px; font-size: 16px; color: var(--blue-black); }
.account-profile-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.account-form { display: grid; grid-template-columns: minmax(0, 420px); gap: 14px; }
.account-timezone-picker .dashboard-link-options { z-index: 80; }
.timezone-option span {
  display: grid;
  min-width: 0;
}
.timezone-option small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-section .helper { margin: 12px 0 0; }
.account-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 28px;
  border-top: 1px solid var(--border);
  background: #fff;
}
.account-modal-foot > span { color: var(--muted); font-size: 11px; }
.account-modal-foot div { display: flex; gap: 8px; }
.modal-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.modal-head h2 { margin: 0; font-size: 17px; }
.close-button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 5px;
}

.steps {
  display: flex;
  min-width: 100%;
  margin-bottom: 4px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.step {
  position: relative;
  flex: 1;
  min-width: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}
.step { border: 0; background: transparent; font: inherit; }
.step:disabled { cursor: not-allowed; }
.step:not(:disabled) { cursor: pointer; }
.step:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.step::before {
  content: "";
  position: absolute;
  top: 14px;
  right: 50%;
  z-index: 0;
  width: 100%;
  height: 2px;
  background: var(--border);
}
.step:first-child::before { display: none; }
.step.done::before { background: var(--ok); }
.step-number {
  position: relative;
  z-index: 1;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 50%;
  font-weight: 700;
}
.step-label {
  display: block;
  min-height: 28px;
  max-width: 88px;
  line-height: 1.25;
}
.step.done .step-number { background: var(--ok); border-color: var(--ok); color: #fff; }
.step.current { color: var(--brand); font-weight: 700; }
.step.current .step-number { border-color: var(--brand); color: var(--brand); }
.step.disabled { opacity: .45; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .wide { grid-column: 1 / -1; }
.checkbox-line { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; }
.checkbox-line input { margin-top: 3px; }
.action-row { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; }

.asset-tabs-card { margin-bottom: 16px; }
.asset-tabs { min-height: 48px; }
.asset-tabs button { min-height: 32px; }
.asset-list-card { overflow: hidden; }
.asset-list-card .panel-header { flex-wrap: wrap; }
.asset-list-card h2 { display: flex; align-items: center; gap: 8px; }
.asset-list-card h2 small { color: var(--muted); font-size: 11px; font-weight: 500; }
.asset-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 16px 18px;
}
.asset-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.asset-preview {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: #eef3fa;
  color: var(--brand);
  font-size: 42px;
  font-weight: 700;
}
.asset-preview span { line-height: 1; }
.asset-placeholder-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(1.4px);
  transform: scale(1.02);
}
.asset-preview .asset-placeholder-image {
  position: absolute;
  inset: 0;
}
.asset-preview-button {
  width: 100%;
  border: 0;
}
.asset-preview-button:disabled { cursor: default; }
.asset-preview-button:not(:disabled):hover { background: #e2ebfa; }
.asset-preview-button:not(:disabled):hover .asset-placeholder-image { filter: blur(1.4px) brightness(.97); }
.asset-banner-card .asset-body { gap: 7px; }
.asset-variant-row {
  display: flex;
  gap: 4px;
  align-items: center;
  min-width: 0;
}
.asset-variant-row strong {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  line-height: 20px;
  font-weight: 700;
}
.asset-variant-row span,
.asset-variant-row em {
  min-height: 20px;
  padding: 2px 5px;
  border-radius: 3px;
  font-size: 11px;
  font-style: normal;
  line-height: 16px;
  text-align: center;
}
.asset-variant-row span {
  flex: 1 1 0;
  overflow: hidden;
  background: #f2f6fb;
  color: var(--body-text);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.asset-variant-row em {
  flex: 0 0 auto;
  min-width: 20px;
  margin-left: auto;
  background: #eaf0ff;
  color: var(--brand);
  font-weight: 700;
}
.asset-body { display: flex; flex: 1; flex-direction: column; gap: 6px; padding: 11px; }
.asset-category {
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
}
.asset-name { font-size: 12px; font-weight: 700; }
.asset-name span {
  margin-right: 2px;
  color: var(--muted);
  font-weight: 500;
}
.asset-meta { color: var(--muted); font-size: 11px; }
.asset-load-more {
  display: flex;
  justify-content: center;
  padding: 0 18px 18px;
}
.asset-detail-drawer .panel-header { padding: 0 0 14px; border-bottom: 1px solid var(--border); }
.asset-detail-body {
  display: grid;
  gap: 16px;
  padding-top: 16px;
}
.asset-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface-soft);
}
.asset-meta-grid span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
}
.asset-meta-grid strong {
  color: var(--text);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.asset-detail-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.asset-video-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.asset-video-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.asset-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 5px 9px;
  border: 1px solid var(--control-border);
  border-radius: 4px;
  background: #fff;
}
.asset-switch input {
  position: absolute;
  width: 34px;
  height: 18px;
  margin: 0;
  opacity: 0;
}
.asset-switch span {
  display: block;
  width: 34px;
  height: 18px;
  appearance: none;
  border-radius: 999px;
  background: #d7e0ec;
  transition: background .16s;
}
.asset-switch span::before {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  content: "";
  transition: transform .16s;
}
.asset-switch input:checked + span { background: var(--brand); }
.asset-switch input:checked + span::before { transform: translateX(16px); }
.asset-switch input:focus-visible + span { box-shadow: 0 0 0 3px rgba(0, 91, 255, .12); }
.asset-switch em { color: var(--body-text); font-size: 12px; font-style: normal; }
.asset-detail-preview {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 300px;
  overflow: hidden;
  background: #eef3fa;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--brand);
  font-size: 120px;
  font-weight: 700;
}
.asset-detail-preview .asset-placeholder-image,
.asset-gif-preview .asset-placeholder-image,
.asset-video-preview .asset-placeholder-image { position: absolute; inset: 0; }
.asset-detail-preview span { line-height: 1; }
.asset-detail-code { display: grid; gap: 6px; min-width: 0; }
.asset-detail-code span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}
.asset-detail-code code {
  max-height: 130px;
  padding: 10px;
  overflow: auto;
  background: #f7f9fc;
  border: 1px dashed var(--control-border);
  border-radius: 4px;
  color: var(--blue-black);
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.asset-detail-actions { padding-bottom: 2px; }
.asset-landing-layout {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(260px, 5fr);
  gap: 18px;
  padding-top: 16px;
}
.asset-landing-preview {
  height: min(620px, calc(100vh - 150px));
  padding: 14px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #f7f9fc;
}
.asset-landing-preview section {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  margin-bottom: 14px;
  overflow: hidden;
  border-radius: 6px;
  background: #eef3fa;
}
.asset-landing-preview span {
  color: var(--brand);
  font-size: 82px;
  font-weight: 700;
  line-height: 1;
}
.asset-landing-preview strong {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 3px 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .9);
  color: var(--body-text);
  font-size: 12px;
}
.asset-landing-settings {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.asset-landing-actions {
  display: flex;
  gap: 8px;
}
.asset-landing-actions .button { flex: 1; }
.asset-gif-layout {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(260px, 5fr);
  gap: 18px;
  padding-top: 16px;
}
.asset-gif-preview {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 520px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #eef3fa;
  color: var(--brand);
  font-size: 130px;
  font-weight: 700;
}
.asset-gif-preview span { line-height: 1; }
.asset-gif-settings {
  display: grid;
  gap: 16px;
  min-width: 0;
}
.asset-gif-fields {
  display: grid;
  gap: 12px;
}
.asset-video-preview {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 320px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #eef3fa;
}
.asset-video-preview .video-control {
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0, 91, 255, .9);
  color: #fff;
  font-size: 15px;
}
.asset-video-preview .video-progress {
  position: absolute;
  right: 16px;
  bottom: 14px;
  left: 16px;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 91, 255, .18);
}
.asset-video-preview .video-progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}
.asset-video-preview.playing .video-progress i {
  width: 100%;
  animation: video-progress 8s linear forwards;
}
.asset-video-preview:not(.playing):hover { background: #e2ebfa; }
@keyframes video-progress {
  from { width: 0; }
  to { width: 100%; }
}
.locked-region { position: relative; }
.locked-region.locked .asset-grid { filter: blur(2px); pointer-events: none; user-select: none; }
.gate {
  position: absolute;
  z-index: 4;
  inset: 0;
  display: grid;
  justify-items: center;
  align-items: start;
  padding: 28px 20px;
  background: rgba(15, 27, 61, .22);
}
.gate-card {
  width: min(680px, 100%);
  padding: 32px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 20px 52px rgba(15, 27, 61, .22);
  text-align: center;
}
.gate-card strong { display: block; color: var(--blue-black); font-size: 18px; line-height: 1.5; }
.gate-card p { margin: 14px 0 22px; color: var(--body-text); font-size: 14px; line-height: 1.7; }
.modal-layer.asset-code-modal {
  inset: 56px 0 0 216px;
  align-items: flex-start;
  padding: 28px 24px;
}
.asset-code-modal .modal-card { width: min(720px, 100%); max-height: calc(100dvh - 112px); padding: 28px; }
.asset-code-modal .modal-card > p { margin: 20px 0 24px; color: var(--body-text); font-size: 14px; line-height: 1.8; }
.asset-code-modal .drawer-actions { justify-content: flex-end; gap: 12px; }
.collapsed .modal-layer.asset-code-modal { left: 68px; }
@media (max-width: 991px) {
  .modal-layer.asset-code-modal { left: 68px; padding: 20px 12px; }
  .asset-code-modal .modal-card { padding: 22px; }
}
@media (max-width: 479px) {
  .gate { padding: 18px 12px; }
  .gate-card { padding: 24px 18px; }
  .gate-card strong { font-size: 16px; }
  .asset-code-modal .modal-card { padding: 20px 16px; }
}

.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.info-item span { display: block; color: var(--muted); font-size: 11px; }
.info-item strong { display: block; margin-top: 2px; font-size: 13px; overflow-wrap: anywhere; }
.program-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 2px 0 2px 16px;
  border-left: 3px solid var(--brand);
}
.program-steps-card { margin-bottom: 16px; }
.program-intro { padding-bottom: 22px; border-bottom: 1px solid var(--border); }
.program-intro h2 { margin: 0 0 8px; color: var(--blue-black); font: var(--font-text-24-b); }
.program-intro > p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.program-material-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 28px; margin-top: 22px; }
.program-material-details { min-width: 0; }
.program-channel-list { display: grid; gap: 10px; margin: 0 0 22px; }
.program-channel-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 14px;
}
.program-channel-list strong { color: var(--body-text); font-weight: 500; }
.program-channel-list span { color: var(--muted); overflow-wrap: anywhere; }
.program-material-carousel { min-width: 0; margin: 0; }
.program-material-slide {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--canvas);
}
.program-material-slide > img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.program-material-caption { display: grid; gap: 8px; padding: 18px; }
.program-material-caption strong { color: var(--blue-black); font-size: 18px; line-height: 1.5; }
.program-material-caption span { color: var(--muted); font-size: 14px; line-height: 1.8; }
.program-carousel-controls { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 12px; }
.program-carousel-controls > div { display: flex; gap: 2px; }
.program-carousel-controls .icon-button { font-size: 24px; line-height: 1; }
.program-slide-dot { display: grid; place-items: center; width: 28px; height: 32px; padding: 0; border: 0; background: transparent; }
.program-slide-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--control-border); }
.program-slide-dot.active::before { background: var(--brand); }
.program-slide-dot:focus-visible,
.program-text-link:focus-visible,
.program-material-categories > button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.program-material-description p,
.program-share-body > p { margin: 0 0 14px; color: var(--body-text); font-size: 14px; line-height: 1.9; }
.program-text-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--brand);
  font: inherit;
  font-size: 14px;
  text-align: left;
}
.program-text-link:hover { text-decoration: underline; }
.program-material-categories { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 24px; }
.program-material-categories > button {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 142px;
  padding: 18px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
}
.program-material-categories > button:hover { border-color: var(--brand); background: var(--row-hover); }
.program-category-icon { display: grid; place-items: center; width: 36px; height: 36px; color: var(--side-icon); font-size: 18px; font-weight: 700; }
.program-category-icon svg { width: 30px; height: 30px; }
.program-material-categories strong { color: var(--blue-black); font-size: 15px; }
.program-material-categories small { color: var(--muted); font-size: 12px; }
.program-share-body { padding-top: 22px; }
.program-share-links { display: grid; gap: 12px; margin: 22px 0; }
.program-basic-tools h3,
.program-advanced-tools summary {
  margin: 0;
  color: var(--blue-black);
  font-size: 16px;
  font-weight: 600;
}
.program-basic-tools p,
.program-advanced-tools p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.program-advanced-tools {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #f8fbff;
}
.program-advanced-tools summary { min-height: 36px; cursor: pointer; }
.program-advanced-tools[open] summary { margin-bottom: 8px; }
.program-advanced-tools .program-share-shortcuts { margin-top: 10px; }
.funds-stage-card {
  display: grid;
  padding: 14px 16px;
  border: 1px solid #d7e7ff;
  border-radius: 6px;
  background: #f8fbff;
}
.funds-stage-card-compact { margin-bottom: 14px; }
.funds-stage-chain {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.funds-stage-chain li {
  display: grid;
  min-width: 0;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #fff;
}
.funds-stage-chain li.current { border-color: var(--brand); background: #f0f7ff; }
.funds-stage-chain li.done { border-color: #b8d4ff; }
.funds-stage-chain strong { color: var(--text); font-size: 12px; }
.funds-stage-chain span { color: var(--muted); font-size: 11px; line-height: 1.45; }
.funds-stage-card .funds-stage-chain li.done strong::after { content: " ✓"; color: var(--brand); }
.program-share-link { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 18px; border: 1px solid var(--border); border-radius: 4px; }
.program-share-icon { display: flex; color: var(--side-icon); }
.program-share-icon svg { width: 28px; height: 28px; }
.program-share-link > div { display: grid; min-width: 0; gap: 5px; }
.program-share-link strong { color: var(--body-text); font-size: 15px; font-weight: 500; }
.program-share-link > div > span { color: var(--muted); font-size: 12px; }
.program-share-link a { display: block; overflow: hidden; color: var(--brand); font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.program-share-link > .button { min-width: 84px; min-height: 32px; white-space: nowrap; }
.program-share-body > .program-share-note { color: var(--muted); font-size: 13px; }
.program-share-shortcuts { display: flex; flex-wrap: wrap; gap: 14px 28px; }
.program-postback-guide { display: grid; gap: 12px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.program-postback-guide h3 { margin: 0; color: var(--blue-black); font-size: 16px; font-weight: 600; }
.program-postback-guide p { margin: 0; color: var(--body-text); font-size: 14px; line-height: 1.8; }
.program-postback-guide .program-text-link { justify-self: start; min-height: 36px; }
@media (max-width: 991px) {
  .program-material-layout { grid-template-columns: 1fr; gap: 22px; }
  .program-material-categories { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .program-material-caption { padding: 18px; }
  .program-material-caption strong { font-size: 18px; }
}
@media (max-width: 767px) {
  .program-intro h2 { font-size: 20px; }
  .program-material-slide { grid-template-columns: 1fr; }
  .program-material-caption { min-height: 132px; }
  .program-share-link { grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; padding: 14px 10px; }
  .program-share-icon svg { width: 22px; height: 22px; }
  .program-share-link > .button { min-height: 36px; }
  .program-carousel-controls .icon-button,
  .program-slide-dot,
  .program-text-link { min-height: 36px; }
}
.onboarding-head { margin-bottom: 18px; }
.onboarding-card > .panel-body { max-width: 960px; margin-inline: auto; }
.onboarding-card .onboarding-head { justify-content: center; text-align: center; }
.onboarding-card .onboarding-head h2 { font: var(--font-text-20-b); }
.onboarding-card .onboarding-head p { font: var(--font-text-14-r); }
.onboarding-step { max-width: 680px; margin-inline: auto; }
.onboarding-step > .commission-page-head h2 { font: var(--font-text-18-b); }
.onboarding-step > .commission-page-head p { font: var(--font-text-14-r); }
.onboarding-name { display: grid; gap: 6px; min-width: 0; }
.onboarding-name .field-label,
.onboarding-picker .field-label { font: var(--font-text-14-m); }
.onboarding-name input,
.onboarding-name textarea,
.onboarding-name select {
  width: 100%;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid var(--control-border);
  border-radius: 4px;
  color: var(--body-text);
  background: #fff;
  font: var(--font-text-14-r);
}
.onboarding-name textarea { resize: vertical; }
.onboarding-name fieldset { border: 0; padding: 0; margin: 0; }
.onboarding-picker .dashboard-link-picker-button,
.onboarding-picker .dashboard-link-option { font: var(--font-text-14-r); }
.onboarding-inline-status label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  color: var(--body-text);
  font: var(--font-text-14-r);
}
.onboarding-name input:focus,
.onboarding-picker .dashboard-link-picker-button:focus-visible {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 91, 255, .12);
  outline: none;
}
.onboarding-picker .dashboard-link-options { width: 100%; }
.onboarding-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.onboarding-details-toggle {
  margin-top: 16px;
  min-height: 36px;
}
.onboarding-details-panel {
  display: grid;
  gap: 14px;
  margin-top: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-soft);
}
.onboarding-details-head {
  display: grid;
  gap: 4px;
}
.onboarding-details-head strong {
  color: var(--blue-black);
  font: var(--font-text-14-m);
}
.onboarding-details-head span {
  color: var(--muted);
  font: var(--font-text-13-r);
}
.onboarding-crm-states {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.onboarding-crm-states > div {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #fff;
}
.onboarding-crm-states p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.onboarding-inline-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}
.onboarding-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 20px;
}
.onboarding-actions .button { min-width: 96px; }
.onboarding-card .button { font: var(--font-text-14-m); }
.onboarding-card .button.small { font-size: 13px; line-height: 20px; }
.onboarding-card .step-label,
.onboarding-card .step-number { font: var(--font-text-14-r); line-height: 20px; }
.onboarding-card .step.current .step-label { font-weight: 500; }
.onboarding-card .info-item > span { font: var(--font-text-14-m); }
.onboarding-card .info-item > strong { font: var(--font-text-14-r); }
.onboarding-kyc-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #f8fbff;
}
.onboarding-kyc-panel p {
  margin: 0;
  color: var(--muted);
  font: var(--font-text-14-r);
}
.onboarding-kyc-panel ul {
  margin: 0;
  padding-left: 20px;
  color: var(--body-text);
  font: var(--font-text-14-r);
}
.onboarding-kyc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.onboarding-kyc-head strong { color: var(--blue-black); font: var(--font-text-14-m); }
.onboarding-upload-placeholder {
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 22px 16px;
  border: 1px dashed var(--control-border);
  border-radius: 5px;
  color: var(--muted);
  background: var(--surface);
  text-align: center;
}
.onboarding-upload-placeholder > span {
  color: var(--brand);
  font-size: 22px;
  line-height: 1;
}
.onboarding-upload-placeholder strong {
  color: var(--body-text);
  font: var(--font-text-14-m);
}
.onboarding-upload-placeholder small {
  font: var(--font-text-12-r);
}
.onboarding-agreements { display: grid; gap: 8px; }
.onboarding-agreement-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #fff;
}
.onboarding-agreement-row input { width: 15px; height: 15px; accent-color: var(--brand); }
.onboarding-agreement-row span {
  flex: 1;
  min-width: 0;
  color: var(--body-text);
  font: var(--font-text-14-r);
}
.onboarding-agreement-modal h2 { font: var(--font-text-18-b); }
.onboarding-agreement-modal p { margin: 0 0 14px; color: var(--body-text); font: var(--font-text-14-r); }
.onboarding-agreement-modal .onboarding-agreement-row span { font: var(--font-text-14-r); }
.modal-agreement { border: 0; padding: 0 0 16px; }
.onboarding-submitted {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-left: 4px solid var(--brand);
  border-radius: 6px;
  background: #f0f7ff;
}
.onboarding-submitted div {
  display: flex;
  align-items: center;
  gap: 9px;
}
.onboarding-submitted strong { color: var(--blue-black); }
.onboarding-submitted strong { font: var(--font-text-14-m); }
.onboarding-submitted p { margin: 0; color: var(--muted); font: var(--font-text-14-r); }
.program-step-card,
.program-action-card { margin-bottom: 16px; }
.route-apply .main { padding-bottom: 124px; }
.program-action-card {
  position: fixed;
  z-index: 35;
  right: 0;
  bottom: 24px;
  left: 216px;
  margin: 0 30px;
  box-shadow: 0 12px 34px rgba(15, 27, 61, .14);
}
.program-action-card .panel-body { padding: 12px 18px; }
.program-action-card .action-row { margin-top: 0; }
.collapsed .program-action-card { left: 68px; }
.commission-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.commission-page-head h2 {
  margin: 3px 0 4px;
  color: var(--blue-black);
  font: var(--font-text-24-b);
}
.commission-page-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.country-picker {
  position: relative;
  display: grid;
  gap: 6px;
}
.field-label {
  color: var(--body-text);
  font-size: 13px;
  font-weight: 500;
}
.country-picker-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid var(--control-border);
  border-radius: 4px;
  background: #fff;
  color: var(--body-text);
  text-align: left;
}
.country-picker-button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.country-picker-button small { color: var(--muted); }
.support-selection-note {
  margin: 0 0 18px;
  color: #111111;
  font-size: 14px;
  line-height: 1.6;
}
.country-options {
  position: absolute;
  z-index: 70;
  top: calc(100% + 6px);
  left: 0;
  display: none;
  width: min(430px, 100%);
  padding: 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 14px 36px rgba(15, 27, 61, .16);
}
.country-picker.open .country-options { display: block; }
.country-options input {
  width: 100%;
  min-height: 34px;
  margin-bottom: 8px;
  padding: 6px 9px;
  border: 1px solid var(--control-border);
  border-radius: 4px;
}
.country-option-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.country-option-actions .button { flex: 1; }
.country-option-list {
  max-height: 300px;
  overflow-y: auto;
}
.country-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 20px;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 36px;
  padding: 6px 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--body-text);
  text-align: left;
}
.country-option:hover,
.country-option:focus-visible { background: var(--row-hover); outline: none; }
.country-option.selected { color: var(--brand); font-weight: 700; }
.country-option small { color: var(--muted); }
.country-option strong { color: var(--brand); }
.country-empty {
  padding: 18px 10px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.commission-module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.commission-module {
  min-width: 0;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: var(--shadow);
}
.commission-module header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.commission-module h3 {
  margin: 0;
  color: var(--blue-black);
  font-size: 15px;
}
.commission-module header span {
  color: var(--muted);
  font-size: 11px;
}
.commission-table-wrap { width: 100%; overflow: hidden; }
.commission-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
}
.commission-table th,
.commission-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--table-row-border);
  text-align: left;
  white-space: nowrap;
}
.commission-table th {
  background: var(--table-header-bg);
  color: var(--table-header-text);
  font-size: 12px;
  font-weight: var(--table-header-weight);
}
.commission-table td { color: var(--body-text); font-size: var(--table-body-size); }
.commission-table th:last-child,
.commission-table td:last-child { text-align: right; }
.support-table th,
.support-table td { text-align: left; }
.support-table td[colspan="2"] { white-space: normal; }
.support-table .support-badge { font-size: 12px; }
.support-table .support-badge.no { color: var(--danger); }
.commission-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.commission-info-card {
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.commission-info-card h3 {
  margin: 0 0 10px;
  color: var(--blue-black);
  font-size: 16px;
}
.commission-info-card ol,
.commission-info-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--body-text);
  font-size: 12px;
  line-height: 1.8;
}
.commission-info-card ul { list-style-type: disc; }
.conversion-page-notes {
  display: grid;
  gap: 4px;
  margin-top: 10px;
}
.conversion-page-notes p {
  color: var(--body-text);
  font-size: 14px;
}
.conversion-module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.conversion-module {
  min-width: 0;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: var(--shadow);
}
.conversion-module header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.conversion-module h3 {
  margin: 0;
  color: var(--blue-black);
  font-size: 15px;
}
.conversion-module header span {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.conversion-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
}
.conversion-table th,
.conversion-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--table-row-border);
  text-align: left;
  white-space: nowrap;
}
.conversion-table th {
  background: var(--table-header-bg);
  color: var(--table-header-text);
  font-size: 12px;
  font-weight: var(--table-header-weight);
}
.conversion-table td {
  color: var(--body-text);
  font-size: var(--table-body-size);
}
.conversion-table th:nth-child(2),
.conversion-table td:nth-child(2),
.conversion-table th:nth-child(3),
.conversion-table td:nth-child(3) {
  text-align: right;
}
.program-hero > div { display: grid; gap: 4px; min-width: 0; }
.program-hero span { color: var(--brand); font-size: 11px; font-weight: 700; }
.program-hero strong { color: var(--blue-black); font-size: 19px; }
.program-hero p { margin: 0; color: var(--muted); font-size: 12px; }
.program-flow {
  display: grid;
  grid-template-columns: repeat(6, minmax(82px, 1fr));
  gap: 8px;
  margin: 18px 0;
}
.program-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0;
}
.program-filter-bar .field { flex: 1 1 220px; margin: 0; }
.program-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 4px 0 18px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.program-metric {
  display: grid;
  gap: 3px;
  padding: 14px 16px;
  border-left: 1px solid var(--border);
}
.program-metric:first-child { border-left: 0; padding-left: 0; }
.program-metric span { color: var(--muted); font-size: 11px; }
.program-metric strong { color: var(--blue-black); font-size: 18px; }
.program-metric small { color: var(--muted); font-size: 11px; }
.program-support-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}
.program-support-grid > div {
  display: grid;
  gap: 5px;
  padding-left: 12px;
  border-left: 3px solid var(--border);
}
.program-support-grid span,
.program-guide-grid span { color: var(--muted); font-size: 11px; font-weight: 700; }
.program-support-grid small,
.program-guide-grid p { color: var(--muted); font-size: 12px; }
.support-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
}
.support-badge.yes { color: var(--ok); }
.support-badge.no { color: var(--danger); }
.program-filter-group { display: grid; gap: 7px; margin-bottom: 14px; }
.program-filter-group > span { color: var(--muted); font-size: 11px; font-weight: 700; }
.program-guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.program-guide-grid article {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-top: 14px;
  border-top: 2px solid var(--border);
}
.program-guide-grid strong { color: var(--blue-black); font-size: 16px; }
.program-guide-grid .button { align-self: flex-start; margin-top: auto; }
.share-text {
  width: 100%;
  min-height: 116px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--control-border);
  border-radius: 4px;
  color: var(--body-text);
  font: inherit;
  font-size: 12px;
  line-height: 1.6;
  resize: vertical;
}
.program-node {
  display: grid;
  min-height: 68px;
  place-items: center;
  padding: 10px 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 5px;
  text-align: center;
}
.program-node span { color: var(--muted); font-size: 11px; }
.program-node strong { color: var(--blue-black); font-size: 15px; }
.program-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin: 4px 0 14px;
}
.program-section-head h3 { margin: 0; color: var(--blue-black); font-size: 16px; }
.program-section-head p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.route-apply .program-intro h2,
.route-apply .commission-page-head h2 { font: var(--font-text-18-b); }
.route-apply .steps .step { min-width: 120px; }
.route-apply .step-label { max-width: 144px; min-height: 32px; font-size: 13px; line-height: 1.5; }
.route-apply .toast { bottom: 104px; }
.route-apply .simulation-launcher { bottom: 158px; }
.program-reward-overview { margin-bottom: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.program-reward-overview h3,
.program-funds-flow h3,
.program-funds-rules h3,
.program-share-recap h3 { margin: 0 0 12px; color: var(--blue-black); font-size: 16px; font-weight: 600; }
.program-reward-stages,
.program-funds-timeline { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.program-reward-stages li { min-width: 0; padding-left: 14px; border-left: 2px solid var(--border); }
.program-stage-label { color: var(--muted); font-size: 12px; }
.program-reward-stages h4 { margin: 5px 0 8px; color: var(--brand); font-size: 16px; font-weight: 600; }
.program-reward-stages p,
.program-detail-copy p,
.program-funds-flow p,
.program-funds-rules p,
.program-settlement-summary > p { margin: 0; color: var(--body-text); font-size: 14px; line-height: 1.8; }
.program-rule-note { margin: 14px 0 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.program-settlement-summary { margin: 0 18px; padding: 16px 0; border-top: 1px solid var(--border); }
.program-rule-details { margin-top: 12px; }
.program-rule-details > summary { width: fit-content; max-width: 100%; padding: 6px 0; color: var(--brand); font-size: 14px; line-height: 1.6; cursor: pointer; }
.program-rule-details > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.program-detail-copy { display: grid; gap: 12px; padding: 12px 0 4px; }
.program-detail-copy .program-text-link { justify-self: start; }
.program-text-link:disabled { color: var(--muted); cursor: default; }
.program-funds-flow { margin-top: 20px; padding: 20px; background: var(--row-hover); }
.program-funds-timeline { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.program-funds-timeline li { position: relative; min-width: 0; padding: 0 18px 0 0; }
.program-funds-timeline li::before { position: absolute; top: 14px; right: 0; left: 28px; height: 1px; background: var(--border); content: ""; }
.program-funds-timeline li:last-child::before { display: none; }
.program-funds-timeline li > span { position: relative; display: grid; width: 28px; height: 28px; margin-bottom: 10px; place-items: center; border: 1px solid var(--border); border-radius: 50%; color: var(--brand); background: var(--surface); font-size: 12px; }
.program-funds-timeline strong { display: block; margin-bottom: 8px; color: var(--blue-black); font-size: 14px; font-weight: 600; }
.program-funds-rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; padding: 22px 0 12px; }
.program-funds-rules p + p { margin-top: 10px; }
.program-rule-example { padding: 8px 0 16px; border-bottom: 1px solid var(--border); }
.program-rule-values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; margin: 0; }
.program-rule-values dt { margin-bottom: 5px; color: var(--muted); font-size: 13px; }
.program-rule-values dd { margin: 0; color: var(--body-text); font-size: 14px; overflow-wrap: anywhere; }
.program-entry-head { margin-top: 22px; }
.route-apply .program-guide-grid p,
.route-apply .program-section-head p { font-size: 14px; line-height: 1.8; }
.route-apply .program-guide-grid article { gap: 10px; }
.route-apply .program-guide-grid p { margin: 0 0 6px; }
.program-share-recap { margin: 18px 0; padding-top: 18px; border-top: 1px solid var(--border); }
.program-share-recap ul { display: grid; gap: 8px; margin: 0; padding-left: 18px; color: var(--body-text); font-size: 14px; line-height: 1.8; }
@media (max-width: 991px) {
  .program-reward-stages,
  .program-funds-rules { grid-template-columns: 1fr; gap: 18px; }
  .program-funds-timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 0; }
  .program-funds-timeline li:nth-child(2)::before { display: none; }
}
@media (max-width: 479px) {
  .program-funds-timeline,
  .program-rule-values { grid-template-columns: 1fr; }
  .program-funds-timeline li { padding-left: 40px; padding-right: 0; }
  .program-funds-timeline li > span { position: absolute; left: 0; top: 0; }
  .program-funds-timeline li::before,
  .program-funds-timeline li:nth-child(2)::before { display: block; top: 28px; bottom: -18px; left: 14px; width: 1px; height: auto; }
  .program-funds-timeline li:last-child::before { display: none; }
  .program-rule-details > summary { min-height: 36px; }
}
.program-country-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.program-country {
  display: grid;
  gap: 5px;
  padding: 13px;
  border: 1px solid #d7e0ec;
  border-radius: 5px;
  background: #fff;
  text-align: left;
}
.program-country span { color: var(--blue-black); font-size: 14px; font-weight: 700; }
.program-country small { color: var(--muted); font-size: 11px; }
.program-country strong { color: var(--body-text); font-size: 12px; }
.program-country.active { background: #f0f7ff; border-color: var(--brand); }
.program-country.active strong { color: var(--brand); }
.program-checklist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.program-checklist > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 5px;
}
.program-checklist span { color: var(--blue-black); font-weight: 700; }
.program-checklist small { grid-column: 1 / -1; color: var(--muted); font-size: 11px; }
.program-checklist .button { grid-row: 2; grid-column: 2; }
.program-link-panel { gap: 12px; }
.program-link-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.status-line { display: flex; align-items: center; gap: 8px; }
.question-button {
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: #eaf0ff;
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
}
.result-card { padding: 18px; }
.notice-panel {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 220px;
  padding: 28px;
  border: 1px dashed var(--control-border);
  color: var(--muted);
  text-align: center;
}
.toast {
  position: fixed;
  z-index: 80;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(480px, calc(100vw - 32px));
  padding: 11px 16px;
  background: #17212b;
  border-radius: 6px;
  color: #fff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, .24);
}

.collapsed .sidebar { width: 68px; }
.collapsed .nav-label,
.collapsed .nav-group { display: none; }
.collapsed .sidebar .nav-item { justify-content: center; padding: 10px; }
.collapsed .nav-parent { justify-content: center; padding: 10px; }
.collapsed .nav-parent-toggle { display: none; }
.collapsed .nav-chevron,
.collapsed .nav-children { display: none !important; }
.collapsed .workspace { margin-left: 68px; }
.sidebar-hover-open .sidebar {
  width: 216px;
  box-shadow: 12px 0 30px rgba(20, 40, 80, .12);
}
.collapsed.sidebar-hover-open .nav-label { display: flex !important; }
.collapsed.sidebar-hover-open .nav-chevron { display: block !important; }
.collapsed.sidebar-hover-open .nav-parent-toggle { display: grid; }
.collapsed.sidebar-hover-open .nav-parent,
.collapsed.sidebar-hover-open .sidebar .nav-item { justify-content: flex-start; padding: 8px 10px; }
.collapsed.sidebar-hover-open .nav-section.open .nav-children { display: block !important; }

@media (max-width: 1199px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 991px) {
  .login-view { grid-template-columns: 1fr; }
  .auth-visual { min-height: 220px; max-height: 260px; }
  .auth-panel { min-height: auto; padding: 30px 22px 42px; }
  .login-mode .auth-visual-login { position: fixed; inset: 0; display: block; min-height: 0; max-height: none; height: 100%; }
  .login-mode .auth-visual-register { display: none; }
  .login-mode .auth-panel {
    width: min(606px, calc(100vw - 32px));
    min-height: auto;
    align-self: center;
    margin: 24px auto;
    padding: 30px 22px;
    border-radius: 14px;
  }
  .sidebar {
    top: 56px;
    width: 68px;
    transform: translateX(0);
  }
  .workspace,
  .collapsed .workspace { margin-left: 68px; }
  .collapsed .sidebar { width: 68px; }
  .mobile-nav-open .sidebar,
  .sidebar-hover-open .sidebar { width: 216px; }
  .collapsed .brand-text,
  .sidebar .brand-text,
  .collapsed .nav-label,
  .sidebar .nav-label,
  .collapsed .nav-chevron,
  .sidebar .nav-chevron,
  .collapsed .nav-children,
  .sidebar .nav-children { display: none !important; }
  .collapsed .sidebar .nav-item,
  .sidebar .nav-item,
  .collapsed .nav-parent,
  .sidebar .nav-parent { justify-content: center; padding: 10px; }
  .collapsed .nav-parent-toggle,
  .sidebar .nav-parent-toggle { display: none; }
  .sidebar-toggle,
  .collapsed .sidebar-toggle { margin: 0 auto 8px; }
  .mobile-nav-open .sidebar .brand-text,
  .mobile-nav-open .sidebar .nav-label,
  .mobile-nav-open .sidebar .nav-chevron,
  .sidebar-hover-open .sidebar .brand-text,
  .sidebar-hover-open .sidebar .nav-label,
  .sidebar-hover-open .sidebar .nav-chevron { display: block !important; }
  .mobile-nav-open .sidebar .nav-item,
  .mobile-nav-open .sidebar .nav-parent,
  .sidebar-hover-open .sidebar .nav-item,
  .sidebar-hover-open .sidebar .nav-parent { justify-content: flex-start; padding: 8px 10px; }
  .mobile-nav-open .sidebar .nav-parent-toggle,
  .sidebar-hover-open .sidebar .nav-parent-toggle { display: grid; }
  .mobile-nav-open .sidebar .sidebar-toggle,
  .sidebar-hover-open .sidebar .sidebar-toggle { margin: 0 10px 8px auto; }
  .mobile-nav-open .nav-section.open .nav-children,
  .sidebar-hover-open .nav-section.open .nav-children { display: block !important; }
  .main { padding: 18px 10px; }
  .topbar { padding: 0 16px; }
  .wallet span { display: none; }
  .scenario-control span { display: none; }
  .topbar-brand .brand-text { display: none; }
  .topbar-clock { min-width: 270px; }
  .dashboard-link-controls { grid-template-columns: 1fr; }
  .dashboard-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: 1fr; }
  .program-flow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .commission-module-grid,
  .conversion-module-grid,
  .commission-info-grid,
  .program-support-grid,
  .program-guide-grid { grid-template-columns: 1fr; }
  .program-hero,
  .program-section-head { align-items: flex-start; flex-direction: column; }
  .onboarding-field-grid { grid-template-columns: 1fr; }
  .onboarding-kyc-head { align-items: flex-start; flex-direction: column; }
  .onboarding-actions { justify-content: center; flex-direction: row; }
  .onboarding-actions .button { min-height: 36px; }
  .onboarding-agreement-row { align-items: flex-start; flex-wrap: wrap; }
  .onboarding-agreement-row .button { width: 100%; }
  .asset-detail-fields,
  .asset-landing-layout,
  .asset-gif-layout { grid-template-columns: 1fr; }
  .asset-landing-preview { height: 420px; }
  .asset-gif-preview { min-height: 320px; }
  .asset-tabs { padding: 6px; }
  .program-action-card {
    left: 68px;
    bottom: 16px;
    margin: 0 16px;
  }
  .account-modal-head,
  .account-modal-foot { padding: 14px 18px; }
  .account-modal-body { padding: 18px; }
  .account-profile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .tutorial-card { width: 100%; }
  .asset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .funds-stage-chain { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .onboarding-crm-states { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 479px) {
  .wallet-popover { position: fixed; top: 52px; right: 12px; width: min(260px, calc(100vw - 24px)); }
  .demo-note-full { display: none; }
  .demo-note-compact { display: inline; }
  .topbar-demo-note { margin-left: 6px; }
  .cards { grid-template-columns: 1fr; }
  .topbar-caption { display: none; }
  .topbar-tools { gap: 4px; }
  .topbar-clock {
    grid-template-columns: minmax(0, 1fr);
    min-width: 196px;
  }
  .topbar-clock > div { justify-content: flex-start; gap: 5px; }
  .topbar-clock span { font-size: 9px; }
  .topbar-clock strong { font-size: 10px; }
  .topbar-clock > div > small { font-size: 8px; }
  .scenario-control select { min-width: 68px; }
  .auth-visual { min-height: 176px; }
  .auth-panel { padding: 24px 16px 34px; }
  .login-mode .auth-panel {
    width: calc(100vw - 24px);
    margin: 16px auto;
    padding: 26px 16px;
  }
  .login-panel input,
  .login-panel select { min-height: 44px; }
  .account-profile-grid,
  .account-form { grid-template-columns: 1fr; }
  .account-modal-head { align-items: flex-start; flex-direction: column; }
  .account-modal-foot { align-items: flex-start; flex-direction: column; }
  .account-modal-foot div { width: 100%; }
  .account-modal-foot .button { flex: 1; }
  .page-header { display: block; }
  .page-actions { margin-top: 12px; }
  .chart { height: 180px; }
  .dashboard-link-address { grid-template-columns: 1fr; }
  .dashboard-link-address .button { width: 100%; }
  .dashboard-summary-filter { align-items: flex-start; flex-direction: column; }
  .asset-grid { grid-template-columns: 1fr; }
  .program-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .program-filter-bar .field { flex: 1 1 100%; }
  .steps { overflow-x: auto; }
  .step { min-width: 82px; }
  .program-action-card { margin: 0 12px; }
  .program-action-card .panel-body { padding: 10px 12px; }
  .kyc-banner { align-items: flex-start; flex-direction: column; }
  .funds-stage-chain { grid-template-columns: minmax(0, 1fr); }
  .program-share-shortcuts { align-items: flex-start; flex-direction: column; gap: 8px; }
}

/* D-03 unified popover: the hidden attribute always wins over class-based display rules. */
[data-aff-popover-panel][hidden] { display: none !important; }

/* D-CREDIT-09: compact modal on short viewports so level lists never clip. */
@media (max-height: 700px) {
  .modal-card { padding: 12px; }
  .modal-card .partner-credit-benefits-modal { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin-bottom: 6px; }
  .modal-card .partner-credit-benefits-modal span { padding: 5px 6px; font-size: 11px; gap: 1px; }
  .modal-card .partner-credit-benefits-modal b { font-size: 12px; }
  .modal-card .partner-credit-benefits-modal small { font-size: 10px; }
  .modal-card .modal-head { padding-bottom: 6px; margin-bottom: 6px; }
  .modal-card .modal-head h2 { font-size: 15px; }
  .partner-credit-lvlist-caption small { font-size: 11px; }
  .partner-credit-lv { padding: 4px 8px; }
  .partner-credit-lvlist { gap: 4px; }
  .partner-credit-lv-head b { width: 20px; height: 20px; }
  .drawer-actions { margin-top: 8px; }
  .drawer-actions .button { min-height: 30px; }
}
@media (max-width: 480px) and (max-height: 700px) {
  .modal-card .partner-credit-benefits-modal { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .partner-credit-lv { grid-template-columns: minmax(0, 1fr) auto; padding: 4px 8px; }
  .modal-card .partner-credit-benefits-modal small { display: none; }
  .partner-credit-lvlist-caption small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}

/* D-CREDIT-09: very short viewports — full-height sheet instead of a clipped card. */
@media (max-height: 620px) {
  .modal-layer { align-items: stretch; padding: 0; }
  .modal-card { width: min(620px, 100vw); max-height: none; height: 100%; border-radius: 0; }
}
