/* Up Next — Slate Pro redesign (2026-10-14). Mock-faithful shell + pages. */
:root {
  color-scheme: dark;
  --red: #e8112d;
  --red-dark: #c20d24;
  --green: #22c55e;
  --ink: #eef0f3;
  --ink-dim: #9aa3ae;
  --line: rgba(255,255,255,.09);
  --panel: rgba(18,20,24,.8);
  --field: rgba(255,255,255,.05);
  --sidew: 238px;
}
[data-theme="light"] { color-scheme: light; }
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Manrope", -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #05060a;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button { font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 16px !important; }
[hidden] { display: none !important; }

/* ---------- shared controls ---------- */
.btn-primary { background: linear-gradient(180deg, #f5243c, #d30d24); color: #fff; border: 0; font-weight: 700; font-size: 15px; padding: 13px 18px; border-radius: 12px; cursor: pointer; box-shadow: 0 6px 20px rgba(232,17,45,.35), inset 0 1px 0 rgba(255,255,255,.35); }
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { opacity: .45; cursor: default; box-shadow: none; }
.btn-red { background: linear-gradient(180deg, #f5243c, #d30d24); color: #fff; border: 0; font-weight: 700; font-size: 13.5px; padding: 9px 15px; border-radius: 11px; cursor: pointer; box-shadow: 0 6px 20px rgba(232,17,45,.35), inset 0 1px 0 rgba(255,255,255,.35); white-space: nowrap; }
.btn-red:active { transform: scale(.97); }
.btn-ghost { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.14); color: var(--ink); font-weight: 600; font-size: 13.5px; padding: 9px 14px; border-radius: 11px; cursor: pointer; }
.btn-cancel { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.14); color: var(--ink); font-weight: 600; font-size: 14px; padding: 11px 18px; border-radius: 12px; cursor: pointer; }
.btn-small { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.15); color: var(--ink); font-weight: 600; font-size: 13px; padding: 8px 13px; border-radius: 10px; cursor: pointer; }
.btn-tiny { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.15); color: var(--ink); font-weight: 700; font-size: 12px; padding: 7px 11px; border-radius: 999px; cursor: pointer; }
.btn-tiny.btn-danger { color: #ff8a94; border-color: rgba(255,90,105,.4); }
.btn-danger-outline { background: transparent; border: 1px solid rgba(255,90,105,.5); color: #ff8a94; font-weight: 700; font-size: 13.5px; padding: 11px 16px; border-radius: 12px; cursor: pointer; }
.danger-text { display: block; margin: 14px auto 0; background: none; border: 0; color: #ff8a94; font-size: 14px; font-weight: 700; cursor: pointer; padding: 8px; }
.btn-back { background: rgba(10,11,16,.55); border: 1px solid var(--line); color: var(--ink); font-weight: 700; font-size: 13px; padding: 8px 14px; border-radius: 999px; cursor: pointer; margin-bottom: 12px; backdrop-filter: blur(8px); }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 11px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ink-dim); margin-bottom: 7px; }
.field input[type="text"], .field input[type="email"], .field input[type="password"], .field input[type="search"], .field select {
  width: 100%; background: var(--field); border: 1px solid rgba(255,255,255,.13); border-radius: 12px; padding: 12px; color: var(--ink); outline: 0;
}
.field input:focus, .field select:focus { border-color: rgba(232,17,45,.55); }
.sub { color: var(--ink-dim); font-size: 13.5px; line-height: 1.45; }
.auth-err { display: none; background: rgba(232,17,45,.13); border: 1px solid rgba(232,17,45,.4); color: #ffb3ba; font-size: 13.5px; font-weight: 600; padding: 10px 13px; border-radius: 11px; margin-bottom: 12px; }
.store-select { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.15); color: var(--ink); border-radius: 11px; padding: 9px 11px; font-weight: 600; max-width: 240px; }
.store-select.previewing { border-color: var(--red); color: #ffb3ba; }
.seg { display: inline-flex; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.13); border-radius: 999px; padding: 3px; gap: 3px; }
.seg button { border: 0; background: transparent; color: var(--ink-dim); font-weight: 700; font-size: 12.5px; padding: 6px 14px; border-radius: 999px; cursor: pointer; }
.seg button.on { background: var(--red); color: #fff; box-shadow: 0 3px 10px rgba(232,17,45,.4); }
.toggle { width: 50px; height: 29px; border-radius: 999px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.18); position: relative; cursor: pointer; flex: none; padding: 0; }
.toggle .knob { position: absolute; top: 2px; left: 2px; width: 23px; height: 23px; border-radius: 50%; background: #fff; transition: left .18s ease; }
.toggle.on { background: var(--red); border-color: var(--red); }
.toggle.on .knob { left: 23px; }
input[type="color"] { -webkit-appearance: none; appearance: none; width: 48px; height: 48px; padding: 0; border: 1px solid rgba(255,255,255,.28); border-radius: 13px; background: transparent; cursor: pointer; }
input[type="color"]::-webkit-color-swatch-wrapper { padding: 4px; }
input[type="color"]::-webkit-color-swatch { border: none; border-radius: 9px; }
input[type="color"]::-moz-color-swatch { border: none; border-radius: 9px; }
input[type="range"] { accent-color: var(--red); }

/* ---------- auth / join ---------- */
.auth-wrap { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 22px 16px; background: radial-gradient(120% 90% at 50% 0%, #141824 0%, #05060a 60%); }
.auth-card { width: min(430px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 26px 24px; backdrop-filter: blur(24px); box-shadow: 0 30px 80px rgba(0,0,0,.55); }
.auth-card .brand { display: flex; justify-content: center; margin-bottom: 8px; }
.auth-sub { color: var(--ink-dim); font-size: 14px; line-height: 1.5; text-align: center; }
.auth-link { display: block; margin: 14px auto 0; background: none; border: none; color: var(--ink-dim); font-size: 14px; font-weight: 600; cursor: pointer; padding: 4px 8px; text-decoration: underline; text-underline-offset: 3px; }
.auth-tabs { display: flex; background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin: 16px 0; }
.auth-tabs button { flex: 1; border: 0; background: transparent; color: var(--ink-dim); font-weight: 800; font-size: 14px; padding: 9px; border-radius: 999px; cursor: pointer; }
.auth-tabs button.active { background: var(--red); color: #fff; }
.auth-card .btn-primary { width: 100%; }
.logo-badge { display: inline-flex; align-items: center; background: #fff; border-radius: 10px; padding: 6px 10px; flex: none; }
.logo-badge img.logo { height: 38px; width: auto; display: block; }

/* ---------- top banner ---------- */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 11px 16px; background: rgba(5,6,10,.92); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.topbar .logo-badge { position: relative; z-index: 1; }
.hd-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.sync-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px rgba(34,197,94,.8); flex: none; }
.sync-dot.off { background: var(--red); box-shadow: 0 0 8px rgba(232,17,45,.8); }
.avatar-wrap { display: none !important; }

/* ---------- layout / sidebar ---------- */
.layout { position: relative; display: grid; grid-template-columns: 1fr; }
.side { display: none; }
.side-grip { display: none; }
.main { position: relative; min-height: calc(100dvh - 61px); }
#bg-layer { position: sticky; top: 0; height: 100dvh; margin-bottom: -100dvh; z-index: 0; background-size: cover; background-position: center; pointer-events: none; }
.view { position: relative; z-index: 2; }
.ctx { padding: 14px 16px 0; position: relative; z-index: 2; }
.ctx h1 { font-size: 21px; font-weight: 900; letter-spacing: -.3px; margin: 0; display: flex; align-items: center; gap: 11px; flex-wrap: wrap; text-shadow: 0 2px 18px rgba(0,0,0,.5); }
.ctx .live { display: inline-flex; align-items: center; gap: 6px; background: rgba(34,197,94,.16); border: 1px solid rgba(34,197,94,.45); color: #7ee2a8; font-size: 10px; font-weight: 900; letter-spacing: 1.6px; padding: 4px 9px; border-radius: 999px; text-shadow: none; }
.ctx .live i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); display: inline-block; }
/* Store-name plate (Jay 2026-10-14): the header always sits on a frosted
   plate so the store name stays readable over ANY background photo, in
   both themes (light theme overrides the plate color below). */
.ctx { background: rgba(9,10,13,.62); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding-bottom: 12px; border-radius: 0 0 18px 18px; }
.ctx-sub { margin-top: 8px; display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: #e6e9ed; flex-wrap: wrap; }
.avstack { display: inline-flex; }
.avstack .avatar { margin-left: -7px; border: 2px solid rgba(10,11,16,.9); }
.avstack .avatar:first-child { margin-left: 0; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: #5b5bd6; color: #fff; font-size: 10px; font-weight: 800; flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 76px; height: 76px; font-size: 26px; }

/* ---------- board ---------- */
.board-scroll { overflow-x: auto; padding-bottom: 110px; }
.board { display: flex; gap: 12px; padding: 14px 16px 26px; align-items: flex-start; }
.column { flex: 0 0 140px; width: 140px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 8px; backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
body.clear-cols .column { background: transparent; border-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; }
.col-head { display: flex; align-items: center; gap: 7px; padding: 4px 4px 10px; }
.col-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.col-title { font-size: 11px; font-weight: 800; letter-spacing: 1.1px; text-transform: uppercase; }
.col-count { margin-left: auto; background: rgba(255,255,255,.09); border-radius: 8px; font-size: 11.5px; font-weight: 800; padding: 2px 8px; }
.cards { display: flex; flex-direction: column; gap: 10px; min-height: 60px; }
.empty-hint { border: 1.5px dashed rgba(255,255,255,.22); border-radius: 12px; color: rgba(255,255,255,.55); font-size: 11.5px; font-weight: 600; text-align: center; padding: 16px 8px; line-height: 1.5; }
.repcard { position: relative; aspect-ratio: 1/1; border-radius: 14px; border: 1px solid rgba(255,255,255,.14); background: linear-gradient(160deg, #3a0a0a, #12090b 55%, #0b0b0d); overflow: hidden; cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: pan-y; }
.repcard:active { transform: scale(.985); }
.repcard.mine { box-shadow: inset 0 0 0 2px var(--red); }
.repcard.selected { box-shadow: 0 0 0 3px var(--red), 0 14px 34px rgba(232,17,45,.35); }
.repcard .cardbg { position: absolute; inset: 0; overflow: hidden; }
.repcard .cardbg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.repcard .scrim { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.88) 0%, transparent 48%); pointer-events: none; }
.next-badge { position: absolute; top: 8px; left: 8px; z-index: 3; background: var(--green); color: #052b12; font-size: 9px; font-weight: 900; letter-spacing: 1.2px; padding: 4px 9px; border-radius: 16px; }
.repcard .body { position: absolute; left: 0; right: 0; bottom: 0; padding: 9px 10px; z-index: 2; }
.repcard .name { font-size: 13.5px; font-weight: 800; letter-spacing: -.3px; color: var(--tc, #fff); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.repcard .status { font-size: 10.5px; font-weight: 600; color: rgba(255,255,255,.85); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.repcard .status:empty { display: none; }
.repcard .meta { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; padding: 3px 8px; background: rgba(0,0,0,.45); border-radius: 999px; font-size: 9.5px; font-weight: 800; color: #fff; }
.drag-src { opacity: .35; }
.drag-clone { position: fixed; z-index: 200; pointer-events: none; border-radius: 14px; box-shadow: 0 30px 60px rgba(0,0,0,.6); overflow: hidden; }
.drop-placeholder { border: 2px dashed rgba(232,17,45,.65); border-radius: 14px; background: rgba(232,17,45,.08); }
body.is-dragging { cursor: grabbing; }

/* ---------- action bar (tap-to-move) ---------- */
.actionbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 35; width: min(94vw, 530px); background: linear-gradient(180deg, rgba(26,29,38,.96), rgba(16,18,25,.97)); border: 1px solid rgba(255,255,255,.15); border-radius: 18px; box-shadow: 0 24px 54px rgba(0,0,0,.62), inset 0 1px 0 rgba(255,255,255,.14); padding: 11px; backdrop-filter: blur(20px); transition: transform .28s cubic-bezier(.22,1,.36,1); }
.actionbar .who { font-size: 13.5px; font-weight: 800; padding: 0 4px 9px; display: flex; align-items: center; gap: 8px; }
.actionbar .who button { margin-left: auto; background: none; border: 0; color: #9aa3ae; font-size: 16px; cursor: pointer; }
.actionbar .hint { font-size: 11.5px; color: var(--ink-dim); font-weight: 600; padding: 0 4px 9px; }
.actionbar .row { display: flex; gap: 7px; flex-wrap: wrap; }
.actionbar .row button { flex: 1; min-width: 100px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.15); color: var(--ink); font-weight: 700; font-size: 12.5px; padding: 10px 8px; border-radius: 11px; cursor: pointer; }
.actionbar .row button.primary { background: var(--red); border-color: var(--red); color: #fff; }

/* ---------- pages ---------- */
.page { max-width: 1060px; margin: 0 auto; padding: 18px 16px 130px; }
.page > h1 { font-size: 24px; font-weight: 900; letter-spacing: -.4px; margin: 2px 0 12px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 18px; margin-bottom: 16px; backdrop-filter: blur(24px); }
.panel h3, .dlg-h3 { font-size: 11px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; color: var(--ink-dim); margin: 0 0 14px; }
.actions { display: flex; align-items: center; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.actions-center { justify-content: center; }
.page-actions { max-width: none; }
.p-hero { text-align: center; }
.p-ava { display: flex; justify-content: center; margin-bottom: 10px; }
.p-hero h2 { font-size: 21px; font-weight: 900; margin: 0 0 4px; }
.p-sub { color: var(--ink-dim); font-size: 13px; margin-top: 2px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14.5px; font-weight: 600; }

/* store settings */
.bg-mode-row { display: flex; gap: 16px; margin-bottom: 14px; font-size: 14px; font-weight: 600; }
.bg-mode-row label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; font-size: 14.5px; font-weight: 600; }
#bg-stage { height: 180px; border-radius: 12px; overflow: hidden; position: relative; background: #000; touch-action: none; cursor: grab; margin: 10px 0; }
#bg-img { position: absolute; inset: 0; background-size: cover; background-position: center; }
.bg-thumb { height: 110px; border-radius: 12px; background-size: cover; background-position: center; margin-top: 10px; border: 1px solid var(--line); }
.crop-row { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.crop-row input[type="range"] { flex: 1; }
.crop-label { display: block; font-size: 12px; font-weight: 700; color: var(--ink-dim); margin-top: 12px; }
.photo-hint { font-size: 12.5px; color: var(--ink-dim); font-weight: 600; }
.store-static { font-size: 15px; font-weight: 700; padding: 10px 2px; }

/* team / requests / stores lists */
.store-list { display: flex; flex-direction: column; gap: 10px; }
.team-section { font-size: 11px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; color: var(--ink-dim); margin: 16px 0 2px; }
.team-row { display: flex; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 13px 14px; backdrop-filter: blur(24px); cursor: pointer; }
.team-avatar { width: 42px; height: 42px; border-radius: 50%; background: #3a4152; color: #fff; font-weight: 800; font-size: 14px; display: flex; align-items: center; justify-content: center; flex: none; }
.team-avatar.lead { background: #5b5bd6; }
.tinfo { flex: 1; min-width: 0; }
.trow1 { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.tname { font-size: 15px; font-weight: 800; }
.temail { font-size: 12.5px; color: var(--ink-dim); }
.trow2 { display: flex; align-items: center; gap: 8px; margin-top: 7px; flex-wrap: wrap; }
.role-pill { font-size: 10px; font-weight: 900; letter-spacing: .8px; text-transform: uppercase; background: rgba(255,255,255,.09); padding: 4px 9px; border-radius: 999px; }
.role-pill.lead { background: rgba(91,91,214,.35); }
.role-pill.manager { background: rgba(232,17,45,.25); }
.team-btns { display: flex; gap: 7px; flex-wrap: wrap; margin-left: auto; }
.mgr-picker { background: var(--panel); border: 1px solid rgba(232,17,45,.4); border-radius: 16px; padding: 16px; }
.mgr-filter { width: 100%; background: var(--field); border: 1px solid rgba(255,255,255,.13); border-radius: 11px; padding: 11px 12px; color: var(--ink); margin: 10px 0; }
.mgr-store-list { max-height: 260px; overflow: auto; display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.mgr-store-row { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; padding: 7px 9px; border-radius: 9px; cursor: pointer; }
.mgr-store-row:hover { background: rgba(255,255,255,.05); }
.store-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.store-top { display: flex; align-items: center; gap: 8px; }
.store-name { font-size: 13.5px; font-weight: 700; }
.req-row { display: flex; gap: 12px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 13px 14px; backdrop-filter: blur(24px); }
.req-info { flex: 1; min-width: 0; }
.req-name { font-size: 15px; font-weight: 800; }
.req-email, .req-store { font-size: 12.5px; color: var(--ink-dim); }
.req-actions { display: flex; gap: 8px; flex: none; }
.req-actions .btn-primary { padding: 10px 14px; font-size: 13.5px; }
#view-requests h4, #view-team h4 { margin: 18px 0 4px; font-size: 14px; }
.store-card { display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; backdrop-filter: blur(24px); }
.store-card .sc-name { font-size: 15.5px; font-weight: 800; }
.store-card .sc-sub { font-size: 12.5px; color: var(--ink-dim); margin-top: 2px; }
.store-card .sc-right { margin-left: auto; display: flex; align-items: center; gap: 9px; flex: none; }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--green); display: inline-block; }
.dot-off { width: 8px; height: 8px; border-radius: 50%; background: #565d68; display: inline-block; }
.chip { font-size: 10px; font-weight: 900; letter-spacing: .8px; text-transform: uppercase; background: rgba(255,255,255,.09); padding: 4px 9px; border-radius: 999px; }
.chip.warn { background: rgba(232,17,45,.22); color: #ffb3ba; }

/* card page (editor) */
.card-page .detail-wrap { max-width: 680px; margin: 0 auto; }
.card-page h2 { font-size: 24px; font-weight: 900; margin: 2px 0 4px; }
.photo-row { display: flex; justify-content: center; margin: 8px 0 16px; }
.card-preview { width: min(240px, 72vw); }
.bg-tabs { display: flex; background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 999px; padding: 4px; gap: 4px; }
.bg-tab { flex: 1; border: 0; background: transparent; color: var(--ink-dim); font-weight: 800; font-size: 13px; padding: 9px 6px; border-radius: 999px; cursor: pointer; }
.bg-tab.active { background: var(--red); color: #fff; }
.bg-panel { display: flex; gap: 12px; align-items: center; padding-top: 14px; flex-wrap: wrap; }
.col-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.col-picker button { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.13); color: var(--ink); font-weight: 700; font-size: 13.5px; padding: 12px; border-radius: 12px; cursor: pointer; text-align: left; }
.col-picker button.sel { border-color: var(--red); background: rgba(232,17,45,.12); }
.col-picker .cdot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.cwrap { position: relative; }
.cswatch { width: 48px; height: 48px; border-radius: 13px; border: 1px solid rgba(255,255,255,.28); cursor: pointer; padding: 0; }
.cpopup { position: absolute; z-index: 60; top: 56px; left: 0; width: 232px; background: #171a21; border: 1px solid rgba(255,255,255,.16); border-radius: 16px; padding: 14px; box-shadow: 0 24px 60px rgba(0,0,0,.6); }
.cpad { position: relative; height: 130px; border-radius: 11px; cursor: crosshair; margin-bottom: 12px; background: #888; }
.cpad::before { content: ""; position: absolute; inset: 0; border-radius: 11px; background: linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, transparent), hsl(var(--h, 0), 100%, 50%); z-index: 0; }
.cpad-dot { z-index: 1; }
.cpad-dot { position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.5); transform: translate(-50%, -50%); pointer-events: none; }
.chue { width: 100%; }
.cpresets { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 12px; }
.cpresets button { width: 26px; height: 26px; border-radius: 8px; border: 1px solid rgba(255,255,255,.25); cursor: pointer; padding: 0; }

/* sheets (member actions, confirms) */
.sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 40; backdrop-filter: blur(3px); }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; background: linear-gradient(180deg, #1b1e27, #13151d); border-top: 1px solid rgba(255,255,255,.14); border-radius: 22px 22px 0 0; padding: 12px 17px calc(18px + env(safe-area-inset-bottom)); max-width: 560px; margin: 0 auto; box-shadow: 0 -20px 50px rgba(0,0,0,.6); }
.sheet .grab { width: 40px; height: 4.5px; border-radius: 99px; background: rgba(255,255,255,.25); margin: 2px auto 14px; }
.sheet h3 { font-size: 17px; font-weight: 900; margin: 0 0 4px; }
.sheet .sub { margin-bottom: 12px; }
.sheet-act { display: block; width: 100%; text-align: left; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.11); color: var(--ink); font-size: 15px; font-weight: 700; padding: 14px 15px; border-radius: 13px; cursor: pointer; margin-bottom: 9px; }
.sheet-act.danger { color: #ff8a94; }
.sheet p.confirm-msg { font-size: 16px; font-weight: 600; line-height: 1.45; margin: 6px 0 18px; }

/* dialogs (delete account) */
dialog { border: 1px solid var(--line); background: #171a21; color: var(--ink); border-radius: 20px; padding: 0; max-width: min(480px, 92vw); box-shadow: 0 30px 80px rgba(0,0,0,.6); }
dialog::backdrop { background: rgba(0,0,0,.55); backdrop-filter: blur(3px); }
dialog .dlg { padding: 24px; }
dialog .dlg h2 { margin: 0 0 8px; font-size: 20px; font-weight: 900; }

/* toast */
.toast { position: fixed; left: 50%; bottom: calc(150px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(8px); z-index: 90; background: rgba(30,33,42,.97); border: 1px solid rgba(255,255,255,.18); color: #fff; font-size: 13.5px; font-weight: 600; padding: 11px 17px; border-radius: 999px; opacity: 0; pointer-events: none; transition: all .25s ease; white-space: nowrap; max-width: 92vw; box-shadow: 0 14px 34px rgba(0,0,0,.5); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: rgba(120,10,22,.97); }

/* mobile tab bar */
.mtabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; background: rgba(8,9,13,.92); border-top: 1px solid var(--line); backdrop-filter: blur(18px); padding: 8px 6px calc(10px + env(safe-area-inset-bottom)); }
.mtab { flex: 1; background: none; border: 0; color: #8b93a0; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10px; font-weight: 800; letter-spacing: .4px; cursor: pointer; padding: 4px 2px; position: relative; }
.mtab .mico { font-size: 19px; line-height: 1; display: flex; }
.mtab.active { color: #fff; }
.mtab.active .mico { color: var(--red); }
.mbadge { position: absolute; top: 0; right: calc(50% - 19px); background: var(--red); color: #fff; font-size: 9.5px; font-weight: 900; min-width: 17px; height: 17px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }

/* ---------- light theme ---------- */
/* One toggle flips EVERYTHING (Jay, 2026-10-14): the theme variables go
   light so every panel, page, sheet and pop-up follows, and the hard-coded
   dark surfaces get explicit white overrides below. Contrast-audited in
   both themes (verify_contrast.js). */
[data-theme="light"] { --ink: #14171c; --ink-dim: #4d5561; --line: rgba(20,20,40,.14); --panel: rgba(255,255,255,.88); }
[data-theme="light"] body { background: #e8ebef; color: #131519; }
[data-theme="light"] .topbar { background: rgba(255,255,255,.97); border-bottom-color: rgba(20,20,40,.1); }
[data-theme="light"] .column { background: rgba(255,255,255,.95); border-color: rgba(20,20,40,.1); backdrop-filter: none; -webkit-backdrop-filter: none; }
[data-theme="light"] .side { background: #ffffff; border-right-color: rgba(20,20,40,.1); }
[data-theme="light"] .nav-item { color: #2a2f38; }
[data-theme="light"] .nav-item:hover { background: rgba(20,20,40,.05); }
[data-theme="light"] .nav-item.on { background: rgba(20,20,40,.08); color: #131519; }
[data-theme="light"] .side-store { color: #2a2f38; }
[data-theme="light"] .side-store:hover { background: rgba(20,20,40,.05); }
[data-theme="light"] .side-store.on { background: rgba(20,20,40,.08); color: #131519; }
[data-theme="light"] .side-me-name { color: #131519; }
[data-theme="light"] .side-me-role { color: #5a6270; }
[data-theme="light"] #side-hide { color: #5a6270; }
[data-theme="light"] .side-grip::after { background: #ffffff; border-color: rgba(20,20,40,.18); color: #131519; }
[data-theme="light"] .panel, [data-theme="light"] .team-row, [data-theme="light"] .req-row, [data-theme="light"] .store-card, [data-theme="light"] .auth-card { background: rgba(255,255,255,.82); border-color: rgba(20,20,40,.1); color: #131519; }
[data-theme="light"] .ctx h1 { text-shadow: none; }
[data-theme="light"] .ctx-sub { color: #2a2f38; }
[data-theme="light"] .field input[type="text"], [data-theme="light"] .field input[type="email"], [data-theme="light"] .field input[type="password"], [data-theme="light"] .field input[type="search"], [data-theme="light"] .field select { background: rgba(255,255,255,.75); color: #131519; border-color: rgba(20,20,40,.15); }
[data-theme="light"] .store-select { background: rgba(255,255,255,.75); color: #131519; border-color: rgba(20,20,40,.15); }
[data-theme="light"] .sub, [data-theme="light"] .temail, [data-theme="light"] .req-email, [data-theme="light"] .req-store, [data-theme="light"] .store-card .sc-sub { color: #5a6270; }
[data-theme="light"] .mtabs { background: rgba(255,255,255,.92); border-top-color: rgba(20,20,40,.1); }
[data-theme="light"] .mtab { color: #6a7280; }
[data-theme="light"] .mtab.active { color: #131519; }
[data-theme="light"] .btn-back { background: rgba(255,255,255,.6); color: #131519; }
[data-theme="light"] .empty-hint { color: #4d5561; border-color: rgba(20,20,40,.35); }
[data-theme="light"] .chip { background: rgba(20,20,40,.08); }
[data-theme="light"] .chip.warn { background: rgba(232,17,45,.12); color: #b3001b; }
[data-theme="light"] .auth-err { background: rgba(232,17,45,.08); border-color: rgba(232,17,45,.35); color: #b3001b; }
[data-theme="light"] .seg { background: rgba(20,20,40,.06); border-color: rgba(20,20,40,.12); }
[data-theme="light"] .btn-ghost, [data-theme="light"] .btn-cancel, [data-theme="light"] .btn-small, [data-theme="light"] .btn-tiny { background: rgba(20,20,40,.05); border-color: rgba(20,20,40,.16); }
[data-theme="light"] .toggle { background: rgba(20,20,40,.16); border-color: rgba(20,20,40,.22); }
[data-theme="light"] .col-count { background: rgba(20,20,40,.08); }
[data-theme="light"] .store-row { background: rgba(20,20,40,.04); }
[data-theme="light"] .sheet { background: #ffffff; border-top-color: rgba(20,20,40,.12); color: #14171c; box-shadow: 0 -20px 50px rgba(15,20,30,.18); }
[data-theme="light"] .sheet .grab { background: rgba(20,20,40,.22); }
[data-theme="light"] .actionbar { background: #ffffff; border-color: rgba(20,20,40,.12); color: #14171c; box-shadow: 0 24px 54px rgba(15,20,30,.22); }
[data-theme="light"] .actionbar .row button { background: rgba(20,20,40,.05); border-color: rgba(20,20,40,.16); }
[data-theme="light"] .actionbar .row button.primary { background: var(--red); border-color: var(--red); color: #fff; }
[data-theme="light"] dialog { background: #ffffff; color: #14171c; border-color: rgba(20,20,40,.12); }
[data-theme="light"] .toast { background: rgba(255,255,255,.97); color: #14171c; border-color: rgba(20,20,40,.14); box-shadow: 0 14px 34px rgba(15,20,30,.18); }
[data-theme="light"] .toast.err { background: #fdecec; color: #b3001b; border-color: rgba(232,17,45,.3); }
[data-theme="light"] .ctx { background: rgba(255,255,255,.55); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding-bottom: 12px; border-radius: 0 0 18px 18px; }
[data-theme="light"] .ctx h1 { text-shadow: none; }
[data-theme="light"] .ctx-sub { text-shadow: none; }

/* ---------- desktop shell (>=900px) ---------- */
@media (min-width: 900px) {
  .layout { grid-template-columns: var(--sidew, 238px) 1fr; }
  body.side-closed .layout { grid-template-columns: 1fr; }
  body.side-closed .side { display: none; }
  .side { display: flex; flex-direction: column; gap: 4px; padding: 18px 12px; position: sticky; top: 61px; min-height: calc(100dvh - 61px); background: #07080c; border-right: 1px solid var(--line); z-index: 5; }
  .side-nav { display: flex; flex-direction: column; gap: 4px; }
  .nav-item { display: flex; align-items: center; gap: 11px; width: 100%; background: transparent; border: 0; color: #c8cdd5; font-size: 14px; font-weight: 700; padding: 11px 12px; border-radius: 12px; cursor: pointer; text-align: left; }
  .nav-item:hover { background: rgba(255,255,255,.05); }
  .nav-item.on { background: rgba(255,255,255,.09); color: #fff; }
  .nav-item .nico { width: 20px; text-align: center; font-size: 15px; }
  .nav-badge { margin-left: auto; background: var(--red); color: #fff; font-size: 10px; font-weight: 900; min-width: 18px; height: 18px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
  .side-h { font-size: 9.5px; font-weight: 800; letter-spacing: 1.6px; color: #69707c; margin: 18px 11px 7px; }
  .side-stores { display: flex; flex-direction: column; gap: 3px; }
  .side-store { display: flex; align-items: center; gap: 9px; width: 100%; background: transparent; border: 0; color: #c8cdd5; font-size: 12.5px; font-weight: 600; padding: 8px 11px; border-radius: 10px; cursor: pointer; text-align: left; }
  .side-store:hover { background: rgba(255,255,255,.05); }
  .side-store.on { background: rgba(255,255,255,.09); color: #fff; }
  .side-store .dot-live, .side-store .dot-off { flex: none; }
  #side-hide { margin-top: 14px; color: #9aa3ae; }
  .side-me { display: flex; align-items: center; gap: 10px; padding: 4px 11px; }
  .side-me-tx { display: flex; flex-direction: column; }
  .side-me-name { font-size: 13.5px; font-weight: 800; color: #fff; }
  .side-me-role { font-size: 11px; color: #9aa3ae; font-weight: 600; }
  .side-grip { display: block; position: absolute; top: 0; bottom: 0; left: var(--sidew, 238px); width: 20px; margin-left: -10px; z-index: 26; cursor: ew-resize; touch-action: none; background: transparent; }
  .side-grip::after { content: "‹"; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 18px; height: 52px; border-radius: 999px; background: #1b1e27; border: 1px solid rgba(255,255,255,.22); color: #e8ebef; font-size: 14px; font-weight: 800; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(0,0,0,.5); }
  body.side-closed .side-grip { left: 0; margin-left: 0; }
  body.side-closed .side-grip::after { content: "›"; }
  .topbar .logo-badge { position: absolute; left: calc(50% + (var(--sidew, 238px) / 2)); transform: translateX(-50%); transition: left .18s ease; }
  body.side-closed .topbar .logo-badge { left: 50%; }
  .topbar .logo-badge img.logo { height: 44px; }
  .topbar #store-select { display: none; }
  .mtabs { display: none !important; }
  .ctx { text-align: center; }
  .ctx h1 { justify-content: center; }
  .ctx-sub { justify-content: center; }
  .board { display: grid; grid-template-columns: repeat(4, minmax(200px, 257px)); justify-content: center; gap: 24px; max-width: 1460px; margin: 0 auto; padding: 18px 26px 40px; }
  .column { flex: none; width: auto; padding: 12px; }
  .cards { gap: 14px; }
  .board-scroll { overflow: visible; padding-bottom: 40px; }
  .page { max-width: none; padding: 26px 34px 90px; }
  .page > h1 { font-size: 27px; }
  #profBody, #setBody { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
  #profBody > *, #setBody > * { flex: 1 1 400px; min-width: 0; margin-bottom: 0; }
  #profBody > .wide { flex: 1 1 100%; }
  #setBody > * { flex: 1 1 100%; }
  #setBody .panel { padding: 24px 26px; }
  #setBody #bg-stage { height: 330px; border-radius: 16px; }
  .card-page .detail-wrap { max-width: none; display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
  .card-page .detail-wrap > * { flex: 1 1 400px; min-width: 0; }
  .card-page .detail-wrap > h2, .card-page .detail-wrap > .sub, .card-page .detail-wrap > .auth-err, .card-page .detail-wrap > .photo-row { flex: 1 1 100%; }
  .actionbar { top: 80px; bottom: auto; transform: translateX(-50%) translateY(-220px); }
  .actionbar.show { transform: translateX(-50%) translateY(0); }
  .toast { top: 132px; bottom: auto; }
  .sheet { left: 50%; right: auto; top: 50%; bottom: auto; transform: translate(-50%,-50%); width: min(520px, 92vw); border-radius: 22px; border: 1px solid rgba(255,255,255,.14); }
  .sheet .grab { display: none; }
}
@media (max-width: 899px) {
  .topbar #store-select { display: none; }
}
