:root {
  --bg: #f4f5f7; --card: #ffffff; --ink: #16181d; --muted: #6b7079; --line: #e3e5ea;
  --accent: #ff7a00; --accent-2: #ffb000; --accent-soft: #fff2e2; --ok: #17a05a; --warn: #d97706; --bad: #d64545;
  --shadow: 0 1px 2px rgba(16, 18, 24, .05), 0 8px 24px -14px rgba(16, 18, 24, .25);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0f12; --card: #17191d; --ink: #eceef1; --muted: #9aa0a9; --line: #2a2d33; --accent-soft: #33240f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 28px -14px rgba(0, 0, 0, .8);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2, .brand, .btn, .tile b { font-family: Poppins, Inter, system-ui, sans-serif; }
a { color: inherit; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.center { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.center.pad { min-height: 40vh; }
.center-t { display: block; text-align: center; margin-top: 8px; }
.spinner { width: 32px; height: 32px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.err { color: var(--bad); font-size: 14px; min-height: 1.2em; margin: 8px 0 0; }

/* ---------- login ---------- */
.login-bg { background: radial-gradient(ellipse at top, #2a1a08, #0d0e11 60%); }
.login-card { width: 100%; max-width: 380px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 28px 22px; box-shadow: var(--shadow); text-align: center; }
.login-card h1 { margin: 10px 0 2px; font-size: 24px; }
.login-card .field { text-align: left; }
.login-logo { display: block; width: 64px; height: 64px; margin: 0 auto; border-radius: 18px; box-shadow: 0 12px 28px -10px var(--accent); }

/* ---------- shell ---------- */
.top { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 16px; background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; text-decoration: none; }
.brand-ic { flex: none; width: 32px; height: 32px; border-radius: 9px; }
.logo-q { background: linear-gradient(135deg, var(--accent-2), var(--accent) 55%, var(--accent-3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand .logo-q { margin-left: -8px; }
.top-actions { display: flex; gap: 6px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 18px 16px 110px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 11px; padding: 10px 15px; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:disabled { opacity: .6; cursor: wait; }
.btn.primary { border: 0; color: #fff; background: linear-gradient(135deg, var(--accent-2), var(--accent)); box-shadow: 0 8px 20px -10px var(--accent); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 6px 10px; font-size: 13px; border-radius: 9px; }
.btn.wide { width: 100%; }
.btn.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 25%, transparent); } }

/* ---------- list ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.tiles.small { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.tile .tl { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.tile b { font-size: 24px; line-height: 1.3; }
.tile small { color: var(--muted); font-size: 12px; }
.list-head { display: flex; gap: 10px; margin-bottom: 14px; }
.search { flex: 1; min-width: 0; padding: 10px 14px; border-radius: 11px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.empty { grid-column: 1 / -1; text-align: center; padding: 40px 0; }
.ccard { display: block; text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.ccard:hover { transform: translateY(-2px); }
.ccard-top { position: relative; height: 86px; display: grid; place-items: center; }
.ccard-top img, .ccard-top .ini { width: 54px; height: 54px; border-radius: 15px; object-fit: cover; background: #fff; box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .5); }
.ccard-top .ini { display: grid; place-items: center; color: #fff; font: 800 24px Poppins, sans-serif; }
.badge { position: absolute; top: 10px; right: 10px; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: rgba(255, 255, 255, .9); color: #333; }
.badge.ok { color: var(--ok); } .badge.warn { color: var(--warn); } .badge.off { color: var(--bad); }
.ccard-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 3px; }
.meter { height: 7px; border-radius: 7px; background: var(--line); overflow: hidden; margin: 6px 0 2px; }
.meter.lg { height: 10px; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-2), var(--accent)); border-radius: inherit; }

/* ---------- editor ---------- */
.ed-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; margin-bottom: 14px; }
.ed-head h1 { margin: 0; font-size: 24px; }
.ed-head a { font-size: 13px; word-break: break-all; }
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.ed-side { position: sticky; top: 70px; }
.phone { position: relative; width: 360px; height: 720px; margin: 0 auto; border-radius: 42px; padding: 12px; background: #111; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6), inset 0 0 0 2px #2b2b2b; }
.notch { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 110px; height: 22px; background: #111; border-radius: 0 0 14px 14px; z-index: 1; }
.phone-frame { width: 100%; height: 100%; border: 0; border-radius: 32px; background: #fff; }
.mobile-only { display: none; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow); }
.panel h2 { margin: 0 0 14px; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.pi { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); font-size: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; min-width: 0; }
.lbl { font-size: 13px; font-weight: 600; }
.hint { color: var(--muted); font-size: 12px; }
.hint.block { display: block; margin-top: 6px; }
input:not([type=checkbox]):not([type=range]):not([type=color]), select, textarea {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; font-size: 14.5px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 0; }
textarea { resize: vertical; }
.inline { display: flex; gap: 8px; align-items: center; }
.inline input, .inline select { flex: 1; min-width: 0; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 6px 0 8px; }
.checks { display: flex; flex-wrap: wrap; gap: 10px; }
.check { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 14px; }
.check input { width: 17px; height: 17px; accent-color: var(--accent); }
.switch { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch span { flex: none; position: relative; width: 42px; height: 24px; border-radius: 24px; background: var(--line); transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { transform: translateX(18px); }
input[type=range] { width: 100%; accent-color: var(--accent); }
input[type=color] { width: 46px; height: 38px; padding: 2px; border: 1px solid var(--line); border-radius: 9px; background: var(--card); }
.color { margin: 12px 0; }
.samples { display: grid; gap: 8px; }
.sample { padding: 10px 12px; border-radius: 12px; background: var(--bg); border: 1px dashed var(--line); font-size: 14px; white-space: pre-line; }
.sample .st { display: block; color: var(--accent-2); font-size: 12px; letter-spacing: 1px; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin: 6px 0 4px; }
.swatch { position: relative; height: 64px; border-radius: 12px; border: 2px solid transparent; cursor: pointer; display: flex; align-items: flex-end; padding: 6px 8px; color: #fff; font-size: 11.5px; font-weight: 600; text-align: left; }
.swatch span { text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.swatch i { position: absolute; top: 8px; right: 8px; width: 16px; height: 16px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255, 255, 255, .7); }
.swatch.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.swatch:nth-child(8) { color: #222; }
.swatch:nth-child(8) span { text-shadow: none; }
.logo-row { display: flex; gap: 14px; align-items: center; margin-top: 8px; }
.logo-row .btn { margin: 0 6px 6px 0; }
.logo-prev { flex: none; width: 84px; height: 84px; border-radius: 20px; border: 1px dashed var(--line); display: grid; place-items: center; overflow: hidden; font-size: 12px; color: var(--muted); background: var(--bg); }
.logo-prev img { width: 100%; height: 100%; object-fit: cover; }

/* package */
.pkg-top { display: flex; gap: 18px; align-items: center; margin-bottom: 14px; }
.big { display: flex; flex-direction: column; align-items: center; min-width: 100px; padding: 10px; border-radius: 14px; background: var(--accent-soft); }
.big b { font: 800 30px/1.1 Poppins, sans-serif; }
.big span { font-size: 12px; color: var(--muted); }
.pkg-meter { flex: 1; }
.pkgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin: 6px 0 14px; }
.pkg { border: 1.5px solid var(--line); background: var(--card); color: var(--ink); border-radius: 12px; padding: 10px 6px; cursor: pointer; display: flex; flex-direction: column; align-items: center; transition: border-color .15s, transform .15s; }
.pkg:hover { border-color: var(--accent); transform: translateY(-1px); }
.pkg b { font: 700 17px Poppins, sans-serif; }
.pkg span { font-size: 12.5px; color: var(--muted); }
.history { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.hrow { display: grid; grid-template-columns: 110px 70px 80px 1fr; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; align-items: center; }
.pos { color: var(--ok); } .neg { color: var(--bad); }

/* QR */
.linkbox { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 14px; }
.linkbox code { flex: 1 1 220px; padding: 9px 11px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); font-size: 13px; word-break: break-all; }
.qr-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 16px; align-items: start; }
.qr-prev { display: grid; place-items: center; min-height: 300px; padding: 12px; border-radius: 14px; background: repeating-conic-gradient(var(--bg) 0 25%, var(--card) 0 50%) 0 0 / 18px 18px; border: 1px solid var(--line); }
.stand-cv { width: 100%; max-width: 330px; height: auto; border-radius: 10px; box-shadow: 0 16px 40px -18px rgba(0, 0, 0, .5); }
.qr-actions { display: flex; flex-direction: column; gap: 8px; }
.qr-actions .field { margin-bottom: 4px; }

/* stats */
.starbars { display: grid; gap: 4px; margin: 6px 0 14px; }
.sb { display: grid; grid-template-columns: 30px 1fr 40px; gap: 8px; align-items: center; font-size: 13px; }
.sb .meter { margin: 0; }
.days { display: grid; gap: 4px; }
.day { display: grid; grid-template-columns: 56px 1fr 60px; gap: 8px; align-items: center; font-size: 12.5px; }
.dbar { position: relative; height: 12px; border-radius: 6px; background: var(--bg); overflow: hidden; }
.dbar i { position: absolute; left: 0; top: 0; height: 100%; border-radius: 6px; }
.dbar .v { background: color-mix(in srgb, var(--accent) 30%, transparent); }
.dbar .c { background: var(--accent); }

.savebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: flex; justify-content: flex-end; gap: 10px; padding: 12px 16px max(12px, env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
.savebar .btn.primary { min-width: 150px; }

.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 20; max-width: calc(100% - 32px); padding: 11px 16px; border-radius: 12px; background: var(--ink); color: var(--bg); font-size: 14px; box-shadow: 0 10px 28px -10px rgba(0, 0, 0, .5); }
.toast.bad { background: var(--bad); color: #fff; }

@media (max-width: 1100px) {
  .editor { grid-template-columns: 1fr; }
  .ed-side { display: none; }
  .mobile-only { display: inline-flex; }
  body.show-preview .ed-side { display: grid; place-items: center; position: fixed; inset: 0; z-index: 8; background: rgba(0, 0, 0, .7); top: 0; }
  body.show-preview .phone { width: min(360px, 92vw); height: min(720px, 82vh); }
  body.show-preview .ed-side small { color: #fff; }
}
@media (max-width: 640px) {
  .grid2, .qr-wrap { grid-template-columns: 1fr; }
  .list-head { flex-direction: column; }
  .pkg-top { flex-direction: column; align-items: stretch; }
  .hrow { grid-template-columns: 90px 50px 70px; }
  .hrow small { grid-column: 1 / -1; }
  .ed-head { flex-direction: column; align-items: stretch; }
}

/* ---------- shared extras: recharge requests, client logins, client dashboard ---------- */
.block { display: block; }
.small-link { margin-top: 14px; font-size: 13.5px; }
.small-link a { color: var(--accent); font-weight: 600; }
.reqs { display: grid; gap: 8px; }
.req { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.req small { line-height: 1.5; }
.pill-status { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--line); }
.pill-status.pending { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.pill-status.approved { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.pill-status.rejected, .pill-status.cancelled { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.secret { margin: 10px 0 12px; padding: 14px; border-radius: 14px; border: 1.5px dashed var(--accent); background: var(--accent-soft); display: grid; gap: 8px; }
.secret-box { display: grid; gap: 4px; font-size: 14px; }
.secret code { font-size: 14px; padding: 2px 6px; border-radius: 6px; background: var(--card); user-select: all; }
.brand-sub { margin-left: 8px; padding-left: 10px; border-left: 1px solid var(--line); font: 500 14px Inter, sans-serif; color: var(--muted); }
.wrap.narrow { max-width: 920px; }
.biz-head { position: relative; display: flex; align-items: center; gap: 16px; padding: 22px 20px; border-radius: 20px; color: #fff; margin-bottom: 14px; box-shadow: var(--shadow); overflow: hidden; }
.biz-head img, .biz-head .ini { flex: none; width: 64px; height: 64px; border-radius: 18px; object-fit: cover; background: #fff; display: grid; place-items: center; color: #222; font: 800 28px Poppins, sans-serif; }
.biz-head h1 { margin: 0; font-size: 22px; }
.biz-head a { color: rgba(255, 255, 255, .8); font-size: 13px; word-break: break-all; }
.biz-head .badge { top: 14px; right: 14px; }
.alert { padding: 12px 14px; border-radius: 14px; margin-bottom: 14px; font-size: 14px; background: color-mix(in srgb, var(--bad) 12%, var(--card)); border: 1px solid color-mix(in srgb, var(--bad) 35%, transparent); }
.alert.soft { background: color-mix(in srgb, var(--warn) 12%, var(--card)); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.pkg-top .btn { flex: none; }
.recharge { margin: 4px 0 14px; padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--bg); display: grid; gap: 8px; }
.pkg.on { border-color: var(--accent); background: var(--accent-soft); }
.pay { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.pay p { margin: 8px 0; font-size: 14px; }
.pay-qr { width: 190px; height: 190px; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.pay-amt { font: 800 24px Poppins, sans-serif; }
.wrap-row { flex-wrap: wrap; }
@media (max-width: 640px) {
  .req { flex-direction: column; align-items: stretch; }
  .biz-head { flex-wrap: wrap; padding-top: 44px; }
  .brand-sub { display: none; }
  .pay { justify-content: center; text-align: center; }
}

/* ---------- mobile stability (29-Oct): no zoom on focus (inputs >= 16px), no double-tap zoom, no sideways drift ---------- */
html, body { overflow-x: clip; }
html, body { touch-action: pan-x pan-y; } /* no pinch / double-tap zoom (owner: "zoom in out fix") */
@media (max-width: 820px) {
  input:not([type=checkbox]):not([type=range]):not([type=color]), select, textarea, .search { font-size: 16px; }
}
.ed-main, .editor > *, .grid2 > *, .qr-wrap > *, .tiles > *, .cards > * { min-width: 0; }
.linkbox code, .ed-head a, .biz-head a { overflow-wrap: anywhere; }

/* ---------- pricing manager (2-Nov) ---------- */
.pp-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.pp-sticky { position: sticky; top: 70px; display: grid; gap: 10px; padding: 16px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); max-height: calc(100vh - 160px); overflow: auto; }
.pp-errors { display: grid; gap: 4px; padding: 10px 12px; border-radius: 12px; font-size: 13px; color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, transparent); }
.pp-list { display: grid; gap: 12px; }
.pp-plan { padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--bg); }
.pp-plan.off { opacity: .6; }
.pp-plan-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pp-preview { display: grid; gap: 12px; }
.pp-preview .plan { position: relative; padding: 20px 14px 16px; border-radius: 18px; text-align: center; background: var(--card); border: 1.5px solid var(--line); display: flex; flex-direction: column; gap: 3px; }
.pp-preview .plan.pop { border-color: var(--accent); box-shadow: 0 16px 34px -22px var(--accent); }
.pp-preview .ribbon { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); padding: 3px 11px; border-radius: 999px; font-size: 11px; font-weight: 700; color: #fff; white-space: nowrap; background: linear-gradient(135deg, var(--accent-2), #ff4d6d); }
.pp-preview .pl-name { font: 700 12px Poppins, sans-serif; letter-spacing: 1px; text-transform: uppercase; color: var(--accent); }
.pp-preview .pr-rev { font: 700 14px Poppins, sans-serif; }
.pp-preview .pr-row { display: flex; gap: 8px; justify-content: center; align-items: baseline; }
.pp-preview .pr { font: 800 26px Poppins, sans-serif; }
.pp-preview .pr-was { color: var(--muted); }
.pp-preview small { color: var(--muted); }
.pp-preview .pl-desc { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.pp-preview .pl-feat { list-style: none; margin: 8px 0 0; padding: 8px 0 0; border-top: 1px dashed var(--line); text-align: left; display: grid; gap: 4px; font-size: 13px; }
.pp-preview .pl-feat li::before { content: "✓ "; color: var(--ok); font-weight: 800; }
.pp-preview .btn { margin-top: 10px; pointer-events: none; }
.pkg-badge { font-size: 10.5px; font-weight: 700; color: var(--accent); }
@media (max-width: 1100px) { .pp-grid { grid-template-columns: 1fr; } .pp-sticky { position: static; max-height: none; } }
@media (max-width: 640px) { .grid3 { grid-template-columns: 1fr; } }

/* ---------- enquiries (2-Nov) ---------- */
.nbadge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: inline-grid; place-items: center; font-size: 11px; font-weight: 800; color: #fff; background: var(--bad); }
.seg { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.seg button { border: 0; background: none; color: var(--muted); padding: 7px 12px; border-radius: 9px; font: 600 13.5px Inter, sans-serif; cursor: pointer; }
.seg button.on { background: var(--accent); color: #fff; }
.leads { display: grid; gap: 12px; }
.lead { display: grid; gap: 10px; padding: 16px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.lead.new { border-left: 4px solid var(--bad); }
.lead.done { opacity: .72; }
.lead-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.lead-top b { font-size: 16px; }
.lead-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13.5px; }
.lead-msg { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--bg); font-size: 14px; white-space: pre-line; overflow-wrap: anywhere; }
.lead-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lead-actions select { width: auto; padding: 6px 10px; }
.pill-status.contacted { background: color-mix(in srgb, #3b82f6 18%, transparent); color: #3b82f6; }

/* ---------- bills, alerts, reply helper (2-Nov) ---------- */
.top-actions { flex-wrap: wrap; justify-content: flex-end; }
.bills { display: grid; gap: 10px; }
.bill-total { display: flex; justify-content: space-between; padding: 4px 4px 8px; }
.bill-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: center; padding: 14px 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.bill-row.unsent { border-left: 4px solid var(--warn); }
.bill-row > .inline { grid-column: 1 / -1; }
.bill-amt { font: 800 18px Poppins, sans-serif; }
.alert-expired, .alert-empty { border-left: 4px solid var(--bad); }
.alert-low, .alert-expiring { border-left: 4px solid var(--warn); }
.rh { display: grid; gap: 10px; }
.rh-row { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: center; }
.rh-stars { display: inline-flex; gap: 2px; }
.rh-stars button { border: 0; background: none; font-size: 26px; line-height: 1; color: var(--line); cursor: pointer; padding: 2px; }
.rh-stars button.on { color: #ffb400; }
.rh-out { display: grid; gap: 10px; }
.rh-card { display: grid; gap: 6px; padding: 14px; border-radius: 14px; background: var(--bg); border: 1px dashed var(--line); }
.rh-card p { margin: 0; white-space: pre-line; }
.rh-card .btn { justify-self: start; }
@media (max-width: 720px) {
  .rh-row { grid-template-columns: 1fr; }
  .top { flex-wrap: wrap; }
  .top-actions { width: 100%; justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
}

/* account dialog: password + devices */
dialog.modal { width: min(440px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow: auto; padding: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--card); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .55); }
dialog.modal::backdrop { background: rgba(10, 10, 14, .55); backdrop-filter: blur(3px); }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 14px 12px 18px; border-bottom: 1px solid var(--line); font-family: Poppins, Inter, sans-serif; }
.modal-body { padding: 14px 18px 18px; }
.modal-body h3 { margin: 4px 0 8px; font: 600 15px Poppins, Inter, sans-serif; }
.modal-body hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0 12px; }
.modal-body .row-between { flex-wrap: wrap; }
.pw-rules { list-style: none; padding: 0; margin: -2px 0 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px 10px; font-size: 13px; color: var(--muted); }
.pw-rules li::before { content: "○ "; }
.pw-rules li.ok { color: var(--ok); }
.pw-rules li.ok::before { content: "✓ "; }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.howto { margin-top: 12px; padding: 10px 14px; border: 1px dashed var(--line); border-radius: 12px; font-size: 14px; }
.howto summary { cursor: pointer; font-weight: 600; }
.howto ol { margin: 10px 0 6px; padding-left: 20px; display: grid; gap: 6px; }
.howto code { font-size: 13px; padding: 1px 6px; border-radius: 6px; background: var(--accent-soft); color: #7a3c00; word-break: break-word; }

/* pricing preview: same card as the home page */
.pp-preview .plan { text-align: left; gap: 5px; padding: 22px 16px 16px; }
.pp-preview .pl-top { display: grid; gap: 2px; justify-items: start; }
.pp-preview .pl-valid { margin-top: 4px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; color: var(--accent); background: var(--accent-soft); }
.pp-preview .pr-row { justify-content: flex-start; }
.pp-preview .pr-off { font-size: 12px; font-weight: 700; color: var(--ok); }
.pp-preview .pl-bonus { align-self: flex-start; padding: 4px 9px; border-radius: 9px; font-size: 12px; font-weight: 600; background: var(--accent-soft); border: 1px dashed var(--accent-2); color: #7a3c00; }
.pp-preview .pl-feat { list-style: none; margin: 10px 0 12px; padding: 10px 0 0; border-top: 1px dashed var(--line); display: grid; gap: 5px; font-size: 13px; }
.pp-preview .pl-feat li { position: relative; padding-left: 18px; }
.pp-preview .pl-feat li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 800; }
.pp-preview .pl-feat li.x { font-weight: 600; }
.pp-preview .plan .btn { width: 100%; justify-content: center; margin-top: auto; }
.offer-bar { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; padding: 10px 14px; border-radius: 14px; text-align: center; color: #fff; background: linear-gradient(120deg, var(--accent-2), var(--accent) 55%, #ff4d6d); }
.offer-bar span { font-size: 12.5px; padding: 2px 9px; border-radius: 999px; background: rgba(255, 255, 255, .2); }
.pkg small.pkg-valid { display: block; margin-top: 2px; font-size: 11.5px; color: var(--muted); }

/* plan & validity card (client dashboard + admin client page) */
.plan-box { margin: 0 0 16px; padding: 16px 18px; border-radius: 16px; border: 1px solid var(--line); background: linear-gradient(135deg, var(--accent-soft), var(--card) 70%); display: grid; gap: 12px; }
.plan-box.expired { background: color-mix(in srgb, var(--bad) 9%, var(--card)); border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }
.plan-box.soon { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.pb-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.pb-head small, .pb-dates small { display: block; font-size: 12px; color: var(--muted); }
.pb-name { font: 700 20px/1.25 Poppins, Inter, sans-serif; }
.pill-plan { flex: none; padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.pill-plan.soon { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.pill-plan.expired { background: color-mix(in srgb, var(--bad) 15%, transparent); color: var(--bad); }
.pill-plan.none { background: var(--line); color: var(--muted); }
.pb-dates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pb-dates b { font-size: 15px; }
.meter.time { margin: 0; height: 6px; }
.plan-box > .btn { justify-self: start; }
@media (max-width: 420px) { .pb-dates { grid-template-columns: 1fr 1fr; } .pb-dates > :last-child { grid-column: 1 / -1; } }
.pkg-valid { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.recharge .offer-bar { margin-bottom: 10px; }

/* Plans & validity list */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: 500 13px Inter, sans-serif; cursor: pointer; }
.chip.on { border-color: var(--accent); background: var(--accent-soft); color: #7a3c00; font-weight: 600; }
.plan-rows { display: grid; gap: 6px; }
.prow { display: grid; grid-template-columns: minmax(150px, 1.6fr) 1fr .8fr 1fr 1fr 1.1fr 78px; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font-size: 14px; }
.prow.head { border: 0; background: none; padding: 0 12px; font-size: 12px; font-weight: 600; color: var(--muted); }
.prow.expired { border-left: 4px solid var(--bad); }
.prow.soon { border-left: 4px solid var(--warn); }
.pr-client { display: flex; flex-direction: column; min-width: 0; text-decoration: none; color: inherit; }
.pr-client b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow .pill-plan { display: inline-block; font-size: 12px; }
.pr-act { text-align: right; }
.pad-s { padding: 8px 4px; }
.cc-plan { font-size: 12px; color: var(--muted); }
.cc-plan.expired { color: var(--bad); }
.cc-plan.soon { color: var(--warn); }
@media (max-width: 760px) {
  .prow.head { display: none; }
  .prow { grid-template-columns: 1fr 1fr; gap: 6px 12px; }
  .pr-client { grid-column: 1 / -1; }
  .prow > [data-l]::before { content: attr(data-l); display: block; font-size: 11px; color: var(--muted); }
  .pr-act { grid-column: 1 / -1; text-align: left; }
  .pr-act:empty { display: none; }
}
.pp-preview .pl-bonus { display: inline-flex; flex-wrap: wrap; gap: 2px 6px; }
.pp-preview .pl-bonus > * { white-space: nowrap; }
.pp-preview .pl-bonus > span { font-weight: 500; opacity: .85; }

.pp-preview .pr-rev.unl { background: linear-gradient(135deg, var(--accent-2), var(--accent) 55%, var(--accent-3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pb-unl { font-weight: 700; color: var(--accent); }

.legal-ed { margin-top: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.legal-ed summary { cursor: pointer; }
.legal-ed[open] summary { margin-bottom: 10px; }
.legal-text { font: 14px/1.55 Inter, sans-serif; }
