/* Same design as BridalIQ: colors, Manrope + IBM Plex Mono, dark left rail */
:root{
  --bg:#f5f4f7; --surface:#ffffff; --surface-2:#edebf1; --line:#d9d6e0; --line-strong:#b9b4c4;
  --fg:#1d1a24; --fg-2:#5a5566; --fg-3:#8a8498;
  --accent:#6b2d5c; --accent-soft:#f1e3ec; --accent-fg:#ffffff;
  --good:#1f7a4d; --good-soft:#dcf1e5; --warn:#a1620b; --warn-soft:#fbeccf; --crit:#b3261e; --crit-soft:#f9dcda;
  --rail:#231f2e; --rail-fg:#e9e5f0; --rail-dim:#9a93ad;
  --font-ui:"Manrope",system-ui,-apple-system,"Segoe UI",sans-serif;
  --font-num:"IBM Plex Mono",ui-monospace,SFMono-Regular,Menlo,monospace;
  --hour:56px;
}
@media (prefers-color-scheme: dark){ :root{
  --bg:#16131d; --surface:#1f1b28; --surface-2:#282333; --line:#352f42; --line-strong:#4a4359;
  --fg:#ece8f2; --fg-2:#b4adc2; --fg-3:#7f7890;
  --accent:#d08ab8; --accent-soft:#3a2435; --accent-fg:#16131d;
  --good:#5fcf93; --good-soft:#163726; --warn:#e8b35a; --warn-soft:#3b2d12; --crit:#ef7b73; --crit-soft:#431d1a;
  --rail:#0f0d14; --rail-fg:#e9e5f0; --rail-dim:#7f7890; color-scheme:dark }}
/* names used by the screens below */
:root{ --card:var(--surface); --ink:var(--fg); --muted:var(--fg-3); --soft:var(--surface-2); --ok:var(--good); --bad:var(--crit); --accent-ink:var(--accent-fg); }
* { box-sizing:border-box; }
html, body { margin:0; background:var(--bg); color:var(--ink); font:14px/1.45 var(--font-ui); }
button, input, select, textarea { font:inherit; color:inherit; }
input, select, textarea { width:100%; padding:9px 10px; border:1px solid var(--line); border-radius:8px; background:var(--card); }
textarea { min-height:70px; }
label { display:block; font-size:13px; color:var(--muted); margin:10px 0 4px; }
button { padding:8px 12px; border:1px solid var(--line); border-radius:8px; background:var(--card); cursor:pointer; white-space:nowrap; }
button:hover { border-color:var(--accent); }
button.primary { background:var(--accent); color:var(--accent-ink); border-color:var(--accent); font-weight:600; }
button.danger { color:var(--bad); }
button.link { border:0; background:none; color:var(--accent); padding:4px 6px; }
button.wide { width:100%; margin-top:14px; }
a { color:var(--accent); }
h1 { font-size:22px; margin:0 0 4px; } h2 { font-size:17px; margin:0; } h3 { font-size:15px; margin:0 0 8px; }
.hidden { display:none !important; }
.muted { color:var(--muted); } .pad { padding:16px; } .grow { flex:1; } .short { width:80px; }
.sub { color:var(--muted); margin:0 0 16px; font-size:14px; }
.card { background:var(--card); border:1px solid var(--line); border-radius:12px; padding:16px; }
.narrow { width:100%; max-width:380px; }
.center { min-height:100vh; display:grid; place-items:center; padding:16px; }
.msg { margin-top:12px; font-size:14px; color:var(--muted); min-height:20px; }
.row { display:flex; gap:8px; align-items:center; }
.row > input { flex:1; }

.shell { display:grid; grid-template-columns:220px 1fr; min-height:100vh; }
.rail { background:var(--rail); color:var(--rail-fg); padding:18px 12px 18px 16px; position:sticky; top:0; height:100vh; display:flex; flex-direction:column; gap:6px; overflow-y:auto; }
.brand { font-weight:800; font-size:16px; letter-spacing:-.01em; } .brand span { color:var(--accent); } .brand small { display:block; font-weight:500; color:var(--rail-dim); font-size:11px; letter-spacing:.06em; text-transform:uppercase; margin-top:2px; }
.store-name { font-size:15px; font-weight:700; margin:10px 0 12px; overflow-wrap:anywhere; }
nav#tabs { display:flex; flex-direction:column; gap:2px; }
.tab { display:flex; align-items:center; gap:8px; padding:9px 10px; border-radius:8px; color:var(--rail-fg); background:none; border:0; font-weight:600; font-size:13.5px; text-align:left; width:100%; }
.tab:hover { background:rgba(255,255,255,.06); border:0; }
.tab.on { background:rgba(255,255,255,.12); color:var(--rail-fg); }
.tab .ico { flex:none; display:inline-grid; place-items:center; width:26px; height:26px; border-radius:7px; background:color-mix(in srgb,var(--h) 16%,transparent); color:var(--h); }
.tab.on .ico { background:color-mix(in srgb,var(--h) 28%,transparent); }
.tab .ico svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; }
.tab.soon { opacity:.45; cursor:default; }
.rail-foot { margin-top:auto; font-size:11.5px; color:var(--rail-dim); line-height:1.5; }
.rail-foot button.link { color:var(--rail-dim); padding:0; }
.main { min-width:0; }
.topbar { display:flex; align-items:center; gap:10px; padding:20px 24px 4px; } .topbar h1 { font-size:22px; font-weight:800; letter-spacing:-.015em; margin:0; }
.eyebrow { font-size:11px; letter-spacing:.08em; text-transform:uppercase; color:var(--fg-3); font-weight:700; }
.num { font-family:var(--font-num); font-variant-numeric:tabular-nums; }
.kpis { display:grid; gap:14px; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); }
.kpi { display:flex; flex-direction:column; gap:4px; }
.kpi .label { font-size:12px; color:var(--fg-2); font-weight:600; }
.kpi .val { font-family:var(--font-num); font-size:22px; font-weight:600; letter-spacing:-.02em; }
.kpi .ctx { font-size:12px; color:var(--fg-3); }
.homegrid { display:grid; gap:14px; grid-template-columns:repeat(auto-fit,minmax(320px,1fr)); padding:16px 24px 40px; }
.card h2 { font-size:13px; font-weight:700; color:var(--fg-2); margin:0 0 10px; display:flex; justify-content:space-between; gap:8px; }
.rowlist { list-style:none; margin:0; padding:0; } .rowlist li { display:flex; gap:10px; align-items:center; padding:8px 0; border-bottom:1px solid var(--line); cursor:pointer; } .rowlist li:last-child { border-bottom:0; }
.rowlist .when { font-family:var(--font-num); font-size:12px; color:var(--fg-2); width:74px; flex:none; }
.pill.good { background:var(--good-soft); color:var(--good); } .pill.warn { background:var(--warn-soft); color:var(--warn); } .pill.crit { background:var(--crit-soft); color:var(--crit); } .pill.acc { background:var(--accent-soft); color:var(--accent); }

.bar { display:flex; gap:8px; align-items:center; padding:12px 16px; flex-wrap:wrap; }
.bar input[type=date] { width:auto; }
.bar input[type=search] { flex:1; min-width:160px; }
.note { margin:0 16px 8px; padding:8px 12px; border-radius:8px; background:var(--soft); color:var(--warn); }

/* Calendar grid: one column per fitting room */
.gridwrap { overflow:auto; padding:0 16px 24px; }
#grid { display:grid; position:relative; min-width:100%; }
.colhead { position:sticky; top:0; background:var(--bg); font-weight:600; font-size:13px; padding:6px 8px; border-bottom:1px solid var(--line); z-index:2; }
.times { position:relative; }
.time { height:var(--hour); font-size:12px; color:var(--muted); text-align:right; padding-right:8px; transform:translateY(-8px); }
.time:first-child { transform:none; }
.col { position:relative; border-left:1px solid var(--line); }
.slot { height:calc(var(--hour) / 4); border-bottom:1px dashed transparent; cursor:pointer; }
.slot:nth-child(4n) { border-bottom:1px solid var(--line); }
.slot:hover { background:var(--soft); }
.appt { position:absolute; left:3px; right:3px; border-radius:7px; padding:4px 6px; font-size:12px; overflow:hidden; cursor:pointer;
  background:var(--soft); border-left:4px solid var(--accent); line-height:1.25; }
.appt b { display:block; font-size:13px; }
.appt.tight { padding:2px 6px; white-space:nowrap; text-overflow:ellipsis; }
.appt.tight b { display:inline; margin-right:6px; }
.appt.s-checked_in { border-left-color:var(--warn); }
.appt.s-completed { border-left-color:var(--ok); opacity:.85; }
.appt.s-no_show, .appt.s-canceled { border-left-color:var(--bad); opacity:.55; text-decoration:line-through; }
.nowline { position:absolute; left:0; right:0; border-top:2px solid var(--bad); z-index:1; pointer-events:none; }

/* Customers */
.split { display:grid; grid-template-columns:minmax(260px, 360px) 1fr; min-height:calc(100vh - 60px); }
.listpane { border-right:1px solid var(--line); }
.list { list-style:none; margin:0; padding:0 8px 16px; }
.list li { padding:10px; border-radius:8px; cursor:pointer; }
.list li:hover, .list li.on { background:var(--soft); }
.list .meta { font-size:12px; color:var(--muted); }
.detailpane { padding:16px; display:flex; flex-direction:column; gap:14px; }
.kv { display:grid; grid-template-columns:repeat(auto-fill, minmax(200px, 1fr)); gap:4px 16px; }
table { width:100%; border-collapse:collapse; font-size:14px; }
th, td { text-align:left; padding:6px 8px; border-bottom:1px solid var(--line); vertical-align:middle; }
th { font-size:12px; color:var(--muted); font-weight:600; }
td select { padding:4px 6px; width:auto; }
tr.side th { padding-top:12px; }
.pill { display:inline-block; padding:1px 8px; border-radius:99px; background:var(--soft); font-size:12px; }
ul.plain { list-style:none; padding:0; margin:0 0 10px; }
ul.plain li { display:flex; gap:8px; align-items:center; padding:4px 0; }
.settings { display:grid; grid-template-columns:minmax(0,1fr); gap:14px; max-width:640px; }   /* a wide card scrolls inside itself, never the phone screen */

dialog { border:1px solid var(--line); border-radius:14px; padding:0; width:min(560px, calc(100vw - 32px)); background:var(--card); color:var(--ink); }
dialog::backdrop { background:rgba(0,0,0,.35); }
dialog form { padding:18px; }
.dlgbtns { display:flex; gap:8px; justify-content:flex-end; margin-top:16px; flex-wrap:wrap; }
.grid2 { display:grid; grid-template-columns:1fr 1fr; gap:0 12px; }
.choices { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.found { list-style:none; margin:6px 0 0; padding:0; max-height:180px; overflow:auto; border:1px solid var(--line); border-radius:8px; }
.found li { padding:8px 10px; cursor:pointer; } .found li:hover { background:var(--soft); }
.warn { color:var(--warn); font-size:13px; } .err { color:var(--bad); font-size:13px; min-height:18px; margin-top:8px; }
.toast { position:fixed; bottom:16px; left:50%; transform:translateX(-50%); background:var(--ink); color:var(--bg); padding:10px 16px; border-radius:10px; z-index:20; max-width:calc(100vw - 32px); }

@media (max-width: 820px) {
  .shell { grid-template-columns:1fr; }
  .rail { position:fixed; bottom:0; top:auto; left:0; right:0; height:auto; flex-direction:row; padding:6px 8px calc(6px + env(safe-area-inset-bottom,0px)); z-index:10; }
  .rail .brand, .rail .store-name, .rail-foot { display:none; }
  nav#tabs { flex-direction:row; width:100%; justify-content:space-around; }
  .tab { flex-direction:column; gap:2px; font-size:10.5px; padding:4px 2px; width:auto; }
  .tab.soon { display:none; }
  .main { padding-bottom:calc(84px + env(safe-area-inset-bottom,0px)); }   /* the fixed bottom bar (about 64px) never covers the last card */
  .split { grid-template-columns:1fr; }
  .listpane { border-right:0; }
  .split.showing .listpane { display:none; }
  .split:not(.showing) .detailpane { display:none; }
  .grid2 { grid-template-columns:1fr; }
  .who #storeName { display:none; }
}
.row > input.short { flex:0 0 80px; }
button.link.danger { color:var(--bad); }

.shade { position:absolute; left:0; right:0; pointer-events:none; z-index:0; }
.shade.closed { background:repeating-linear-gradient(45deg, var(--soft), var(--soft) 6px, transparent 6px, transparent 12px); opacity:.9; }
.shade.blocked { background:repeating-linear-gradient(45deg, rgba(179,54,74,.10), rgba(179,54,74,.10) 6px, transparent 6px, transparent 12px); border-top:1px solid rgba(179,54,74,.35); }
.shade span { position:sticky; top:40px; display:inline-block; margin:4px 6px; font-size:11px; color:var(--bad); background:var(--card); padding:1px 6px; border-radius:6px; }
.appt { z-index:1; }
.avail { display:flex; flex-direction:column; gap:6px; max-height:180px; overflow:auto; }
.avrow { display:flex; gap:8px; align-items:flex-start; }
.avtimes { display:flex; flex-wrap:wrap; gap:4px; }
.avroom { font-size:12px; color:var(--muted); width:90px; flex:none; padding-top:4px; }
.chip { padding:3px 8px; font-size:12px; border-radius:99px; }
.chip.on { background:var(--accent); color:var(--accent-ink); border-color:var(--accent); }
#hoursList li { flex-wrap:wrap; }
@media (max-width: 820px) {
  .kpis { grid-template-columns:repeat(3, minmax(0,1fr)); gap:12px 8px; }
  .kpi .val { font-size:19px; }
  .topbar, .homegrid { padding-left:12px; padding-right:12px; }
  #home .pad { padding-left:12px !important; padding-right:12px !important; }
  .homegrid { grid-template-columns:1fr; }
}

.kanban { display:grid; grid-template-columns:repeat(5, minmax(220px, 1fr)); gap:12px; padding:0 16px 32px; overflow-x:auto; align-items:start; }
.kcol { background:var(--surface-2); border-radius:12px; padding:10px; min-height:120px; }
.kcol h3 { font-size:12px; letter-spacing:.06em; text-transform:uppercase; color:var(--fg-2); display:flex; justify-content:space-between; margin:2px 4px 10px; }
.kcard { background:var(--surface); border:1px solid var(--line); border-radius:10px; padding:10px; margin-bottom:8px; font-size:13px; cursor:pointer; }
.kcard.late { border-left:4px solid var(--crit); }
.kcard .who { font-weight:700; display:flex; gap:6px; align-items:center; }
.kcard .meta { color:var(--fg-3); font-size:12px; margin-top:2px; }
.kcard .flags { margin-top:6px; display:flex; flex-wrap:wrap; gap:4px; }
.kcard .acts { display:flex; gap:6px; margin-top:8px; align-items:center; }
.kcard .acts button { padding:4px 8px; font-size:12px; }
.kcol .poBar { margin:0 0 8px; }

/* ---------- BridalIQ screens (Reports, consultant dashboard, daily tracker): BridalIQ's own styles, kept inside .biq ---------- */
.biq { --radius:12px; --shadow:0 10px 40px rgba(20,10,30,.18); }
.biq .card h2 { display:block; font-size:15px; font-weight:750; color:var(--fg); margin:0 0 12px; }
.biq .card h2 .sub { font-weight:500; color:var(--fg-3); font-size:12px; margin:0; }
.biq .ht { display:inline-flex; align-items:center; gap:8px; font-size:15px; font-weight:750; color:var(--fg); }
.biq .hico { flex:none; display:inline-grid; place-items:center; width:26px; height:26px; border-radius:7px; background:color-mix(in srgb,var(--h) 16%,transparent); color:var(--h); }
.biq .hico svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; }
.biq h2.zone { margin:18px 0 10px; font-size:15px; }
.biq .grid { display:grid; gap:14px; }
.biq .g-goals { grid-template-columns:repeat(2,minmax(0,1fr)); }
.biq .g-kpi { grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); }
.biq .card.kpi { padding:14px 16px; }
.biq .kpi .val small { font-size:12px; color:var(--fg-3); font-family:var(--font-ui); font-weight:500; }
.biq .minis { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.biq .minis>div { display:flex; flex-direction:column; gap:2px; } .biq .minis .label { font-size:12px; color:var(--fg-2); font-weight:600; } .biq .minis b { font-size:18px; }
.biq .tip { display:inline-grid; place-items:center; width:15px; height:15px; border-radius:999px; border:1px solid var(--line-strong); color:var(--fg-3); font-size:10px; font-weight:700; cursor:help; position:relative; vertical-align:1px; }
.biq .tip:hover::after, .biq .tip:focus::after { content:attr(data-tip); position:absolute; left:50%; bottom:calc(100% + 6px); transform:translateX(-50%); width:max-content; max-width:240px; white-space:normal; background:var(--fg); color:var(--bg); font-size:12px; font-weight:500; line-height:1.35; padding:7px 9px; border-radius:7px; z-index:30; text-align:left; text-transform:none; letter-spacing:0; }
.biq .bars { display:grid; grid-template-columns:minmax(64px,max-content) 1fr max-content; gap:7px 10px; align-items:center; font-size:13px; }
.biq .bar-row { display:contents; }
.biq .bar-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.biq .bar-track { display:block; height:10px; border-radius:999px; background:var(--surface-2); overflow:hidden; } .biq .bar-track i { display:block; height:100%; border-radius:999px; background:var(--accent); }
.biq .bar-val { white-space:nowrap; font-weight:650; }
.biq b.best { color:var(--good); }
.biq .pill { display:inline-block; font-size:11px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; padding:2px 8px; border-radius:999px; background:var(--surface-2); color:var(--fg-2); }
.biq .pill.lead { background:#e0f2fe; color:#075985; } .biq .pill.cb { background:#ede9fe; color:#5b21b6; }
@media (prefers-color-scheme:dark){ .biq .pill.cb { background:#3b2a6b; color:#ddd6fe; } .biq .pill.lead { background:#0c4a6e; color:#bae6fd; } }
.biq .list { display:flex; flex-direction:column; gap:6px; font-size:13px; padding:0; }
.biq .list .row { display:flex; justify-content:space-between; gap:10px; padding:6px 0; border-bottom:1px dashed var(--line); align-items:flex-start; }
.biq .list .row:last-child { border-bottom:0; }
.biq .list .row span:last-child { font-family:var(--font-num); white-space:nowrap; }
.biq .tabs { display:flex; gap:4px; flex-wrap:wrap; margin-bottom:12px; }
.biq .tabs button { border:1px solid var(--line); background:var(--surface); border-radius:999px; padding:5px 12px; font-size:12.5px; font-weight:600; color:var(--fg-2); }
.biq .tabs button.on { background:var(--accent); border-color:var(--accent); color:var(--accent-fg); }
.biq .tbl-wrap { overflow-x:auto; border:1px solid var(--line); border-radius:var(--radius); background:var(--surface); }
.biq table { width:100%; border-collapse:collapse; font-size:13px; }
.biq th { text-align:left; font-size:11.5px; font-weight:700; color:var(--fg-3); padding:8px 10px; border-bottom:1px solid var(--line); white-space:nowrap; }
.biq td { padding:8px 10px; border-bottom:1px solid var(--line); }
.biq tbody tr:last-child td { border-bottom:0; }
.biq td.num, .biq th.num { text-align:right; font-family:var(--font-num); }
.biq .empty { border:1px dashed var(--line-strong); border-radius:var(--radius); padding:18px; color:var(--fg-2); font-size:13px; }
.biq .note { margin:0 0 14px; background:var(--accent-soft); border-left:3px solid var(--accent); padding:10px 14px; border-radius:0 8px 8px 0; font-size:13px; color:var(--fg-2); }
.biq .note b { color:var(--fg); }
.biq .loading { color:var(--fg-3); font-size:13px; padding:14px; border:1px dashed var(--line); border-radius:8px; }
.biq .err { background:var(--crit-soft); border:1px solid var(--crit); color:var(--fg); border-radius:8px; padding:10px 14px; font-size:13px; margin:0 0 12px; min-height:0; }
.biq .filters { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-bottom:12px; }
.biq .filters select, .biq .filters input { width:auto; font-size:13px; padding:5px 8px; }
.biq label { margin:0; }
.biq .btn { border:1px solid var(--line-strong); background:var(--surface); border-radius:8px; padding:8px 12px; font-weight:600; font-size:13px; }
.biq .btn.small { padding:6px 10px; font-size:12.5px; } .biq .btn.primary { background:var(--accent); border-color:var(--accent); color:var(--accent-fg); }
.biq input.sm { width:auto; padding:5px 6px; }
.biq .dt-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-bottom:12px; }
.biq .dt-stats>div { border:1px solid var(--line); border-radius:10px; padding:10px 12px; }
.biq .dt-money { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin:0 0 12px; }
.biq .dt-money>div { background:var(--surface-2); border-radius:8px; padding:8px 10px; } .biq .dt-money .v { font-family:var(--font-num); font-size:17px; font-weight:600; }
.biq .dt-nav { display:flex; gap:6px; align-items:center; font-size:13px; flex-wrap:wrap; }
.biq .conslink { background:none; border:0; padding:0; margin:0; font:inherit; font-weight:700; color:inherit; cursor:pointer; text-align:left; text-decoration:underline dotted var(--line-strong); text-underline-offset:3px; }
.biq .conslink:hover { color:var(--accent); text-decoration-color:var(--accent); }
.biq .scrim { position:fixed; inset:0; background:rgba(0,0,0,.35); z-index:15; }
.biq .drawer { position:fixed; top:0; right:0; bottom:0; width:min(1180px,100%); background:var(--surface); border-left:1px solid var(--line); box-shadow:var(--shadow); z-index:20; overflow-y:auto; padding:18px 20px 32px; }
.biq .drawer .head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; margin-bottom:14px; }
.biq .drawer h2 { font-size:18px; font-weight:800; letter-spacing:-.01em; margin:0; }
.biq .xbtn { width:32px; height:32px; padding:0; flex:none; }
.biq .cdash-pick { display:flex; gap:10px; flex-wrap:wrap; margin:0 0 14px; }
.biq .cdash-pick label { display:flex; flex-direction:column; gap:4px; font-size:11px; letter-spacing:.06em; text-transform:uppercase; color:var(--fg-3); font-weight:700; }
.biq .cdash-pick select { min-width:120px; width:auto; font-size:14px; font-weight:600; color:var(--fg); }
.biq .cdash table { min-width:720px; }
.biq .cdash th { white-space:normal; line-height:1.25; vertical-align:bottom; }
.biq .cdash td { white-space:nowrap; padding:8px 12px; }
.biq .cdash th:first-child, .biq .cdash td:first-child { position:sticky; left:0; z-index:1; background:var(--surface); box-shadow:inset -1px 0 0 var(--line); }
.biq .cdash tr.cd-store td { color:var(--fg-2); font-weight:600; }
.biq .cdash tr.cd-you td { background:var(--accent-soft); font-weight:700; color:var(--fg); }
.biq .cdash tr.cd-gap td { padding:5px 0; }
.biq .cdash tr.cd-none td { color:var(--fg-3); }
.biq .cdash .rowlbl { font-family:var(--font-ui); min-width:120px; }
.biq .cdash tr.cd-store .rowlbl { font-size:11px; letter-spacing:.06em; text-transform:uppercase; color:var(--fg-3); }
.biq .sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.reports-pad { padding:12px 24px 40px; }
@media (max-width:820px){ .reports-pad { padding:12px 12px 90px; } }
@media (max-width:700px){ .biq .g-goals { grid-template-columns:1fr; } .biq .dt-stats, .biq .dt-money, .biq .minis { grid-template-columns:repeat(2,minmax(0,1fr)); } }
.biq [hidden] { display:none !important; }
.biq .pill.good { background:var(--good-soft); color:var(--good); } .biq .pill.warn { background:var(--warn-soft); color:var(--warn); } .biq .pill.crit { background:var(--crit-soft); color:var(--crit); } .biq .pill.acc { background:var(--accent-soft); color:var(--accent); }
/* BridalIQ: what needs me today */
.biq .drawer.narrow { width:min(640px,100%); }
.biq .drawer textarea { width:100%; min-height:70px; }
.biq .actions { display:flex; flex-direction:column; gap:8px; }
.biq .action { display:grid; grid-template-columns:auto 1fr auto; gap:12px; align-items:center; padding:12px; border:1px solid var(--line); border-radius:8px; background:var(--surface); text-align:left; width:100%; white-space:normal; }
.biq .action:hover { border-color:var(--line-strong); }
.biq .action .t { font-weight:600; min-width:0; } .biq .action .t small { display:block; font-weight:500; color:var(--fg-2); font-size:12.5px; margin-top:2px; }
.biq .action .amt { font-family:var(--font-num); font-weight:600; white-space:nowrap; text-align:right; }
.biq .sev { width:4px; align-self:stretch; border-radius:4px; background:var(--line-strong); }
.biq .sev.crit { background:var(--crit); } .biq .sev.warn { background:var(--warn); } .biq .sev.good { background:var(--good); }
.biq .stages { display:flex; gap:3px; }
.biq .stages i { width:14px; height:6px; border-radius:2px; background:var(--surface-2); border:1px solid var(--line); }
.biq .stages i.done { background:var(--good); border-color:var(--good); } .biq .stages i.now { background:var(--accent); border-color:var(--accent); } .biq .stages i.risk { background:var(--crit); border-color:var(--crit); }
.biq .sec { margin-top:16px; } .biq .sec h3 { font-size:12px; letter-spacing:.06em; text-transform:uppercase; color:var(--fg-3); margin-bottom:6px; } .biq .sec p { margin:0 0 6px; }
.biq .impact { display:flex; gap:16px; flex-wrap:wrap; background:var(--surface-2); border-radius:8px; padding:10px 14px; }
.biq .impact .lbl { font-size:11px; color:var(--fg-3); text-transform:uppercase; letter-spacing:.06em; } .biq .impact .v { font-family:var(--font-num); font-size:18px; font-weight:600; }
.biq .ev { overflow-x:auto; border:1px solid var(--line); border-radius:8px; } .biq .ev table { min-width:520px; font-size:12.5px; }
.biq .btns { display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }
.biq .ship { display:grid; grid-template-columns:auto 1fr auto; gap:12px; align-items:center; padding:12px; border:1px solid var(--line); border-radius:8px; background:var(--surface); }
.biq .ship.past { background:var(--crit-soft); } .biq .ship.soon { background:var(--warn-soft); }
.biq .ship .t { min-width:0; font-weight:600; } .biq .ship .t small { display:block; font-weight:500; color:var(--fg-2); font-size:12.5px; margin-top:2px; }
.biq .ship .clr { align-self:start; }
.biq .phones { display:block; color:var(--fg-2); margin-top:4px; }
.biq .todaybar { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:8px; margin-bottom:14px; }
.biq .today { display:flex; flex-direction:column; gap:2px; padding:10px 12px; border-radius:8px; text-decoration:none; color:var(--fg); border:1px solid var(--line); background:var(--surface); }
.biq .today.warn { background:var(--warn-soft); border-color:var(--warn); } .biq .today.crit { background:var(--crit-soft); border-color:var(--crit); }
.biq .today .n { font-size:20px; font-weight:600; letter-spacing:-.02em; } .biq .today .l { font-size:12px; color:var(--fg-2); }
.biq .allgood { display:flex; align-items:center; gap:10px; flex-wrap:wrap; background:var(--good-soft); border:1px solid var(--good); border-radius:8px; padding:8px 14px; margin-bottom:14px; font-size:13px; }
.biq .allgood b { color:var(--good); } .biq .allgood span { flex:1; min-width:200px; color:var(--fg-2); }
.biq .dot { width:8px; height:8px; border-radius:50%; background:var(--good); flex:none; }
.biq .steps-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:6px 14px; margin-top:10px; }
.biq .step { display:flex; gap:8px; align-items:baseline; font-size:13px; cursor:pointer; color:var(--fg); }
.biq .step input { width:auto; accent-color:var(--accent); }
.biq .step.done span { color:var(--fg-3); text-decoration:line-through; } .biq .step small { font-size:11px; }
.biq .confirm { font-size:13px; background:var(--surface); border:1px solid var(--line-strong); border-radius:8px; padding:10px 12px; max-width:320px; }
.biq .confirm textarea { width:100%; }
.biq .who { color:var(--fg-3); font-size:12px; }
.biq .leadbox { margin-top:10px; padding:10px 12px; border-radius:8px; background:var(--surface-2); font-size:12.5px; }
.biq .leadgrid { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:6px 14px; } .biq .leadgrid>div { display:flex; flex-direction:column; gap:1px; }
.biq h3 { font-size:14px; margin:0 0 8px; }
@media (max-width:600px){ .biq .ship { grid-template-columns:auto 1fr; } .biq .ship .clr { grid-column:2; } .biq .action { grid-template-columns:auto 1fr; } .biq .action .sev { grid-row:span 2; } .biq .action .amt { grid-column:2; text-align:left; white-space:normal; } }
@media (max-width:820px){ nav#tabs { overflow-x:auto; justify-content:flex-start; scrollbar-width:none; } nav#tabs::-webkit-scrollbar { display:none; } nav#tabs .tab { flex:0 0 auto; min-width:62px; } }
/* BridalIQ: vendor documents */
.biq tr.clickable { cursor:pointer; } .biq tr.clickable:hover td { background:var(--surface-2); }
.biq .field { display:flex; flex-direction:column; gap:4px; font-size:12.5px; color:var(--fg-2); font-weight:600; margin:0; }
.biq .field input, .biq .field select, .biq .field textarea { font-size:14px; font-weight:500; }
.biq .drop { display:flex; flex-direction:column; justify-content:center; border:2px dashed var(--line-strong); border-radius:var(--radius); padding:22px; text-align:center; background:var(--surface); color:var(--fg-2); cursor:pointer; margin:0; font-size:14px; }
.biq .drop.over { border-color:var(--accent); background:var(--accent-soft); } .biq .drop b { color:var(--fg); }
.biq .preview { width:100%; height:420px; border:1px solid var(--line); border-radius:8px; background:var(--surface-2); margin-top:12px; }
.biq .fgrid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
@media (max-width:600px){ .biq .fgrid { grid-template-columns:1fr; } .biq .preview { height:300px; } }
.biq .list.plainvals .row span:last-child { font-family:inherit; white-space:normal; text-align:right; }
.linkish { color:var(--accent); cursor:pointer; font-size:14px; }
@media (max-width:820px){ #railLogo { display:none !important; } }
.row > input[type=checkbox], .row > input[type=radio] { flex:0 0 auto; width:auto; }
.weekgrid { display:grid; grid-template-columns:repeat(7, minmax(140px, 1fr)); gap:8px; padding:0 16px 32px; overflow-x:auto; }
.wday { background:var(--surface-2); border-radius:10px; padding:8px; min-height:200px; }
.wday.today { outline:2px solid var(--accent); } .wday.closed { opacity:.6; }
.wday .wh { display:flex; gap:6px; align-items:baseline; margin:2px 2px 8px; cursor:pointer; } .wday .wh .muted { margin-left:auto; font-size:12px; }
.wappt { background:var(--surface); border:1px solid var(--line); border-left:3px solid var(--accent); border-radius:8px; padding:6px 8px; margin-bottom:6px; font-size:12.5px; cursor:pointer; }
.wappt .muted { font-size:11.5px; } .wappt.st-requested { border-left-color:var(--warn); } .wappt.st-completed { opacity:.7; border-left-color:var(--good); } .wappt.st-no_show { border-left-color:var(--crit); opacity:.7; }
@media (max-width:820px){ .weekgrid { grid-template-columns:1fr; } .wday { min-height:0; } }

/* Move over from BridalLive */
.impSteps { margin:6px 0 8px; padding-left:22px; }
.impSteps li { margin:0 0 8px; line-height:1.45; }
.impSteps li.done { color:var(--muted); }
.impSteps li.done b::before { content:'✓ '; color:var(--good); }
.impSteps .impDone { margin-left:6px; }
.impDrop { display:flex; flex-direction:column; align-items:center; gap:4px; padding:22px 12px; border:2px dashed var(--line-strong); border-radius:10px; text-align:center; cursor:pointer; color:var(--ink); background:var(--surface-2); }
.impDrop.over { border-color:var(--accent); background:var(--accent-soft); }
.impDrop input[type=file] { display:none; }
.impFile { margin:10px 0 0; color:var(--ink); background:var(--surface); border:1px solid var(--line); }

/* Customers part two: purchase history, merge preview, store switcher, history viewer */
.store-switch { margin:-6px 0 10px; background:rgba(255,255,255,.08); color:var(--rail-fg); border:1px solid rgba(255,255,255,.18); border-radius:8px; padding:6px 8px; font-weight:600; font-size:13px; }
.store-switch option { color:var(--fg); background:var(--surface); }
@media (max-width: 820px) { .rail .store-switch, .rail #swAddStoreRail { display:none; } }   /* phone: "Add a store" is in Settings > Store setup, not in the bottom bar */
.hist { display:flex; flex-direction:column; gap:8px; }
.hist-row { display:block; padding:10px 12px; border:1px solid var(--line); border-radius:10px; color:inherit; text-decoration:none; }
.hist-row:hover { background:var(--soft); }
.hist-items { display:flex; flex-direction:column; gap:2px; margin:6px 0 2px; font-size:13.5px; }
.hist-money { font-size:12.5px; min-height:4px; }
.mg-pair { display:grid; grid-template-columns:1fr auto 1fr; gap:10px; align-items:center; }
.mg-who { display:flex; flex-direction:column; gap:2px; padding:10px 12px; border:1px solid var(--line); border-radius:10px; margin-top:4px; }
.mg-arrow { font-size:22px; color:var(--accent); }
.dup { border:1px solid var(--line); border-radius:10px; padding:8px 10px; margin-bottom:8px; }
.dup-person { padding:4px 0; flex-wrap:wrap; }
.hv-filters { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-bottom:10px; }
.hv-filters input[type=search] { flex:1 1 200px; } .hv-filters select, .hv-filters input[type=date] { width:auto; }
.hv-row { border-bottom:1px solid var(--line); padding:6px 0; }
.hv-row summary { display:flex; gap:10px; flex-wrap:wrap; cursor:pointer; font-size:13.5px; }
.hv-when { color:var(--muted); min-width:150px; } .hv-id { font-family:var(--font-num); font-size:11.5px; }
.hv-tbl { font-size:12.5px; margin:6px 0; } .hv-tbl td { overflow-wrap:anywhere; }
/* Messages (Settings, customer profile) and the waitlist (Calendar) */
.msgStatus { display:flex; gap:6px; flex-wrap:wrap; margin:0 0 6px; }
.msgRow { border-top:1px solid var(--line); padding:10px 0; }
.msgRowHead { display:flex; gap:10px; align-items:center; flex-wrap:wrap; justify-content:space-between; }
.msgHelp { font-size:12.5px; margin:2px 0 4px; }
.msgSws { gap:16px; } .msgSw { margin:0; color:var(--fg); font-weight:500; }
.msgNum { gap:6px; } .msgNum input { width:72px; }
.msgWording { border-top:1px solid var(--line); padding-top:10px; } .msgWording summary { cursor:pointer; font-weight:600; }
.msgWording code { background:var(--surface-2); padding:0 4px; border-radius:4px; font-size:12px; }
.msgSend { display:flex; flex-direction:column; gap:6px; margin-bottom:10px; }
.msgList li { cursor:default; align-items:flex-start; } .msgList .when { width:110px; }
.msgPreview { display:block; font-size:12.5px; overflow-wrap:anywhere; }
.waitlistBox { padding:0 16px 24px; }
.waitlistBox summary { cursor:pointer; list-style:none; gap:8px; flex-wrap:wrap; } .waitlistBox summary::-webkit-details-marker { display:none; }
.wlOpening { margin-top:12px; padding:10px 12px; border-radius:10px; background:var(--warn-soft); }
.wlOpening .rowlist li { border-color:color-mix(in srgb, var(--warn) 25%, transparent); }
.wlTable { width:100%; margin-top:12px; border-collapse:collapse; } .wlTable th, .wlTable td { text-align:left; padding:6px 8px; border-bottom:1px solid var(--line); vertical-align:top; }
.wlActs { white-space:nowrap; text-align:right !important; }
@media (max-width:820px){ .wlTable thead { display:none; } .wlTable tr { display:block; border-bottom:1px solid var(--line); padding:6px 0; } .wlTable td { display:block; border:0; padding:2px 0; } .wlActs { text-align:left !important; } }

/* Working offline (offline.js): the rail indicator and the offline bar */
.netstate { display:flex; align-items:center; gap:8px; width:100%; margin:8px 0 4px; padding:8px 10px; border:1px solid rgba(255,255,255,.12); border-radius:8px; background:none; color:var(--rail-fg); text-align:left; font-size:12.5px; white-space:normal; }
.netstate:hover { border-color:var(--rail-dim); }
.netstate .dot { flex:none; width:9px; height:9px; border-radius:50%; background:var(--good); }
.netstate[data-state="off"] .dot { background:var(--crit); }
.netstate[data-state="sending"] .dot { background:var(--warn); animation:netpulse 1s ease-in-out infinite alternate; }
.netstate .tx { display:flex; flex-direction:column; } .netstate .t { font-weight:700; } .netstate .s { color:var(--rail-dim); font-size:11.5px; }
.netstate.look .s { color:var(--warn); }
@keyframes netpulse { from { opacity:1 } to { opacity:.35 } }
.offbar { position:sticky; top:0; z-index:20; padding:9px 16px; background:var(--warn-soft); color:var(--fg); border-bottom:1px solid var(--line); font-size:13.5px; }
.offbar .t { font-weight:700; color:var(--warn); }
.offlook li { display:block; padding:6px 0; border-bottom:1px solid var(--line); } .offlook li:last-child { border-bottom:0; }
@media (max-width: 820px) { .netstate { width:auto; flex:none; margin:0; padding:6px; border:0; } .netstate .tx { display:none; } }
/* Automations (Settings) and Tasks (Home, To do) */
.flList { list-style:none; margin:10px 0 0; padding:0; }
.flList li { display:flex; gap:12px; align-items:flex-start; padding:10px 0; border-top:1px solid var(--line); }
.flSentence { color:var(--fg-2); font-size:13px; margin-top:2px; }
.flMeta { font-size:12px; display:block; margin-top:2px; }
.flBtns { display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end; }
.flSw { display:flex; flex-direction:column; align-items:center; gap:2px; margin:2px 0 0; font-size:11.5px; min-width:34px; }
.flSw input { width:auto; }
dialog:has(.flEd) { width:min(760px, calc(100vw - 32px)); }
dialog:has(#pdLines) { width:min(820px, calc(100vw - 32px)); }   /* feat/po-intake: the PO draft lines */
.flPreview { background:var(--accent-soft); color:var(--accent); border-radius:8px; padding:8px 12px; font-size:13px; font-weight:600; margin:8px 0 4px; }
.flStep { border:1px solid var(--line); border-radius:10px; padding:10px 12px; margin:8px 0; background:var(--surface); }
.flStepHead { flex-wrap:wrap; }
.flNum { width:22px; height:22px; border-radius:50%; background:var(--soft); display:inline-grid; place-items:center; font-size:12px; font-weight:700; flex:none; }
.flChk { color:var(--ink); margin:6px 0 0; font-size:13px; }
.flChk input { width:auto; }
.flHint { font-size:12.5px; }
.flOnly summary, .flHist summary { cursor:pointer; color:var(--accent); margin-top:12px; }
.tkCard h2 { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.tkCard h2 .sub { margin:0; font-weight:400; }
.tkPad { padding-bottom:0 !important; }
.tkList li { cursor:pointer; }
.tkList .tkBox { width:auto; flex:none; }
.tkTitle { display:block; }
.tkMeta { font-size:12px; }
.tkDone .tkTitle { text-decoration:line-through; color:var(--muted); }
@media (max-width:820px){ .flList li { flex-wrap:wrap; } .flBtns { width:100%; justify-content:flex-start; } }
/* Phone width (390px): nothing scrolls sideways. A grid's automatic column grows to its widest child, so the settings
   column is told it may shrink; cards and dialogs may shrink too, and a table wider than its card scrolls inside it. */
.settings { grid-template-columns:minmax(0, 1fr); }
.settings > *, .card, .detailpane > * { min-width:0; }
@media (max-width: 820px) {
  .split { grid-template-columns:minmax(0, 1fr); }
  .card { overflow-x:auto; }
  .card > table, .card > .tablewrap { min-width:0; }
  .row { flex-wrap:wrap; }
}
/* Customers bar: with the managers' Duplicates button the search takes its own line and both buttons share the next one */
#customers .bar:has(#dupCust) #custSearch { flex:1 1 100%; }
#customers .bar:has(#dupCust) button { flex:1 1 0; white-space:nowrap; }
#customers .bar #newCust { order:2; }
/* Help links: "Help" in the rail foot, and the small "?" on busy screens (open /help/ in a new tab) */
.rail-foot a.helplink { color:var(--rail-dim); text-decoration:none; }
.rail-foot a.helplink:hover { color:var(--rail-fg); text-decoration:underline; }
a.helpq { display:inline-grid; place-items:center; width:22px; height:22px; flex:none; border-radius:50%; border:1px solid var(--line); background:var(--card); color:var(--muted); font-size:12.5px; font-weight:700; text-decoration:none; vertical-align:middle; line-height:1; }
a.helpq:hover { color:var(--accent); border-color:var(--accent); }
h1 a.helpq, h3 a.helpq { margin-left:6px; position:relative; top:-2px; }
/* Help on phones: the rail foot (with its Help link) is hidden there, so Help is the last tab in the bottom bar */
a.tab.phoneHelp { display:none; text-decoration:none; color:inherit; }
@media (max-width: 820px) { a.tab.phoneHelp { display:flex; } }
/* Quick view (the phone screens, public/phone.js): a rail tab on phones only; on a computer it opens from Settings > You */
.tab.phoneOnly { display:none; }
@media (max-width: 820px) { .tab.phoneOnly { display:flex; } }
/* feat/support-access: the BridalIQ support banner (every screen), the owner's request card, visits and the support page */
.supbar { position:sticky; top:0; z-index:21; display:flex; flex-wrap:wrap; gap:6px 12px; align-items:center; padding:9px 16px; background:var(--accent-soft); color:var(--fg); border-bottom:1px solid var(--line); font-size:13.5px; }
.supbar .t { font-weight:700; color:var(--accent); }
.supbar.me { background:var(--warn-soft); } .supbar.me .t { color:var(--warn); } .supbar button { padding:4px 10px; }
.supreq { margin:12px 24px 0; border-color:var(--accent); } .supreq .row select { width:auto; }
.supdiff { display:flex; flex-wrap:wrap; gap:4px 8px; font-size:13px; margin:2px 0 0 10px; overflow-wrap:anywhere; }
.supdiff .k { color:var(--fg-2); font-weight:600; } .supdiff .was { color:var(--crit); text-decoration:line-through; } .supdiff .now { color:var(--good); } .supdiff .arrow { color:var(--fg-3); }
.supchanges li, .supviews li, .suphealth li, #supportCard details li { display:block; padding:4px 0; border-bottom:1px solid var(--line); overflow-wrap:anywhere; }
.supadmin { display:grid; gap:14px; max-width:960px; } .supadmin .rowlist li { flex-wrap:wrap; cursor:default; }
.suphealth { margin-top:14px; border-top:1px solid var(--line); padding-top:10px; } .suphealth h4 { margin:12px 0 4px; font-size:13.5px; } .suphealth li { overflow-wrap:anywhere; font-size:13px; }
@media (max-width:820px){ .supreq { margin:12px 12px 0; } }

/* feat/demo-tour: the test drive banner, feedback, admin pages, and the guided tour's spotlight (public/demo.js, public/tour.js) */
.dtbar { position:sticky; top:0; z-index:22; display:flex; flex-wrap:wrap; gap:6px 10px; align-items:center; padding:8px 16px; background:var(--warn-soft); color:var(--fg); border-bottom:1px solid var(--line); font-size:13.5px; }
.dtbar b { color:var(--warn); } .dtbar button { padding:4px 10px; }
.dtstars, .dtswitch { border:0; padding:0; margin:10px 0 0; } .dtstars legend, .dtswitch legend { font-size:13px; color:var(--muted); margin-bottom:4px; padding:0; }
.dtstars { display:flex; gap:6px; flex-wrap:wrap; } .dtstars label { margin:0; display:inline-flex; align-items:center; gap:4px; border:1px solid var(--line); border-radius:8px; padding:6px 10px; cursor:pointer; color:var(--ink); }
.dtstars input { width:auto; margin:0; } .dtstars span[aria-hidden] { color:var(--warn); } .dtstars i { font-style:normal; font-weight:700; }
.dtstars label:has(input:checked) { border-color:var(--accent); background:var(--accent-soft); }
.dtswitch label { display:inline-flex; align-items:center; gap:4px; margin:0 14px 0 0; color:var(--ink); } .dtswitch input { width:auto; }
.sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.dtadmin { display:grid; gap:14px; max-width:1100px; } .dtadmin .tablewrap { overflow-x:auto; }
.dttable { width:100%; border-collapse:collapse; font-size:13px; } .dttable th, .dttable td { text-align:left; padding:7px 6px; border-bottom:1px solid var(--line); vertical-align:top; overflow-wrap:anywhere; }
.dtacts { display:flex; flex-wrap:wrap; gap:4px; } .dtacts button { padding:3px 8px; font-size:12.5px; }
.dtlink { margin-top:10px; } .dtlink .row { gap:6px; }
.dtstarsro { color:var(--warn); letter-spacing:1px; } .dtcomments li { display:block; padding:8px 0; border-bottom:1px solid var(--line); overflow-wrap:anywhere; }
.dttester { border-bottom:1px solid var(--line); padding:8px 0; } .dttester summary { cursor:pointer; overflow-wrap:anywhere; }
.tourbtn { padding:2px 0; font-weight:600; }
.tourlayer { position:fixed; inset:0; z-index:60; pointer-events:none; } .tourlayer.hidden { display:none; }
.tourhole { position:fixed; border-radius:10px; box-shadow:0 0 0 9999px rgba(10,8,16,.55); outline:3px solid var(--accent); transition:all .2s ease; pointer-events:none; }
.tourcard { position:fixed; pointer-events:auto; background:var(--card); color:var(--ink); border:1px solid var(--line-strong); border-radius:12px; padding:14px 16px; box-shadow:0 12px 40px rgba(0,0,0,.3); max-width:calc(100vw - 32px); }
.tourcard h3 { margin:2px 0 6px; font-size:16px; } .tourcard h3:focus { outline:none; } .tourcard p { margin:0 0 8px; }
.tourprog { font-size:12px; color:var(--muted); font-weight:600; letter-spacing:.03em; } .tourtry { color:var(--accent); font-weight:600; } .tourdone { color:var(--good); font-weight:700; }
.tourbtns { display:flex; gap:6px; align-items:center; margin-top:6px; }
.tourbtns .pulse { animation:tourpulse 1.2s ease-in-out 3; } @keyframes tourpulse { 50% { box-shadow:0 0 0 6px var(--accent-soft); } }
.tourarrow { position:absolute; width:14px; height:14px; background:var(--card); border:1px solid var(--line-strong); transform:rotate(45deg); }
.tourarrow.left { left:-8px; border-right:0; border-top:0; } .tourarrow.right { right:-8px; border-left:0; border-bottom:0; }
.tourarrow.top { top:-8px; border-right:0; border-bottom:0; } .tourarrow.bottom { bottom:-8px; border-left:0; border-top:0; } .tourarrow.hidden { display:none; }
.tourcard.bottom { left:12px !important; right:12px; bottom:12px; top:auto !important; width:auto !important; transform:none !important; max-height:55vh; overflow:auto; }
@media (prefers-reduced-motion: reduce) { .tourhole { transition:none; } .tourbtns .pulse { animation:none; } }
@media (max-width:820px){ .dtbar { padding:8px 12px; } .dtadmin { padding:12px; } }
/* feat/market-orders: the Market orders tab */
.mk-grid { display:grid; gap:12px; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); }
.mk-mcard { display:block; color:inherit; text-decoration:none; } .mk-mcard:hover { border-color:var(--accent); }
.mk-cols { display:grid; gap:14px; grid-template-columns:repeat(auto-fit,minmax(320px,1fr)); margin-top:14px; }
.mk-card { margin-bottom:14px; min-width:0; } .mk-cols .mk-card { margin-bottom:0; }
.mk-bars { display:grid; grid-template-columns:minmax(70px,max-content) 1fr max-content; gap:7px 10px; align-items:center; font-size:13px; }
.mk-row { display:contents; } .mk-name { overflow:hidden; text-overflow:ellipsis; } .mk-val { text-align:right; white-space:nowrap; }
.mk-track { display:block; height:10px; border-radius:999px; background:var(--surface-2); overflow:hidden; margin:6px 0 0; } .mk-bars .mk-track { margin:0; }
.mk-track i { display:block; height:100%; border-radius:999px; background:var(--accent); } .mk-track i.over { background:var(--crit); }
.mk-over { color:var(--crit) !important; }
.mk-dl { display:inline-flex; gap:6px; margin-top:8px; margin-right:6px; }
.mk-curve { display:flex; align-items:flex-end; gap:6px; height:150px; padding-top:8px; overflow-x:auto; }
.mk-col { flex:1 0 26px; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; height:100%; font-size:11.5px; }
.mk-col i { display:block; width:70%; min-height:4px; background:var(--accent); border-radius:5px 5px 0 0; } .mk-col b { font-weight:600; color:var(--fg-2); margin-top:4px; } .mk-col span { color:var(--fg-3); }
.mk-grid-t td { padding:3px 3px; } .mk-grid-t input, .mk-grid-t select { padding:5px 6px; font-size:13px; }
.mk-flags { margin:4px 0 8px; padding-left:18px; font-size:13px; } .mk-flags li.crit { color:var(--crit); } .mk-flags li.warn { color:var(--warn); }
.mk-chart svg { width:100%; height:auto; max-height:200px; } .mk-ax { font-size:10px; fill:var(--fg-3); }
.mk-ln { fill:none; stroke-width:2; } .mk-pt { stroke:var(--surface); stroke-width:1.5; }
.mk-ln.s0 { stroke:var(--accent); } .mk-pt.s0, .mk-legend i.s0 { fill:var(--accent); background:var(--accent); }
.mk-ln.s1 { stroke:var(--good); } .mk-pt.s1, .mk-legend i.s1 { fill:var(--good); background:var(--good); }
.mk-ln.s2 { stroke:var(--warn); } .mk-pt.s2, .mk-legend i.s2 { fill:var(--warn); background:var(--warn); }
.mk-ln.s3 { stroke:var(--crit); } .mk-pt.s3, .mk-legend i.s3 { fill:var(--crit); background:var(--crit); }
.mk-ln.s4 { stroke:var(--fg-2); } .mk-pt.s4, .mk-legend i.s4 { fill:var(--fg-2); background:var(--fg-2); }
.mk-ln.s5 { stroke:#0ea5e9; } .mk-pt.s5, .mk-legend i.s5 { fill:#0ea5e9; background:#0ea5e9; }
.mk-legend { display:flex; flex-wrap:wrap; gap:4px 12px; font-size:12px; color:var(--fg-2); } .mk-legend i { display:inline-block; width:10px; height:10px; border-radius:3px; margin-right:4px; vertical-align:-1px; }
@media (max-width:820px){ .mk-cols { grid-template-columns:1fr; } .mk-bars { grid-template-columns:minmax(60px,40%) 1fr max-content; } }

/* ---- feat/left-menu: the rail's screens open into their views (public/leftmenu.js) ---- */
.tab .chev { margin-left:auto; flex:none; width:22px; height:22px; border-radius:6px; display:none; place-items:center; position:relative; }
.tab.isgroup .chev { display:inline-grid; }
.tab .chev::before { content:""; width:6px; height:6px; border-right:2px solid currentColor; border-bottom:2px solid currentColor; transform:rotate(-45deg); transition:transform .15s; opacity:.75; }
.tab[aria-expanded="true"] .chev::before { transform:rotate(45deg); }
.tab .chev:hover { background:rgba(255,255,255,.12); }
.tab .gdot { display:none; width:7px; height:7px; border-radius:50%; background:#f0a53a; flex:none; margin-left:-4px; }
.tab.galert .gdot { display:inline-block; }
.tab:focus-visible, .subtab:focus-visible { outline:2px solid var(--rail-fg); outline-offset:-2px; }
.subtabs { display:flex; flex-direction:column; gap:1px; margin:1px 0 6px 22px; padding-left:10px; border-left:1px solid rgba(255,255,255,.16); }
.subtabs[hidden] { display:none; }
.subtab { display:flex; align-items:center; gap:8px; width:100%; padding:6px 8px; border:0; border-radius:7px; background:none; color:var(--rail-fg); opacity:.82; font-size:13px; font-weight:550; text-align:left; white-space:normal; line-height:1.3; }
.subtab:hover { background:rgba(255,255,255,.09); border:0; opacity:1; }
.subtab[aria-current="page"] { background:#f3e4ee; color:#2b1226; opacity:1; font-weight:750; box-shadow:inset 3px 0 0 #b0508f; }
.subtab .lbl { flex:1; min-width:0; overflow-wrap:anywhere; }
.subtab .mark { font-size:10px; font-weight:700; letter-spacing:.03em; text-transform:uppercase; border:1px solid currentColor; border-radius:99px; padding:0 6px; opacity:.75; }
.subtab .cnt { flex:none; min-width:20px; padding:0 6px; border-radius:99px; font-size:11.5px; font-weight:650; line-height:18px; text-align:center; background:rgba(255,255,255,.13); color:var(--rail-fg); }
.subtab .cnt[hidden] { display:none; }
.subtab .cnt.warn { background:rgba(240,165,58,.22); color:#f6c375; }
.subtab .cnt.crit { background:rgba(239,123,115,.26); color:#ffb4ae; }
.subtab[aria-current="page"] .cnt { background:rgba(43,18,38,.12); color:#2b1226; }
.subtab[aria-current="page"] .cnt.warn, .subtab[aria-current="page"] .cnt.crit { background:rgba(43,18,38,.14); color:#2b1226; }
.subtab.sub2, .subtabs .subtab[data-indent] { padding-left:20px; }
.menuBtn { display:none; }
.msheet[hidden] { display:none; }
.msheet { position:fixed; inset:0; z-index:40; }
.msheet-scrim { position:absolute; inset:0; background:rgba(10,8,16,.55); }
.msheet-panel { position:absolute; left:0; right:0; bottom:0; max-height:86vh; display:flex; flex-direction:column; background:var(--surface); color:var(--fg); border-radius:16px 16px 0 0; box-shadow:0 -8px 30px rgba(0,0,0,.35); padding-bottom:env(safe-area-inset-bottom,0px); }
.msheet-head { display:flex; align-items:center; justify-content:space-between; padding:12px 16px; border-bottom:1px solid var(--line); font-size:16px; }
.msheet-nav { overflow-y:auto; overflow-x:hidden; padding:8px 12px 16px; display:flex; flex-direction:column; gap:2px; }
.msheet-nav .tab { color:var(--fg); width:100%; flex-direction:row; font-size:15px; padding:11px 10px; gap:12px; min-height:44px; text-decoration:none; }
.msheet-nav .tab:hover { background:var(--surface-2); }
.msheet-nav .tab.on { background:var(--accent-soft); }
.msheet-nav .tab.phoneOnly, .msheet-nav a.tab.phoneHelp { display:flex; }
.msheet-nav .tab .chev:hover { background:none; }
.msheet-nav .tab.isgroup .chev { display:inline-grid; }
.msheet-nav .subtabs { border-left-color:var(--line); margin-left:24px; }
.msheet-nav .subtab { color:var(--fg); font-size:14.5px; padding:10px 10px; min-height:44px; opacity:1; }
.msheet-nav .subtab:hover { background:var(--surface-2); }
.msheet-nav .subtab[aria-current="page"] { background:var(--accent-soft); color:var(--fg); box-shadow:inset 3px 0 0 var(--accent); }
.msheet-nav .subtab .cnt { background:var(--surface-2); color:var(--fg-2); }
.msheet-nav .subtab .cnt.warn { background:var(--warn-soft); color:var(--warn); }
.msheet-nav .subtab .cnt.crit { background:var(--crit-soft); color:var(--crit); }
.msheet-nav .tab:focus-visible, .msheet-nav .subtab:focus-visible, #menuClose:focus-visible { outline:2px solid var(--accent); }
body.sheetOpen { overflow:hidden; }
.settings > .sg-off, .settings[data-paged] > :not([data-sg]) { display:none !important; }
@media (max-width:820px) {
  .rail .subtabs, .rail .tab .chev, .rail .tab .gdot { display:none !important; }
  .menuBtn { display:flex; flex:none; min-width:62px; flex-direction:column; align-items:center; gap:2px; font-size:10.5px; padding:4px 2px; width:auto; }
  nav#tabs { flex:1 1 0; min-width:0; width:auto; }
  .msheet-nav .tab .chev { display:inline-grid; }
}

/* Register stays in view when a long group (Reports) is open: the rail scrolls inside itself and Register pins to its top or bottom edge */
@media (min-width:821px) {
  .rail #tabs .tab[data-tab="register"] { position:sticky; top:0; bottom:0; z-index:2; background-color:var(--rail); box-shadow:0 -18px 0 var(--rail); }
  .rail #tabs .tab[data-tab="register"]:hover { background-image:linear-gradient(rgba(255,255,255,.06),rgba(255,255,255,.06)); }
  .rail #tabs .tab[data-tab="register"].on { background-image:linear-gradient(rgba(255,255,255,.12),rgba(255,255,255,.12)); }
}
/* feat/front-door: a visit waiting at the front */
.appt .fdWait { color: var(--warn); }
