/* Chatterlace dashboard — the chatterlace.com palette and type, in a quieter
   working-tool register: blush ground, plum ink, rose for the one accent. */
:root {
  --ink: #291b26;
  --muted: #72606c;
  --faint: #9b8593;
  --pink: #f7e4ec;
  --soft: #fff9fc;
  --paper: #ffffff;
  --line: #e8d6df;
  --line-strong: #dfc8d4;
  --rose: #e44b8a;
  --rose-deep: #be487a;
  --plum: #30212c;
  --ok: #3f8f5e;
  --ok-wash: #e5f3ea;
  --warn: #9a6b2d;
  --warn-wash: #fff2d9;
  --bad: #b3364f;
  --bad-wash: #fbe3e8;
  --cb: #9e591a; --cb-bg: #f6d1a8;
  --sc: #a43355; --sc-bg: #f2c0d1;
  --cs: #7a3f93; --cs-bg: #e6cdf0;
  --sans: 'DM Sans', system-ui, sans-serif;
  --display: 'Manrope', 'DM Sans', sans-serif;
  --radius: 12px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--sans); color: var(--ink); background: var(--pink); font-size: 15px; line-height: 1.5; min-height: 100vh; }
a { color: var(--rose-deep); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.brand { font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -0.6px; color: var(--ink); text-decoration: none; }
.brand span { color: var(--rose); }
.brand { display: inline-flex; align-items: center; }
.brand .logo { display: block; height: auto; }
.auth-card .brand .logo { width: 180px; }
.side .brand .logo { width: 160px; }
@media (max-width: 860px) { .side .brand .logo { width: 132px; } }

/* ---- Buttons & fields ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 9px; padding: 11px 18px; font-weight: 700; font-size: 14px; cursor: pointer; background: var(--ink); color: var(--soft); text-decoration: none; }
.btn:hover { background: #3d2a37; }
.btn:disabled { opacity: .55; cursor: default; }
.btn.secondary { background: var(--paper); color: var(--ink); border-color: var(--line-strong); }
.btn.secondary:hover { background: var(--soft); }
.btn.danger { background: var(--bad); }
.btn.small { padding: 7px 12px; font-size: 13px; }
.btn.link { background: none; color: var(--rose-deep); padding: 0; font-weight: 600; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label { font-size: 13px; font-weight: 700; color: var(--ink); }
.hint { font-size: 13px; color: var(--muted); }
.input { width: 100%; border: 1px solid var(--line-strong); background: var(--paper); border-radius: 9px; padding: 11px 13px; font-size: 15px; }
.input:focus { border-color: var(--rose); outline: none; box-shadow: 0 0 0 3px #e44b8a22; }
.input.code { font-family: ui-monospace, Menlo, monospace; font-size: 24px; letter-spacing: 8px; text-align: center; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.notice { border-radius: 9px; padding: 11px 14px; font-size: 14px; }
.notice.ok { background: var(--ok-wash); color: var(--ok); }
.notice.warn { background: var(--warn-wash); color: var(--warn); }
.notice.bad { background: var(--bad-wash); color: var(--bad); }

/* ---- Sign-in screens ---- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; }
.auth-card { width: 100%; max-width: 420px; background: var(--soft); border: 1px solid var(--line-strong); border-radius: 16px; padding: 34px 30px; box-shadow: 0 18px 40px #4923370f; }
.auth-card h1 { font-family: var(--display); font-size: 26px; letter-spacing: -0.8px; margin: 22px 0 8px; text-wrap: balance; }
.auth-card p.lead { color: var(--muted); margin-bottom: 22px; }
.auth-foot { margin-top: 22px; font-size: 12px; color: var(--faint); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--rose); flex: none; }

/* ---- App shell ---- */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.shell > * { min-width: 0; }
.side { background: var(--plum); color: #f5e6ee; padding: 22px 14px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; }
.side .brand { color: #fff3f9; padding: 2px 8px 0; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; color: #e3c5d4; text-decoration: none; padding: 9px 10px; border-radius: 8px; font-weight: 600; font-size: 14px; }
.nav a:hover { background: #ffffff10; color: #fff; }
.nav a[aria-current="page"] { background: var(--pink); color: var(--ink); }
.nav .sep { height: 1px; background: #ffffff18; margin: 8px 4px; }
.who { margin-top: auto; padding: 10px; border-top: 1px solid #ffffff18; font-size: 13px; color: #c4a7b6; }
.who strong { display: block; color: #fff3f9; font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.main { padding: 30px 34px 60px; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-family: var(--display); font-size: 28px; letter-spacing: -0.9px; line-height: 1.15; }
.page-head p { color: var(--muted); margin-top: 4px; max-width: 60ch; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card + .card { margin-top: 16px; }
.card h2 { font-family: var(--display); font-size: 17px; letter-spacing: -0.3px; margin-bottom: 4px; }
.card .sub { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.save-bar { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.status { font-size: 13px; color: var(--muted); }
.status.ok { color: var(--ok); } .status.bad { color: var(--bad); }

/* Platform chips (the site's pastel platform symbols). */
.pchip { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 22px; padding: 0 7px; border-radius: 5px; font-size: 12px; font-weight: 800; letter-spacing: .3px; }
.pchip.chaturbate { background: var(--cb-bg); color: var(--cb); }
.pchip.stripchat { background: var(--sc-bg); color: var(--sc); }
.pchip.camsoda { background: var(--cs-bg); color: var(--cs); }

/* Live chat frame */
.chat-frame { width: 100%; height: calc(100vh - 170px); min-height: 420px; border: 1px solid #58404f; border-radius: var(--radius); background: #2a1c26; display: block; }

/* Stats */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.kpi .k { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .6px; text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.kpi .v { font-family: var(--display); font-size: 26px; font-weight: 800; letter-spacing: -0.8px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .v small { font-size: 14px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 170px; padding-top: 10px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.bar { flex: 1 0 12px; display: flex; flex-direction: column-reverse; min-width: 12px; border-radius: 3px 3px 0 0; overflow: hidden; }
.bar i { display: block; }
.bar i.chaturbate { background: #dba259; } .bar i.stripchat { background: #d66b8f; } .bar i.camsoda { background: #b57fcf; }
.bar-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--faint); margin-top: 6px; }
.legend-row { display: flex; gap: 14px; font-size: 13px; color: var(--muted); margin-top: 10px; flex-wrap: wrap; }
.legend-row span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.t td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
.empty-note { color: var(--faint); font-size: 14px; padding: 18px 0; }

/* Editors */
.menu-row { display: grid; grid-template-columns: 92px minmax(160px, 1fr) auto auto 36px; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.menu-row .input { padding: 8px 10px; font-size: 14px; }
.menu-row .price { font-variant-numeric: tabular-nums; }
.menu-row .price.round { border-color: #e2b36b; background: #fffaf0; }
.chips { display: flex; gap: 4px; }
.chip { min-width: 30px; height: 30px; padding: 0 8px; border-radius: 7px; border: 1px solid var(--line-strong); background: var(--paper); font-size: 12px; font-weight: 800; color: var(--faint); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--soft); }
.chip.p[aria-pressed="true"] { background: var(--cb-bg); color: var(--cb); border-color: #e7b98a; }
.chip.p.s[aria-pressed="true"] { background: var(--sc-bg); color: var(--sc); border-color: #e7a2b9; }
.chip.p.m[aria-pressed="true"] { background: var(--cs-bg); color: var(--cs); border-color: #d2b0e1; }
.icon-btn { width: 32px; height: 32px; border-radius: 8px; border: 1px solid transparent; background: none; color: var(--faint); cursor: pointer; font-size: 18px; }
.icon-btn:hover { background: var(--bad-wash); color: var(--bad); }
.head-row { display: grid; grid-template-columns: 92px minmax(160px, 1fr) auto auto 36px; gap: 8px; font-size: 12px; font-weight: 700; color: var(--muted); padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.title-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) 36px; gap: 8px; align-items: center; padding: 6px 0; }
.letter { width: 34px; height: 36px; border-radius: 8px; background: var(--plum); color: #fff3f9; display: grid; place-items: center; font-weight: 800; }
.plat-row { display: grid; grid-template-columns: 150px 90px minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; position: absolute; cursor: pointer; margin: 0; }
.switch span { position: absolute; inset: 0; background: var(--line-strong); border-radius: 99px; transition: background .15s; pointer-events: none; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px #0003; }
.switch input:checked + span { background: var(--rose); }
.switch input:checked + span::after { transform: translateX(18px); }
.tier-row { display: grid; grid-template-columns: repeat(5, minmax(70px, 1fr)) 36px; gap: 8px; align-items: center; padding: 6px 0; }
.tier-head { display: grid; grid-template-columns: repeat(5, minmax(70px, 1fr)) 36px; gap: 8px; font-size: 12px; font-weight: 700; color: var(--muted); }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--pink); color: var(--rose-deep); }
.pill.gray { background: #f1ecef; color: var(--muted); }
.pill.green { background: var(--ok-wash); color: var(--ok); }
.pill.red { background: var(--bad-wash); color: var(--bad); }

.mobile-top { display: none; }
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; padding: 14px; gap: 10px; }
  .nav { flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 2px; }
  .nav a { white-space: nowrap; padding: 8px 11px; }
  .nav .sep, .who { display: none; }
  .main { padding: 22px 16px 50px; }
  .menu-row, .head-row { grid-template-columns: 76px minmax(0, 1fr) 36px; }
  .menu-row .chips { grid-column: 2 / 3; }
  .head-row .opt { display: none; }
  .plat-row { grid-template-columns: 1fr auto; }
  .plat-row .input { grid-column: 1 / -1; }
  .tier-head { display: none; }
  .tier-row { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 10px 0; border-bottom: 1px solid var(--line); }
  .tier-row .field-mini::before { content: attr(data-l); display: block; font-size: 11px; font-weight: 700; color: var(--muted); margin-bottom: 3px; }
  .chat-frame { height: 70vh; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.t td.note-cell { max-width: 260px; white-space: normal; overflow-wrap: anywhere; color: var(--muted); }
