body.panel-body {
  --ink: #24160f;
  --maroon: #7a2430;
  --maroon-deep: #3d1016;
  --gold: #b8893a;
  --gold-2: #e7d3a3;
  --gold-3: #f8f1de;
  --paper: #fffdf8;
  --ivory: #f7f1e6;
  --line: rgba(184, 137, 58, 0.38);
  --muted: #6e5d52;
  --soft: #7a685c;
  --ok: #1a7f46;
  --ink-on-gold: #2a160c;
  --bg: #f7f1e6;
  --bg-2: #fffdf8;
  --serif: "Source Sans 3", "Segoe UI", sans-serif;
  --sans: "Source Sans 3", "Segoe UI", sans-serif;
  margin: 0;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: clip;
  color: var(--ink);
  color-scheme: light;
  background: var(--ivory);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.38;
}
body.panel-body *,
body.panel-body *::before,
body.panel-body *::after { box-sizing: border-box; }
body.panel-body a { color: inherit; text-decoration: none; }
body.panel-body button,
body.panel-body input,
body.panel-body select,
body.panel-body textarea { font: inherit; color: inherit; }
body.panel-body button { cursor: pointer; }
body.panel-body h1,
body.panel-body h2,
body.panel-body h3,
body.panel-body .serif {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: 0;
  color: var(--maroon-deep);
}
body.panel-body h2 { font-size: 17px; line-height: 1.25; margin: 0 0 8px; }
body.panel-body h3 { font-size: 15px; line-height: 1.3; margin: 0 0 6px; }
body.panel-body p { color: #5c4a40; margin: 0 0 8px; }
body.panel-body .fine,
body.panel-body .eyebrow { color: #7a685c; }
body.panel-body .fine { font-size: 13px; }
body.panel-body .eyebrow { letter-spacing: 0.07em; text-transform: uppercase; font-size: 11px; font-weight: 700; margin-bottom: 6px; }

.desk {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  background: var(--ivory);
}
/* Must beat body.panel-body label { display: grid } or shade steals column 1 */
body.panel-body label.desk-shade {
  display: none;
  margin: 0;
  padding: 0;
  gap: 0;
  border: 0;
  font: inherit;
  font-weight: inherit;
  color: inherit;
}
.side-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  grid-column: 1;
  grid-row: 1;
}
.desk-rail {
  grid-column: 1;
  grid-row: 1;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 220px;
  min-width: 0;
  max-width: 220px;
  padding: 16px 12px 12px;
  background: var(--paper);
  color: var(--ink);
  border-right: 1px solid rgba(184, 137, 58, 0.42);
  z-index: 50;
  overflow-x: hidden;
}
.desk-rail::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--maroon), var(--gold));
}
body.panel-body label.desk-close {
  display: none;
  align-self: flex-end;
  margin: 0;
  padding: 0;
  gap: 0;
  border: 0;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--maroon);
}
.brand-side {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: radial-gradient(circle at 40% 30%, #fff, #f0e2bc 72%);
  color: var(--maroon-deep);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  flex: 0 0 auto;
}
.desk-rail .brand strong {
  display: block;
  color: var(--maroon-deep);
  font-size: 12px;
  letter-spacing: 0.02em;
  font-weight: 700;
}
.desk-rail .brand small {
  display: block;
  color: #8a6230;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}
.desk-rail nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
  overflow: auto;
  margin-top: 2px;
}
.desk-rail nav a,
.desk-foot a {
  text-decoration: none;
  color: #3d2b22;
  font-size: 13.5px;
  line-height: 1.2;
  padding: 8px 10px;
  border-radius: 8px;
}
.desk-rail nav a:hover,
.desk-foot a:hover { background: rgba(184, 137, 58, 0.14); }
.desk-rail nav a.is-on {
  background: var(--maroon);
  color: #fffdf8;
  font-weight: 600;
}
.desk-nav-label {
  margin: 14px 10px 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a6230;
}
.desk-rail nav .desk-nav-label:first-child { margin-top: 4px; }
.desk-foot {
  margin-top: auto;
  display: grid;
  gap: 2px;
  padding-top: 8px;
  border-top: 1px solid rgba(184, 137, 58, 0.35);
}
.desk-foot a:last-child { color: var(--maroon); font-weight: 600; }
.desk-main {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
}
.desk-top {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px 12px;
  min-height: 52px;
  padding: 8px 16px;
  background: var(--paper);
  border-bottom: 1px solid rgba(184, 137, 58, 0.35);
}
.desk-top h1 {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  color: var(--maroon-deep);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.panel-body .desk-top label.nav-burger {
  display: none;
  align-items: center;
  gap: 0;
  margin: 0;
  border: 1px solid rgba(184, 137, 58, 0.5);
  border-radius: 7px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
  background: #fff;
  color: var(--maroon);
  letter-spacing: 0.08em;
  cursor: pointer;
}
.desk-top .who {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  flex: 0 1 auto;
  margin-left: auto;
  max-width: 100%;
}
.desk-top .who strong {
  color: var(--ink);
  font-size: 13px;
  white-space: nowrap;
}
.desk-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--gold-3);
  border: 1px solid rgba(184, 137, 58, 0.4);
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 12px;
  color: var(--maroon-deep);
  white-space: nowrap;
}
.desk-chip em {
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #8a6230;
}
.desk-chip-wallet {
  background: linear-gradient(180deg, #f8f1de, #e7d3a3);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.desk-content { padding: 14px 16px 28px; min-width: 0; }

body.panel-body .card,
body.panel-body .slip,
body.panel-body .ledger,
body.panel-body .stat,
body.panel-body .panel {
  background: var(--paper);
  border: 1px solid rgba(184, 137, 58, 0.3);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(48, 18, 12, 0.04);
  color: var(--ink);
}
body.panel-body .card,
body.panel-body .slip,
body.panel-body .ledger,
body.panel-body .panel { padding: 12px 14px; }
body.panel-body .stat { padding: 10px 12px; }
body.panel-body .stat span,
body.panel-body .payout-banner span {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 11px;
  font-weight: 700;
  color: #7a685c;
}
body.panel-body .stat strong {
  display: block;
  margin-top: 2px;
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--maroon-deep);
  overflow-wrap: anywhere;
}
body.panel-body label {
  display: grid;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--maroon-deep);
}
body.panel-body .form { display: grid; gap: 10px; }
body.panel-body input,
body.panel-body select,
body.panel-body textarea {
  width: 100%;
  background: #fff;
  color: #24160f;
  border: 1px solid rgba(184, 137, 58, 0.45);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
  max-width: 100%;
}
body.panel-body textarea { min-height: 88px; resize: vertical; }
body.panel-body input::placeholder { color: #9a887c; }
body.panel-body .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 8px;
  min-height: 36px;
  padding: 0 14px;
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid transparent;
  background: var(--maroon);
  color: #fffdf8;
}
body.panel-body .btn:hover { filter: brightness(1.05); }
body.panel-body .btn:disabled { opacity: 0.55; cursor: not-allowed; filter: none; }
body.panel-body .btn-tiny {
  min-height: 28px;
  padding: 0 8px;
  font-size: 12px;
}
body.panel-body .btn-maroon {
  background: var(--maroon);
  color: #fffdf8;
  border-color: transparent;
}
body.panel-body .btn-gold {
  background: linear-gradient(180deg, #f0e2bc, #c6a15b);
  color: #2a160c;
  border-color: rgba(168, 122, 48, 0.45);
}
body.panel-body .btn-ghost {
  background: #fffdf8;
  color: var(--maroon-deep);
  border-color: rgba(184, 137, 58, 0.5);
}
body.panel-body .btn-danger {
  background: #b4232c;
  color: #fff;
  border-color: #8f1a22;
}
body.panel-body .btn-danger:hover {
  background: #8f1a22;
  filter: none;
}
body.panel-body .note {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(184, 137, 58, 0.35);
  background: #fffdf8;
}
body.panel-body .note.good { border-color: rgba(26, 127, 70, 0.35); }
body.panel-body .note.bad { border-color: rgba(122, 36, 48, 0.45); }

.grid-3, .grid-2, .stat-grid { display: grid; gap: 8px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3, .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sheet-wrap,
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  width: 100%;
  border: 1px solid rgba(184, 137, 58, 0.3);
  border-radius: 10px;
  background: #fffdf8;
}
table.sheet,
table.data { width: 100%; border-collapse: collapse; min-width: 980px; font-size: 13px; table-layout: auto; }
.sheet th, .sheet td,
.data th, .data td {
  padding: 5px 8px;
  text-align: left;
  border-bottom: 1px solid rgba(184, 137, 58, 0.22);
  vertical-align: top;
}
.sheet thead th,
.data thead th,
.sheet th, .data th {
  background: #efe4d4;
  color: var(--maroon-deep);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  white-space: nowrap;
}
.sheet td, .data td {
  font-variant-numeric: tabular-nums;
  color: #24160f;
  overflow-wrap: break-word;
}
.sheet td .id-line,
.sheet td .member-acts,
.data td .id-line,
.data td .member-acts {
  overflow-wrap: normal;
}
.sheet tbody tr:hover td,
.data tbody tr:hover td { background: rgba(248, 241, 222, 0.5); }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 2px 7px; font-size: 11px; font-weight: 700; border: 1px solid transparent; }
.badge.yes, .pill-active { background: #e7f3ec; color: #1a7f46; border-color: rgba(26, 127, 70, 0.28); }
.badge.no, .pill-inactive { background: #f3eee8; color: #6e5d52; border-color: rgba(110, 93, 82, 0.25); }
.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 12px;
  font-weight: 700;
}
.id-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.copy-id {
  border: 1px solid rgba(184, 137, 58, 0.5);
  background: #fffdf8;
  color: var(--maroon-deep);
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.member-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.member-acts form { margin: 0; }
.admin-return {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 8px 12px;
  background: #3d1016;
  color: #fffdf8;
  border-radius: 8px;
  font-size: 13px;
}
.admin-return a { color: #e7d3a3; font-weight: 700; }
.desk-top .desk-back { margin-right: 4px; }
.week { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.week article, .closed-days {
  padding: 8px 10px;
  border-radius: 10px;
  background: #fffdf8;
  border: 1px solid rgba(184, 137, 58, 0.3);
}
.week span, .closed-days span {
  display: block;
  color: #7a685c;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
}
.form-card { max-width: 760px; }
.form-card + .form-card { margin-top: 10px; }
.level-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.day-picks { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; }
.day-picks legend { padding: 0; margin-bottom: 6px; color: #6e5d52; font-size: 13px; }
.check { display: flex; align-items: center; gap: 8px; }
.check input { width: auto; }
.pkg-grid, .quick { display: grid; gap: 8px; }
.pkg-grid { grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); }
.pkg {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 12px 12px 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(184, 137, 58, 0.34);
  border-left: 5px solid var(--maroon);
  background:
    linear-gradient(180deg, rgba(248, 241, 222, 0.55) 0%, rgba(255, 253, 248, 0.96) 42%),
    #fffdf8;
  box-shadow: 0 1px 2px rgba(48, 18, 12, 0.05);
  overflow: visible;
}
.pkg::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, var(--gold) 0%, var(--maroon) 55%, var(--maroon-deep) 100%);
}
.pkg-strip {
  position: absolute;
  top: 0;
  left: 5px;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), rgba(231, 211, 163, 0.2) 55%, transparent);
}
.pkg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 22px;
}
.pkg-code {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a6a32;
}
.pkg-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--maroon-deep);
  line-height: 1.2;
}
.pkg-amount,
.pkg b {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--maroon-deep);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.pkg-meta,
.pkg .fine {
  margin: 0;
  font-size: 12px;
  color: #7a685c;
  line-height: 1.35;
}
.pkg-closed {
  border-left-color: #9a887c;
  opacity: 0.92;
}
.pkg-closed::before {
  background: linear-gradient(180deg, #c4b39a 0%, #8a7a6c 100%);
}
.pkg-empty {
  align-content: center;
  min-height: 88px;
  border-left-color: rgba(184, 137, 58, 0.45);
}
.pkg-empty::before { opacity: 0.45; }
.pkg-form,
.pkg form,
.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
}
.pkg-form label { flex: 1 1 88px; }
.pkg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 2px;
  padding-top: 8px;
  border-top: 1px solid rgba(184, 137, 58, 0.22);
  position: relative;
  z-index: 1;
}
.pkg-actions form { display: inline-flex; margin: 0; }
.pkg-actions .btn-danger {
  min-width: 4.5rem;
  background: #b4232c;
  color: #fff;
  border-color: #8f1a22;
}
.pkg-grid > .pkg:nth-child(3n) { border-left-color: var(--gold); }
.pkg-grid > .pkg:nth-child(3n)::before {
  background: linear-gradient(180deg, #e7d3a3 0%, var(--gold) 45%, #8a6424 100%);
}
.pkg-grid > .pkg.pkg-closed:nth-child(3n) { border-left-color: #9a887c; }
.pkg-grid > .pkg.pkg-closed:nth-child(3n)::before {
  background: linear-gradient(180deg, #c4b39a 0%, #8a7a6c 100%);
}

.dash-board { display: grid; gap: 10px; }
.dash-hello,
.referral-card {
  padding: 10px 12px;
  background: #fffdf8;
  border: 1px solid rgba(184, 137, 58, 0.4);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(48, 18, 12, 0.04);
}
body.panel-body .dash-hello h2,
body.panel-body .referral-card h2 { margin: 0 0 4px; font-size: 20px; line-height: 1.2; }
.dash-kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a6a32;
}
.dash-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: center;
  margin: 0;
  font-size: 13px;
  color: #5c4a40;
}
.dash-meta strong { color: var(--maroon-deep); }
.dash-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.dash-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
  margin: 0;
  padding: 8px 10px 7px;
  text-decoration: none;
  color: inherit;
  background: #fffdf8;
  border: 1px solid rgba(122, 36, 48, 0.12);
  border-left: 3px solid var(--maroon);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(48, 18, 12, 0.04);
}
.dash-card:nth-child(even) { border-left-color: var(--gold); }
.dash-card:hover { border-color: rgba(184, 137, 58, 0.7); }
.dash-card span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #7a685c;
}
.dash-card strong {
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--maroon-deep);
}
.dash-card em { font-style: normal; font-size: 12.5px; color: #6e5d52; }
.referral-id { display: flex; align-items: baseline; gap: 8px; margin: 6px 0; font-size: 13px; color: #6e5d52; }
.referral-id strong { font-size: 20px; letter-spacing: 0.04em; color: var(--maroon-deep); }
.referral-copy { display: flex; gap: 6px; align-items: center; }
.referral-copy input { flex: 1; min-width: 0; }
.referral-note { margin: 6px 0 0; color: #1f6b3a; font-weight: 700; font-size: 13px; }
.share-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
}
.share-wa { background: #1f8a4c; }
.share-fb { background: #3b5998; }
.share-tg { background: #2aabee; }
.share-x { background: #1c1c1c; }
.share-mail { background: var(--maroon); }

.invoice {
  background: #fffdf8;
  color: #24160f;
  border-radius: 8px;
  padding: 28px;
  max-width: 860px;
}
.invoice h2, .invoice h3 { color: #24160f; margin: 0 0 6px; }
.invoice table { width: 100%; border-collapse: collapse; }
.invoice th, .invoice td { border-bottom: 1px solid #e7d3a3; padding: 8px 6px; text-align: left; color: #24160f; }
.invoice .right { text-align: right; }

@media (max-width: 1100px) {
  .dash-cards, .grid-3, .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  body.panel-body { overflow-x: hidden; }
  .desk { grid-template-columns: minmax(0, 1fr); }
  .desk-rail {
    grid-column: 1;
    grid-row: 1;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    height: 100dvh;
    width: min(280px, 88vw);
    max-width: min(280px, 88vw);
    overflow: hidden;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    box-shadow: 8px 0 24px rgba(48, 18, 12, 0.16);
  }
  .desk-main {
    grid-column: 1;
    grid-row: 1;
  }
  .desk-rail nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
  .desk-foot { margin-top: 0; background: #fffdf8; }
  body.panel-body label.desk-close { display: inline-flex; }
  body.panel-body .desk-top label.nav-burger { display: inline-flex; }
  #side-toggle:checked ~ .desk-rail { transform: none; }
  body.panel-body #side-toggle:checked ~ label.desk-shade {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(28, 12, 12, 0.46);
    z-index: 40;
  }
}
@media (max-width: 760px) {
  .grid-2, .level-grid { grid-template-columns: 1fr 1fr; }
  .desk-top { flex-wrap: wrap; padding: 6px 10px; }
  .desk-top h1 { font-size: 16px; white-space: normal; }
  .desk-top .who { flex: 1 1 100%; justify-content: flex-start; margin-left: 0; }
  .desk-content { padding: 10px 10px 20px; }
  body.panel-body .dash-hello h2, body.panel-body .referral-card h2 { font-size: 18px; }
  .dash-card { min-height: 0; }
  .dash-card strong, body.panel-body .stat strong { font-size: 18px; }
  .referral-id strong { font-size: 18px; }
  .share-btn { flex: 1 1 calc(50% - 6px); }
  .referral-copy { flex-direction: column; align-items: stretch; }
}
@media (max-width: 560px) {
  .grid-2, .grid-3, .stat-grid, .dash-cards, .level-grid { grid-template-columns: 1fr; }
  .week { grid-template-columns: 1fr 1fr; }
}
body.desk-admin .desk-gene {
  margin: 2px 0 8px;
  padding: 0 6px;
  min-width: 0;
  max-width: 100%;
}
body.desk-admin .desk-gene-label {
  display: block;
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8a6230;
}
body.desk-admin .desk-gene select {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  font-size: 12px;
  padding: 4px 6px;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.desk-admin .filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(88px, 0.7fr) minmax(100px, 0.8fr) minmax(120px, 1fr) auto;
  gap: 8px 10px;
  align-items: end;
  max-width: none;
  margin-bottom: 14px;
  padding: 10px 12px;
}
body.desk-admin .filter-bar > label {
  min-width: 0;
}
body.desk-admin .filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
}
body.desk-admin .export-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 0 0 12px;
}
body.desk-admin .wallet-figures .stat span { font-size: 11px; }
body.desk-admin .danger-box {
  margin-top: 18px;
  border-color: rgba(122, 36, 48, 0.45);
}
@media (max-width: 980px) {
  body.desk-admin .filter-bar { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  body.desk-admin .filter-bar { grid-template-columns: 1fr; }
}
/* —— Admin Plan desk —— */
.plan-desk {
  display: grid;
  gap: 14px;
  max-width: 1100px;
}
.plan-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px 20px;
  align-items: end;
  padding: 14px 16px 12px;
  border-radius: 12px;
  border: 1px solid rgba(184, 137, 58, 0.4);
  background:
    linear-gradient(135deg, rgba(122, 36, 48, 0.06) 0%, transparent 42%),
    linear-gradient(180deg, #fffdf8 0%, #f8f1de 100%);
  box-shadow: 0 1px 2px rgba(48, 18, 12, 0.05);
}
.plan-kicker {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8a6a32;
}
.plan-hero h2 {
  margin: 0 0 6px;
  font-size: 22px;
  line-height: 1.15;
  color: var(--maroon-deep);
}
.plan-hero .fine { margin: 0; max-width: 52ch; }
.plan-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(64px, auto));
  gap: 8px;
  margin: 0;
}
.plan-hero-stats > div {
  min-width: 68px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(184, 137, 58, 0.32);
  background: rgba(255, 253, 248, 0.88);
  text-align: center;
}
.plan-hero-stats dt {
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a6a32;
}
.plan-hero-stats dd {
  margin: 2px 0 0;
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--maroon-deep);
  line-height: 1.1;
}
.plan-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(184, 137, 58, 0.36);
  background: rgba(255, 253, 248, 0.92);
  width: fit-content;
  max-width: 100%;
  position: sticky;
  top: 60px;
  z-index: 8;
  box-shadow: 0 1px 3px rgba(48, 18, 12, 0.06);
}
.plan-tab {
  appearance: none;
  border: 0;
  cursor: pointer;
  margin: 0;
  padding: 8px 14px;
  border-radius: 999px;
  background: transparent;
  color: #6e5d52;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  transition: background 0.15s ease, color 0.15s ease;
}
.plan-tab:hover { color: var(--maroon-deep); background: rgba(184, 137, 58, 0.12); }
.plan-tab.is-on {
  background: linear-gradient(180deg, var(--maroon) 0%, var(--maroon-deep) 100%);
  color: #fffdf8;
  box-shadow: 0 1px 2px rgba(61, 16, 22, 0.28);
}
.plan-tab:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.plan-panel { display: none; }
.plan-panel.is-on { display: block; }
.plan-split {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.plan-compose {
  position: sticky;
  top: 56px;
  margin: 0;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(184, 137, 58, 0.4);
  background:
    linear-gradient(180deg, #f8f1de 0%, #fffdf8 38%),
    #fffdf8;
}
.plan-compose .eyebrow { color: var(--maroon); }
.plan-section-head {
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(184, 137, 58, 0.28);
}
.plan-section-head h3 {
  margin: 0 0 4px;
  font-size: 16px;
  color: var(--maroon-deep);
}
.plan-section-head .fine { margin: 0; }
.plan-pkg-grid { margin: 0; }
.plan-rules {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  max-width: none;
}
.plan-rules.card { border: 0; }
.plan-rule-block {
  margin: 0 0 12px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(184, 137, 58, 0.34);
  background:
    linear-gradient(180deg, rgba(248, 241, 222, 0.45) 0%, #fffdf8 40%),
    #fffdf8;
}
.plan-rule-block .eyebrow {
  color: var(--maroon);
  margin-bottom: 10px;
}
.plan-level-grid {
  margin-top: 10px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.plan-day-picks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 8px;
}
.plan-day {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(184, 137, 58, 0.28);
  background: #fffdf8;
  font-size: 13px;
  font-weight: 600;
  color: var(--maroon-deep);
}
.plan-day:has(input:checked) {
  border-color: rgba(122, 36, 48, 0.45);
  background: linear-gradient(180deg, #f8f1de, #fffdf8);
  box-shadow: inset 0 0 0 1px rgba(184, 137, 58, 0.2);
}
.plan-save-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 4px 2px 2px;
}
.plan-desk .pkg-edit .pkg-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: end;
}
.plan-desk .pkg-edit .pkg-form-plan {
  grid-template-columns: 1fr 1fr;
}
.plan-desk .pkg-edit .pkg-form label { flex: none; min-width: 0; }
.plan-desk .pkg-edit .pkg-form label:last-of-type { grid-column: 1 / -1; }
.member-pkgs .plan-hero-stats { grid-template-columns: repeat(2, minmax(88px, auto)); }
@media (max-width: 900px) {
  .plan-hero { grid-template-columns: 1fr; }
  .plan-hero-stats { justify-content: start; }
  .plan-split { grid-template-columns: 1fr; }
  .plan-compose { position: static; }
}
@media (max-width: 760px) {
  .plan-tabs {
    width: 100%;
    border-radius: 12px;
    justify-content: stretch;
  }
  .plan-tab { flex: 1 1 calc(50% - 6px); text-align: center; }
  .plan-level-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan-desk .pkg-edit .pkg-form { grid-template-columns: 1fr; }
  .plan-hero h2 { font-size: 18px; }
}
@media (max-width: 560px) {
  .plan-hero-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .plan-hero-stats > div { min-width: 0; }
  .plan-day-picks { grid-template-columns: 1fr 1fr; }
}
/* —— Member desk (SSS-aligned cream desk) —— */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hint { color: #6d5c50; font-size: 14px; margin: 0 0 10px; line-height: 1.45; }
.hint a { color: var(--maroon); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.payout-layout {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.payout-layout > .panel { margin-top: 0; }
.payout-side { display: grid; gap: 12px; align-content: start; max-width: 440px; }
.payout-side .stat { margin: 0; }
.payout-side .btn { width: 100%; }
.payout-banner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.payout-banner div {
  background: var(--gold-3);
  border: 1px solid rgba(184, 137, 58, 0.35);
  border-radius: 8px;
  padding: 8px 10px;
}
.payout-banner span {
  display: block;
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #7a685c;
  font-weight: 700;
}
.payout-banner strong {
  display: block;
  margin-top: 2px;
  font-size: 1.25rem;
  color: var(--maroon-deep);
  font-variant-numeric: tabular-nums;
}
.payout-account {
  margin: 12px 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(184, 137, 58, 0.3);
  border-radius: 12px;
  background: #fffdf8;
}
.payout-account h3 { margin: 0 0 6px; }
.acct { display: flex; flex-direction: column; gap: 1px; line-height: 1.35; }
.acct strong { font-size: 13px; color: var(--maroon-deep); }
.acct span { font-size: 13px; color: #5c4a40; }
.bank-facts {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
  padding: 12px 0 0;
  border-top: 1px solid rgba(184, 137, 58, 0.22);
}
.bank-facts:first-of-type { border-top: 0; padding-top: 0; }
.bank-facts div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 8px; align-items: baseline; }
.bank-facts dt {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #7a685c;
}
.bank-facts dd {
  margin: 0;
  font-weight: 700;
  color: var(--maroon-deep);
  overflow-wrap: anywhere;
}
.pill-pending { background: #fff6e4; color: #8a5a12; border: 1px solid rgba(184, 137, 58, 0.35); }
.dash-cards-tight {
  margin-bottom: 16px;
  grid-template-columns: repeat(2, minmax(220px, 320px));
}
body.panel-body .panel {
  margin-top: 12px;
  padding: 14px 16px;
}
body.panel-body .panel > h2 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--maroon-deep);
}
body.panel-body form.panel { max-width: 640px; }
body.panel-body form.panel > .btn,
body.panel-body .panel > .btn { margin-top: 12px; width: fit-content; }

body.desk-member {
  font-size: 16px;
  line-height: 1.5;
  background: #efe4d4;
}
body.desk-member .desk { background: #efe4d4; }
body.desk-member .desk-rail,
body.desk-member .desk-top { background: #fffdf8; }
body.desk-member .desk-rail { gap: 16px; padding: 18px 12px 14px; }
body.desk-member .desk-rail .brand strong {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
body.desk-member .desk-rail .brand small { font-size: 11px; }
body.desk-member .desk-rail nav { gap: 4px; }
body.desk-member .desk-rail nav a,
body.desk-member .desk-foot a {
  font-size: 15px;
  line-height: 1.35;
  padding: 10px 12px;
  border-radius: 10px;
}
body.desk-member .desk-rail nav a.is-on {
  font-weight: 600;
  box-shadow: inset 3px 0 0 #e7d3a3;
}
body.desk-member .desk-top { min-height: 60px; padding: 10px 20px; }
body.desk-member .desk-top h1 {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
}
body.desk-member .desk-top .who strong {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
body.desk-member .desk-top .who .desk-chip { font-size: 14px; line-height: 1.3; }
body.desk-member .desk-chip em { font-size: 12px; }
body.desk-member .desk-content {
  font-size: 16px;
  line-height: 1.5;
  padding: 20px 22px 36px;
}
body.desk-member .stat,
body.desk-member .panel {
  background: #fffdf8;
  border: 1px solid rgba(122, 36, 48, 0.12);
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(48, 18, 12, 0.06);
}
body.desk-member .stat {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  min-height: 112px;
  margin: 0;
  padding: 16px 18px 14px;
}
body.desk-member .payout-side .stat { border-left: 4px solid var(--maroon); }
body.desk-member .payout-side .stat:nth-child(even) { border-left-color: var(--gold); }
body.desk-member .stat span,
body.desk-member .payout-banner span {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.35;
}
body.desk-member .stat strong,
body.desk-member .payout-banner strong {
  font-size: 24px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
body.desk-member .panel { margin-top: 16px; padding: 18px 18px 16px; }
body.desk-member .payout-layout { gap: 16px; }
body.desk-member .payout-layout > .panel { margin-top: 0; }
body.desk-member .panel > h2 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 10px;
}
body.desk-member label {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--maroon-deep);
}
body.desk-member .hint { font-size: 15px; line-height: 1.45; }
body.desk-member .btn { font-size: 15px; border-radius: 10px; }
body.desk-member form.panel { max-width: 760px; padding: 22px 22px 18px; }
body.desk-member input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
body.desk-member select {
  height: 42px;
  font-size: 16px;
  border-radius: 10px;
}
body.desk-member textarea { font-size: 16px; border-radius: 10px; }
.level-wise {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}
.level-block {
  background: var(--paper, #fffdf8);
  border: 1px solid rgba(184, 137, 58, 0.35);
  border-radius: 12px;
  padding: 12px 12px 6px;
}
.level-block h2 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--maroon-deep, #3d1016);
}
.level-block .table-wrap {
  margin-top: 0;
  border-radius: 10px;
}

body.desk-member .table-wrap,
body.desk-member .sheet-wrap {
  margin-top: 4px;
  border: 1px solid rgba(184, 137, 58, 0.28);
  border-radius: 12px;
  background: #fff;
}
body.desk-member .level-block .table-wrap {
  margin-top: 0;
}
body.desk-member table.data,
body.desk-member table.sheet {
  font-size: 15px;
  line-height: 1.45;
  min-width: 720px;
}
body.desk-member table.data th,
body.desk-member table.sheet th {
  font-size: 13px;
  line-height: 1.35;
  padding: 10px 12px;
}
body.desk-member table.data td,
body.desk-member table.sheet td { padding: 10px 12px; }
body.desk-member .acct strong { font-size: 15px; }
body.desk-member .dash-hello,
body.desk-member .referral-card {
  padding: 18px 20px;
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(48, 18, 12, 0.06);
}
body.desk-member .dash-hello h2,
body.desk-member .referral-card h2 {
  font-size: 28px;
  margin: 2px 0 6px;
}
body.desk-member .dash-cards { gap: 14px; }
body.desk-member .dash-card {
  min-height: 124px;
  padding: 16px 16px 14px;
  border-radius: 16px;
  border-left-width: 4px;
  box-shadow: 0 8px 22px rgba(48, 18, 12, 0.06);
  justify-content: space-between;
  gap: 8px;
}
body.desk-member .dash-card strong { font-size: 24px; }
body.desk-member .dash-card span { font-size: 12px; }
body.desk-member .dash-meta { font-size: 15px; gap: 8px 14px; }

@media (max-width: 980px) {
  .payout-layout { grid-template-columns: minmax(0, 1fr); }
  .payout-side { max-width: none; }
  .dash-cards-tight { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .form-row { grid-template-columns: 1fr; }
  .bank-facts div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  body.desk-member .desk-content { padding: 12px 12px 28px; }
  body.desk-member .dash-hello h2,
  body.desk-member .referral-card h2 { font-size: 22px; }
  body.desk-member .dash-card { min-height: 0; }
  body.desk-member .dash-card strong,
  body.desk-member .stat strong { font-size: 20px; }
  .payout-banner { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .desk-rail { transition: none; }
  .plan-tab { transition: none; }
}
@media print {
  .desk-rail, .desk-top, .desk-shade, .no-print { display: none !important; }
  .desk, .desk-main, .desk-content { display: block; width: auto; margin: 0; padding: 0; background: white; }
}

/* —— Compact cream admin desk (SSS-aligned) —— */
body.desk-admin .desk-content { padding: 12px 14px 20px; }
body.desk-admin .desk-rail { gap: 8px; padding: 12px 10px 10px; }
body.desk-admin .desk-nav-label { margin: 8px 10px 0; }
body.desk-admin .card,
body.desk-admin form.card,
body.desk-admin .panel,
body.desk-admin form.panel { margin-top: 8px; padding: 12px 12px 10px; }
body.desk-admin .card > h2,
body.desk-admin .panel > h2 { margin-bottom: 8px; }
body.desk-admin .stat { min-height: 0; padding: 10px 12px; }
body.desk-admin .stat strong { font-size: 20px; }
body.desk-admin .members-lead { margin: 0 0 8px; color: #5c4a40; font-size: 13.5px; }
body.desk-admin .add-member { margin-bottom: 8px; }
body.panel-body .btn-line {
  background: #fffdf8;
  color: var(--maroon-deep);
  border-color: rgba(184, 137, 58, 0.5);
}
body.panel-body .btn-line:hover { background: rgba(184, 137, 58, 0.12); }
body.desk-admin .admin-tools,
body.desk-admin .filters.admin-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
}
body.desk-admin .admin-tools input,
body.desk-admin .admin-tools select,
body.desk-admin .admin-tools .btn {
  width: auto;
  height: 38px;
  min-height: 38px;
  margin: 0;
}
body.desk-admin .admin-tools input:not([type="date"]):not([type="checkbox"]) {
  min-width: 220px;
  flex: 1 1 220px;
}
body.desk-admin .admin-tools label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}
body.desk-admin .table-wrap,
body.desk-admin .sheet-wrap { margin-top: 0; }
body.desk-admin .pager {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
  font-size: 13px;
}
body.desk-admin td.act-cell { width: 1%; vertical-align: top; white-space: normal; }
body.desk-admin .row-acts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 220px;
}
body.desk-admin .row-acts-line {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
body.desk-admin .row-acts-status,
body.desk-admin .row-acts-inline { margin: 0; display: inline-flex; }
body.desk-admin .row-acts-select {
  height: 28px;
  min-height: 28px;
  width: auto;
  min-width: 96px;
  padding: 0 6px;
  font-size: 12px;
}
body.desk-admin .row-acts-delete {
  align-self: flex-start;
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  color: var(--maroon);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}
body.desk-admin .id-line {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
body.desk-admin .copy-id {
  appearance: none;
  border: 1px solid rgba(184, 137, 58, 0.45);
  background: #fffdf8;
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--maroon-deep);
  cursor: pointer;
}
body.desk-admin .member-id .id-name { display: block; font-weight: 600; }
body.desk-admin .member-id .id-nick { display: block; font-size: 12px; color: #7a685c; }
body.desk-admin .muted { color: #7a685c; }
body.desk-admin .add-member-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  margin-bottom: 12px;
}
body.desk-admin .add-member-grid .span-2 { grid-column: 1 / -1; }
body.desk-admin .inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
  margin-top: 8px;
}
body.desk-admin .member-detail-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: flex-start;
  justify-content: space-between;
}
body.desk-admin .member-detail-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
@media (max-width: 760px) {
  body.desk-admin .add-member-grid { grid-template-columns: 1fr; }
  body.desk-admin .admin-tools input:not([type="date"]):not([type="checkbox"]) {
    min-width: 0;
    flex: 1 1 100%;
  }
}
