/* Toasts: stacked top right, newest first; bottom-centred on phones. */
.toast-host{position:fixed;z-index:2000;top:calc(env(safe-area-inset-top,0px) + 112px);right:24px;width:min(390px,calc(100vw - 32px));display:flex;flex-direction:column;pointer-events:none}
.toast{--c:var(--accent);pointer-events:auto;position:relative;overflow:hidden;margin-bottom:10px;display:flex;align-items:center;gap:11px;padding:12px 10px 12px 12px;background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:14px;box-shadow:0 10px 30px rgba(15,23,42,.14),0 2px 6px rgba(15,23,42,.06);animation:toast-in .3s cubic-bezier(.21,1.02,.73,1);transition:height .3s ease,margin .3s ease,padding .3s ease,opacity .2s ease,transform .25s ease}
.toast.ok{--c:var(--green)}.toast.err{--c:var(--red)}.toast.info{--c:var(--accent)}
.toast-icon{width:32px;height:32px;border-radius:10px;display:grid;place-items:center;background:color-mix(in srgb,var(--c) 13%,transparent);color:var(--c);flex-shrink:0}.toast-icon .icon{width:17px;height:17px}
.toast-text{flex:1;min-width:0;font-size:13.5px;font-weight:500;line-height:1.4}.toast-text strong{display:block;font-weight:650}.toast-text span{color:var(--text-2)}
.toast-count{font-size:11px;font-weight:700;color:var(--c);background:color-mix(in srgb,var(--c) 12%,transparent);border-radius:999px;padding:1px 7px}
.toast-action{display:inline-flex;align-items:center;gap:4px;height:30px;padding:0 10px;border-radius:8px;font-size:12.5px;font-weight:650;color:var(--accent-ink);background:var(--accent-soft);flex-shrink:0}.toast-action:hover{background:var(--accent-soft-2)}.toast-action .icon{width:14px;height:14px}
.toast-close{width:28px;height:28px;border-radius:8px;display:grid;place-items:center;color:var(--faint);flex-shrink:0}.toast-close:hover{background:var(--surface-3);color:var(--text)}.toast-close .icon{width:15px;height:15px}
.toast-timer{position:absolute;left:0;right:0;bottom:0;height:3px;background:var(--c);opacity:.5;transform-origin:left}
.toast.bump{animation:toast-bump .3s ease}.toast.leaving{opacity:0;transform:translateX(24px);height:0!important;margin-bottom:0;padding-top:0;padding-bottom:0;border-width:0}
@keyframes toast-in{from{opacity:0;transform:translateY(-10px) scale(.97)}}@keyframes toast-bump{40%{transform:scale(1.025)}}

/* Confirm dialog */
.confirm-dialog{width:420px}.confirm{padding:22px;text-align:left}.confirm-icon{width:44px;height:44px;border-radius:12px;display:grid;place-items:center;background:var(--accent-soft);color:var(--accent);margin-bottom:14px}.confirm-icon.danger{background:color-mix(in srgb,var(--red) 11%,transparent);color:var(--red)}.confirm h2{font-size:17px}.confirm p{color:var(--muted);font-size:14px;margin:6px 0 20px;line-height:1.6}.confirm-actions{display:flex;justify-content:flex-end;gap:10px}
.dialog-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}.connector-head{display:flex;align-items:center;gap:12px}.connector-head>span:nth-child(2){flex:1}.connector-head strong{display:block}
.person.lg{padding:4px 0 6px}.person.lg .avatar{width:46px;height:46px;font-size:15px}.person.lg>span:nth-child(2){flex:1}
.access-options{border:0;padding:0;margin:18px 0 0;display:grid;gap:8px}.access-options legend{font-size:13px;font-weight:650;margin-bottom:8px;color:var(--text-2)}
.option-card{display:flex;gap:12px;align-items:flex-start;padding:12px 14px;border:1px solid var(--border-strong);border-radius:var(--r-sm);cursor:pointer;transition:border-color .15s,background .15s}.option-card:hover{background:var(--surface-2)}.option-card:has(input:checked){border-color:var(--accent);background:var(--accent-soft)}.option-card input{margin:3px 0 0;accent-color:var(--accent);width:16px;height:16px}.option-card strong{display:block;font-size:14px}.option-card small{display:block}

/* Tooltip */
.tip{position:fixed;z-index:3000;pointer-events:none;background:#132238;color:#fff;font-size:12px;font-weight:500;padding:6px 9px;border-radius:7px;box-shadow:0 6px 18px #0003;opacity:0;transform:translateY(2px);transition:opacity .12s,transform .12s;max-width:260px}.tip.show{opacity:1;transform:none}

/* Bell panel */
.bell-panel{position:fixed;z-index:1500;width:min(380px,calc(100vw - 16px));background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);box-shadow:var(--shadow-lg);overflow:hidden;animation:pop .14s var(--ease)}@keyframes pop{from{opacity:0;transform:translateY(-4px) scale(.98)}}
.bell-head{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid var(--border)}.bell-head strong{font-size:14.5px}
.bell-list{max-height:min(420px,60dvh);overflow-y:auto;scrollbar-width:thin}.bell-item{display:flex;gap:11px;width:100%;text-align:left;padding:12px 16px;border-bottom:1px solid var(--border);position:relative;transition:background .12s}.bell-item:hover{background:var(--surface-2)}.bell-item>span:last-child{min-width:0;flex:1}.bell-item strong{display:block;font-size:13.5px;font-weight:600}.bell-item small{display:block}.bell-time{color:var(--faint)!important;margin-top:2px;font-size:11.5px!important}
.bell-item.unread{background:color-mix(in srgb,var(--accent) 4%,var(--surface))}.bell-item.unread:after{content:"";position:absolute;right:16px;top:18px;width:8px;height:8px;border-radius:50%;background:var(--accent)}
.bell-empty{display:grid;justify-items:center;gap:2px;padding:30px 16px;text-align:center}.bell-empty .icon{width:28px;height:28px;color:var(--green);margin-bottom:6px}
.bell-foot{display:flex;align-items:center;justify-content:center;gap:7px;padding:12px;font-size:13px;font-weight:600;color:var(--accent-ink);background:var(--surface-2)}.bell-foot:hover{background:var(--surface-3)}.bell-foot .icon{width:16px;height:16px}

/* Widget grid and customize mode */
.widget-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:18px;align-items:stretch}.widget{grid-column:span var(--span,6);min-width:0;display:flex;flex-direction:column;position:relative}
.widget-body{flex:1;min-width:0;display:flex;flex-direction:column}.widget-body>*{flex:1}.widget-body>.stats{margin:0}.widget-body>.section-title{flex:0}
.customize-bar{position:sticky;top:calc(var(--topbar) + 10px);z-index:15;display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;padding:12px 14px 12px 16px;margin-bottom:16px;border-radius:var(--r);background:var(--surface);border:1px solid var(--accent-border);box-shadow:var(--shadow-md)}
.customize-title{display:flex;align-items:center;gap:12px;min-width:0}.customize-title>.icon{color:var(--accent);width:22px;height:22px}.customize-title strong{display:block;font-size:14px}.customize-title small{display:block}.customize-actions{display:flex;gap:8px}
.widget-tray{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:16px;padding:12px 14px;border:1px dashed var(--border-strong);border-radius:var(--r)}.widget-tray .eyebrow{margin:0}.widget-tray>div{display:flex;gap:8px;flex-wrap:wrap}.tray-item{display:inline-flex;align-items:center;gap:5px;height:32px;padding:0 12px;border-radius:999px;border:1px solid var(--border-strong);background:var(--surface);font-size:13px;font-weight:600}.tray-item:hover{border-color:var(--accent);color:var(--accent-ink)}.tray-item .icon{width:15px;height:15px}
.widget-grid.editing .widget{border-radius:var(--r-lg);outline:2px dashed var(--accent-border);outline-offset:5px;background:var(--bg)}
.widget-grid.editing .widget-body{pointer-events:none;user-select:none;opacity:.85}
.widget-tools{display:flex;align-items:center;gap:8px;padding:0 0 8px;min-height:38px}.widget-tools>strong{font-size:13px;flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.widget-tool-actions{display:flex;align-items:center;gap:2px}
.widget-handle{width:34px;height:34px;border-radius:var(--r-sm);display:grid;place-items:center;color:var(--muted);background:var(--surface);border:1px solid var(--border-strong);cursor:grab;touch-action:none;flex-shrink:0}.widget-handle .icon{width:18px;height:18px;stroke-width:3}.widget-handle:hover{color:var(--accent);border-color:var(--accent)}.widget-handle:active{cursor:grabbing}
.widget-size{display:inline-flex;align-items:center;gap:5px;height:30px;padding:0 10px;border-radius:7px;font-size:12px;font-weight:600;color:var(--text-2);background:var(--surface);border:1px solid var(--border-strong);margin-right:4px}.widget-size .icon{width:14px;height:14px}.widget-size:hover{border-color:var(--accent);color:var(--accent-ink)}
.widget.dragging{z-index:50;opacity:.92;box-shadow:var(--shadow-lg);outline:2px solid var(--accent)!important;cursor:grabbing;transition:none!important}.widget-grid.is-dragging{user-select:none}

/* Toolbars, pills, tabs, segmented */
.toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:12px 20px;border-bottom:1px solid var(--border)}.toolbar.flat{padding:0;border:0;margin-bottom:14px}
.pills{display:flex;gap:6px;flex-wrap:wrap}.pill{display:inline-flex;align-items:center;gap:7px;height:32px;padding:0 13px;border-radius:999px;border:1px solid var(--border-strong);background:var(--surface);font-size:13px;font-weight:600;color:var(--text-2);transition:all .15s}.pill span{font-size:11.5px;color:var(--muted);background:var(--surface-3);border-radius:999px;padding:0 7px;line-height:18px}
.pill:hover{border-color:var(--faint)}.pill.active{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}.pill.active span{background:color-mix(in srgb,var(--on-accent) 22%,transparent);color:var(--on-accent)}
.tabs{display:flex;align-items:center;gap:4px;border-bottom:1px solid var(--border);margin-bottom:20px;overflow-x:auto;scrollbar-width:none}.tab{display:inline-flex;align-items:center;gap:7px;padding:10px 14px;font-size:14px;font-weight:600;color:var(--muted);border-bottom:2px solid transparent;margin-bottom:-1px;white-space:nowrap}.tab .icon{width:17px;height:17px}.tab:hover{color:var(--text)}.tab.active{color:var(--accent-ink);border-bottom-color:var(--accent)}.tabs .save-state{margin-left:auto}
.segmented{display:inline-flex;padding:3px;border-radius:var(--r-sm);background:var(--surface-3);border:1px solid var(--border);flex-wrap:wrap}.segmented label{position:relative}.segmented input{position:absolute;z-index:1;opacity:0;inset:0;margin:0;cursor:pointer}.segmented span{display:block;padding:7px 13px;border-radius:7px;font-size:13px;font-weight:600;color:var(--muted);transition:all .15s}.segmented input:checked+span{background:var(--surface);color:var(--text);box-shadow:var(--shadow-sm)}.segmented input:focus-visible+span{outline:2px solid var(--accent)}
.save-state{display:inline-flex;align-items:center;gap:4px;font-size:12.5px;font-weight:600;color:var(--green);opacity:0}.save-state .icon{width:15px;height:15px}.save-state.show{animation:saved 2.2s ease forwards}@keyframes saved{10%,75%{opacity:1}100%{opacity:0}}
.test-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:18px}

/* Switches, checkboxes and setting rows */
.switch{position:relative;display:inline-flex;flex-shrink:0;cursor:pointer}.switch input{position:absolute;opacity:0;inset:0;margin:0;cursor:pointer;z-index:1}.switch input:disabled{cursor:not-allowed}
.switch-track{width:40px;height:23px;border-radius:999px;background:var(--border-strong);position:relative;transition:background .18s}.switch-track:after{content:"";position:absolute;top:3px;left:3px;width:17px;height:17px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0003;transition:transform .2s var(--ease)}
.switch input:checked+.switch-track{background:var(--accent)}.switch input:checked+.switch-track:after{transform:translateX(17px)}.switch input:focus-visible+.switch-track{box-shadow:var(--ring);outline:2px solid var(--accent);outline-offset:2px}.switch input:disabled+.switch-track{opacity:.45}
.check{position:relative;display:inline-grid;place-items:center;cursor:pointer}.check input{position:absolute;z-index:1;opacity:0;inset:0;margin:0;cursor:pointer}.check>span:not(.sr-only){width:22px;height:22px;border-radius:6px;border:1.5px solid var(--border-strong);background:var(--surface);display:grid;place-items:center;color:#fff;transition:all .15s}.check .icon{width:15px;height:15px;stroke-width:2.6;opacity:0}.check input:checked+span{background:var(--accent);border-color:var(--accent)}.check input:checked+span .icon{opacity:1}.check input:focus-visible+span{box-shadow:var(--ring);border-color:var(--accent)}.check:hover>span:not(.sr-only){border-color:var(--accent)}
.setting-row{display:flex;align-items:center;gap:14px;padding:14px 0;border-bottom:1px solid var(--border)}.setting-row:last-child{border-bottom:0}.setting-text{flex:1;min-width:0}.setting-text strong{display:block;font-size:14px;font-weight:600}.setting-text small{display:block;margin-top:1px;line-height:1.45}
.logo-uploader+.setting-row{margin-top:8px;padding-bottom:0}
.panel.is-off .setting-row,.panel.is-off .inline-form{opacity:.55}
.inline-form{padding:8px 20px 20px;border-top:1px solid var(--border);align-items:end}.inline-form .btn{justify-self:start}
.portal-master{margin-bottom:20px;transition:border-color .2s,background .2s}.portal-master.on{border-color:color-mix(in srgb,var(--green) 30%,var(--border))}.portal-master-row{display:flex;align-items:center;gap:14px;padding:18px 20px}.portal-master-row .icon-tile{width:44px;height:44px;border-radius:12px}.portal-master-row:not(:has(.green)) .icon-tile{background:var(--surface-3);color:var(--muted)}.portal-master .setting-text strong{font-size:16px}

/* Permission matrix */
.matrix{font-size:13.5px}.matrix th,.matrix td{text-align:center;vertical-align:middle}.matrix thead th{text-transform:none;letter-spacing:0;font-size:13px;color:var(--text);padding:12px 14px;white-space:normal;min-width:120px}.matrix thead th small{display:block;font-weight:400;font-size:11.5px;margin-top:2px;line-height:1.35}.matrix thead th:first-child,.matrix tbody th{text-align:left;min-width:230px}.matrix thead th:first-child{padding-left:20px}
.matrix tbody th{padding:12px 20px;border-bottom:1px solid var(--border);font-weight:400;position:sticky;left:0;background:var(--surface);z-index:1}.matrix tbody tr:hover th{background:var(--surface-2)}.matrix tbody th strong{display:block;font-weight:600;font-size:13.5px}.matrix tbody th small{display:block}.matrix td{padding:10px 14px}
.role-head{display:inline-flex;align-items:center;gap:5px}.role-head .icon{width:14px;height:14px;color:var(--muted)}
.matrix-fixed{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:6px;color:var(--faint);background:var(--surface-3)}.matrix-fixed.on{color:var(--accent);background:var(--accent-soft)}.matrix-fixed .icon{width:15px;height:15px;stroke-width:2.6}
.matrix.prefs tbody th{min-width:260px}.pref-name{display:flex;align-items:center;gap:12px}
.level-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:14px;padding:18px 20px}.level{border:1px solid var(--border);border-radius:var(--r);padding:16px;background:var(--surface-2)}.level ul{list-style:none;padding:0;margin:12px 0 0;display:grid;gap:8px;font-size:13.5px;color:var(--text-2)}.level li{display:flex;align-items:center;gap:8px}.level .icon{width:16px;height:16px;color:var(--green)}.level li.off{color:var(--muted)}.level li.off .icon{color:var(--faint)}

/* Branding */
.stack-col{display:grid;gap:20px;align-content:start}.sticky-col{position:sticky;top:calc(var(--topbar) + 20px);align-self:start}
.logo-uploader{position:relative;display:flex;align-items:center;gap:18px;padding:16px;border:1.5px dashed var(--border-strong);border-radius:var(--r);background:var(--surface-2);transition:border-color .15s,background .15s}.logo-uploader.drag-over{border-color:var(--accent);background:var(--accent-soft)}
.logo-copy{flex:1;min-width:0}.logo-copy strong{display:block;font-size:14.5px}.logo-copy small{display:block;margin:2px 0 12px;line-height:1.5}.logo-actions{display:flex;gap:8px;flex-wrap:wrap}
.file-btn{position:relative;overflow:hidden;cursor:pointer}.file-btn input{position:absolute;inset:0;opacity:0;cursor:pointer;font-size:0}.file-btn:focus-within{box-shadow:var(--ring);border-color:var(--accent)}
.drop-hint{position:absolute;inset:0;border-radius:var(--r);display:none;place-items:center;align-content:center;gap:6px;font-weight:650;color:var(--accent-ink);background:color-mix(in srgb,var(--surface) 70%,transparent);pointer-events:none}.logo-uploader.drag-over .drop-hint{display:grid}.drop-hint .icon{width:26px;height:26px}
.skin-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.skin-option{position:relative;display:grid!important;gap:8px!important;padding:10px;border:1px solid var(--border-strong);border-radius:var(--r-sm);cursor:pointer;transition:border-color .15s,background .15s}.skin-option input{position:absolute;z-index:1;opacity:0;inset:0;margin:0;cursor:pointer}.skin-option:has(input:checked){border-color:var(--accent);box-shadow:var(--ring)}.skin-option:has(input:focus-visible){outline:2px solid var(--accent);outline-offset:2px}.skin-option strong{display:block;font-size:13px;color:var(--text)}.skin-option small{font-weight:400}
.skin-swatch{display:flex;height:34px;border-radius:7px;overflow:hidden;border:1px solid var(--border)}.skin-swatch i{flex:1}.skin-cloud i:nth-child(1){background:#fff}.skin-cloud i:nth-child(2){background:#f4f6fb}.skin-cloud i:nth-child(3){background:var(--accent)}.skin-sage i:nth-child(1){background:#fffffb}.skin-sage i:nth-child(2){background:#eef1e9}.skin-sage i:nth-child(3){background:var(--accent)}.skin-midnight i:nth-child(1){background:#172131}.skin-midnight i:nth-child(2){background:#0f1622}.skin-midnight i:nth-child(3){background:var(--accent)}
.brand-preview{overflow:hidden}.preview-frame{display:grid;grid-template-columns:170px 1fr;min-height:250px;background:var(--bg)}.preview-side{background:var(--surface);border-right:1px solid var(--border);padding:16px 12px}.preview-brand{display:flex;align-items:center;gap:9px;margin-bottom:16px;min-width:0}.preview-brand .brand-mark{width:32px;height:32px;border-radius:9px;font-size:12px}.preview-brand strong{font-size:12.5px;line-height:1.25;min-width:0;overflow-wrap:anywhere}
.mini-nav{display:grid;gap:3px;font-size:12px}.mini-nav>span{padding:7px 9px;display:flex;align-items:center;gap:7px;color:var(--muted);border-radius:7px}.mini-nav>.selected{background:var(--accent-soft);color:var(--accent-ink);font-weight:600}.mini-nav .icon{width:15px}
.mini-card{margin:16px;padding:18px;border:1px solid var(--border);background:var(--surface);border-radius:var(--r);align-self:start}.mini-card h3{font-size:17px;margin:4px 0 4px}.mini-card p{font-size:12.5px;color:var(--muted);margin-bottom:14px}.mini-card .btn{height:32px;font-size:12.5px;pointer-events:none}

/* Overview cards */
.portal-card-body{padding:16px 20px 18px;display:grid;gap:14px}.section-chips{display:flex;flex-wrap:wrap;gap:6px}.portal-card-actions{display:flex;gap:8px;flex-wrap:wrap}

/* Client portal unavailable */
.content.bare{display:flex;flex-direction:column}.unavailable{flex:1;display:grid;place-items:center;padding:40px 0}.unavailable-card{max-width:520px;text-align:center;display:grid;justify-items:center;gap:12px;background:var(--surface);border:1px solid var(--border);border-radius:var(--r-xl);padding:36px 28px;box-shadow:var(--shadow-md)}.unavailable-card h1{font-size:22px;margin-top:6px}.unavailable-card>p{color:var(--muted);font-size:14.5px;line-height:1.6}
.preview-only{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:center;margin-top:10px;padding:12px 14px;border-radius:var(--r-sm);background:var(--surface-2);border:1px dashed var(--border-strong);font-size:13px;color:var(--muted)}.preview-only .icon{width:16px;height:16px;color:var(--accent)}

/* Responsive */
@media(max-width:1200px){.content{padding:26px 24px 0}.topbar{padding:0 24px}.stats.four{grid-template-columns:repeat(2,minmax(0,1fr))}.welcome-art{display:none}.preview-label{display:none}.milestone{width:260px}}
@media(max-width:1024px){.widget{grid-column:span 6}.widget[style*="--span:2"],.widget[style*="--span:3"]{grid-column:span 3}.two-col,.two-col.wide-left,.branding-grid{grid-template-columns:1fr}.sticky-col{position:static}}
@media(max-width:860px){.shell,.shell.collapsed{display:block}.sidebar{position:fixed;left:0;top:0;bottom:0;height:100dvh;z-index:60;width:min(300px,86vw);transform:translateX(-102%);transition:transform .25s var(--ease);box-shadow:none}.sidebar.mobile-open{transform:none;box-shadow:20px 0 60px #0f172a33}
 .shell.collapsed .sidebar{padding:18px 14px 16px}.shell.collapsed .brand-text,.shell.collapsed .nav-label,.shell.collapsed .nav-heading,.shell.collapsed .workspace-select,.shell.collapsed .nav-count{display:revert}.shell.collapsed .workspace-select{display:block}.shell.collapsed .nav-item{justify-content:flex-start;padding:9px 12px}.shell.collapsed .sidebar-top{flex-direction:row}.shell.collapsed .nav-label{display:inline}.shell.collapsed .nav-count{display:inline}
 .collapse-btn{display:none!important}.scrim{display:block;position:fixed;inset:0;z-index:55;background:rgba(15,23,42,.38);opacity:0;pointer-events:none;transition:opacity .2s}.shell.menu-open .scrim{opacity:1;pointer-events:auto}
 .menu-toggle{display:inline-flex!important}.breadcrumb,.crumb-sep{display:none}.widget-grid .widget{grid-column:span 6!important}.project-grid{grid-template-columns:1fr 1fr}.client-welcome{flex-direction:column;align-items:stretch}.milestone{width:auto;transform:none}}
@media(max-width:640px){
 :root{--topbar:58px}.preview-bar{padding:0 14px}.preview-detail{display:none}.topbar{padding:0 12px;gap:8px}.topbar-left{gap:6px;flex:1}.topbar-left strong{display:none}.topbar-right{gap:4px}.topbar-right .select.sm{max-width:142px;font-size:12.5px;height:34px;padding-left:10px}.profile{width:34px;height:34px}
 .content{padding:18px 14px 0}.page-heading{flex-direction:column;align-items:stretch;gap:14px;margin-bottom:18px}h1{font-size:23px}.page-heading p{font-size:13.5px}.heading-actions{justify-content:stretch}.heading-actions .btn{flex:1}
 .stats,.stats.four{grid-template-columns:1fr 1fr;gap:10px}.metric{padding:13px;flex-direction:column;align-items:flex-start;gap:10px}.metric-icon{width:36px;height:36px;border-radius:10px}.metric-icon .icon{width:18px;height:18px}.metric strong{font-size:22px}.metric-note{display:none}
 .stats:not(.four)>.metric:last-child:nth-child(odd){grid-column:span 2}
 .widget-grid{gap:14px}.panel-head{padding:14px 16px}.panel-body{padding:16px}.panel-body.tight{padding:2px 16px}.list-row{padding:11px 16px}
 .welcome{padding:18px}.welcome h2{font-size:18px}.client-welcome{padding:22px 18px}.client-welcome h2{font-size:24px}.project-grid{grid-template-columns:1fr}
 .chart{height:170px;padding:14px 14px}.bars{gap:3px}
 /* Tables become stacked cards */
 table.stack thead{display:none}table.stack,table.stack tbody,table.stack tr,table.stack td{display:block;width:100%}
 table.stack tr{padding:12px 16px;border-bottom:1px solid var(--border)}table.stack tbody tr:last-child{border-bottom:0}
 table.stack td{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:5px 0;border:0;text-align:right;min-height:30px}table.stack td:before{content:attr(data-label);font-size:11.5px;font-weight:650;letter-spacing:.04em;text-transform:uppercase;color:var(--faint);text-align:left;flex-shrink:0}
 table.stack td:first-child{padding-bottom:8px}table.stack td:first-child:before,table.stack td[data-label=""]:before{display:none}table.stack td:first-child{justify-content:flex-start;text-align:left}table.stack td[data-label=""]{justify-content:flex-end;padding-top:6px}table.stack td[data-label=""] .row-btn{width:100%;justify-content:center;height:36px}
 table.stack .inline-progress{min-width:0;width:60%}
 .toolbar{padding:12px 16px}.search{width:100%}.search input{width:100%}.pills{width:100%;overflow-x:auto;flex-wrap:nowrap;scrollbar-width:none;padding-bottom:2px}
 .integration-grid{grid-template-columns:1fr;gap:10px}
 .customize-bar{top:calc(var(--topbar) + 6px);padding:10px 12px}.customize-title small{display:none}.customize-actions{width:100%}.customize-actions .btn{flex:1}
 .widget-tools{flex-wrap:wrap}.widget-size span{display:none}.widget-size{padding:0 8px}
 .toast-host{top:auto;bottom:calc(env(safe-area-inset-bottom,0px) + 12px);right:12px;left:12px;width:auto;flex-direction:column-reverse}.toast{margin-bottom:0;margin-top:8px}
 .bell-panel{left:8px;right:8px!important;width:auto}
 .matrix thead{display:none}.matrix,.matrix tbody,.matrix tr{display:block;width:100%}.matrix tr{padding:12px 16px;border-bottom:1px solid var(--border)}.matrix tbody tr:last-child{border-bottom:0}.matrix tbody tr:hover,.matrix tbody tr:hover th{background:none}
 .matrix tbody th{display:block;position:static;min-width:0!important;padding:0 0 6px;border:0;background:none}.matrix td{display:flex;align-items:center;justify-content:space-between;padding:6px 0;border:0;min-height:38px}.matrix td:before{content:attr(data-label);font-size:13.5px;font-weight:500;color:var(--text-2)}
 table.stack td:empty{display:none}.segmented{display:grid;grid-template-columns:repeat(3,1fr);width:100%}.segmented span{text-align:center;padding:8px 4px;font-size:12.5px}
 .skin-options{grid-template-columns:1fr}.skin-option{grid-template-columns:70px 1fr;align-items:center}.preview-frame{grid-template-columns:1fr}.preview-side{border-right:0;border-bottom:1px solid var(--border)}.mini-nav{display:flex;overflow-x:auto}
 .logo-uploader{flex-direction:column;align-items:flex-start}.portal-master-row{flex-wrap:wrap}.portal-master-row .badge{display:none}
 .dialog-actions .btn,.confirm-actions .btn{flex:1}dialog{max-width:calc(100vw - 20px)}
 .tabs{margin-bottom:16px}.page-footer{flex-direction:column;gap:2px}
 .status-banner>.count-pill{display:none}.unavailable-card{padding:26px 18px}
}
@media(max-width:380px){.topbar-right .select.sm{max-width:118px}.stats,.stats.four{grid-template-columns:1fr}.stats:not(.four)>.metric:last-child:nth-child(odd){grid-column:auto}}
@media(hover:none){.integration:hover,.metric:hover{transform:none;box-shadow:var(--shadow-sm)}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition:none!important;animation:none!important}.toast-timer{display:none}}

/* Jobs (WorkflowMax) */
.negative{color:var(--red)!important}.pad{padding:14px 20px}.flip{transform:rotate(180deg)}
.metric-icon.red,.icon-tile.red{background:color-mix(in srgb,var(--red) 10%,transparent);color:var(--red)}
.stats.five{grid-template-columns:repeat(5,minmax(0,1fr))}
.sync-pill{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 12px;border-radius:999px;font-size:12.5px;font-weight:600;color:var(--green);background:color-mix(in srgb,var(--green) 9%,var(--surface));border:1px solid color-mix(in srgb,var(--green) 25%,transparent)}.sync-pill .icon{width:15px;height:15px}
.back-link{margin-bottom:10px}.back-link .icon{width:16px;height:16px}
.toolbar-right{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.pill-dot{width:8px;height:8px;border-radius:50%;background:var(--c,var(--accent))}.pill.active .pill-dot{background:var(--on-accent)}
.view-toggle{display:inline-flex;padding:3px;border-radius:var(--r-sm);background:var(--surface-3);border:1px solid var(--border)}.view-toggle button{width:34px;height:30px;border-radius:7px;display:grid;place-items:center;color:var(--muted)}.view-toggle button.active{background:var(--surface);color:var(--text);box-shadow:var(--shadow-sm)}.view-toggle .icon{width:17px;height:17px}
.job-cell{display:flex;flex-direction:column;gap:1px;min-width:0;align-items:flex-start}.job-cell small{font-size:11.5px;font-variant-numeric:tabular-nums;color:var(--faint)}.job-cell strong{font-size:13.5px;line-height:1.35}
.jobs-table td{vertical-align:middle}.jobs-table td:first-child{min-width:240px;white-space:normal}
.flag{display:inline-flex;align-items:center;gap:3px;font-size:11.5px;font-weight:600;margin-top:3px}.flag .icon{width:13px;height:13px}.flag.amber{color:var(--amber)}.flag.red{color:var(--red)}
.client-cell{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}.hs-dot{display:inline-grid;place-items:center;width:18px;height:18px;border-radius:50%;background:#ff7a5918;color:#e8613f}.hs-dot .icon{width:11px;height:11px;stroke-width:2.4}
.state-chip{white-space:nowrap}
.due{display:inline-flex;align-items:center;gap:7px;white-space:nowrap;font-size:13px;color:var(--text-2)}.due .icon{width:16px;height:16px;color:var(--faint)}.due>span{display:flex;flex-direction:column;line-height:1.25}.due small{font-size:11.5px}
.due.soon .icon,.due.soon small{color:var(--amber)}.due.late,.due.late small,.due.late .icon{color:var(--red)}.due.late>span{font-weight:600}.due.done .icon{color:var(--green)}
.budget{display:flex;align-items:center;gap:8px;min-width:110px}.budget-track{flex:1;height:6px;border-radius:6px;background:var(--surface-3);overflow:hidden}.budget-track span{display:block;height:100%;border-radius:6px;background:var(--green)}.budget small{font-size:12px;font-variant-numeric:tabular-nums;min-width:36px;text-align:right}
.budget.warn .budget-track span{background:var(--amber)}.budget.over .budget-track span{background:var(--red)}.budget.over small{color:var(--red);font-weight:650}
.mini-avatar{width:28px;height:28px;border-radius:50%;display:inline-grid;place-items:center;font-size:10.5px;font-weight:700;background:var(--accent-soft);color:var(--accent-ink);flex-shrink:0}
/* Board */
.board{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(250px,1fr);gap:12px;padding:16px;overflow-x:auto;scroll-snap-type:x proximity;background:var(--surface-2);border-radius:0 0 var(--r-lg) var(--r-lg)}
.board-col{scroll-snap-align:start;display:flex;flex-direction:column;gap:8px;min-width:0}.board-col header{display:flex;align-items:center;gap:8px;padding:4px 4px 6px;font-size:13px}.board-col header i{width:9px;height:9px;border-radius:50%;background:var(--c)}.board-col header span{margin-left:auto;font-size:12px;color:var(--muted);background:var(--surface);border:1px solid var(--border);border-radius:999px;padding:0 8px}
.board-cards{display:grid;gap:8px;align-content:start;min-height:60px;padding:6px;border-radius:var(--r);background:color-mix(in srgb,var(--c) 5%,transparent);border-top:3px solid var(--c)}
.job-card{display:grid;gap:4px;text-align:left;padding:12px;border-radius:var(--r-sm);background:var(--surface);border:1px solid var(--border);box-shadow:var(--shadow-sm);transition:box-shadow .15s,transform .15s}.job-card:hover{box-shadow:var(--shadow-md);transform:translateY(-1px)}
.job-card-top{display:flex;align-items:center;justify-content:space-between}.job-card-top small{color:var(--faint);font-size:11.5px}.job-card strong{font-size:13.5px;line-height:1.35}.job-card-client{font-size:12.5px;color:var(--muted)}.job-card-foot{display:flex;align-items:center;gap:8px;margin-top:6px}.job-card-foot .due{font-size:12.5px}.job-card-foot .due small{display:none}
/* Job detail */
.job-hero{padding:16px 20px 18px;margin-bottom:20px}.job-hero-top{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:16px}
.stepper{display:flex;list-style:none;margin:0;padding:0;counter-reset:s}.stepper li{flex:1;display:flex;flex-direction:column;align-items:center;gap:6px;position:relative;text-align:center;min-width:0}
.stepper li:before{content:"";position:absolute;top:13px;right:50%;width:100%;height:2px;background:var(--border-strong);z-index:0}.stepper li:first-child:before{display:none}.stepper li.done:before,.stepper li.current:before{background:var(--accent)}
.step-dot{position:relative;z-index:1;width:28px;height:28px;border-radius:50%;display:grid;place-items:center;font-size:12px;font-weight:700;background:var(--surface);border:2px solid var(--border-strong);color:var(--muted)}.step-dot .icon{width:15px;height:15px;stroke-width:2.6}
.stepper li.done .step-dot{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}.stepper li.current .step-dot{border-color:var(--accent);color:var(--accent-ink);box-shadow:0 0 0 4px var(--accent-soft)}
.step-label{font-size:12px;font-weight:550;color:var(--muted);line-height:1.25}.stepper li.current .step-label{color:var(--text);font-weight:700}
.stepper-hold{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:var(--r-sm);background:var(--surface-3);color:var(--muted)}.stepper-hold strong{display:block;color:var(--text)}
.kv{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:14px 20px;margin:0}.kv>div{min-width:0}.kv dt{font-size:11.5px;font-weight:650;letter-spacing:.04em;text-transform:uppercase;color:var(--faint);margin-bottom:3px}.kv dd{margin:0;font-size:13.5px;color:var(--text);line-height:1.45;overflow-wrap:anywhere}.kv dd small{color:var(--muted)}
.panel-head p{max-width:70ch}
.fin-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.fin-grid>div{padding:12px 14px;border-radius:var(--r-sm);background:var(--surface-2);border:1px solid var(--border)}.fin-grid small{display:block}.fin-grid strong{display:block;font-size:19px;font-variant-numeric:tabular-nums;margin-top:2px}.fin-grid .subtle{font-size:11.5px}
.fin-bars{display:grid;gap:12px;margin-top:16px}.fin-bars>div{display:grid;gap:5px}.fin-bars span{font-size:13px;color:var(--muted)}.fin-bars b{color:var(--text)}
.approval-card.pending{border-color:color-mix(in srgb,var(--amber) 35%,var(--border))}
.milestones{list-style:none;margin:0;padding:12px 20px 16px;display:grid;gap:0}.milestones li{display:flex;gap:12px;position:relative;padding-bottom:14px}.milestones li:last-child{padding-bottom:0}.milestones li:not(:last-child):before{content:"";position:absolute;left:10px;top:22px;bottom:2px;width:2px;background:var(--border)}
.ms-dot{width:22px;height:22px;border-radius:50%;border:2px solid var(--border-strong);background:var(--surface);display:grid;place-items:center;flex-shrink:0;z-index:1;color:#fff}.ms-dot .icon{width:13px;height:13px;stroke-width:2.8}.milestones li.done .ms-dot{background:var(--green);border-color:var(--green)}.milestones li.late .ms-dot{border-color:var(--red)}
.milestones strong{display:block;font-size:13.5px;font-weight:600}.milestones li.done strong{color:var(--muted)}.milestones small{display:block}
table.tasks td{padding:10px 20px}.task-name{display:flex;align-items:center;gap:8px}.task-name .icon{width:16px;height:16px;color:var(--faint)}tr.done .task-name .icon{color:var(--green)}tr.done .task-name{color:var(--muted)}
.notes{display:grid}.note{padding:14px 20px;border-bottom:1px solid var(--border)}.note:last-child{border-bottom:0}.note header{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:6px}.note header strong{font-size:13.5px}.note header .chip{margin-left:auto}.note p{font-size:13.5px;color:var(--text-2);line-height:1.6}.note.public{background:color-mix(in srgb,var(--green) 3%,transparent)}
.hbars{display:grid;gap:4px;padding:14px 20px 18px}.hbar{display:grid;grid-template-columns:180px 1fr 76px;align-items:center;gap:12px;padding:6px 8px;border-radius:8px;text-align:left;font-size:13px}button.hbar:hover{background:var(--surface-2)}.hbar-label{color:var(--text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hbar-track{height:10px;border-radius:6px;background:var(--surface-3);overflow:hidden}.hbar-track span{display:block;height:100%;border-radius:6px;min-width:2px}.hbar strong{text-align:right;font-variant-numeric:tabular-nums}
.list-row.link-row{width:100%;text-align:left;transition:background .12s}.list-row.link-row:hover{background:var(--surface-2)}.list-row .amount{font-variant-numeric:tabular-nums;min-width:80px;text-align:right}
/* Client directory */
.sources{display:inline-flex;align-items:center;gap:5px;flex-wrap:wrap}.src{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-width:26px;height:26px;padding:0 6px;border-radius:7px;background:var(--surface-3);color:var(--faint);font-size:12px;font-weight:600}.src .icon{width:15px;height:15px}.src.on{background:color-mix(in srgb,#13b5a5 12%,transparent);color:#0d8a7e}.src.hs.on{background:#ff7a5918;color:#e8613f}
.sources.lg .src{height:32px;padding:0 10px}
.source-legend{display:flex;gap:12px;font-size:12px;color:var(--muted)}.source-legend span{display:inline-flex;align-items:center;gap:5px}.source-legend .icon{width:15px;height:15px}
.match-review{margin-bottom:20px;border-color:color-mix(in srgb,var(--amber) 35%,var(--border))}.match-pair{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin-bottom:16px}.match-pair>div{flex:1;min-width:200px;display:grid;grid-template-columns:auto 1fr;column-gap:10px;align-items:center;padding:12px 14px;border:1px solid var(--border);border-radius:var(--r-sm);background:var(--surface-2)}.match-pair .src{grid-row:span 2}.match-pair strong{font-size:14px}.match-pair>.icon{color:var(--faint)}
/* Client portal jobs */
.welcome-wordmark{display:block;height:22px;width:auto;margin-bottom:14px}
.cjob-card{padding:18px 20px;display:flex;flex-direction:column;gap:12px}.cjob-top{display:flex;align-items:center;justify-content:space-between;gap:8px}.cjob-top small{font-weight:600;color:var(--muted)}.cjob-card h2{font-size:16px}
.cjob-card .stepper{margin:2px 0}.cjob-card .step-dot{width:22px;height:22px;font-size:10px}.cjob-card .stepper li:before{top:10px}.cjob-card .step-label{font-size:11px}
.cjob-meta{display:flex;flex-wrap:wrap;gap:10px 18px;align-items:flex-start}.meta-item{display:flex;flex-direction:column;font-size:13px;color:var(--text)}.meta-item small{font-size:11px;font-weight:650;text-transform:uppercase;letter-spacing:.04em;color:var(--faint)}
.cjob-alert{display:flex;align-items:center;gap:8px;padding:9px 12px;border-radius:var(--r-sm);font-size:13px;font-weight:600;color:var(--amber);background:color-mix(in srgb,var(--amber) 9%,transparent)}.cjob-alert .icon{width:16px;height:16px}
.cjob-card .project-card-foot{margin-top:auto}
.approval-row{display:flex;align-items:center;gap:12px;padding:14px 20px;border-bottom:1px solid var(--border);flex-wrap:wrap}.approval-row:last-child{border-bottom:0}.approval-actions{display:flex;gap:8px}
.approvals-panel{border-color:color-mix(in srgb,var(--amber) 35%,var(--border))}
.timeline.flush{padding:0}.dialog-body h3{margin:18px 0 8px;font-size:14px}.dialog-body .milestones{padding:4px 0}.dialog-body .stepper{margin:4px 0 8px}
dialog.wide{width:640px}
.field-grid .setting-row .chip{flex-shrink:0}
.hint.compact{margin-top:-4px;font-size:12.5px}.hint.compact:empty{display:none}

/* Colour fields and picker */
.color-field{border:0;padding:0;margin:0;min-width:0}.color-field .swatches{align-items:center;gap:10px}
.swatch-btn{width:34px;height:34px;border-radius:50%;background:var(--swatch,var(--surface-3));border:3px solid var(--surface);box-shadow:0 0 0 1px var(--border-strong);display:grid;place-items:center;color:#fff;transition:transform .15s,box-shadow .15s}.swatch-btn:hover{transform:scale(1.07)}.swatch-btn span{display:grid;place-items:center}.swatch-btn .icon{width:15px;height:15px;stroke-width:2.6;opacity:0}
.swatch-btn.selected{box-shadow:0 0 0 2px var(--swatch,var(--accent))}.swatch-btn.selected .icon{opacity:1}
.swatch-btn[style*="--swatch:#f"] .icon,.swatch-btn[style*="--swatch:#e"] .icon{color:#0f172a}
.swatch-btn.default{background:var(--surface-2);color:var(--muted)}.swatch-btn.default .icon{opacity:1;stroke-width:2}
.swatch-btn.rainbow{background:conic-gradient(from 0deg,#ff3b3b,#ffb02e,#f7ea3a,#3ddc84,#2ec5ff,#4b6bff,#b44bff,#ff3b9d,#ff3b3b);color:#fff}.swatch-btn.rainbow .icon{opacity:1;filter:drop-shadow(0 1px 1px #0006)}.swatch-btn.rainbow.selected{background:var(--swatch);box-shadow:0 0 0 2px var(--swatch),0 0 0 5px var(--surface),0 0 0 6px var(--border-strong)}
.color-value{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;font-weight:600;color:var(--muted);font-variant-numeric:tabular-nums;margin-left:4px}.color-value i{width:12px;height:12px;border-radius:4px;box-shadow:inset 0 0 0 1px #0002}
.color-error{margin-top:6px}
.cp-pop{position:fixed;z-index:2500;width:260px;padding:12px;background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);box-shadow:var(--shadow-lg);display:grid;gap:12px;animation:pop .14s var(--ease)}
.cp-sv{--hue:#f00;position:relative;height:160px;border-radius:10px;background:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,var(--hue));cursor:crosshair;touch-action:none}
.cp-hue{position:relative;height:14px;border-radius:999px;background:linear-gradient(to right,#f00,#ff0,#0f0,#0ff,#00f,#f0f,#f00);cursor:pointer;touch-action:none}
.cp-thumb{position:absolute;width:18px;height:18px;border-radius:50%;border:3px solid #fff;box-shadow:0 0 0 1px #0004,0 2px 6px #0004;transform:translate(-50%,-50%);pointer-events:none}.cp-hue .cp-thumb{top:50%}
.cp-sv:focus-visible,.cp-hue:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.cp-row{display:flex;align-items:center;gap:8px}.cp-preview{width:34px;height:34px;border-radius:9px;box-shadow:inset 0 0 0 1px #0002;flex-shrink:0}.cp-hex{flex:1}.cp-hex input{width:100%;height:34px;border:1px solid var(--border-strong);border-radius:8px;padding:0 10px;font-size:13.5px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;background:var(--surface);text-transform:uppercase}.cp-hex input:focus{outline:none;border-color:var(--accent);box-shadow:var(--ring)}

/* Hover grip for dragging widgets without entering customize mode */
.widget-grip{position:absolute;z-index:6;top:-10px;left:50%;transform:translateX(-50%);width:46px;height:20px;border-radius:999px;display:grid;place-items:center;background:var(--surface);border:1px solid var(--border-strong);box-shadow:var(--shadow-sm);color:var(--muted);cursor:grab;touch-action:none;opacity:0;transition:opacity .15s,color .15s,border-color .15s}
.widget-grip .icon{width:20px;height:20px;stroke-width:3}.widget:hover>.widget-grip,.widget-grip:focus-visible,.widget.dragging>.widget-grip{opacity:1}.widget-grip:hover{color:var(--accent);border-color:var(--accent)}
.widget:hover>.widget-body>.panel,.widget:hover>.widget-body>.welcome{border-color:var(--border-strong)}
@media(hover:none){.widget-grip{display:none}}

@media(max-width:1200px){.stats.five{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:640px){
 .stats.five{grid-template-columns:1fr 1fr}.stats.five>.metric:last-child{grid-column:span 2}
 .toolbar-right{width:100%}.toolbar-right .search{flex:1;width:auto}
 .jobs-table td:first-child{min-width:0}.job-cell{align-items:flex-start}
 .board{grid-auto-columns:82%;padding:12px}
 .stepper .step-label{font-size:10.5px}.step-dot{width:24px;height:24px}.stepper li:before{top:11px}
 .hbar{grid-template-columns:110px 1fr 54px;gap:8px}
 .fin-grid{grid-template-columns:1fr 1fr}.kv{grid-template-columns:1fr 1fr}
 .approval-row{padding:14px 16px}.approval-actions{width:100%}.approval-actions .btn{flex:1}
 .source-legend{display:none}.match-pair>.icon{display:none}
 .cp-pop{left:12px!important;right:12px;width:auto}
 .note header .chip{margin-left:0}
}

.row-chevron{width:32px;height:32px;border-radius:8px;display:inline-grid;place-items:center;color:var(--faint)}.row-chevron .icon{width:18px;height:18px}tr:hover .row-chevron{background:var(--accent-soft);color:var(--accent-ink)}
.last-act{display:flex;flex-direction:column;white-space:nowrap;line-height:1.3}.last-act small{font-size:12px}
.jobs-table td:nth-child(2),.jobs-table td:nth-child(3){white-space:nowrap}
@media(max-width:640px){table.stack td[data-label=""] .row-chevron{width:100%;height:36px;background:var(--accent-soft);color:var(--accent-ink);border:1px solid var(--accent-border)}.last-act{align-items:flex-end}}

.cjob-card .step-label{display:none}.cjob-card .stepper{padding:0 2px}
@media(max-width:640px){
 /* Compact job rows on phones: name, then client/state, then due/budget. */
 table.jobs-table tr{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 12px;align-items:center}
 table.jobs-table td{display:block;padding:0;min-height:0;text-align:left}table.jobs-table td:before{display:none}
 table.jobs-table td:nth-child(1){grid-column:1/-1;padding-bottom:2px}table.jobs-table td:nth-child(2){font-size:13px;color:var(--muted)}table.jobs-table td:nth-child(3){justify-self:end}
 table.jobs-table td:nth-child(4){grid-column:1}table.jobs-table td:nth-child(5){justify-self:end;width:120px}table.jobs-table td:nth-child(6),table.jobs-table td:nth-child(7){display:none}
 table.jobs-table .budget{min-width:0}
}

/* Reports */
.tip{white-space:pre-line;line-height:1.5}
.tab-count{font-size:11.5px;font-weight:650;background:var(--surface-3);color:var(--muted);border-radius:999px;padding:0 7px;margin-left:2px}.tab.active .tab-count{background:var(--accent-soft);color:var(--accent-ink)}
.report-toolbar{padding:12px 16px;display:grid;gap:10px;margin-bottom:16px}.report-toolbar-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.group-label{font-size:11.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--faint)}
.inline-select{display:inline-flex;align-items:center;gap:8px;margin-left:auto;font-size:13px;color:var(--muted)}
.report-range{margin-left:auto;display:inline-flex;align-items:center;gap:6px;font-size:12.5px;color:var(--muted)}.report-range .icon{width:15px;height:15px}
.report-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:20px}
.report-metric{display:grid;grid-template-columns:1fr;gap:4px;align-items:start;position:relative;padding:16px 16px 12px}.report-metric strong{font-size:24px}
.rm-top{display:flex;align-items:center;justify-content:space-between;gap:6px}.rm-info{color:var(--faint);display:inline-flex}.rm-info .icon{width:15px;height:15px}
.rm-foot{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:12px}
.delta{display:inline-flex;align-items:center;gap:3px;font-size:12px;font-weight:700;padding:1px 7px;border-radius:999px;background:var(--surface-3);color:var(--muted)}.delta.up{color:var(--green);background:color-mix(in srgb,var(--green) 10%,transparent)}.delta.down{color:var(--red);background:color-mix(in srgb,var(--red) 9%,transparent)}
.spark{display:block;margin-top:6px;width:100%;height:28px}.spark path{fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.chart-host{position:relative;width:100%;min-width:0}.chart-host svg{display:block;overflow:visible}
.chart-host .grid{stroke:var(--border);stroke-width:1}.chart-host .axis{font-size:11px;fill:var(--faint);font-variant-numeric:tabular-nums}
.chart-host .line{fill:none;stroke-width:2.4;stroke-linejoin:round;stroke-linecap:round}.chart-host .line.dashed{stroke-dasharray:5 5;stroke-width:2;opacity:.55}
.chart-host .area{opacity:.09}.chart-host .dot{fill:var(--surface);stroke-width:2}.chart-host .bar.ghost{opacity:.3}
.chart-host .hit{fill:transparent;cursor:crosshair}.chart-host .hit:hover{fill:color-mix(in srgb,var(--accent) 7%,transparent)}
.chart-legend{display:flex;flex-wrap:wrap;gap:6px 16px;margin-top:10px;font-size:12.5px;color:var(--muted)}.chart-legend span{display:inline-flex;align-items:center;gap:6px}.chart-legend i{width:14px;height:4px;border-radius:2px;background:var(--c)}.chart-legend i.dashed{background:repeating-linear-gradient(90deg,var(--c) 0 4px,transparent 4px 7px);opacity:.7}
.hbar strong small{display:block;font-size:11px;color:var(--faint);font-weight:500}
.report-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px}.report-kpi{padding:14px;border-radius:var(--r-sm);border:1px solid var(--border);background:var(--surface-2);display:grid;gap:4px}.report-kpi span{font-size:13px;color:var(--muted)}.report-kpi strong{font-size:22px;font-variant-numeric:tabular-nums}.report-kpi small{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.report-table{max-height:360px;overflow:auto}.report-table td{font-variant-numeric:tabular-nums;text-align:right}.report-table td:first-child,.report-table th:first-child{text-align:left}.report-table thead th{position:sticky;top:0;z-index:1}
.pinned-report{height:100%;display:flex;flex-direction:column}.pinned-report .panel-body{flex:1}.pinned-actions{display:flex;gap:2px}
.widget-grid[data-layout=pinned]{margin-bottom:20px}
/* Saved reports workspace */
.report-workspace{display:grid;grid-template-columns:300px minmax(0,1fr);gap:20px;align-items:start}
.report-library{position:sticky;top:calc(var(--topbar) + 16px)}.library-tools{display:grid;gap:10px;padding:12px 14px;border-bottom:1px solid var(--border)}.library-tools .search{width:100%}.library-tools .search input{width:100%}.segmented.sm{width:100%;display:grid;grid-template-columns:repeat(3,1fr)}.segmented.sm span{text-align:center;padding:6px 8px;font-size:12.5px}
.library-list{display:grid;padding:6px;max-height:60vh;overflow:auto}.library-item{display:grid;gap:2px;text-align:left;padding:10px 12px;border-radius:var(--r-sm);transition:background .12s}.library-item:hover{background:var(--surface-2)}.library-item.active{background:var(--accent-soft)}.library-item.active strong{color:var(--accent-ink)}
.library-item strong{font-size:13.5px}.library-item small{display:flex;align-items:center;gap:5px}.library-item small .icon{width:13px;height:13px}
.report-form{border-bottom:1px solid var(--border)}.report-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.report-grid .span-2{grid-column:span 2}
.chart-types{display:grid;grid-template-columns:repeat(4,1fr);width:100%}.chart-types span{display:flex!important;align-items:center;justify-content:center;gap:6px}.chart-types .icon{width:16px;height:16px}
.report-vars legend small{font-weight:400;color:var(--muted);margin-left:6px}
.var-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:14px}.var-group{display:grid;gap:4px;align-content:start}.var-group .eyebrow{margin:0 0 2px}
.var-item{display:flex!important;grid-template-columns:none!important;align-items:flex-start;gap:9px!important;padding:8px 10px;border-radius:var(--r-sm);border:1px solid var(--border);cursor:pointer;font-weight:400!important;transition:border-color .12s,background .12s}.var-item:hover{background:var(--surface-2)}.var-item:has(input:checked){border-color:var(--accent);background:var(--accent-soft)}
.var-item input{margin:2px 0 0;accent-color:var(--accent);width:16px;height:16px;flex-shrink:0}.var-item strong{display:block;font-size:13px;color:var(--text);font-weight:600}.var-item small{display:block;font-size:11.5px;line-height:1.35}
.report-filters summary{cursor:pointer;display:inline-flex;align-items:center;gap:6px;font-size:13px;font-weight:650;color:var(--text-2);padding:4px 0}.report-filters summary .icon{width:16px;height:16px}.report-filters[open] summary{margin-bottom:12px}
.report-actions{flex-wrap:wrap}.save-state.dirty{opacity:1!important;color:var(--amber);animation:none}
.report-preview{padding:16px 20px 20px;background:var(--surface-2);border-radius:0 0 var(--r-lg) var(--r-lg)}.preview-head{display:flex;align-items:center;gap:8px;margin-bottom:12px;flex-wrap:wrap}.preview-head .icon{width:17px;height:17px;color:var(--accent)}.preview-head .subtle{margin-left:auto}
#report-preview{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:14px}
@media(max-width:1200px){.report-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:1024px){.report-workspace{grid-template-columns:1fr}.report-library{position:static}.library-list{max-height:240px}}
@media(max-width:640px){
 .report-toolbar .pills{flex-wrap:nowrap;overflow-x:auto}.inline-select,.report-range{margin-left:0}.report-toolbar-row .select.sm{flex:1;min-width:0;max-width:none}
 .report-kpi-grid{gap:10px}.report-metric{padding:12px}.report-metric strong{font-size:19px}
 .report-grid{grid-template-columns:1fr}.report-grid .span-2{grid-column:auto}.chart-types{grid-template-columns:repeat(2,1fr)}
 .report-preview{padding:12px}#report-preview{padding:10px}.preview-head .subtle{margin-left:0;width:100%}
 .report-actions .btn{flex:1 1 45%}
}

.report-toolbar{grid-template-columns:minmax(0,1fr)}.report-toolbar-row{min-width:0}.report-toolbar .pills{min-width:0;max-width:100%}
.pill{white-space:nowrap;flex-shrink:0}
@media(max-width:640px){.report-toolbar-row .select.sm{flex:1 1 100%}.report-toolbar-row .group-label{width:100%}.inline-select{width:100%}.inline-select .select.sm{flex:1}}

/* Team member profile */
.member-hero{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;padding:18px 20px;margin-bottom:18px}
.member-id{display:flex;align-items:center;gap:16px;min-width:0}.member-id h2{font-size:19px}.member-id p{color:var(--muted);font-size:13.5px;margin-top:2px;overflow-wrap:anywhere}
.avatar.xl{width:60px;height:60px;font-size:19px}
.member-chips{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:8px}.member-chips .subtle{display:inline-flex;align-items:center;gap:4px}.member-chips .subtle .icon{width:14px;height:14px}
.member-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.member-actions .inline-select{margin-left:0}
.member-period{display:flex;align-items:center;gap:10px 14px;flex-wrap:wrap;margin-bottom:14px}.member-period .inline-select{margin-left:auto}
.section-h{display:inline-flex;align-items:center;gap:8px;font-size:16px;margin-right:6px}.section-h .icon{color:var(--accent)}
.member-kpis{grid-template-columns:repeat(4,minmax(0,1fr))}.member-kpis .metric-note{flex-wrap:wrap}
.unit-hint{font-weight:400;color:var(--muted);font-size:13px}
.combo-legend{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px}
.legend-btn{display:inline-flex;align-items:center;gap:7px;height:30px;padding:0 10px;border-radius:999px;border:1px solid var(--border);background:var(--surface);font-size:12.5px;font-weight:550;color:var(--text-2);transition:opacity .15s,background .15s}.legend-btn:hover{background:var(--surface-2)}
.legend-btn b{font-variant-numeric:tabular-nums;color:var(--text);font-weight:700}.legend-btn i{width:11px;height:11px;border-radius:3px;background:var(--c)}.legend-btn i.line{height:3px;width:14px;border-radius:2px}.legend-btn i.dashed{background:repeating-linear-gradient(90deg,var(--c) 0 4px,transparent 4px 7px)}
.legend-btn[aria-pressed=false]{opacity:.42}.legend-btn[aria-pressed=false] b{text-decoration:line-through}
.chart-host .partial{fill:var(--surface-3);opacity:.7}
.collapsible .collapse-toggle .icon{transition:transform .2s}.collapsible.collapsed .collapse-toggle .icon{transform:rotate(180deg)}.collapsible.collapsed .collapse-body{display:none}.collapsible.collapsed .panel-head{border-bottom:0}
.collapse-body{max-height:460px;overflow-y:auto;scrollbar-width:thin}
.activity{list-style:none;margin:0;padding:8px 20px 14px;display:grid}.activity li{display:flex;gap:12px;padding:10px 0;position:relative}.activity li:not(:last-child):before{content:"";position:absolute;left:15px;top:42px;bottom:-2px;width:2px;background:var(--border)}
.tl-icon{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;flex-shrink:0;background:color-mix(in srgb,var(--c) 12%,transparent);color:var(--c)}.tl-icon .icon{width:16px;height:16px}
.activity li>div{min-width:0;font-size:13.5px;line-height:1.5;color:var(--text-2)}.activity small{display:block;margin-top:2px}
.text-btn.inline{display:inline;padding:0;font-size:inherit;white-space:normal;text-align:left}
.access-list{list-style:none;margin:0;padding:12px 20px 18px;display:grid;gap:8px}.access-list li{display:flex;align-items:center;gap:9px;font-size:13.5px;color:var(--muted)}.access-list li .icon{width:16px;height:16px;color:var(--faint)}.access-list li.on{color:var(--text)}.access-list li.on .icon{color:var(--green)}
.row-tools{display:inline-flex;align-items:center;gap:2px}
.team-table td:nth-child(4),.team-table td:nth-child(5){font-variant-numeric:tabular-nums}
@media(max-width:1200px){.member-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.hide-sm{display:none}.member-period .inline-select{margin-left:0;width:100%}.member-period .pills{width:100%}.member-actions{width:100%}.member-actions .btn{flex:1}.member-kpis{grid-template-columns:1fr 1fr}.member-hero{padding:16px}.avatar.xl{width:52px;height:52px}
 table.stack td[data-label=""] .row-tools{width:100%;justify-content:flex-end}table.stack td[data-label=""] .row-tools .row-chevron{width:auto;flex:1}
 .activity{padding:6px 16px 12px}.combo-legend{gap:5px}.legend-btn{height:28px;font-size:12px;padding:0 8px}}

.member-title{color:var(--text)!important;font-size:15px!important;font-weight:650}
.collapse-body .list-main strong{white-space:normal;line-height:1.35}.collapse-body .list-row{align-items:center}
.hbar{grid-template-columns:180px minmax(0,1fr) auto}.hbar strong{min-width:70px}.hbar strong small{white-space:nowrap}
.collapsible .panel-head{flex-wrap:wrap}
@media(max-width:640px){.hbar{grid-template-columns:104px minmax(0,1fr) auto}.collapsible .panel-head .inline-select{order:5;width:100%}.collapsible .panel-head .inline-select .select{flex:1;max-width:none}}
@media(max-width:640px){.collapse-body .list-row{flex-wrap:wrap;row-gap:6px}.collapse-body .list-row .list-main{flex:1 1 100%}}

/* Report KPI cards: sparkline sits beside the value and change, not under them. */
.report-metric{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"top top" "value spark" "foot spark";column-gap:12px;row-gap:4px;align-items:center}
.report-metric .rm-top{grid-area:top}.report-metric>strong{grid-area:value}.report-metric .rm-foot{grid-area:foot}
.report-metric .spark{grid-area:spark;width:96px;height:40px;margin:0;align-self:end}
@media(max-width:640px){.report-metric{grid-template-areas:"top top" "value value" "foot foot" "spark spark"}.report-metric .spark{width:100%;height:26px;margin-top:4px}}
.report-metric .rm-foot{flex-wrap:nowrap;white-space:nowrap;min-width:0}.report-metric .rm-foot .subtle{overflow:hidden;text-overflow:ellipsis;min-width:0}
@media(min-width:641px){.report-metric .spark{width:84px;height:38px}}

/* Plans and billing */
.plan-features{list-style:none;margin:0 0 14px;padding:0;display:grid;gap:7px}.plan-features li{display:flex;gap:8px;align-items:center;font-size:13.5px}.plan-features .icon{width:16px;height:16px;color:var(--green)}
.mini-h{font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--faint);margin:16px 0 8px}
.plan-history{list-style:none;margin:0;padding:0;display:grid;gap:6px}.plan-history li{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--muted)}
.usage-list{display:grid;gap:16px}.usage-row>div:first-child{display:flex;justify-content:space-between;font-size:13.5px;margin-bottom:6px}.usage-row strong{font-variant-numeric:tabular-nums}
.usage-bar{height:8px;border-radius:6px;background:var(--surface-3);overflow:hidden}.usage-bar span{display:block;height:100%;border-radius:6px;background:var(--accent)}.usage-bar.warn span{background:var(--amber)}.usage-bar.over span{background:var(--red)}
.token-head{display:grid;gap:6px;margin-bottom:14px}.token-head strong{font-size:22px;font-variant-numeric:tabular-nums}.token-head strong span{font-size:14px;font-weight:500;color:var(--muted)}
.total-row{background:var(--surface-2)}.total-row strong{font-size:14.5px}
.check-label{display:flex!important;align-items:center;gap:8px!important;grid-template-columns:none!important;align-self:end;padding-bottom:10px}.check-label input{width:16px;height:16px;accent-color:var(--accent)}
.invoices-table td:nth-child(n+5){white-space:nowrap}.invoices-table .row-tools{gap:6px}
.plan-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.plan-option{position:relative;display:block!important;cursor:pointer}.plan-option input{position:absolute;opacity:0;inset:0;z-index:1;cursor:pointer;margin:0}
.plan-option-body{display:grid;gap:6px;height:100%;padding:14px;border:1.5px solid var(--border-strong);border-radius:var(--r);transition:border-color .15s,box-shadow .15s;font-weight:400}.plan-option-body strong{font-size:22px}.plan-option-body strong small{font-size:12px;font-weight:500;margin-left:3px}
.plan-option-body ul{list-style:none;margin:6px 0 0;padding:0;display:grid;gap:5px;font-size:12.5px;color:var(--text-2)}.plan-option-body li{display:flex;gap:6px;align-items:flex-start}.plan-option-body .icon{width:14px;height:14px;color:var(--green);margin-top:2px}
.plan-option input:checked+.plan-option-body{border-color:var(--accent);box-shadow:var(--ring)}.plan-option input:focus-visible+.plan-option-body{outline:2px solid var(--accent);outline-offset:2px}
/* Invoice and receipt document */
.invoice-doc{border:1px solid var(--border);border-radius:var(--r);padding:20px;background:#fff;color:#0f172a}
.invoice-doc header{display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap;padding-bottom:16px;border-bottom:2px solid #0f172a}
.inv-from{display:flex;align-items:center;gap:10px}.inv-from strong{display:block;font-size:16px}.inv-from small{color:#64748b}.invoice-doc .pairwise-symbol{color:#0f172a}
.inv-title{text-align:right;display:grid;justify-items:end;gap:4px}.inv-title h3{font-size:18px;letter-spacing:.02em;text-transform:uppercase}.inv-title>span{font-family:ui-monospace,Menlo,monospace;font-size:13px;color:#334155}
.inv-meta{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:16px 0}.inv-meta small{display:block;color:#64748b;font-size:11.5px;text-transform:uppercase;letter-spacing:.05em;font-weight:650}.inv-meta strong{display:block;font-size:14px;margin-top:2px}.inv-meta div>small:last-child{text-transform:none;letter-spacing:0;font-weight:400}
.inv-to{display:flex;align-items:center;gap:8px;margin-top:4px}.inv-to small{text-transform:none!important;letter-spacing:0!important;font-weight:400!important}
.inv-lines{width:100%;border-collapse:collapse;font-size:13.5px}.inv-lines th{background:none;border-top:0;padding:8px 0;font-size:11.5px;color:#64748b}.inv-lines th:last-child,.inv-lines td:last-child{text-align:right;white-space:nowrap}
.inv-lines td{padding:9px 0;color:#0f172a;border-bottom:1px solid #e6eaf2}.inv-lines tr.credit td{color:#16805f}.inv-lines tfoot td{border:0;padding:5px 0;color:#334155}.inv-lines tfoot tr.total td{font-size:16px;font-weight:700;color:#0f172a;padding-top:10px;border-top:2px solid #0f172a}
.invoice-doc footer{margin-top:16px;padding:10px 12px;border-radius:8px;background:#f8fafd;font-size:13px;color:#334155;display:flex;gap:8px;align-items:center}.invoice-doc footer .icon{width:16px;height:16px}
.invoice-doc.receipt header{border-bottom-color:#16805f}.invoice-doc.receipt footer{background:#e8f6f0;color:#0f6b4d}
@media print{body.printing>*:not(#modal){display:none!important}body.printing #modal{position:static;box-shadow:none;border:0;width:auto;max-width:none;max-height:none;overflow:visible}body.printing #modal::backdrop{display:none}body.printing .dialog-head,body.printing .no-print{display:none!important}body.printing .dialog-scroll{overflow:visible}body.printing .invoice-doc{border:0}}
/* AI assistant (Max) */
.ask-btn{gap:6px}.ask-btn .icon{width:15px;height:15px}
.assistant{position:fixed;z-index:1200;top:calc(36px + var(--topbar) + 8px);right:16px;bottom:16px;width:min(400px,calc(100vw - 32px));display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);box-shadow:var(--shadow-lg);animation:pop .16s var(--ease);overflow:hidden}
.assistant header{display:flex;align-items:center;gap:10px;padding:12px 12px 12px 16px;border-bottom:1px solid var(--border)}.assistant header>div{flex:1;min-width:0}.assistant header strong{display:block;font-size:14.5px}.assistant header small{display:block}
.assist-mark{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;background:linear-gradient(135deg,#7c4fb0,var(--accent));color:#fff}.assist-mark .icon{width:17px;height:17px}
.assist-log{flex:1;overflow-y:auto;padding:14px;display:flex;flex-direction:column;gap:10px;scrollbar-width:thin}
.msg{max-width:88%;padding:10px 12px;border-radius:14px;font-size:13.5px;line-height:1.5}.msg p{margin:0}.msg p+p,.msg ul+p{margin-top:6px}.msg ul{margin:6px 0 0;padding-left:18px;display:grid;gap:4px}
.msg.bot{align-self:flex-start;background:var(--surface-2);border:1px solid var(--border);border-bottom-left-radius:4px}.msg.me{align-self:flex-end;background:var(--accent);color:var(--on-accent);border-bottom-right-radius:4px}
.assist-suggest{display:flex;gap:6px;overflow-x:auto;padding:8px 14px;border-top:1px solid var(--border);scrollbar-width:none}
.chip-btn{flex-shrink:0;white-space:nowrap;height:30px;padding:0 11px;border-radius:999px;border:1px solid var(--border-strong);background:var(--surface);font-size:12.5px;font-weight:550;color:var(--text-2)}.chip-btn:hover{border-color:var(--accent);color:var(--accent-ink)}
.assist-form{display:flex;gap:8px;padding:10px 14px}.assist-form input{flex:1;min-width:0;height:38px;border:1px solid var(--border-strong);border-radius:999px;padding:0 14px;background:var(--surface);font-size:14px}.assist-form input:focus{outline:none;border-color:var(--accent);box-shadow:var(--ring)}.assist-form .btn{height:38px;width:38px;padding:0;border-radius:50%}
.assist-note{display:flex;align-items:center;gap:6px;font-size:11.5px;color:var(--faint);padding:0 14px 12px}.assist-note .icon{width:13px;height:13px}
@media(max-width:860px){.plan-options{grid-template-columns:1fr}.inv-meta{grid-template-columns:1fr 1fr}}
@media(max-width:640px){.assistant{inset:0;width:auto;border-radius:0;top:0}.ask-btn span{display:none}.ask-btn{width:34px;padding:0}.inv-meta{grid-template-columns:1fr}.inv-title{text-align:left;justify-items:start}.invoice-doc{padding:14px}.invoices-table .row-tools{flex-wrap:wrap;justify-content:flex-end}}

.token-head strong{display:block}.invoices-table td:first-child{white-space:nowrap}

a.text-btn.inline{display:inline;white-space:normal}

/* View as client */
.viewas-btn .icon{width:16px;height:16px}
.viewas-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:8px 32px;background:color-mix(in srgb,var(--accent) 9%,var(--surface));border-bottom:1px solid var(--accent-border);font-size:13px;position:sticky;top:var(--topbar);z-index:19}
.viewas-bar>.icon{color:var(--accent);width:18px;height:18px}.viewas-text{flex:1;min-width:200px}.viewas-ro{color:var(--accent-ink);font-weight:650}.viewas-bar .select.sm{height:32px}
.viewas-list{display:grid;max-height:50vh;overflow:auto;margin-top:12px;border:1px solid var(--border);border-radius:var(--r)}.viewas-item{display:flex;align-items:center;gap:12px;padding:10px 14px;text-align:left;border-bottom:1px solid var(--border)}.viewas-item:last-child{border-bottom:0}.viewas-item:hover{background:var(--surface-2)}.viewas-item>.icon{width:16px;color:var(--faint)}
.search.wide{width:100%}.search.wide input{width:100%}
/* Settings tabs */
.settings-tabs{margin-bottom:20px}.settings-save{display:flex;justify-content:flex-end;min-height:0}.settings-save .save-state{margin:-10px 0 6px}
/* News */
.news-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:20px;align-items:start}
.post-list{display:grid}.post-card{display:grid;border-bottom:1px solid var(--border)}.post-list .post-card:last-child{border-bottom:0}.post-card.pinned{background:color-mix(in srgb,var(--accent) 4%,var(--surface))}
.post-image{width:100%;max-height:240px;object-fit:cover;display:block}.post-body{padding:16px 20px;display:grid;gap:6px}.post-body h3{font-size:16px}.post-body p{font-size:13.5px;color:var(--text-2);line-height:1.6}
.post-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.post-from{font-size:12px;font-weight:700;color:var(--accent-ink);text-transform:uppercase;letter-spacing:.05em}
.post-card.compact{border:0;border-bottom:1px solid var(--border)}.post-card.compact .post-body{padding:12px 0}.post-card.compact h3{font-size:14.5px}
.headline-list{display:grid}.headline{padding:14px 20px;border-bottom:1px solid var(--border);display:grid;gap:5px}.headline:last-child{border-bottom:0}.headline h3{font-size:15px;line-height:1.35}.headline p{font-size:13.5px;color:var(--text-2);line-height:1.55}
.headline-meta{display:flex;align-items:center;gap:8px;font-size:12px}.headline-meta strong{color:var(--text-2)}.headline-tags{display:flex;flex-wrap:wrap;gap:5px}.tag{font-size:11.5px;font-weight:600;color:var(--muted);background:var(--surface-3);border-radius:999px;padding:1px 8px}
.headline.compact{padding:10px 0}.headline.compact h3{font-size:14px}
.feed-note{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--faint);padding:10px 20px 14px;border-top:1px solid var(--border)}.feed-note .icon{width:14px;height:14px}
.news-widget{display:grid;grid-template-columns:1fr 1fr;gap:6px 24px;padding:4px 20px 10px}.news-widget .headline-list .headline{padding:10px 0}
.owner-posts{display:grid;gap:16px}.owner-post{overflow:hidden}.owner-post-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:10px 14px;border-bottom:1px solid var(--border);background:var(--surface-2)}.owner-post-head .subtle{display:inline-flex;align-items:center;gap:5px}.owner-post-head .subtle .icon{width:14px;height:14px}.owner-post-head .pinned-actions{margin-left:auto;gap:6px}
.topic-chips{display:flex;flex-wrap:wrap;gap:5px}.topic-chip{display:inline-flex;align-items:center;gap:4px;height:28px;padding:0 10px;border-radius:999px;border:1px solid var(--border-strong);background:var(--surface);font-size:12px;font-weight:550;color:var(--muted)}.topic-chip .icon{width:13px;height:13px}.topic-chip.on{background:var(--accent-soft);border-color:var(--accent);color:var(--accent-ink)}.topics-table td:nth-child(2){white-space:normal;min-width:320px}
.headline-admin{display:grid}.headline-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;border-bottom:1px solid var(--border)}.headline-row:last-child{border-bottom:0}.headline-row .headline{border:0}.headline-row.is-hidden .headline{opacity:.45}.headline-actions{display:flex;flex-direction:column;align-items:flex-end;gap:6px;padding:0 20px}
.post-image-field{display:flex;gap:14px;align-items:flex-start;padding:12px;border:1px dashed var(--border-strong);border-radius:var(--r)}.post-image-preview{width:120px;height:80px;border-radius:8px;background:var(--surface-3);display:grid;place-items:center;overflow:hidden;flex-shrink:0;color:var(--faint)}.post-image-preview img{width:100%;height:100%;object-fit:cover}.post-image-field strong{font-size:13.5px}
.audience-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:4px 12px;margin-top:8px}.audience-list .check-label{padding:0;font-weight:400;font-size:13px}
/* Inspirations */
.idea-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:16px;margin-bottom:20px}
.idea-card{position:relative;background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);overflow:hidden;display:flex;flex-direction:column;box-shadow:var(--shadow-sm);transition:box-shadow .2s,transform .2s}.idea-card:hover{box-shadow:var(--shadow-md);transform:translateY(-2px)}
.idea-art{position:relative;height:130px;overflow:hidden;display:grid;place-items:center;background:linear-gradient(135deg,color-mix(in srgb,var(--c) 85%,#000),color-mix(in srgb,var(--c) 55%,#fff));color:#fff}.idea-art>.icon{width:44px;height:44px;stroke-width:1.4;position:relative;z-index:1;opacity:.95}
.idea-shape{position:absolute;border-radius:50%;background:#ffffff26}.idea-shape.a{width:160px;height:160px;right:-40px;top:-60px}.idea-shape.b{width:90px;height:90px;left:-20px;bottom:-30px;background:#00000014}
.idea-save{position:absolute;top:10px;right:10px;z-index:2;width:34px;height:34px;border-radius:10px;display:grid;place-items:center;background:#ffffffe6;color:var(--muted);box-shadow:var(--shadow-sm)}.idea-save .icon{width:16px;height:16px}.idea-save.on{background:var(--accent);color:var(--on-accent)}
.idea-body{padding:14px 16px 16px;display:grid;gap:6px;align-content:start;flex:1}.idea-body h3{font-size:16px}.idea-body p{font-size:13.5px;color:var(--text-2);line-height:1.55}.idea-body .text-btn{justify-self:start;margin-top:4px}
.idea-mini{display:grid;gap:2px;padding:6px 12px 12px}.idea-mini-item{display:flex;align-items:center;gap:12px;text-align:left;padding:8px;border-radius:var(--r-sm)}.idea-mini-item:hover{background:var(--surface-2)}.idea-mini-item .idea-art{width:64px;height:48px;border-radius:9px;flex-shrink:0}.idea-mini-item .idea-art>.icon{width:20px;height:20px}.idea-mini-item .idea-shape{display:none}.idea-mini-item strong{display:block;font-size:13.5px}.idea-mini-item small{display:block}
/* Delivery, spend and storage */
.delivery{display:grid;gap:10px}.delivery-head{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}.delivery-head strong{font-size:20px;font-variant-numeric:tabular-nums}.delivery-head span{color:var(--muted);font-size:13px}.delivery-head .delivery-pct{margin-left:auto;font-weight:700;color:var(--green)}
.delivery-table{width:100%;font-size:13px}.delivery-table th{background:none;border-top:0;padding:6px 0;text-align:left}.delivery-table td{padding:7px 0;border-bottom:1px solid var(--border);color:var(--text-2)}.delivery-table td:last-child,.delivery-table th:last-child{text-align:right}
.cjob-delivery{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:6px 8px;font-size:13px;color:var(--text-2)}.cjob-delivery>.icon{width:16px;height:16px;color:var(--green)}.cjob-delivery .usage-bar{grid-column:1/-1;height:6px}
.big-number{display:block;font-size:28px;font-weight:700;letter-spacing:-.5px;font-variant-numeric:tabular-nums}.big-number small{font-size:13px;font-weight:500;color:var(--muted);letter-spacing:0}
.mini-bars{display:flex;align-items:flex-end;gap:10px;height:90px;margin-top:14px}.mini-bars>div{flex:1;height:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:4px}.mini-bars span{width:100%;max-width:46px;border-radius:6px 6px 0 0;background:var(--accent);opacity:.85}
.fin-grid.three{grid-template-columns:repeat(3,minmax(0,1fr));margin-top:12px}
.sku-detail{position:sticky;top:calc(var(--topbar) + 16px);align-self:start}
tr.selected{background:var(--accent-soft)!important}tr.selected td:first-child{box-shadow:inset 3px 0 0 var(--accent)}
.list.flush .list-row{padding:10px 0}.list-row .amount small{font-size:11px;font-weight:500;color:var(--muted)}
@media(max-width:1024px){.news-layout,.news-widget{grid-template-columns:1fr}.sku-detail{position:static}}
@media(max-width:640px){.viewas-bar{padding:8px 14px;top:var(--topbar)}.viewas-bar .btn span{display:none}.viewas-bar .btn{width:34px;padding:0}.viewas-btn span{display:none}.viewas-btn{width:34px;padding:0}
 .headline-row{grid-template-columns:1fr}.headline-actions{flex-direction:row;justify-content:space-between;padding:0 20px 12px;align-items:center}.topics-table td:nth-child(2){min-width:0}.post-image-field{flex-direction:column}.fin-grid.three{grid-template-columns:1fr 1fr 1fr}.idea-grid{grid-template-columns:1fr}}

.sidebar-top+.nav-heading,.sidebar-top+nav{margin-top:22px}.nowrap{white-space:nowrap}#stock-rows td:last-child .chip{white-space:nowrap}

.delta{white-space:nowrap}

/* Real headlines with publisher images */
.headline.has-image{grid-template-columns:150px minmax(0,1fr);column-gap:16px;align-items:start}.headline.has-image>.hl-text{display:grid;gap:5px;min-width:0}.hl-text{display:grid;gap:5px;min-width:0}
.hl-thumb{display:block;width:150px;aspect-ratio:3/2;border-radius:10px;overflow:hidden;background:var(--surface-3)}.hl-img{width:100%;height:100%;object-fit:cover;display:block}
.headline h3 a{color:inherit}.headline h3 a:hover{color:var(--accent-ink);text-decoration:underline}
.headline-tags{align-items:center}.read-on{margin-left:auto;font-size:12.5px}.read-on .icon{width:14px;height:14px}
@media(max-width:640px){.headline.has-image{grid-template-columns:1fr}.hl-thumb{width:100%;aspect-ratio:16/9}.read-on{margin-left:0}}

/* Real stories in widgets and inspirations */
.lead-story{display:grid;gap:6px;padding:4px 0 12px;border-bottom:1px solid var(--border)}.lead-img{width:100%!important;aspect-ratio:16/9;border-radius:var(--r)}.lead-story h3{font-size:16.5px;line-height:1.35}.lead-story h3 a{color:inherit}.lead-story h3 a:hover{color:var(--accent-ink);text-decoration:underline}.lead-story p{font-size:13.5px;color:var(--text-2);line-height:1.55}
.headline.compact.has-image{grid-template-columns:72px minmax(0,1fr);column-gap:12px}.headline.compact .hl-thumb{width:72px;border-radius:8px}
.widget-posts{display:grid;align-content:start}.widget-posts .eyebrow{margin:6px 0 0}
.news-widget{grid-template-columns:minmax(0,1.3fr) minmax(0,1fr)}.news-widget+.feed-note{border-top:1px solid var(--border)}
.idea-photo{position:relative;display:block;height:170px;width:100%!important;border-radius:0;aspect-ratio:auto;background:color-mix(in srgb,var(--c) 30%,var(--surface-3))}.idea-photo::after{content:"";position:absolute;inset:auto 0 0 0;height:4px;background:var(--c)}
.idea-body h3 a{color:inherit}.idea-body h3 a:hover{color:var(--accent-ink);text-decoration:underline}.idea-source{color:var(--faint)}.idea-actions{display:flex;flex-wrap:wrap;gap:4px 14px;align-items:center;margin-top:2px}.idea-actions .read-on{margin-left:0}
.idea-mini-photo{width:64px!important;height:48px;border-radius:9px;flex-shrink:0;aspect-ratio:auto}

.idea-photo.img-failed{background:linear-gradient(135deg,color-mix(in srgb,var(--c) 85%,#000),color-mix(in srgb,var(--c) 55%,#fff))}

/* Overview: News and Inspirations side by side */
.clamp-2,.story-text strong,.lead-text strong,.tile-text strong,.bp-post small{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden}
.clamp-2,.story-text strong,.tile-text strong,.bp-post small{-webkit-line-clamp:2}.lead-text strong{-webkit-line-clamp:3}.bp-post small{-webkit-line-clamp:1}
.news-card,.ideas-card{display:flex;flex-direction:column}
.bp-post{display:grid;gap:3px;text-align:left;margin:14px 20px 0;padding:10px 12px;border-radius:var(--r-sm);background:var(--accent-soft);border-left:3px solid var(--accent);transition:background .15s}.bp-post:hover{background:var(--accent-soft-2)}
.bp-label{display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--accent-ink)}.bp-label .icon{width:13px;height:13px}.bp-post strong{font-size:13.5px}.bp-post small{font-size:12.5px;color:var(--text-2)}
.lead-card{display:grid;grid-template-columns:44% minmax(0,1fr);gap:14px;margin:14px 20px 4px;align-items:start;color:inherit}.lead-card:hover strong{color:var(--accent-ink);text-decoration:underline}
.lead-photo{width:100%!important;aspect-ratio:4/3;border-radius:10px}.lead-text{display:grid;gap:4px;min-width:0}.lead-text small{font-size:12px;color:var(--muted);font-weight:600}.lead-text strong{font-size:15px;line-height:1.35}.lead-text .clamp-2{font-size:13px;color:var(--text-2);line-height:1.5}
.lead-card:not(:has(.lead-photo)){grid-template-columns:1fr}
.story-list{display:grid;padding:4px 20px 8px}
.story-row{display:flex;align-items:center;gap:12px;padding:9px 0;border-top:1px solid var(--border);color:inherit}.story-row:hover strong{color:var(--accent-ink);text-decoration:underline}
.hl-thumb.mini{width:56px!important;height:42px;aspect-ratio:auto;border-radius:7px;flex-shrink:0}
.src-tile{width:56px;height:42px;border-radius:7px;flex-shrink:0;display:grid;place-items:center;background:var(--surface-3);color:var(--muted);font-size:12px;font-weight:700;letter-spacing:.04em}
.story-text{display:grid;gap:2px;min-width:0}.story-text strong{font-size:13.5px;line-height:1.35}.story-text small{font-size:11.5px}
.news-card .feed-note{margin-top:auto}
.idea-tiles{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:14px 20px 18px}
.idea-tile{display:flex;flex-direction:column;border:1px solid var(--border);border-radius:var(--r);overflow:hidden;color:inherit;background:var(--surface);transition:box-shadow .2s,transform .2s}.idea-tile:hover{box-shadow:var(--shadow-md);transform:translateY(-1px)}
.idea-tile .idea-photo.tile,.idea-tile .idea-art{height:auto;aspect-ratio:16/10}.idea-tile .idea-art>.icon{width:30px;height:30px}.idea-tile .idea-photo::after{height:3px}
.tile-text{display:grid;gap:3px;padding:9px 11px 11px}.tile-theme{font-size:11px;font-weight:700;color:var(--c);text-transform:uppercase;letter-spacing:.04em}.tile-text strong{font-size:13px;line-height:1.35}
/* Account manager card in the page heading */
.am-card{display:flex;align-items:center;gap:10px;padding:6px 6px 6px 8px;border:1px solid var(--border);border-radius:var(--r);background:var(--surface);box-shadow:var(--shadow-sm)}.am-card .avatar{width:34px;height:34px}
.am-text{display:grid;line-height:1.25;padding-right:6px}.am-text small{font-size:11px}.am-text strong{font-size:13.5px;white-space:nowrap}
@media(max-width:1024px){.lead-card{grid-template-columns:40% minmax(0,1fr)}}
@media(max-width:640px){.am-card{width:100%}.am-card .btn{margin-left:auto}.heading-actions .am-card .btn{flex:0 0 auto}.lead-card{grid-template-columns:1fr}.idea-tiles{gap:10px;padding:12px 16px 16px}.bp-post,.lead-card{margin-left:16px;margin-right:16px}.story-list{padding:4px 16px 8px}}
