/* PXCMail app UI — webmail (Outlook × Gmail) and admin console (Workspace Admin × M365) shells. Tokens come from styles.css. */
:root{--topbar:56px;--rail:68px;--folders:232px;--anav:256px;--r-ctl:10px}
body.ui-mail,body.ui-admin{height:100vh;overflow:hidden;display:flex;flex-direction:column;background:var(--bg)}
.ibtn{width:40px;height:40px;border-radius:50%;border:0;background:transparent;display:inline-grid;place-items:center;color:var(--muted);cursor:pointer}
.ibtn:hover{background:var(--primary-soft);color:var(--ink)}
.ibtn svg{width:20px;height:20px}
.ibtn{position:relative}.ibtn .dot{position:absolute;top:9px;right:9px;width:8px;height:8px;border-radius:50%;background:#C2410C;border:2px solid var(--surface)}
.avatar{width:34px;height:34px;border-radius:50%;background:var(--primary);color:var(--primary-ink);display:grid;place-items:center;font-weight:700;font-size:.82rem;text-decoration:none;flex:none}
.only-mobile{display:none}
.proto{white-space:nowrap}
/* ---------- top bars ---------- */
.mtop,.atop{height:var(--topbar);display:flex;align-items:center;gap:14px;padding:0 14px;background:var(--surface);border-bottom:1px solid var(--line);flex:none;z-index:20}
.mtop .brand,.atop .brand{display:flex;align-items:center;gap:8px;font-weight:700;text-decoration:none;color:var(--ink);min-width:150px}
.mtop .brand svg,.atop .brand svg{width:26px;height:26px}
.atop .brand em{font-style:normal;font-weight:500;color:var(--muted);margin-left:2px}
.msearch,.asearch{flex:1;max-width:720px;margin:0 auto;display:flex;align-items:center;gap:10px;background:var(--bg);border:1px solid transparent;border-radius:999px;padding:0 8px 0 16px;height:42px}
.msearch:focus-within,.asearch:focus-within{background:var(--surface);border-color:var(--control);box-shadow:0 2px 10px rgba(20,30,40,.08)}
.msearch svg,.asearch svg{width:18px;height:18px;color:var(--muted);flex:none}
.msearch input,.asearch input{flex:1;border:0;background:transparent;font:inherit;color:var(--ink);min-width:0;outline:none}
.mtop-r,.atop-r{display:flex;align-items:center;gap:4px;margin-left:auto}
.mtop-r .proto,.atop-r .proto{margin-right:8px}
/* ---------- webmail shell ---------- */
.mshell{flex:1;display:grid;grid-template-columns:var(--rail) var(--folders) 1fr;min-height:0}
.rail{background:var(--surface);border-right:1px solid var(--line);display:flex;flex-direction:column;align-items:center;gap:4px;padding:12px 6px}
.rail-new{width:52px;height:52px;border-radius:16px;background:var(--primary);color:var(--primary-ink);display:grid;place-items:center;text-decoration:none;margin-bottom:10px;box-shadow:0 6px 16px rgba(18,60,90,.25)}
.rail-new svg{width:22px;height:22px}.rail-new span{display:none}
.rail-item{width:56px;padding:8px 0;border-radius:12px;display:grid;justify-items:center;gap:3px;text-decoration:none;color:var(--muted);font-size:.75rem;font-weight:600}
.rail-item svg{width:22px;height:22px}
.rail-item:hover{background:var(--primary-soft);color:var(--ink)}
.rail-item[aria-current="page"]{background:var(--primary-soft);color:var(--primary)}
.rail-out{margin-top:auto}
.folders2{background:var(--surface);border-right:1px solid var(--line);padding:12px 10px;overflow:auto;display:flex;flex-direction:column;gap:2px}
.org2{padding:8px 10px 12px}.org2 strong{display:block;font-size:.92rem}.org2 span{font-size:.78rem;color:var(--muted);word-break:break-all}
.folders2 a{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:8px 12px;border-radius:999px;text-decoration:none;color:var(--ink);font-size:.92rem}
.folders2 a b{font-size:.78rem;color:var(--muted);font-weight:600}
.folders2 a:hover{background:var(--bg)}
.folders2 a[aria-current="page"]{background:var(--primary-soft);color:var(--primary);font-weight:600}
.folders2 a[aria-current="page"] b{color:var(--primary)}
.fgrp{font-size:.75rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);padding:14px 12px 4px}
.storage{margin-top:auto;padding:12px;font-size:.78rem;color:var(--muted)}
.storage .bar{height:4px;background:var(--line);border-radius:4px;margin-bottom:6px;overflow:hidden}.storage .bar i{display:block;height:100%;background:var(--primary)}
.mmain{display:grid;grid-template-columns:minmax(320px,420px) 1fr;min-height:0;background:var(--bg)}
.mmain.single{grid-template-columns:1fr}
.mlist{display:flex;flex-direction:column;min-height:0;border-right:1px solid var(--line);background:var(--surface)}
.mlist-head{display:flex;align-items:center;gap:8px;padding:10px 12px;border-bottom:1px solid var(--line);flex-wrap:wrap}
.mlist-head h1{font-size:1.05rem;margin:0 6px 0 0;font-family:var(--font-ui)}
.chip{border:1px solid var(--line);background:var(--surface);border-radius:999px;padding:5px 11px;font:inherit;font-size:.8rem;font-weight:600;color:var(--muted);cursor:pointer;display:inline-flex;gap:6px;align-items:center}
.chip[aria-pressed="true"]{background:var(--primary-soft);color:var(--primary);border-color:transparent}
.mlist-head .ibtn{margin-left:auto;width:34px;height:34px}
.mrows{list-style:none;margin:0;padding:0;overflow:auto;flex:1}
.mrow{display:grid;grid-template-columns:36px 1fr;gap:10px;padding:10px 12px;border-bottom:1px solid var(--line);cursor:pointer;position:relative;align-items:start}
.mrow:hover{background:var(--bg)}
.mrow[aria-selected="true"]{background:var(--primary-soft);box-shadow:inset 3px 0 0 var(--primary)}
.mrow .av{width:36px;height:36px;border-radius:50%;background:var(--secure-soft);color:var(--secure);display:grid;place-items:center;font-weight:700;font-size:.8rem}
.mrow .av.n{background:var(--line);color:var(--muted)}
.mr-top{display:flex;justify-content:space-between;gap:8px;align-items:baseline}
.mr-from{font-weight:500;font-size:.92rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mrow.unread .mr-from,.mrow.unread .mr-subj{font-weight:700}
.mr-top time{font-size:.76rem;color:var(--muted);flex:none}
.mr-subj{font-size:.9rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mr-prev{font-size:.84rem;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mr-meta{display:flex;gap:6px;margin-top:4px;flex-wrap:wrap}
.mr-meta .st{font-size:.75rem;padding:1px 7px}
.mr-act{position:absolute;right:8px;top:8px;display:none;gap:2px;background:var(--surface);border:1px solid var(--line);border-radius:999px;padding:2px}
.mrow:hover .mr-act,.mrow:focus-within .mr-act{display:flex}
.mr-act button{width:28px;height:28px}.mr-act svg{width:15px;height:15px}
.mdense .mrow{padding:6px 12px;grid-template-columns:28px 1fr}.mdense .mr-prev{display:none}.mdense .mrow .av{width:28px;height:28px;font-size:.75rem}
.mread{overflow:auto;min-height:0;padding:0}
.mread article{max-width:860px;margin:0 auto;padding:22px 28px 40px}
.mread article[hidden]{display:none}
.rd-head{display:flex;align-items:flex-start;gap:12px;margin-bottom:6px}
.rd-head h2{font-size:1.35rem;font-family:var(--font-display);margin:0;flex:1;letter-spacing:-.01em}
.rd-tools{display:flex;gap:2px;flex:none}
.rd-from{display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid var(--line)}
.rd-from .av{width:40px;height:40px;border-radius:50%;background:var(--secure-soft);color:var(--secure);display:grid;place-items:center;font-weight:700}
.rd-from .who{flex:1;min-width:0}.rd-from .who b{display:block}.rd-from .who span{font-size:.84rem;color:var(--muted)}
.rd-status{display:flex;flex-wrap:wrap;gap:10px;align-items:center;background:var(--ok-soft);color:var(--ok);border-radius:10px;padding:8px 12px;font-size:.84rem;font-weight:600;margin:14px 0}
.rd-status.warn{background:var(--warn-soft);color:var(--warn)}.rd-status.bad{background:var(--danger-soft);color:var(--danger)}
.rd-status svg{width:16px;height:16px}.rd-status a{color:inherit;margin-left:auto}
.rd-body{font-size:.98rem;line-height:1.6;padding:8px 0}
.rd-body p{margin:0 0 12px}
.rd-attach{display:flex;flex-wrap:wrap;gap:10px;margin:12px 0 18px}
.rd-attach a{display:grid;grid-template-columns:36px 1fr;gap:10px;align-items:center;border:1px solid var(--line);border-radius:12px;padding:8px 12px 8px 8px;text-decoration:none;color:var(--ink);min-width:220px;background:var(--surface)}
.rd-attach .ft{width:36px;height:36px;border-radius:8px;background:var(--danger-soft);color:var(--danger);display:grid;place-items:center;font-size:.75rem;font-weight:800}
.rd-attach .ft.x{background:var(--ok-soft);color:var(--ok)}
.rd-attach small{display:block;color:var(--muted);font-size:.76rem}
.rd-reply{border:1px solid var(--line);border-radius:14px;padding:12px 14px;background:var(--surface);margin-top:10px}
.rd-reply .to{font-size:.84rem;color:var(--muted);margin-bottom:6px}
.rd-reply textarea{width:100%;min-height:90px;border:0;font:inherit;background:transparent;color:var(--ink);resize:vertical;outline:none}
.rd-reply .bar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:6px}
.rd-reply .bar .muted{margin-left:auto;font-size:.8rem}
.back-mobile{display:none}
/* compose */
.cmp{max-width:860px;margin:0 auto;padding:18px 24px 30px}
.cmp-h{display:flex;align-items:center;gap:10px;margin-bottom:8px}.cmp-h h1{font-size:1.2rem;margin:0;font-family:var(--font-ui)}
.cmp .row{display:grid;grid-template-columns:72px 1fr auto;gap:10px;align-items:center;padding:8px 0;border-bottom:1px solid var(--line)}
.cmp .row label{font-size:.84rem;color:var(--muted);font-weight:600}
.cmp .row input,.cmp .row select{font:inherit;border:0;background:transparent;color:var(--ink);width:100%;outline:none;min-width:0}
.cmp .pill-to{display:inline-flex;align-items:center;gap:6px;background:var(--primary-soft);border-radius:999px;padding:3px 10px;font-size:.84rem}
.cmp .fmt{display:flex;gap:2px;padding:8px 0;border-bottom:1px solid var(--line);flex-wrap:wrap}
.cmp .fmt button{height:32px;min-width:32px;padding:0 8px;border:0;background:transparent;border-radius:8px;font:inherit;font-weight:600;color:var(--muted);cursor:pointer}
.cmp .fmt button:hover{background:var(--bg);color:var(--ink)}
.cmp textarea{width:100%;min-height:260px;border:0;font:inherit;font-size:.98rem;line-height:1.6;padding:14px 0;background:transparent;color:var(--ink);resize:vertical;outline:none}
.cmp .send{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding-top:10px;border-top:1px solid var(--line)}
.cmp .send .muted{font-size:.8rem}
.enc-toggle{display:inline-flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:999px;padding:4px 10px 4px 6px;font-size:.84rem;font-weight:600;background:var(--surface)}
.enc-toggle .tog{width:34px;height:20px;border-radius:999px;background:var(--ok);position:relative}
.enc-toggle .tog::after{content:"";position:absolute;top:3px;right:3px;width:14px;height:14px;border-radius:50%;background:#fff}
/* calendar */
.calv{display:flex;flex-direction:column;min-height:0;height:100%}
.cal-h{display:flex;align-items:center;gap:10px;padding:12px 16px;border-bottom:1px solid var(--line);background:var(--surface);flex-wrap:wrap}
.cal-h h1{font-size:1.15rem;margin:0;font-family:var(--font-ui)}
.cal-h .seg{margin-left:auto}
.calw{flex:1;overflow:auto;display:grid;grid-template-columns:56px repeat(5,1fr);background:var(--surface)}
.calw .dh{position:sticky;top:0;background:var(--surface);border-bottom:1px solid var(--line);padding:8px;text-align:center;font-size:.8rem;color:var(--muted);font-weight:600;z-index:1}
.calw .dh b{display:block;font-size:1.3rem;color:var(--ink);font-family:var(--font-display)}
.calw .dh.today b{background:var(--primary);color:var(--primary-ink);border-radius:50%;width:36px;height:36px;line-height:36px;margin:2px auto 0}
.calw .hr{font-size:.75rem;color:var(--muted);text-align:right;padding:2px 6px 0 0;height:56px;border-top:1px solid var(--line)}
.calw .cell{border-left:1px solid var(--line);border-top:1px solid var(--line);height:56px;position:relative}
.ev{position:absolute;left:3px;right:3px;border-radius:8px;padding:5px 8px;font-size:.76rem;line-height:1.25;background:var(--primary-soft);color:var(--primary);border-left:3px solid var(--primary);overflow:hidden}
.ev b{display:block}
.ev.g{background:var(--ok-soft);color:var(--ok);border-color:var(--ok)}.ev.w{background:var(--warn-soft);color:var(--warn);border-color:var(--warn)}
/* contacts & settings reuse list/reader */
.clist .mrow{grid-template-columns:36px 1fr;align-items:center}
.sets{max-width:760px;padding:22px 28px}
.sets h2{font-size:1.1rem;font-family:var(--font-ui);margin:0 0 12px}
.set-card{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:4px 0;margin-bottom:18px}
.set-row{display:grid;grid-template-columns:1fr auto;gap:12px;align-items:center;padding:12px 16px;border-top:1px solid var(--line)}
.set-row:first-child{border-top:0}
.set-row b{display:block;font-size:.95rem}.set-row span{font-size:.84rem;color:var(--muted)}
.set-row .tog{width:36px;height:20px;border-radius:999px;background:var(--ok);position:relative;flex:none}
.set-row .tog::after{content:"";position:absolute;top:3px;right:3px;width:14px;height:14px;border-radius:50%;background:#fff}
.set-row .tog.off{background:var(--line)}.set-row .tog.off::after{right:auto;left:3px}
.snav a{display:block;padding:9px 14px;border-radius:999px;text-decoration:none;color:var(--ink);font-size:.92rem}
.snav a[aria-current="page"]{background:var(--primary-soft);color:var(--primary);font-weight:600}
/* ---------- admin shell ---------- */
.ashell{flex:1;display:grid;grid-template-columns:var(--anav) 1fr;min-height:0}
.anav{background:var(--surface);border-right:1px solid var(--line);overflow:auto;padding:8px 10px 16px;display:flex;flex-direction:column}
.anav ul{list-style:none;margin:0;padding:0}
.anav a{display:flex;align-items:center;gap:12px;padding:9px 12px;border-radius:999px;text-decoration:none;color:var(--ink);font-size:.92rem}
.anav a svg{width:18px;height:18px;color:var(--muted);flex:none}
.anav a:hover{background:var(--bg)}
.anav a[aria-current="page"]{background:var(--primary-soft);color:var(--primary);font-weight:600}.anav a[aria-current="page"] svg{color:var(--primary)}
.agrp-h{display:flex;align-items:center;justify-content:space-between;width:100%;border:0;background:transparent;font:inherit;font-size:.75rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);padding:14px 12px 4px;cursor:pointer}
.agrp-h svg{width:14px;height:14px;transition:transform .15s}
.agrp-h[aria-expanded="false"] svg{transform:rotate(-90deg)}
.agrp-h[aria-expanded="false"]+ul{display:none}
.anav-out{margin-top:auto;display:flex;align-items:center;gap:12px;padding:9px 12px;color:var(--muted);text-decoration:none;font-size:.9rem}
.anav-out svg{width:18px;height:18px}
.amain{overflow:auto;min-height:0;padding:24px 28px 48px}
.amain>*{max-width:1180px}
.pg-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:18px;flex-wrap:wrap}
.pg-head h1{font-size:1.6rem;margin:0 0 4px;letter-spacing:-.01em}
.pg-head .sub{margin:0;color:var(--muted)}
.pg-actions{display:flex;gap:8px;flex-wrap:wrap}
.crumb{font-size:.82rem;color:var(--muted);margin-bottom:8px}.crumb a{color:inherit}
/* home cards */
.acards{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-bottom:20px}
.acard{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:16px 18px;display:flex;flex-direction:column;gap:8px;min-height:150px}
.acard .ah{display:flex;align-items:center;gap:10px;font-weight:600}
.acard .ah svg{width:18px;height:18px;color:var(--muted)}
.acard .big{font-family:var(--font-display);font-size:1.9rem;font-weight:700;letter-spacing:-.02em}
.acard .big small{font-size:1rem;color:var(--muted);font-weight:500}
.acard .muted{font-size:.86rem}
.acard .al{margin-top:auto;display:flex;gap:14px;font-size:.86rem;font-weight:600}
.acard .al a{text-decoration:none;color:var(--primary)}
.acard.span2{grid-column:span 2}
.setup{display:grid;grid-template-columns:1fr auto;gap:14px;align-items:center}
.setup .prog{height:8px;background:var(--line);border-radius:8px;overflow:hidden;margin:8px 0}.setup .prog i{display:block;height:100%;background:var(--ok);width:70%}
.setup ul{list-style:none;margin:6px 0 0;padding:0;display:grid;gap:4px;font-size:.88rem}
.setup li{display:flex;gap:8px;align-items:center}.setup li svg{width:16px;height:16px;color:var(--ok)}
.setup li.todo svg{color:var(--line)}.setup li.todo a{font-weight:600}
.score{display:grid;grid-template-columns:auto 1fr;gap:16px;align-items:center}
.ring{width:96px;height:96px;border-radius:50%;background:conic-gradient(var(--ok) calc(var(--v)*1%),var(--line) 0);display:grid;place-items:center;position:relative}
.ring::after{content:"";position:absolute;inset:9px;border-radius:50%;background:var(--surface)}
.ring b{position:relative;z-index:1;font-family:var(--font-display);font-size:1.5rem}
.rec{list-style:none;margin:0;padding:0;display:grid;gap:6px;font-size:.88rem}
.rec li{display:flex;justify-content:space-between;gap:10px;align-items:center;padding:8px 10px;border:1px solid var(--line);border-radius:10px}
.rec li b{color:var(--ok);font-size:.8rem;white-space:nowrap}
.alerts{list-style:none;margin:0;padding:0}
.alerts li{display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:center;padding:10px 0;border-top:1px solid var(--line);font-size:.9rem}
.alerts li:first-child{border-top:0}
.alerts .sev{width:10px;height:10px;border-radius:50%;background:var(--warn)}.alerts .sev.ok{background:var(--ok)}.alerts .sev.bad{background:var(--danger)}
/* data tables */
.dt-wrap{background:var(--surface);border:1px solid var(--line);border-radius:14px;overflow:hidden}
.dt-bar{display:flex;align-items:center;gap:8px;padding:10px 12px;border-bottom:1px solid var(--line);flex-wrap:wrap}
.dt-bar input[type=search],.dt-bar select{font:inherit;padding:8px 12px;border:1px solid var(--control);border-radius:var(--r-ctl);background:var(--bg);color:var(--ink)}
.dt-bar .sp{flex:1}
.bulk{display:none;align-items:center;gap:8px;padding:8px 12px;background:var(--primary-soft);border-bottom:1px solid var(--line);font-size:.88rem}
.bulk[data-on="true"]{display:flex}
.dt{width:100%;border-collapse:collapse;font-size:.9rem}
.dt th{font-size:.75rem;letter-spacing:.05em;text-transform:uppercase;color:var(--muted);text-align:left;padding:10px 12px;border-bottom:1px solid var(--line);background:var(--surface);position:sticky;top:0}
.dt td{padding:10px 12px;border-bottom:1px solid var(--line);vertical-align:middle}
.dt tr[data-panel]{cursor:pointer}.dt tbody tr:hover td{background:var(--bg)}
.dt .who{display:flex;align-items:center;gap:10px}.dt .who .av{width:32px;height:32px;border-radius:50%;background:var(--primary-soft);color:var(--primary);display:grid;place-items:center;font-weight:700;font-size:.75rem;flex:none}
.dt .who b{display:block;font-weight:600}.dt .who span{font-size:.8rem;color:var(--muted)}
.dt input[type=checkbox]{width:16px;height:16px}
.dt-foot{display:flex;align-items:center;gap:10px;padding:10px 12px;font-size:.84rem;color:var(--muted)}
/* slide-over */
.sover{position:fixed;top:var(--topbar);right:0;bottom:0;width:min(480px,100%);background:var(--surface);border-left:1px solid var(--line);box-shadow:-12px 0 40px rgba(20,30,40,.14);transform:translateX(105%);transition:transform .2s;z-index:30;display:flex;flex-direction:column}
.sover[data-open="true"]{transform:none}
.sover-h{display:flex;align-items:center;gap:10px;padding:12px 16px;border-bottom:1px solid var(--line)}
.sover-h h2{font-size:1.05rem;margin:0;flex:1;font-family:var(--font-ui)}
.sover-b{overflow:auto;padding:16px}
.sover .tabs{display:flex;gap:4px;border-bottom:1px solid var(--line);margin-bottom:12px}
.sover .tabs button{border:0;background:transparent;font:inherit;font-weight:600;color:var(--muted);padding:8px 12px;border-bottom:2px solid transparent;cursor:pointer}
.sover .tabs button[aria-selected="true"]{color:var(--primary);border-color:var(--primary)}
.kv{display:grid;grid-template-columns:140px 1fr;gap:6px 12px;font-size:.9rem}.kv dt{color:var(--muted)}.kv dd{margin:0}
.sover-f{padding:12px 16px;border-top:1px solid var(--line);display:flex;gap:8px;flex-wrap:wrap}
.scrim{position:fixed;inset:0;background:rgba(10,20,30,.35);z-index:25;display:none}
.scrim[data-open="true"]{display:block}
/* settings-style cards in admin pages */
.ui-admin .panel{border-radius:14px}
.ui-admin .tiles{grid-template-columns:repeat(4,1fr)}
/* tray */
.tray{position:fixed;left:50%;bottom:16px;transform:translateX(-50%);background:var(--ink);color:var(--bg);border-radius:999px;padding:10px 16px;font-size:.84rem;display:flex;gap:12px;align-items:center;box-shadow:var(--shadow);z-index:20}
.tray i{width:14px;height:14px;border:2px solid var(--bg);border-top-color:transparent;border-radius:50%;animation:spin 1s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
/* ---------- responsive ---------- */
@media (max-width:1100px){.mmain{grid-template-columns:minmax(300px,360px) 1fr}.acards{grid-template-columns:repeat(2,1fr)}.acard.span2{grid-column:span 2}}
@media (max-width:900px){
  .only-mobile{display:inline-grid}
  .mshell{grid-template-columns:var(--rail) 1fr}
  .folders2{position:fixed;top:var(--topbar);left:var(--rail);bottom:0;width:var(--folders);transform:translateX(-120%);transition:transform .2s;z-index:21;box-shadow:12px 0 40px rgba(20,30,40,.14)}
  .folders2[data-open="true"]{transform:none}
  .ashell{grid-template-columns:1fr}
  .anav{position:fixed;top:var(--topbar);left:0;bottom:0;width:var(--anav);transform:translateX(-120%);transition:transform .2s;z-index:21;box-shadow:12px 0 40px rgba(20,30,40,.14)}
  .anav[data-open="true"]{transform:none}
  .msearch,.asearch{max-width:none}
  .mtop .brand span,.atop .brand span,.atop .brand em,.proto{display:none}
  .mtop .brand,.atop .brand{min-width:0}
  .amain{padding:16px}
  .acards{grid-template-columns:1fr}.acard.span2{grid-column:auto}
  .ui-admin .tiles{grid-template-columns:repeat(2,1fr)}
}
@media (max-width:760px){
  .mmain{grid-template-columns:1fr}
  .mread{position:fixed;inset:var(--topbar) 0 0 var(--rail);background:var(--bg);transform:translateX(110%);transition:transform .2s;z-index:22}
  .mread[data-open="true"]{transform:none}
  .back-mobile{display:inline-grid}
  .mread article{padding:14px 16px 30px}
  .rail{padding:8px 4px}.rail-item{width:52px;font-size:.75rem}
  .cmp{padding:14px 16px}
  .calw{grid-template-columns:48px repeat(5,minmax(110px,1fr))}
  .kv{grid-template-columns:1fr}
}
@media (max-width:560px){.rail{display:none}.mshell{grid-template-columns:1fr}.folders2{left:0}.mread{left:0}.mtop .ibtn.only-mobile{display:inline-grid}}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .rail-new{box-shadow:none}}
/* icon sizing inside controls (sprite <use> has no intrinsic size) */
.ui-mail .btn svg,.ui-admin .btn svg,.chip svg,.pill-to svg,.cmp .fmt svg,.enc-toggle svg,.rd-reply .bar svg,.pg-actions svg,.cal-h svg,.sover svg:not(.ibtn svg),.set-row svg,.setup svg,.acard .al svg,.rd-tools svg{width:16px;height:16px;flex:none}
.ui-mail .btn,.ui-admin .btn{display:inline-flex;align-items:center;gap:6px}
.mmain:has(> .calv){display:block}
.calv{height:100%}

/* marketing section padding must not leak into app shells */
.ui-mail section,.ui-admin section{padding:0}

/* ---------- admin console: shared page patterns (settings cards, tabs, empty states) ---------- */
.sec-h{margin:24px 0 10px;font-size:1.15rem;font-family:var(--font-ui)}
.sec-h:first-of-type{margin-top:0}
.set-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 18px;align-items:start}
.set-card .acts{display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.set-row>div:first-child{min-width:0}
.set-row code{font-size:.84rem;overflow-wrap:anywhere}
.set-row .tog[role="switch"]{cursor:pointer}
.set-row .tog[aria-checked="false"]{background:var(--line)}.set-row .tog[aria-checked="false"]::after{right:auto;left:3px}
.tog[role="switch"]:focus-visible{outline:3px solid var(--secure);outline-offset:2px}
.sover .form,.set-card .form,.acard .form{max-width:none;border:0;padding:0;box-shadow:none;background:transparent}
.sover .form .btn{justify-self:start}
.ui-admin .paytabs{gap:0;border-bottom:1px solid var(--line);margin-bottom:14px}
.ui-admin .paytabs button{border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;color:var(--muted);padding:10px 14px;margin-bottom:-1px}
.ui-admin .paytabs button[aria-selected="true"]{background:transparent;color:var(--primary);border-color:var(--primary)}
.ui-admin .paytabs button:focus-visible{outline:3px solid var(--secure);outline-offset:-3px}
.empty{background:var(--surface);border:1px dashed var(--line);border-radius:14px;padding:40px 20px;text-align:center;display:grid;justify-items:center;gap:8px;margin-bottom:18px}
.empty svg{width:32px;height:32px;color:var(--muted)}
.empty b{font-size:1.05rem}.empty p{margin:0;color:var(--muted);max-width:46ch}
.empty .btn{margin-top:6px}
.dt code,.kv code{font-size:.84rem;overflow-wrap:anywhere}
.dt .num{text-align:right;font-variant-numeric:tabular-nums}
.copy{border:1px solid var(--line);background:var(--surface);border-radius:999px;padding:3px 10px;font:inherit;font-size:.78rem;font-weight:600;color:var(--muted);cursor:pointer;display:inline-flex;gap:6px;align-items:center}
.copy:hover{color:var(--ink);background:var(--bg)}.copy[data-done="true"]{color:var(--ok);border-color:var(--ok)}
.copy svg{width:14px;height:14px}
.acard .ah .st{margin-left:auto}
.acard .pay{display:flex;align-items:center;gap:10px;font-weight:600}.acard .pay svg{width:20px;height:20px;color:var(--muted)}
.ui-admin .summary{margin-bottom:18px}
.ui-admin .teaser{margin-top:0;margin-bottom:18px}
.ui-admin .teaser .plan{box-shadow:none;border-radius:14px;padding:18px 20px}
.ui-admin .steps{margin:0}
@media (max-width:900px){.set-grid{grid-template-columns:1fr}}
@media (max-width:760px){.set-row{grid-template-columns:1fr}.set-card .acts{justify-content:flex-start}}
.dt-bar input[type=date],.dt-bar input[type=text]{font:inherit;padding:8px 12px;border:1px solid var(--control);border-radius:var(--r-ctl);background:var(--bg);color:var(--ink)}
.acards.four{grid-template-columns:repeat(4,1fr)}
@media (max-width:1100px){.acards.four{grid-template-columns:repeat(2,1fr)}}
@media (max-width:900px){.acards.four{grid-template-columns:1fr}}
@media (max-width:760px){.set-row>*:not(:first-child){justify-self:start}}
.dt .st{white-space:nowrap}
