/* Qibai appearance system. Surfaces and state colours share semantic tokens. */
:root {
 color-scheme:light;
 --ap-canvas:#f5f5f5;--ap-surface:#fff;--ap-surface-secondary:#f1f1f1;--ap-surface-tertiary:#e7e7e7;
 --ap-text:#1d1d1d;--ap-text-secondary:#666666;--ap-border:#d9d9d9;
 --ap-accent:#202020;--ap-accent-hover:#3a3a3a;--ap-accent-soft:#eaeaea;--ap-on-accent:#fff;
 --ap-strong:#242424;--ap-on-strong:#f5f5f5;--ap-strong-accent:#e0e0e0;
 --ap-success:#555555;--ap-success-soft:#eeeeee;--ap-warning:#444444;--ap-warning-soft:#e8e8e8;--ap-danger:#222222;--ap-danger-soft:#e2e2e2;
 --ap-shadow-color:#000000;--ap-glass:rgba(250,250,250,.92);--ap-elevation:0 8px 30px rgba(0,0,0,.08);
 --ap-font:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
}
:root[data-theme=dark] {
 color-scheme:dark;
 --ap-canvas:#171618;--ap-surface:#232124;--ap-surface-secondary:#2c292d;--ap-surface-tertiary:#3a353b;
 --ap-text:#f5f2f3;--ap-text-secondary:#bbb2b7;--ap-border:#4a4248;
 --ap-accent:#d8b4bf;--ap-accent-hover:#e4c7d0;--ap-accent-soft:#35292f;--ap-on-accent:#21181c;
 --ap-strong:#121113;--ap-on-strong:#f5f2f3;--ap-strong-accent:#dec1cb;
 --ap-success:#c2b8bd;--ap-success-soft:#302c30;--ap-warning:#dec1cb;--ap-warning-soft:#3a2f35;--ap-danger:#e8b4c1;--ap-danger-soft:#432b33;
 --ap-glass:rgba(33,31,34,.94);--ap-elevation:0 8px 30px rgba(0,0,0,.3);
}
:root,body,body.ui-preview {
 --paper:var(--ap-canvas)!important;--white:var(--ap-surface)!important;--ink:var(--ap-text)!important;--muted:var(--ap-text-secondary)!important;
 --line:var(--ap-border)!important;--soft:var(--ap-surface-secondary)!important;--side:var(--ap-surface)!important;--olive:var(--ap-accent)!important;
 --warning:var(--ap-warning)!important;--danger:var(--ap-danger)!important;--accent:var(--ap-accent)!important;--ui-lime:var(--ap-accent)!important;--ui-lime-soft:var(--ap-accent-soft)!important;--ui-font:var(--ap-font)!important;
 --list-ink:var(--ap-text);--list-muted:var(--ap-text-secondary);--list-line:var(--ap-border);--list-head:var(--ap-surface-secondary);--list-detail:var(--ap-surface-secondary);--list-hover:var(--ap-accent-soft);
 --overview-glass:var(--ap-glass);--overview-green:var(--ap-text);--overview-subtle:var(--ap-text-secondary);
 background-color:var(--ap-canvas);color:var(--ap-text);font-family:var(--ap-font)!important;
 accent-color:var(--ap-accent);caret-color:var(--ap-accent);scrollbar-color:var(--ap-border) transparent;
}
::selection,body.ui-preview ::selection{background:var(--ap-accent-soft);color:var(--ap-text)}
body.ui-preview :focus-visible,:focus-visible{outline:2px solid var(--ap-accent)!important;outline-offset:3px}
body.ui-preview svg :focus,body.ui-preview svg :focus-visible,svg :focus,svg :focus-visible{outline:none!important}
body :is(input,select,textarea,button){font-family:var(--ap-font)}
body :is(input,select,textarea){color:var(--ap-text);background-color:var(--ap-surface);border-color:var(--ap-border)}
body :is(input,textarea)::placeholder{color:var(--ap-text-secondary);opacity:1}
body :is(h1,h2,h3,h4),body.ui-preview :is(h1,h2,h3,h4){font-family:var(--ap-font)!important;color:var(--ap-text);letter-spacing:-.02em}
body.ui-preview :is(h1,.page-heading h1){font-size:28px!important;font-weight:650!important}
body.ui-preview button.primary,body button.primary,body .checkout button,body #login-submit {
 background:var(--ap-accent)!important;border-color:transparent!important;color:var(--ap-on-accent)!important;font-weight:600;
}
body.ui-preview button.primary:hover,body button.primary:hover,body .checkout button:hover,body #login-submit:hover{background:var(--ap-accent-hover)!important}
body.ui-preview :is(.sidebar,.topbar){background:var(--ap-glass)!important;color:var(--ap-text)!important;border-color:var(--ap-border)!important}
body.ui-preview .sidebar{border-radius:16px!important;box-shadow:none!important}
body.ui-preview .brand{font-size:23px!important;letter-spacing:0!important;color:var(--ap-text)!important}
body.ui-preview .brand-mark{background:var(--ap-accent)!important;color:var(--ap-on-accent)!important;border-radius:10px}
body.ui-preview .brand-sub,body.ui-preview .side-label,body.ui-preview .side-bottom{color:var(--ap-text-secondary)!important}
body.ui-preview .sidebar>button{color:var(--ap-text-secondary)!important;border-radius:9px!important;min-height:44px!important}
body.ui-preview .sidebar>button:hover{background:var(--ap-surface-secondary)!important;color:var(--ap-text)!important}
body.ui-preview .sidebar>button[aria-current=page]{color:var(--ap-accent)!important;background:transparent!important;font-weight:600}
body.ui-preview .ui-nav-highlight{background:var(--ap-accent-soft)!important;border-radius:9px!important}
body.ui-preview .sidebar .ui-global-project{background:var(--ap-surface-secondary)!important;border:1px solid var(--ap-border)!important;border-radius:12px!important}
body.ui-preview .sidebar #ui-project-select{background:var(--ap-surface)!important;color:var(--ap-text)!important}
body.ui-preview .sidebar .ui-global-project>span:before{background:var(--ap-accent)}
body.ui-preview :is(.ui-picker-project[aria-current=true],.ui-picker-project[aria-current=true] .ui-picker-avatar){background:var(--ap-accent-soft);color:var(--ap-accent);border-color:var(--ap-accent)}
body.ui-preview :is(.ui-picker-current,.ui-picker-price){color:var(--ap-accent)}
body.ui-preview .ui-project-picker{background:var(--ap-surface);box-shadow:var(--ap-elevation)}
body.ui-preview .overview-metric,body.ui-preview .overview-metric:is(.tone-1,.tone-2,.tone-3){background:var(--ap-surface)!important;color:var(--ap-text)!important;border:1px solid var(--ap-border)!important;min-height:112px!important}
body.ui-preview .overview-metric strong{color:var(--ap-text)!important;font-variant-numeric:tabular-nums}
body.ui-preview #overview-workspace .overview-summary-metrics .overview-metric::before{display:none}
body.ui-preview .overview-metric.tone-3 strong{color:var(--ap-accent)!important}
body.ui-preview .overview-count-badge{background:var(--ap-accent)!important;color:var(--ap-on-accent)!important}
body.ui-preview :is(.ui-total,.summary,.checkout){background:var(--ap-surface-secondary);color:var(--ap-text)}
body.ui-preview .ui-total :is(strong,small,span){color:var(--ap-text)!important}
body.ui-preview .ui-total strong{font-size:29px;letter-spacing:-.025em;font-variant-numeric:tabular-nums}
body.ui-preview :is(.ui-view-tabs,.life-tabs,.catalog-tabs,.category-tabs){background:var(--ap-surface-secondary)!important;padding:4px;border-radius:10px}
body.ui-preview :is(.ui-view-tabs,.life-tabs,.catalog-tabs,.category-tabs) button:is(.active,[aria-pressed=true],[aria-selected=true]){background:var(--ap-surface)!important;color:var(--ap-accent)!important;border-color:transparent!important;box-shadow:0 1px 4px rgba(0,0,0,.1)!important}
body.ui-preview .category-tabs button.active,body.ui-preview #cad-workspace .cad-category-tabs button.active{background:var(--ap-accent-soft)!important;color:var(--ap-accent)!important}
body.ui-preview .ui-summary-fact[aria-pressed=true]{background:var(--ap-accent-soft)!important;color:var(--ap-accent)!important}
body.ui-preview :is(.local-banner,.ui-project-context,.overview-global-scope){background:var(--ap-surface-secondary);color:var(--ap-text-secondary)}
body.ui-preview .life-stats>div{background:var(--ap-surface);border:1px solid var(--ap-border)}
body.ui-preview dialog{background:var(--ap-surface);color:var(--ap-text);border-color:var(--ap-border);box-shadow:var(--ap-elevation)}
dialog::backdrop{background:rgba(0,0,0,.28);backdrop-filter:blur(4px)}
/* Photographs, drawings and status timelines keep their own information colours. */
body.ui-preview :is(.signed-cover,.signed-project-visual) :is(h3,p,button){color:#fff}
body.ui-preview canvas{color-scheme:light}
body.ui-preview #owner-construction-manager{--owner-line:var(--ap-border);--owner-muted:var(--ap-text-secondary);--owner-soft:var(--ap-surface-secondary)}
body.ui-preview #toast{background:var(--ap-strong);color:var(--ap-on-strong)}
body.ui-preview #toast.error{background:var(--ap-danger-soft);color:var(--ap-danger)}
/* Appearance control is always local, keyboard accessible, and shared across tabs. */
.appearance-control{display:flex;align-items:center;gap:3px;padding:3px;border-radius:10px;background:var(--ap-surface-secondary);border:1px solid var(--ap-border);width:max-content;max-width:100%;flex-shrink:0}
.appearance-control .appearance-option,body.ui-preview .appearance-control .appearance-option{display:flex;align-items:center;justify-content:center;gap:5px;flex:1;min-width:0;min-height:32px;padding:6px 9px;border:0!important;border-radius:7px;background:transparent;color:var(--ap-text-secondary);font:12px/1.4 var(--ap-font);cursor:pointer;white-space:nowrap;box-shadow:none}
.appearance-control .appearance-option[aria-pressed=true],body.ui-preview .appearance-control .appearance-option[aria-pressed=true]{background:var(--ap-surface);color:var(--ap-accent);box-shadow:0 1px 3px rgba(0,0,0,.12)}
.appearance-control .appearance-option:hover{color:var(--ap-text);background:var(--ap-surface)}
.side-bottom .appearance-control{width:100%;margin-bottom:14px}
.appearance-floating{position:fixed;top:22px;right:24px;z-index:45;box-shadow:var(--ap-elevation)}
.purchase-top nav{align-items:center;flex-wrap:wrap;gap:18px}
.team-top{flex-wrap:wrap;gap:24px}
.team-top>.back-link,.team-top>.membership-nav{margin-left:auto}
.team-top .appearance-control{margin-left:0}
.masthead{gap:24px;flex-wrap:wrap}
.masthead .masthead-note{margin-left:auto}
.masthead .appearance-control{margin-left:auto}
/* Account and purchase pages use the same reading and action hierarchy. */
.purchase-heading h1,.workspace-heading h1{font-size:36px;font-weight:650;letter-spacing:-.035em}
.purchase-plan:has(input:checked){background:var(--ap-accent-soft);border-color:var(--ap-accent);box-shadow:inset 0 0 0 1px var(--ap-accent)}
.trial-number,.plan-saving{color:var(--ap-accent);font-family:var(--ap-font)}
.checkout{background:var(--ap-surface);color:var(--ap-text);border:1px solid var(--ap-border)}
.checkout p{color:var(--ap-text-secondary)}
.account-state{background:var(--ap-accent-soft);color:var(--ap-text)}
/* Keep the approved architectural video; theme only the reading layer. */
body:has(.room){background:var(--ap-canvas);color:var(--ap-text)}
body:has(.room) :is(.brand,.login-panel,.login-panel label,.login-panel h2,.spatial-story){color:var(--ap-text)}
body:has(.room) :is(.masthead-note,.panel-kicker,.private-mark,.welcome,.login-description,.password-label span,.password-field button,.account-note,.panel-footer,.panel-footer small,.page-footer,.motion-toggle,.scene-hint){color:var(--ap-text-secondary);text-shadow:none}
body:has(.room) :is(.login-panel input,.login-panel input:hover,.login-panel input:focus){background:color-mix(in srgb,var(--ap-surface) 88%,transparent);color:var(--ap-text);border-color:var(--ap-border);box-shadow:none}
body:has(.room) .login-panel input:focus{border-color:var(--ap-accent);outline:3px solid var(--ap-accent-soft);outline-offset:1px}
body:has(.room) :is(.auth-tabs,.invite-banner){border-color:var(--ap-border)}
body:has(.room) :is(.auth-tabs button,.invite-banner p,.invite-banner button,.already-signed button,#retry-connection){color:var(--ap-text-secondary)}
body:has(.room) .auth-tabs button[aria-pressed=true]{color:var(--ap-accent);border-bottom-color:var(--ap-accent)}
body:has(.room) .form-message{color:var(--ap-danger)}
body:has(.room) .panel-footer a{color:var(--ap-accent)}
body:has(.room) .light-switch{background:var(--ap-surface-secondary);border-color:var(--ap-border)}
body:has(.room) .light-switch button{color:var(--ap-text-secondary)}
body:has(.room) .light-switch button[aria-pressed=true]{background:var(--ap-surface);color:var(--ap-accent)}
body:has(.room) input::placeholder{color:var(--ap-text-secondary)}
body:has(.room) :is(.submit,.solid,#submit){background:var(--ap-accent)!important;color:var(--ap-on-accent)!important;border-color:transparent}
body:has(.room) .appearance-floating{top:auto;bottom:24px;right:24px}
:root[data-theme=dark] .room-scene{filter:brightness(.35) saturate(.6)!important}
:root[data-theme=dark] .room-shade{background:linear-gradient(90deg,rgba(23,22,24,.08) 20%,rgba(22,22,24,.7) 58%,#171618 100%)}
:root[data-theme=dark] :is(.room-light,.room-mist){opacity:0!important}
:root[data-theme=dark] body:has(.room) :is(.eyebrow,.spatial-story h1,.spatial-story p){color:var(--ap-text);text-shadow:none}
@media(max-width:700px){
 .appearance-floating{top:12px;right:12px}
 .appearance-control .appearance-option{min-height:38px;padding:7px 10px}
 .purchase-top{align-items:flex-start;padding:20px;gap:16px;flex-wrap:wrap}
 .purchase-top nav{width:100%;justify-content:space-between;gap:12px}
 .purchase-heading h1,.workspace-heading h1{font-size:29px}
 body:has(.room) .appearance-floating{position:relative;bottom:auto;right:auto;margin:0 auto 24px}
}
@media(prefers-reduced-motion:reduce){.appearance-option{transition:none!important}}
@media print{.appearance-control{display:none!important}:root[data-theme=dark]{color-scheme:light;--ap-canvas:#fff;--ap-surface:#fff;--ap-surface-secondary:#f2f2f7;--ap-text:#1d1d1f;--ap-text-secondary:#63636b;--ap-border:#d9d9df}}

/* Keep later error, warning and read-only semantics on the original monochrome theme. */
:root{--ap-warning:#9a6b2f;--ap-warning-soft:#fbf1e4;--ap-danger:#B4533C;--ap-danger-soft:#fbede8}
:root[data-theme=dark]{--ap-warning:#e3b376;--ap-warning-soft:#372b1d;--ap-danger:#efa28e;--ap-danger-soft:#3d2823}
:root:not([data-theme=dark]) body.ui-preview .overview-tabs button[aria-pressed=true]{background:var(--ap-accent-soft)!important;color:var(--ap-accent)!important;border-color:transparent!important}
:root:not([data-theme=dark]) body.ui-preview :is(button,input,select,textarea):disabled{opacity:1!important;color:var(--ap-accent)!important;background:var(--ap-surface)!important;border-color:var(--ap-border)!important;border-style:dashed;cursor:not-allowed}
body button.danger,body.ui-preview button.danger{background:#B4533C!important;color:#fff!important;border-color:#B4533C!important;font-weight:600}
body button.danger:hover,body.ui-preview button.danger:hover{background:#963f2b!important;border-color:#963f2b!important;color:#fff!important}
body button.danger:focus-visible{outline-color:var(--ap-danger)!important}
body .invalid,body [role=alert]{color:var(--ap-danger)}
body .badge.published{background:var(--ap-success-soft);color:var(--ap-success)}

/* B workspace polish: white canvas, pill navigation and a single olive task rail. */
:root:not([data-theme=dark]):has(body.ui-preview){--ap-canvas:#fff}
body.ui-preview{--b-card-line:#dededb;--b-card-shadow:0 2px 4px rgba(24,28,20,.025),0 8px 22px rgba(24,28,20,.065);--b-rail-bg:linear-gradient(155deg,#f6f8f0,#edf1df);--b-rail-line:#d4dbc4;--b-rail-hover:rgba(210,220,186,.32)}
:root[data-theme=dark] body.ui-preview{--b-card-line:#4a4248;--b-card-shadow:0 2px 4px rgba(0,0,0,.1),0 8px 22px rgba(0,0,0,.2);--b-rail-bg:linear-gradient(155deg,#292d24,#23271e);--b-rail-line:#4c533f;--b-rail-hover:rgba(125,142,94,.16)}
:root:not([data-theme=dark]) body.ui-preview,:root:not([data-theme=dark]) body.ui-preview :is(.shell,main){background:#fff!important}
body.ui-preview :is(.sidebar,.overview-card,.overview-metric,.overview-project-tile,.ui-global-project,.ui-project-picker,dialog){border:1px solid var(--b-card-line)!important;box-shadow:var(--b-card-shadow)!important}
:root:not([data-theme=dark]) body.ui-preview .sidebar{background:#fff!important}
body.ui-preview #overview-workspace .overview-dashboard{overflow:visible!important}

/* Every primary navigation button shares the same left/right edges. */
body.ui-preview .sidebar>button:has(.ui-nav-copy){
 width:100%!important;max-width:100%;box-sizing:border-box;margin-inline:0!important;
 padding-inline:14px!important;border:1px solid transparent!important;border-radius:999px!important;
 transform-origin:center;transition:color 300ms ease,transform 180ms cubic-bezier(.2,.8,.2,1),box-shadow 180ms ease;
}
body.ui-preview .ui-nav-highlight:not([hidden]){display:block!important;background:#171717!important;border-radius:999px!important;box-shadow:0 3px 9px rgba(0,0,0,.13);transform-origin:50% 50%;will-change:transform}
body.ui-preview .ui-nav-highlight[hidden]{display:none!important}
body.ui-preview .sidebar>button:has(.ui-nav-copy),body.ui-preview .sidebar>button:has(.ui-nav-copy):hover{background:transparent!important;border-color:transparent!important}
body.ui-preview .sidebar>button:has(.ui-nav-copy)::before{content:"";position:absolute;inset:-1px;z-index:-1;border:1px solid #626260;border-radius:inherit;background:#f0f0ee;opacity:0;transform:translateX(-3px) scale(.985);pointer-events:none;transition:opacity 520ms cubic-bezier(.2,.7,.2,1),transform 620ms cubic-bezier(.2,.7,.2,1)}
body.ui-preview .sidebar>button .ui-nav-copy{transition:transform 320ms cubic-bezier(.2,.8,.2,1),color 300ms ease}
body.ui-preview .sidebar>button[aria-current=page]{background:transparent!important;color:#fff!important;border-color:transparent!important;box-shadow:none;animation:none}
body.ui-preview .sidebar>button[aria-current=page] :is(svg,.ui-nav-copy,.ui-nav-copy>span){color:inherit!important}
body.ui-preview .sidebar>button[aria-current=page]::before{opacity:0!important;transition-duration:120ms}
body.ui-preview .sidebar>button[aria-current=page] #project-count{background:rgba(255,255,255,.14);border-radius:99px}
@media(hover:hover) and (pointer:fine){
 body.ui-preview .sidebar>button:not([aria-current=page]):not(:disabled):hover{color:#171717!important}
 body.ui-preview .sidebar>button:not([aria-current=page]):not(:disabled):hover::before{opacity:1;transform:translateX(0) scale(1);transition-duration:240ms,340ms}
 body.ui-preview .sidebar>button:not(:disabled):hover .ui-nav-copy{transform:translateX(3px)}
 body.ui-preview .sidebar>button[aria-current=page]:hover{color:#fff!important}
 :root[data-theme=dark] body.ui-preview .sidebar>button:not([aria-current=page]):not(:disabled):hover{color:#f5f2f3!important}
}
:root[data-theme=dark] body.ui-preview .sidebar>button:has(.ui-nav-copy)::before{background:#353137;border-color:#aaa2a7}
body.ui-preview .sidebar>button:has(.ui-nav-copy):not(:disabled):active{transform:scale(.95)!important;box-shadow:inset 0 2px 7px rgba(0,0,0,.18)!important;transition-duration:70ms}
body.ui-preview .sidebar>button:focus-visible{outline:2px solid var(--ap-accent)!important;outline-offset:3px}

/* Taller summary tiles: only the value and title, aligned in the bottom right. */
body.ui-preview #overview-workspace .overview-summary-metrics .overview-metric{
 display:flex!important;flex-direction:column!important;align-items:flex-end!important;justify-content:flex-end!important;
 min-height:clamp(180px,11.5vw,230px)!important;padding:24px!important;gap:7px!important;text-align:right!important;
}
body.ui-preview #overview-workspace .overview-summary-metrics .overview-metric .overview-metric-title{order:2;font-size:clamp(18px,1.25vw,23px)!important;line-height:1.35;text-wrap:balance}
body.ui-preview #overview-workspace .overview-summary-metrics .overview-metric strong{order:1;font-size:46px!important;line-height:1.05}
body.ui-preview #overview-workspace .overview-summary-metrics .overview-metric>span:last-child{display:none!important}
@media(min-width:1101px) and (max-height:800px){
 body.ui-preview #overview-workspace:has( .overview-summary-metrics){grid-template-rows:40px 170px minmax(0,1fr)}
 body.ui-preview #overview-workspace .overview-summary-metrics .overview-metric{min-height:170px!important;padding:20px!important}
}

/* Preserve the original sections and scrolling; visually share one continuous surface. */
body.ui-preview #overview-workspace .overview-action-column{
 background:var(--b-rail-bg)!important;border:1px solid var(--b-rail-line)!important;
 box-shadow:0 3px 6px rgba(43,53,28,.035),0 10px 26px rgba(43,53,28,.09)!important;
 border-radius:20px;padding:8px 14px!important;gap:0!important;overflow:hidden;
}
body.ui-preview #overview-workspace .overview-action-column .overview-card{
 background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;margin:0!important;
}
body.ui-preview #overview-workspace .overview-action-column .overview-card:not(:last-child){border-bottom:1px solid var(--b-rail-line)!important}
body.ui-preview #overview-workspace .overview-action-column .overview-card>header{background:transparent!important;border:0!important;padding:16px 10px 12px!important}
body.ui-preview #overview-workspace .overview-action-column :is(.overview-items,.overview-item,.overview-summary-row,.overview-summary-list,.overview-card-body){background:transparent!important}
body.ui-preview #overview-workspace .overview-action-column .overview-item{border-color:var(--b-rail-line)!important}
body.ui-preview #overview-workspace .overview-action-column .overview-item:hover{background:var(--b-rail-hover)!important}
body.ui-preview #overview-workspace .overview-action-column .overview-summary-row{border-color:var(--b-rail-line)!important}
body.ui-preview #overview-workspace .overview-action-column .overview-summary-row:hover{background:var(--b-rail-hover)!important}
@media(max-width:760px){
 body.ui-preview .sidebar>button:has(.ui-nav-copy){min-height:44px!important}
 body.ui-preview #overview-workspace .overview-action-column{padding:6px 10px!important;border-radius:16px}
 body.ui-preview #overview-workspace .overview-summary-metrics .overview-metric{min-height:154px!important;padding:16px!important;gap:6px!important}
 body.ui-preview #overview-workspace .overview-summary-metrics .overview-metric .overview-metric-title{font-size:17px!important}
 body.ui-preview #overview-workspace .overview-summary-metrics .overview-metric strong{font-size:36px!important}
}
@media(prefers-reduced-motion:reduce){
 body.ui-preview .sidebar>button:has(.ui-nav-copy),body.ui-preview .sidebar>button .ui-nav-copy,body.ui-preview .sidebar>button:has(.ui-nav-copy)::before{animation:none!important;transition:none!important;transform:none!important}
}

/* One continuous hover surface; the button hit areas never move on hover. */
body.ui-preview .sidebar>button:has(.ui-nav-copy)::before{display:none}
body.ui-preview .ui-nav-hover{position:absolute;top:0;left:0;z-index:0;box-sizing:border-box;pointer-events:none;border:1px solid #787872;border-radius:999px;background:#f1f1ee;opacity:0;will-change:transform,opacity;transition:opacity 480ms ease}
body.ui-preview .ui-nav-hover.ui-nav-hover-ready{transition:transform 360ms cubic-bezier(.2,.75,.2,1),opacity 480ms ease,width 300ms ease,height 300ms ease}
body.ui-preview .sidebar>button .ui-nav-copy{transition:transform 360ms cubic-bezier(.2,.75,.2,1),color 260ms ease;pointer-events:none}
body.ui-preview .sidebar>button>svg{pointer-events:none}
:root[data-theme=dark] body.ui-preview .ui-nav-hover{background:#353137;border-color:#8c848a}

/* Light glass tiles: decoration only, all numbers still come from the original summary. */
body.ui-preview #overview-workspace .overview-summary-metrics{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
body.ui-preview #overview-workspace .overview-summary-metrics .overview-metric{
 --glass-base:#f5eef3;--glass-glow:#d1b2c7;--glass-wash:#ead5cb;
 position:relative;overflow:hidden;isolation:isolate;align-items:flex-start!important;justify-content:space-between!important;
 min-height:0!important;height:100%;padding:24px!important;text-align:left!important;gap:16px!important;border-radius:26px;
 border:1px solid rgba(117,103,114,.19)!important;
 background:radial-gradient(ellipse at 90% 12%,rgba(255,255,255,.95),transparent 58%),radial-gradient(ellipse at 82% 112%,var(--glass-glow),transparent 64%),linear-gradient(135deg,var(--glass-base),var(--glass-wash))!important;
 box-shadow:inset 0 1px 1px rgba(255,255,255,.95),inset 0 -1px 12px rgba(255,255,255,.48),0 4px 8px rgba(53,44,45,.035),0 12px 26px rgba(53,44,45,.07)!important;
 backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);
}
body.ui-preview #overview-workspace .overview-summary-metrics .tone-1{--glass-base:#eef5ef;--glass-glow:#a9c9be;--glass-wash:#dce8dd}
body.ui-preview #overview-workspace .overview-summary-metrics .tone-2{--glass-base:#fcf4e9;--glass-glow:#dfba9f;--glass-wash:#f2dfca}
body.ui-preview #overview-workspace .overview-summary-metrics .overview-metric .overview-metric-title{order:0;max-width:100%;font-size:clamp(16px,1.08vw,20px)!important;line-height:1.45;font-weight:500;color:#45423e!important;position:relative;z-index:2}
body.ui-preview #overview-workspace .overview-summary-metrics .overview-metric strong{order:1;font-size:52px!important;font-weight:500;letter-spacing:-.04em;color:#292b28!important;position:relative;z-index:2}
body.ui-preview #overview-workspace .overview-summary-metrics .overview-metric::after{content:"";position:absolute;width:116px;height:116px;right:-20px;bottom:-30px;border:1px solid rgba(255,255,255,.7);border-radius:50%;background:radial-gradient(circle at 30% 25%,rgba(255,255,255,.5),transparent 72%);box-shadow:0 0 0 22px rgba(255,255,255,.12),0 0 0 44px rgba(255,255,255,.07);pointer-events:none;z-index:0}
:root[data-theme=dark] body.ui-preview #overview-workspace .overview-summary-metrics .overview-metric{--glass-base:#37313c;--glass-glow:#735d75;--glass-wash:#4f3d47;background:radial-gradient(ellipse at 82% 112%,var(--glass-glow),transparent 64%),linear-gradient(135deg,var(--glass-base),var(--glass-wash))!important;border-color:#6d616b!important;box-shadow:inset 0 1px 1px #ffffff18,0 10px 24px #0003!important}
:root[data-theme=dark] body.ui-preview #overview-workspace .overview-summary-metrics .tone-1{--glass-base:#2c3b35;--glass-glow:#4f7765;--glass-wash:#344a40}
:root[data-theme=dark] body.ui-preview #overview-workspace .overview-summary-metrics .tone-2{--glass-base:#45372d;--glass-glow:#90664b;--glass-wash:#5b4634}
:root[data-theme=dark] body.ui-preview #overview-workspace .overview-summary-metrics .overview-metric :is(.overview-metric-title,strong){color:#f5f2f3!important}

/* Summary and project list share the left column; the task rail spans both rows. */
body.ui-preview #overview-workspace:has(.overview-summary-metrics){--b-summary-height:clamp(180px,11.5vw,230px);grid-template-rows:auto auto minmax(0,1fr)}
body.ui-preview #overview-workspace:has(.overview-summary-metrics)>.overview-dashboard{grid-row:3;grid-template-rows:var(--b-summary-height) minmax(0,1fr);row-gap:16px}
body.ui-preview #overview-workspace .overview-dashboard>.overview-summary-metrics{grid-column:1;grid-row:1;min-width:0}
body.ui-preview #overview-workspace .overview-dashboard>.overview-project-column{grid-column:1;grid-row:2}
body.ui-preview #overview-workspace .overview-dashboard>.overview-action-column{grid-column:2;grid-row:1/3}
@media(min-width:1101px) and (max-height:800px){
 body.ui-preview #overview-workspace:has(.overview-summary-metrics){--b-summary-height:170px;grid-template-rows:40px minmax(0,1fr)}
 body.ui-preview #overview-workspace:has(.overview-summary-metrics)>.overview-dashboard{grid-row:2}
}
@media(max-width:1100px){
 body.ui-preview:has(#overview-workspace:not([hidden]) .overview-summary-metrics) .topbar{display:flex!important}
 body.ui-preview #overview-workspace:has(.overview-summary-metrics)>.overview-dashboard{display:flex;flex-direction:column;overflow:auto;gap:16px}
 body.ui-preview #overview-workspace .overview-dashboard>.overview-summary-metrics{flex:0 0 180px}
 body.ui-preview #overview-workspace .overview-dashboard>.overview-project-column{flex:0 0 auto;grid-template-rows:minmax(470px,auto) minmax(280px,auto);grid-auto-rows:minmax(280px,auto)}
 body.ui-preview #overview-workspace .overview-dashboard>.overview-action-column{flex:0 0 820px}
}
@media(max-width:760px){
 body.ui-preview #overview-workspace .overview-dashboard>.overview-summary-metrics{flex:0 0 auto;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:160px 160px;gap:10px}
 body.ui-preview #overview-workspace .overview-summary-metrics .overview-metric:first-child{grid-column:1/-1}
 body.ui-preview #overview-workspace .overview-summary-metrics .overview-metric{padding:20px!important;border-radius:23px;gap:12px!important}
 body.ui-preview #overview-workspace .overview-summary-metrics .overview-metric strong{font-size:42px!important}
 body.ui-preview #overview-workspace .overview-summary-metrics .overview-metric .overview-metric-title{font-size:16px!important}
}
@media(prefers-reduced-motion:reduce){
 body.ui-preview .ui-nav-hover,body.ui-preview .ui-nav-hover.ui-nav-hover-ready{transition:none!important}
}

/* Each card has its own browser-local image and a separate frosted overlay. */
body.ui-preview{--qibai-overview-default:radial-gradient(ellipse at 9% 85%,#c3d9ca 0%,transparent 45%),radial-gradient(ellipse at 48% 20%,#d0c9e6 0%,transparent 40%),radial-gradient(ellipse at 92% 90%,#efc8a6 0%,transparent 50%),linear-gradient(125deg,#fbfaf5,#ecf5f4 50%,#fff2e5)}
body.ui-preview #overview-workspace .overview-summary-metrics{position:relative;isolation:isolate;border-radius:26px}
body.ui-preview #overview-workspace .overview-summary-metrics::before{display:none}
body.ui-preview #overview-workspace [data-overview-metric="signed"]{--qibai-card-image:var(--qibai-card-signed-image,var(--qibai-overview-default))}
body.ui-preview #overview-workspace [data-overview-metric="unsigned"]{--qibai-card-image:var(--qibai-card-unsigned-image,var(--qibai-overview-default))}
body.ui-preview #overview-workspace [data-overview-metric="followUps"]{--qibai-card-image:var(--qibai-card-followUps-image,var(--qibai-overview-default))}
body.ui-preview #overview-workspace .overview-summary-metrics .overview-metric{
 background:transparent!important;
 border:1px solid rgba(255,255,255,.72)!important;
 box-shadow:inset 0 1px 0 rgba(255,255,255,.95),inset 1px 0 0 rgba(255,255,255,.5),inset 0 -1px 0 rgba(255,255,255,.28),0 2px 4px rgba(32,38,34,.025),0 10px 24px rgba(32,38,34,.07)!important;
 backdrop-filter:none;-webkit-backdrop-filter:none;
}
body.ui-preview #overview-workspace .overview-summary-metrics .overview-metric::after{content:"";display:block;position:absolute;inset:0;z-index:0;width:auto;height:auto;border:0;border-radius:inherit;box-shadow:none;background-image:var(--qibai-card-image,var(--qibai-overview-default));background-size:cover;background-position:center;pointer-events:none}
body.ui-preview #overview-workspace .overview-summary-metrics .overview-metric::before{content:"";display:block;position:absolute;inset:0;z-index:1;padding:0;border-radius:inherit;background:linear-gradient(135deg,rgba(255,255,255,.36),rgba(255,255,255,.14) 38%,rgba(255,255,255,.08) 65%,rgba(255,255,255,.22));opacity:1;transition:none;mask:none;-webkit-mask:none;backdrop-filter:blur(18px) saturate(1.18) brightness(1.04);-webkit-backdrop-filter:blur(18px) saturate(1.18) brightness(1.04);pointer-events:none}
body.ui-preview #overview-workspace .overview-summary-metrics .overview-metric .overview-metric-title{color:#26332b!important;text-shadow:0 1px 2px #ffffffb3,0 0 12px #ffffffb3}
body.ui-preview #overview-workspace .overview-summary-metrics .overview-metric strong{color:#14271c!important;text-shadow:0 1px 2px #ffffffb3,0 0 16px #ffffffa6}
:root[data-theme=dark] body.ui-preview #overview-workspace .overview-summary-metrics .overview-metric{background:transparent!important;border-color:#ffffff48!important;box-shadow:inset 1px 1px 0 #ffffff28,inset -1px -1px 0 #ffffff0a,0 12px 26px #0004!important}
:root[data-theme=dark] body.ui-preview #overview-workspace .overview-summary-metrics .overview-metric::before{background:linear-gradient(145deg,rgba(27,31,30,.74),rgba(27,31,30,.55))}
:root[data-theme=dark] body.ui-preview #overview-workspace .overview-summary-metrics .overview-metric :is(.overview-metric-title,strong){color:#fff!important;text-shadow:0 1px 8px #0008}
.settings-background{align-items:flex-start!important}
.settings-background-copy{flex:1;min-width:0}
.settings-background-controls{flex:0 1 260px;min-width:180px;display:flex;gap:10px;flex-wrap:wrap;align-items:flex-start}
.settings-bg-preview{width:230px;max-width:100%;height:132px;margin:16px 0 8px;border-radius:17px;background-image:var(--qibai-overview-default);background-size:cover;background-position:center;display:grid;place-items:center;border:1px solid var(--b-card-line);overflow:hidden}
.settings-bg-preview>span{padding:20px 26px;border:1px solid #ffffffb8;border-radius:15px;background:linear-gradient(135deg,#ffffff5c,#ffffff24 50%,#ffffff38);backdrop-filter:blur(18px) saturate(1.18) brightness(1.04);-webkit-backdrop-filter:blur(18px) saturate(1.18) brightness(1.04);box-shadow:inset 0 1px 0 #fffffff2,0 7px 16px #253e3512;color:#25352c;text-shadow:0 1px 4px #ffffffb3;font-size:13px}
body.ui-preview .settings-background .settings-bg-name{overflow-wrap:anywhere;font-size:11px}
.settings-background-upload,.settings-background-controls>button{position:relative;display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:9px 14px;border:1px solid var(--ap-border);border-radius:10px;background:var(--ap-surface);color:var(--ap-text);font:inherit;font-size:12px;cursor:pointer;overflow:hidden}
.settings-background-upload input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.settings-background-upload:focus-within{outline:2px solid var(--ap-accent);outline-offset:3px}
.settings-background-upload:has(input:disabled){opacity:.6;cursor:wait}
body.ui-preview .settings-background .settings-bg-status,body.ui-preview .settings-background .settings-bg-note{flex-basis:100%;font-size:11px;line-height:1.7}
body.ui-preview .settings-background .settings-bg-status:empty{display:none}
body.ui-preview .settings-background .settings-bg-status.is-error{color:var(--ap-danger)}
@supports not (backdrop-filter:blur(1px)){
 body.ui-preview #overview-workspace .overview-summary-metrics .overview-metric::before{background:rgba(255,255,255,.9)!important}
 :root[data-theme=dark] body.ui-preview #overview-workspace .overview-summary-metrics .overview-metric::before{background:rgba(27,31,30,.94)!important}
}
@media(max-width:650px){.settings-background-controls{flex-basis:100%}.settings-bg-preview{width:100%;height:150px}}
/* Unified select sizing & layout polish */
body.ui-preview select{height:38px;min-height:36px;line-height:1.25;padding:4px 10px;white-space:nowrap;text-overflow:ellipsis}
body.ui-preview .sidebar>button.side-active,body.ui-preview:has(.life-workspace:not([hidden])) .sidebar>button.side-active{background:var(--ap-strong)!important;color:var(--ap-on-strong)!important}
body.ui-preview .life-tabs-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:20px}
body.ui-preview .life-tabs-bar .life-tabs{margin-bottom:0}
body.ui-preview .life-tabs-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
body.ui-preview .life-tabs-actions button{min-height:36px;padding:7px 14px;font-size:12px;border-radius:10px}
body.ui-preview .settings-background{justify-content:flex-start;gap:32px}
body.ui-preview .settings-background-copy{flex:0 1 340px}
body.ui-preview #owners-workspace .owners-grid{align-items:start}
