/* Zonetide Desk: the team's back office. Desktop-first: sidebar + main + slide-in shop panel.
   Colors come from tokens.css (same as the app). Below 700px (max-width: 699px) the sidebar is hidden,
   each page title becomes a page menu (title switcher), and the shop panel covers the screen. */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
[hidden] { display: none !important; }
body { background: var(--soft); color: var(--fg); font-family: var(--font); font-size: 14px; line-height: 1.4; font-variant-numeric: tabular-nums; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

/* Shell */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; background: var(--bg); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 16px 12px; gap: 4px; }
.side .brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; font-weight: 800; font-size: 17px; }
.side .brand .mk { width: 32px; height: 32px; border-radius: 10px; background: var(--accent); color: var(--accent-fg); display: grid; place-items: center; flex: none; }
.side .brand small { display: block; font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.nav { width: 100%; min-height: 40px; border: 0; border-radius: 10px; background: transparent; display: flex; align-items: center; gap: 10px; padding: 0 10px; font-weight: 600; color: var(--muted); text-align: left; }
.nav:hover { background: var(--soft); color: var(--fg); }
.nav[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.nav .ct { margin-left: auto; min-width: 22px; height: 20px; border-radius: 10px; background: var(--accent); color: var(--accent-fg); font-size: 11px; font-weight: 800; display: grid; place-items: center; padding: 0 6px; }
.nav .ct:empty { display: none; }
.side .spacer { flex: 1; }
.me { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg); width: 100%; text-align: left; }
.me .m { display: flex; flex-direction: column; min-width: 0; }
.me .m span { font-size: 12px; color: var(--muted); }
.proto { font-size: 11px; color: var(--muted); padding: 8px 8px 0; }

.main { min-width: 0; padding: 24px 28px 60px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.head h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.head .sub { color: var(--muted); margin-top: 2px; }

/* Shared bits */
.btn { height: 38px; padding: 0 14px; border-radius: 10px; border: 0; background: var(--accent); color: var(--accent-fg); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; flex: none; }
.btn.ghost { background: var(--bg); color: var(--fg); border: 1.5px solid var(--line); }
.btn.quiet { background: var(--soft); color: var(--fg); }
.btn.sm { height: 32px; padding: 0 10px; font-size: 13px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.seg { display: inline-flex; background: var(--bg); border: 1.5px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { height: 36px; border: 0; border-radius: 7px; background: transparent; padding: 0 12px; font-weight: 600; color: var(--muted); font-size: 13px; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--ink-fg); }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; border-radius: 999px; padding: 0 9px; font-size: 12px; font-weight: 700; background: var(--soft); color: var(--muted); white-space: nowrap; }
.pill.new { background: var(--accent-soft); color: var(--accent); }
.pill.stuck { background: color-mix(in srgb, var(--warn) 14%, var(--bg)); color: var(--warn); }
.pill.help { background: color-mix(in srgb, var(--bad) 12%, var(--bg)); color: var(--bad); }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.open { background: color-mix(in srgb, var(--bad) 12%, var(--bg)); color: var(--bad); }
.pill.waiting { background: var(--soft); color: var(--muted); }
.pill.solved { background: var(--good-soft); color: var(--good); }
.who { width: 28px; height: 28px; border-radius: 14px; display: inline-grid; place-items: center; font-size: 11px; font-weight: 800; flex: none; color: #fff; }
.who.none { background: transparent; border: 1.5px dashed var(--line); color: var(--muted); }
.who.p { background: #1D4ED8; } .who.s { background: #0F766E; } .who.j { background: #B45309; }
.dot { width: 9px; height: 9px; border-radius: 5px; display: inline-block; flex: none; }
.dot.good { background: var(--good); } .dot.warn { background: var(--warn); } .dot.bad { background: var(--bad); } .dot.new { background: var(--accent); }
.bar { height: 6px; border-radius: 3px; background: var(--track); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.empty { border: 1.5px dashed var(--line); border-radius: 14px; padding: 28px; text-align: center; color: var(--muted); background: var(--bg); }
.link { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 700; }

/* Needs you */
.queue { display: flex; flex-direction: column; }
.qrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--bg); }
.qrow:first-child { border-radius: 14px 14px 0 0; } .qrow:last-child { border-bottom: 0; border-radius: 0 0 14px 14px; } .qrow:only-child { border-radius: 14px; }
.qrow .m { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.qrow .t1 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.qrow .t1 b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qrow .t1 .pill { flex: none; }
.qrow .sb { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qrow .acts { display: flex; gap: 8px; align-items: center; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.nfbar { margin: -6px 0 14px; justify-content: space-between; align-items: flex-start; }
.nfsel { display: flex; gap: 8px; flex: none; }
.frow2 { display: flex; gap: 6px; flex-wrap: wrap; }
.tchip { height: 36px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--bg); padding: 0 12px; font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.tchip span { color: var(--muted); font-weight: 700; font-size: 12px; }
.tchip[aria-pressed="true"] { background: var(--ink); color: var(--ink-fg); border-color: var(--ink); }
.tchip[aria-pressed="true"] span { color: inherit; opacity: .75; }
.nfbar select { height: 36px; }

/* Onboarding board */
.board { display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)) minmax(140px, .8fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.colm { background: var(--track); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 140px; }
.colm.over { outline: 2px dashed var(--accent); outline-offset: -2px; }
.colm h2 { font-size: 13px; font-weight: 800; display: flex; justify-content: space-between; padding: 2px 4px 4px; }
.colm h2 span { color: var(--muted); }
.ocard { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; text-align: left; width: 100%; cursor: grab; }
.ocard:hover { border-color: var(--accent); }
.ocard .t { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.ocard .t b { display: block; }
.ocard .t .st { color: var(--muted); font-size: 12px; display: block; }
.ocard .f { display: flex; justify-content: space-between; align-items: center; gap: 4px 8px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.ocard .f > span:first-child { white-space: nowrap; }
.ocard .nx { font-size: 12px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ocard .nx.late { color: var(--warn); font-weight: 700; }
.ocard.live { gap: 2px; padding: 8px 10px; }
.ocard.live .st { display: flex; align-items: center; gap: 5px; }

/* Onboarding Today list */
.ostrip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.ostrip .card { padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.ostrip b { font-size: 22px; }
.olist { overflow: hidden; margin-bottom: 12px; }
.oitem { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.oitem:last-child { border-bottom: 0; }
.oitem .t { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 2px; }
.olink { color: var(--fg); font-weight: 700; font-size: 15px; text-align: left; }
.olink:hover { color: var(--accent); }
.oitem .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.oitem a.btn { text-decoration: none; }
.sdots { display: inline-flex; gap: 3px; vertical-align: middle; margin-left: 4px; }
.sdots i { width: 8px; height: 8px; border-radius: 4px; background: var(--line); display: block; }
.sdots i.d { background: var(--good); }
.oauto { padding: 12px 16px; margin-bottom: 12px; }
.dayin { font-size: 12px; font-weight: 800; border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.dayin.ok { background: var(--good-soft); color: var(--good); }
.dayin.warn { background: color-mix(in srgb, var(--warn) 14%, var(--bg)); color: var(--warn); }
.dayin.bad { background: color-mix(in srgb, var(--bad) 12%, var(--bg)); color: var(--bad); }
.otime { padding: 12px 16px; }
.otime .r { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 4px; flex-wrap: wrap; }
.otime td:nth-child(2) { width: 30%; padding: 0 12px; }
.otime td:last-child { width: 1%; }
.tbar { display: block; height: 6px; border-radius: 3px; background: var(--track); overflow: hidden; }
.tbar i { display: block; height: 100%; border-radius: 3px; }
.tbar i.ok { background: var(--good); } .tbar i.warn { background: var(--warn); } .tbar i.bad { background: var(--bad); }
.oauto .r { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.oauto ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.head .toolbar { flex-wrap: wrap; }

/* Inbox */
.inbox { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 0; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; min-height: 560px; }
.tlist { border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.tlist .toolbar { padding: 10px; border-bottom: 1px solid var(--line); }
.trow { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line); background: var(--bg); text-align: left; width: 100%; }
.trow:hover { background: var(--soft); }
.trow[aria-current="true"] { background: var(--accent-soft); }
.trow .r1 { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.trow .r1 b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow .r2 { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow .r3 { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); }
.thread { display: flex; flex-direction: column; min-width: 0; }
.thead { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.thead h2 { font-size: 17px; }
.ctx { margin: 14px 18px 0; padding: 10px 12px; border-radius: 12px; background: var(--soft); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; font-size: 12px; }
.ctx div { display: flex; flex-direction: column; min-width: 0; }
.ctx b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctx span { color: var(--muted); }
.msgs { flex: 1; padding: 14px 18px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; max-height: 52vh; }
.msg { max-width: 78%; padding: 10px 12px; border-radius: 14px; background: var(--soft); align-self: flex-start; }
.msg.team { background: var(--accent); color: var(--accent-fg); align-self: flex-end; }
.msg.note { background: color-mix(in srgb, var(--warn) 12%, var(--bg)); border: 1px dashed var(--warn); align-self: stretch; max-width: none; }
.msg .by { font-size: 11px; font-weight: 700; opacity: .8; margin-bottom: 2px; }
.reply { border-top: 1px solid var(--line); padding: 12px 18px; display: flex; flex-direction: column; gap: 8px; }
.reply textarea { width: 100%; min-height: 70px; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px; background: var(--bg); resize: vertical; }
.reply .row { display: flex; gap: 8px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.reply select, .toolbar select, .toolbar input { height: 34px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--bg); padding: 0 8px; }
.toolbar input { min-width: 220px; flex: 1; height: 38px; }
.access { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); }

/* Calls */
.calls { display: grid; grid-template-columns: 300px minmax(0, 1fr) 220px; gap: 12px; align-items: start; }
.clistp { overflow: hidden; display: flex; flex-direction: column; max-height: calc(100vh - 130px); }
.clistp > .toolbar { flex-direction: column; align-items: stretch; }
.clistp .toolbar input { min-width: 0; flex: none; height: 38px; }
.clistp .frow2 { gap: 4px; }
.clistp .tchip { height: 32px; font-size: 12px; padding: 0 10px; }
.clistp { overflow-y: auto; }
.lrow { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line); background: var(--bg); text-align: left; width: 100%; }
.lrow:hover { background: var(--soft); }
.lrow[aria-current="true"] { background: var(--accent-soft); }
.lrow .r1 { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.lrow .r1 b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lrow .r2 { color: var(--muted); font-size: 12px; }
.cscreen { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.chead { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.chead h2 { font-size: 22px; }
.cdial { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.calbtn { height: 48px; font-size: 18px; padding: 0 18px; text-decoration: none; border-radius: 12px; }
.scrwrap { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.scrwrap > summary { font-weight: 800; cursor: pointer; padding: 4px 0; }
.scr p { margin: 6px 0; line-height: 1.5; }
.scr details { border-top: 1px solid var(--line); padding: 6px 0; }
.scr details summary { cursor: pointer; color: var(--accent); font-weight: 700; font-size: 13px; }
.cscreen textarea { width: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px; background: var(--bg); resize: vertical; }
.cbform { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; background: var(--soft); border-radius: 12px; padding: 10px; }
.cbform label { display: flex; flex-direction: column; gap: 4px; font-weight: 700; }
.cbform input { height: 38px; border: 1.5px solid var(--line); border-radius: 10px; padding: 0 8px; background: var(--bg); }
.cfoot { position: sticky; bottom: 0; background: var(--bg); margin: 0 -18px -16px; padding: 10px 18px 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; border-radius: 0 0 14px 14px; box-shadow: 0 -6px 14px -10px rgba(0,0,0,.25); }
.outs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ob { min-height: 44px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--bg); font-weight: 700; padding: 6px; }
.ob:hover { border-color: var(--accent); }
.ob.main { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.ob.bad { color: var(--bad); }
.ob:disabled { opacity: .4; cursor: not-allowed; }
.cstats { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.cstats h2 { font-size: 16px; }
.cgoal, .cnum { display: flex; flex-direction: column; gap: 4px; }
.cgoal b, .cnum b { font-size: 24px; }
.cgoal .link { align-self: flex-start; font-size: 12px; }
.cweek { display: flex; gap: 6px; align-items: flex-end; height: 64px; border-top: 1px solid var(--line); padding-top: 8px; }
.cweek span { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px; height: 100%; }
.cweek i { width: 100%; max-width: 18px; background: var(--accent); border-radius: 3px 3px 0 0; display: block; }
.cweek em { font-style: normal; font-size: 10px; color: var(--muted); }
.mapgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mapgrid label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.mapgrid select { height: 38px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--bg); padding: 0 6px; color: var(--fg); min-width: 0; }
.btn.danger { background: var(--bad); color: #fff; border-color: var(--bad); }

/* Centered dialog */
.dlg { position: fixed; z-index: 31; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 40px); overflow-y: auto; background: var(--bg); border-radius: 18px; box-shadow: 0 20px 50px rgba(0,0,0,.25); display: flex; flex-direction: column; }
#dlgScrim { z-index: 30; }
.dlghead { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 16px 18px 6px; }
.dlghead h2 { font-size: 19px; }
.dlgbody { padding: 6px 18px 18px; display: flex; flex-direction: column; gap: 12px; }

/* Shops table */
.tbl { width: 100%; border-collapse: collapse; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.tbl th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--bg); white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { cursor: pointer; }
.tbl tbody tr:hover td { background: var(--soft); }
.tbl .num { text-align: right; }
.tblwrap { overflow-x: auto; border-radius: 14px; }

/* Shops by category */
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.catcard { text-align: left; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; border: 1px solid var(--line); }
.catcard:hover { border-color: var(--accent); }
.catcard .cname { display: flex; flex-direction: column; gap: 2px; }
.catcard .cname b { font-size: 16px; }
.cic { width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.cbreak { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.cb { border-radius: 10px; padding: 6px 8px; display: flex; flex-direction: column; font-size: 11px; font-weight: 700; background: var(--soft); color: var(--muted); }
.cb b { font-size: 18px; color: var(--fg); }
.cb.risk:not(.zero) { background: color-mix(in srgb, var(--warn) 12%, var(--bg)); color: var(--warn); }
.cb.risk:not(.zero) b { color: var(--warn); }
.cb.live:not(.zero) { background: var(--good-soft); color: var(--good); }
.cb.live:not(.zero) b { color: var(--good); }
.cb.onb:not(.zero) { background: var(--accent-soft); color: var(--accent); }
.cb.onb:not(.zero) b { color: var(--accent); }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 4px; display: flex; gap: 6px; align-items: center; }
.crumbs .link { font-size: 13px; }
.shsec { margin-bottom: 18px; }
.shh { font-size: 15px; margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.shh span { font-size: 12px; color: var(--muted); }
.shh::before { content: ""; width: 10px; height: 10px; border-radius: 5px; background: var(--accent); }
.shh.live::before { background: var(--good); } .shh.risk::before { background: var(--warn); }

/* Shop panel */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 20; }
.panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--bg); z-index: 21; display: flex; flex-direction: column; box-shadow: -10px 0 30px rgba(0,0,0,.15); }
.phead { padding: 16px 18px 0; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--line); }
.phead .r { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.phead h2 { font-size: 20px; }
.phead .meta { color: var(--muted); }
.x { width: 38px; height: 38px; border-radius: 19px; border: 0; background: var(--soft); display: grid; place-items: center; flex: none; }
.ptabs { display: flex; gap: 2px; overflow-x: auto; }
.ptabs button { height: 40px; border: 0; background: none; padding: 0 12px; font-weight: 700; color: var(--muted); border-bottom: 2.5px solid transparent; white-space: nowrap; }
.ptabs button[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.pbody { flex: 1; overflow-y: auto; padding: 16px 18px 30px; display: flex; flex-direction: column; gap: 14px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.facts div { background: var(--soft); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; min-width: 0; }
.facts span { font-size: 11px; color: var(--muted); }
.facts b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grant { border-radius: 12px; padding: 10px 12px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.grant.on { background: var(--good-soft); color: var(--good); }
.grant.off { background: var(--soft); color: var(--muted); }
.grant b { color: inherit; }
.steps { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.step { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.step:last-child { border-bottom: 0; }
.step .ck { width: 24px; height: 24px; border-radius: 12px; border: 2px solid var(--muted); display: grid; place-items: center; flex: none; color: transparent; font-size: 13px; font-weight: 800; }
.step.done .ck { background: var(--good); border-color: var(--good); color: #fff; }
.step .m { flex: 1; min-width: 0; }
.step .m span { display: block; font-size: 12px; color: var(--muted); }
.tl { display: flex; flex-direction: column; }
.tli { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.tli .ic { width: 28px; height: 28px; border-radius: 14px; background: var(--soft); display: grid; place-items: center; flex: none; font-size: 13px; }
.tli .m { flex: 1; min-width: 0; }
.tli time { color: var(--muted); font-size: 12px; white-space: nowrap; }
.notebox { display: flex; gap: 8px; }
.notebox input { flex: 1; min-width: 0; height: 38px; border: 1.5px solid var(--line); border-radius: 10px; padding: 0 10px; background: var(--bg); }
.ro { border: 2px solid var(--warn); border-radius: 14px; overflow: hidden; }
.ro .rohead { background: color-mix(in srgb, var(--warn) 14%, var(--bg)); color: var(--warn); padding: 8px 12px; font-weight: 700; font-size: 12px; display: flex; justify-content: space-between; gap: 8px; }
.ro .robody { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.pat { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.pat div { border-radius: 8px; padding: 6px 2px; text-align: center; font-size: 11px; font-weight: 700; background: var(--soft); }
.pat div b { display: block; font-size: 10px; color: var(--muted); }
.mini { width: 100%; border-collapse: collapse; font-size: 13px; }
.mini td { padding: 6px 0; border-bottom: 1px solid var(--line); }
.mini td:last-child { text-align: right; color: var(--muted); }
.form { display: flex; flex-direction: column; gap: 10px; }
.form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.form input, .form textarea, .form select { border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--bg); font-weight: 500; color: var(--fg); font-size: 14px; }
.err { color: var(--bad); font-size: 13px; margin: 0; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--ink-fg); border-radius: 12px; padding: 10px 16px; font-weight: 600; z-index: 40; max-width: calc(100vw - 32px); box-shadow: 0 8px 24px rgba(0,0,0,.2); }

/* Phones and small windows */
/* New shops dropdown */
.grph .chev { margin-left: 4px; transition: transform .15s; flex: none; }
.grph .ct + .chev { margin-left: 6px; }
.grph[aria-expanded="false"] .chev { transform: rotate(-90deg); }
.grph[aria-expanded="false"] + .grpitems { display: none; }
.grph .ct { margin-left: auto; }
.grph .ct:empty + .chev { margin-left: auto; }
.grph.has-current { background: var(--accent-soft); color: var(--accent); }
.grpitems { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.grpitems .nav { padding-left: 38px; }
.navgrp { display: flex; flex-direction: column; }

/* Tablets and small laptop windows: keep the sidebar, tighten the busy pages */
@media (min-width: 700px) and (max-width: 1099px) {
  .shell { grid-template-columns: 200px minmax(0, 1fr); }
  .main { padding: 20px 18px 60px; }
  .calls { grid-template-columns: minmax(0, 1fr); }
  .calls.reading .clistp, .calls.reading .cstats { display: none; }
  .calls:not(.reading) .cscreen { display: none; }
  .calls .mobonly { display: inline-flex !important; align-self: flex-start; }
  .cstats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; }
  .cstats h2, .cweek { display: none; }
  .clistp { max-height: none; }
  .ostrip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inbox { grid-template-columns: 260px minmax(0, 1fr); }
  .ctx { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 699px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  /* No bottom bar: the sidebar leaves the layout and the page title opens the page menu instead. */
  .side { display: none; }
  /* Room for the last row above Safari's toolbar and the home indicator; no tab bar to clear. */
  .main { padding: 16px 16px calc(32px + env(safe-area-inset-bottom, 0px)); }
  .head h1 { font-size: 22px; }
  .qrow { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .qrow .sb { white-space: normal; }
  .nfsel { width: 100%; }
  .nfsel select { flex: 1; min-width: 0; }
  .inbox { grid-template-columns: minmax(0, 1fr); }
  .inbox.reading .tlist { display: none; }
  .inbox:not(.reading) .thread { display: none; }
  .ctx { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .msg { max-width: 90%; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board { grid-template-columns: repeat(6, 82vw); scroll-snap-type: x mandatory; }
  .colm { scroll-snap-align: start; }
  .mobhide { display: none; }
  .ostrip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .otime td:nth-child(2) { display: none; }
  .oitem { grid-template-columns: minmax(0, 1fr); }
  .oitem .acts { justify-content: flex-start; }
  .calls { grid-template-columns: minmax(0, 1fr); }
  .cfoot { padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
  .toast { bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
  .calls.reading .clistp, .calls.reading .cstats { display: none; }
  .calls:not(.reading) .cscreen { display: none; }
  .clistp { max-height: none; }
  .outs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mapgrid { grid-template-columns: minmax(0, 1fr); }
  .toolbar input { flex-basis: 100%; min-width: 0; }
}
@media (min-width: 700px) { .mobonly { display: none !important; } }

/* ---------- Phone page menu (title switcher). Desktop keeps the plain <h1> and the sidebar. ---------- */
.pgsw, .pgscrim, .pgmenu { display: none; }
@media (max-width: 699px) {
  .head h1 .pgtitle { display: none; }
  .pgsw { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin: -6px 0 -6px -8px; padding: 0 8px; border: 0; border-radius: 10px; background: transparent; color: var(--fg); font: inherit; font-weight: 800; letter-spacing: inherit; text-align: left; -webkit-tap-highlight-color: transparent; }
  .pgsw[aria-expanded="true"] { position: relative; z-index: 16; background: var(--bg); }
  .pgsw .pgchev { color: var(--muted); flex: none; transition: transform .15s; }
  .pgsw[aria-expanded="true"] .pgchev { transform: rotate(180deg); color: var(--fg); }
  .pgscrim { display: block; position: fixed; inset: 0; z-index: 15; background: color-mix(in srgb, var(--scrim) 40%, transparent); }
  .pgmenu { display: block; position: absolute; z-index: 16; left: 12px; width: min(300px, calc(100vw - 24px)); background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 6px; box-shadow: 0 16px 40px rgba(0, 0, 0, .18), 0 2px 6px rgba(0, 0, 0, .08); }
  .pgscrim[hidden], .pgmenu[hidden] { display: none; }
  .pgitem { width: 100%; min-height: 44px; border: 0; border-radius: 10px; background: transparent; display: flex; align-items: center; gap: 12px; padding: 0 12px; font-size: 15px; font-weight: 600; color: var(--fg); text-align: left; }
  .pgitem svg { color: var(--muted); flex: none; }
  @media (hover: hover) { .pgsw:hover { background: color-mix(in srgb, var(--soft) 70%, var(--line)); } .pgsw[aria-expanded="true"]:hover { background: var(--bg); } .pgitem:hover { background: var(--soft); } }
  .pgitem[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
  .pgitem[aria-current="page"] svg { color: var(--accent); }
  .pgitem:focus-visible { outline-offset: -2px; }
  .pgitem .ct { margin-left: auto; min-width: 22px; height: 20px; border-radius: 10px; background: var(--accent); color: var(--accent-fg); font-size: 11px; font-weight: 800; display: grid; place-items: center; padding: 0 6px; }
  .pgitem .ct:empty { display: none; }
  .pggrp { padding: 10px 12px 4px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
  .pgsep { height: 1px; background: var(--line); margin: 6px 4px; }

  /* Needs you type chips: one row that scrolls sideways instead of wrapping. */
  .nfbar .frow2 { flex: 1 1 100%; min-width: 0; flex-wrap: nowrap; overflow-x: auto; margin: -5px -16px; padding: 5px 16px; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); }
  .nfbar .frow2::-webkit-scrollbar { display: none; }
  .nfbar .tchip { flex: none; white-space: nowrap; }
}

/* ---------- Workshops ---------- */
.wsh2 { font-size: 15px; font-weight: 800; margin: 22px 0 10px; }
.wssess { margin-bottom: 14px; overflow: hidden; }
.wssess.soon { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.wshd { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; background: var(--soft); border-bottom: 1px solid var(--line); }
.wshd > div:first-child { display: flex; flex-direction: column; gap: 2px; }
.wshd .acts { display: flex; gap: 8px; align-items: center; }
.wssoon { color: var(--accent); }
.wssess .qrow { border-radius: 0 !important; }
.wssess .qrow .acts { flex-wrap: wrap; justify-content: flex-end; }
.wslist { display: flex; align-items: center; gap: 6px; }
.wslist .dot { flex: none; }
.wsprep { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.wsprep ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.wsprep li { display: flex; gap: 8px; align-items: baseline; }
.wsprep li .dot { flex: none; transform: translateY(-1px); }
.wspast { margin-top: 18px; }
.wspast summary { cursor: pointer; font-weight: 700; color: var(--muted); padding: 8px 0; min-height: 44px; display: flex; align-items: center; }
.wsslotrow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 640px) { .wssess .qrow { grid-template-columns: 1fr; } .wssess .qrow .acts { justify-content: flex-start; } }

/* ---------- Team sign-in ---------- */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: linear-gradient(180deg, #E6F5FA 0%, var(--soft) 60%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .gate { background: var(--soft); } }
.gatecard { width: 100%; max-width: 400px; background: var(--bg); border: 1px solid var(--line); border-radius: 20px; padding: 28px 24px; display: flex; flex-direction: column; gap: 18px; box-shadow: 0 20px 50px -30px rgba(0, 43, 92, .45); }
.gbrand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; }
.gbrand .mk { width: 36px; height: 36px; border-radius: 10px; background: #002B5C; color: #fff; display: grid; place-items: center; }
.gbrand small { display: block; font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.gatecard h1 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin: 0; }
.gatecard .gsub { color: var(--muted); margin: 4px 0 0; font-size: 14px; }
.gatecard .form input { height: 46px; font-size: 16px; }
.gbtn { height: 48px; border-radius: 12px; border: 0; background: #002B5C; color: #fff; font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; }
.gbtn.alt { background: var(--bg); color: var(--fg); border: 1.5px solid var(--line); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .gbtn:not(.alt) { background: #3DBEE6; color: #001A38; } }
.gor { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; font-weight: 700; }
.gor::before, .gor::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.gfoot { font-size: 13px; color: var(--muted); margin: 0; text-align: center; }
.gnote { font-size: 12px; color: var(--muted); margin: 0; background: var(--soft); border-radius: 10px; padding: 8px 10px; }
.gsent { display: flex; flex-direction: column; gap: 12px; text-align: center; align-items: center; }
.gsent .ic { width: 52px; height: 52px; border-radius: 50%; background: #E6F5FA; color: #0077A0; display: grid; place-items: center; }
.shell[hidden] { display: none !important; }

.acctbtn { display: none; }
@media (max-width: 699px) {
  .acctbtn { display: grid; place-items: center; position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--bg); z-index: 5; padding: 0; }
  .main { position: relative; }
  .main .head { padding-right: 52px; }
}
.acctrow { display: flex; align-items: center; gap: 12px; }
.acctrow .m { display: flex; flex-direction: column; min-width: 0; }
.acctrow .m span { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }

/* ---------- Plan + billing status (from Stripe) ---------- */
.planrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.pill.plan { background: #E6F5FA; color: #00507A; }
.pill.plan.full { background: #002B5C; color: #FFFFFF; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill.plan { background: #0E2A3A; color: #8FDCF2; } :root:not([data-theme="light"]) .pill.plan.full { background: #3DBEE6; color: #001A38; } }
.emailform { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1 1 100%; }
.emailform input { flex: 1 1 200px; min-width: 0; }
/* Logo: the landing page's wordmark, with a light version for dark mode */
.lg { display: block; width: auto; }
.side .brand .lg { height: 28px; } .gbrand .lg { height: 36px; }
.lg-sub { font-size: 11px; font-weight: 800; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; padding: 3px 7px; border: 1px solid var(--line); border-radius: 6px; }
.lg-d { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lg-l { display: none; } :root:not([data-theme="light"]) .lg-d { display: block; } }
:root[data-theme="dark"] .lg-l { display: none; } :root[data-theme="dark"] .lg-d { display: block; }

/* ---------- Mail (Gmail inside Desk) ---------- */
.mconnect { padding: 28px 24px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; max-width: 560px; }
.mconnect b { font-size: 18px; }
.mrow { border-bottom: 1px solid var(--line); }
.mrow .trow { border-bottom: 0; padding-bottom: 4px; }
.mrow.unread .trow .r1 b, .mrow.unread .trow .r1s { font-weight: 800; color: var(--fg); }
.mrow.unread { box-shadow: inset 3px 0 0 var(--accent); }
.trow .r1s { font-size: 14px; color: var(--fg); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow .r1 b { display: inline-flex; align-items: center; gap: 6px; }
.mrow .r3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 14px 10px; font-size: 12px; }
.nomatch { color: var(--muted); font-size: 12px; font-weight: 600; }
.mchip { display: inline-flex; gap: 8px; align-items: center; vertical-align: middle; margin-left: 4px; }
.mthread { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 0; flex: 1; min-height: 0; }
.mmain { display: flex; flex-direction: column; min-width: 0; }
.mtext { white-space: pre-wrap; overflow-wrap: anywhere; }
.mcust { margin: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; align-self: start; }
.mcust .big { font-size: 17px; }
.mcust .facts { display: grid; grid-template-columns: 1fr; gap: 8px; }
.mcust .facts span { display: block; font-size: 12px; color: var(--muted); }
.mcust .acts { display: flex; flex-wrap: wrap; gap: 6px; }
.mcust .acts .btn { text-decoration: none; }
.mdraft { border-top: 1px solid var(--line); padding: 12px 18px 16px; display: flex; flex-direction: column; gap: 10px; }
.mail .thread > .mdraft { border-top: 0; }
.mdraft label { display: flex; flex-direction: column; gap: 4px; font-weight: 700; }
.mdraft input, .mdraft select { height: 40px; border: 1.5px solid var(--line); border-radius: 10px; padding: 0 10px; background: var(--bg); font-weight: 400; color: var(--fg); }
.mdraft textarea { width: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px; background: var(--bg); resize: vertical; font: inherit; line-height: 1.5; }
.mdraft .row { display: flex; gap: 8px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.mtomatch { display: flex; gap: 8px; align-items: center; min-height: 20px; margin-top: -4px; }
.mtomatch:empty { display: none; }
.mquick { display: flex; flex-wrap: wrap; gap: 6px; }
.mquick .tchip[disabled] { opacity: .45; cursor: not-allowed; }
.atts { display: flex; flex-wrap: wrap; gap: 6px; }
.attchip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 4px 0 10px; border-radius: 8px; background: var(--soft); border: 1px solid var(--line); font-size: 13px; font-weight: 600; max-width: 100%; }
.attchip button { width: 26px; height: 26px; border: 0; background: transparent; border-radius: 6px; color: var(--muted); }
.attchip button:hover { background: var(--bg); color: var(--fg); }
.attbtn { cursor: pointer; }
/* Calls: Initial outreach email on each lead and next to the dial button */
.lrowx { border-bottom: 1px solid var(--line); }
.lrowx .lrow { border-bottom: 0; }
.outmini { display: inline-flex; align-items: center; gap: 6px; margin: 0 12px 10px; height: 30px; padding: 0 10px; border-radius: 8px; border: 1.5px solid var(--line); background: var(--bg); color: var(--accent); font-weight: 700; font-size: 12px; }
.outmini:hover { background: var(--accent-soft); }
.outbtn { color: var(--accent); }
@media (max-width: 1100px) { .mthread { grid-template-columns: minmax(0, 1fr); } .mcust { margin-top: 0; } }
@media (max-width: 899px) { .mail { grid-template-columns: minmax(0, 1fr); } .mail.reading .tlist { display: none; } .mail:not(.reading) .thread { display: none; } .mail .mobonly { display: inline-flex !important; } }

/* Initial outreach email on Calls: the new email sits in the middle column, the lead list stays on the left. */
.ccompose .chead > div { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.ccompose .fromcall { max-width: 100%; height: auto; min-height: 26px; padding-block: 4px; line-height: 1.35; white-space: normal; text-align: left; }
.ccompose .mdraft { border-top: 0; padding: 0; }
.ccompose .mdraft textarea { min-height: 300px; }
.attchip .attname { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attchip.missing { border-color: var(--bad, #c2410c); color: var(--bad, #c2410c); }

/* Planner: one shared planner for the Desk team (weekly goals, the week, key dates) */
.planner { display: grid; grid-template-columns: minmax(0, 1fr) 320px; grid-template-areas: "nav nav" "goals up" "cal cal"; gap: 14px; align-items: start; }
.pwkbar { grid-area: nav; } .pgoals { grid-area: goals; } .pup { grid-area: up; } .pcal { grid-area: cal; overflow: hidden; }
.pstrip, .pdaylist { display: none; }
.planner.loading .pgoals, .planner.loading .pup, .planner.loading .pcal { opacity: .6; }
.ploaderr { margin: 0 0 12px; }
.pwknav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pwknav .prange { font-size: 16px; min-width: 0; }
.pnav { width: 34px; padding: 0; justify-content: center; }
.pcardh { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 14px 16px 6px; flex-wrap: wrap; }
.pcardh h2 { font-size: 16px; }
.pglist { display: flex; flex-direction: column; gap: 16px; padding: 8px 16px 16px; }
.pgoal { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pgtop { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pgname { background: none; border: 0; padding: 0; font-weight: 700; color: var(--fg); font-size: 14px; text-align: left; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pgname:hover { text-decoration: underline; }
.ptag { font-size: 10px; letter-spacing: .06em; height: 20px; padding: 0 7px; }
.ptag.auto { background: var(--accent-soft); color: var(--accent); }
.pgfrac { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; }
.pgfrac b { color: var(--fg); font-size: 15px; }
.pgstep { display: inline-flex; gap: 4px; }
.pstep { width: 30px; height: 30px; border-radius: 8px; border: 1.5px solid var(--line); background: var(--bg); font-weight: 800; font-size: 16px; line-height: 1; color: var(--fg); }
.pstep:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.pstep:disabled { opacity: .4; cursor: not-allowed; }
.pbar { height: 8px; border-radius: 999px; background: var(--track); overflow: hidden; }
.pbar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width .2s; }
.pgoal.met .pbar i { background: var(--good); }
.pulist { display: flex; flex-direction: column; padding: 2px 8px 10px; }
.pupr { display: flex; align-items: center; gap: 10px; padding: 10px 8px; border: 0; background: none; text-align: left; border-radius: 10px; color: var(--fg); width: 100%; }
.pupr:hover { background: var(--soft); }
.pupm { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.pupm b { font-size: 14px; overflow-wrap: anywhere; }
.pweek { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.pday { display: flex; flex-direction: column; gap: 8px; padding: 12px 8px; min-height: 210px; min-width: 0; border-right: 1px solid var(--line); }
.pday:last-child { border-right: 0; }
.pday.today { box-shadow: inset 0 0 0 2px var(--accent); border-radius: 14px; }
.pdh { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; padding: 0 2px; }
.pdh b { font-size: 18px; }
.pdh .pill { height: 20px; font-size: 11px; }
.pitems { display: flex; flex-direction: column; gap: 6px; }
.pitem { display: flex; align-items: flex-start; gap: 6px; padding: 7px 6px; border-radius: 9px; background: var(--soft); min-width: 0; }
.pitem.key { background: var(--accent-soft); }
.pkey { color: var(--accent); display: grid; place-items: center; width: 18px; height: 18px; flex: none; }
.pchk { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--muted); background: var(--bg); color: transparent; display: grid; place-items: center; flex: none; padding: 0; }
.pitem.done .pchk { background: var(--good); border-color: var(--good); color: var(--bg); }
.pitxt { flex: 1; min-width: 0; background: none; border: 0; padding: 0; text-align: left; color: var(--fg); display: flex; flex-direction: column; gap: 1px; font-size: 13px; font-weight: 600; line-height: 1.3; }
.pttl { overflow-wrap: anywhere; }
.ptime { font-size: 11px; color: var(--muted); font-weight: 600; }
.pitem.done .pttl { text-decoration: line-through; color: var(--muted); }
.pitem .who { font-size: 10px; }
.paddd { margin-top: auto; align-self: flex-start; background: none; border: 0; color: var(--muted); font-weight: 700; font-size: 12px; padding: 4px 2px; }
.paddd:hover { color: var(--accent); }
.pempty { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; padding: 4px 16px 16px; color: var(--muted); font-size: 13px; }
.pempty b { color: var(--fg); font-size: 14px; }
.pempty.wide { border-top: 1px solid var(--line); padding: 18px 16px; align-items: center; text-align: center; }
/* Planner dialogs (openSimple) */
.pform .pfs { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pform legend { font-size: 12px; font-weight: 700; color: var(--muted); padding: 0; margin-bottom: 6px; }
.pform .popt { flex-direction: row; align-items: flex-start; gap: 10px; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; color: var(--fg); font-size: 14px; }
.pform .popt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.pform .popt input { width: 16px; height: 16px; margin: 2px 0 0; padding: 0; border: 0; flex: none; accent-color: var(--accent); }
.popt > span { display: flex; flex-direction: column; gap: 2px; }
.popt > span span { font-weight: 500; color: var(--muted); font-size: 12px; }
.pown { display: flex; gap: 8px; flex-wrap: wrap; }
.powner { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 8px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--bg); font-weight: 700; color: var(--fg); }
.powner[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.powner .who.none { width: 24px; height: 24px; }
/* Owners: several can be picked (checkbox chips), and lists show them as stacked avatars */
.powner .pbox { width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid var(--muted); background: var(--bg); color: transparent; display: grid; place-items: center; flex: none; }
.powner[aria-checked="true"] .pbox { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.powner:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pownhint { font-size: 12px; color: var(--muted); }
.owho { display: inline-flex; align-items: center; flex: none; }
.owho .who { box-shadow: 0 0 0 2px var(--bg); }
.owho .who + .who { margin-left: -5px; }
.owho .who.more { background: var(--soft); color: var(--fg); border: 1.5px solid var(--line); font-size: 10px; }
.pitem .owho .who { box-shadow: 0 0 0 2px var(--soft); }
.pitem.key .owho .who { box-shadow: 0 0 0 2px var(--accent-soft); }
.pitem .owho .who + .who { margin-left: -4px; }
/* Week grid cells are narrow: two or more owners go on their own line under the title, lined up with it */
.pcal .pitem { flex-wrap: wrap; }
.pcal .pitem .owho { order: 3; flex-basis: 100%; padding-left: 24px; }
.pform .pnote { font-size: 12px; color: var(--muted); margin: 0; background: var(--soft); border-radius: 10px; padding: 8px 10px; }
.prow2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.pdacts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pdacts .sp { flex: 1; }
@media (min-width: 700px) and (max-width: 1099px) {
  .planner { grid-template-columns: minmax(0, 1fr) 260px; }
  .pday { padding: 10px 5px; }
}
@media (max-width: 699px) {
  .planner { grid-template-columns: minmax(0, 1fr); grid-template-areas: none; gap: 12px; }
  .pwkbar, .pgoals, .pup { grid-area: auto; }
  .pcal { display: none; }
  .pstrip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
  .pdaylist { display: block; }
  .pdaylist .pitems { padding: 4px 12px 12px; }
  .pstd { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 6px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg); color: var(--fg); min-width: 0; }
  .pstd > span:first-child { font-size: 11px; color: var(--muted); font-weight: 700; }
  .pstd b { font-size: 16px; }
  .pstd.today { border-color: var(--accent); }
  .pstd.today b { color: var(--accent); }
  .pstd[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--ink-fg); }
  .pstd[aria-pressed="true"] > span:first-child, .pstd[aria-pressed="true"] b { color: var(--ink-fg); }
  .pstd.today[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--accent); }
  .pdots { display: flex; gap: 3px; height: 6px; }
  .pdot { width: 6px; height: 6px; border-radius: 3px; display: block; font-size: 0; }
  .pdot.none { background: var(--muted); }
  .prow2 { grid-template-columns: minmax(0, 1fr); }
  .pgname { white-space: normal; overflow-wrap: anywhere; flex: 1 1 auto; }
  .pgfrac { margin-left: 0; }
}

/* ---------- Mail: select, Move to Trash, Delete selected, Undo toast ---------- */
.mrow { display: grid; grid-template-columns: 36px minmax(0, 1fr) 40px; align-items: start; }
.mrow .mbody { min-width: 0; }
.mrow .trow, .mrow .trow:hover, .mrow .trow[aria-current="true"] { padding-left: 2px; padding-right: 4px; background: transparent; }
.mrow:hover { background: var(--soft); }
.mrow .r3 { padding-left: 2px; padding-right: 4px; }
.mrow.sel, .mrow:has(.trow[aria-current="true"]) { background: var(--accent-soft); }
.mcheck { display: flex; align-items: center; justify-content: center; height: 44px; padding-left: 4px; cursor: pointer; }
.mcheck input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.mtrash { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; margin: 4px 4px 0 0; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.mrow .mtrash { opacity: .55; }
.mrow:hover .mtrash, .mrow:focus-within .mtrash, .mrow .mtrash:focus-visible { opacity: 1; }
.mtrash:hover { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); }
.mtrash:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.mtrash.hd { flex: none; margin: 0; border: 1.5px solid var(--line); background: var(--bg); width: 38px; height: 38px; align-self: flex-start; }
.mtrash.hd:hover { border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.mail .thead { flex-wrap: nowrap; align-items: flex-start; }
.mail .thead > div { min-width: 0; }
.mbulk { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 10px; padding: 8px 8px 8px 12px; border-radius: 10px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); }
.mbulk b { font-size: 13px; }
.mbulkacts { display: flex; gap: 6px; }
.mbulk .btn.danger { color: var(--accent-fg); display: inline-flex; align-items: center; gap: 6px; }
.mbulk .btn.danger svg { width: 15px; height: 15px; }
.toast.hasact { display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 16px; }
.toastdot { opacity: .6; }
.toast.hasact > span:first-child { white-space: nowrap; }
.toastact { flex: none; }
.toast.hasact[hidden] { display: none; }
.toastact { border: 0; background: transparent; color: inherit; font: inherit; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; height: 36px; padding: 0 10px; border-radius: 8px; cursor: pointer; }
.toastact:hover { background: color-mix(in srgb, var(--ink-fg) 14%, transparent); }
.toastact:focus-visible { outline: 2px solid var(--ink-fg); outline-offset: 1px; }
@media (hover: none) { .mrow .mtrash { opacity: 1; } }
@media (max-width: 699px) {
  .mrow { grid-template-columns: 44px minmax(0, 1fr) 44px; }
  .mcheck { height: 48px; padding-left: 2px; }
  .mcheck input { width: 20px; height: 20px; }
  .mtrash { width: 44px; height: 44px; margin: 2px 0 0; }
  .mtrash.hd { width: 44px; height: 44px; }
  .mbulk .btn { height: 44px; }
  .toastact { height: 44px; padding: 0 14px; }
}
