body.panel-body {
  --ink: #24160f;
  --maroon: #7a2430;
  --maroon-deep: #3d1016;
  --gold: #b8893a;
  --gold-2: #e7d3a3;
  --gold-3: #f8f1de;
  --paper: #fffdf8;
  --ivory: #efe4d4;
  --line: rgba(184, 137, 58, 0.38);
  --muted: #6e5d52;
  --soft: #7a685c;
  --ok: #1a7f46;
  --ink-on-gold: #fffdf8;
  --bg: #efe4d4;
  --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;
  line-height: 1.4;
}
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; }

.side-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.desk {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
  background: var(--ivory);
}
.desk-shade { display: none; }
.desk-rail {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 196px;
  padding: 10px 8px 8px;
  background: var(--paper);
  border-right: 1px solid rgba(184, 137, 58, 0.42);
  z-index: 50;
}
.desk-rail::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--maroon), var(--gold));
}
.desk-close {
  display: none;
  align-self: flex-end;
  cursor: pointer;
  font-size: 11px;
  letter-spacing: 0.08em;
  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: 32px;
  height: 32px;
  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;
}
.desk-rail .brand strong {
  display: block;
  color: var(--maroon-deep);
  font-size: 12px;
  letter-spacing: 0.05em;
}
.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;
}
.desk-rail nav a,
.desk-foot a {
  text-decoration: none;
  color: #3d2b22;
  font-size: 13px;
  line-height: 1.25;
  padding: 5px 8px;
  border-radius: 7px;
}
.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;
  box-shadow: inset 3px 0 0 #e7d3a3;
}
.desk-nav-label {
  margin: 8px 8px 1px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a6230;
}
.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: 700; }
.desk-main { min-width: 0; display: flex; flex-direction: column; }
.desk-top {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 4px 14px;
  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-size: 16px;
  line-height: 1.2;
}
.desk-top .nav-burger {
  display: none;
  align-items: center;
  border: 1px solid rgba(184, 137, 58, 0.5);
  border-radius: 7px;
  padding: 4px 8px;
  font-size: 12px;
  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;
  margin-left: auto;
}
.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: 12px 14px 22px; 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: 10px 12px; }
body.panel-body .stat { padding: 8px 10px; }
body.panel-body .stat span,
body.panel-body .payout-banner span {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  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 input,
body.panel-body select,
body.panel-body textarea {
  background: #fff;
  color: #24160f;
  border: 1px solid rgba(184, 137, 58, 0.45);
  border-radius: 8px;
  padding: 6px 9px;
  font-size: 14px;
  max-width: 100%;
}
body.panel-body input::placeholder { color: #9a887c; }
body.panel-body label { font-size: 13px; gap: 3px; }
body.panel-body .form { gap: 8px; }
body.panel-body .btn {
  border-radius: 8px;
  min-height: 32px;
  padding: 0 12px;
  font-size: 13.5px;
}
body.panel-body .btn-tiny {
  min-height: 28px;
  padding: 0 8px;
  font-size: 12px;
}
body.panel-body .btn-gold {
  background: var(--maroon);
  color: #fffdf8;
  border-color: transparent;
}
body.panel-body .btn-ghost {
  background: #fffdf8;
  color: var(--maroon-deep);
  border-color: rgba(184, 137, 58, 0.5);
}
body.panel-body .note {
  padding: 8px 10px;
  border-radius: 8px;
  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;
  max-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: 640px; font-size: 13px; }
.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 th, .data th {
  color: #7a685c;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 700;
}
.sheet td, .data td { font-variant-numeric: tabular-nums; color: #24160f; }
.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; }
.badge.yes, .pill-active { background: #e7f3ec; color: #1a7f46; }
.badge.no, .pill-inactive { background: #f3eee8; color: #6e5d52; }
.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(168px, 1fr)); }
.pkg {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(184, 137, 58, 0.3);
  border-left: 4px solid var(--maroon);
  background: #fffdf8;
  box-shadow: 0 1px 2px rgba(48, 18, 12, 0.04);
}
.pkg b { font-size: 20px; font-weight: 700; color: var(--maroon-deep); }
.pkg form, .inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }

.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 {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    height: 100dvh;
    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-rail nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
  .desk-foot { margin-top: 0; background: #fffdf8; }
  .desk-close { display: inline-flex; }
  .desk-top .nav-burger { display: inline-flex; }
  #side-toggle:checked ~ .desk-rail { transform: none; }
  #side-toggle:checked ~ .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; }
  .desk-top .who { flex: 1 1 100%; justify-content: flex-start; }
  .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; }
}
@media (prefers-reduced-motion: reduce) {
  .desk-rail { 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; }
}
