:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --surface: #ffffff;
  --text: #16202a;
  --muted: #627084;
  --line: #d9e1e7;
  --brand: #087562;
  --brand-dark: #064f43;
  --danger: #ad2635;
  --success: #197346;
  --warning: #a75b08;
}

/* Unified admin interaction feedback */
.admin-toast-region {
  position: fixed;
  z-index: 1400;
  top: 18px;
  right: 18px;
  display: grid;
  width: min(420px, calc(100vw - 32px));
  gap: 8px;
  pointer-events: none;
}

.admin-toast {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) 28px;
  align-items: start;
  gap: 10px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 40px rgb(22 32 42 / 16%);
  padding: 12px 12px 12px 10px;
  pointer-events: auto;
}

.admin-toast.success {
  border-left-color: var(--success);
}

.admin-toast.error {
  border-left-color: var(--danger);
}

.admin-toast.attention {
  border-left-color: var(--warning);
}

.admin-toast.progress .admin-toast-mark {
  border-color: var(--line);
  border-top-color: var(--brand);
  animation: admin-spin 700ms linear infinite;
}

.admin-toast-mark {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border: 2px solid currentColor;
  border-radius: 50%;
  color: var(--brand);
}

.admin-toast.success .admin-toast-mark {
  color: var(--success);
}

.admin-toast.error .admin-toast-mark {
  color: var(--danger);
}

.admin-toast.attention .admin-toast-mark {
  color: var(--warning);
}

.admin-toast p {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.admin-toast button {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.admin-confirm-layer {
  position: fixed;
  z-index: 1500;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
}

.admin-confirm-layer[hidden] {
  display: none;
}

.admin-confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(10 18 26 / 56%);
}

.admin-confirm-dialog {
  position: relative;
  width: min(460px, 100%);
  border: 1px solid var(--line);
  border-top: 4px solid var(--warning);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgb(10 18 26 / 30%);
  padding: 24px;
}

.admin-confirm-layer.danger .admin-confirm-dialog {
  border-top-color: var(--danger);
}

.admin-confirm-kicker {
  display: block;
  margin-bottom: 8px;
  color: var(--warning);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-confirm-layer.danger .admin-confirm-kicker {
  color: var(--danger);
}

.admin-confirm-dialog h2 {
  margin-bottom: 8px;
  font-size: 22px;
}

.admin-confirm-dialog p {
  margin-bottom: 22px;
  color: var(--muted);
  line-height: 1.6;
}

.admin-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.admin-confirm-layer.danger [data-admin-confirm-accept] {
  border-color: var(--danger);
  background: var(--danger);
}

.admin-confirm-open {
  overflow: hidden;
}

.button.is-loading,
.admin-nav a.is-loading {
  cursor: wait;
  opacity: 0.82;
  pointer-events: none;
}

.button.is-loading::before {
  width: 12px;
  height: 12px;
  margin-right: 8px;
  border: 2px solid rgb(255 255 255 / 45%);
  border-top-color: currentColor;
  border-radius: 50%;
  content: "";
  animation: admin-spin 700ms linear infinite;
}

form[aria-busy="true"] input,
form[aria-busy="true"] select,
form[aria-busy="true"] textarea {
  cursor: wait;
}

@keyframes admin-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 640px) {
  .admin-toast-region {
    top: 10px;
    right: 10px;
    width: calc(100vw - 20px);
  }

  .admin-confirm-dialog {
    padding: 20px;
  }

  .admin-confirm-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

* {
  box-sizing: border-box;
}

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

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

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

.hero {
  padding: 52px 0;
}

.compact-hero {
  min-height: 56vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 14px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 16px;
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: 0;
}

.lede {
  max-width: 700px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.actions,
.form-actions,
.admin-header,
.section-head,
.inline-form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--brand);
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.button:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
}

.button.secondary {
  background: transparent;
  color: var(--brand);
}

.button.secondary:hover {
  background: #e8f4f1;
}

.button.mini {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.admin-shell {
  padding-top: 26px;
}

.admin-header {
  justify-content: space-between;
  margin-bottom: 18px;
}

.admin-header h1 {
  margin-bottom: 0;
  font-size: 34px;
}

.tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.tabs a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  padding: 0 10px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.tabs a.active {
  border-color: var(--brand);
  color: var(--brand);
}

.admin-nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}

.admin-nav > div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 10px;
}

.admin-nav strong {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.admin-nav span {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.admin-nav a {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border-radius: 6px;
  color: var(--text);
  padding: 0 8px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.admin-nav a:hover,
.admin-nav a.active {
  background: #e8f4f1;
  color: var(--brand);
}

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

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

.metric,
.panel,
.notice {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.metric {
  min-height: 94px;
  padding: 14px;
}

.metric span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  font-size: 27px;
  line-height: 1.1;
}

.dashboard-visuals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.visual-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
}

.visual-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.visual-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.visual-head strong {
  color: var(--text);
  font-size: 20px;
}

.visual-card p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.k-scale {
  position: relative;
  height: 12px;
  border-radius: 6px;
  background: #e9eef1;
}

.k-scale i {
  position: absolute;
  inset: 0 0 0 60%;
  border-radius: 6px;
  background: #a6e1d5;
}

.k-scale b {
  position: absolute;
  top: 50%;
  width: 16px;
  height: 16px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 1px 5px #0003;
  transform: translate(-50%, -50%);
}

.scale-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
}

.funnel-row {
  display: grid;
  grid-template-columns: 110px minmax(80px, 1fr) 54px;
  align-items: center;
  gap: 9px;
  margin-top: 10px;
  font-size: 12px;
}

.funnel-row > i {
  height: 9px;
  overflow: hidden;
  border-radius: 5px;
  background: #e9eef1;
}

.funnel-row > i > b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.funnel-row > strong {
  text-align: right;
}

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

.finance-split span {
  min-width: 0;
  border-left: 3px solid #a6e1d5;
  padding-left: 9px;
}

.finance-split small,
.finance-split b {
  display: block;
}

.finance-split small {
  margin-bottom: 5px;
  color: var(--muted);
}

.finance-split b {
  overflow-wrap: anywhere;
  font-size: 15px;
}

.bonus-admin-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding: 10px 0;
  font-size: 13px;
}

.bonus-admin-row span {
  color: var(--muted);
}

.panel {
  margin-top: 16px;
  padding: 18px;
}

.notice {
  margin-bottom: 16px;
  padding: 12px 14px;
  font-weight: 750;
}

.notice.success {
  color: var(--success);
}

.notice.error {
  color: var(--danger);
}

.section-head {
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-head h2 {
  margin-bottom: 0;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  padding: 9px 10px;
  min-height: 38px;
}

textarea {
  resize: vertical;
  line-height: 1.45;
}

input[type="checkbox"] {
  width: auto;
  min-height: auto;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  outline: 3px solid #cbeee8;
}

.search-form {
  display: flex;
  width: min(460px, 100%);
  gap: 8px;
}

.grid-form,
.settings-form,
.row-editor {
  display: grid;
  gap: 10px;
}

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

.grid-form textarea,
.grid-form .button,
.grid-form .full-row {
  grid-column: span 5;
}

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

.settings-form label span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.settings-form .button {
  grid-column: 1 / -1;
}

.row-editor {
  grid-template-columns: 1.2fr 0.6fr 0.9fr 0.9fr 0.7fr 1.4fr auto;
  align-items: start;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.spin-editor {
  grid-template-columns: 1.2fr 0.7fr 0.7fr 1fr 0.6fr 0.7fr 0.6fr auto;
}

.box-editor {
  grid-template-columns: 1.2fr 0.8fr 0.7fr 0.7fr 0.7fr auto;
}

.withdrawal-task-editor {
  grid-template-columns: 1.05fr 1.45fr 0.4fr 0.6fr 0.55fr 0.55fr 1.4fr 0.8fr auto;
}

.muted {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.inline-form {
  gap: 8px;
}

.inline-form label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  white-space: nowrap;
}

.inline-form input,
.inline-form select {
  width: auto;
}

.withdrawal-status {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border: 1px solid #d3dcd9;
  border-radius: 6px;
  background: #f3f6f5;
  padding: 3px 8px;
  color: #51615b;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.withdrawal-status.pending,
.withdrawal-status.under_review {
  border-color: #ead4a8;
  background: #fff6df;
  color: #9a6719;
}

.withdrawal-status.approved {
  border-color: #a9d8cb;
  background: #e9f8f3;
  color: #18775f;
}

.withdrawal-status.paid {
  border-color: #9fd1af;
  background: #e8f7ed;
  color: #1f7b43;
}

.withdrawal-status.rejected,
.withdrawal-status.cancelled {
  border-color: #e7b9bd;
  background: #fff0f1;
  color: #a33d48;
}

.withdrawal-review-form {
  display: grid;
  width: 255px;
  gap: 7px;
}

.withdrawal-review-form input,
.withdrawal-review-form select {
  width: 100%;
  min-width: 0;
}

.withdrawal-review-form > small {
  color: #6f7d78;
  font-size: 10px;
  line-height: 1.4;
}

.withdrawal-proof-upload {
  display: grid;
  gap: 5px;
  color: #4f5f59;
  font-size: 11px;
  font-weight: 800;
}

.withdrawal-review-form input[type="file"] {
  border: 1px dashed #9fbab1;
  border-radius: 6px;
  background: #f5faf8;
  padding: 7px;
  color: #4f5f59;
  font-size: 10px;
}

.withdrawal-metrics .metric small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.withdrawal-workspace .section-head {
  align-items: end;
}

.withdrawal-filter-form {
  display: flex;
  max-width: 720px;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.withdrawal-filter-form input {
  min-width: 250px;
}

.withdrawal-bulk-bar {
  display: grid;
  grid-template-columns: auto auto minmax(520px, 1fr);
  align-items: center;
  gap: 10px 16px;
  margin: 14px 0;
  border: 1px solid #d7e3de;
  border-radius: 6px;
  background: #f4f8f6;
  padding: 10px 12px;
}

.withdrawal-bulk-bar > label,
.withdrawal-bulk-bar > span {
  white-space: nowrap;
  font-size: 12px;
  font-weight: 800;
}

.withdrawal-bulk-bar > small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
}

[data-withdrawal-batch-form] {
  display: grid;
  grid-template-columns: minmax(170px, .7fr) minmax(220px, 1fr) auto;
  gap: 8px;
}

.withdrawal-table td {
  vertical-align: top;
}

.withdrawal-select-cell {
  width: 34px;
  text-align: center;
}

.withdrawal-amount,
.withdrawal-account-cell > span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.usdt-withdrawal-config > summary > strong,
.usdt-net-amount {
  color: #047857;
}

.kol-binding-policy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 14px 0;
}

.kol-profile-table strong {
  color: #0f766e;
}

@media (max-width: 760px) {
  .kol-binding-policy {
    align-items: stretch;
    flex-direction: column;
  }
}

.withdrawal-account-cell code {
  max-width: 300px;
  overflow-wrap: anywhere;
  white-space: normal;
}

.withdrawal-amount {
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
}

.withdrawal-risk-flag {
  width: fit-content;
  border: 1px solid #e9b8bd;
  border-radius: 5px;
  background: #fff0f1;
  padding: 3px 6px;
  color: #a33d48 !important;
  font-weight: 800;
}

.withdrawal-row-action > summary {
  width: fit-content;
  cursor: pointer;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 850;
}

.withdrawal-row-action[open] {
  min-width: 270px;
}

.withdrawal-row-action .withdrawal-review-form {
  margin-top: 8px;
}

@media (max-width: 900px) {
  .withdrawal-workspace .section-head { align-items: stretch; }
  .withdrawal-filter-form { max-width: none; justify-content: flex-start; }
  .withdrawal-bulk-bar { grid-template-columns: 1fr 1fr; }
  [data-withdrawal-batch-form] { grid-column: 1 / -1; grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .withdrawal-filter-form,
  .withdrawal-filter-form input,
  .withdrawal-filter-form select,
  .withdrawal-filter-form .button { width: 100%; min-width: 0; }
  .withdrawal-bulk-bar { grid-template-columns: 1fr; }
  [data-withdrawal-batch-form],
  .withdrawal-bulk-bar > small { grid-column: auto; }
}

.withdrawal-proof-link {
  display: grid;
  width: 104px;
  gap: 5px;
  color: #14765f;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.withdrawal-proof-link img {
  width: 104px;
  height: 68px;
  border: 1px solid #ced9d5;
  border-radius: 6px;
  background: #eef3f1;
  object-fit: cover;
}

.withdrawal-proof-link.compact {
  display: inline-flex;
  width: auto;
}

.withdrawal-proof-empty {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 6px;
  background: #f0f3f2;
  padding: 3px 8px;
  color: #74817c;
  font-size: 11px;
  white-space: nowrap;
}

.withdrawal-review-dashboard {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.withdrawal-review-dashboard > div {
  min-width: 0;
  border: 1px solid #d7e3de;
  border-left: 4px solid #4f927b;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.withdrawal-review-dashboard span,
.withdrawal-review-dashboard strong {
  display: block;
}

.withdrawal-review-dashboard span {
  color: var(--muted);
  font-size: 12px;
}

.withdrawal-review-dashboard strong {
  margin-top: 5px;
  font-size: 18px;
}

.withdrawal-review-dashboard .attention {
  border-left-color: #c98218;
}

.withdrawal-review-config {
  margin-bottom: 14px;
}

.withdrawal-review-config > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  list-style: none;
}

.withdrawal-review-config > summary span,
.withdrawal-review-config > summary small {
  display: block;
}

.withdrawal-review-config > summary small {
  margin-top: 3px;
  color: var(--muted);
}

.withdrawal-review-config form {
  margin-top: 14px;
  border-top: 1px solid #d7e3de;
  padding-top: 14px;
}

.withdrawal-acceleration-cell {
  min-width: 150px;
}

.withdrawal-acceleration-cell span,
.withdrawal-acceleration-cell small,
.withdrawal-acceleration-cell b {
  display: block;
  margin-top: 3px;
}

@media (max-width: 900px) {
  .withdrawal-review-dashboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* KOL operations workspace */
.kol-workspace-tabs {
  display: inline-flex;
  gap: 2px;
  margin-bottom: 12px;
  border: 1px solid #ccd9d5;
  border-radius: 6px;
  background: #edf3f1;
  padding: 3px;
}

.kol-workspace-tabs a {
  border-radius: 4px;
  padding: 8px 16px;
  color: #52645e;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.kol-workspace-tabs a:hover,
.kol-workspace-tabs a:focus-visible {
  background: #fff;
  color: #126d56;
}

.kol-workspace-tabs a.active {
  background: #187c63;
  color: #fff;
}

.kol-overview-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 14px;
  border: 1px solid #d7e1de;
  border-radius: 8px;
  background: #fff;
}

.kol-overview-strip article {
  display: grid;
  min-width: 0;
  min-height: 108px;
  align-content: center;
  gap: 6px;
  padding: 14px 16px;
}

.kol-overview-strip article + article {
  border-left: 1px solid #e1e8e6;
}

.kol-overview-strip span,
.kol-overview-strip strong,
.kol-overview-strip small,
.kol-overview-strip em {
  display: block;
  min-width: 0;
  margin: 0;
}

.kol-overview-strip span {
  color: #65746f;
  font-size: 12px;
  font-weight: 750;
}

.kol-overview-strip strong {
  color: #17241f;
  font-size: 25px;
  line-height: 1.1;
}

.kol-overview-strip strong em {
  display: inline;
  color: #28735f;
  font-size: 13px;
  font-style: normal;
}

.kol-overview-strip small {
  overflow-wrap: anywhere;
  color: #7b8884;
  font-size: 11px;
}

.kol-commission-panel {
  padding: 0;
  overflow: visible;
}

.kol-commission-panel details:not([open]) > :not(summary),
.kol-results-panel details:not([open]) > :not(summary) {
  display: none;
}

.kol-commission-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border-bottom: 1px solid #dce5e2;
}

.kol-commission-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.kol-commission-title h2 {
  margin: 0;
  font-size: 20px;
}

.kol-refresh-status {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #71807a;
  font-size: 11px;
}

.kol-refresh-status form {
  margin: 0;
}

.kol-finance-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(190px, auto);
  align-items: stretch;
  border-bottom: 1px solid #dce5e2;
  background: #f7faf9;
}

.kol-finance-summary > span {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 5px;
  padding: 15px 18px;
  border-right: 1px solid #dce5e2;
}

.kol-finance-summary > span.primary {
  border-top: 3px solid #187c63;
  background: #f1f8f5;
}

.kol-finance-summary small,
.kol-finance-summary strong,
.kol-finance-summary em {
  display: block;
  min-width: 0;
  margin: 0;
}

.kol-finance-summary small {
  color: #66756f;
  font-size: 11px;
  font-weight: 800;
}

.kol-finance-summary strong {
  color: #17241f;
  font-size: 24px;
  line-height: 1.1;
}

.kol-finance-summary .primary strong {
  color: #126d56;
}

.kol-finance-summary em {
  overflow-wrap: anywhere;
  color: #7c8985;
  font-size: 10px;
  font-style: normal;
}

.kol-finance-summary > details {
  position: relative;
  display: grid;
  align-content: center;
  padding: 14px 18px;
}

.kol-finance-summary > details > summary {
  width: 100%;
}

.kol-finance-summary .kol-settlement-confirm {
  top: calc(100% - 8px);
  right: 18px;
  min-width: 340px;
}

.kol-master-detail {
  display: grid;
  grid-template-columns: minmax(330px, 0.38fr) minmax(0, 0.62fr);
  min-height: 520px;
  border-bottom: 1px solid #dce5e2;
}

.kol-channel-master {
  min-width: 0;
  border-right: 1px solid #dce5e2;
  background: #fbfcfc;
}

.kol-channel-master-head,
.kol-channel-master-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 48px 48px minmax(78px, auto);
  align-items: center;
  gap: 10px;
}

.kol-channel-master-head {
  min-height: 42px;
  padding: 0 14px;
  border-bottom: 1px solid #dce5e2;
  color: #64736d;
  font-size: 11px;
}

.kol-channel-master-head span {
  grid-column: 2 / -1;
  text-align: right;
}

.kol-channel-master-row {
  min-height: 58px;
  padding: 8px 14px;
  border-bottom: 1px solid #e5ebe9;
  color: #27352f;
  text-decoration: none;
}

.kol-channel-master-row:hover,
.kol-channel-master-row:focus-visible {
  background: #f0f7f4;
}

.kol-channel-master-row.selected {
  box-shadow: inset 3px 0 #187c63;
  background: #eaf5f1;
}

.kol-channel-master-row span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.kol-channel-master-row span:not(:first-child) {
  justify-items: end;
}

.kol-channel-master-row strong,
.kol-channel-master-row b,
.kol-channel-master-row small {
  display: block;
  min-width: 0;
  margin: 0;
}

.kol-channel-master-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.kol-channel-master-row b {
  font-size: 12px;
}

.kol-channel-master-row small {
  overflow: hidden;
  color: #7b8884;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kol-channel-master-row .amount b {
  color: #126d56;
}

.kol-channel-detail {
  min-width: 0;
  padding: 18px;
}

.kol-channel-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e0e8e5;
}

.kol-channel-detail-head h3,
.kol-channel-detail-head p,
.kol-channel-detail-head code {
  margin: 0;
}

.kol-channel-detail-head h3 {
  font-size: 19px;
}

.kol-channel-detail-head code {
  color: #76847f;
  font-size: 10px;
}

.kol-channel-detail-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 14px;
  border-top: 1px solid #e0e8e5;
  border-left: 1px solid #e0e8e5;
}

.kol-channel-detail-metrics span {
  display: grid;
  min-width: 0;
  gap: 5px;
  padding: 12px;
  border-right: 1px solid #e0e8e5;
  border-bottom: 1px solid #e0e8e5;
}

.kol-channel-detail-metrics small,
.kol-channel-detail-metrics strong {
  display: block;
  min-width: 0;
  margin: 0;
}

.kol-channel-detail-metrics small {
  color: #6f7d78;
  font-size: 10px;
}

.kol-channel-detail-metrics strong {
  color: #1b2924;
  font-size: 18px;
}

.kol-lifecycle-progress {
  margin-top: 18px;
}

.kol-lifecycle-bar {
  display: flex;
  width: 100%;
  height: 28px;
  overflow: hidden;
  border-radius: 5px;
  background: #edf1f0;
}

.kol-lifecycle-bar span {
  display: grid;
  min-width: 0;
  place-items: center;
  background: #187c63;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.kol-lifecycle-bar span:nth-child(2) {
  background: #7a95a8;
}

.kol-lifecycle-bar span:nth-child(3) {
  background: #a8b2b7;
}

.kol-lifecycle-progress > div:last-child {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.kol-lifecycle-progress > div:last-child span {
  display: grid;
  gap: 2px;
}

.kol-lifecycle-progress b,
.kol-lifecycle-progress small {
  display: block;
  min-width: 0;
}

.kol-lifecycle-progress b {
  font-size: 11px;
}

.kol-lifecycle-progress small {
  color: #74817c;
  font-size: 10px;
}

.kol-commission-boundary {
  display: grid;
  gap: 3px;
  margin-top: 16px;
  border-left: 3px solid #c98625;
  background: #fff8eb;
  padding: 11px 13px;
}

.kol-commission-boundary strong {
  color: #6f4a13;
  font-size: 12px;
}

.kol-commission-boundary span {
  color: #7f6a4c;
  font-size: 10px;
}

.kol-selected-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.kol-held-breakdown {
  min-width: 0;
  flex: 1;
}

.kol-held-breakdown > summary {
  cursor: pointer;
  color: #50615b;
  font-size: 11px;
  font-weight: 800;
}

.kol-held-breakdown > div {
  margin-top: 8px;
  border: 1px solid #dce5e2;
  border-radius: 6px;
  background: #fbfcfc;
}

.kol-held-breakdown p {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  margin: 0;
  padding: 8px 10px;
  font-size: 10px;
}

.kol-held-breakdown p + p {
  border-top: 1px solid #e4eae8;
}

.kol-held-breakdown p small {
  color: #77847f;
}

.kol-selected-actions .kol-settlement-row-preview {
  flex: 0 0 auto;
}

.kol-secondary-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  padding: 10px 14px;
  border-bottom: 1px solid #dce5e2;
  background: #fbfcfc;
}

.kol-secondary-nav a {
  flex: 0 0 auto;
  border-radius: 4px;
  padding: 7px 10px;
  color: #51625c;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.kol-secondary-nav a:hover,
.kol-secondary-nav a:focus-visible {
  background: #e9f4f0;
  color: #126d56;
}

.kol-commission-panel > .kol-settlement-explain,
.kol-commission-panel > .kol-commission-advanced,
.kol-commission-panel > .kol-commission-notice {
  margin-right: 14px;
  margin-left: 14px;
}

.kol-commission-panel > .kol-settlement-explain {
  margin-top: 12px;
}

.kol-commission-panel > .kol-commission-payouts {
  margin: 18px 14px 14px;
}

@media (max-width: 1120px) {
  .kol-overview-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .kol-overview-strip article:nth-child(4) {
    border-left: 0;
    border-top: 1px solid #e1e8e6;
  }

  .kol-overview-strip article:nth-child(5) {
    border-top: 1px solid #e1e8e6;
  }

  .kol-finance-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .kol-finance-summary > details {
    grid-column: 1 / -1;
    border-top: 1px solid #dce5e2;
  }

  .kol-master-detail {
    grid-template-columns: minmax(280px, 0.34fr) minmax(0, 0.66fr);
  }

  .kol-channel-detail-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .kol-workspace-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .kol-workspace-tabs a {
    text-align: center;
  }

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

  .kol-overview-strip article {
    min-height: 94px;
    padding: 12px;
  }

  .kol-overview-strip article:nth-child(odd) {
    border-left: 0;
  }

  .kol-overview-strip article:nth-child(n + 3) {
    border-top: 1px solid #e1e8e6;
  }

  .kol-commission-toolbar,
  .kol-refresh-status {
    align-items: stretch;
    flex-direction: column;
  }

  .kol-refresh-status .button {
    width: 100%;
  }

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

  .kol-finance-summary > span:nth-child(even) {
    border-right: 0;
  }

  .kol-finance-summary > span:nth-child(n + 3) {
    border-top: 1px solid #dce5e2;
  }

  .kol-master-detail {
    grid-template-columns: 1fr;
  }

  .kol-channel-master {
    max-height: 350px;
    overflow-y: auto;
    border-right: 0;
    border-bottom: 1px solid #dce5e2;
  }

  .kol-channel-detail {
    padding: 14px;
  }

  .kol-selected-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .kol-selected-actions .button {
    width: 100%;
  }
}

@media (max-width: 460px) {
  .kol-finance-summary,
  .kol-channel-detail-metrics {
    grid-template-columns: 1fr;
  }

  .kol-finance-summary > span {
    border-top: 1px solid #e1e8e6;
    border-right: 0;
    border-left: 0;
  }

  .kol-channel-master-head,
  .kol-channel-master-row {
    grid-template-columns: minmax(120px, 1fr) 42px 42px minmax(68px, auto);
    gap: 6px;
    padding-right: 10px;
    padding-left: 10px;
  }

  .kol-channel-detail-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

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

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.message-cell {
  max-width: 360px;
  white-space: pre-wrap;
}

.empty {
  color: var(--muted);
  text-align: center;
}

.link-danger {
  margin: 0 0 12px;
  border: 0;
  background: transparent;
  color: var(--danger);
  cursor: pointer;
  font-weight: 700;
}

@media (max-width: 900px) {
  .user-filter-grid-primary,
  .user-filter-grid-advanced {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

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

  .grid-form,
  .settings-form,
  .row-editor,
  .spin-editor,
  .box-editor {
    grid-template-columns: 1fr;
  }

  .grid-form textarea,
  .grid-form .button {
    grid-column: auto;
  }
}

@media (max-width: 620px) {
  .user-filter-heading {
    align-items: flex-start;
  }

  .user-filter-grid-primary,
  .user-filter-grid-advanced,
  .user-filter-summary {
    grid-template-columns: 1fr;
  }

  .user-filter-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .user-filter-actions .button {
    width: 100%;
  }

  .user-filter-advanced summary small {
    display: block;
    margin: 4px 0 0;
  }

  .shell {
    width: min(100% - 24px, 1180px);
    padding: 24px 0 40px;
  }

  .dashboard-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .admin-nav,
  .dashboard-visuals {
    grid-template-columns: 1fr;
  }

  .admin-nav span {
    overflow-x: auto;
    flex-wrap: nowrap;
  }

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

  .funnel-row {
    grid-template-columns: 92px minmax(70px, 1fr) 48px;
  }

  .search-form {
    width: 100%;
  }
}

/* Operations console */
.admin-body {
  background: #eef2f1;
}

.admin-app {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 236px minmax(0, 1fr);
}

.admin-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  overflow-y: auto;
  background: #17231f;
  color: #eef7f3;
  padding: 22px 16px 18px;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #fff;
  text-decoration: none;
}

.admin-brand-mark {
  display: inline-flex;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #2fc29e;
  color: #10201b;
  font-size: 13px;
  font-weight: 900;
}

.admin-brand > span:last-child,
.admin-brand strong,
.admin-brand small {
  display: block;
}

.admin-brand strong {
  font-size: 14px;
}

.admin-brand small {
  margin-top: 2px;
  color: #9eb5ad;
  font-size: 11px;
}

.admin-nav {
  display: block;
  margin: 28px 0 0;
}

.admin-nav > .nav-group {
  margin-bottom: 20px;
  border: 0;
  background: transparent;
  padding: 0;
}

.nav-group p {
  margin: 0 10px 7px;
  color: #799188;
  font-size: 10px;
  font-weight: 800;
}

.admin-nav .nav-group a {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  border-radius: 7px;
  color: #c9d8d3;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.admin-nav .nav-group a:hover {
  background: #21332d;
  color: #fff;
}

.admin-nav .nav-group a.active {
  background: #e9f8f3;
  color: #0a5c4d;
}

.admin-nav .nav-group a b {
  min-width: 22px;
  border-radius: 8px;
  background: #2c4039;
  color: #d9e9e3;
  padding: 3px 6px;
  font-size: 10px;
  text-align: center;
}

.admin-nav .nav-group a.active b {
  background: #c8eee2;
  color: #075746;
}

.admin-nav .nav-group a b.danger {
  background: #7f2731;
  color: #fff;
}

.admin-sidebar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  border-top: 1px solid #2d4039;
  padding: 16px 8px 0;
  font-size: 11px;
}

.admin-sidebar-footer span {
  color: #829990;
}

.admin-sidebar-footer a {
  color: #8de4cc;
  font-weight: 750;
  text-decoration: none;
}

.admin-workspace {
  width: 100%;
  max-width: 1520px;
  min-width: 0;
  margin: 0 auto;
  padding: 28px 32px 60px;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.admin-context,
.section-kicker {
  margin: 0 0 5px;
  color: #66736e;
  font-size: 11px;
  font-weight: 800;
}

.admin-topbar h1 {
  margin: 0;
  font-size: 29px;
  line-height: 1.15;
}

.admin-topbar-actions {
  display: flex;
  gap: 8px;
}

.admin-body .button {
  border-radius: 7px;
}

.admin-body .button.danger {
  border-color: #a62c3a;
  background: #a62c3a;
}

.admin-body .button.danger:hover {
  border-color: #84222d;
  background: #84222d;
}

.dashboard-section {
  margin-bottom: 26px;
}

/* Keep the dashboard decision-first without changing any metric source. */
.dashboard-flow {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.dashboard-flow > .dashboard-queue-section { order: 1; }
.dashboard-flow > .dashboard-pulse-section { order: 2; }
.dashboard-flow > .analytics-dashboard { order: 3; }
.dashboard-flow > .dashboard-signal-grid { order: 4; }
.dashboard-flow > .audit-panel { order: 5; }

.dashboard-queue-section { margin-top: 2px; }

.dashboard-queue-section .dashboard-section-head,
.dashboard-pulse-section .dashboard-section-head {
  align-items: center;
}

.dashboard-queue-section .queue-grid { gap: 12px; }
.dashboard-pulse-section { margin-bottom: 20px; }
.dashboard-pulse-section .dashboard-section-head { margin-bottom: 10px; }

.dashboard-section-head,
.settings-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.dashboard-section-head h2,
.settings-section-head h2 {
  margin: 0;
  font-size: 17px;
}

.status-pill {
  border-radius: 8px;
  background: #dff4ec;
  color: #136c55;
  padding: 6px 9px;
  font-size: 11px;
  font-weight: 800;
}

.status-pill.attention {
  background: #fff0cf;
  color: #81500b;
}

.status-pill.danger {
  background: #fde6e8;
  color: #922e38;
}

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

.queue-item {
  display: flex;
  min-width: 0;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #d6dfdc;
  border-left: 4px solid #52ab91;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 13px 14px;
  text-decoration: none;
}

.queue-item:hover {
  border-color: #86b9aa;
  box-shadow: 0 5px 16px #17231f0d;
}

.queue-item.urgent {
  border-left-color: #b83b47;
}

.queue-item span,
.queue-item small,
.queue-item b {
  display: block;
}

.queue-item small {
  margin-bottom: 6px;
  color: #71807a;
  font-size: 11px;
}

.queue-item b {
  overflow-wrap: anywhere;
  font-size: 12px;
}

.queue-item > strong {
  font-size: 28px;
  line-height: 1;
}

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

.primary-metric {
  min-width: 0;
  min-height: 126px;
  border: 1px solid #d5dedb;
  border-top: 4px solid #3e8f77;
  border-radius: 8px;
  background: #fff;
  padding: 17px 18px;
}

.primary-metric.attention {
  border-top-color: #d08a22;
}

.primary-metric.healthy {
  border-top-color: #2f9b66;
}

.primary-metric span,
.primary-metric small,
.primary-metric strong {
  display: block;
}

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

.notification-pulse-card {
  display: block;
  min-width: 0;
  border: 1px solid #d5dedb;
  border-left: 4px solid #52ab91;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 12px 14px;
  text-decoration: none;
}

.notification-pulse-card:hover { border-color: #86b9aa; box-shadow: 0 5px 16px #17231f0d; }
.notification-pulse-card.attention { border-left-color: #d08a22; }
.notification-pulse-card span, .notification-pulse-card strong, .notification-pulse-card small { display: block; }
.notification-pulse-card span { color: #66736e; font-size: 11px; font-weight: 750; }
.notification-pulse-card strong { margin: 7px 0 4px; font-size: 25px; line-height: 1; }
.notification-pulse-card small { color: #71807a; font-size: 10px; }

.notification-funnel {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
}
.notification-automation-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 12px; }
.notification-view-tabs {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  gap: 4px;
  margin: 2px 0 20px;
  padding: 4px;
  overflow-x: auto;
  border: 1px solid #d5dedb;
  border-radius: 8px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 4px 14px rgba(23, 35, 31, .05);
}
.notification-view-tabs button,
.notification-view-tabs a {
  display: grid;
  place-items: center;
  flex: 1 0 auto;
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding: 0 16px;
  color: #66736e;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}
.notification-view-tabs button:hover,
.notification-view-tabs a:hover { background: #f0f5f2; color: #235f4d; }
.notification-view-tabs button.active { background: #176b52; color: #fff; }
.notification-view { display: none; }
.notification-view.active { display: block; }
.notification-view-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e9e6;
}
.notification-view-head h3,
.notification-view-head p { margin: 0; }
.notification-view-head > p {
  max-width: 520px;
  color: #71807a;
  font-size: 11px;
  line-height: 1.5;
  text-align: right;
}
.notification-funnel > div, .notification-insight { border: 1px solid #d5dedb; border-radius: 8px; background: #fbfcfb; padding: 12px; }
.notification-funnel span, .notification-funnel strong, .notification-funnel small { display: block; }
.notification-funnel span { color: #66736e; font-size: 11px; font-weight: 750; }
.notification-funnel strong { margin: 7px 0 4px; font-size: 24px; }
.notification-funnel small { color: #89958f; font-size: 10px; }
.notification-diagnostic-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 14px 0 18px; }
.notification-diagnostic { border: 1px solid #d5dedb; border-radius: 8px; background: #fbfcfb; padding: 14px; }
.notification-funnel-head { margin-top: 18px; }
.notification-delivery-state {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 14px 0;
  border: 1px solid #d5dedb;
  border-radius: 8px;
  background: #fbfcfb;
  overflow: hidden;
}
.notification-delivery-state > div { min-width: 0; padding: 13px 15px; border-right: 1px solid #e2e9e6; }
.notification-delivery-state > div:last-child { border-right: 0; }
.notification-delivery-state span,
.notification-delivery-state strong,
.notification-delivery-state small { display: block; }
.notification-delivery-state span { color: #68766f; font-size: 10px; font-weight: 750; }
.notification-delivery-state strong { margin: 5px 0 3px; font-size: 19px; }
.notification-delivery-state small { color: #84908b; font-size: 9px; line-height: 1.4; }
.notification-delivery-state .state-on { color: #177559; }
.notification-delivery-state .state-off { color: #ae6920; }
.notification-yesterday { margin: 0 0 18px; border: 1px solid #d5dedb; border-radius: 8px; background: #fff; overflow: hidden; }
.notification-yesterday summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; padding: 0 14px; cursor: pointer; font-size: 12px; font-weight: 800; }
.notification-yesterday summary small { color: #7a8782; font-size: 9px; font-weight: 600; }
.notification-yesterday-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid #e2e9e6; background: #fbfcfb; }
.notification-yesterday-strip > div { min-width: 0; padding: 12px 14px; border-right: 1px solid #e2e9e6; }
.notification-yesterday-strip > div:last-child { border-right: 0; }
.notification-yesterday-strip span,
.notification-yesterday-strip strong,
.notification-yesterday-strip small { display: block; }
.notification-yesterday-strip span { color: #68766f; font-size: 10px; font-weight: 750; }
.notification-yesterday-strip strong { margin-top: 5px; font-size: 20px; }
.notification-yesterday-strip small { margin-top: 3px; color: #84908b; font-size: 9px; }
.campaign-resend-form { display: grid; gap: 5px; justify-items: start; }
.campaign-resend-form small { color: #73817b; font-size: 9px; }
.notification-filter-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; align-items: end; margin: 14px 0 18px; padding: 13px; border: 1px solid #d5dedb; border-radius: 8px; background: #fafbf9; }
.notification-filter-form label { display: grid; gap: 4px; min-width: 0; }
.notification-filter-form label > span { color: #66736e; font-size: 10px; font-weight: 750; }
.notification-filter-form input, .notification-filter-form select { width: 100%; min-height: 36px; border: 1px solid #cfdad6; border-radius: 7px; background: #fff; padding: 0 9px; color: var(--text); font: inherit; font-size: 12px; }
.notification-filter-form .check-inline { display: flex; grid-template-columns: auto 1fr; align-items: center; gap: 6px; min-height: 36px; color: #52625b; font-size: 11px; }
.notification-filter-form .check-inline input { width: 16px; min-height: 16px; }
.notification-insights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.notification-insight .section-head { margin-bottom: 8px; }
.notification-breakdown { display: grid; gap: 6px; }
.notification-breakdown > div { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(3, auto); align-items: center; gap: 8px; border-bottom: 1px solid #edf1ef; padding: 7px 0; font-size: 11px; }
.notification-breakdown > div span { color: #71807a; }
.notification-breakdown > div b { text-align: right; }
.notification-page .table-wrap { overflow-x: auto; }
.notification-page table { min-width: 960px; }
.notification-page .notification-delivery-table { min-width: 1220px; table-layout: fixed; }
.notification-delivery-table th:nth-child(1) { width: 92px; }
.notification-delivery-table th:nth-child(2) { width: 138px; }
.notification-delivery-table th:nth-child(3) { width: 190px; }
.notification-delivery-table th:nth-child(4) { width: 240px; }
.notification-delivery-table th:nth-child(5) { width: 160px; }
.notification-delivery-table th:nth-child(6) { width: 130px; }
.notification-delivery-table th:nth-child(7) { width: 158px; }
.notification-delivery-table th:nth-child(8) { width: 102px; }
.notification-delivery-table td { vertical-align: top; }
.notification-time-cell time,
.notification-time-cell small,
.notification-record-stack > strong,
.notification-record-stack > small,
.notification-record-stack > code { display: block; }
.notification-time-cell time { color: #1d2a25; font-size: 12px; font-weight: 800; white-space: nowrap; }
.notification-time-cell small,
.notification-record-stack > small { margin-top: 4px; color: #7a8983; font-size: 10px; line-height: 1.35; }
.notification-record-stack { display: grid; align-content: start; gap: 3px; min-width: 0; }
.notification-record-stack > strong { color: #1d2a25; font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
.notification-record-stack > code {
  width: fit-content;
  max-width: 100%;
  border-radius: 4px;
  background: #eef3f1;
  padding: 2px 5px;
  color: #52625b;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 9px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  white-space: normal;
}
.notification-title-stack > strong { font-size: 13px; }
.notification-snapshot { display: flex; flex-wrap: wrap; gap: 5px; }
.notification-snapshot span {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  gap: 4px;
  border: 1px solid #dce5e2;
  border-radius: 5px;
  background: #f8faf9;
  padding: 2px 6px;
  color: #697771;
  font-size: 9px;
  white-space: nowrap;
}
.notification-snapshot b { color: #26352f; font-size: 10px; }
.notification-empty-snapshot { color: #8a9691; font-size: 10px; }
.notification-error { color: #a33a45 !important; overflow-wrap: anywhere; }
.notification-outcome { display: grid; gap: 5px; }
.notification-outcome span,
.notification-action-state {
  width: fit-content;
  border-radius: 5px;
  padding: 4px 7px;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.35;
  white-space: normal;
}
.notification-outcome .positive,
.notification-action-state.success { background: #e2f2e9; color: #17623f; }
.notification-outcome .neutral,
.notification-action-state.muted { background: #eef2f0; color: #68756f; }
.notification-action-state.pending { background: #fff0cf; color: #80500b; }
@media (max-width: 720px) {
  .notification-view-tabs { position: static; }
  .notification-page .table-wrap:has(.notification-delivery-table) {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: visible;
  }
  .admin-body .notification-page .table-wrap .notification-delivery-table {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    table-layout: auto;
  }
  .notification-delivery-table thead {
    display: none;
  }
  .notification-delivery-table th {
    width: auto !important;
  }
  .notification-delivery-table tbody {
    display: grid;
    max-width: 100%;
    min-width: 0;
    gap: 10px;
  }
  .notification-delivery-table tbody,
  .notification-delivery-table tr,
  .notification-delivery-table td {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .notification-delivery-table tbody tr {
    display: block;
    overflow: hidden;
    border: 1px solid #d5dedb;
    border-radius: 8px;
    background: #fff;
  }
  .notification-delivery-table tbody td {
    display: grid;
    grid-template-columns: 98px minmax(0, 1fr);
    gap: 10px;
    min-width: 0;
    border: 0;
    border-bottom: 1px solid #edf1ef;
    padding: 10px 12px;
  }
  .notification-delivery-table tbody td:last-child { border-bottom: 0; }
  .notification-delivery-table tbody td::before {
    content: attr(data-label);
    color: #78857f;
    font-size: 10px;
    font-weight: 800;
  }
  .notification-delivery-table tbody td > * {
    grid-column: 2;
    min-width: 0;
    max-width: 100%;
  }
}
.notification-campaign-workspace { margin: 0; padding: 18px; border: 1px solid #d5dedb; border-radius: 8px; background: #f7faf8; }
.campaign-audience-band { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 14px 0 18px; border: 1px solid #d5dedb; border-radius: 8px; background: #fff; overflow: hidden; }
.campaign-audience-band-six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.campaign-audience-band > div { min-width: 0; padding: 13px 14px; border-right: 1px solid #e2e9e6; }
.campaign-audience-band > div:last-child { border-right: 0; }
.campaign-audience-band span, .campaign-audience-band strong, .campaign-audience-band small { display: block; }
.campaign-audience-band span { color: #66736e; font-size: 10px; font-weight: 750; }
.campaign-audience-band strong { margin: 5px 0 3px; font-size: 24px; line-height: 1; }
.campaign-audience-band .campaign-time-value { font-size: 16px; line-height: 1.2; white-space: nowrap; }
.campaign-audience-band small { color: #89958f; font-size: 10px; line-height: 1.4; }
.notification-campaign-form { display: grid; gap: 14px; }
.campaign-config-grid { display: grid; grid-template-columns: minmax(260px, 1.4fr) repeat(2, minmax(190px, 1fr)) minmax(230px, 1fr); gap: 10px; }
.campaign-config-grid label, .campaign-language-panel > label { display: grid; gap: 5px; min-width: 0; }
.campaign-config-grid label > span, .campaign-language-panel > label > span { color: #5d6b65; font-size: 10px; font-weight: 750; }
.campaign-config-grid input, .campaign-config-grid select, .campaign-language-panel input, .campaign-language-panel textarea { width: 100%; border: 1px solid #cfdad6; border-radius: 7px; background: #fff; padding: 9px 10px; color: var(--text); font: inherit; font-size: 12px; }
.campaign-config-grid input, .campaign-config-grid select, .campaign-language-panel input { min-height: 38px; }
.campaign-language-panel textarea { min-height: 140px; resize: vertical; line-height: 1.55; }
.campaign-language-switch { display: inline-flex; width: fit-content; border: 1px solid #cfdad6; border-radius: 7px; background: #fff; padding: 3px; }
.campaign-language-switch button { min-height: 30px; border: 0; border-radius: 5px; background: transparent; padding: 0 13px; color: #66736e; font: inherit; font-size: 11px; font-weight: 750; cursor: pointer; }
.campaign-language-switch button.active { background: #e5f2ed; color: #176b52; }
.campaign-language-panel { display: none; grid-template-columns: minmax(0, 1fr) minmax(260px, .75fr); gap: 10px 18px; align-items: start; }
.campaign-language-panel.active { display: grid; }
.campaign-language-panel > label:nth-child(2) { grid-column: 1; }
.campaign-language-panel > label:nth-child(3) { grid-column: 1; }
.campaign-message-preview { grid-column: 2; grid-row: 1 / span 3; min-height: 190px; border: 1px solid #cad8d3; border-radius: 8px; background: #fff; padding: 16px; box-shadow: 0 5px 16px #17231f0a; }
.campaign-message-preview > span { display: block; margin-bottom: 14px; color: #89958f; font-size: 10px; font-weight: 750; text-transform: uppercase; }
.campaign-message-preview strong { display: block; margin-bottom: 9px; font-size: 14px; }
.campaign-message-preview p { min-height: 70px; margin: 0 0 14px; color: #52625b; font-size: 12px; line-height: 1.55; white-space: pre-wrap; }
.campaign-message-preview button { width: 100%; min-height: 34px; border: 0; border-radius: 6px; background: #2f8d70; color: #fff; font: inherit; font-size: 11px; font-weight: 750; opacity: 1; }
.campaign-form-actions { align-items: center; }
.campaign-exclusion-reasons { margin: -8px 0 18px; border: 1px solid #d5dedb; border-radius: 7px; background: #fff; }
.campaign-exclusion-reasons summary { cursor: pointer; padding: 10px 12px; color: #52625b; font-size: 11px; font-weight: 750; }
.campaign-reason-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; border-top: 1px solid #e2e9e6; background: #e2e9e6; }
.campaign-reason-grid > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #fff; padding: 10px 12px; }
.campaign-reason-grid span { color: #66736e; font-size: 10px; }
.campaign-reason-grid strong { font-size: 14px; }
.campaign-workflow-guide { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 20px 0; border: 1px solid #cfdad6; border-radius: 8px; background: #fff; overflow: hidden; }
.campaign-workflow-guide > div { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 10px 12px; border-right: 1px solid #e2e9e6; }
.campaign-workflow-guide > div:last-child { border-right: 0; }
.campaign-workflow-guide span { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; background: #e5f2ed; color: #176b52; font-size: 10px; font-weight: 800; }
.campaign-workflow-guide strong { font-size: 11px; }
.campaign-test-form { display: grid; gap: 6px; min-width: 160px; }
.campaign-test-form input, .campaign-test-form select { width: 100%; min-height: 30px; border: 1px solid #cfdad6; border-radius: 6px; background: #fff; padding: 5px 7px; font: inherit; font-size: 10px; }
.campaign-saved-preview { margin-top: 7px; }
.campaign-saved-preview summary { cursor: pointer; color: #2f7f67; font-size: 10px; font-weight: 750; }
.campaign-saved-preview > div { width: 260px; margin-top: 7px; border: 1px solid #dbe4e1; border-radius: 6px; background: #fff; padding: 8px; }
.campaign-saved-preview span, .campaign-saved-preview strong, .campaign-saved-preview b { display: block; }
.campaign-saved-preview span { color: #89958f; font-size: 9px; }
.campaign-saved-preview strong { margin: 3px 0; font-size: 11px; }
.campaign-saved-preview p { max-height: 72px; margin: 4px 0; overflow: auto; color: #66736e; font-size: 10px; line-height: 1.45; white-space: pre-wrap; }
.campaign-saved-preview b { color: #2f7f67; font-size: 10px; }
.notification-template-performance { grid-column: 1 / -1; }
.notification-template-performance .notification-breakdown > div { grid-template-columns: minmax(180px, 1.4fr) repeat(5, minmax(100px, 1fr)); }
.auto-template-workspace { display: grid; gap: 16px; }
.auto-template-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid #d5dedb; border-radius: 8px; overflow: hidden; background: #f7faf8; }
.auto-template-summary > div { display: grid; gap: 3px; min-width: 0; padding: 14px 16px; border-right: 1px solid #d5dedb; }
.auto-template-summary > div:last-child { border-right: 0; }
.auto-template-summary strong { color: #173b31; font-size: 18px; line-height: 1.2; }
.auto-template-summary span { color: #65756e; font-size: 11px; }
.auto-template-layout { display: grid; grid-template-columns: minmax(240px, 290px) minmax(0, 1fr); gap: 18px; align-items: start; }
.auto-template-sidebar { display: grid; gap: 6px; min-width: 0; }
.auto-template-sidebar .section-head { margin-bottom: 4px; }
.auto-template-sidebar > button { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; min-height: 72px; padding: 11px 12px; border: 1px solid #d5dedb; border-radius: 7px; background: #fff; color: #26352f; text-align: left; cursor: pointer; }
.auto-template-sidebar > button:hover { border-color: #7da99a; background: #f5faf7; }
.auto-template-sidebar > button.active { border-color: #258169; box-shadow: inset 3px 0 0 #258169; background: #eef8f4; }
.auto-template-sidebar > button span { display: grid; gap: 3px; min-width: 0; }
.auto-template-sidebar > button strong { font-size: 13px; }
.auto-template-sidebar > button small { color: #6b7973; font-size: 10px; line-height: 1.4; }
.auto-template-sidebar > button b { padding: 4px 7px; border-radius: 5px; background: #edf2ef; color: #52655e; font-size: 10px; white-space: nowrap; }
.auto-template-editor-pane { min-width: 0; border-left: 1px solid #d5dedb; padding-left: 18px; }
.auto-template-editor-pane > form:first-child { display: grid; gap: 14px; }
.auto-template-toolbar { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; }
.auto-template-toolbar h3, .auto-template-toolbar p { margin: 0; }
.compact-toggle { min-width: 240px; padding: 9px 10px; border: 1px solid #d5dedb; border-radius: 7px; background: #f8faf9; }
.auto-template-config { display: grid; grid-template-columns: minmax(140px, .55fr) minmax(180px, .8fr) minmax(240px, 1.4fr); gap: 10px; align-items: stretch; }
.auto-template-config label, .auto-template-fields label { display: grid; gap: 5px; min-width: 0; }
.auto-template-config label > span, .auto-template-fields label > span { color: #53635c; font-size: 11px; font-weight: 700; }
.auto-template-config input, .auto-template-config select, .auto-template-fields input, .auto-template-fields textarea, .auto-template-test input, .auto-template-test select { width: 100%; min-height: 38px; border: 1px solid #cfdad6; border-radius: 7px; background: #fff; padding: 8px 10px; color: var(--text); font: inherit; font-size: 12px; }
.auto-template-safety { display: grid; gap: 3px; align-content: center; padding: 9px 11px; border-left: 3px solid #3c8b74; background: #f1f7f4; }
.auto-template-safety strong { color: #235f4d; font-size: 11px; }
.auto-template-safety span { color: #60716a; font-size: 10px; line-height: 1.4; }
.auto-template-variables { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 10px; border: 1px dashed #b7c9c2; border-radius: 7px; background: #fbfcfb; }
.auto-template-variables > span { margin-right: 3px; color: #5e6e67; font-size: 11px; font-weight: 700; }
.auto-template-variables button { min-height: 30px; padding: 5px 8px; border: 1px solid #cedbd6; border-radius: 5px; background: #fff; color: #2c5f50; font-size: 10px; cursor: pointer; }
.auto-template-variables button:hover { border-color: #3f8e77; background: #eef8f4; }
.auto-template-variables code { margin-left: 3px; color: #6d7d76; font-size: 9px; }
.auto-template-language-switch { margin: 0; }
.auto-template-language-panel { display: none; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); gap: 16px; align-items: start; }
.auto-template-language-panel.active { display: grid; }
.auto-template-fields { display: grid; gap: 10px; min-width: 0; }
.auto-template-fields textarea { min-height: 184px; resize: vertical; line-height: 1.55; }
.auto-template-preview { min-width: 0; padding: 14px; border: 1px solid #cad7d2; border-radius: 8px; background: #eff5f2; }
.auto-template-preview-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 12px; color: #53635c; font-size: 10px; text-transform: uppercase; }
.auto-template-preview-head b { color: #2d725d; text-transform: none; }
.auto-template-preview > strong, .auto-template-preview > p { display: block; margin: 0; padding: 11px 13px; background: #fff; white-space: pre-wrap; overflow-wrap: anywhere; }
.auto-template-preview > strong { border-radius: 7px 7px 0 0; color: #16221e; font-size: 13px; }
.auto-template-preview > p { border-radius: 0 0 7px 7px; color: #43534d; font-size: 12px; line-height: 1.55; }
.auto-template-preview > button { width: 100%; min-height: 38px; margin-top: 8px; border: 0; border-radius: 6px; background: #2e8dcd; color: #fff; font-weight: 800; opacity: 1; }
.auto-template-preview > small { display: block; margin-top: 9px; color: #687871; font-size: 9px; line-height: 1.45; }
.auto-template-savebar { position: sticky; bottom: 0; z-index: 3; display: flex; justify-content: space-between; gap: 14px; align-items: center; padding: 11px 12px; border: 1px solid #cddbd5; border-radius: 7px; background: rgba(255, 255, 255, .96); box-shadow: 0 -4px 14px rgba(28, 55, 46, .06); }
.auto-template-savebar > div { display: grid; gap: 2px; }
.auto-template-savebar strong { color: #294b40; font-size: 11px; }
.auto-template-savebar span { color: #6b7973; font-size: 10px; }
.attention-text { color: #b46808 !important; }
.auto-template-test { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(190px, .8fr) 130px auto; gap: 9px; align-items: end; margin-top: 14px; padding-top: 14px; border-top: 1px solid #d5dedb; }
.auto-template-test > div { display: grid; gap: 3px; }
.auto-template-test strong { font-size: 12px; }
.auto-template-test span { color: #687871; font-size: 10px; }
.campaign-table-wrap { margin-top: 8px; }
.campaign-table { min-width: 900px !important; }
.campaign-queue-form { display: grid; gap: 6px; min-width: 110px; }
.campaign-queue-form .check-inline { display: flex; align-items: center; gap: 6px; font-size: 10px; color: #66736e; }
.campaign-queue-form input { width: 14px; height: 14px; }

.activity-notification-center { display: grid; gap: 18px; }
.activity-center-tabs { display: flex; gap: 4px; align-items: center; min-height: 46px; border-bottom: 1px solid #d7e0dd; overflow-x: auto; }
.activity-center-tabs button { flex: 0 0 auto; min-height: 44px; border: 0; border-bottom: 2px solid transparent; background: transparent; padding: 0 15px; color: #60706a; font: inherit; font-size: 12px; font-weight: 750; cursor: pointer; }
.activity-center-tabs button:hover { color: #225f4d; background: #f4f8f6; }
.activity-center-tabs button.active { border-bottom-color: #197259; color: #173d32; }
.activity-center-panel { display: none; min-width: 0; }
.activity-center-panel.active { display: block; }
.activity-workflow { margin: 0; border-radius: 6px; }
.activity-workflow > div.active { box-shadow: inset 3px 0 0 #197259; background: #f1f8f5; }
.activity-notification-workspace { margin-top: 16px; border-radius: 7px; background: #fff; }
.activity-campaign-form { gap: 18px; }
.activity-config-grid { grid-template-columns: minmax(230px, 1.25fr) minmax(190px, .9fr) minmax(180px, .8fr) minmax(290px, 1.2fr); }
.activity-external-target { grid-column: 1 / -1; grid-template-columns: minmax(170px, .35fr) minmax(0, 1fr); align-items: center; border: 1px solid #b9d4ca; border-radius: 7px; background: #f5faf8; padding: 10px 12px; }
.activity-external-target[hidden] { display: none; }
.activity-external-target > span { color: #245d4b !important; }
.activity-external-target > small { grid-column: 2; color: #6a7772; font-size: 9px; line-height: 1.4; }
.campaign-send-timing { min-width: 0; margin: 0; border: 0; padding: 0; }
.campaign-send-timing legend { margin-bottom: 5px; color: #5d6b65; font-size: 10px; font-weight: 750; }
.campaign-timing-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid #cfdad6; border-radius: 7px; overflow: hidden; background: #fff; }
.campaign-timing-options label { min-width: 0; }
.campaign-timing-options label + label { border-left: 1px solid #dbe4e1; }
.campaign-timing-options input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}
.campaign-timing-options span { display: grid; min-height: 36px; place-items: center; padding: 0 8px; color: #66736e; font-size: 10px; font-weight: 750; cursor: pointer; }
.campaign-timing-options input:checked + span { background: #e5f2ed; color: #176b52; }
.campaign-timing-options input:disabled + span { color: #aab4b0; cursor: not-allowed; }
.campaign-send-timing > input { width: 100%; min-height: 38px; margin-top: 7px; border: 1px solid #cfdad6; border-radius: 7px; background: #fff; padding: 8px 10px; color: var(--text); font: inherit; font-size: 11px; }
.campaign-send-timing > input:disabled { display: none; }
.activity-campaign-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 330px); gap: 18px; align-items: start; }
.activity-campaign-editor { display: grid; gap: 12px; min-width: 0; }
.activity-language-panel { grid-template-columns: minmax(0, 1fr) minmax(280px, .72fr); gap: 16px; }
.activity-language-fields { display: grid; gap: 10px; min-width: 0; }
.activity-language-fields label { display: grid; gap: 5px; min-width: 0; }
.activity-language-fields label > span { color: #5d6b65; font-size: 10px; font-weight: 750; }
.activity-language-fields input,
.activity-language-fields textarea { width: 100%; border: 1px solid #cfdad6; border-radius: 7px; background: #fff; padding: 9px 10px; color: var(--text); font: inherit; font-size: 12px; }
.activity-language-fields input { min-height: 38px; }
.activity-language-fields textarea { min-height: 176px; resize: vertical; line-height: 1.55; }
.activity-telegram-preview { grid-column: 2; grid-row: auto; min-height: 280px; background: #f0f5f2; }
.activity-telegram-preview strong,
.activity-telegram-preview p { background: #fff; padding: 10px 12px; }
.activity-telegram-preview strong { margin: 0; border-radius: 7px 7px 0 0; }
.activity-telegram-preview p { min-height: 132px; margin: 0; border-radius: 0 0 7px 7px; }
.activity-target-preview { display: block; margin-top: 8px; overflow-wrap: anywhere; color: #66746f; font-size: 9px; text-align: center; }
.activity-target-preview.invalid { color: #a04d36; }
.campaign-variable-toolbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 10px; border: 1px dashed #b9cac4; border-radius: 7px; background: #fbfcfb; }
.campaign-variable-toolbar > span { margin-right: 2px; color: #5f6e68; font-size: 10px; font-weight: 750; }
.campaign-variable-toolbar button { min-height: 30px; border: 1px solid #d2ded9; border-radius: 5px; background: #fff; padding: 5px 8px; color: #2b6553; font-size: 10px; cursor: pointer; }
.campaign-variable-toolbar button:hover { border-color: #4a927d; background: #eff8f4; }
.campaign-variable-toolbar code { margin-left: 3px; color: #74817c; font-size: 9px; }
.activity-audience-simulation { min-width: 0; border: 1px solid #d5dedb; border-radius: 7px; background: #f9fbfa; padding: 14px; }
.activity-audience-simulation dl { margin: 10px 0 0; }
.activity-audience-simulation dl > div { display: flex; justify-content: space-between; gap: 14px; align-items: center; min-height: 38px; border-bottom: 1px solid #e4eae8; }
.activity-audience-simulation dt { color: #5e6d67; font-size: 11px; }
.activity-audience-simulation dd { margin: 0; color: #17251f; font-size: 15px; font-weight: 800; }
.activity-audience-simulation .campaign-time-value { font-size: 11px; }
.activity-exclusion-reasons { margin: 12px 0 0; }
.activity-exclusion-reasons .campaign-reason-grid { grid-template-columns: 1fr; }
.activity-campaign-actions { display: flex; gap: 12px; align-items: center; }
.activity-campaign-actions span { color: #68766f; font-size: 10px; }
.activity-notification-media { grid-column: 1 / -1; }
.activity-notification-media input[type="file"] { min-height: 42px; padding: 8px; }
.activity-media-preview { margin: 0 0 12px; overflow: hidden; border: 1px solid #d5dedb; border-radius: 7px; background: #f4f7f5; }
.activity-media-preview img { display: block; width: 100%; max-height: 240px; object-fit: cover; }
.activity-media-preview small { display: block; padding: 7px 9px; overflow: hidden; color: #63716b; text-overflow: ellipsis; white-space: nowrap; }
.activity-media-preview.invalid { border-color: #c45c5c; background: #fff4f3; }
.activity-media-preview.invalid small { color: #a53d3d; }
.campaign-saved-media { display: block; width: min(100%, 360px); max-height: 220px; margin: 9px 0; border: 1px solid #d5dedb; border-radius: 7px; object-fit: cover; }
.activity-safety-note { margin: 16px 0 0; border-left: 3px solid #d18a1d; background: #fff9ee; padding: 9px 11px; color: #735522; font-size: 10px; line-height: 1.5; }
.activity-create-form { grid-template-columns: minmax(200px, 1.2fr) 110px repeat(2, minmax(170px, .9fr)) 110px; }
.activity-create-form textarea { grid-column: 1 / -2; }
.activity-record-row { padding: 12px 0; border-top: 1px solid #e0e7e4; }
.activity-record-row:first-of-type { border-top: 0; }
.activity-effect-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 16px; border: 1px solid #d5dedb; border-radius: 7px; background: #fff; overflow: hidden; }
.activity-effect-metrics article { min-width: 0; padding: 14px 16px; border-right: 1px solid #e0e7e4; }
.activity-effect-metrics article:last-child { border-right: 0; }
.activity-effect-metrics span,
.activity-effect-metrics strong,
.activity-effect-metrics small { display: block; }
.activity-effect-metrics span { color: #68766f; font-size: 10px; font-weight: 750; }
.activity-effect-metrics strong { margin: 5px 0 3px; font-size: 22px; }
.activity-effect-metrics small { color: #84908b; font-size: 9px; }
.activity-campaign-table { min-width: 820px !important; }
.activity-performance-table { min-width: 720px; }
.campaign-record-list { margin-top: 10px; overflow: hidden; border: 1px solid #d5dedb; border-radius: 7px; background: #fff; }
.campaign-record-item { padding: 15px 16px; border-bottom: 1px solid #dfe7e4; }
.campaign-record-item:last-child { border-bottom: 0; }
.campaign-record-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(190px, auto); gap: 18px; align-items: start; }
.campaign-record-identity { min-width: 0; }
.campaign-record-identity h3 { margin: 0; font-size: 14px; line-height: 1.3; }
.campaign-record-identity > p { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 5px 0 0; color: #6d7974; font-size: 10px; }
.campaign-record-identity > p span { position: relative; }
.campaign-record-identity > p span + span::before { position: absolute; left: -8px; content: "·"; color: #9ca6a2; }
.campaign-media-missing { display: grid; gap: 2px; margin-top: 8px; border-left: 3px solid #b9474f; background: #fff3f3; padding: 8px 10px; color: #7e2930; font-size: 10px; }
.campaign-media-missing strong { font-size: 11px; }
.campaign-record-next { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; align-items: flex-start; }
.campaign-record-next form { margin: 0; }
.campaign-record-next .campaign-test-form { min-width: 250px; grid-template-columns: minmax(110px, 1fr) 80px auto; }
.campaign-record-next .campaign-test-form button { grid-column: auto; }
.campaign-record-next .campaign-resend-form { display: grid; justify-items: end; gap: 3px; }
.campaign-record-next .campaign-resend-form small { color: #77847f; font-size: 9px; }
.campaign-record-metrics { display: grid; grid-template-columns: .8fr 1.15fr .8fr; gap: 0; margin-top: 13px; border-top: 1px solid #e3e9e7; }
.campaign-record-metrics dl { display: flex; flex-wrap: wrap; gap: 8px 18px; min-width: 0; margin: 0; padding: 11px 14px 0 0; }
.campaign-record-metrics dl + dl { border-left: 1px solid #e3e9e7; padding-left: 14px; }
.campaign-record-metrics dt { flex: 0 0 100%; color: #65736e; font-size: 10px; font-weight: 750; }
.campaign-record-metrics dl > div { display: grid; gap: 2px; }
.campaign-record-metrics span { color: #7b8782; font-size: 9px; }
.campaign-record-metrics strong { color: #17231f; font-size: 14px; }
.recurring-policy-band { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 14px 0; border: 1px solid #d5dedb; border-left: 3px solid #2f8b70; border-radius: 7px; background: #f8fbfa; overflow: hidden; }
.recurring-policy-band > div { min-width: 0; padding: 11px 13px; border-right: 1px solid #e1e8e5; }
.recurring-policy-band > div:nth-child(4) { border-right: 0; }
.recurring-policy-band span, .recurring-policy-band strong { display: block; }
.recurring-policy-band span { color: #6a7772; font-size: 9px; }
.recurring-policy-band strong { margin-top: 3px; color: #20312a; font-size: 12px; }
.recurring-policy-band p { grid-column: 1 / -1; margin: 0; border-top: 1px solid #e1e8e5; padding: 9px 13px; color: #5e6c66; font-size: 10px; line-height: 1.45; }
.campaign-schedule-summary { display: grid; justify-items: end; gap: 3px; min-width: 190px; }
.campaign-schedule-summary > strong { color: #263630; font-size: 11px; }
.campaign-schedule-summary > small { color: #72807a; font-size: 9px; }
.recurring-schedule-details { position: relative; }
.recurring-schedule-details > summary { list-style: none; }
.recurring-schedule-details > summary::-webkit-details-marker { display: none; }
.recurring-schedule-details[open] > summary { border-color: #24795f; background: #e9f5f0; color: #17684f; }
.recurring-schedule-form { position: absolute; z-index: 12; top: calc(100% + 7px); right: 0; width: min(720px, calc(100vw - 48px)); max-height: min(720px, calc(100vh - 120px)); overflow: auto; border: 1px solid #bdcec7; border-radius: 7px; background: #fff; padding: 16px; box-shadow: 0 18px 42px rgba(26, 48, 40, .16); text-align: left; }
.recurring-schedule-heading { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; padding-bottom: 11px; border-bottom: 1px solid #e1e8e5; }
.recurring-schedule-heading div { min-width: 0; }
.recurring-schedule-heading span, .recurring-schedule-heading strong { display: block; }
.recurring-schedule-heading span { color: #177158; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.recurring-schedule-heading strong { margin-top: 3px; overflow: hidden; color: #1e2d27; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.recurring-schedule-heading small { max-width: 250px; color: #6f7c77; font-size: 9px; line-height: 1.45; text-align: right; }
.recurring-schedule-grid { display: grid; grid-template-columns: minmax(160px, 1.2fr) repeat(3, minmax(130px, 1fr)); gap: 10px; margin-top: 13px; }
.recurring-schedule-grid.end-grid { grid-template-columns: minmax(190px, 1fr) minmax(170px, 1fr); }
.recurring-schedule-form label, .recurring-schedule-mode { min-width: 0; }
.recurring-schedule-form label > span, .recurring-schedule-mode > span { display: block; margin-bottom: 5px; color: #65736d; font-size: 9px; font-weight: 750; }
.recurring-schedule-form input:not([type="checkbox"]), .recurring-schedule-form select { width: 100%; min-height: 38px; border: 1px solid #cfdad6; border-radius: 6px; background: #fff; padding: 7px 9px; color: #1f2d28; font: inherit; font-size: 11px; }
.recurring-schedule-mode { margin-top: 11px; border-top: 1px solid #e5ebe8; padding-top: 11px; }
.weekday-picker { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); overflow: hidden; border: 1px solid #cfdbd6; border-radius: 6px; }
.weekday-picker label + label { border-left: 1px solid #dbe4e1; }
.weekday-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.weekday-picker span { display: grid !important; min-height: 36px; place-items: center; margin: 0 !important; background: #fff; color: #68756f !important; cursor: pointer; }
.weekday-picker input:checked + span { background: #e4f2ec; color: #166a51 !important; }
.interval-mode { width: min(240px, 100%); }
.custom-date-mode label { max-width: 360px; }
.date-add-control { display: grid; grid-template-columns: minmax(150px, 1fr) auto; gap: 7px; }
.selected-date-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.selected-date-list > small { color: #7c8883; font-size: 9px; }
.selected-date-chip { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; border: 1px solid #d4dfda; border-radius: 5px; background: #f6f9f7; padding: 3px 4px 3px 8px; color: #384b43; font-size: 9px; }
.selected-date-chip button { display: grid; width: 22px; height: 22px; place-items: center; border: 0; border-radius: 4px; background: transparent; color: #78857f; cursor: pointer; }
.selected-date-chip button:hover { background: #f1dfdc; color: #9a3b32; }
.input-suffix { display: grid; grid-template-columns: 1fr auto; align-items: center; }
.input-suffix input { border-radius: 6px 0 0 6px !important; }
.input-suffix span { align-self: stretch; display: grid; place-items: center; border: 1px solid #cfdad6; border-left: 0; border-radius: 0 6px 6px 0; background: #f4f7f5; padding: 0 10px; color: #66746f; font-size: 9px; }
.recurring-rule-strip, .recurring-schedule-preview { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 13px; overflow: hidden; border: 1px solid #d8e1de; border-radius: 6px; }
.recurring-rule-strip > div, .recurring-schedule-preview > div { min-width: 0; padding: 9px 10px; border-right: 1px solid #e2e9e6; }
.recurring-rule-strip > div:last-child, .recurring-schedule-preview > div:nth-child(4) { border-right: 0; }
.recurring-rule-strip span, .recurring-rule-strip strong, .recurring-schedule-preview span, .recurring-schedule-preview strong { display: block; }
.recurring-rule-strip span, .recurring-schedule-preview span { color: #74817c; font-size: 8px; }
.recurring-rule-strip strong { margin-top: 2px; color: #31443c; font-size: 10px; }
.recurring-schedule-preview { border-color: #c8d9d2; background: #f5faf8; }
.recurring-schedule-preview strong { margin-top: 3px; color: #16684f; font-size: 13px; }
.recurring-schedule-preview > small { grid-column: 1 / -1; border-top: 1px solid #dce7e3; padding: 7px 10px; color: #64736d; font-size: 9px; }
.recurring-schedule-form.is-previewing .recurring-schedule-preview { opacity: .72; }
.schedule-confirm { margin-top: 12px; color: #55645e; font-size: 9px; }
.recurring-schedule-actions { display: flex; justify-content: space-between; gap: 14px; align-items: center; margin-top: 11px; }
.recurring-schedule-actions > span { color: #6b7873; font-size: 9px; }
.recurring-schedule-controls { display: flex; justify-content: flex-end; gap: 7px; margin-top: 8px; }
.recurring-schedule-controls form { margin: 0; }

@media (max-width: 900px) {
  .notification-pulse-grid, .notification-insights { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .notification-automation-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .notification-funnel { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .notification-delivery-state { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .notification-delivery-state > div:nth-child(2) { border-right: 0; }
  .notification-delivery-state > div:nth-child(-n+2) { border-bottom: 1px solid #e2e9e6; }
  .notification-yesterday-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .notification-filter-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auto-template-layout { grid-template-columns: minmax(210px, 250px) minmax(0, 1fr); }
  .auto-template-config { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auto-template-safety { grid-column: 1 / -1; }
  .auto-template-language-panel { grid-template-columns: 1fr; }
  .auto-template-test { grid-template-columns: 1fr 1fr; }
  .campaign-audience-band { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .campaign-reason-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .campaign-workflow-guide { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .campaign-config-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .activity-config-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .activity-campaign-layout { grid-template-columns: 1fr; }
  .activity-effect-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .campaign-record-metrics { grid-template-columns: 1fr 1.25fr; }
  .recurring-policy-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recurring-policy-band > div:nth-child(2) { border-right: 0; }
  .recurring-policy-band > div:nth-child(-n+2) { border-bottom: 1px solid #e1e8e5; }
  .recurring-schedule-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .campaign-record-metrics dl:last-child { grid-column: 1 / -1; border-top: 1px solid #e3e9e7; border-left: 0; padding-left: 0; }
  .activity-create-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .activity-create-form textarea { grid-column: 1 / -1; }
}

@media (max-width: 1240px) and (min-width: 901px) {
  .campaign-audience-band-six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .campaign-config-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .notification-pulse-grid, .notification-insights, .notification-filter-form { grid-template-columns: 1fr; }
  .notification-automation-metrics { grid-template-columns: 1fr; }
  .notification-funnel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .notification-delivery-state { grid-template-columns: 1fr; }
  .notification-delivery-state > div { border-right: 0; border-bottom: 1px solid #e2e9e6; }
  .notification-delivery-state > div:last-child { border-bottom: 0; }
  .notification-yesterday summary { align-items: flex-start; flex-direction: column; gap: 2px; padding: 10px 12px; }
  .notification-yesterday-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .notification-yesterday-strip > div { border-bottom: 1px solid #e2e9e6; }
  .notification-yesterday-strip > div:nth-child(even) { border-right: 0; }
  .notification-view-tabs { margin-right: -6px; margin-left: -6px; }
  .notification-view-tabs button { flex: 0 0 auto; padding: 0 13px; }
  .notification-view-head { display: block; }
  .notification-view-head > p { margin-top: 6px; text-align: left; }
  .notification-campaign-workspace { padding: 12px; }
  .activity-center-tabs { margin: 0 -6px; }
  .activity-center-tabs button { padding: 0 12px; }
  .activity-config-grid,
  .activity-language-panel.active,
  .activity-effect-metrics,
  .activity-create-form { grid-template-columns: 1fr; }
  .activity-external-target { grid-template-columns: 1fr; }
  .activity-external-target > small { grid-column: 1; }
  .activity-telegram-preview { grid-column: 1; }
  .activity-campaign-actions { align-items: stretch; flex-direction: column; }
  .activity-campaign-actions .button { width: 100%; }
  .campaign-record-head, .campaign-record-metrics { grid-template-columns: 1fr; }
  .campaign-record-next { justify-content: flex-start; }
  .campaign-schedule-summary { justify-items: start; width: 100%; }
  .recurring-schedule-details { width: 100%; }
  .recurring-schedule-form { position: static; width: 100%; max-height: none; margin-top: 7px; padding: 12px; box-shadow: none; }
  .recurring-schedule-heading { display: block; }
  .recurring-schedule-heading small { display: block; max-width: none; margin-top: 5px; text-align: left; }
  .recurring-schedule-grid, .recurring-schedule-grid.end-grid { grid-template-columns: 1fr; }
  .weekday-picker { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .weekday-picker label { border-bottom: 1px solid #dbe4e1; }
  .recurring-rule-strip, .recurring-schedule-preview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recurring-rule-strip > div:nth-child(2), .recurring-schedule-preview > div:nth-child(2) { border-right: 0; }
  .recurring-rule-strip > div:nth-child(-n+2), .recurring-schedule-preview > div:nth-child(-n+2) { border-bottom: 1px solid #e2e9e6; }
  .recurring-schedule-actions { align-items: stretch; flex-direction: column; }
  .recurring-schedule-actions .button { width: 100%; }
  .campaign-record-next .campaign-test-form { width: 100%; min-width: 0; grid-template-columns: 1fr; }
  .campaign-record-metrics dl,
  .campaign-record-metrics dl + dl,
  .campaign-record-metrics dl:last-child { grid-column: auto; border-top: 1px solid #e3e9e7; border-left: 0; padding: 10px 0 0; }
  .auto-template-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auto-template-summary > div:nth-child(2) { border-right: 0; }
  .auto-template-summary > div:nth-child(-n+2) { border-bottom: 1px solid #d5dedb; }
  .auto-template-layout { grid-template-columns: 1fr; }
  .auto-template-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auto-template-sidebar .section-head { grid-column: 1 / -1; }
  .auto-template-sidebar > button { min-height: 82px; }
  .auto-template-editor-pane { border-left: 0; border-top: 1px solid #d5dedb; padding: 16px 0 0; }
  .auto-template-toolbar { display: grid; }
  .compact-toggle { min-width: 0; }
  .auto-template-config, .auto-template-test { grid-template-columns: 1fr; }
  .auto-template-language-panel { grid-template-columns: 1fr; }
  .auto-template-savebar { align-items: stretch; }
  .auto-template-savebar .button { flex: 0 0 auto; }
  .campaign-audience-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .campaign-audience-band > div { border-top: 1px solid #e2e9e6; }
  .campaign-audience-band > div:nth-child(-n+2) { border-top: 0; }
  .campaign-audience-band > div:nth-child(even) { border-right: 0; }
  .campaign-config-grid { grid-template-columns: 1fr; }
  .campaign-language-switch { width: 100%; }
  .campaign-language-switch button { flex: 1; padding: 0 6px; }
  .campaign-language-panel.active { grid-template-columns: 1fr; }
  .campaign-message-preview { grid-column: 1; grid-row: auto; }
  .notification-diagnostic-grid, .campaign-reason-grid, .campaign-workflow-guide { grid-template-columns: 1fr; }
  .campaign-workflow-guide > div { border-right: 0; border-bottom: 1px solid #e2e9e6; }
  .notification-template-performance .notification-breakdown > div { grid-template-columns: 1fr 1fr; }
}

.primary-metric span {
  color: #66736e;
  font-size: 12px;
  font-weight: 750;
}

.primary-metric strong {
  margin: 9px 0 8px;
  overflow-wrap: anywhere;
  font-size: 34px;
  line-height: 1;
}

.primary-metric small {
  color: #7a8782;
  font-size: 11px;
}

.admin-body .dashboard-visuals {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 26px;
}

.admin-body .visual-card {
  grid-column: span 4;
  border-color: #d5dedb;
  padding: 18px;
}

.admin-body .visual-card:nth-child(1) {
  grid-column: span 7;
}

.admin-body .visual-card:nth-child(2) {
  grid-column: span 5;
}

.admin-body .visual-card:nth-child(3) {
  grid-column: span 6;
}

.admin-body .visual-card:nth-child(4),
.admin-body .visual-card:nth-child(5) {
  grid-column: span 3;
}

.admin-body .visual-head {
  align-items: flex-start;
  margin-bottom: 16px;
}

.admin-body .visual-head div small,
.admin-body .visual-head div span {
  display: block;
}

.admin-body .visual-head div small {
  margin-bottom: 4px;
  color: #74817c;
  font-size: 10px;
  font-weight: 800;
}

.admin-body .visual-head div span {
  color: #1b2823;
  font-size: 14px;
  font-weight: 800;
}

.admin-body .visual-head strong {
  font-size: 20px;
}

.admin-body .funnel-row {
  grid-template-columns: 118px minmax(80px, 1fr) 56px;
}

.admin-body .funnel-row > i > b {
  background: #2c9877;
}

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

.finance-list div {
  border-left: 3px solid #d19b3e;
  background: #fafbf9;
  padding: 10px 11px;
}

.finance-list span,
.finance-list b {
  display: block;
}

.finance-list span {
  margin-bottom: 5px;
  color: #71807a;
  font-size: 11px;
}

.finance-list b {
  font-size: 16px;
}

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

.compact-metrics span,
.compact-metrics small,
.compact-metrics b {
  display: block;
}

.compact-metrics span {
  min-width: 0;
  border-bottom: 1px solid #e1e7e4;
  padding-bottom: 9px;
}

.compact-metrics small {
  margin-bottom: 5px;
  color: #71807a;
  font-size: 10px;
}

.compact-metrics b {
  overflow-wrap: anywhere;
  font-size: 15px;
}

.admin-body .metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-body .metric {
  min-height: 98px;
  border-color: #d5dedb;
}

.admin-body .panel {
  border-color: #d5dedb;
  border-radius: 8px;
  box-shadow: 0 5px 18px #17231f0a;
}

.admin-body .panel > .section-head,
.admin-body .panel > .settings-section-head {
  border-bottom: 1px solid #e4ebe8;
  padding-bottom: 12px;
}

.admin-body .table-wrap {
  border: 1px solid #e2e9e6;
  border-radius: 7px;
  background: #fff;
}

.admin-body .table-wrap table {
  min-width: 680px;
}

.admin-body .table-wrap table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.admin-body .notice {
  border-left-width: 4px;
}

.admin-body th {
  background: #f7f9f8;
  color: #5f6e68;
}

.admin-body tbody tr:hover td {
  background: #fbfdfc;
}

.ops-metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.ops-metric {
  min-width: 0;
  min-height: 104px;
  border: 1px solid #d5dedb;
  border-top: 3px solid #4f8e7b;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 13px 14px;
  text-decoration: none;
}

.ops-metric:hover {
  border-color: #8eb9ab;
  box-shadow: 0 5px 16px #17231f0d;
}

.ops-metric.attention {
  border-top-color: #c98520;
}

.ops-metric.healthy {
  border-top-color: #21845c;
}

.ops-metric.danger {
  border-top-color: #b13b47;
}

.ops-metric span,
.ops-metric strong,
.ops-metric small {
  display: block;
}

.ops-metric span {
  color: #68766f;
  font-size: 11px;
  font-weight: 750;
}

.ops-metric strong {
  margin: 8px 0 7px;
  font-size: 28px;
  line-height: 1;
}

.ops-metric small {
  color: #7b8883;
  font-size: 10px;
  line-height: 1.35;
}

.ops-segments {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  margin-bottom: 14px;
  border-bottom: 1px solid #d4ddda;
  padding: 0 0 10px;
}

.ops-segments a {
  display: inline-flex;
  min-height: 34px;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  border: 1px solid #d3ddda;
  border-radius: 7px;
  background: #fff;
  color: #405049;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.ops-segments a:hover,
.ops-segments a.active {
  border-color: #2d886e;
  background: #e8f5f1;
  color: #0a624f;
}

.ops-segments b {
  min-width: 20px;
  border-radius: 6px;
  background: #eef2f0;
  padding: 2px 5px;
  font-size: 10px;
  text-align: center;
}

.ops-segments a.active b {
  background: #ccebe2;
}

.ops-users-panel,
.user-detail-panel {
  margin-bottom: 16px;
}

.ops-user-table {
  min-width: 1480px;
}

.ops-user-table th:first-child,
.ops-user-table td:first-child,
.ops-user-table th:last-child,
.ops-user-table td:last-child {
  position: sticky;
  z-index: 2;
  background: #fff;
}

.ops-user-table th:first-child,
.ops-user-table td:first-child {
  left: 0;
}

.ops-user-table th:last-child,
.ops-user-table td:last-child {
  right: 0;
  min-width: 126px;
  box-shadow: -7px 0 12px #17231f0a;
}

.ops-user-table th:first-child,
.ops-user-table th:last-child {
  z-index: 3;
  background: #f7f9f8;
}

.admin-body .ops-user-table tbody tr:hover td:first-child,
.admin-body .ops-user-table tbody tr:hover td:last-child {
  background: #fbfdfc;
}

.ops-user-table th,
.ops-user-table td {
  padding: 11px 9px;
}

.ops-user-table td {
  line-height: 1.35;
}

.ops-user-table td > strong,
.ops-user-table td > small,
.ops-user-identity strong,
.ops-user-identity code,
.ops-user-identity small {
  display: block;
}

.ops-user-table td > small,
.ops-user-identity small {
  margin-top: 4px;
  color: #75827d;
  font-size: 10px;
}

.ops-user-identity {
  min-width: 142px;
}

.ops-user-identity strong {
  max-width: 160px;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-user-identity code {
  margin-top: 4px;
  color: #55645e;
  font-size: 11px;
}

.ops-badge {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 6px;
  padding: 0 8px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.ops-badge.danger {
  background: #f8dfe2;
  color: #8d2431;
}

.ops-badge.attention {
  background: #fff0cf;
  color: #80500b;
}

.ops-badge.healthy {
  background: #dcf1e5;
  color: #17623f;
}

.ops-badge.active {
  background: #dcebf4;
  color: #245d78;
}

.ops-badge.muted {
  background: #e7eae9;
  color: #5d6864;
}

.ops-badge.neutral {
  background: #ece9f5;
  color: #5d4f7a;
}

.ops-tags {
  display: flex;
  max-width: 170px;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.ops-tags span {
  border: 1px solid #d8dfdc;
  border-radius: 5px;
  color: #63716b;
  padding: 2px 5px;
  font-size: 9px;
  white-space: nowrap;
}

.ops-next-action {
  margin-top: 8px;
  border-left: 3px solid #2d886e;
  padding-left: 7px;
}

.ops-next-action span,
.ops-next-action strong {
  display: block;
}

.ops-next-action span {
  color: #74817c;
  font-size: 9px;
}

.ops-next-action strong {
  margin-top: 2px;
  color: #214f42;
  font-size: 10px;
}

.ops-profile-meta,
.ops-profile-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.ops-profile-meta {
  margin-top: 7px;
}

.ops-profile-meta small,
.ops-profile-summary > span:not(.ops-priority) {
  color: #68766f;
  font-size: 9px;
}

.ops-profile-meta .due,
.ops-profile-summary .due {
  color: #a02e3a;
  font-weight: 800;
}

.ops-priority {
  display: inline-flex;
  min-height: 21px;
  align-items: center;
  border: 1px solid #d6dedb;
  border-radius: 5px;
  background: #f3f6f5;
  color: #586660;
  padding: 0 6px;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.ops-priority.high {
  border-color: #edcf8e;
  background: #fff3d7;
  color: #83530d;
}

.ops-priority.vip {
  border-color: #b8a9d8;
  background: #eee9f8;
  color: #573f83;
}

.partner-status-list {
  display: grid;
  gap: 5px;
  min-width: 100px;
}

.partner-status-list span {
  display: flex;
  justify-content: space-between;
  gap: 7px;
  border-bottom: 1px solid #e4e9e7;
  padding-bottom: 4px;
  font-size: 10px;
}

.partner-status-list b {
  color: #315c4f;
}

.ops-row-actions {
  display: flex;
  gap: 5px;
  margin-bottom: 8px;
}

.ops-freeze-form {
  align-items: center;
  gap: 5px;
}

.ops-freeze-form label {
  font-size: 10px;
}

.text-attention {
  color: #945c0a;
}

.text-success {
  color: #17623f;
}

.user-detail-panel {
  scroll-margin-top: 20px;
  padding: 18px;
}

.user-detail-head {
  margin-bottom: 14px;
}

.user-detail-head h2 {
  margin-bottom: 3px;
}

.ops-profile-summary {
  margin-top: 9px;
}

.ops-profile-summary > span:not(.ops-priority) {
  border-left: 1px solid #d5dedb;
  padding-left: 7px;
  font-size: 10px;
}

.user-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid #dde4e1;
  border-left: 1px solid #dde4e1;
}

.user-detail-grid > section {
  min-width: 0;
  border-right: 1px solid #dde4e1;
  border-bottom: 1px solid #dde4e1;
  padding: 15px;
}

.user-detail-grid h3 {
  margin: 0 0 12px;
  font-size: 13px;
}

.user-detail-grid .detail-wide {
  grid-column: 1 / -1;
}

.detail-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.detail-section-head a {
  color: var(--brand);
  font-size: 11px;
  font-weight: 750;
}

.ops-definition-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  margin: 0;
}

.ops-definition-list div {
  min-width: 0;
}

.ops-definition-list dt {
  margin-bottom: 3px;
  color: #74817c;
  font-size: 10px;
}

.ops-definition-list dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 750;
}

.ops-recommendation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  border-left: 4px solid #2d886e;
  background: #edf7f3;
  padding: 9px 11px;
}

.ops-recommendation.urgent {
  border-left-color: #b13b47;
  background: #fcf0f1;
}

.ops-recommendation span {
  color: #6b7873;
  font-size: 10px;
}

.ops-recommendation strong {
  color: #214f42;
  font-size: 12px;
  text-align: right;
}

.ops-recommendation.urgent strong {
  color: #8d2431;
}

.ops-profile-form,
.ops-message-form {
  display: grid;
  gap: 10px;
}

.ops-profile-form label > span,
.ops-message-form label > span {
  display: block;
  margin-bottom: 5px;
  color: #65736d;
  font-size: 10px;
  font-weight: 750;
}

.ops-form-grid {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 10px;
}

.ops-form-footer {
  display: flex;
  min-height: 36px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ops-form-footer small {
  color: #78857f;
  font-size: 9px;
  line-height: 1.4;
}

.ops-delivery-status {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  border-radius: 5px;
  padding: 0 7px;
  font-size: 9px;
  font-weight: 800;
}

.ops-delivery-status.sent {
  background: #dcf1e5;
  color: #17623f;
}

.ops-delivery-status.failed {
  background: #f8dfe2;
  color: #8d2431;
}

.ops-delivery-status.pending {
  background: #fff0cf;
  color: #80500b;
}

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

.detail-table-wrap table {
  min-width: 720px;
}

.ops-activity-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ops-activity-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 12px;
  border-bottom: 1px solid #e5eae8;
  padding: 7px 0;
  font-size: 11px;
}

.ops-activity-list li:last-child {
  border-bottom: 0;
}

.ops-activity-list span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-activity-list small {
  grid-column: 1 / -1;
  color: #7a8782;
  font-size: 9px;
}

.admin-body .search-form {
  width: min(620px, 100%);
}

.referral-reward-filter-form {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) repeat(3, minmax(150px, 1fr));
  gap: 10px;
  align-items: center;
  margin: 14px 0;
  border: 1px solid #d5e1dd;
  border-radius: 8px;
  background: #f7faf9;
  padding: 12px;
}

.referral-reward-filter-form input,
.referral-reward-filter-form select,
.referral-reward-filter-form .button {
  width: 100%;
}

.admin-body .user-filter-form {
  width: 100%;
}

.user-filter-heading {
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 16px;
}

.user-filter-result-count {
  border-radius: 999px;
  background: #e8f4f1;
  color: #087562;
  padding: 8px 12px;
  font-size: 12px;
}

.user-precision-filter {
  display: block;
  border: 1px solid #d5dedb;
  border-radius: 8px;
  background: #f8fbfa;
  padding: 14px;
}

.user-filter-grid {
  display: grid;
  gap: 10px;
}

.user-filter-grid-primary {
  grid-template-columns: minmax(220px, 1.5fr) repeat(4, minmax(140px, 1fr));
}

.user-filter-grid-advanced {
  grid-template-columns: repeat(3, minmax(170px, 1fr));
  padding-top: 12px;
}

.user-filter-grid label {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.user-filter-grid label > span {
  color: #5f6e68;
  font-size: 10px;
  font-weight: 800;
}

.admin-body .user-filter-grid input,
.admin-body .user-filter-grid select {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  border: 1px solid #cbd7d2;
  border-radius: 7px;
  background: #fff;
  color: #16202a;
  padding: 0 10px;
}

.admin-body .user-filter-grid input:focus,
.admin-body .user-filter-grid select:focus {
  border-color: #087562;
  outline: 2px solid #0875621f;
}

.user-filter-advanced {
  margin-top: 12px;
  border-top: 1px solid #d5dedb;
}

.user-filter-advanced summary {
  cursor: pointer;
  color: #087562;
  padding-top: 12px;
  font-size: 12px;
  font-weight: 800;
}

.user-filter-advanced summary small {
  margin-left: 6px;
  color: #71807a;
  font-weight: 500;
}

.user-filter-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.user-filter-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 16px;
}

.user-filter-summary > div {
  display: grid;
  min-width: 0;
  gap: 3px;
  border: 1px solid #dce5e1;
  border-radius: 7px;
  background: #fff;
  padding: 10px;
}

.user-filter-summary span,
.user-filter-summary small {
  color: #71807a;
  font-size: 9px;
}

.user-filter-summary strong {
  overflow-wrap: anywhere;
  color: #153c32;
  font-size: 16px;
}

.settings-form {
  display: block;
}

.settings-section {
  border-top: 1px solid #d5dedb;
  padding: 24px 0 28px;
}

.settings-section:first-child {
  border-top: 0;
  padding-top: 0;
}

.invite-loop-settings .settings-section-head {
  margin-bottom: 14px;
}

.invite-loop-visual {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
  border-block: 1px solid #d5dedb;
  background: #f7faf9;
}

.invite-loop-visual > div {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 78px;
  align-items: center;
  gap: 10px;
  padding: 12px 26px 12px 12px;
}

.invite-loop-visual > div:not(:last-child)::after {
  content: "›";
  position: absolute;
  top: 50%;
  right: 8px;
  color: #8b9a94;
  font-size: 25px;
  line-height: 1;
  transform: translateY(-50%);
}

.invite-loop-visual i {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  border-radius: 50%;
  background: #156b4d;
  color: #fff;
  font-style: normal;
  font-size: 12px;
  font-weight: 850;
}

.invite-loop-visual > div:nth-child(2) i {
  background: #a9650e;
}

.invite-loop-visual > div:nth-child(3) i {
  background: #275f9b;
}

.invite-loop-visual > div:nth-child(4) i {
  background: #6a3d91;
}

.invite-loop-visual span,
.invite-loop-visual small,
.invite-loop-visual strong {
  display: block;
  min-width: 0;
}

.invite-loop-visual small {
  color: #708079;
  font-size: 10px;
  font-weight: 650;
}

.invite-loop-visual strong {
  margin-top: 3px;
  color: #1d2b26;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.35;
}

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

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

.settings-grid-seven {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

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

.settings-grid label > span,
.settings-wide > span {
  display: block;
  margin-bottom: 6px;
  color: #5f6d68;
  font-size: 11px;
  font-weight: 750;
}

.toggle-setting {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #d8e0dd;
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
}

.toggle-setting > span {
  margin-bottom: 0 !important;
}

.toggle-setting b,
.toggle-setting small {
  display: block;
}

.toggle-setting b {
  color: #1f2d28;
  font-size: 12px;
}

.toggle-setting small {
  margin-top: 3px;
  color: #78857f;
  font-size: 10px;
  font-weight: 500;
}

input.toggle-input {
  position: relative;
  width: 42px;
  height: 24px;
  min-height: 24px;
  flex: 0 0 42px;
  appearance: none;
  border: 0;
  border-radius: 12px;
  background: #bdc8c4;
  padding: 0;
  cursor: pointer;
}

input.toggle-input::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px #0003;
  content: "";
  transition: transform 140ms ease;
}

input.toggle-input:checked {
  background: #17886a;
}

input.toggle-input:checked::after {
  transform: translateX(18px);
}

.settings-wide {
  display: block;
}

.settings-savebar {
  position: sticky;
  bottom: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  border-top: 1px solid #cfd9d5;
  background: #eef2f1f2;
  padding: 14px 0;
  backdrop-filter: blur(10px);
}

.settings-savebar span {
  color: #65736e;
  font-size: 11px;
  font-weight: 700;
}

.delete-confirm {
  width: max-content;
  margin-top: 8px;
}

.delete-confirm summary {
  color: #a62c3a;
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
}

.delete-confirm form {
  margin-top: 8px;
}

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

.referral-mode-tabs {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 16px;
  border: 1px solid #d5dedb;
  border-radius: 8px;
  background: #fff;
  padding: 4px;
}

.referral-mode-tabs a {
  min-width: 108px;
  border-radius: 6px;
  padding: 9px 14px;
  color: #63726c;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.referral-mode-tabs a.active {
  background: #176f5b;
  color: #fff;
}

.fission-overview-panel {
  margin-bottom: 16px;
}

.admin-body .fission-filter-form {
  display: grid;
  width: min(760px, 100%);
  max-width: 760px;
  grid-template-columns: minmax(210px, 1fr) 120px 145px 130px auto;
  gap: 8px;
}

.admin-body .fission-filter-form input,
.admin-body .fission-filter-form select,
.admin-body .fission-filter-form .button {
  width: auto;
  min-width: 0;
}

.fission-funnel {
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 1fr) 22px) minmax(130px, 1fr);
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.fission-funnel > div {
  min-width: 0;
  border: 1px solid #dce5e1;
  border-radius: 8px;
  background: #f7faf9;
  padding: 12px 14px;
}

.fission-funnel small,
.fission-funnel strong {
  display: block;
}

.fission-funnel small {
  color: #71807a;
  font-size: 10px;
  font-weight: 750;
}

.fission-funnel strong {
  margin-top: 5px;
  color: #176f5b;
  font-size: 22px;
}

.fission-funnel > span {
  color: #8a9892;
  text-align: center;
}

.fission-table {
  min-width: 1120px;
  table-layout: fixed;
}

.fission-table th:nth-child(1) { width: 160px; }
.fission-table th:nth-child(2) { width: 120px; }
.fission-table th:nth-child(3) { width: 150px; }
.fission-table th:nth-child(4) { width: 90px; }
.fission-table th:nth-child(5) { width: 120px; }
.fission-table th:nth-child(6) { width: 145px; }
.fission-table th:nth-child(7) { width: 155px; }
.fission-table th:nth-child(8) { width: 110px; }

.fission-table td > strong,
.fission-table td > small {
  display: block;
}

.fission-table td > small {
  margin-top: 4px;
  color: #788680;
  font-size: 10px;
  line-height: 1.35;
}

.fission-detail-panel {
  scroll-margin-top: 20px;
}

.fission-tree {
  border-top: 1px solid #dce4e1;
}

.fission-branch {
  border-bottom: 1px solid #e2e8e5;
  padding: 10px 0;
}

.fission-node {
  display: grid;
  grid-template-columns: 34px minmax(180px, 1fr) 90px 70px 100px;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 7px 10px;
}

.fission-node.level-two {
  margin-left: 44px;
  border-left: 2px solid #cfe1da;
  background: #f8faf9;
}

.fission-node span > strong,
.fission-node span > small {
  display: block;
}

.fission-node span > small {
  margin-top: 3px;
  color: #788680;
  font-size: 10px;
}

.fission-level-mark {
  color: #25755f;
  font-size: 10px;
  font-weight: 850;
}

.fission-node.empty-node {
  display: block;
  min-height: 0;
  color: #83908b;
  font-size: 11px;
}

.referral-batch-toolbar {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  border: 1px solid #d5e1dd;
  border-radius: 8px;
  background: #f4f8f6;
  padding: 10px;
}

.referral-batch-summary strong,
.referral-batch-summary small {
  display: block;
}

.referral-batch-summary small {
  margin-top: 3px;
  color: #71807a;
  font-size: 10px;
}

.referral-batch-summary .confirm-check {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  color: #40534c;
  font-size: 10px;
  font-weight: 750;
}

.referral-batch-toolbar .confirm-check input {
  width: auto;
  margin: 0;
}

.referral-batch-toolbar input {
  width: 100%;
}

.partner-batch-toolbar {
  grid-template-columns: minmax(170px, 1fr) minmax(220px, 1.2fr) auto auto auto;
}

.partner-review-table {
  min-width: 1180px;
  table-layout: fixed;
}

.partner-review-table th:nth-child(1) { width: 42px; }
.partner-review-table th:nth-child(2) { width: 150px; }
.partner-review-table th:nth-child(3) { width: 165px; }
.partner-review-table th:nth-child(4) { width: 135px; }
.partner-review-table th:nth-child(5) { width: 220px; }
.partner-review-table th:nth-child(6) { width: 190px; }
.partner-review-table th:nth-child(7) { width: 210px; }

.partner-user-cell strong,
.partner-user-cell small,
.partner-project-cell strong,
.partner-project-cell small,
.partner-project-cell > span,
.partner-evidence-cell strong,
.partner-evidence-cell small,
.partner-time-cell strong,
.partner-time-cell small,
.partner-action-cell > small {
  display: block;
}

.partner-user-cell small,
.partner-project-cell small,
.partner-evidence-cell small,
.partner-time-cell small,
.partner-action-cell > small {
  margin-top: 4px;
  color: #74817c;
  font-size: 10px;
  line-height: 1.35;
}

.partner-project-cell > span {
  margin-top: 7px;
  color: #176f5b;
  font-size: 11px;
  font-weight: 800;
}

.partner-evidence-cell code {
  overflow-wrap: anywhere;
  white-space: normal;
}

.partner-review-table .risk-mark {
  margin-top: 7px;
  margin-bottom: 0;
}

.partner-action-cell .row-action-panel {
  min-width: 190px;
}

.partner-action-cell .terminal-state {
  margin-bottom: 4px;
}

.partner-config-stack {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.partner-task-editor {
  padding: 18px;
}

.partner-create-panel,
.partner-task-config-card {
  border: 1px solid #dce4e1;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.partner-create-panel {
  margin-top: 14px;
}

.partner-create-panel > summary {
  margin: 14px;
  width: max-content;
  cursor: pointer;
  list-style: none;
}

.partner-task-config-card > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
}

.partner-task-config-card > summary::-webkit-details-marker,
.partner-create-panel > summary::-webkit-details-marker {
  display: none;
}

.partner-task-config-card > summary span {
  display: grid;
  gap: 4px;
}

.partner-task-config-card > summary span:last-child {
  text-align: right;
}

.partner-task-config-card[open] > summary {
  background: #f4f8f6;
  border-bottom: 1px solid #dce4e1;
}

.partner-task-save-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.partner-task-editor h3 {
  margin: 0;
  color: #176f5b;
}

@media (max-width: 720px) {
  .partner-task-config-card > summary {
    align-items: flex-start;
  }

  .partner-task-config-card > summary span:last-child {
    text-align: left;
  }
}

.referral-select-cell {
  text-align: center;
}

.referral-select-cell input {
  width: 17px;
  height: 17px;
  accent-color: #176f5b;
}

.referral-kpi {
  min-width: 0;
  min-height: 116px;
  border: 1px solid #d5dedb;
  border-top: 3px solid #528f7d;
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.referral-kpi.attention { border-top-color: #c98520; }
.referral-kpi.healthy { border-top-color: #23865f; }
.referral-kpi.danger { border-top-color: #b33a48; }

.referral-kpi span,
.referral-kpi strong,
.referral-kpi small {
  display: block;
}

.referral-kpi span {
  color: #68766f;
  font-size: 12px;
  font-weight: 750;
}

.referral-kpi strong {
  margin: 10px 0 8px;
  overflow-wrap: anywhere;
  font-size: 28px;
  line-height: 1;
}

.referral-kpi small {
  color: #74817c;
  font-size: 11px;
  line-height: 1.4;
}

.referral-ledger-panel {
  min-width: 0;
}

.referral-ledger-head {
  align-items: flex-start;
}

.referral-ledger-head h2 {
  margin-bottom: 5px;
}

.referral-ledger-head .muted {
  max-width: 720px;
  margin-bottom: 0;
}

.referral-status-tabs {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  margin: 16px 0 0;
  border-bottom: 1px solid #d9e1de;
}

.referral-status-tabs a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 7px;
  border-bottom: 3px solid transparent;
  color: #68766f;
  padding: 0 13px;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.referral-status-tabs a:hover,
.referral-status-tabs a.active {
  border-bottom-color: #16775f;
  color: #0c6653;
}

.referral-status-tabs b {
  min-width: 22px;
  border-radius: 8px;
  background: #edf2f0;
  padding: 3px 6px;
  color: #53625c;
  text-align: center;
  font-size: 10px;
}

.referral-status-tabs a.active b {
  background: #dcefe9;
  color: #0c6653;
}

.referral-policy-band {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 12px;
  margin: 14px 0;
  border-left: 4px solid #2f8b70;
  background: #f3f8f6;
  padding: 11px 13px;
  color: #52615c;
  font-size: 12px;
  line-height: 1.5;
}

.referral-policy-band strong {
  color: #176a55;
}

.referral-ledger-table {
  min-width: 1240px;
  table-layout: fixed;
}

.referral-ledger-table th:nth-child(1) { width: 72px; }
.referral-ledger-table th:nth-child(2) { width: 138px; }
.referral-ledger-table th:nth-child(3) { width: 230px; }
.referral-ledger-table th:nth-child(4) { width: 92px; }
.referral-ledger-table th:nth-child(5) { width: 160px; }
.referral-ledger-table th:nth-child(6) { width: 180px; }
.referral-ledger-table th:nth-child(7) { width: 126px; }
.referral-ledger-table th:nth-child(8) { width: 190px; }

.referral-ledger-table td {
  padding-top: 14px;
  padding-bottom: 14px;
}

.referral-record-cell strong,
.referral-record-cell small,
.referral-person-cell strong,
.referral-person-cell small,
.referral-amount-cell strong,
.referral-amount-cell small,
.referral-risk-cell strong,
.referral-risk-cell small,
.referral-time-cell strong,
.referral-time-cell small {
  display: block;
}

.referral-record-cell strong,
.referral-person-cell strong,
.referral-amount-cell strong,
.referral-time-cell strong {
  margin-bottom: 4px;
  overflow-wrap: anywhere;
  color: #1e2b26;
  font-size: 12px;
}

.referral-record-cell small,
.referral-person-cell small,
.referral-amount-cell small,
.referral-risk-cell small,
.referral-time-cell small {
  margin-top: 3px;
  color: #7a8782;
  font-size: 10px;
  line-height: 1.35;
}

.referral-amount-cell strong {
  color: #087562;
  font-size: 15px;
}

.evidence-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.evidence-chip,
.risk-mark,
.referral-status,
.terminal-state {
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.1;
}

.evidence-chip {
  border: 1px solid #dce4e1;
  background: #f7f9f8;
  color: #5b6964;
}

.evidence-chip.danger {
  border-color: #ecc4ca;
  background: #fff0f2;
  color: #992c39;
}

.evidence-chip.success {
  border-color: #b9dfd2;
  background: #e8f6f1;
  color: #146c50;
}

.evidence-chip.attention {
  border-color: #ecd39f;
  background: #fff5dc;
  color: #81500b;
}

.referral-status.pending { background: #fff0cf; color: #81500b; }
.referral-status.under_review { background: #e7eef9; color: #315d8b; }
.referral-status.verified,
.referral-status.paid { background: #def3e9; color: #146c50; }
.referral-status.rewarded { background: #def3e9; color: #146c50; }
.referral-status.rejected,
.referral-status.reversed { background: #f9e3e7; color: #982d3a; }

.release-state {
  display: block;
  margin-top: 7px;
  color: #6e7c76;
  font-size: 10px;
  line-height: 1.35;
}

.release-state.danger { color: #9f2e3b; }
.release-state.success,
.release-state.ready { color: #167054; }
.release-state.waiting { color: #89580f; }

.risk-mark {
  margin-bottom: 6px;
  background: #e4f3ed;
  color: #166b51;
}

.risk-mark.medium,
.risk-mark.high { background: #fff0cf; color: #87530a; }
.risk-mark.critical { background: #f9e0e4; color: #9c2a38; }

.referral-risk-cell strong {
  overflow-wrap: anywhere;
  color: #34433d;
  font-size: 11px;
  line-height: 1.35;
}

.referral-time-cell small + small {
  margin-top: 5px;
}

.row-action-menu {
  width: 100%;
}

.row-action-menu > summary {
  width: max-content;
  list-style: none;
}

.row-action-menu > summary::-webkit-details-marker {
  display: none;
}

.row-action-panel {
  width: 100%;
  margin-top: 9px;
  border-left: 3px solid #2d856c;
  background: #f7f9f8;
  padding: 10px;
}

.reversal-menu .row-action-panel {
  border-left-color: #b13a47;
  background: #fff7f8;
}

.row-action-panel > strong,
.row-action-panel > p,
.row-action-panel form,
.row-action-panel label > span {
  display: block;
}

.row-action-panel > strong {
  font-size: 11px;
}

.row-action-panel > p {
  margin: 5px 0 9px;
  color: #66736e;
  font-size: 10px;
  line-height: 1.4;
}

.row-action-panel form + form {
  margin-top: 10px;
  border-top: 1px solid #dce3e1;
  padding-top: 10px;
}

.row-action-panel label > span {
  margin-bottom: 4px;
  color: #62706a;
  font-size: 9px;
  font-weight: 750;
}

.row-action-panel input,
.row-action-panel select,
.row-action-panel textarea,
.row-action-panel .button {
  width: 100%;
}

.row-action-panel .button {
  margin-top: 7px;
}

.row-action-panel .confirm-check {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 8px;
  color: #7d2933;
  font-size: 10px;
  line-height: 1.35;
}

.row-action-panel .confirm-check input {
  width: auto;
  margin-top: 2px;
}

.terminal-state {
  background: #edf1ef;
  color: #68756f;
}

.referral-empty {
  height: 110px;
}

.kol-metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.kol-metric {
  min-width: 0;
  min-height: 126px;
  border: 1px solid var(--line);
  border-top: 3px solid #278c78;
  border-radius: 8px;
  background: var(--surface);
  padding: 15px;
}

.kol-metric:nth-child(3),
.kol-metric:nth-child(4) { border-top-color: #376ea6; }
.kol-metric:nth-child(5),
.kol-metric:nth-child(6) { border-top-color: #bc7a18; }

.kol-metric span,
.kol-metric small,
.kol-metric strong,
.kol-channel-cell strong,
.kol-channel-cell code,
.kol-channel-cell span,
.kol-number,
.kol-rate {
  display: block;
}

.kol-metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.kol-metric strong {
  margin-top: 10px;
  overflow-wrap: anywhere;
  font-size: 25px;
  line-height: 1.1;
}

.kol-metric small {
  margin-top: 9px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.kol-section-head {
  align-items: flex-start;
}

.kol-create-panel {
  border-top: 3px solid var(--brand);
}

.kol-create-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-top: 18px;
}

.kol-create-form label,
.kol-edit-form label {
  display: block;
  min-width: 0;
}

.kol-create-form label > span,
.kol-edit-form label > span {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
}

.kol-create-form .kol-wide-field {
  grid-column: span 2;
}

.kol-create-action {
  align-self: end;
  min-height: 38px;
}

.kol-filter-form {
  display: grid;
  width: min(720px, 100%);
  grid-template-columns: minmax(180px, 1fr) 140px 130px auto;
  gap: 8px;
}

.kol-table-wrap {
  margin-top: 14px;
}

.kol-table {
  min-width: 1240px;
}

.kol-table th {
  background: #f7f9fa;
  color: #526173;
  white-space: nowrap;
}

.kol-channel-cell {
  min-width: 180px;
}

.kol-channel-cell strong {
  margin-bottom: 5px;
  font-size: 13px;
}

.kol-channel-cell code {
  width: fit-content;
  border-radius: 5px;
  background: #edf4f2;
  color: var(--brand-dark);
  padding: 3px 6px;
  font-size: 11px;
}

.kol-channel-cell span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}

.kol-link-box {
  display: grid;
  min-width: 300px;
  grid-template-columns: minmax(210px, 1fr) auto;
  gap: 6px;
}

.kol-link-box input {
  min-height: 32px;
  background: #f8fafb;
  padding: 6px 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
}

.kol-copy-button.copied {
  border-color: var(--success);
  background: #e7f6ee;
  color: var(--success);
}

.kol-number {
  font-size: 16px;
  line-height: 1.25;
}

.kol-rate {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.kol-budget-cell {
  min-width: 150px;
}

.kol-budget-cell div {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.kol-budget-cell div span,
.kol-budget-cell small {
  color: var(--muted);
  font-size: 10px;
}

.kol-budget-cell progress {
  display: block;
  width: 100%;
  height: 7px;
  margin: 7px 0 5px;
  overflow: hidden;
  border: 0;
  border-radius: 4px;
  background: #e7ecef;
  accent-color: var(--brand);
}

.kol-quality,
.kol-activation {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  border-radius: 7px;
  padding: 0 8px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.kol-quality.scale,
.kol-activation.active { background: #def3e8; color: #126442; }
.kol-quality.watch,
.kol-quality.not_started { background: #fff1ce; color: #7b500d; }
.kol-quality.pause { background: #f9e1e4; color: #922d39; }
.kol-activation { background: #edf0f2; color: #637080; }

.kol-actions-cell {
  min-width: 150px;
}

.kol-edit-details {
  margin-top: 7px;
}

.kol-edit-details summary {
  width: fit-content;
  color: var(--brand);
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
}

.kol-edit-form {
  display: grid;
  width: 270px;
  gap: 8px;
  margin-top: 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f9fbfa;
  padding: 10px;
}

.kol-edit-form input,
.kol-edit-form select {
  min-height: 33px;
  padding: 6px 8px;
  font-size: 11px;
}

.kol-empty-value {
  color: var(--danger);
  font-size: 11px;
}

.kol-empty-row {
  padding: 32px 12px;
}

.kol-detail-panel {
  scroll-margin-top: 18px;
  border-top: 3px solid #376ea6;
}

.kol-commission-policy-panel,
.kol-commission-settlement-panel {
  margin-top: 18px;
}

.kol-commission-form {
  display: grid;
  grid-template-columns: minmax(190px, 1.4fr) repeat(4, minmax(110px, 0.8fr)) minmax(190px, 1.2fr) auto;
  align-items: end;
  gap: 12px;
}

.kol-commission-form > label:not(.toggle-setting) {
  display: grid;
  gap: 6px;
}

.kol-commission-form > label > span,
.kol-commission-campaign-form label > span {
  color: #5f6d68;
  font-size: 11px;
  font-weight: 750;
}

.kol-commission-campaign-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr)) auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 8px;
}

.kol-commission-campaign-form label {
  display: grid;
  gap: 5px;
}

.kol-commission-form input,
.kol-commission-campaign-form input {
  min-width: 0;
}

.risk-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.risk-policy-panel {
  border-top: 3px solid var(--brand);
}

.risk-policy-form {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(420px, 1.3fr);
  gap: 14px;
}

.risk-policy-form fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 14px;
}

.risk-policy-form fieldset:first-child {
  grid-template-columns: 1fr;
  align-content: start;
}

.risk-policy-form legend {
  padding: 0 7px;
  color: var(--ink);
  font-weight: 850;
}

.risk-policy-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.risk-policy-form input {
  width: 100%;
}

.risk-policy-form fieldset > small {
  grid-column: 1 / -1;
  color: var(--muted);
  line-height: 1.5;
}

.risk-policy-actions {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.risk-panel .section-head {
  align-items: flex-end;
}

.risk-filter {
  width: min(760px, 100%);
}

.risk-filter input {
  min-width: 220px;
}

.risk-bulk-guidance {
  margin: 10px 0 8px;
  color: #526661;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.risk-bulk-bar {
  display: flex;
  min-height: 56px;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f8fafb;
  padding: 8px 10px;
}

.risk-select-all {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 750;
  white-space: nowrap;
}

.risk-select-all input,
.risk-row-select {
  width: 17px;
  min-height: 17px;
  margin: 0;
}

.risk-selection-count {
  min-width: 64px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.risk-bulk-form {
  display: grid;
  flex: 1;
  grid-template-columns: 170px minmax(180px, 1fr) auto;
  gap: 8px;
}

.risk-bulk-form select,
.risk-bulk-form input {
  min-width: 0;
}

.risk-select-cell {
  width: 42px;
  text-align: center;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.risk-table {
  min-width: 1120px;
}

.risk-table td {
  padding-top: 14px;
  padding-bottom: 14px;
  vertical-align: top;
}

.risk-meta {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.risk-evidence {
  max-width: 260px;
  color: #283846;
  font-weight: 650;
  line-height: 1.45;
}

.severity-pill,
.risk-table .status-pill {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  margin-top: 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 8px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.severity-pill.medium,
.risk-table .status-pill.monitoring {
  border-color: #e8c996;
  background: #fff7e8;
  color: #81500b;
}

.severity-pill.high,
.severity-pill.critical,
.risk-table .status-pill.blocked {
  border-color: #efbcc2;
  background: #fff0f2;
  color: #9d2e3b;
}

.severity-pill.low,
.risk-table .status-pill.open {
  border-color: #a9d8cf;
  background: #eaf7f4;
  color: #14654f;
}

.risk-table .status-pill.reviewed,
.risk-table .status-pill.dismissed {
  border-color: #c8d7cf;
  background: #f0f7f3;
  color: #25644e;
}

.risk-actions {
  width: 310px;
}

.risk-review-form,
.risk-block-action form {
  display: grid;
  gap: 7px;
}

.risk-review-form {
  grid-template-columns: 104px minmax(128px, 1fr) auto;
}

.risk-review-form input,
.risk-review-form select {
  min-width: 0;
}

.risk-block-action {
  margin-top: 9px;
  color: #9d2e3b;
  font-size: 11px;
}

.risk-block-action summary {
  width: fit-content;
  cursor: pointer;
  font-weight: 800;
}

.risk-block-action form {
  margin-top: 8px;
  border-left: 3px solid #efbcc2;
  padding-left: 10px;
}

.risk-block-action label {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: #9d2e3b;
  line-height: 1.35;
}

.admin-body a:focus-visible,
.admin-body button:focus-visible,
.admin-body summary:focus-visible,
.admin-body input:focus-visible,
.admin-body select:focus-visible,
.admin-body textarea:focus-visible {
  outline: 3px solid #77cdb4;
  outline-offset: 2px;
}

@media (max-width: 1180px) {
  .referral-reward-filter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .referral-reward-filter-form > input[name="q"] {
    grid-column: span 2;
  }

  .risk-policy-form {
    grid-template-columns: 1fr;
  }

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

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

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

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

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

  .admin-body .visual-card:nth-child(n) {
    grid-column: span 6;
  }
}

@media (max-width: 900px) {
  .risk-policy-form fieldset {
    grid-template-columns: 1fr;
  }

  .risk-policy-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .kol-create-form,
  .kol-filter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .admin-sidebar {
    position: static;
    height: auto;
    max-height: none;
    padding: 16px;
  }

  .admin-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin-top: 18px;
    padding-bottom: 4px;
  }

  .admin-nav > .nav-group {
    min-width: 170px;
    margin: 0;
    border: 1px solid #2c4039;
    border-radius: 8px;
    background: #1d2d28;
    padding: 9px;
  }

  .admin-sidebar-footer {
    display: none;
  }

  .admin-workspace {
    padding: 24px 20px 48px;
  }

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

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

  .risk-review-form {
    grid-template-columns: 1fr;
  }

  .risk-bulk-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .risk-bulk-form {
    grid-template-columns: 1fr;
  }

  .fission-funnel {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
  }

  .admin-body .fission-filter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fission-funnel > span {
    display: none;
  }

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

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

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

  .invite-loop-visual > div:nth-child(2)::after {
    content: none;
  }
}

@media (max-width: 620px) {
  .admin-sidebar {
    padding: 12px;
  }

  .admin-nav {
    display: flex;
    gap: 7px;
    margin: 12px -12px 0;
    padding: 0 12px 4px;
    scroll-snap-type: x proximity;
  }

  .admin-nav > .nav-group {
    display: contents;
  }

  .admin-nav .nav-group p {
    display: none;
  }

  .admin-nav .nav-group a {
    min-height: 38px;
    flex: 0 0 auto;
    scroll-snap-align: start;
    border: 1px solid #2c4039;
    background: #1d2d28;
    padding: 0 11px;
  }

  .admin-nav .nav-group a.active {
    order: -1;
  }

  .referral-mode-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .admin-body .fission-filter-form {
    grid-template-columns: 1fr;
  }

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

  .fission-tree {
    overflow-x: auto;
  }

  .fission-node {
    min-width: 700px;
  }

  .referral-batch-toolbar {
    grid-template-columns: 1fr;
  }

  .referral-batch-toolbar .button {
    width: 100%;
  }

  .invite-loop-visual {
    grid-template-columns: 1fr;
  }

  .invite-loop-visual > div {
    min-height: 64px;
    padding-right: 12px;
    border-bottom: 1px solid #e1e7e4;
  }

  .invite-loop-visual > div:last-child {
    border-bottom: 0;
  }

  .invite-loop-visual > div::after {
    content: none !important;
  }

  .referral-kpi-grid {
    grid-template-columns: 1fr;
  }

  .referral-policy-band {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .kol-metric-grid,
  .kol-create-form,
  .kol-filter-form,
  .kol-commission-form,
  .kol-commission-campaign-form {
    grid-template-columns: 1fr;
  }

  .kol-create-form .kol-wide-field {
    grid-column: auto;
  }

  .kol-section-head {
    align-items: stretch;
  }

  .admin-workspace {
    padding: 20px 12px 40px;
  }

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

  .admin-topbar-actions {
    width: 100%;
  }

  .admin-topbar-actions .button {
    flex: 1;
  }

  .queue-grid,
  .settings-grid,
  .settings-grid-three,
  .settings-grid-seven,
  .settings-grid-wide {
    grid-template-columns: 1fr;
  }

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

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

  .user-detail-grid {
    grid-template-columns: 1fr;
  }

  .user-detail-grid .detail-wide {
    grid-column: auto;
  }

  .user-detail-panel {
    padding: 14px;
  }

  .ops-form-grid {
    grid-template-columns: 1fr;
  }

  .ops-form-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .ops-form-footer .button {
    width: 100%;
  }

  .admin-body .visual-card:nth-child(n) {
    grid-column: 1 / -1;
  }

  .admin-body .funnel-row {
    grid-template-columns: 92px minmax(64px, 1fr) 48px;
  }

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

  .admin-body .section-head,
  .admin-body .search-form {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-body .search-form input,
  .admin-body .search-form select,
  .admin-body .search-form .button {
    width: 100%;
  }

  .referral-reward-filter-form {
    grid-template-columns: 1fr;
  }

  .referral-reward-filter-form > input[name="q"] {
    grid-column: auto;
  }

  .settings-savebar span {
    display: none;
  }

  .settings-savebar .button {
    width: 100%;
  }
}
/* Live operations analytics */
.analytics-dashboard { margin-bottom: 26px; }

.kol-commission-panel {
  margin-top: 18px;
  border-top: 3px solid #287f6d;
  scroll-margin-top: 18px;
}

.kol-commission-summary-head {
  display: grid;
  grid-template-columns: minmax(230px, 0.8fr) minmax(420px, 1.2fr);
  align-items: center;
  gap: 22px;
  cursor: pointer;
}

.kol-commission-summary-head::marker {
  color: var(--brand);
}

.kol-commission-title {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.kol-commission-title .eyebrow {
  width: 100%;
}

.kol-commission-title h2 {
  margin: 0;
}

.kol-commission-status,
.kol-config-state,
.kol-payout-status {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 6px;
  padding: 0 8px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.kol-commission-status.enabled,
.kol-config-state.ready,
.kol-payout-status.paid {
  background: #def3e8;
  color: #126442;
}

.kol-commission-status.disabled,
.kol-config-state.missing,
.kol-payout-status.pending {
  background: #fff0cf;
  color: #80500b;
}

.kol-payout-status.approved {
  background: #e6eff9;
  color: #2d5f91;
}

.kol-payout-status.rejected,
.kol-payout-status.cancelled {
  background: #edf1ef;
  color: #63706a;
}

.kol-commission-head-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-left: 1px solid var(--line);
}

.kol-commission-head-metrics > span {
  min-width: 0;
  border-right: 1px solid var(--line);
  padding: 3px 14px;
}

.kol-commission-head-metrics > span:last-child {
  border-right: 0;
}

.kol-commission-head-metrics small,
.kol-commission-head-metrics strong {
  display: block;
}

.kol-commission-head-metrics small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.kol-commission-head-metrics strong {
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 17px;
}

.kol-commission-lifecycle {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 18px 0 0;
  border-block: 1px solid var(--line);
  background: #f8fbfa;
}

.kol-commission-lifecycle > span {
  min-width: 0;
  border-right: 1px solid var(--line);
  padding: 12px 14px;
}

.kol-commission-lifecycle > span:last-child {
  border-right: 0;
}

.kol-commission-lifecycle b,
.kol-commission-lifecycle small {
  display: block;
}

.kol-commission-lifecycle b {
  color: #214f42;
  font-size: 12px;
}

.kol-commission-lifecycle small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.kol-commission-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0 0 16px;
  border-bottom: 1px solid var(--line);
}

.kol-commission-summary > div {
  min-width: 0;
  border-right: 1px solid var(--line);
  padding: 14px;
}

.kol-commission-summary > div:last-child {
  border-right: 0;
}

.kol-commission-summary span,
.kol-commission-summary strong,
.kol-commission-summary small {
  display: block;
}

.kol-commission-summary span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.kol-commission-summary strong {
  margin-top: 5px;
  overflow-wrap: anywhere;
  font-size: 18px;
}

.kol-commission-summary small {
  margin-top: 4px;
  color: #7a8782;
  font-size: 9px;
}

.kol-commission-notice {
  margin: 0 0 14px;
}

.kol-commission-notice.warning {
  border-color: #e3c88e;
  background: #fff8e8;
  color: #795216;
}

.kol-commission-form {
  display: grid;
  grid-template-columns: minmax(220px, 1.25fr) minmax(300px, 1.45fr) minmax(135px, 0.65fr) minmax(145px, 0.7fr) minmax(210px, 1fr) auto;
  align-items: end;
  gap: 12px;
  margin: 14px 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
  padding: 14px;
}

.kol-commission-form label,
.kol-rate-control {
  min-width: 0;
}

.kol-commission-form label > span,
.kol-rate-control > span,
.kol-commission-campaign-form label > span {
  display: block;
  margin-bottom: 5px;
  color: #5f6d68;
  font-size: 10px;
  font-weight: 750;
}

.kol-rate-control > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.kol-rate-control label small {
  display: block;
  margin-bottom: 3px;
  color: #7a8782;
  font-size: 9px;
}

.kol-commission-form input,
.kol-commission-campaign-form input {
  min-width: 0;
  width: 100%;
}

.kol-commission-table {
  min-width: 1080px;
}

.kol-commission-table th {
  background: #f7f9fa;
  color: #526173;
  white-space: nowrap;
}

.kol-commission-channel {
  min-width: 155px;
}

.kol-commission-channel > strong,
.kol-commission-channel > code,
.kol-commission-channel > small {
  display: block;
}

.kol-commission-channel > code {
  width: fit-content;
  margin: 5px 0 7px;
  border-radius: 5px;
  background: #edf4f2;
  color: var(--brand-dark);
  padding: 3px 6px;
  font-size: 10px;
}

.kol-commission-channel > small,
.kol-commission-actions > small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 9px;
}

.kol-commission-campaign-form {
  display: grid;
  min-width: 360px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: 8px;
  margin-top: 8px;
}

.kol-commission-campaign-form label {
  display: grid;
  min-width: 0;
}

.kol-commission-campaign-form button {
  justify-self: start;
}

.kol-commission-config-cell {
  min-width: 365px;
}

.kol-commission-config-readout {
  display: grid;
  grid-template-columns: 0.75fr 0.85fr 1.4fr;
  gap: 12px;
}

.kol-commission-config-readout > span {
  min-width: 0;
}

.kol-commission-config-readout small,
.kol-commission-config-readout strong {
  display: block;
}

.kol-commission-config-readout small {
  color: var(--muted);
  font-size: 9px;
}

.kol-commission-config-readout strong {
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 11px;
}

.kol-commission-config-details {
  margin-top: 9px;
}

.kol-commission-config-details > summary {
  width: fit-content;
  color: var(--brand);
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}

.kol-commission-ledger-cell {
  display: grid;
  min-width: 190px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
}

.kol-commission-ledger-cell > span {
  min-width: 0;
}

.kol-commission-ledger-cell small,
.kol-commission-ledger-cell strong {
  display: block;
}

.kol-commission-ledger-cell small {
  color: var(--muted);
  font-size: 9px;
}

.kol-commission-ledger-cell strong {
  margin-top: 3px;
  overflow-wrap: anywhere;
  font-size: 12px;
}

.kol-commission-ledger-cell .available strong {
  color: #087562;
}

.kol-commission-actions {
  min-width: 155px;
}

.kol-commission-actions form + form {
  margin-top: 7px;
}

.kol-commission-actions .button {
  width: 100%;
}

.kol-commission-actions .button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.kol-commission-payouts {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.kol-payout-review-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.kol-payout-review-head h3 {
  margin: 2px 0 4px;
  font-size: 18px;
}

.kol-payout-review-head > div:first-child > small,
.kol-payout-flow small,
.kol-payout-empty span {
  color: var(--muted);
  font-size: 11px;
}

.kol-payout-review-metrics {
  display: grid;
  min-width: 390px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.kol-payout-review-metrics span {
  padding: 9px 12px;
}

.kol-payout-review-metrics span + span {
  border-left: 1px solid var(--line);
}

.kol-payout-review-metrics small,
.kol-payout-review-metrics strong {
  display: block;
}

.kol-payout-review-metrics small {
  color: var(--muted);
  font-size: 10px;
}

.kol-payout-review-metrics strong {
  margin-top: 3px;
  font-size: 17px;
}

.kol-payout-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f4f8f6;
}

.kol-payout-flow span {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
}

.kol-payout-flow span + span {
  border-left: 1px solid var(--line);
}

.kol-payout-empty {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  border-left: 3px solid var(--brand);
  background: #f8faf9;
  padding: 12px 14px;
}

.kol-commission-refresh-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  background: #f4f8f6;
  padding: 9px 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.kol-commission-refresh-bar form {
  flex: 0 0 auto;
}

.kol-settlement-workbench {
  margin-top: 16px;
  border: 1px solid #b7d2c9;
  border-top: 3px solid var(--brand);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.kol-settlement-workbench-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px;
}

.kol-settlement-workbench-head h3 {
  margin: 2px 0 4px;
  font-size: 19px;
}

.kol-settlement-workbench-head small {
  color: var(--muted);
  font-size: 11px;
}

.kol-settlement-all-preview,
.kol-settlement-row-preview {
  position: relative;
}

.kol-settlement-all-preview > summary,
.kol-settlement-row-preview > summary {
  list-style: none;
  cursor: pointer;
}

.kol-settlement-all-preview > summary::-webkit-details-marker,
.kol-settlement-row-preview > summary::-webkit-details-marker {
  display: none;
}

.kol-settlement-confirm {
  display: grid;
  min-width: 290px;
  gap: 6px;
  margin-top: 8px;
  border: 1px solid #c6d9d3;
  border-radius: 7px;
  background: #f7fbf9;
  padding: 12px;
}

.kol-settlement-all-preview .kol-settlement-confirm {
  position: absolute;
  z-index: 5;
  top: 100%;
  right: 0;
  box-shadow: 0 12px 30px rgba(24, 54, 46, 0.14);
}

.kol-settlement-confirm span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.kol-settlement-confirm form {
  margin-top: 4px;
}

.kol-settlement-confirm .button {
  width: 100%;
}

.kol-settlement-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-block: 1px solid var(--line);
  background: #f7faf9;
}

.kol-settlement-metrics article {
  min-width: 0;
  border-right: 1px solid var(--line);
  padding: 14px 16px;
}

.kol-settlement-metrics article:last-child {
  border-right: 0;
}

.kol-settlement-metrics span,
.kol-settlement-metrics strong,
.kol-settlement-metrics small {
  display: block;
}

.kol-settlement-metrics span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.kol-settlement-metrics strong {
  margin-top: 4px;
  font-size: 22px;
}

.kol-settlement-metrics small {
  margin-top: 4px;
  color: #718079;
  font-size: 9px;
}

.kol-settlement-metrics .primary strong,
.settlement-amount {
  color: #087562;
}

.kol-settlement-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.kol-settlement-flow span {
  position: relative;
  display: grid;
  gap: 2px;
  padding: 10px 16px;
}

.kol-settlement-flow span + span {
  border-left: 1px solid var(--line);
}

.kol-settlement-flow b {
  color: #315f53;
  font-size: 11px;
}

.kol-settlement-flow small {
  color: var(--muted);
  font-size: 9px;
}

.kol-settlement-table-wrap {
  margin: 0;
  border: 0;
  border-radius: 0;
}

.kol-settlement-table {
  min-width: 940px;
}

.kol-settlement-table th {
  background: #eef5f2;
  color: #52635d;
  white-space: nowrap;
}

.kol-settlement-table td {
  vertical-align: top;
}

.kol-settlement-table td > strong,
.kol-settlement-table td > code,
.kol-settlement-table td > small {
  display: block;
}

.kol-settlement-table td > code {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.kol-settlement-table td > small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.kol-threshold-state {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 6px;
  padding: 0 8px;
  font-size: 10px;
  font-weight: 800;
}

.kol-threshold-state.ready {
  background: #def3e8;
  color: #126442;
}

.kol-threshold-state.waiting {
  background: #edf1ef;
  color: #5e6b66;
}

.kol-settlement-row-preview {
  min-width: 150px;
}

.kol-settlement-explain,
.kol-commission-advanced {
  border-top: 1px solid var(--line);
}

.kol-settlement-explain > summary,
.kol-commission-advanced > summary {
  cursor: pointer;
  padding: 12px 16px;
  color: #315f53;
  font-size: 11px;
  font-weight: 800;
}

.kol-settlement-explain-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  border-top: 1px solid var(--line);
  padding: 14px 16px;
}

.kol-settlement-explain-grid h4 {
  margin: 0 0 8px;
  font-size: 12px;
}

.kol-settlement-explain-grid p {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 10px;
  margin: 0;
  border-top: 1px solid #edf1ef;
  padding: 8px 0;
}

.kol-settlement-explain-grid p > span {
  color: #4e5e58;
  font-size: 10px;
}

.kol-settlement-explain-grid p > strong {
  font-size: 11px;
}

.kol-settlement-explain-grid p > small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 9px;
}

.kol-commission-advanced {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.kol-commission-advanced > .kol-commission-form,
.kol-commission-advanced > .kol-commission-table-wrap {
  margin: 0;
  border-width: 1px 0 0;
  border-radius: 0;
}

@media (max-width: 620px) {
  .kol-commission-refresh-bar { align-items: stretch; flex-direction: column; }
  .kol-commission-refresh-bar .button { width: 100%; }
}

.kol-commission-payouts .table-wrap {
  margin-top: 10px;
}

@media (max-width: 900px) {
  .kol-commission-summary-head { grid-template-columns: 1fr; }
  .kol-commission-head-metrics { border-top: 1px solid var(--line); border-left: 0; padding-top: 10px; }
  .kol-commission-lifecycle { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kol-commission-lifecycle > span:nth-child(3) { border-right: 0; }
  .kol-commission-lifecycle > span:nth-child(n + 4) { border-top: 1px solid var(--line); }
  .kol-commission-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kol-commission-summary > div:nth-child(3) { border-right: 0; }
  .kol-commission-summary > div:nth-child(n + 4) { border-top: 1px solid var(--line); }
  .kol-commission-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kol-commission-form .toggle-setting { grid-column: 1 / -1; }
  .kol-commission-form button { grid-column: 1 / -1; justify-self: start; }
  .kol-settlement-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kol-settlement-metrics article:nth-child(2) { border-right: 0; }
  .kol-settlement-metrics article:nth-child(n + 3) { border-top: 1px solid var(--line); }
}

@media (max-width: 620px) {
  .kol-commission-panel { padding: 14px; }
  .kol-payout-review-head { align-items: stretch; flex-direction: column; }
  .kol-payout-review-metrics { min-width: 0; width: 100%; }
  .kol-payout-flow { grid-template-columns: 1fr; }
  .kol-payout-flow span + span { border-top: 1px solid var(--line); border-left: 0; }
  .kol-commission-summary-head { align-items: flex-start; gap: 12px; }
  .kol-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kol-metric { min-height: 116px; padding: 12px; }
  .kol-metric strong { font-size: 21px; }
  .kol-commission-head-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kol-commission-head-metrics > span { border-right: 1px solid var(--line); border-bottom: 0; padding: 8px; }
  .kol-commission-head-metrics > span:last-child { border-right: 0; }
  .kol-commission-lifecycle,
  .kol-commission-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kol-commission-lifecycle > span,
  .kol-commission-lifecycle > span:nth-child(3),
  .kol-commission-summary > div,
  .kol-commission-summary > div:nth-child(3) { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .kol-commission-lifecycle > span:nth-child(even),
  .kol-commission-summary > div:nth-child(even) { border-right: 0; }
  .kol-commission-lifecycle > span:nth-child(n + 3),
  .kol-commission-summary > div:nth-child(n + 3) { border-top: 0; }
  .kol-commission-lifecycle > span:last-child,
  .kol-commission-summary > div:last-child { border-bottom: 0; }
  .kol-commission-form,
  .kol-rate-control > div { grid-template-columns: 1fr; }
  .kol-commission-form .toggle-setting,
  .kol-commission-form button { grid-column: auto; width: 100%; }
  .kol-settlement-workbench-head { align-items: stretch; flex-direction: column; }
  .kol-settlement-all-preview > summary { width: 100%; }
  .kol-settlement-all-preview .kol-settlement-confirm { position: static; min-width: 0; box-shadow: none; }
  .kol-settlement-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kol-settlement-metrics article { padding: 12px; }
  .kol-settlement-metrics strong { font-size: 19px; }
  .kol-settlement-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kol-settlement-flow span:nth-child(3) { border-left: 0; }
  .kol-settlement-flow span:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .kol-settlement-explain-grid { grid-template-columns: 1fr; }
}

/* Final admin information hierarchy overrides. */
.admin-body .analytics-dashboard {
  border-top: 1px solid #dce6e1;
  padding-top: 22px;
}

.admin-body .analytics-dashboard .analytics-head {
  margin-top: 0;
}

.admin-body .analytics-dashboard .analytics-kpi-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.admin-body .dashboard-visuals {
  margin-bottom: 22px;
}

@media (max-width: 1180px) {
  .admin-body .analytics-dashboard .analytics-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .admin-body .analytics-head {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-body .analytics-filter-form {
    justify-content: flex-start;
  }

  .admin-body .analytics-dashboard .analytics-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Dashboard v3: one operational reading path, with details available on demand. */
.admin-body .dashboard-flow {
  gap: 24px;
}

.admin-body .dashboard-flow > * {
  margin-bottom: 0;
}

.admin-body .analytics-dashboard {
  border-top: 0;
  padding-top: 0;
}

.admin-body .analytics-head {
  align-items: flex-start;
  border-bottom: 1px solid #dce6e1;
  padding-bottom: 14px;
}

.admin-body .analytics-kpi {
  min-height: 138px;
  padding: 14px;
}

.admin-body .analytics-kpi > em {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.analytics-primary-grid {
  margin-top: 2px;
}

.analytics-disclosure {
  margin-top: 12px;
  border-top: 1px solid #dce6e1;
}

.analytics-disclosure > summary {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  cursor: pointer;
  list-style: none;
  padding: 14px 2px;
}

.analytics-disclosure > summary::-webkit-details-marker {
  display: none;
}

.analytics-disclosure > summary::after {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 1px solid #cfdad6;
  border-radius: 7px;
  color: #286d59;
  content: "+";
  font-size: 20px;
  line-height: 26px;
  text-align: center;
}

.analytics-disclosure[open] > summary::after {
  content: "−";
}

.analytics-disclosure > summary span,
.analytics-disclosure > summary small,
.analytics-disclosure > summary strong {
  display: block;
}

.analytics-disclosure > summary small {
  margin-bottom: 4px;
  color: #708079;
  font-size: 10px;
  font-weight: 800;
}

.analytics-disclosure > summary strong {
  font-size: 15px;
}

.analytics-disclosure > summary em {
  margin-left: auto;
  color: #73817b;
  font-size: 11px;
  font-style: normal;
}

.analytics-disclosure[open] > .analytics-grid {
  animation: dashboard-reveal 150ms ease-out;
}

@keyframes dashboard-reveal {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.dashboard-signal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  align-items: stretch;
  gap: 16px;
}

.dashboard-signal-grid > section {
  margin: 0;
  border-top: 1px solid #dce6e1;
  padding-top: 18px;
}

.dashboard-signal-grid .notification-pulse-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-signal-grid .quality-metrics-panel {
  grid-template-columns: 1fr;
  margin: 0;
  border-top: 1px solid #d9e4df;
  padding: 14px 16px;
}

.dashboard-signal-grid .quality-metrics-panel p {
  grid-column: auto;
}

/* Shared admin usability layer: consistent hierarchy across every module. */
.admin-workspace {
  min-width: 0;
}

.admin-topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  margin: 0 -28px 24px;
  border-bottom: 1px solid rgba(207, 218, 214, .92);
  background: rgba(245, 247, 248, .96);
  padding: 18px 28px 14px;
  backdrop-filter: blur(10px);
}

.admin-body .panel,
.admin-body section {
  scroll-margin-top: 96px;
}

.admin-body input:focus-visible,
.admin-body select:focus-visible,
.admin-body textarea:focus-visible,
.admin-body button:focus-visible,
.admin-body a:focus-visible,
.admin-body summary:focus-visible {
  outline: 3px solid rgba(44, 152, 119, .22);
  outline-offset: 2px;
}

.admin-body .table-wrap {
  max-width: 100%;
  scrollbar-color: #9db3aa #eef3f1;
  scrollbar-width: thin;
}

.admin-body .table-wrap table th {
  box-shadow: inset 0 -1px #dce6e1;
}

.admin-body tbody td {
  transition: background-color 120ms ease;
}

@media (max-width: 1100px) {
  .dashboard-signal-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-signal-grid .quality-metrics-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-signal-grid .quality-metrics-panel p {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .admin-sidebar {
    min-width: 0;
    overflow: hidden;
  }

  .admin-nav {
    width: 100%;
    max-width: 100%;
    margin-right: 0;
    margin-left: 0;
    contain: inline-size;
  }

  .admin-topbar {
    position: static;
    margin: 0 0 18px;
    padding: 0 0 14px;
    backdrop-filter: none;
  }

  .analytics-disclosure > summary {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .analytics-disclosure > summary em {
    width: calc(100% - 46px);
    margin: 0;
  }

  .dashboard-signal-grid .notification-pulse-grid,
  .dashboard-signal-grid .quality-metrics-panel {
    grid-template-columns: 1fr;
  }

  .dashboard-signal-grid .quality-metrics-panel p {
    grid-column: auto;
  }

  .ops-users-panel,
  .policy-checkin-editor,
  .policy-versions {
    overflow: hidden;
  }

  .ops-users-panel > .table-wrap,
  .policy-checkin-editor > .table-wrap {
    max-width: 100%;
    overscroll-behavior-inline: contain;
  }
}

@media (max-width: 620px) {
  .admin-body .analytics-filter-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .admin-body .analytics-filter-form .button,
  .admin-body .analytics-filter-form a {
    width: 100%;
  }

  .admin-body .analytics-dashboard .analytics-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.analytics-head { display:flex; align-items:flex-end; justify-content:space-between; gap:18px; margin:10px 0 16px; }
.analytics-head h2, .analytics-head p { margin:0; }
.analytics-freshness { margin-top:7px !important; color:#71807a; font-size:11px; }
.analytics-filter-form { display:flex; align-items:flex-end; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
.analytics-filter-form label { display:grid; gap:4px; min-width:112px; }
.analytics-filter-form label span { color:#71807a; font-size:10px; font-weight:800; }
.analytics-filter-form select, .analytics-filter-form input { min-height:36px; border:1px solid #cfdad6; border-radius:7px; background:#fff; padding:0 9px; color:#1b2823; font:inherit; font-size:12px; }
.analytics-kpi-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:10px; margin-bottom:14px; }
.analytics-kpi { min-width:0; min-height:156px; border:1px solid #d5dedb; border-top:4px solid #3e8f77; border-radius:8px; background:#fff; padding:13px 14px 12px; color:#1b2823; text-decoration:none; }
.analytics-kpi:hover { border-color:#2c9877; box-shadow:0 8px 18px rgba(34,79,63,.1); }
.analytics-kpi.attention { border-top-color:#d08a22; }
.analytics-kpi > span:first-child, .analytics-kpi > strong, .analytics-kpi > small, .analytics-kpi > em { display:block; }
.analytics-kpi > span:first-child { color:#66736e; font-size:11px; font-weight:800; }
.analytics-kpi > strong { margin:8px 0 4px; font-size:26px; line-height:1; }
.analytics-kpi-change { color:#3e8f77; font-size:10px; white-space:nowrap; }
.analytics-kpi em { margin-top:8px; color:#89958f; font-size:9px; font-style:normal; line-height:1.25; }
.analytics-spark { display:flex !important; align-items:end; gap:2px; height:20px; margin-top:7px; }
.analytics-spark i { display:block; min-width:4px; flex:1; border-radius:2px 2px 0 0; background:#78b9a2; }
.analytics-grid { display:grid; grid-template-columns:repeat(12,minmax(0,1fr)); gap:12px; margin-bottom:12px; }
.analytics-card { grid-column:span 5; min-width:0; border:1px solid #d5dedb; border-radius:8px; background:#fff; padding:17px; }
.analytics-card-wide { grid-column:span 7; }
.analytics-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:14px; }
.analytics-card-head h3, .analytics-card-head p { margin:0; }
.analytics-card-head h3 { font-size:15px; }
.analytics-card-head > small { max-width:260px; color:#7a8782; font-size:10px; line-height:1.35; text-align:right; }
.analytics-table-wrap { overflow-x:auto; }
.analytics-table { min-width:660px; }
.analytics-table.compact { min-width:720px; }
.analytics-table td small, .analytics-table td strong { display:block; }
.analytics-table td small { margin-top:3px; color:#8b9691; font-size:9px; }
.analytics-table .muted { color:#9ba6a0; }
.trend-toggle { display:flex; gap:4px; }
.trend-toggle button { border:1px solid #cfdad6; border-radius:999px; background:#fff; padding:4px 9px; color:#63736c; font:inherit; font-size:10px; cursor:pointer; }
.trend-toggle button.active { border-color:#3e8f77; background:#edf7f2; color:#276e59; }
.analytics-trend-list { display:grid; gap:10px; }
.analytics-trend-row { display:grid; grid-template-columns:92px 1fr 54px; align-items:center; gap:8px; }
.analytics-trend-row > span:first-child { color:#63736c; font-size:11px; }
.analytics-trend-bars { display:flex; align-items:end; gap:2px; height:28px; }
.analytics-trend-bars i { min-width:3px; flex:1; border-radius:2px 2px 0 0; background:#5ba98d; }
.analytics-trend-row strong { font-size:11px; text-align:right; }
.analytics-source-grid, .analytics-finance-summary, .analytics-cost-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-bottom:13px; }
.analytics-source-grid span, .analytics-finance-summary span, .analytics-cost-grid span { display:flex; align-items:center; justify-content:space-between; gap:8px; border-left:3px solid #78b9a2; background:#fafbf9; padding:9px 10px; color:#63736c; font-size:11px; }
.analytics-source-grid b, .analytics-finance-summary b, .analytics-cost-grid b { color:#1b2823; font-size:13px; }
.analytics-note { margin:0 0 12px; color:#71807a; font-size:10px; line-height:1.4; }
.analytics-status-list, .analytics-risk-list { display:grid; gap:7px; }
.analytics-status-list span, .analytics-risk-list span { display:flex; justify-content:space-between; gap:10px; border-bottom:1px solid #edf1ef; padding:5px 0; font-size:11px; }
.analytics-status-list em, .analytics-risk-list em { color:#63736c; font-style:normal; }
.analytics-status-list b, .analytics-risk-list b { text-align:right; }
.analytics-empty { margin-top:12px; padding:30px; border:1px dashed #cfdad6; border-radius:8px; background:#fff; }
.analytics-detail { margin-top:12px; border:1px solid #bcd8cc; border-radius:8px; background:#f5fbf8; padding:17px; }
.analytics-detail h3, .analytics-detail p { margin:0 0 8px; }
.analytics-detail p:not(.section-kicker) { color:#63736c; font-size:12px; }
@media (max-width:1180px) { .analytics-kpi-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } .analytics-card, .analytics-card-wide { grid-column:span 6; } }
@media (max-width:900px) { .analytics-head { align-items:stretch; flex-direction:column; } .analytics-filter-form { justify-content:flex-start; } .analytics-card, .analytics-card-wide { grid-column:1 / -1; } }
@media (max-width:620px) { .analytics-kpi-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .analytics-filter-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); } .analytics-filter-form label, .analytics-filter-form .button { width:100%; } .analytics-card-head { flex-direction:column; } .analytics-card-head > small { max-width:none; text-align:left; } .analytics-source-grid, .analytics-finance-summary, .analytics-cost-grid { grid-template-columns:1fr; } .analytics-kpi { min-height:150px; padding:12px; } .analytics-kpi > strong { font-size:22px; } .analytics-trend-row { grid-template-columns:78px 1fr 48px; } }

/* Lifecycle V1 follows the production admin system and keeps risk visible. */
.lifecycle-workspace,
.policy-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.lifecycle-workspace > *,
.policy-workspace > * {
  min-width: 0;
}

.rule-owner-banner,
.rule-owner-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.rule-owner-banner form {
  display: flex;
  align-items: end;
  gap: 10px;
  min-width: min(100%, 360px);
}

.rule-owner-banner form label {
  flex: 1;
}

.rule-owner-link {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  background: var(--surface-subtle, #f7f9f8);
}

.rule-owner-link div,
.rule-ownership-audit .notice {
  display: grid;
  gap: 4px;
}

.rule-owner-link span,
.rule-ownership-audit td small {
  display: block;
  color: var(--muted);
}

.rule-ownership-audit code {
  white-space: normal;
  overflow-wrap: anywhere;
}

@media (max-width: 720px) {
  .rule-owner-banner,
  .rule-owner-link,
  .rule-owner-banner form {
    align-items: stretch;
    flex-direction: column;
  }
}

.lifecycle-status-band,
.policy-command-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-top: 3px solid var(--brand);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}

.lifecycle-status-band h2,
.lifecycle-status-band p,
.policy-command-bar h2,
.policy-command-bar p {
  margin: 0;
}

.lifecycle-status-band > div:first-child > p:last-child,
.policy-command-bar > div:first-child > p:last-child {
  max-width: 720px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.lifecycle-status-actions,
.policy-command-status {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.policy-live-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.policy-live-summary > div {
  display: grid;
  min-width: 0;
  gap: 5px;
  padding: 14px 16px;
  border-left: 3px solid var(--success);
}

.policy-live-summary > div + div {
  border-top: 0;
}

.policy-live-summary > div.attention {
  border-left-color: var(--warning);
}

.policy-live-summary span,
.policy-live-summary small,
.policy-flow small,
.policy-quick-nav span,
.policy-advanced > summary small,
.policy-bootstrap-row span {
  color: var(--muted);
  font-size: 11px;
}

.policy-live-summary strong {
  overflow-wrap: anywhere;
  font-size: 18px;
}

.policy-quick-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  background: var(--surface);
}

.policy-quick-nav a {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 13px 16px;
  color: var(--text);
  text-decoration: none;
}

.policy-quick-nav a + a {
  border-left: 1px solid var(--line);
}

.policy-quick-nav a:hover {
  background: var(--surface-subtle, #f7f9f8);
}

.policy-quick-nav strong {
  font-size: 14px;
}

.policy-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-bottom: 1px solid var(--line);
  padding: 4px 0 14px;
}

.policy-flow > div {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 2px 10px;
  min-width: 0;
  padding: 8px 16px;
}

.policy-flow > div + div {
  border-left: 1px solid var(--line);
}

.policy-flow b {
  display: grid;
  grid-row: span 2;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
}

.policy-flow span {
  font-size: 13px;
  font-weight: 800;
}

.policy-editor-section {
  display: grid;
  gap: 12px;
  scroll-margin-top: 20px;
}

.policy-editor-anchor,
#policy-verify,
#policy-release {
  scroll-margin-top: 20px;
}

.policy-publish-options {
  border-top: 1px solid #ead9b6;
  border-bottom: 1px solid #ead9b6;
  padding: 8px 0;
}

.policy-publish-options > summary {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.policy-publish-options[open] > summary {
  margin-bottom: 9px;
}

.policy-advanced {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface-subtle, #f7f9f8);
}

.policy-advanced > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 16px;
  cursor: pointer;
}

.policy-advanced > summary span {
  font-size: 13px;
  font-weight: 800;
}

.policy-advanced-content {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 14px;
}

.policy-bootstrap-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 2px;
}

.policy-bootstrap-row > div {
  display: grid;
  gap: 4px;
}

.lifecycle-metrics {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.lifecycle-audience-grid,
.policy-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.lifecycle-audience-grid > section {
  min-width: 0;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
}

.lifecycle-audience-grid > section:last-child {
  border-left-color: var(--warning);
}

.lifecycle-audience-grid dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.lifecycle-audience-grid dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #edf1ef;
  padding: 6px 0;
  font-size: 12px;
}

.lifecycle-audience-grid dt {
  color: var(--muted);
}

.lifecycle-audience-grid dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
}

.lifecycle-runner .inline-form label {
  display: grid;
  min-width: 150px;
  gap: 5px;
}

.lifecycle-runner .inline-form label span,
.policy-editor label > span,
.policy-checkin-editor label > span,
.policy-publish label > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.policy-audience-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.policy-audience-switch > div {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 12px 14px;
}

.policy-audience-switch > div + div {
  border-left: 1px solid var(--line);
}

.policy-audience-switch strong {
  color: var(--text);
  font-size: 13px;
}

.policy-audience-switch span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.policy-audience-switch b {
  color: var(--brand);
  font-size: 11px;
}

.policy-editor {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
}

.policy-editor > label,
.policy-field-pair label,
.policy-score-grid label,
.compact-select,
.policy-publish label {
  display: grid;
  gap: 5px;
}

.policy-field-pair,
.policy-score-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.policy-checkin-table {
  min-width: 850px;
  table-layout: fixed;
}

.policy-checkin-table th:first-child {
  width: 112px;
}

.policy-checkin-table input {
  width: 100%;
  min-width: 72px;
}

.policy-publish summary {
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.policy-publish form {
  display: grid;
  width: min(320px, 70vw);
  gap: 9px;
  margin-top: 10px;
  border-left: 3px solid var(--warning);
  background: #fffaf2;
  padding: 12px;
}

.policy-publish textarea {
  min-height: 72px;
  resize: vertical;
}

.lifecycle-activation {
  border-left: 4px solid var(--danger);
}

.lifecycle-activation.ready {
  border-left-color: var(--success);
}

.activation-checks,
.policy-simulation-result {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.activation-checks span,
.policy-simulation-result > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid var(--line);
  border-left: 3px solid var(--success);
  border-radius: 6px;
  background: #fbfcfc;
  padding: 10px;
  color: var(--muted);
  font-size: 11px;
}

.activation-checks span.missing {
  border-left-color: var(--danger);
  background: #fff7f8;
}

.activation-checks b,
.policy-simulation-result strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
}

.lifecycle-activation-form {
  display: grid;
  max-width: 760px;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.lifecycle-activation-form > label:first-child {
  display: grid;
  gap: 5px;
}

.lifecycle-activation-form textarea {
  min-height: 76px;
  resize: vertical;
}

.lifecycle-activation-form .button {
  justify-self: start;
}

.lifecycle-activation-form .button:disabled {
  border-color: #aeb9b5;
  background: #aeb9b5;
  cursor: not-allowed;
}

.policy-simulator .inline-form label {
  display: grid;
  gap: 5px;
}

.policy-simulation-result {
  margin-top: 14px;
  margin-bottom: 0;
}

@media (max-width: 1180px) {
  .lifecycle-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .activation-checks,
  .policy-simulation-result {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 800px) {
  .lifecycle-status-band,
  .policy-command-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .lifecycle-status-actions,
  .policy-command-status {
    justify-content: flex-start;
  }

  .lifecycle-audience-grid,
  .policy-editor-grid {
    grid-template-columns: 1fr;
  }

  .policy-flow {
    grid-template-columns: 1fr;
  }

  .policy-flow > div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 620px) {
  .primary-metric strong {
    font-size: 26px;
  }

  .lifecycle-runner .inline-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .lifecycle-runner .inline-form label {
    min-width: 0;
  }

  .lifecycle-metrics,
  .policy-audience-switch,
  .policy-live-summary,
  .policy-quick-nav,
  .policy-field-pair,
  .policy-score-grid {
    grid-template-columns: 1fr;
  }

  .policy-live-summary > div + div,
  .policy-quick-nav a + a {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .policy-advanced > summary,
  .policy-bootstrap-row {
    align-items: stretch;
    flex-direction: column;
  }

  .policy-bootstrap-row .button {
    width: 100%;
  }

  .policy-versions .table-wrap {
    overflow: visible;
  }

  .policy-versions table,
  .policy-versions tbody,
  .policy-versions tr,
  .policy-versions td {
    display: block;
    width: 100%;
  }

  .policy-versions table {
    min-width: 0;
  }

  .policy-versions thead {
    display: none;
  }

  .policy-versions tbody {
    display: grid;
    gap: 10px;
  }

  .policy-versions tr {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
  }

  .policy-versions td {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
    border-bottom: 1px solid var(--line);
    padding: 10px 12px;
    overflow-wrap: anywhere;
  }

  .policy-versions td:last-child {
    border-bottom: 0;
  }

  .policy-versions td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
  }

  .policy-versions td[colspan]::before {
    display: none;
  }

  .policy-versions .policy-publish form {
    width: 100%;
  }

  .policy-audience-switch > div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .policy-audience-switch > div {
    grid-template-columns: 1fr;
  }


  .activation-checks,
  .policy-simulation-result {
    grid-template-columns: 1fr;
  }

  .policy-audience-switch span {
    white-space: normal;
  }
}

/* Growth Center uses the existing admin spacing, type and status language. */
.section-actions,
.page-actions,
.growth-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.page-actions {
  margin-bottom: 12px;
}

.quality-metrics-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0 20px;
  border: 1px solid #d9e4df;
  border-left: 4px solid #d08a22;
  border-radius: 8px;
  background: #f8fbfa;
  padding: 14px;
}

.quality-metrics-panel > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.quality-metrics-panel span,
.quality-metrics-panel small,
.quality-metrics-panel p {
  color: #687871;
  font-size: 11px;
}

.quality-metrics-panel span {
  font-weight: 700;
}

.quality-metrics-panel strong {
  color: #17382f;
  font-size: 22px;
}

.quality-metrics-panel p {
  grid-column: 1 / -1;
  margin: 2px 0 0;
}

.growth-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-top: 3px solid #2c9877;
  border-bottom: 1px solid #d6e2de;
  padding: 18px 0;
}

.growth-hero h2,
.growth-hero p {
  margin: 0;
}

.growth-hero .muted {
  margin-top: 6px;
}

.ops-live-pill {
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 800;
}

.ops-live-pill.on {
  background: #dcf1e5;
  color: #17623f;
}

.ops-live-pill.off {
  background: #edf0ef;
  color: #6e7b77;
}

.growth-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 14px 0;
}

.growth-link-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.growth-link-grid a {
  display: grid;
  min-width: 0;
  gap: 4px;
  border: 1px solid #d6e2de;
  border-radius: 8px;
  background: #f8fbfa;
  padding: 13px;
  color: #17382f;
  text-decoration: none;
}

.growth-link-grid a:hover {
  border-color: #2c9877;
  background: #eef8f4;
}

.growth-link-grid span {
  color: #6e7b77;
  font-size: 11px;
}

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

.growth-columns > * {
  min-width: 0;
}

.growth-delivery-readiness {
  margin: 14px 0;
}

.growth-delivery-funnel,
.growth-queue-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid #d6e2de;
  border-bottom: 1px solid #d6e2de;
  background: #f8fbfa;
}

.growth-queue-summary {
  margin-top: 10px;
  background: #fff;
}

.growth-delivery-funnel > div,
.growth-queue-summary > div {
  display: grid;
  min-width: 0;
  gap: 4px;
  padding: 14px;
  border-right: 1px solid #d6e2de;
}

.growth-delivery-funnel > div:last-child,
.growth-queue-summary > div:last-child {
  border-right: 0;
}

.growth-delivery-funnel span,
.growth-queue-summary span {
  color: #52645e;
  font-size: 11px;
  font-weight: 750;
}

.growth-delivery-funnel strong,
.growth-queue-summary strong {
  color: #17241f;
  font-size: 24px;
  line-height: 1.1;
}

.growth-delivery-funnel small,
.growth-queue-summary small {
  color: #72817c;
  font-size: 11px;
}

.growth-media-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
}

.growth-media-alert span {
  color: inherit;
}

.growth-queue-table {
  margin-top: 12px;
}

.growth-queue-table td:first-child strong,
.growth-queue-table td:first-child small {
  display: block;
}

.growth-queue-table td:first-child small {
  margin-top: 3px;
  color: var(--muted);
}

.growth-rule-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.growth-rule-list span {
  border: 1px solid #d6e2de;
  border-radius: 6px;
  background: #f8fbfa;
  padding: 8px 10px;
  color: #51625c;
  font-size: 11px;
}

.growth-rules,
.growth-templates {
  margin-top: 14px;
}

@media (max-width: 900px) {
  .growth-kpis,
  .growth-link-grid,
  .analytics-two-column,
  .growth-delivery-funnel,
  .growth-queue-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .growth-delivery-funnel > div:nth-child(2),
  .growth-queue-summary > div:nth-child(2) {
    border-right: 0;
  }

  .growth-delivery-funnel > div:nth-child(-n + 2),
  .growth-queue-summary > div:nth-child(-n + 2) {
    border-bottom: 1px solid #d6e2de;
  }
}

@media (max-width: 620px) {
  .quality-metrics-panel,
  .growth-link-grid,
  .analytics-two-column,
  .growth-delivery-funnel,
  .growth-queue-summary {
    grid-template-columns: 1fr;
  }

  .quality-metrics-panel p {
    grid-column: auto;
  }

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

  .growth-actions,
  .page-actions {
    justify-content: flex-start;
  }

  .growth-delivery-funnel > div,
  .growth-queue-summary > div,
  .growth-delivery-funnel > div:nth-child(2),
  .growth-queue-summary > div:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid #d6e2de;
  }

  .growth-delivery-funnel > div:last-child,
  .growth-queue-summary > div:last-child {
    border-bottom: 0;
  }

  .growth-media-alert {
    align-items: flex-start;
    flex-direction: column;
  }
}
.address-risk-rule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.address-risk-rule {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 72px 20px;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.address-risk-rule input[type="number"] {
  min-width: 0;
}

.withdrawal-address-risk-detail {
  margin-top: 8px;
  max-width: 680px;
}

.withdrawal-address-risk-detail > summary {
  color: var(--brand);
  cursor: pointer;
  font-weight: 700;
}

.address-risk-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 8px;
  border: 1px solid var(--line);
  background: var(--line);
}

.address-risk-summary > div {
  display: grid;
  gap: 3px;
  padding: 8px;
  background: var(--surface);
}

.address-risk-summary span,
.address-risk-rules span {
  color: var(--muted);
  font-size: 12px;
}

.address-risk-rules {
  display: grid;
  gap: 6px;
  margin: 8px 0;
  padding: 0;
  list-style: none;
}

.address-risk-rules li,
.address-risk-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.address-risk-actions form {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.usdt-network-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.usdt-network-grid legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.usdt-network-option {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
}

.usdt-network-option.is-enabled,
.usdt-network-option:has(input:checked) {
  border-color: var(--brand);
  background: #edf8f5;
  box-shadow: inset 0 3px 0 var(--brand);
}

.usdt-network-option span,
.usdt-network-option small,
.usdt-network-option em {
  display: block;
  min-width: 0;
}

.usdt-network-option small,
.usdt-network-option em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}

.address-monitoring-metrics {
  margin: 12px 0 16px;
}

.chain-monitor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}

.chain-monitor-card {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: inherit;
  background: var(--surface);
  text-decoration: none;
}

.chain-monitor-card:hover,
.chain-monitor-card:focus-visible,
.chain-monitor-card.is-active {
  border-color: var(--brand);
  box-shadow: inset 0 3px 0 var(--brand);
  outline: none;
}

.chain-monitor-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.chain-monitor-card header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.chain-monitor-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
}

.chain-monitor-card dl div {
  min-width: 0;
  padding: 7px;
  background: var(--surface-soft);
}

.chain-monitor-card dt {
  color: var(--muted);
  font-size: 11px;
}

.chain-monitor-card dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  font-weight: 800;
}

.address-monitoring-metric-link {
  color: inherit;
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.address-monitoring-metric-link:hover,
.address-monitoring-metric-link:focus-visible,
.address-monitoring-metric-link.is-active {
  border-color: var(--brand);
  box-shadow: inset 0 3px 0 var(--brand);
  outline: none;
}

.address-monitoring-list-disclosure {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.address-monitoring-list-disclosure > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
  padding: 12px 16px;
  cursor: pointer;
  list-style-position: inside;
}

.address-monitoring-list-disclosure > summary span,
.address-monitoring-list-disclosure > summary small {
  display: block;
}

.address-monitoring-list-disclosure > summary small {
  margin-top: 3px;
  color: var(--muted);
}

.address-monitoring-list-disclosure > summary strong {
  flex: 0 0 auto;
  color: var(--brand);
}

.address-monitoring-list-disclosure[open] > summary {
  border-bottom: 1px solid var(--line);
}

.address-monitoring-list-disclosure > .address-monitoring-filters,
.address-monitoring-list-disclosure > .address-monitoring-list-head,
.address-monitoring-list-disclosure > .table-wrap {
  margin-left: 16px;
  margin-right: 16px;
}

.address-monitoring-list-disclosure > .address-monitoring-filters {
  margin-top: 14px;
}

.address-monitoring-list-disclosure > .table-wrap {
  margin-bottom: 16px;
}

.address-monitoring-filters {
  display: flex;
  gap: 6px;
  margin: 0 0 12px;
  padding-bottom: 2px;
  overflow-x: auto;
}

.address-monitoring-filters a {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: var(--surface);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.address-monitoring-filters a:hover,
.address-monitoring-filters a:focus-visible,
.address-monitoring-filters a.is-active {
  border-color: var(--brand);
  color: var(--brand);
  background: #edf8f5;
  outline: none;
}

.address-monitoring-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 10px;
  scroll-margin-top: 16px;
}

.address-monitoring-list-head strong,
.address-monitoring-list-head small {
  display: block;
}

.address-monitoring-list-head small {
  margin-top: 3px;
  color: var(--muted);
}

.address-monitoring-metrics .metric strong,
.address-monitoring-metrics .metric small {
  display: block;
}

.address-monitoring-metrics .metric small {
  margin-top: 7px;
  color: var(--muted);
}

.address-monitoring-table td {
  vertical-align: top;
}

.address-monitoring-metrics .metric strong,
.address-monitoring-metrics .metric small {
  display: block;
}

.address-monitoring-metrics .metric small {
  margin-top: 5px;
  color: var(--muted);
}

.address-monitoring-table td > span,
.address-monitoring-table td > small,
.address-monitoring-table td > code {
  display: block;
  margin-top: 4px;
}

.address-monitoring-address-reveal {
  display: grid;
  gap: 7px;
  margin-top: 4px;
  min-width: 190px;
}

.address-monitoring-address-reveal code {
  display: block;
  max-width: 280px;
  overflow-wrap: anywhere;
  white-space: normal;
  word-break: break-all;
}

.address-monitoring-address-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.address-monitoring-address-actions .button {
  min-height: 32px;
}

.address-monitoring-address-reveal small {
  color: var(--muted);
  line-height: 1.4;
}

.address-profile-users > summary {
  color: var(--brand);
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
}

.address-profile-user-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.address-monitoring-users-row > td {
  padding-top: 6px;
  background: #f8fbfa;
}

.address-profile-user-list article {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.address-profile-user-list article header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.address-profile-user-list article header span {
  display: block;
  color: var(--muted);
}

.address-profile-user-list dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 0;
}

.address-profile-user-list dl div {
  padding: 7px;
  background: var(--surface-soft);
}

.address-profile-user-list dt {
  color: var(--muted);
  font-size: 12px;
}

.address-profile-user-list dd {
  margin: 3px 0 0;
  font-weight: 700;
}

.user-site-profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.user-site-profile-grid article {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.user-site-profile-grid h4,
.user-site-profile-grid p {
  margin: 0;
}

.user-site-profile-grid small {
  display: block;
  color: var(--muted);
}

@media (max-width: 720px) {
  .usdt-network-grid,
  .chain-monitor-grid {
    grid-template-columns: 1fr;
  }

  .address-monitoring-list-disclosure > summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .address-monitoring-list-disclosure > summary strong {
    padding-left: 18px;
  }

  .address-monitoring-list-disclosure > .address-monitoring-filters,
  .address-monitoring-list-disclosure > .address-monitoring-list-head,
  .address-monitoring-list-disclosure > .table-wrap {
    margin-left: 10px;
    margin-right: 10px;
  }

  .address-risk-summary {
    grid-template-columns: 1fr;
  }

  .withdrawal-address-monitoring .table-wrap {
    overflow: visible;
  }

  .admin-body .table-wrap .address-monitoring-table {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .address-monitoring-table thead {
    display: none;
  }

  .address-monitoring-table tbody,
  .address-monitoring-table tr,
  .address-monitoring-table td {
    display: block;
    width: 100%;
  }

  .address-monitoring-table tbody > tr:not(.address-monitoring-users-row) {
    padding: 8px 12px;
    border-bottom: 1px solid var(--line);
  }

  .address-monitoring-table tbody > tr:not(.address-monitoring-users-row) td {
    display: grid;
    grid-template-columns: minmax(92px, 34%) minmax(0, 1fr);
    gap: 8px;
    padding: 8px 0;
    border: 0;
    min-width: 0;
    overflow: hidden;
  }

  .address-monitoring-table tbody > tr:not(.address-monitoring-users-row) td::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 700;
  }

  .address-monitoring-table tbody > tr:not(.address-monitoring-users-row) td > * {
    grid-column: 2;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    white-space: normal;
    word-break: break-word;
  }

  .address-monitoring-table tbody > tr:not(.address-monitoring-users-row) .status-pill {
    justify-self: start;
  }

  .address-monitoring-users-row > td {
    padding: 8px 12px;
  }

  .address-profile-user-list {
    grid-template-columns: 1fr;
  }

  .address-profile-user-list article header {
    align-items: flex-start;
    flex-direction: column;
  }

  .address-profile-user-list dl {
    grid-template-columns: 1fr;
  }

  .address-profile-user-list dd {
    overflow-wrap: anywhere;
  }
}
