:root{color-scheme:dark;--bg:#071324;--bg2:#0d1d35;--glass:#10243d;--edge:#29415d;--text:#eef6ff;--muted:#94a9c3;--aqua:#57d4d4;--gold:#e5bc7c;--window-height:100dvh;font-family:Inter,system-ui,-apple-system,"Segoe UI",Arial,sans-serif;font-synthesis:none}
*{box-sizing:border-box}body{margin:0;background:radial-gradient(circle at 77% 5%,#163657 0,#0a1c34 34%,var(--bg) 74%);color:var(--text)}button,input,textarea,select{font:inherit}button{cursor:pointer}button:disabled{opacity:.4;cursor:not-allowed}button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid var(--aqua);outline-offset:2px}button{border:0}h1,h2,h3,p{margin-top:0}h1{letter-spacing:-.04em}h2{font-size:1.18rem}p{line-height:1.55}.background-glow{position:fixed;top:-20rem;left:40%;width:45rem;height:45rem;background:radial-gradient(circle,#0b676d33,transparent 70%);pointer-events:none}.surface{background:linear-gradient(135deg,#142b47ed,#0d2037f2);border:1px solid #34516b8c;box-shadow:0 10px 35px #020b1a39;border-radius:20px}.eyebrow{font-size:.69rem;letter-spacing:.23em;font-weight:800;color:var(--aqua);margin:0 0 11px}.muted{color:var(--muted)}.small{font-size:.76rem}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.error-text{color:#ffc4c4}.primary-button{background:linear-gradient(110deg,#55d0cd,#a0e3cc);color:#062431;border-radius:12px;padding:8.75px 20px;font-weight:800}.outline-button{border:1px solid #52708b;background:#152b45;color:#d9effa;border-radius:12px;padding:7.9px 16px;font-weight:650}.outline-button.compact{font-size:.78rem;padding:5.35px 10px}.quiet-button,.back-button,.icon-button{background:none;color:var(--muted);padding:5.35px 12px}.quiet-button:hover,.back-button:hover{color:var(--aqua)}input,textarea,select{background:#081a2f;border:1px solid #395573;border-radius:11px;color:var(--text);padding:12px;min-width:0}input::placeholder,textarea::placeholder{color:#668099}.stack{display:grid;gap:9px}.stack label{color:#b4c8dd;font-size:.83rem;margin-top:6px}
.login-screen{min-height:var(--window-height);display:grid;place-items:center;padding:24px}.login-screen[hidden],.app-shell[hidden],.page[hidden],.modal[hidden]{display:none!important}.login-card{width:min(420px,100%);padding:32px 32px 24px;text-align:center}.login-card h1{font-size:2.2rem;margin-bottom:10px}.login-card h1 span{color:var(--aqua)}.login-card .stack{text-align:left;margin-top:23px}.login-planet{width:145px;height:145px;filter:drop-shadow(0 0 25px #51c8d244)}
.app-shell{height:var(--window-height);min-height:0;display:flex;flex-direction:column;overflow:hidden}.topbar{min-height:73px;display:flex;justify-content:space-between;align-items:center;padding:10px clamp(16px,4vw,50px);border-bottom:1px solid #27415b;background:#09192bbb;flex-shrink:0}.brand{display:flex;align-items:center;gap:7px;font-weight:850;letter-spacing:.12em;font-size:.94rem}.brand img{width:51px;height:51px}.brand strong{color:var(--aqua)}.topbar-right{display:flex;align-items:center;gap:14px}.alpha-badge{border:1px solid #736343;color:var(--gold);padding:6px 9px;border-radius:20px;font-size:.62rem;font-weight:800;letter-spacing:.05em}.user-pill{max-width:220px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;color:#d8e6f8;font-size:.84rem}.app-main{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain}.page{max-width:1280px;margin:0 auto;padding:clamp(20px,3vw,42px);min-height:100%}.home-top{display:flex;justify-content:space-between;align-items:center;gap:20px;min-height:250px}.home-copy{max-width:620px;position:relative;z-index:1}.home-copy h1{font-size:clamp(2rem,4.1vw,3.35rem);margin-bottom:17px}.home-copy p:not(.eyebrow){color:#a8bdd4;max-width:610px}.state-line{display:flex;gap:9px;align-items:center;font-size:.79rem;color:#e7cfa2;margin-top:20px}.state-dot{width:8px;height:8px;border-radius:50%;background:#edbf74;box-shadow:0 0 12px #f6c77e}.hero-planet{height:220px;min-width:310px;position:relative;display:grid;place-items:center}.hero-planet img{width:285px;height:285px;filter:drop-shadow(0 0 28px #6ed0ce33)}.planet-halo{position:absolute;width:250px;height:180px;border-radius:50%;background:#2abecb22;filter:blur(65px)}.ai-composer{padding:20px 23px;position:relative}.composer-label{display:flex;align-items:center;gap:10px;margin-bottom:15px}.composer-label .small{margin-left:auto}.orb-small{width:15px;height:15px;border-radius:50%;background:radial-gradient(circle at 30% 20%,#ffecb7,#68adbd 72%);box-shadow:0 0 12px #68c6c6}.ai-input-row{display:flex;gap:10px}.ai-input-row input{flex:1}.reply-text{font-size:.82rem;color:#e4c88f;margin:9px 0 0;min-height:0}.reply-text:empty{display:none}.widgets-heading{display:flex;justify-content:space-between;align-items:end;margin-top:32px;margin-bottom:17px}.widgets-heading h2{font-size:1.34rem;margin:0}.widgets-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px}.widget{min-height:167px;padding:20px;text-align:left;color:var(--text);display:flex;flex-direction:column;gap:10px;transition:border-color .15s,transform .15s}.widget:hover{border-color:#57c5ca;transform:translateY(-2px)}.widget-symbol{width:39px;height:39px;border-radius:11px;background:#21445b;color:var(--aqua);display:grid;place-items:center;font-size:1.2rem}.widget strong{font-size:1.02rem}.widget small{color:var(--muted);line-height:1.5}.widget .flag{font-size:.7rem;color:#dfbf83;margin-top:auto}.widget-editor{display:flex;gap:6px;margin-top:auto}.widget-editor button{border-radius:8px;padding:3.65px 9px;color:var(--text);background:#294962}.home-footnote{margin-top:16px;font-size:.71rem;color:#738ba7}
.page-title{display:flex;gap:23px;align-items:center;margin-bottom:22px}.page-title h1{font-size:clamp(1.65rem,3vw,2.3rem);margin-bottom:0}.back-button{align-self:flex-start;border:1px solid #35516d;border-radius:11px;white-space:nowrap}.page-fill{height:100%;display:flex;flex-direction:column;min-height:0}.chat-layout{flex:1;min-height:0;display:grid;grid-template-columns:310px minmax(0,1fr);overflow:hidden}.chat-sidebar{border-right:1px solid #304a66;min-height:0;display:flex;flex-direction:column}.sidebar-heading{display:flex;justify-content:space-between;align-items:center;padding:19px;border-bottom:1px solid #304a66;gap:7px}.sidebar-heading h2{margin:0}.channels{overflow:auto;flex:1;min-height:0}.channel{border:0;border-bottom:1px solid #24405a;background:transparent;width:100%;text-align:left;color:var(--text);padding:11.3px 15px;display:flex;align-items:center;gap:12px}.channel.active{background:#24435e}.channel:hover{background:#1b3753}.channel-avatar{display:grid;place-items:center;width:39px;height:39px;flex-shrink:0;background:linear-gradient(135deg,#2b7c8c,#354c72);border:1px solid #6abbb9;border-radius:50%;font-weight:800}.channel-body{display:grid;gap:5px;min-width:0;flex:1}.channel-body strong,.channel-body small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.channel-body small{color:#94aac5}.unread{min-width:22px;text-align:center;background:var(--aqua);color:#07313a;border-radius:12px;padding:3px 6px;font-size:.72rem}.chat-conversation{display:flex;flex-direction:column;min-height:0}.conversation-heading{min-height:69px;padding:14px 18px;border-bottom:1px solid #304a66;display:flex;align-items:center;gap:7px}.conversation-heading>div{display:grid;gap:5px}.conversation-heading small{font-size:.75rem}.message-list{min-height:0;flex:1;overflow-y:auto;overscroll-behavior:contain;padding:22px 22px 16px;display:flex;flex-direction:column;gap:11px}.empty-chat{margin:auto;color:#859db8;text-align:center}.message{background:#1c3754;border:1px solid #37526f;align-self:flex-start;max-width:min(78%,640px);border-radius:16px 16px 16px 5px;padding:8.75px 15px}.message.own{align-self:flex-end;background:#164c55;border-color:#317d83;border-radius:16px 16px 5px 16px}.message strong{font-size:.72rem;color:#99dadb}.message p{font-size:.9rem;margin:7px 0;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.4}.message small{font-size:.66rem;color:#9bb2c7;display:block;text-align:right}.day-divider{text-align:center;color:#8da9c5;font-size:.7rem;margin:10px 0}.chat-compose{border-top:1px solid #304a66;background:#0c2037;padding:11px 16px max(11px,env(safe-area-inset-bottom));position:relative;z-index:2}.message-form{display:flex;align-items:end;gap:10px}.message-form textarea{flex:1;max-height:120px;min-height:42px;resize:none;line-height:1.45}.send-button{background:var(--aqua);color:#092c35;min-width:43px;height:36.55px;border-radius:12px;font-size:1.2rem}.compose-note{color:#7389a3;display:block;font-size:.64rem;padding:7px 2px 0}.older-button{border-radius:9px;padding:5.35px 10px;margin-bottom:10px;color:var(--aqua);background:#1e3c58;font-size:.73rem}.mobile-only{display:none}
.report-grid,.system-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.report-card,.system-card{padding:23px}.report-card h2{margin-bottom:9px}.report-card .flag,.status-row b{color:#e5be81}.status-row{display:flex;justify-content:space-between;gap:15px;padding:8.75px 0;border-bottom:1px solid #2d465e;font-size:.88rem}.status-row b{font-size:.76rem}.system-card h3{margin-top:25px}.users-list{display:grid;gap:6px}.user-row{display:flex;justify-content:space-between;gap:8px;align-items:center;border-bottom:1px solid #28465b;padding:7.05px 0}.user-row small{color:#9cafc3}.danger-button{background:#68303f;color:#ffe4e7;border-radius:8px;padding:3.65px 9px;font-size:.72rem}.modal{color:var(--text);border:1px solid #3e6c79;padding:24px;width:min(440px,calc(100% - 24px));max-height:80dvh}.modal::backdrop{background:#020a15bb;backdrop-filter:blur(4px)}.modal form{display:grid;gap:13px}.modal label{font-size:.83rem;color:#c0d4e9}.modal-section-title{margin:8px 0 0;font-weight:800}.person-choices{max-height:210px;overflow:auto;display:grid;gap:8px}.person-choice{display:flex;gap:9px;align-items:center}.person-choice input{min-width:auto}.modal-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:12px}.toast{position:fixed;right:20px;bottom:25px;background:#173b4f;border:1px solid #5bc7c7;border-radius:13px;padding:14px 18px;color:#f0fcff;box-shadow:0 10px 30px #0008;z-index:20;max-width:min(380px,calc(100% - 40px))}
@media(max-width:1000px){.widgets-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.hero-planet{min-width:220px}.hero-planet img{width:240px;height:240px}}
@media(max-width:700px){.topbar{min-height:58px;padding:6px 12px}.brand{font-size:.74rem;letter-spacing:.07em}.brand img{width:40px;height:40px}.topbar-right{gap:3px}.topbar-right .user-pill{display:none}.alpha-badge{font-size:.53rem;padding:5px 7px}.quiet-button{padding:5.35px 8px}.page{padding:18px 14px}.home-top{min-height:220px;position:relative}.home-copy{width:100%;padding-right:22%}.home-copy h1{font-size:2rem}.home-copy>p:not(.eyebrow){font-size:.81rem}.hero-planet{position:absolute;right:-52px;top:-5px;min-width:0;width:190px;opacity:.64;pointer-events:none}.hero-planet img{width:200px;height:200px}.ai-composer{padding:15px}.composer-label .small{display:none}.ai-input-row{gap:7px}.ai-input-row .primary-button{padding:8.75px 12px}.widgets-heading{margin-top:27px}.widgets-grid{gap:10px}.widget{padding:15px;min-height:150px}.widget strong{font-size:.91rem}.widget small{font-size:.73rem}.widget-symbol{width:33px;height:33px}.widgets-heading h2{font-size:1.16rem}.widgets-heading .outline-button{padding:5.35px 8px;font-size:.7rem}.page-title{gap:11px;margin-bottom:13px;align-items:flex-start}.page-title h1{font-size:1.56rem}.back-button{font-size:.74rem;padding:5.35px 8px}.chat-layout{display:block;position:relative;flex:1}.chat-sidebar,.chat-conversation{position:absolute;inset:0}.chat-sidebar{border-right:none}.chat-conversation{display:none}.chat-layout.conversation .chat-sidebar{display:none}.chat-layout.conversation .chat-conversation{display:flex}.mobile-only{display:block}.message-list{padding:12px 9px}.message{max-width:90%;padding:7.05px 12px}.compose-note{font-size:.61rem}.report-grid,.system-grid{grid-template-columns:1fr}.report-card,.system-card{padding:19px}.login-card{padding:25px 20px}.app-main{overflow:auto}.page-fill{padding-bottom:8px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
.reply-text{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.55;font-size:.91rem;color:var(--text)}
.update-card{grid-column:1/-1}.update-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:12px}.update-heading h2{margin:0}.update-status{display:flex;flex-wrap:wrap;align-items:center;gap:9px 20px;background:#081a2f;border:1px solid #31516a;border-radius:13px;padding:15px;margin:16px 0;font-size:.85rem}.update-status strong{color:var(--aqua)}.update-status span{color:#b2c8da}.update-status p{width:100%;margin:0;font-size:.8rem}.update-form{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:12px 15px;margin:18px 0}.update-form label{grid-column:1/-1;color:#b4c8dd;font-size:.84rem}.update-preview{font-size:.82rem;overflow-wrap:anywhere;background:#132a42;border:1px dashed #43647d;border-radius:11px;padding:12px 14px;color:#d6e7f7}.update-confirm{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;margin-top:18px}.update-confirm>label:not(.update-check),.update-confirm>input{grid-column:1/-1}.update-confirm>label:not(.update-check){color:#b4c8dd;font-size:.82rem}.update-check{grid-column:1/-1;display:flex;align-items:flex-start;gap:10px;font-size:.79rem;color:#b4c8dd}.update-check input{margin-top:2px;min-width:0;flex-shrink:0}.update-actions{grid-column:1/-1;display:flex;gap:10px;flex-wrap:wrap}.update-card>small{display:block;margin-top:15px;line-height:1.5}
@media(max-width:700px){.update-heading{align-items:flex-start}.update-heading .alpha-badge{font-size:.5rem}.update-form{grid-template-columns:1fr}.update-confirm{grid-template-columns:1fr}.update-actions{flex-direction:column}.update-actions button{width:100%}}

/* Saturn design system — shared by every existing screen. */
:root{--bg:#030a16;--bg2:#07172c;--glass:#10233a;--edge:#314a64;--text:#f0f5fc;--muted:#a0b2c8;--aqua:#8ecfff;--gold:#f1cd88}
[hidden]{display:none!important}
body{background:radial-gradient(ellipse at 48% 44%,#113a62 0,#071a31 35%,#020812 80%)}
.background-glow{inset:0;width:100%;height:100%;background:radial-gradient(1.5px 1.5px at 12% 17%,#d9f2ff,transparent),radial-gradient(2px 2px at 78% 22%,#aedfff,transparent),radial-gradient(1px 1px at 22% 68%,#fff,transparent),radial-gradient(1.5px 1.5px at 86% 73%,#dcf5ff,transparent),radial-gradient(1px 1px at 58% 85%,#b6dfff,transparent);background-size:470px 510px;opacity:.8;z-index:-1}
.surface{background:linear-gradient(145deg,#10243ad9,#061324f2);border:1px solid #49678088;box-shadow:inset 0 1px 0 #b7dfff12,0 12px 45px #0004;border-radius:22px}
.eyebrow{color:var(--gold);letter-spacing:.2em;font-size:.65rem}
.primary-button,.send-button{background:linear-gradient(145deg,#ffe5a8,#d5a55c);color:#211b11;box-shadow:inset 0 1px 0 #fff9,0 4px 14px #0003}
.primary-button:hover,.send-button:hover{filter:brightness(1.08)}
.outline-button{background:linear-gradient(#183047,#0c1c30);border-color:#506780;color:#e8f1fc}
button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline-color:var(--gold)}
input,textarea,select{background:linear-gradient(#0e2239,#0b1a2d);border-color:#36516c;border-radius:14px}
input::placeholder,textarea::placeholder{color:#92a7be}
.topbar{background:#030e1de8;border-color:#38516b70;padding:8px clamp(16px,3vw,40px);min-height:72px}
.brand strong,.login-card h1 span{color:var(--text)}
.brand{letter-spacing:.06em}.brand img{filter:drop-shadow(0 0 10px #278acb66)}
.user-pill{border:1px solid #466079;border-radius:30px;padding:9px 14px;background:#12263b}
.app-shell{position:relative;top:var(--viewport-top,0px)}
.page{max-width:1440px}.page-title .eyebrow{margin-bottom:5px}
.home-view{max-width:1100px}.home-top{flex-direction:column;gap:0;text-align:center;min-height:480px;justify-content:center;position:relative}
.home-copy{max-width:100%;width:100%;padding:0}.home-copy h1{font-size:clamp(1.4rem,3vw,2rem);font-weight:500;color:#dfebf7;margin-bottom:0;letter-spacing:-.02em}
.hero-planet{position:relative;inset:auto;min-width:0;width:min(480px,90vw);height:300px;margin:10px auto 0;border-radius:50%;background:none;display:grid;place-items:center;opacity:1;pointer-events:auto}
.hero-planet img{width:100%;height:auto;filter:drop-shadow(0 0 26px #278bdb66);animation:saturn-breathe 9s ease-in-out infinite}
.planet-halo{width:210px;height:160px;background:#248cd65c;filter:blur(60px);pointer-events:none}
@keyframes saturn-breathe{50%{transform:translateY(-5px);filter:drop-shadow(0 0 40px #278bdbaa)}}
.saturn-hint{font-size:.78rem;margin:3px 0}.state-line{margin:8px 0 22px;font-size:.72rem}.state-dot{width:6px;height:6px}
.ai-composer{max-width:850px;margin:0 auto}.home-footnote{text-align:center;color:#95aac1;font-size:.7rem}
.widget:hover{border-color:var(--gold)}.widget-symbol{background:#16324d;color:var(--gold)}
.widgets-grid{grid-template-columns:repeat(auto-fit,minmax(190px,1fr))}.widget{min-height:155px}.widget .flag{color:var(--gold)}
.orb-small{background:radial-gradient(circle at 30% 20%,#b3e5ff,#176fa3 70%);border:1px solid var(--gold);box-shadow:0 0 12px #3088bb}
.chat-layout{grid-template-columns:minmax(300px,36%) minmax(0,1fr);background:#03101ee8}
.chat-sidebar{background:radial-gradient(ellipse at 50% 30%,#0c2b4caa,#030e1d 70%);border-color:#37516b80}
.orbit-stage{position:relative;flex:none;align-self:center;width:min(100%,350px);aspect-ratio:1;isolation:isolate}
.orbit-saturn{width:100%;height:100%;filter:drop-shadow(0 0 24px #188bdb77);pointer-events:none}
.orbit-people{position:absolute;inset:0}
.orbit-person{position:absolute;transform:translate(-50%,-50%);background:none;color:#edf6ff;padding:2px;min-width:44px;min-height:44px;display:grid;justify-items:center;gap:4px;z-index:2}
.orbit-face{width:43px;height:43px;border-radius:50%;background:linear-gradient(135deg,#3b5269,#0a1729 80%);border:1px solid #9eb2c6;box-shadow:0 0 0 3px #04101dbb,0 4px 10px #0009;display:grid;place-items:center;font-weight:600;font-size:1rem;position:relative}
.orbit-person:hover .orbit-face,.orbit-person:focus-visible .orbit-face{border-color:var(--gold);box-shadow:0 0 15px #ecc78077}
.orbit-name{font-size:.68rem;max-width:85px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-shadow:0 1px 4px #000;background:#041121b3;border-radius:5px;padding:1px 3px}
.presence{position:absolute;width:9px;height:9px;background:#66778d;right:0;bottom:1px;border:2px solid #0b1c2f;border-radius:50%}.presence.online{background:#72dc85}
.orbit-face .unread{position:absolute;top:-8px;right:-9px;padding:2px 5px;min-width:20px}
.orbit-pause{position:absolute;bottom:4px;left:50%;transform:translateX(-50%);background:#0e2234b3;color:#b7cae0;border-radius:20px;padding:5px 10px;font-size:.62rem;white-space:nowrap;z-index:3}
.orbit-note{margin:3px 18px 12px;text-align:center;color:#9fb5cb;font-size:.66rem;line-height:1.4}
.chat-search{margin:0 15px 10px;min-height:39px;padding:9px 12px;font-size:.8rem;flex:none}
.chat-tabs{display:flex;gap:5px;margin:0 15px 8px}.chat-tabs button{background:none;color:#b9c9db;border-radius:20px;padding:4.5px 12px;font-size:.75rem}.chat-tabs button[aria-pressed=true]{background:linear-gradient(#f4d799,#d2a560);color:#201c16}
.sidebar-heading{padding:10px 16px;border-color:#304a6655}.sidebar-heading h2{font-size:.83rem;font-weight:500;color:#b8c9dc}.sidebar-heading .outline-button{padding:3.65px 9px}
.channels{padding:6px 10px;min-height:80px}.channel{padding:7.05px 10px;border:1px solid transparent;border-radius:15px;margin-bottom:5px;gap:9px}.channel.active{background:linear-gradient(120deg,#314054,#12263d);border-color:#d6b574}.channel:hover{background:#1c344e}.channel-body strong{font-size:.83rem}.channel-body small{font-size:.7rem}
.channel-avatar{background:linear-gradient(140deg,#3b5269,#0a1729);border-color:#6a839d;font-weight:500}.unread{background:linear-gradient(#f5dca4,#cda262);color:#211b11}
.empty-channels{color:var(--muted);font-size:.8rem;text-align:center;padding:16px}
.chat-conversation{background:linear-gradient(140deg,#08192be6,#030c18e6)}.conversation-heading{background:#061526cc;gap:10px}.conversation-heading>div{min-width:0;flex:1}.conversation-heading strong{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.favorite-chat{color:var(--gold);font-size:1.4rem}
.message-search{margin:10px 18px 0;padding:8px 12px;font-size:.72rem;flex:none}
.message{background:linear-gradient(135deg,#192f46,#0e2033);border-color:#34516a77;box-shadow:0 4px 10px #0002}.message.own{background:linear-gradient(130deg,#28587c,#17334f);border-color:#4c7799}.message strong{color:#b8cfe5}.message small{color:#b3c3d3}
.chat-compose{background:#061526e8;border-color:#34516a80}.message-form textarea{border-radius:24px;padding:10px 15px}.send-button{border-radius:50%}.compose-note{color:#9aabc0}.empty-chat{font-size:.85rem;padding:22px}.day-divider{color:#bacbde}
.back-button{background:#0a1a2dc9}.status-row b,.report-card .flag{color:var(--gold)}.update-status strong{color:var(--gold)}.toast{background:#12283e;border-color:var(--gold)}.modal{border-color:#7690a9}.login-planet{width:190px;height:150px;filter:drop-shadow(0 0 20px #2c8bc477)}
@media(min-width:701px) and (max-height:850px){.orbit-stage{width:255px}.orbit-note{margin-bottom:6px}.page-fill{padding-top:18px;padding-bottom:18px}.page-fill .page-title{margin-bottom:14px}}
@media(max-width:700px){
.topbar{min-height:58px;padding:6px 12px}.brand{font-size:.74rem}.brand img{width:36px;height:36px}.page{padding:16px 12px}.topbar-right .alpha-badge{display:none}
.home-top{min-height:420px}.home-copy{padding:0}.home-copy h1{font-size:1.45rem}.home-copy .eyebrow{font-size:.58rem}.hero-planet{position:relative;inset:auto;width:min(380px,94vw);height:260px;opacity:1;pointer-events:auto}.hero-planet img{width:100%;height:auto}.widgets-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.widget{min-height:145px}.home-footnote{font-size:.65rem}
.page-fill{padding:10px 7px 0}.page-fill .page-title{margin:0 5px 10px;align-items:center}.page-fill .page-title h1{font-size:1.05rem}.page-fill .page-title .eyebrow{display:none}.chat-layout{border-radius:20px 20px 0 0}.orbit-stage{width:min(80%,290px)}.orbit-face{width:40px;height:40px}.orbit-note{margin:2px 12px 8px}.chat-tabs{margin-bottom:3px}.sidebar-heading{padding:7px 16px}
.conversation-heading{padding:10px 12px;min-height:62px}.message-search{margin:8px 12px 0}.message-list{padding:12px}.chat-compose{padding:10px 10px max(8px,env(safe-area-inset-bottom))}.compose-note{display:none}.back-button{min-height:30.6px}.chat-conversation .mobile-only{min-width:38px;min-height:38px}.message-form textarea{font-size:16px}.chat-layout.conversation .chat-conversation{background:radial-gradient(ellipse at top,#0a233e,#030c18 60%)}
}
@media(max-height:570px){.orbit-stage{width:165px}.orbit-note{display:none}.orbit-name{display:none}.orbit-pause{bottom:0}.home-top{min-height:300px}.hero-planet{height:180px;width:270px}}
@media(prefers-reduced-motion:reduce){.hero-planet img{animation:none}}

.agent-card { border-top: 1px solid #29445c; margin-top: 18px; padding-top: 12px; overflow-wrap: anywhere; }
.agent-card button { margin: 4px 8px 4px 0; }
#agentKeyValue { width: 100%; min-width: 0; font-family: monospace; }
/* Keep the SVG inside its button so hints never sit beneath the ring. */
.hero-planet img{width:100%;height:100%;object-fit:contain}
.hero-planet{height:350px}
@media(max-width:700px){.hero-planet{height:280px}}
@media(max-height:570px){.hero-planet{height:180px}}
.system-card>label{display:block;color:var(--muted);font-size:.82rem;margin:15px 0 9px}
#agentAdminPassword{width:100%}

/* Release 0.1.7: account controls and observable update stages. */
.version-pill{display:inline-block;margin-top:12px;padding:6px 13px;border:1px solid rgba(234,188,88,.42);border-radius:30px;color:#efca79;background:rgba(10,26,46,.72);font-size:12px;letter-spacing:.05em}
.update-progress-panel{padding:18px;border:1px solid rgba(234,188,88,.28);border-radius:18px;background:rgba(5,17,32,.65);margin:16px 0}
.progress-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.update-progress-panel progress{display:block;appearance:none;-webkit-appearance:none;width:100%;height:12px;border:0;border-radius:30px;overflow:hidden;background:#0b1d34;accent-color:#e7bc68}
.update-progress-panel progress::-webkit-progress-bar{background:#0b1d34;border-radius:30px}
.update-progress-panel progress::-webkit-progress-value{background:linear-gradient(90deg,#8eaadc,#ebc16e);border-radius:30px}
.update-progress-panel progress::-moz-progress-bar{background:#e7bc68;border-radius:30px}
.update-progress-panel progress:indeterminate{background:linear-gradient(90deg,#0b1d34 0%,#e7bc68 48%,#0b1d34 100%);background-size:220% 100%;animation:update-wait 1.6s linear infinite}
.update-progress-panel progress:indeterminate::-webkit-progress-bar{background:transparent}
.update-progress-panel[data-state=error]{border-color:#b97972}
.update-progress-panel[data-state=error] progress{animation:none;background:#58332e;opacity:.55}
.password-dialog{width:min(440px,calc(100vw - 28px));max-height:calc(var(--window-height,100dvh) - 30px);overflow:auto;padding:24px}
.password-dialog input{width:100%;min-width:0}
.password-dialog h2{overflow-wrap:anywhere}
.user-row{flex-wrap:wrap;gap:10px}.user-row>div{flex:1 1 200px}.user-row button{flex:0 0 auto}
@keyframes update-wait{from{background-position:200% 0}to{background-position:-20% 0}}
@media(prefers-reduced-motion:reduce){.update-progress-panel progress:indeterminate{animation:none}}
@media(max-width:600px){.topbar-right{flex-wrap:wrap;justify-content:flex-end;gap:6px}.topbar-right .alpha-badge{display:none}.progress-heading{align-items:flex-start}.password-dialog{padding:20px}}

/* 0.1.8: a quiet home; account and diagnostics live in the menu. */
.topbar{position:relative;z-index:12}.topbar-right{position:relative}.main-menu-button{font-size:1.35rem;min-width:44px;min-height:37.4px}
.main-menu{position:absolute;right:0;top:calc(100% + 12px);width:min(310px,calc(100vw - 28px));max-height:calc(100dvh - 90px);overflow:auto;padding:16px;background:#091a2c;border-color:#49637c;display:flex;flex-direction:column;gap:5px;box-shadow:0 18px 60px #0009}
.main-menu button{text-align:left;min-height:36.55px;font-size:.88rem}.main-menu .menu-user{padding:10px;color:#e4d3ab;overflow-wrap:anywhere}.main-menu .version-pill{align-self:flex-start;margin:8px 10px}.menu-diagnostics{font-size:.76rem;color:var(--muted);padding:10px;line-height:1.5}.menu-diagnostics summary{cursor:pointer;padding:5px 0}
.home-view{max-width:1050px;padding-top:0}.home-top{min-height:calc(100dvh - 130px);min-height:calc(var(--window-height,100dvh) - 130px);justify-content:center;padding:24px 0 28px}
.home-copy h1{font-size:clamp(1.35rem,2.8vw,2rem);line-height:1.3;text-wrap:balance;margin:0 auto;max-width:850px}
.hero-planet{width:min(550px,90vw);height:auto;aspect-ratio:1.24;margin:18px auto 0;padding:0;isolation:isolate}
.home-saturn-art{width:100%;height:100%;display:block;overflow:visible;filter:drop-shadow(0 0 28px #278bdb66);animation:home-saturn-float 14s ease-in-out infinite;pointer-events:none}
.hero-planet .planet-halo{position:absolute;inset:22%;width:auto;height:auto;z-index:-1;background:#2896e066;border-radius:50%;filter:blur(55px);transition:opacity .5s;opacity:.6}
.home-input-tools{display:flex;justify-content:center;margin-top:-12px}.keyboard-button{font-size:1.5rem;min-width:48px;min-height:37.4px;color:#9eb7cf}
.voice-status{font-size:.84rem;color:#d9c389;line-height:1.5;max-width:580px;margin:10px 12px 0;text-align:center;overflow-wrap:anywhere}.voice-status.error-text{color:#ffc1b6}
#installVoicePack{margin-top:12px;max-width:100%;white-space:normal}#closeTextInput{margin-left:auto;font-size:1.25rem;padding:0 10px;min-width:44px;min-height:36px}#speakReply{margin-top:12px;color:var(--gold)}
.home-view:has(#homeComposer:not([hidden])) .home-top{min-height:0;padding:25px 0 8px}.home-view:has(#homeComposer:not([hidden])) .hero-planet{width:300px;max-width:80vw;margin-top:0}.ai-composer{margin-bottom:20px}.home-view .ai-input-row input{min-width:0}
.hero-planet[data-voice-state=listening] .planet-halo{opacity:1;background:#35c5e377}
.hero-planet[data-voice-state=listening] .home-ring{filter:drop-shadow(0 0 2px #9aefff)}
.hero-planet[data-voice-state=thinking] .home-saturn-art,.hero-planet[data-voice-state=preparing] .home-saturn-art{animation:home-saturn-think 4s ease-in-out infinite}
.hero-planet[data-voice-state=speaking] .planet-halo{animation:home-voice-glow 1.7s ease-in-out infinite}
.hero-planet[data-voice-state=speaking] .home-ring{animation:home-ring-speak 1.3s ease-in-out infinite}
.hero-planet[data-voice-state=error] .planet-halo{opacity:.25}
@keyframes home-saturn-float{50%{transform:translateY(-6px) rotate(3deg)}}
@keyframes home-saturn-think{50%{transform:rotate(9deg);filter:drop-shadow(0 0 34px #52b3e888)}}
@keyframes home-voice-glow{50%{opacity:1;transform:scale(1.12)}}
@keyframes home-ring-speak{50%{filter:drop-shadow(0 0 4px #ffe0a1)}}
@media(max-width:700px){.home-top{min-height:calc(100dvh - 105px);min-height:calc(var(--window-height,100dvh) - 105px);padding:16px 0 22px}.hero-planet{width:min(470px,94vw);height:auto;aspect-ratio:1.2}.home-copy h1{font-size:1.4rem;padding:0 14px}.home-view:has(#homeComposer:not([hidden])) .hero-planet{width:230px}.home-view:has(#homeComposer:not([hidden])) .home-top{padding-top:18px}.voice-status{font-size:.8rem}.home-view .ai-input-row{flex-wrap:wrap}.home-view .ai-input-row input{flex:1 1 180px;font-size:16px}.home-view .ai-input-row button{flex:1 0 auto}.main-menu .user-pill{display:block}}
@media(max-height:570px){.home-top{min-height:0;padding:14px 0}.hero-planet{width:230px;height:auto;margin-top:0}.home-view:has(#homeComposer:not([hidden])) .hero-planet{width:160px}.home-copy h1{font-size:1.2rem}.home-view:has(#homeComposer:not([hidden])) .home-top{padding-top:12px}.home-input-tools{margin-top:-20px}}
@media(prefers-reduced-motion:reduce){.home-saturn-art,.hero-planet .planet-halo,.home-ring{animation:none!important}}

.motion-setting{display:flex;align-items:center;gap:10px;padding:12px 10px;font-size:.85rem;color:var(--muted)}
.motion-setting input{width:18px;height:18px;accent-color:var(--gold)}
.home-top{padding-top:0}.home-copy h1{font-weight:400}
.ring-flow{stroke:#fff1bd;stroke-width:3.5;stroke-linecap:round;stroke-dasharray:8 42;opacity:.95;filter:drop-shadow(0 0 3px #ffd06b)}
.hero-planet[data-motion=on] .home-saturn-art{animation:saturn-drift 18s ease-in-out infinite!important;transform-origin:50% 50%}
.hero-planet[data-motion=on] .ring-flow{animation:ring-circulation 22s linear infinite!important}
.hero-planet[data-motion=on][data-voice-state=thinking] .ring-flow,.hero-planet[data-motion=on][data-voice-state=preparing] .ring-flow{animation-duration:4s!important}
.hero-planet[data-motion=on][data-voice-state=listening] .ring-flow{stroke:#b7f6ff;animation-duration:9s!important}
.hero-planet[data-motion=on][data-voice-state=speaking] .ring-flow{animation-duration:7s!important}
.hero-planet[data-motion=off] .home-saturn-art,.hero-planet[data-motion=off] .planet-halo,.hero-planet[data-motion=off] .home-ring,.hero-planet[data-motion=off] .ring-flow{animation:none!important}
@keyframes saturn-drift{0%,100%{transform:translateY(4px) rotate(-4deg)}50%{transform:translateY(-9px) rotate(5deg)}}
@keyframes ring-circulation{to{stroke-dashoffset:-100}}

.hero-planet[data-motion=on][data-voice-state=transcribing] .ring-flow{animation-duration:4s!important}
#cancelVoice{margin-top:10px;color:var(--muted)}

/* System navigation: one task per panel; same navy and gold palette. */
.system-layout{display:grid;grid-template-columns:224px minmax(0,1fr);gap:26px;align-items:start}
.system-sidebar{padding:22px 12px;position:sticky;top:18px}.system-sidebar>.eyebrow{padding:0 12px;margin-bottom:20px}
.system-nav{display:flex;flex-direction:column;gap:7px}.system-nav button{display:flex;align-items:center;gap:13px;min-height:40.8px;padding:9.6px 14px;border-radius:12px;border:1px solid transparent;text-align:left;background:transparent;color:#b4c3d5;font-weight:550;font-size:.88rem}
.system-nav button span{display:inline-grid;place-items:center;width:20px;font-size:1.1rem;flex-shrink:0}.system-nav button:hover{background:#18314b;color:#fff}.system-nav button[aria-current=page]{background:linear-gradient(110deg,#e4bc7424,#16304a);border-color:#d6b57566;color:#ffe3a7;box-shadow:inset 3px 0 #edc580}
.system-sidebar-note{margin:28px 12px 0;padding-top:18px;border-top:1px solid #29415b;font-size:.73rem;line-height:1.7;color:#8097b1}.system-update-notice{font-size:.76rem;color:var(--gold);margin:18px 12px 0}
.system-content,.system-panel{min-width:0}.system-mobile-switch{display:none}.system-section-heading{display:flex;align-items:flex-start;gap:20px;justify-content:space-between;margin-bottom:23px}.system-section-heading h2{font-size:1.7rem;margin-bottom:10px;font-weight:550}.system-section-heading p:last-child{margin:0;font-size:.9rem}.system-section-heading>button{flex-shrink:0}
.system-summary-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.system-summary{padding:22px;display:flex;flex-direction:column;gap:14px}.system-summary>span{color:var(--muted);font-size:.83rem}.system-summary>strong{font-size:1.4rem;font-weight:550;overflow-wrap:anywhere}.system-summary>button{align-self:flex-start;padding:5.35px 0;margin-top:auto;background:none;color:var(--gold);text-align:left;font-size:.8rem;min-height:30.6px}
.overview-components{margin-top:20px}.overview-components h3{margin:0 0 10px}.overview-components>p{margin:15px 0 0}.system-panel.system-card{padding:28px}.system-panel>h2{font-size:1.55rem}.system-panel .user-row{padding:12.15px 0}.system-panel .user-row small{display:block;line-height:1.6;margin-top:5px}.system-panel .user-row>div{flex-basis:160px}.system-panel .agent-card:first-child{margin-top:20px}
.add-employee{margin-top:26px;padding-top:20px;border-top:1px solid #34516b}.add-employee>summary{cursor:pointer;color:var(--gold);padding:8px 0;font-weight:600;list-style:none}.add-employee[open]>summary{margin-bottom:14px}.add-employee .stack{max-width:520px}.voice-service-state{margin:25px 0 20px;padding:20px;background:#07182a;border:1px solid #34516b;border-radius:15px}.voice-service-badge{display:inline-flex;padding:6px 11px;border:1px solid #967a51;border-radius:20px;background:#d9b37112;color:#f3d69f;font-size:.8rem}.voice-service-badge[data-ready=true]{color:#9ee2be;border-color:#477d65;background:#6bcc9512}.voice-service-state p{margin:14px 0 0;font-size:.9rem}.system-inline-actions{display:flex;flex-wrap:wrap;gap:12px}.voice-howto,.voice-setup-help{margin-top:26px;padding-top:20px;border-top:1px solid #34516b}.voice-howto h3,.voice-setup-help h3{margin-top:0}.voice-howto ol{padding-left:22px;color:#c7d5e5;line-height:1.8}.voice-setup-help strong{overflow-wrap:anywhere}
@media(max-width:1000px){.system-layout{grid-template-columns:200px minmax(0,1fr);gap:18px}.system-panel.system-card{padding:22px}.system-nav button{font-size:.82rem;padding:8.75px 10px;gap:8px}.system-summary{padding:17px}.system-summary>strong{font-size:1.18rem}}
@media(max-width:700px){.system-layout{display:block}.system-sidebar{display:none}.system-mobile-switch{display:grid;gap:7px;margin-bottom:20px}.system-mobile-switch label{font-size:.76rem;color:var(--muted)}.system-mobile-switch select{width:100%;font-size:16px;min-height:48px;border-color:#aa8d5e}.system-panel.system-card{padding:20px 16px}.system-section-heading{gap:12px;margin-bottom:20px}.system-section-heading h2{font-size:1.35rem}.system-section-heading p:last-child{font-size:.8rem}.system-section-heading>button{font-size:.76rem;padding:7.05px 10px}.system-summary-grid{gap:10px}.system-summary{padding:15px 12px;gap:10px}.system-summary>span{font-size:.73rem}.system-summary>strong{font-size:1.03rem}.system-summary>button{font-size:.7rem;line-height:1.5}.system-panel>h2{font-size:1.3rem}.system-inline-actions{flex-direction:column}.system-inline-actions button{width:100%}.system-panel .update-heading{flex-direction:column}.system-panel .update-heading h2{font-size:1.3rem}.system-panel .status-row{flex-wrap:wrap}.system-panel .voice-service-state{padding:16px}}

/* 0.1.11: bounded 1C reads and explicit company access. */
.onec-form{display:grid;gap:14px;max-width:760px;margin-top:20px}
.onec-dates{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.onec-dates label,.onec-access form>label{display:grid;gap:8px}
.onec-form input,.onec-form select{width:100%;min-width:0}
.onec-form input[type=checkbox]{width:auto}
.onec-result{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.7;margin-top:24px;max-height:65vh;overflow:auto}
.onec-access{flex-basis:100%;width:100%;border-top:1px solid var(--line);padding-top:12px}
.onec-access summary{cursor:pointer;color:#68dce0}
.user-row{flex-wrap:wrap}
#aiReply{white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:600px){.onec-dates{grid-template-columns:1fr}.onec-form{width:100%}}

.ai-choices {display:flex;flex-wrap:wrap;gap:10px;margin:12px 0}.ai-choices:empty{display:none}

.learning-entries{display:grid;gap:20px;margin-top:22px}.learning-entry{border:1px solid var(--line);border-radius:16px;padding:13.85px 18px;min-width:0}.learning-body{white-space:pre-wrap;overflow-wrap:anywhere}.learning-entry .stack{margin-top:18px}#learningDialog textarea{width:100%;resize:vertical;min-height:80px}#learningDialog{max-height:90dvh;overflow:auto}

/* Reports: independent full-page workspace, shared Saturn palette. */
#reportView{max-width:1280px;padding-top:24px}#reportView>.page-title{margin-bottom:18px}
.report-base-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 12px;padding-bottom:14px;border-bottom:1px solid #31485e}
.report-base-tab{min-height:37.4px;padding:7.9px 18px;border:1px solid transparent;border-radius:12px;background:transparent;color:var(--muted);font-size:.92rem}
.report-base-tab[aria-current=page]{background:#e7c58716;border-color:#bc9d6266;color:#ffe0a2}.report-base-tab small{font-size:.68rem}
.report-grid.report-center{display:block}.report-center{min-width:0}.report-center [hidden]{display:none!important}
.report-statebar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 16px;font-size:.8rem}
.report-status{display:inline-flex;align-items:center;gap:8px;color:#b3dfd0}.report-status::before{content:'';width:6px;height:6px;flex-shrink:0;background:currentColor;border-radius:50%}.report-status.paused{color:#ecc789}
.report-picker,.report-controls,.report-output,.report-catalog,.report-saved-panel{padding:22px;margin:0 0 16px;min-width:0}
.report-center summary{cursor:pointer;min-height:30px;font-weight:600;color:#dbe6f1}.report-center summary:focus-visible{outline:2px solid var(--gold);outline-offset:5px}
.report-center details[open]>summary{margin-bottom:16px}.report-center .small{overflow-wrap:anywhere}
.report-type-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.report-type-card{display:flex;flex-direction:column;gap:9px;text-align:left;padding:12.15px 16px;border:1px solid #36536c;border-radius:14px;background:#0c1c2e;color:#eaf2fb;min-height:80.75px}
.report-type-card:hover{border-color:var(--gold);background:#132b42}.report-type-card strong{font-size:.92rem;font-weight:550}.report-type-card span{font-size:.72rem}
.report-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}
.report-field{display:grid;gap:7px;color:var(--muted);font-size:.78rem}.report-field input,.report-field select{width:100%;min-width:0;font-size:.92rem;min-height:44px}
.report-dates{display:grid;grid-template-columns:1fr 1fr;gap:12px}.report-form-note,.report-form>.report-warning,.report-form>.report-toolbar,.report-form>.update-check,.report-form>.small{grid-column:1/-1}
.report-form-note{margin:0;font-size:.75rem}.report-toolbar{display:flex;gap:9px;flex-wrap:wrap;align-items:center}.report-toolbar a{text-decoration:none;display:inline-flex;align-items:center;justify-content:center;min-height:34px}
.report-progress{margin:0 0 14px;color:var(--gold)}.report-progress:empty{display:none}
.report-output{padding:30px}.report-result-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:12px}.report-result-heading>div{min-width:0}.report-result-heading h2{font-size:clamp(1.4rem,2.4vw,1.9rem);font-weight:550;line-height:1.2;letter-spacing:-.025em;margin:0 0 12px;overflow-wrap:anywhere}.report-result-heading .eyebrow{font-size:.62rem;letter-spacing:.17em;margin-bottom:10px}.report-result-heading>button{flex-shrink:0}
.report-period{font-size:.94rem;color:#b4c5d8;margin:0}.report-brief-note{font-size:.76rem;color:#acbbcd;padding:0 0 14px;margin:0;line-height:1.6}
.report-result-actions{padding-bottom:20px;margin-bottom:8px;border-bottom:1px solid #2c435a}.report-result-actions .quiet-button{font-size:.78rem}
.report-warning{padding:12px 14px;border-left:3px solid #dbb16a;background:#e1b35e12;border-radius:6px;color:#f3d69e;font-size:.86rem}.report-verified{color:#a6e4da}
.report-data-group+.report-data-group{margin-top:28px;padding-top:20px;border-top:1px solid #36516b}.report-group-title{font-size:.86rem;font-weight:550;margin:18px 0;color:#bed0e2}
.report-metrics{display:flex;flex-wrap:wrap;gap:16px 40px;margin:0 0 22px}.report-metric{display:flex;flex-direction:column;gap:7px;min-width:0}.report-metric>span{font-size:.7rem;color:#95abc1}.report-metric>strong{font-size:clamp(1.3rem,2.3vw,1.85rem);font-weight:550;line-height:1.2;letter-spacing:-.02em;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.report-metric.main>strong{color:#ffe0a2}
.report-table-wrap{overflow:auto;max-height:65vh;border:1px solid #2b465d;border-radius:13px}.report-table{width:100%;border-collapse:separate;border-spacing:0;font-size:.87rem}
.report-table th,.report-table td{padding:11.3px 17px;border-bottom:1px solid #253d54;text-align:left;vertical-align:top;overflow-wrap:anywhere;line-height:1.45}.report-table th{position:sticky;top:0;background:#12273b;color:#a8bed2;font-size:.73rem;z-index:1}.report-table td:first-child{min-width:115px;max-width:500px}.report-table tbody tr:last-child td{border-bottom:0}.report-table tbody tr:nth-child(even){background:#17334a20}.report-table tbody tr:hover{background:#25455f40}.report-table td.numeric,.report-table th.numeric{text-align:right;font-variant-numeric:tabular-nums}.report-table td.numeric{white-space:nowrap;color:#eaf4ff;min-width:65px}.report-table th.numeric{white-space:nowrap}
.report-sort{background:none;border:0;color:inherit;font:inherit;font-weight:600;padding:0 0;cursor:pointer;text-align:inherit;min-height:24px}.report-table th[aria-sort=ascending] .report-sort::after{content:' ↑';color:var(--gold)}.report-table th[aria-sort=descending] .report-sort::after{content:' ↓';color:var(--gold)}
.report-freshness{margin:16px 0 0;font-size:.72rem;color:#8da4bc;line-height:1.6}.report-method{margin-top:22px;border-top:1px solid #2d465e;padding-top:16px}.report-method summary{font-size:.8rem;color:#9cb3ca}.report-method details{margin-top:18px}.report-method .small{font-size:.76rem;line-height:1.7}.report-codes{display:flex;gap:9px;align-items:center;font-size:.8rem;color:var(--muted);margin:14px 0}.report-codes input{width:18px;height:18px;accent-color:#e4c07e}
.report-empty{padding:30px 0;text-align:center;color:var(--muted)}.report-saved-panel>label{margin-bottom:12px;max-width:450px}.report-saved{display:grid;gap:10px;margin-top:16px}.report-catalog .report-form{margin:18px 0}.report-catalog details{margin:14px 0}.report-catalog-row{display:grid;gap:6px;padding:8.75px 0;border-bottom:1px solid #294258}
@media(max-width:800px){.report-type-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.report-output{padding:24px}.report-metric>strong{font-size:1.5rem}}
@media(max-width:600px){#reportView{padding:18px 12px 30px}.report-picker,.report-controls,.report-catalog,.report-saved-panel{padding:16px}.report-output{padding:20px 14px;border-radius:18px}.report-form{grid-template-columns:1fr}.report-field input,.report-field select{font-size:16px}.report-type-card{padding:9.6px 13px;min-height:78.2px}.report-type-card strong{font-size:.84rem}.report-type-card span{font-size:.68rem}.report-base-tab{padding:7.05px 12px;font-size:.84rem}.report-result-heading{gap:10px;flex-wrap:wrap}.report-result-heading h2{font-size:1.45rem}.report-result-heading>button{font-size:.73rem}.report-period{font-size:.83rem}.report-brief-note{font-size:.72rem}.report-result-actions{gap:7px;padding-bottom:16px}.report-result-actions a{font-size:.72rem;padding:9px 11px}.report-metrics{gap:18px;margin:0 0 18px}.report-metric.main{flex:1 1 195px}.report-metric.main>strong{font-size:clamp(1.5rem,6vw,1.9rem)}.report-metric>strong{font-size:1.35rem}.report-metric>span{font-size:.68rem}.report-group-title{font-size:.78rem;margin:16px 0}.report-table{font-size:.76rem}.report-table th,.report-table td{padding:8.75px 8px}.report-table th{font-size:.66rem}.report-table td:first-child{min-width:95px}.report-table td.numeric{min-width:50px}.report-table-wrap{max-height:65dvh}.report-statebar{font-size:.74rem}.report-freshness{font-size:.66rem}.report-method .small{font-size:.72rem}.report-method .report-form{grid-template-columns:1fr}}

.report-more-actions{position:relative}.report-more-actions>summary{list-style:none;border:1px solid #506780;border-radius:12px;min-height:34px;padding:6.2px 12px;font-size:.78rem;background:#10263b}.report-more-actions>summary::-webkit-details-marker{display:none}.report-center .report-more-actions[open]>summary{margin:0}.report-extra-actions{position:absolute;z-index:4;right:0;top:48px;min-width:170px;padding:8px;border:1px solid #496780;border-radius:12px;background:#09192b;box-shadow:0 10px 35px #0006;display:flex;flex-direction:column;align-items:stretch}.report-extra-actions a,.report-extra-actions button{font-size:.8rem;white-space:nowrap;text-align:left;justify-content:flex-start}

/* 0.1.17: stock valuation uses the existing report layout, no new application shell. */
.stock-value-controls{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:14px;grid-column:1/-1;min-width:0}.stock-value-controls[hidden]{display:none}.stock-value-controls select,.stock-value-controls input{width:100%;min-width:0}.stock-value-controls select[multiple]{min-height:112px}.stock-value-controls>p{grid-column:1/-1;margin:0}.stock-value-controls>button{align-self:end;min-height:37.4px}.value-tabs{flex-wrap:wrap}.value-tabs button[aria-pressed="true"]{border-color:var(--gold,#f2d08a);background:#e6bf6c24;color:#fff0cb}.value-body{min-width:0}.report-drill{border:0;padding:0;min-height:36px;background:transparent;color:inherit;text-align:left;cursor:pointer;text-decoration:underline;text-decoration-color:#d6b56a75;text-underline-offset:4px;font:inherit}.value-body .report-table-wrap{max-width:100%}.value-body .report-table th,.value-body .report-table td{max-width:300px}.value-body .report-table td:first-child{min-width:160px}.value-body .report-sort{white-space:normal}.report-metric strong{overflow-wrap:anywhere}@media(max-width:540px){.stock-value-controls{grid-template-columns:1fr}.stock-value-controls>button{width:100%}.value-tabs{gap:7px}.value-tabs button{flex:1 0 130px}.value-body .report-table{font-size:13px}.value-body .report-table th,.value-body .report-table td{padding:7.05px 10px}}

.value-currency{min-width:80px;white-space:nowrap}.value-body th{min-width:100px}.value-body th:first-child{min-width:160px}.value-body td.numeric{min-width:112px}

/* 0.1.18: a single viewport home, independent composer and personal blocks.
   Only the home is constrained; reports, chat history and dialogs stay scrollable. */
[hidden]{display:none!important}
body[data-view=home]{overflow:hidden}
body[data-view=home] .app-main{overflow:hidden;min-height:0}
body[data-view=home] .topbar{min-height:50px;gap:8px;padding:4px clamp(8px,2vw,20px)}
body[data-view=home] .topbar>.brand{flex:none;white-space:nowrap}
body[data-view=home] .brand img{max-width:40px;max-height:40px}
body[data-view=home] .topbar-right{min-width:0}
@media(max-width:600px){
 body[data-view=home] .topbar{flex-wrap:wrap;row-gap:1px}
 body[data-view=home] .topbar-right{max-width:100%;margin-inline-start:auto;column-gap:3px}
}
.home-view{height:100%;min-height:0;width:100%;max-width:1200px;margin:0 auto;padding:6px 22px 12px;display:flex;flex-direction:column;gap:8px;overflow:hidden}
.home-view .home-top,.home-view:has(#homeComposer:not([hidden])) .home-top{flex:1 1 0;min-height:100px;padding:0;gap:0;justify-content:center}
.home-view .home-copy{flex:0 0 auto;padding:0;max-width:100%}
.home-view .home-copy h1{font-size:clamp(1.1rem,2vw,1.65rem);line-height:1.25;margin:0;padding:0 8px}
.home-orbit-stage{--planet-size:360px;position:relative;isolation:isolate;flex:0 1 auto;width:min(var(--planet-size),100%);height:calc(var(--planet-size) / 1.24);min-height:0;margin:4px auto 0}
.home-view .hero-planet,.home-view:has(#homeComposer:not([hidden])) .hero-planet{position:relative;inset:auto;width:100%;max-width:none;height:100%;min-width:0;aspect-ratio:auto;margin:0;padding:0;opacity:1;pointer-events:auto}
.home-orbit-stage .orbit-people{pointer-events:none}
.home-orbit-stage .orbit-person{pointer-events:auto;min-width:44px;min-height:44px;width:72px;touch-action:manipulation}
.home-orbit-stage .orbit-name{max-width:72px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.home-orbit-stage.compact-orbit .orbit-person{width:44px}
.home-orbit-stage.compact-orbit .orbit-name{display:none}
.home-orbit-stage.compact-orbit .orbit-face{width:32px;height:32px}
.home-orbit-toolbar{display:flex;justify-content:center;flex-wrap:wrap;flex:0 0 auto;gap:6px;max-width:100%}
.home-orbit-toolbar button{font-size:.7rem;padding:1.95px 9px;min-height:24px}
.home-view .orbit-note{flex:0 0 auto;display:block;margin:0;font-size:.65rem;line-height:1.2;min-height:12px}
.home-view .home-input-tools{flex:0 0 auto;margin:0;position:relative;z-index:4}
.home-view .keyboard-button{padding:1.95px 16px;min-height:27.2px}
.home-view .voice-status{flex:0 0 auto;max-width:100%;font-size:.75rem;margin:0}
.home-view .ai-composer{flex:0 0 auto;width:100%;max-width:900px;max-height:min(30vh,225px);margin:0 auto;padding:12px 15px;overflow:auto;scrollbar-width:none}
.home-view .ai-composer::-webkit-scrollbar{display:none}
.home-view .composer-label{margin-bottom:7px}
.home-view .reply-text{margin:6px 0;font-size:.86rem;overflow-wrap:anywhere}
.home-view .ai-choices{max-width:100%;flex-wrap:wrap}
.home-view #homeActions{flex:0 0 auto;min-height:0;max-height:32%;overflow:auto;scrollbar-width:none}
.home-view #homeActions::-webkit-scrollbar{display:none}
.home-view .widgets-heading{align-items:center;margin:0 0 6px}
.home-view .widgets-heading h2{font-size:.85rem}
.home-view .widgets-heading .eyebrow{display:none}
.home-view .widgets-heading button{font-size:.75rem;padding:3.65px 11px;min-height:27.2px}
.home-view .widgets-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:9px}
.home-view .widget{min-height:58px;min-width:0;padding:9px 10px;gap:4px;border-radius:13px;display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:center}
.home-view .widget>strong{font-size:.8rem;line-height:1.25;overflow-wrap:anywhere}
.home-view .widget-symbol{font-size:1.1rem;margin:0}
.home-view .widget>small,.home-view .widget>.flag{display:none}
.home-view .widget-editor{position:static;display:flex;width:100%;justify-content:center;gap:4px;padding:0}
.home-view .widget-editor button{min-width:30px;min-height:24px;padding:0.25px 2px}
.home-save-bar{flex:0 0 auto;display:flex;gap:6px;align-items:center;justify-content:flex-end;flex-wrap:wrap;font-size:.7rem;min-height:18px;color:var(--muted)}
.home-save-bar[data-state=error]{color:#ffd49a}
.home-save-bar button{font-size:.7rem;padding:0.25px 5px}
.employee-photo{display:block;width:100%;height:100%;border-radius:inherit;object-fit:cover}
.profile-preview{display:grid;place-items:center;width:128px;height:128px;border-radius:50%;background:#203b59;border:2px solid var(--gold);margin:0 auto;font-size:2rem;overflow:hidden}
.profile-dialog .modal-actions{flex-wrap:wrap}
.home-setting{display:flex;align-items:center;gap:10px;margin:14px 0;font-size:.9rem}
.home-setting input{width:20px;height:20px;flex:0 0 auto}
.home-people-list{display:grid;gap:6px;max-height:50vh;overflow:auto}
.person-shortcut{display:flex;align-items:center;gap:12px;background:#10243d;color:var(--text);border-radius:10px;padding:6.2px 9px;text-align:left}
#profileStatus{overflow-wrap:anywhere}
#homeSettingsDialog,#profileDialog{overflow:auto}
@media(max-width:900px){
 .home-view .widget>strong{font-size:.73rem}
 .home-view .widgets-grid{gap:5px}
 .home-view .orbit-face{width:36px;height:36px}
 .home-view .orbit-name{display:block;max-width:65px;font-size:.6rem}
}
@media(min-width:761px) and (max-height:650px){
 .home-view{padding:2px 16px 6px;gap:5px}
 .home-view .home-copy h1{font-size:1.05rem}
 .home-view .orbit-note{display:none}
 .home-orbit-toolbar button{padding:0 7px;min-height:24px}
 .home-view .ai-composer{padding:8px 12px;max-height:26vh}
 .home-view .widget{min-height:48px;padding:5px 8px}
 .home-view .widgets-heading{margin-bottom:3px}
}
@media(max-width:760px){
 body[data-view=home] .app-main{overflow-y:auto;overflow-x:hidden;scrollbar-width:none}
 .home-view{height:auto;min-height:100%;padding:8px 12px 16px;overflow:visible}
 .home-view .home-top,.home-view:has(#homeComposer:not([hidden])) .home-top{flex:none;min-height:300px}
 .home-view .widgets-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .home-view #homeActions{max-height:none;overflow:visible}
 .home-view .ai-composer{max-height:40vh}
 .home-view .widget{min-height:54px}
 .home-view .ai-input-row input{flex:1 1 160px;font-size:16px}
 .home-view .orbit-note{font-size:.62rem}
}
@media(min-width:761px) and (max-height:430px){
 /* Extreme zoom/split-screen: keep content reachable instead of cutting it off. */
 body[data-view=home] .app-main{overflow-y:auto;scrollbar-width:none}
 .home-view{height:auto;min-height:100%;overflow:visible}
 .home-view .home-top{min-height:220px;flex:none}
 .home-view #homeActions{max-height:none}
}
@media(prefers-reduced-motion:reduce){.home-orbit-stage .orbit-person{transition:none}}

/* 0.1.19 — device center, independent from the personalized home layout. */
.device-panel{width:100%;max-width:100%;box-sizing:border-box;min-width:0}
.device-panel .device-card:last-child{margin-bottom:0}
.device-dialog-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.device-dialog-heading h2{margin:4px 0 20px}.device-card{border:1px solid rgba(148,185,226,.19);border-radius:14px;padding:18px;margin:0 0 14px;background:rgba(18,37,65,.35)}
.device-card h3{margin:0 0 12px}.device-card p{line-height:1.5}.device-check{display:flex;align-items:center;gap:10px}.device-check input{width:18px;height:18px;flex:0 0 auto}
.device-card input:not([type=checkbox]){width:100%;min-width:0}.device-card summary{cursor:pointer;font-weight:600}.device-message{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.5}.push-device-row{padding:10.45px 0;display:flex;gap:12px;align-items:center;border-bottom:1px solid rgba(148,185,226,.15)}.push-device-row span{flex:1;overflow-wrap:anywhere}
.push-inbox-item{display:block;width:100%;text-align:left;color:inherit;border:1px solid rgba(148,185,226,.2);border-radius:10px;background:transparent;padding:8.75px 12px;margin:8px 0;cursor:pointer;line-height:1.5}.device-panel button{white-space:normal;overflow-wrap:anywhere}.device-system-card{margin:0 0 16px}
@media(max-width:600px){.system-panel.device-panel{padding:16px}.device-card{padding:14px}.device-card .system-inline-actions{display:grid;grid-template-columns:1fr}.push-device-row{align-items:flex-start;flex-direction:column}.device-panel h2{font-size:22px}}

/* 0.1.20: employee identity, photograph and password are one System card. */
.employee-card{padding:15.55px 0;border-bottom:1px solid #34516b;min-width:0}
.employee-card:last-child{border-bottom:0}
.employee-card-heading{display:flex;align-items:center;gap:18px;min-width:0}
.employee-card-face{width:64px;height:64px;flex:0 0 64px;display:grid;place-items:center;border-radius:50%;overflow:hidden;border:1px solid var(--gold);background:#17324c;font-size:1.4rem}
.employee-card-identity{min-width:0;overflow-wrap:anywhere}
.employee-card-identity h3{margin:0 0 6px;font-size:1.1rem}
.employee-card-identity p{margin:4px 0;font-size:.82rem}
.employee-card-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}
.employee-card-actions button{min-height:35.7px;font-size:.83rem}
.employee-password-hint{margin:10px 0 0}
.employee-password-info{border-top:1px solid #34516b;margin-top:10px;padding-top:12px}
.employee-password-info h3{margin:0;font-size:1rem}
#profileIdentity,#profileName{margin:0;overflow-wrap:anywhere}
#profileTitle{margin-bottom:0}
@media(max-width:600px){.employee-card-heading{gap:12px}.employee-card-face{width:52px;height:52px;flex-basis:52px}.employee-card-actions{display:grid;grid-template-columns:1fr 1fr}.employee-card-actions .danger-button{grid-column:1/-1}.device-dialog-heading{flex-wrap:wrap}.device-dialog-heading h2{margin-bottom:4px}}

.profile-dialog{width:min(620px,calc(100vw - 24px));max-height:calc(100dvh - 32px)}
.profile-dialog form{gap:10px}
.profile-dialog .eyebrow{margin-bottom:2px}
.employee-profile-summary{display:flex;gap:20px;align-items:center;margin:10px 0}
.employee-profile-summary .profile-preview{width:100px;height:100px;flex:0 0 100px;margin:0}
.employee-profile-details{display:grid;gap:8px;min-width:0;flex:1}
.employee-profile-details #profileName{font-weight:650;font-size:1.05rem}
.employee-profile-details input{width:100%;font-size:.8rem}
.profile-dialog .employee-password-info{margin:0;padding-top:10px}
.profile-dialog .employee-password-info p{margin-bottom:10px}
.profile-dialog #profileStatus:empty{display:none}
@media(max-width:520px){.profile-dialog{padding:18px 14px}.employee-profile-summary{align-items:flex-start;gap:12px}.employee-profile-summary .profile-preview{width:66px;height:66px;flex-basis:66px}.profile-dialog .modal-actions{gap:6px}.profile-dialog .modal-actions button{font-size:.8rem;padding:7.05px 10px}.employee-profile-details input{padding:8px}.employee-profile-details #profileName{font-size:.95rem}}

/* 0.1.22 — two independent panes. Right-hand content scroll never moves the left menu. */
body[data-view="system"] .app-main{overflow:hidden;min-height:0}
body[data-view="system"] #systemView{height:100%;min-height:0;display:flex;flex-direction:column;overflow:hidden;padding-bottom:18px}
body[data-view="system"] #systemView>.page-title{flex:0 0 auto}
body[data-view="system"] .system-layout{flex:1;min-height:0;align-items:stretch;overflow:hidden}
body[data-view="system"] .system-sidebar{position:relative;top:auto;height:100%;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
body[data-view="system"] .system-content{height:100%;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:0 8px 24px 0}
@media(max-width:700px){body[data-view="system"] .system-layout{display:flex;flex-direction:column;gap:0}body[data-view="system"] .system-mobile-switch{flex:0 0 auto;margin:0 0 12px}body[data-view="system"] .system-content{flex:1;height:auto;padding-right:0}body[data-view="system"] #systemView{padding-bottom:8px}}

/* Personal avatar layer spans the home workspace, not just the planet rectangle. */
.home-view{position:relative}
.home-view>.orbit-people{position:absolute;inset:0;pointer-events:none;z-index:5;overflow:hidden}
.home-view>.orbit-people .orbit-person{pointer-events:auto;width:72px;min-width:44px;min-height:44px;touch-action:none;user-select:none;-webkit-user-select:none}
.home-view>.orbit-people .orbit-name{max-width:76px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
.home-view>.orbit-people .orbit-person img{pointer-events:none;-webkit-user-drag:none}
.home-view>.orbit-people .orbit-person.dragging{z-index:20;cursor:grabbing;filter:drop-shadow(0 0 8px #8fe7ff)}
.home-view>.orbit-people .orbit-person.pinned::after{content:'⌖';position:absolute;right:7px;top:-2px;font-size:12px;color:#ffe3a7;text-shadow:0 1px 3px black}
.home-view>.orbit-people .orbit-person.selected .orbit-face{outline:2px solid #ffe3a7;outline-offset:3px}
.home-view #homeComposer,.home-view #homeActions,.home-view .home-orbit-toolbar,.home-view .home-input-tools,.home-save-bar,.orbit-layout-bar{position:relative;z-index:6}
.orbit-layout-bar{font-size:.65rem;line-height:1.2;min-height:0;color:var(--muted);display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:6px;max-width:100%;flex:0 0 auto}
.orbit-layout-bar:has(#orbitLayoutStatus:empty){display:none}
.orbit-layout-bar[data-state=error]{color:#ffd49a}
.orbit-layout-bar button{font-size:.65rem;padding:0.25px 6px;min-height:24px}
@media(max-width:760px){.home-view>.orbit-people .orbit-person{width:58px}.home-view>.orbit-people .orbit-name{max-width:58px;font-size:.65rem}.home-view>.orbit-people .orbit-face{width:36px;height:36px}}
@media(max-height:650px) and (min-width:761px){.home-view>.orbit-people .orbit-person{width:48px}.home-view>.orbit-people .orbit-name{display:none}.home-view>.orbit-people .orbit-face{width:32px;height:32px}}
/* Rights are a genuine tab within the existing employee card. */
.profile-dialog:has(#profileRightsPanel:not([hidden])){width:min(780px,calc(100% - 24px));max-height:90dvh}
.employee-tabs{display:flex;gap:6px;border-bottom:1px solid var(--edge);margin:0 0 18px;padding-bottom:10px;position:sticky;top:-24px;background:#10243d;z-index:3}
.employee-tabs button{padding:7.05px 14px;border:1px solid transparent;border-radius:9px;background:transparent;color:var(--muted);font-size:.78rem;font-weight:700;min-height:35.7px}
.employee-tabs button[aria-selected=true]{border-color:#d6b57577;background:#e4bc741a;color:#ffe3a7}
.rights-form{display:grid;gap:14px}
.rights-fields{border:1px solid var(--edge);border-radius:12px;min-width:0;padding:6px 14px;margin:0}
.permission-row{display:flex;align-items:flex-start;gap:12px;padding:7.05px 0;border-bottom:1px solid #29415d;color:var(--text);line-height:1.35}
.permission-row:last-child{border:0}.permission-row:not(.permission-child){font-size:.95rem;font-weight:650;margin-top:8px}.permission-child{padding-left:20px;font-size:.85rem}
.permission-row input{width:20px;height:20px;min-width:20px;margin:0;accent-color:#e5bc7c}.permission-row:has(input:disabled){color:var(--muted)}
.permission-row small{display:block;font-weight:400;font-size:.72rem;margin-top:3px}
.rights-bases{border-top:1px solid var(--edge);margin:24px 0 16px;padding-top:18px}.rights-form input[type=password]{display:block;width:100%;margin-top:8px}.rights-status{font-size:.8rem;overflow-wrap:anywhere}
#closeRightsProfile{margin-top:15px}.rights-form .system-inline-actions button{font-size:.8rem}
@media(max-width:600px){.profile-dialog:has(#profileRightsPanel:not([hidden])){padding:18px 14px}.employee-tabs{top:-18px}.permission-child{padding-left:10px}.rights-fields{padding:4px 10px}}

/* Full available home workspace for pinned avatars; content retains its prior measure. */
.home-view{max-width:none}
.home-view>.home-top,.home-view>#homeActions{width:100%;max-width:1156px;align-self:center}

/* 0.1.23: lifecycle status stays distinct from the last 1C probe. */
.agent-card-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.agent-card-heading h3{margin:0}.agent-control-badge{padding:7px 10px;border:1px solid #64798a;border-radius:20px;font-size:.82rem;background:#102234;color:#dbe9f5}.agent-control-badge[data-state="running"],.agent-control-badge[data-state="busy"]{border-color:#5abca9;color:#a5e6d0}.agent-control-badge[data-state="offline"],.agent-control-badge[data-state="stopping"],.agent-control-badge[data-state="starting"]{border-color:#c8a466;color:#f6d495}.agent-control-status{margin:12px 0}.agent-tech{margin-top:16px;padding:12px 0;border-top:1px solid #30465d}.agent-tech summary{cursor:pointer;margin-bottom:8px}.agent-tech button{margin:5px 8px 5px 0}.warning-text{color:#f2cf98}.agent-card .system-inline-actions{flex-wrap:wrap;gap:10px}.agent-card{overflow-wrap:anywhere}#agentCards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,350px),1fr));gap:18px}

/* 0.1.24: stable icon/label slots and compact chat bubbles. */
.home-view .widgets-grid{grid-template-columns:repeat(auto-fit,minmax(148px,1fr));align-items:stretch}
.home-view .widget{display:grid;grid-template-columns:32px minmax(0,1fr);grid-template-rows:auto;align-content:center;align-items:center;justify-items:start;gap:6px 10px;padding:7.05px 12px;min-height:47.6px;text-align:left}
.home-view .widget-symbol{grid-column:1;grid-row:1;width:32px;height:32px;min-width:32px;margin:0;font-size:1.05rem;line-height:1}
.home-view .widget>strong{grid-column:2;grid-row:1;min-width:0;margin:0;line-height:1.25;font-size:.8rem;word-break:normal;overflow-wrap:normal;hyphens:none}
.home-view .widget-editor{grid-column:1/-1;grid-row:2;margin:0;width:100%}
.home-view .home-orbit-toolbar{align-items:center}
.home-view .home-orbit-toolbar button{display:inline-flex;align-items:center;justify-content:center;min-height:27.2px;line-height:1.2}
.message-list{gap:6px}
.message{flex:0 0 auto;min-width:0;padding:3.65px 10px;border-radius:13px 13px 13px 4px}
.message.own{border-radius:13px 13px 4px 13px}
.message .message-sender{display:block;margin:0 0 3px;line-height:1.2;overflow-wrap:anywhere}
.message .message-body{margin:0;font-size:.9rem;line-height:1.35;white-space:pre-wrap;overflow-wrap:anywhere;display:flow-root}
.message-meta{float:right;display:inline-flex;align-items:center;gap:4px;margin:5px 0 0 10px;font-size:.62rem;line-height:1;white-space:nowrap;color:#b3c3d3;user-select:none}
.message-receipt{display:inline-block;min-width:15px;line-height:1;letter-spacing:-3px;padding-right:3px;font-size:.78rem;font-weight:700;color:#b3c3d3}
.message-receipt[data-state=read]{color:#79dbff}
.day-divider{margin:6px 0}
@media(max-width:760px){
 .home-view .widgets-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
 .home-view .widget{grid-template-columns:28px minmax(0,1fr);gap:6px 8px;padding:8px 10px;min-height:52px}
 .home-view .widget-symbol{width:28px;height:28px;min-width:28px}
 .home-view .widget>strong{font-size:.75rem}
}
@media(max-width:700px){.message{padding:3.65px 9px}.message-list{gap:6px}}

/* 0.1.25: explicit native select colours, including expanded menus and listboxes. */
select{color-scheme:dark;background:#0e2239;color:#eef6ff}
select option,select optgroup{background-color:#0e2239;color:#eef6ff}
select option:checked{background-color:#e5bc7c;color:#071324}
select option:disabled,select optgroup:disabled{background-color:#0e2239;color:#94a9c3}
.report-heading-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:flex-end}
.report-heading-actions button{min-height:37.4px}
.report-close{border-color:#b99b66;color:#ffe3a7}
.report-output[hidden]{display:none}
@media(max-width:600px){.report-heading-actions{width:100%;justify-content:flex-start}.report-heading-actions button{flex:1 1 130px}.report-result-heading>div:first-child{min-width:0}}
@media(forced-colors:active){select,select option,select optgroup{background:Canvas;color:CanvasText}select option:checked{background:Highlight;color:HighlightText}select option:disabled,select optgroup:disabled{color:GrayText}.report-close{border-color:ButtonText;color:ButtonText}}
:root{--report-window-height:232px}
.report-windows-tools{position:absolute;top:8px;right:18px;z-index:9}
.report-windows-tools button{font-size:.75rem;min-height:30.6px;padding:4.5px 12px;background:#10253b}
body[data-view=home].has-report-windows .app-main{overflow:auto}
.home-view.has-report-windows{height:max(100%,var(--report-windows-height));min-height:var(--report-windows-height);overflow:visible;padding-top:50px}
.home-view.has-report-windows .home-top{flex:1 0 400px}
.report-windows-board{position:absolute;inset:58px 16px 86px;pointer-events:none;z-index:7}
.report-window{position:absolute;pointer-events:auto;display:flex;flex-direction:column;gap:4px;padding:10px 12px;border:1px solid #41637e;border-radius:17px;background:linear-gradient(150deg,#132d45f5,#071726f8);box-shadow:0 12px 32px #0005;overflow:hidden;color:#edf6ff}
.report-window[data-base=fregat]{border-top-color:#e2b867}.report-window[data-base=brig]{border-top-color:#67dce0}
.report-window.dragging,.report-window:focus-within{z-index:10;box-shadow:0 10px 35px #0009;border-color:#e6c486}
.report-window.dragging{user-select:none;cursor:grabbing}
.report-window-heading{display:flex;align-items:center;gap:4px;min-height:32px}
.report-window-heading>strong{font-size:.85rem;flex:1;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
.report-window-heading button{padding:1.1px 3px;min-width:28px;min-height:25.5px;font-size:1rem}
.report-window-handle{border:0;border-radius:7px;background:transparent;color:#86adcb;cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none}
.report-window-handle:focus-visible{outline:2px solid #f5d391;outline-offset:1px}
.report-window-period{font-size:.66rem;color:#9eb5cc;margin:0;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;min-height:15px}
.report-window-body{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;padding-right:2px}
.report-window-body p{margin:8px 0;font-size:.78rem}
.report-window-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 8px;padding:1.95px 0;border-bottom:1px solid #37526a66;font-size:.72rem;line-height:1.3}
.report-window-row span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.report-window-row strong{font-weight:600;white-space:nowrap;font-variant-numeric:tabular-nums;max-width:150px;overflow:auto}
.report-window-row small{grid-column:1/-1;font-size:.62rem}
.report-window-body>small{display:block;margin-top:5px;font-size:.65rem}
.report-window-metric{margin:4px 0 8px}.report-window-metric small{display:block;font-size:.65rem}
.report-window-metric strong{font-size:1.2rem;font-weight:600;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.report-window-time{color:#9db4ca;font-size:.61rem;min-height:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.report-window-footer{display:flex;align-items:center;gap:4px;min-height:30px;border-top:1px solid #34516a}
.report-window-footer button{padding:1.1px 6px;min-height:24px;font-size:.68rem}
.report-window-state{font-size:.63rem;flex:1;color:#6bd2c8;line-height:1.25}
.report-window-stale .report-window-state,.report-window-warning,.report-window-state[data-state=error],.report-window-state[data-state=paused],.report-window-state[data-state=offline]{color:#f1c48a}
.report-widget-dialog{width:min(560px,calc(100vw - 24px));max-height:90dvh;overflow:auto;padding:24px;color:var(--text);background:#10263c}
.report-widget-dialog::backdrop{background:#020c18bb;backdrop-filter:blur(4px)}
.report-widget-form{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.report-widget-form>.report-field:first-child,.report-widget-form>.report-widget-dates,.report-widget-form>p,.report-widget-form>.report-toolbar{grid-column:1/-1}
.report-widget-form input,.report-widget-form select{width:100%;min-width:0;font-size:16px;padding:10px}
.report-widget-dates{display:grid;grid-template-columns:1fr 1fr;gap:12px}
@media(max-width:1000px){
 .report-windows-tools{position:relative;top:auto;right:auto;align-self:flex-end;flex:none}
 .home-view.has-report-windows{height:auto;min-height:100%;padding:8px 12px 24px}
 .home-view.has-report-windows .home-top{flex:none;min-height:280px;order:0}
 .home-view.has-report-windows .report-windows-tools{order:-1}
 .home-view.has-report-windows #reportWindows{position:relative;inset:auto;width:100%;height:var(--report-board-height);flex:none;order:1}
 .home-view.has-report-windows #homeComposer,.home-view.has-report-windows #homeActions,.home-view.has-report-windows #homeSaveBar{order:2}
 .report-window-heading button{min-height:30.6px;min-width:34px}
 .report-window-footer button{min-height:28.9px;padding:1.95px 8px}
 .report-window-time{font-size:.64rem}
}
@media(max-width:420px){.report-widget-dialog{padding:18px 14px}.report-widget-form{grid-template-columns:1fr}.report-widget-form>*{grid-column:1/-1}.report-widget-dates{gap:8px}}

/* Sale uses its own flow area; saved report-window coordinates still apply inside their board. */
body.has-sale[data-view=home] .app-main{overflow:auto}
body.has-sale .home-view{height:auto;min-height:100%;overflow:visible;gap:18px;padding-bottom:28px}
body.has-sale .home-view>.home-top{flex:none;min-height:300px;order:0}
body.has-sale .home-view.has-report-windows{height:auto;min-height:100%}
body.has-sale .home-view.has-report-windows #reportWindows{position:relative;inset:auto;width:100%;height:var(--report-board-height,300px);min-height:260px;flex:none;order:2}
body.has-sale .home-view>#saleHome{order:1;flex:none;width:100%;max-width:1156px;align-self:center;position:relative;z-index:8}
body.has-sale .home-view>#homeComposer,body.has-sale .home-view>#homeActions,body.has-sale .home-view>#homeSaveBar{order:3;flex:none}
.sale-home{padding:22px;background:linear-gradient(135deg,#112c43f5,#091a2df5);border:1px solid #49657c;border-radius:22px;color:#eaf5ff}
.sale-heading,.sale-actions,.sale-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.sale-heading h2{margin:0;font-size:1.4rem}.sale-actions{justify-content:flex-start}.sale-heading>.sale-actions{margin-left:auto}
.sale-stats{display:flex;gap:8px;flex-wrap:wrap;margin:18px 0}.sale-stat{padding:7.05px 15px;border:1px solid #3a5870;border-radius:12px;background:#15334b;color:#cfe6fa;min-height:37.4px}.sale-stat[aria-pressed=true]{border-color:#e0b877;color:#ffdfab}
.sale-filters{display:flex;align-items:flex-end;flex-wrap:wrap;gap:12px;margin:14px 0}.sale-filters>.sale-field{flex:1 1 150px}.sale-search{display:flex;gap:8px;align-items:flex-end;flex:2 1 240px}.sale-search>.sale-field{flex:1;min-width:0}
.sale-field{display:flex;flex-direction:column;gap:7px;min-width:0;color:#bed1e3;font-size:.85rem}.sale-field input,.sale-field select,.sale-field textarea{width:100%;min-width:0;font-size:16px;color:#eaf5ff;background:#091b2d;border:1px solid #49647d;border-radius:10px;padding:11px;min-height:44px}.sale-field textarea{resize:vertical;min-height:110px;line-height:1.5}.sale-field select option{color:#edf6ff;background:#10263c}
.sale-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;max-height:650px;overflow:auto;padding:2px 2px 10px;overscroll-behavior:contain}.sale-card{display:flex;flex-direction:column;align-items:flex-start;gap:9px;background:#0b2034;border:1px solid #304c65;border-radius:16px;padding:13.85px 18px;min-width:0;overflow-wrap:anywhere}.sale-card h3{font-size:1.05rem;margin:0;line-height:1.4}.sale-card p{margin:0;font-size:.85rem;line-height:1.5}.sale-card>.primary-button{margin-top:auto;width:100%}.sale-reason{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.sale-owner{color:#9fb9cf}.sale-badge{display:inline-flex;font-size:.72rem;border-radius:20px;padding:5px 10px;background:#173d58;color:#98d7ff}.sale-badge[data-status=working]{background:#493c26;color:#ffdda3}.sale-badge[data-status=customer]{background:#123e3a;color:#8ee4c9}.sale-badge[data-status=deleted]{background:#3a2936;color:#d9afbe}.sale-link{color:#9bdcff;text-decoration:underline;text-underline-offset:3px}.sale-empty{grid-column:1/-1;padding:18px;color:#b7cadc}.sale-pagination{margin-top:14px;font-size:.8rem}
.sale-dialog{width:min(820px,calc(100vw - 24px));max-height:92dvh;overflow:auto;padding:24px;border:1px solid #56748d;border-radius:22px;background:#0c2236;color:#eaf5ff;overscroll-behavior:contain}.sale-dialog::backdrop{background:#020c18c9;backdrop-filter:blur(4px)}.sale-dialog h3{margin:22px 0 12px}.sale-client-summary{margin:16px 0;padding:14px;background:#102c44;border-radius:12px;overflow-wrap:anywhere}.sale-client-summary p{line-height:1.5}.sale-timeline{display:flex;flex-direction:column;gap:8px;max-height:320px;overflow:auto}.sale-event{padding:8.75px 12px;border:1px solid #35516a;border-radius:12px;margin:8px 0;background:#10283e;overflow-wrap:anywhere}.sale-event p{white-space:pre-wrap;font-size:.87rem;line-height:1.5;margin:6px 0}.sale-event small{font-size:.72rem}.sale-comment-form,.sale-mail-editor{display:grid;gap:12px;margin-top:16px}.sale-comment-form textarea{min-height:74px}.sale-comment-form>button{justify-self:end}.sale-mail-editor{border-top:1px solid #35516a;padding-top:10px}.sale-mail-editor textarea{min-height:220px}.sale-mail-state,.sale-save-status{color:#f0d49b;white-space:pre-wrap}.sale-mail-history{margin-top:20px}.sale-mail-history summary{cursor:pointer;min-height:44px;padding:10px 0}
.sale-settings-form{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:20px 0}.sale-settings-form>section,.sale-settings-form>fieldset,.sale-settings-form>p,.sale-settings-form>.sale-check,.sale-settings-form>.primary-button{grid-column:1/-1}.sale-check{display:flex;gap:10px;align-items:center;min-height:44px;color:#d9e9f5}.sale-check input{width:20px;height:20px;flex:none;accent-color:#75c9dc}.sale-days{display:flex;flex-wrap:wrap;gap:16px}.sale-settings-form fieldset{border:1px solid #3a5870;border-radius:12px;padding:14px;min-width:0}.sale-recipient-row{display:grid;grid-template-columns:minmax(140px,1.4fr) 1fr 1fr;gap:12px;align-items:center;padding:12px 0;border-bottom:1px solid #34516a}.sale-mail-settings{display:grid;grid-template-columns:1fr 1fr;gap:14px}.sale-mail-settings>p{grid-column:1/-1}.sale-template{display:grid;gap:12px;border:1px solid #34516a;border-radius:14px;padding:14px;margin:12px 0}.sale-template>button{justify-self:end}.sale-note{border-left:3px solid #d9b37d;padding:10px 14px;background:#122b40;line-height:1.6;font-size:.85rem}#saleSystem{overflow-wrap:anywhere}#saleChatShortcut{align-self:flex-start;margin:0 0 10px}
@media(max-width:950px){.sale-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.sale-home{padding:16px}.sale-recipient-row{grid-template-columns:1fr 1fr}.sale-recipient-row>.sale-check{grid-column:1/-1}}
@media(max-width:600px){.sale-cards{grid-template-columns:1fr;max-height:560px}.sale-dialog{padding:16px 12px;width:calc(100vw - 12px);max-height:96dvh;border-radius:16px}.sale-settings-form,.sale-mail-settings{grid-template-columns:1fr}.sale-settings-form>*{grid-column:1/-1}.sale-heading h2{font-size:1.15rem}.sale-stats{display:grid;grid-template-columns:1fr 1fr}.sale-stat{padding:6.2px 9px;font-size:.78rem}.sale-filters{gap:8px}.sale-actions>button{flex:1}.sale-home{border-radius:16px;padding:14px 12px}.sale-card{padding:10.45px 14px}body.has-sale .home-view>.home-top{min-height:290px}.sale-pagination{gap:7px}.sale-pagination>span{order:3;width:100%;text-align:center}}

/* Debt statements retain independent organisation/currency totals. */
.debt-body{min-width:0}.debt-body section{min-width:0;margin:24px 0}.debt-body .report-table-wrap{max-width:100%}.debt-body .report-table td{max-width:300px;overflow-wrap:anywhere}.debt-body .report-table td.numeric{white-space:nowrap}.debt-body .report-table button{max-width:260px;white-space:normal;text-align:left}

.employee-mail-form{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:20px}.employee-mail-form>.sale-check,.employee-mail-form>p,.employee-mail-form>.sale-actions{grid-column:1/-1}@media(max-width:600px){.employee-mail-form{grid-template-columns:1fr}.employee-mail-form>*{grid-column:1/-1}}

/* 0.1.33: shared lead queue and thumb-accessible closing controls. */
.sale-visibility{position:relative;z-index:9;flex:none;order:1;align-self:center;width:100%;max-width:1156px;text-align:right;margin:0 0 4px}
body.has-sale .home-view>#saleHome{order:1}
.sale-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.sale-stat{font-size:1rem;font-weight:650;min-height:55.25px;text-align:left}
.sale-stat[data-status=pool]{border-color:#d6ae62;color:#ffe3a5;background:#40372480}
.sale-stat[data-status=working]{border-color:#43c8eb;color:#b9f2ff;background:#0e405780}
.sale-stat[data-status=customer]{border-color:#40caa4;color:#b3f2d6;background:#163f3880}
.sale-tabs{display:flex;gap:8px;margin:16px 0}.sale-tabs button{flex:1;min-height:39.1px}.sale-tabs button[aria-pressed=true]{border-color:#69d5ef;background:#17445d;color:#f5fcff}
.sale-cards{display:flex;flex-direction:column;gap:0;max-height:520px;border:1px solid #34516a;border-radius:14px;padding:0}
.sale-card{flex-direction:row;align-items:center;justify-content:space-between;border:0;border-bottom:1px solid #34516a;border-radius:0;background:transparent;padding:11.3px 16px;flex:none}
.sale-card:last-child{border-bottom:0}.sale-card-info{flex:1;min-width:0}.sale-card>.sale-actions{flex-shrink:0}.sale-card .sale-reason{-webkit-line-clamp:1;color:#adbdcf}.sale-card .sale-badge{margin-top:6px}
.sale-staff{margin-top:14px}.sale-staff summary{padding:8.75px 0;min-height:37.4px}.sale-staff-row{display:flex;justify-content:space-between;gap:12px;padding:8.75px 0;border-top:1px solid #34516a;font-size:.85rem}
.window-bottom-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px;padding:14px 0 max(4px,env(safe-area-inset-bottom));border-top:1px solid #35516a;position:sticky;bottom:-1px;background:#0c2236;z-index:12}
#homeComposer .window-bottom-actions{position:static;margin-top:8px;padding:4px 0;background:transparent}
.window-bottom-actions>button{min-height:39.1px;min-width:120px}#closeTextInput{margin:0;font-size:1rem}
.report-close{display:block;margin:20px 0 0 auto;min-height:39.1px;position:sticky;bottom:0;background:#10263c;z-index:5}
.report-window-footer{flex-wrap:wrap}.report-window-footer button{min-width:0}.report-window-state{min-width:30px}
.notification-volume{display:flex;justify-content:space-between;gap:10px}#pushVolume{width:100%;padding:0;min-height:44px;accent-color:#6cd9ef}
@media(max-width:600px){.sale-visibility{padding:0 4px}.sale-stats{gap:6px}.sale-stat{padding:7.05px 8px;font-size:.82rem;line-height:1.4}.sale-tabs{gap:5px}.sale-tabs button{font-size:.78rem;padding:5.35px 8px}.sale-card{padding:8.75px 12px;align-items:flex-start;gap:10px}.sale-card>.sale-actions{flex-direction:column;align-items:stretch;gap:7px}.sale-card>.sale-actions button{padding:6.2px 10px;min-height:37.4px;font-size:.8rem}.sale-staff-row{flex-direction:column;gap:4px}.window-bottom-actions>button{width:100%}.sale-dialog .window-bottom-actions{bottom:-12px;padding-bottom:calc(10px + env(safe-area-inset-bottom))}}

/* 0.1.34: compact client card and a shared directory in System. */
.sale-dialog{width:min(640px,calc(100vw - 24px));padding:20px}
.sale-dialog .sale-heading h2{font-size:1.2rem;line-height:1.35}.sale-dialog .sale-heading p{margin:4px 0;font-size:.8rem}
.sale-contacts{font-size:.85rem;overflow-wrap:anywhere;margin:10px 0}
.sale-client-summary{margin:8px 0;padding:0 12px}.sale-client-summary summary,.sale-assignment summary,.sale-mail-editor>summary{cursor:pointer;min-height:44px;padding:12px 0;font-size:.85rem}.sale-assignment summary,.sale-mail-editor>summary{cursor:pointer;min-height:37.4px;padding:8.75px 0;font-size:.85rem}
.sale-compact-controls{display:flex;gap:10px;align-items:center;margin:12px 0}.sale-compact-controls>.sale-field{flex:1}.sale-assignment{margin:4px 0}.sale-assignment>.sale-field{margin:0 0 8px}
.sale-dialog>.sale-actions{gap:7px}.sale-dialog>.sale-actions button{font-size:.82rem;min-height:37.4px;padding:7.05px 13px}
.sale-dialog h3{font-size:.95rem;margin:16px 0 6px}.sale-timeline{gap:0;max-height:240px;border-block:1px solid #35516a}
.sale-history-row{padding:6.2px 2px;border-bottom:1px solid #294259;overflow-wrap:anywhere}.sale-history-row:last-child{border:0}.sale-history-row p{margin:3px 0;white-space:pre-wrap;font-size:.86rem;line-height:1.45}.sale-history-row small{font-size:.72rem}
.sale-reply-form{display:grid;gap:10px;margin-top:12px;border:1px solid #35516a;border-radius:12px;padding:12px}.sale-reply-form[hidden]{display:none}.sale-reply-form textarea{min-height:85px}.sale-reply-form>button{justify-self:end}
.sale-mail-editor{display:block;margin-top:10px;padding-top:0}.sale-mail-editor:not([open])>:not(summary){display:none}.sale-mail-editor[open]>.sale-field,.sale-mail-editor[open]>.sale-actions{margin-top:12px}.sale-mail-editor textarea{min-height:160px}.sale-mail-history{margin-top:12px}
.client-directory-list{border:1px solid #34516a;border-radius:14px;margin-top:18px;overflow:hidden}.client-directory-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9.6px 14px;border-bottom:1px solid #34516a}.client-directory-row:last-child{border:0}.client-directory-row>div{min-width:0;overflow-wrap:anywhere}.client-directory-row strong{font-size:.95rem}.client-directory-row p{font-size:.8rem;margin:5px 0 0}.client-directory-row>button{flex-shrink:0;min-height:37.4px}
@media(max-width:600px){.sale-dialog{width:calc(100vw - 12px);padding:14px 12px}.sale-dialog>.sale-actions{display:grid;grid-template-columns:1fr 1fr}.sale-dialog>.sale-actions>button:first-child{grid-column:1/-1}.sale-dialog .sale-timeline{max-height:210px}.client-directory-row{padding:8.75px 10px}}

/* Sale: launch a scoped discovery from the staff workspace. */
.sale-discovery-dialog { width:min(32rem,calc(100% - 1.5rem)); }
.sale-discovery-form { display:grid; gap:.7rem; min-width:0; }
.sale-discovery-form textarea { resize:vertical; }
.sale-discovery-status { overflow-wrap:anywhere; }
.sale-discovery-status:empty,.sale-discovery-form .error-text:empty { display:none; }

/* Sale counterparties and on-server reminder inbox. */
.counterparty-due-shortcut{min-height:37.4px;color:#ffe5aa;white-space:nowrap;font-size:.82rem;padding-inline:8px}
.counterparty-directory{min-width:0}.counterparty-directory .counterparty-search{max-width:32rem}
.counterparty-reminder{margin:10px 0;border:1px solid #35516a;border-radius:12px;padding:0 12px}
.counterparty-reminder>summary{cursor:pointer;min-height:37.4px;padding:8.75px 0;font-size:.86rem}
.counterparty-reminder-form{display:grid;gap:10px;padding-bottom:10px}
.counterparty-reminder-fields{display:grid;gap:8px;grid-template-columns:1fr 1fr}
.counterparty-reminder-fields[hidden]{display:none}
.counterparty-overdue,.client-directory-row .counterparty-overdue{color:#ffe1a0}
@media(max-width:420px){.counterparty-reminder-fields{grid-template-columns:1fr}.counterparty-due-shortcut{font-size:.73rem}}

/* 0.1.46: compact CRM workspace, modelled after dense 1C list windows. */
body[data-view=counterparties] .app-main{overflow:auto}.counterparty-directory{padding:10px;background:#0c2236;border-radius:9px}
.crm-tabs{margin:0 0 8px;gap:4px;justify-content:flex-start}.crm-tabs button{flex:0 1 170px;min-height:30px;padding:3px 10px;border-radius:6px;font-size:.78rem}
.crm-stage-strip{display:flex;gap:3px;overflow-x:auto;padding:0 0 6px;scrollbar-width:thin}.crm-stage-strip[hidden]{display:none}.crm-stage-strip button{flex:0 0 auto;min-height:27px;padding:2px 7px;border-radius:5px;font-size:.66rem}.crm-stage-strip button[aria-pressed=true]{border-color:#69d5ef;background:#17445d;color:#f5fcff}
.crm-toolbar{display:grid;grid-template-columns:minmax(180px,1fr) 190px 190px auto;gap:6px;align-items:end;margin:0 0 7px}.crm-toolbar .sale-field{gap:3px;font-size:.7rem}.crm-toolbar .sale-field input,.crm-toolbar .sale-field select{min-height:30px;height:30px;padding:3px 7px;border-radius:5px;font-size:.78rem}.crm-toolbar>button{min-height:30px;padding:3px 12px;border-radius:5px;font-size:.76rem}
.crm-status{min-height:17px;margin:2px 0;font-size:.72rem}.crm-table-wrap{border:1px solid #3d5b73;border-radius:6px;overflow:auto;background:#081b2c}.crm-table{min-width:760px}.crm-table-row{display:grid;grid-template-columns:minmax(210px,1.7fr) 130px 160px minmax(190px,1.5fr) 110px;align-items:center;width:100%;min-height:38px;padding:3px 7px;gap:7px;border:0;border-bottom:1px solid #29445c;background:transparent;color:#e8f3fc;text-align:left;font:inherit}.crm-table-row:not(.crm-table-head){cursor:pointer}.crm-table-row:not(.crm-table-head):hover,.crm-table-row:not(.crm-table-head):focus-visible{background:#14344d;outline:none}.crm-table-head{position:sticky;top:0;z-index:2;min-height:27px;background:#17364f;color:#a9c1d5;font-size:.68rem;font-weight:650;cursor:default}.crm-table-row>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.76rem}.crm-table-row small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.66rem;font-weight:400}.crm-company strong,.crm-table-row span>b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.77rem}.crm-table-row .sale-badge{justify-self:start;padding:2px 7px;font-size:.66rem;border-radius:9px}.crm-money{text-align:right;font-variant-numeric:tabular-nums}
.crm-dialog{width:min(760px,calc(100vw - 18px));padding:13px;border-radius:9px}.crm-heading{padding-bottom:7px;border-bottom:1px solid #35516a}.crm-heading h2{font-size:1.05rem!important}.crm-heading button{min-height:29px;padding:3px 9px;font-size:.72rem;border-radius:5px}.crm-deal-form{display:grid;grid-template-columns:1.4fr .8fr .8fr 1fr;gap:6px;margin-top:8px}.crm-deal-form .sale-field{gap:3px;font-size:.68rem}.crm-deal-form .sale-field input,.crm-deal-form .sale-field select,.crm-deal-form .sale-field textarea{min-height:30px;padding:4px 7px;border-radius:5px;font-size:.78rem}.crm-deal-form .sale-field textarea{height:48px;min-height:48px}.crm-deal-form .crm-wide{grid-column:1/-1}.crm-deal-form>button{min-height:30px;padding:3px 12px;font-size:.74rem;border-radius:5px;justify-self:start}.crm-deal-form>.sale-save-status{grid-column:2/-1;font-size:.7rem}
.crm-match,.crm-activities{margin-top:9px;border:1px solid #35516a;border-radius:6px;padding:7px 9px;background:#0a1e30}.crm-match p{margin:2px 0;font-size:.72rem}.crm-match .sale-actions{margin-top:5px}.crm-match button,.crm-activity-form button,.crm-activity-row button{min-height:28px;padding:2px 8px;border-radius:5px;font-size:.7rem}.crm-activities h3{margin:0 0 6px;font-size:.8rem}.crm-activity-form{display:grid;grid-template-columns:130px minmax(180px,1fr) 180px auto;gap:5px;align-items:end}.crm-activity-form .sale-field{gap:2px;font-size:.66rem}.crm-activity-form input,.crm-activity-form select{min-height:29px!important;height:29px;padding:3px 6px!important;border-radius:5px!important;font-size:.74rem!important}.crm-activity-list{margin-top:7px;border-top:1px solid #29445c}.crm-activity-row{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:34px;padding:3px 0;border-bottom:1px solid #29445c}.crm-activity-row>div{display:grid;grid-template-columns:80px minmax(0,1fr);gap:2px 7px;min-width:0;flex:1;font-size:.72rem}.crm-activity-row small{grid-column:2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:.64rem}.crm-dialog .window-bottom-actions{margin-top:8px;padding-top:7px}.crm-dialog .window-bottom-actions button{min-height:29px;min-width:90px;padding:3px 9px;font-size:.72rem;border-radius:5px}
@media(max-width:760px){.counterparty-directory{padding:7px}.crm-toolbar{grid-template-columns:1fr 1fr}.crm-toolbar>.sale-field:first-child{grid-column:1/-1}.crm-toolbar>button{width:100%}.crm-tabs button{flex:1;min-width:0;padding-inline:4px}.crm-table{min-width:0}.crm-table-head{display:none}.crm-table-row{grid-template-columns:minmax(0,1fr) auto;gap:2px 8px;min-height:53px;padding:5px 7px}.crm-table-row>span:nth-child(3){grid-column:1;font-size:.66rem;color:#a9bed0}.crm-table-row>span:nth-child(4){grid-column:1}.crm-table-row>span:nth-child(5){grid-column:2;grid-row:1;text-align:right}.crm-table-row .sale-badge{grid-column:2;grid-row:2/4;align-self:center}.crm-deal-form{grid-template-columns:1fr 1fr}.crm-deal-form .crm-wide{grid-column:1/-1}.crm-activity-form{grid-template-columns:1fr 1fr}.crm-activity-form>.sale-field:nth-child(2){grid-column:1/-1}.crm-activity-form button{width:100%}.crm-activity-row>div{grid-template-columns:70px minmax(0,1fr)}}
/* Free-form dashboard. Only explicit edit/saved layouts use this canvas.
   The old responsive layout remains the factory default. */
.home-layout-toggle{min-height:37.4px;padding:4.5px 10px;white-space:nowrap}
.home-layout-toggle[aria-pressed=true]{border-color:#e6c486;color:#ffe4ab}
.home-view.layout-custom,body.has-sale .home-view.layout-custom,.home-view.has-report-windows.layout-custom{display:block;position:relative;isolation:isolate;height:max(100%,var(--home-canvas-height,0px));min-height:100%;max-width:none;padding:0;overflow:visible;overflow-anchor:none}
.home-view.layout-custom :is(.home-top,#homeActions,.widgets-heading,#widgets,.home-orbit-toolbar,.home-input-tools,.sale-visibility,#reportWindowTools,#reportWindows,#orbitLayoutBar,#homeSaveBar):not([hidden]){display:contents}
.home-view.layout-custom>.orbit-people{z-index:var(--home-orbit-layer,3)}
.home-view.layout-custom [data-home-layout-id],body.has-sale .home-view.layout-custom>#saleHome[data-home-layout-id],.home-view.layout-custom #reportWindows>.report-window[data-home-layout-id]{position:absolute;inset:auto;left:var(--home-x)!important;top:var(--home-y)!important;width:var(--home-w)!important;height:var(--home-h)!important;z-index:var(--home-z);min-width:0;min-height:0;max-width:none;max-height:none;margin:0;box-sizing:border-box;overflow-wrap:anywhere}
.home-view.layout-custom .home-copy{display:grid;place-content:center;overflow:auto}
.home-view.layout-custom .home-copy h1{margin:0;text-align:center}
.home-view.layout-custom #orbitStage{display:grid;place-items:center}
.home-view.layout-custom #orbitStage .hero-planet{height:100%;width:min(100%,var(--planet-size));overflow:hidden}
.home-view.layout-custom #orbitStage .home-saturn-art{max-height:100%;max-width:100%;width:auto;object-fit:contain}
.home-view.layout-custom :is(#orbitNote,#voiceStatus){text-align:center}
.home-view.layout-custom button[data-home-layout-id]{line-height:1.25;white-space:normal;min-height:0;overflow:auto}
.home-view.layout-custom .widget[data-home-layout-id]:hover{transform:none}
.home-view.layout-custom .widget[data-home-layout-id]>strong{white-space:normal;overflow-wrap:anywhere}
.home-view.layout-custom .widget[data-home-layout-id]{overflow:auto}
body.has-sale .home-view.layout-custom>#saleHome,.home-view.layout-custom>.ai-composer{overflow:auto;scrollbar-width:thin;container-type:inline-size}
.home-view.layout-custom .report-window-handle{display:none}
.home-view.layout-custom :is(#orbitLayoutStatus,#homeSaveStatus)[data-home-layout-id]{display:grid;place-content:center;overflow:auto}
.home-view.layout-editing [data-home-layout-id]{outline:1px dashed #7eb6ca;outline-offset:-2px;cursor:grab;touch-action:none;user-select:none;scroll-margin-bottom:225px}
.home-view.layout-editing [data-home-layout-id] *{cursor:grab;touch-action:none}
.home-view.layout-editing .home-layout-selected{outline:2px solid #f5d794;outline-offset:-2px}
.home-view.layout-editing .orbit-person{pointer-events:none}
.home-layout-bar{position:fixed;z-index:3100;left:50%;bottom:max(8px,env(safe-area-inset-bottom));width:min(650px,calc(100% - 16px));transform:translateX(-50%);border:1px solid #799daf;padding:10px 12px;display:grid;gap:6px;background:#0d2339;box-shadow:0 0 28px #0009}
.home-layout-summary{font-size:.82rem;display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px}
#homeLayoutStatus{color:#ffdd96;font-size:.78rem}
.home-layout-target{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:8px;font-size:.8rem}
#homeLayoutTarget{min-width:0;width:100%;padding:5px 8px;min-height:36px}
.home-layout-adjust{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:3px}
.home-layout-adjust button,.home-layout-commit button{min-width:0;min-height:32.3px;padding:1.95px 4px;font-size:.84rem}
.home-layout-commit{display:grid;gap:5px;grid-template-columns:repeat(3,minmax(0,1fr))}
.home-layout-overlay{position:absolute;inset:0;pointer-events:none;z-index:3000;}
.home-layout-handles{position:absolute;left:var(--home-x);top:var(--home-y);width:var(--home-w);height:var(--home-h);z-index:var(--home-z);pointer-events:none}
.home-layout-knob{position:absolute;display:grid;place-items:center;pointer-events:auto;width:27px;height:27px;padding:0;border:1px solid #a0d5e5;border-radius:7px;background:#13354b;color:#f7deab;touch-action:none;user-select:none;font-size:1rem;line-height:1}
.home-layout-handles.home-layout-selected .home-layout-knob{border:2px solid #f9dc9b;background:#102c42}
.home-layout-move{inset:0 auto auto 0;cursor:grab}
.home-view.layout-dragging,.home-view.layout-dragging *{user-select:none}
.app-main:has(.home-view.layout-editing){overflow-anchor:none}
.home-layout-resize{inset:auto 0 0 auto;cursor:nwse-resize;background:#244758}
.home-layout-bar[hidden],.home-layout-overlay[hidden]{display:none}
.home-layout-help{font-size:.73rem;line-height:1.25;color:#bbd0df}
@container (max-width:500px){
  .sale-heading,.sale-home .sale-card,.sale-home .sale-staff-row{flex-wrap:wrap}
  .sale-home .sale-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .sale-home .sale-card>.sale-actions{flex:1 1 100%;flex-wrap:wrap}
  .sale-home .sale-actions button,.sale-home .sale-tabs button{white-space:normal;overflow-wrap:anywhere;min-width:0}
  .home-view.layout-custom .ai-input-row{flex-wrap:wrap}
}
@media(max-width:760px){.home-layout-bar{padding:7px}.home-layout-adjust button,.home-layout-commit button{min-height:37.4px}.home-layout-knob{width:36px;height:36px}}
@media(max-height:390px){.home-layout-bar{max-height:75dvh;overflow:auto}}

/* 0.1.45: dense Sale rows. The row opens the client; the owner avatar opens chat. */
.sale-card{padding:7px 10px;min-height:58px;row-gap:4px;column-gap:9px}
.sale-card-info{display:grid;gap:3px;min-width:0}
.sale-card h3{font-size:.98rem;line-height:1.18;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sale-card-meta{display:flex;align-items:center;gap:7px;min-width:0}
.sale-card-meta>.muted{font-size:.75rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sale-card .sale-badge{margin:0;padding:3px 8px;font-size:.65rem;white-space:nowrap}
.sale-card .sale-reason{font-size:.74rem;line-height:1.2}
.sale-card-clickable{cursor:pointer}
.sale-card-clickable:hover,.sale-card-clickable:focus-visible{background:#102b43;outline:none;box-shadow:inset 3px 0 #67b9c1}
.sale-card>.primary-button{width:auto;margin:0;min-height:37px;padding:6px 10px;flex-shrink:0;font-size:.76rem}
.sale-owner-avatar{display:grid;place-items:center;width:40px;height:40px;min-width:40px;padding:0;border-radius:50%;overflow:hidden;background:linear-gradient(140deg,#3b5269,#0a1729);border:1px solid #6a839d;color:var(--text);font-size:.75rem;font-weight:700;flex-shrink:0}
.sale-owner-avatar:hover,.sale-owner-avatar:focus-visible{border-color:#8de3e3;box-shadow:0 0 0 3px #2f727744}
.sale-owner-avatar .employee-photo{width:100%;height:100%;object-fit:cover}
.client-directory-row{padding-block:6.8px;column-gap:10px}
.client-directory-row p{margin-block:3px 0}
.sale-staff-row{padding-block:5.35px}
.sale-history-row{padding-block:3.65px}
.sale-event{padding-block:5.35px;margin-block:6px}
.sale-event p{margin-block:4px}

.chat-sidebar .channel{min-height:39.1px;padding-block:3.65px;margin-bottom:4px}
.channel .channel-avatar{width:34px;height:34px}
.channel .channel-body{gap:3px}
.message-list{gap:5px}
.message-list .message{padding-block:2.8px}
.message-list .day-divider{margin-block:4px}
.person-choices,.home-people-list{gap:4px}
.home-people-list .person-shortcut{min-height:37.4px;padding-block:3.65px}

.report-table th,.report-table td,.value-body .report-table th,.value-body .report-table td{padding-block:5.35px}
.report-catalog-row{padding-block:5.35px;gap:4px}
.report-saved{gap:7px}
.report-window-row{padding-block:1.1px}
.report-window-body p{margin-block:6px}

.system-panel .employee-card{padding-block:10.45px}
.employee-card .employee-card-heading{gap:12px}
.employee-card .employee-card-face{width:54px;height:54px;flex-basis:54px}
.employee-card-identity h3{margin-bottom:4px}
.employee-card-identity p{margin-block:3px}
.employee-card .employee-card-actions{gap:7px;margin-top:10px}
.system-panel .user-row,.system-panel .status-row{padding-block:6.2px}
.system-panel .user-row small{margin-top:3px}
.system-nav{gap:4px}
.system-nav button{min-height:37.4px;padding-block:5.35px}
.push-device-row{padding-block:6.2px;gap:8px}
.push-inbox-item{min-height:37.4px;padding-block:5.35px;margin-block:6px}
.permission-row{padding-block:4.5px}
.learning-entries{gap:14px}
.learning-entry{padding-block:8.75px}
.learning-entry>h3{margin-block:0 6px}
.learning-entry>p{margin-block:5px}

@media(max-width:600px){
 .sale-card{padding:6px 9px;min-height:55px;align-items:center}
 .client-directory-row{padding-block:6.8px}
 .report-table th,.report-table td,.value-body .report-table th,.value-body .report-table td{padding-block:3.65px}
 .employee-card .employee-card-face{width:46px;height:46px;flex-basis:46px}
}
@media(max-width:760px),(pointer:coarse){
 .sale-card>.sale-actions button,.client-directory-row>button,.employee-card-actions button,
 .push-device-row>button,.report-saved .report-toolbar button{min-height:37.4px}
 .report-table .report-sort{min-height:27.2px}
}

/* Sale handoff controls; do not expand compact list rows. */
.sale-handoff{display:grid;gap:8px;margin:8px 0}
.sale-handoff-form{display:grid;gap:8px;border:1px solid #35516a;border-radius:12px;padding:10px;min-width:0}
.sale-handoff-form[hidden],.sale-handoff-form .sale-field[hidden]{display:none}
.sale-handoff-form p,.sale-return-reason{margin:0;overflow-wrap:anywhere}
.sale-handoff-form p:empty{display:none}
.sale-handoff-form textarea{resize:vertical;min-height:60px}
.sale-return-reason{padding:8px 10px;border-left:2px solid #7596ae;white-space:pre-wrap}

/* Sale issue journal, opened explicitly from the director's Sale settings. */
.sale-journal-dialog{width:min(900px,calc(100vw - 20px));padding:clamp(12px,3vw,22px)}
.sale-journal-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px 12px;flex-wrap:wrap;margin-bottom:4px}
.sale-journal-toolbar h2{margin:0}
.sale-journal-trigger,.sale-journal-toolbar button{min-height:37.4px}
.sale-journal-status{margin:8px 0;font-size:.86rem;overflow-wrap:anywhere}
.sale-journal-status:empty{display:none}
.sale-journal-list{list-style:none;margin:0;padding:0;max-height:55dvh;overflow:auto;overscroll-behavior:contain}
.sale-journal-entry{border-bottom:1px solid #395673}
.sale-journal-entry:last-child{border-bottom:0}
.sale-journal-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.35fr) minmax(0,.8fr) minmax(0,1.3fr) auto;align-items:center;gap:4px 10px;padding:5px 4px;font-size:.83rem;line-height:1.3;overflow-wrap:anywhere}
.sale-journal-row>span,.sale-journal-row>strong{min-width:0}
.sale-journal-details>summary{min-height:37.4px;cursor:pointer;list-style:none}
.sale-journal-details>summary::-webkit-details-marker{display:none}
.sale-journal-details>summary:focus-visible{outline:2px solid var(--aqua);outline-offset:-2px}
.sale-journal-more{color:#a4dff0;white-space:nowrap}
.sale-journal-more::after{content:"";display:inline-block;width:.35em;height:.35em;margin-left:.45em;border-right:1px solid currentColor;border-bottom:1px solid currentColor;transform:translateY(-.18em) rotate(45deg)}
.sale-journal-details[open] .sale-journal-more::after{transform:rotate(225deg)}
.sale-journal-detail{margin:0;padding:7px 8px 11px;white-space:pre-wrap;overflow-wrap:anywhere;font-size:.83rem;line-height:1.4}
.sale-journal-dialog>.window-bottom-actions{margin-top:8px;padding-top:8px}
@media(max-width:620px){
  .sale-journal-row{grid-template-columns:minmax(0,1fr) auto;gap:2px 8px;padding-block:4px}
  .sale-journal-time{grid-area:1/1}
  .sale-journal-state{grid-area:1/2;text-align:right;max-width:16ch}
  .sale-journal-queue{grid-area:2/1/3/-1}
  .sale-journal-counts{grid-area:3/1}
  .sale-journal-more{grid-area:3/2;justify-self:end}
}

/* Local attachment drafts and audio clips in the employee chat. */
.message-form{display:grid;grid-template-columns:auto auto minmax(0,1fr) auto;gap:5px;align-items:end}
.chat-tool{display:grid;place-items:center;min-width:36px;min-height:36px;padding:4px 6px}
.chat-tool svg{width:19px;height:19px}
.chat-draft-media,.chat-media-status,.chat-voice-actions{grid-column:1/-1;min-width:0}
.chat-draft-media{display:grid;gap:4px;max-height:min(34dvh,220px);overflow:auto;overscroll-behavior:contain}
.chat-draft-item{padding:5px 8px;border:1px solid #35516a;border-radius:9px;background:#0d2439;min-width:0}
.chat-draft-heading{display:flex;align-items:center;gap:8px;min-width:0}
.chat-media-name{font-size:.82rem;overflow-wrap:anywhere;flex:1;min-width:0}
.chat-draft-heading>small,.chat-attachment>small{white-space:nowrap;font-size:.7rem}
.chat-draft-remove{padding:3px 4px;flex:none;min-height:28px}
.chat-draft-image,.chat-inline-image{display:block;max-width:100%;object-fit:contain;border-radius:7px}
.chat-draft-image{max-height:76px;margin-top:3px}
.chat-draft-text{font-size:.78rem}
.chat-draft-text pre{white-space:pre-wrap;overflow-wrap:anywhere;color:#d5e5f6;margin:4px 0 0}
.chat-media-status{color:#f2d9a5;margin:0;font-size:.78rem}
.chat-voice-actions{display:flex;gap:6px;flex-wrap:wrap}
.chat-voice-actions button{min-height:30px}
.chat-message-media{display:grid;gap:4px;margin:4px 0}
.chat-attachment{min-width:0;line-height:1.3;display:flex;flex-wrap:wrap;align-items:baseline;gap:3px 8px}
.chat-image-link{display:block;flex-basis:100%}
.chat-inline-image{max-height:210px;width:auto}
.chat-attachment-download{font-size:.82rem;color:#abe0ff;overflow-wrap:anywhere}
.chat-voice-player{display:block;width:min(245px,100%);max-width:100%;height:38px;flex-basis:100%}
@media(max-width:400px){.message-form{gap:4px}.chat-tool{min-width:34px}.chat-draft-heading{gap:5px}.chat-inline-image{max-height:160px}}

/* Visibility is local to the selected dashboard layout, not app permissions. */
.home-view.layout-custom [data-home-layout-hidden=true],.home-view.layout-planet-hidden>#orbitPeople{display:none!important}
.home-layout-visibility{display:flex;align-items:center;flex-wrap:wrap;gap:4px 10px}
.home-layout-visibility button{min-height:32px}

/* Видеонаблюдение */
#videoView{min-width:0;max-width:1180px;width:100%;margin:0 auto;padding:clamp(7px,2vw,20px);box-sizing:border-box}
#videoView [hidden]{display:none!important}
.cam-shell{background:#0d2134;color:#eaf3fa;border:1px solid #30495c;border-radius:12px;overflow:hidden}
.cam-shell :is(h1,h2,p){margin:0}.cam-head{min-height:46px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 12px;border-bottom:1px solid #30495c}
.cam-head h1,.cam-head h2{font-size:clamp(17px,2.2vw,22px);line-height:1.2}.cam-shell button,.cam-shell select,.cam-shell input:not([type=checkbox]){font:inherit;font-size:14px;width:auto;min-width:0;min-height:34px;border:1px solid #3b566b;border-radius:6px;padding:5px 10px;color:#ecf4fa;background:#102a40;box-sizing:border-box}
.cam-shell button,.cam-shell summary{cursor:pointer}.cam-shell button:hover,.cam-shell button:focus-visible{background:#26455c}.cam-shell button:disabled{opacity:.55}
.cam-toolbar,.cam-archive-controls,.cam-foot{display:flex;flex-wrap:wrap;align-items:end;gap:8px;padding:8px 12px}.cam-segment{display:inline-flex;align-self:end}.cam-segment button{border-radius:0}.cam-segment button:first-child{border-radius:6px 0 0 6px}.cam-segment button+button{margin-left:-1px;border-radius:0 6px 6px 0}.cam-segment [aria-pressed=true],.cam-form [type=submit],#camFetch,.cam-play{background:#1a546b;border-color:#548da1}
.cam-rec,.cam-archive-controls label,.cam-fields label{display:grid;gap:3px;color:#bad0df;font-size:13px}.cam-rec select{max-width:32ch}
.cam-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:7px;padding:2px 10px 10px}.cam-grid.four{grid-template-columns:repeat(2,minmax(0,1fr))}
.cam-tile{min-width:0;background:#040c15;border:1px solid #31485b;border-radius:7px;overflow:hidden}.cam-tile-bar{display:flex;align-items:center;background:#122b3f;padding:2px 5px;gap:4px}
.cam-tile-bar select{flex:1;background:transparent;border:0;font-weight:600;width:0}.cam-tile-bar select option{background:#102a40}.cam-tile-bar .cam-expand{font-size:20px;line-height:1;background:transparent;border:0}
.cam-picture{position:relative;display:grid;place-items:center;aspect-ratio:16/9;max-height:65vh;background:#060e18}.cam-picture img{position:absolute;width:100%;height:100%;inset:0;object-fit:contain}
.cam-overlay{display:flex;position:relative;flex-direction:column;align-items:center;text-align:center;gap:7px;padding:8px;color:#b7cddd;font-size:13px;max-width:38ch}.cam-overlay:has(span:empty) {pointer-events:none}
.cam-tile:fullscreen,.cam-tile.cam-large{display:flex;flex-direction:column;background:#030a11}.cam-tile.cam-large{position:fixed;inset:0;z-index:1000}.cam-tile:fullscreen .cam-picture,.cam-tile.cam-large .cam-picture{flex:1;max-height:none}
.cam-hint,.cam-empty{padding:8px 12px;color:#b6cbdc;font-size:14px}.cam-hint:empty{display:none}#camAdd{margin:0 12px 12px}
.cam-shell a{color:#8ed5ed}.cam-archive video{display:block;width:100%;max-height:65vh;background:#060e18}.cam-archive>a{display:inline-block;margin:9px 12px}
.cam-form{padding:0 12px 12px}.cam-form .cam-head{padding-left:0;padding-right:0}.cam-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:9px 0}.cam-fields :is(input,select){width:100%!important}.cam-wide{grid-column:1/-1}
.cam-form details{border-top:1px solid #30495c;padding:8px 0}.cam-form details p,.cam-form details a{font-size:13px;margin:6px 0;overflow-wrap:anywhere}.cam-form small,.cam-form summary{color:#b6cbdc}.cam-staff{display:grid;gap:5px;margin:7px 0}.cam-staff label,.cam-check{display:flex;align-items:center;gap:8px}.cam-shell input[type=checkbox]{width:17px;height:17px;min-height:0}.cam-foot{align-items:center;padding-left:0}.cam-shell :focus-visible{outline:2px solid #91d2e9;outline-offset:1px}
@media(max-width:650px){#videoView{padding:4px}.cam-toolbar,.cam-archive-controls{padding:6px;gap:5px}.cam-head{padding:6px 8px}.cam-grid{padding:0 5px 5px;gap:4px}.cam-rec{min-width:0;flex:1}.cam-rec select{max-width:100%}.cam-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.cam-picture{max-height:58vh}.cam-toolbar button,.cam-toolbar select,.cam-tile-bar select,.cam-tile-bar button{min-height:36px}.cam-grid.four .cam-tile-bar{padding:1px}.cam-grid.four .cam-tile-bar select{font-size:12px;padding-left:3px}.cam-grid.four .cam-overlay{gap:3px;font-size:11px;line-height:1.1}.cam-grid.four .cam-play{min-height:26px;font-size:12px}.cam-archive-controls label:first-child{flex-basis:100%}.cam-form{padding:0 8px 8px}}

body[data-view=video] .app-main{overflow:auto}.cam-tile-bar .cam-shot{font-size:12px;min-height:27px;padding:3px 6px}.cam-picture img[hidden]{display:none}
@media(max-width:650px){.cam-grid.four .cam-shot{font-size:0;width:26px;min-width:26px;padding:0}.cam-grid.four .cam-shot::after{content:"▣";font-size:17px}}

.cam-import,.cam-import-choice label{display:grid;gap:4px;margin:8px 0;max-width:32rem}.cam-import input{max-width:100%}

#ka2View{width:100%;min-width:0;margin-top:8px;box-sizing:border-box}
#kaSummary{margin:6px 0;gap:12px;font-size:14px}#kaRows,.ka-history{overflow:auto;max-width:100%;max-height:60vh}
#kaPager{margin:7px 0}.ka-shell [hidden]{display:none!important}#kaKey{width:100%;max-width:570px}#kaDetail{scroll-margin:12px}
@media(max-width:600px){#ka2View{padding:3px}.ka-shell{padding:7px}.ka-tools label{flex:1 1 100px;min-width:0}.ka-tools label :is(input,select){width:100%}.ka-shell .ka-product{max-width:150px;white-space:normal}}

.ai-settings{max-width:36rem;gap:.45rem;margin:.6rem 0 1.2rem}.ai-settings label:not(.ai-check){display:grid;gap:.15rem}.ai-settings input:not([type=checkbox]){width:100%;min-width:0}.ai-settings .ai-check{display:flex;align-items:center;gap:.5rem}.ai-settings input[type=checkbox]{width:1.1rem;min-height:0;height:1.1rem;flex:none}

.onec-field{display:grid;grid-template-columns:minmax(7rem,35%) 1fr;gap:.45rem;padding:.2rem 0;border-bottom:1px solid #ffffff17}.onec-field span{overflow-wrap:anywhere;white-space:pre-wrap}.onec-group{padding:.35rem .2rem}.onec-group>summary{cursor:pointer}.onec-group .onec-group{margin-left:.6rem}.onec-related button{display:block;text-align:left;margin:.25rem 0}.onec-related h3{margin:.65rem 0 .25rem}
.onec-dialog{color:#eaf1f8;background:#0e2234;border:1px solid #38576c;box-shadow:0 20px 70px #020916aa;width:min(760px,calc(100vw - 24px));padding:16px;max-height:88vh;overflow-y:auto;text-align:left}.onec-heading{display:flex;align-items:flex-start;gap:8px}.onec-heading>div{flex:1;min-width:0}.onec-heading small,.onec-link small{display:block;color:#9eb6c8;font-size:12px}.onec-heading h2{color:#eef5fb;margin:3px 0;font-size:23px;line-height:1.2}.onec-heading p{margin:0;font-size:13px}.onec-heading button,.onec-nav button{min-height:28px;padding:4px 10px;font-size:12px;border-radius:5px}.onec-nav{display:flex;gap:5px;margin:12px 0 10px;padding-bottom:8px;border-bottom:1px solid #365064}.onec-nav button[aria-pressed=true]{background:#1b5063;border-color:#65a6bc;color:white}.onec-layout{display:grid;grid-template-columns:1.4fr 1fr;gap:10px;align-items:start}.onec-layout.onec-single{grid-template-columns:1fr}.onec-dialog [hidden]{display:none!important}.onec-column{display:grid;gap:9px;min-width:0}.onec-panel{border:1px solid #344d60;background:#0b1c2b;border-radius:6px;min-width:0;padding:7px 10px}.onec-dialog .onec-panel h3{font-size:14px;color:#edcd8c;margin:0 0 5px;padding:0 0 5px;border-bottom:1px solid #2a4356}.onec-field{font-size:13px;line-height:1.32;padding:4px 0}.onec-field:last-child{border:0}.onec-link{width:100%;display:flex;align-items:center;justify-content:space-between;text-align:left;gap:6px;min-height:33px;padding:5px 0;margin:0;background:transparent;border:0;border-bottom:1px solid #294255;border-radius:0;color:#e3eef7;font-size:13px;line-height:1.25;box-shadow:none}.onec-link:hover{background:#19384a}.onec-link:last-child{border:0}.onec-link small{font-weight:400;font-size:11px;margin-bottom:1px}.onec-arrow{color:#8cb5c7;font-size:19px}.onec-group summary{font-size:13px}.onec-dialog::backdrop{background:#01101ab8}
@media(max-width:600px){.onec-dialog{width:calc(100vw - 12px);max-height:92vh;padding:11px}.onec-layout{grid-template-columns:1fr;gap:8px}.onec-heading h2{font-size:19px}.onec-field{grid-template-columns:38% 1fr}}
dialog.onec-dialog[open]{position:fixed;left:50%;top:50%;right:auto;bottom:auto;margin:0;transform:translate(-50%,-50%)}
.onec-members{margin-top:8px}.onec-members .onec-link small{margin-top:2px}.onec-members~.sale-actions{margin-top:8px}
.onec-merge{display:flex;align-items:end;gap:7px;flex-wrap:wrap;margin:8px 0}.onec-merge p{width:100%;margin:1px 0;font-size:.81rem}.onec-merge .sale-field{flex:1 1 180px}.onec-merge button,.onec-account button{min-height:28px;padding:4px 10px;font-size:.77rem}.onec-account{padding-block:3px}.onec-account+.onec-account{border-top:1px solid #456274;margin-top:6px;padding-top:7px}.onec-account>button{display:block;width:100%;text-align:left;margin-bottom:3px}.client-directory-row>.sale-check+div{flex:1}.onec-account .onec-field span:last-child{font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.onec-account .onec-field{grid-template-columns:minmax(5.2rem,34%) 1fr}.onec-account .onec-field span:last-child{letter-spacing:0}

.crm-profile-editor{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 10px;align-items:end;margin:6px 0 9px}
.crm-profile-editor .sale-field{min-width:0}.crm-profile-editor input,.crm-profile-editor select{min-width:0;width:100%;min-height:30px;padding:4px 7px}
.crm-profile-editor button,.crm-section button{justify-self:start;min-height:28px;padding:3px 9px}
.crm-dialog .crm-tabs{margin:7px 0}.crm-section{margin:5px 0}.crm-section summary{cursor:pointer}
.crm-record{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:start;padding:5px 0;border-bottom:1px solid #35516a;font-size:.8rem;overflow-wrap:anywhere}
@media(max-width:550px){.crm-profile-editor{gap:5px}.crm-tabs{flex-wrap:wrap}.crm-tabs button{flex:1 1 auto}}

/* Role home; the existing reports and tools retain their own styles. */
#roleHome[hidden]{display:none!important}
#roleHome{display:grid;grid-template-columns:196px minmax(0,1fr);align-self:stretch;width:min(100%,1600px);margin:0 auto;color:#162744;background:#f3f6fa;border:1px solid #dfe7f1;border-radius:15px;overflow:hidden;flex:none;order:-3}
.rh-nav{background:#142440;display:flex;flex-direction:column;gap:6px;padding:20px 12px;min-width:0}
.rh-nav .rh-btn{color:#d8e6f8;background:transparent;text-align:left;border-color:transparent}.rh-nav .rh-btn:hover,.rh-nav .rh-active{background:#284f82;color:#fff}
.rh-main{padding:22px;min-width:0}.rh-heading,.rh-strip{display:flex;align-items:center;justify-content:space-between;gap:12px}
.rh-heading h1{font-size:clamp(23px,3vw,34px);line-height:1.13;color:#162744;margin:5px 0}.rh-kicker{font-size:10px;font-weight:800;letter-spacing:.08em;color:#2362ac;margin:0}
.rh-sub,.rh-row small,.rh-strip small,.rh-metric small{color:#536987;font-size:13px;margin:6px 0;display:block}.rh-message{color:#983d26;font-size:13px;margin:7px 0}.rh-message:empty{display:none}
.rh-btn{font:inherit;font-size:13px;font-weight:650;color:#205a99;text-align:left;background:#e7f2ff;border:1px solid #d9e7f6;border-radius:7px;padding:8px 10px;cursor:pointer;line-height:1.25}
.rh-btn:hover,.rh-btn.rh-active{background:#d7e9fd}.rh-btn:focus-visible,.rh-metric:focus-visible{outline:2px solid #2877c8;outline-offset:2px}
.rh-actions{display:flex;align-items:center;flex-wrap:wrap;gap:6px}.rh-strip,.rh-box,.rh-metric{background:white;border:1px solid #dfe7f1;border-radius:12px}.rh-strip{padding:12px 14px;margin:14px 0;border-left:4px solid #d89432}
.rh-metrics{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px;margin:14px 0}.rh-metric{padding:12px;min-height:105px;color:#162744;text-align:left;cursor:pointer}.rh-metric:hover{border-color:#6fa7dd}.rh-metric strong{display:block;color:#2362ac;font-size:28px;line-height:1.25}.rh-metric.rh-amber strong{color:#8e500e}.rh-metric.rh-teal strong{color:#146d66}.rh-label{font-size:12px;font-weight:750}.rh-metric small{font-size:11px}
.rh-content{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:12px}.rh-box{padding:14px;min-width:0}.rh-box h2{color:#162744;margin:0 0 11px;font-size:17px}.rh-box h3{margin:18px 0 4px;color:#162744}.rh-row{display:flex;align-items:center;gap:7px;border-top:1px solid #e5ebf3;margin-top:8px;padding:8px 0;font-size:13px}.rh-row>div,.rh-row>strong{flex:1;min-width:0;overflow-wrap:anywhere}.rh-row small{font-size:11px;margin:2px 0}.rh-time{font-size:11px;color:#536987;white-space:nowrap}
#homeView.role-mode:not(.layout-editing)>:is(#orbitPeople,.home-top,.sale-visibility,#saleHome,#homeActions){display:none!important}
#homeView.role-mode .ai-composer:not([hidden]){position:relative;inset:auto;order:-2;margin:0 auto}
#homeView.role-mode:not(.layout-editing){height:auto;min-height:100%;overflow:visible}
#homeView.role-mode:not(.layout-editing) #reportWindows:not([hidden]){position:relative;inset:auto;order:2;width:100%;height:var(--report-board-height,280px);min-height:220px}
#homeView.role-mode:not(.layout-editing) #reportWindowTools:not([hidden]){position:relative;inset:auto;order:1}
#homeView.sale-mode:not(.layout-editing)>:is(#orbitPeople,.home-top,.sale-visibility,#homeActions,#reportWindows,#reportWindowTools,#homeComposer){display:none!important}
#homeView.sale-mode{height:auto;overflow:visible}.sale-back{padding:7px 12px;align-self:start;order:-2}
#homeView.team-mode #roleHome{display:none!important}
@media(max-width:1180px){#roleHome{grid-template-columns:155px minmax(0,1fr)}.rh-main{padding:14px}.rh-content{grid-template-columns:minmax(0,1fr)}}
@media(max-width:760px){#roleHome{display:block}.rh-nav{flex-direction:row;overflow-x:auto;padding:8px}.rh-nav .rh-btn{flex:none}.rh-heading{align-items:flex-start;flex-direction:column}.rh-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.rh-metric{min-height:90px}.rh-strip{align-items:flex-start;flex-direction:column}.rh-actions{gap:4px}.rh-row{flex-wrap:wrap}}

#homeView.layout-editing #roleHome{display:none!important}
#homeView.role-mode #reportWindows{max-width:1600px;margin:0 auto}
#homeView.role-mode #roleHome[hidden]{display:none!important}
#homeView.team-mode:not(.layout-editing)>:is(.sale-visibility,#saleHome,#reportWindows,#reportWindowTools,#homeActions){display:none!important}

/* Workspace theme: same ink, navy navigation and white cards as the role home.
   Saturn, the layout editor and the sign-in screen keep their own visual identity. */
:root{--work-bg:#f3f6fa;--work-white:#fff;--work-outline:#dfe7f1;--work-input:#9eafc7;--work-ink:#162744;--work-muted:#536987;--work-navy:#142440;--work-blue:#205a99;--work-blue-strong:#215c9e;--work-tint:#e7f2ff;--work-selected:#d7e9fd;--work-focus:#2368b6;--work-ok:#176049;--work-warn:#825210;--work-error:#983d26;--work-radius:12px}
body:is([data-view=chat],[data-view=reports],[data-view=brig],[data-view=fregat],[data-view=system],[data-view=counterparties],[data-view=video],[data-view=access]) .app-main,
body[data-view=home]:has(#homeView.sale-mode:not(.layout-editing)) .app-main{background:var(--work-bg);color:var(--work-ink);color-scheme:var(--work-scheme,light)}
#appShell :is(#reportView,#systemView,#counterpartiesView,#videoView,#chatView,#accessView),
#homeView.sale-mode:not(.layout-editing),
#homeView.role-mode #homeComposer,
dialog:not(.home-people-dialog){--text:var(--work-ink);--muted:var(--work-muted);--edge:var(--work-outline);--aqua:var(--work-blue);--gold:var(--work-blue);color:var(--work-ink);color-scheme:var(--work-scheme,light)}
#appShell :is(#reportView,#systemView,#counterpartiesView,#videoView,#chatView,#accessView),
#appShell #homeView.sale-mode:not(.layout-editing){width:100%;max-width:1600px;margin:0 auto;padding:clamp(12px,2vw,24px)}
#appShell :is(#reportView,#systemView,#counterpartiesView,#chatView,#accessView) .page-title{gap:12px;margin:0 0 14px;align-items:center}
#appShell :is(#reportView,#systemView,#counterpartiesView,#chatView,#accessView) .page-title h1{font-size:clamp(23px,3vw,34px);line-height:1.13;color:var(--work-ink);margin:3px 0}
#appShell :is(#reportView,#systemView,#counterpartiesView,#chatView,#accessView) .eyebrow,
#saleHome .eyebrow{color:var(--work-blue);font-size:10px;font-weight:800;letter-spacing:.08em;margin-bottom:3px}
#appShell :is(#reportView,#systemView,#counterpartiesView,#videoView,#chatView,#accessView,#homeView.sale-mode:not(.layout-editing)) .surface,
#homeView.role-mode #homeComposer,
dialog:not(.home-people-dialog){background:var(--work-white);border:1px solid var(--work-outline);border-radius:var(--work-radius);box-shadow:none}
dialog[open]:not(.home-people-dialog){box-shadow:0 18px 58px #14244045}
dialog::backdrop{background:#14244091;backdrop-filter:blur(3px)}

:is(#reportView,#systemView,#counterpartiesView,#videoView,#chatView,#accessView,#homeView.sale-mode:not(.layout-editing),#homeView.role-mode #homeComposer,dialog:not(.home-people-dialog)) :is(.outline-button,.quiet-button,.back-button,.icon-button,.sale-stat,.send-button,.primary-button){border:1px solid var(--work-input);border-radius:7px;background:var(--work-tint);color:var(--work-blue);font-size:13px;font-weight:650;line-height:1.25;min-height:32px;padding:6px 9px;white-space:normal;box-shadow:none;text-decoration:none}
:is(#reportView,#systemView,#counterpartiesView,#videoView,#chatView,#accessView,#homeView.sale-mode:not(.layout-editing),#homeView.role-mode #homeComposer,dialog:not(.home-people-dialog)) :is(.primary-button,.send-button){border-color:var(--work-blue-strong);background:var(--work-blue-strong);color:#fff}
:is(#reportView,#systemView,#counterpartiesView,#videoView,#chatView,#accessView,#homeView.sale-mode:not(.layout-editing),#homeView.role-mode #homeComposer,dialog:not(.home-people-dialog)) :is(.outline-button,.quiet-button,.back-button,.icon-button,.sale-stat):is(:hover,[aria-pressed=true],[aria-current=page]){background:var(--work-selected);border-color:var(--work-focus);color:var(--work-navy)}
:is(#reportView,#systemView,#counterpartiesView,#videoView,#chatView,#accessView,#homeView.sale-mode:not(.layout-editing),#homeView.role-mode #homeComposer,dialog:not(.home-people-dialog)) :is(input:not([type=checkbox],[type=radio],[type=range],[type=file],[type=color]),textarea,select){background:var(--work-white);border:1px solid var(--work-input);color:var(--work-ink);border-radius:7px;padding:6px 8px;min-height:34px;font-size:14px;min-width:0;max-width:100%}
:is(#reportView,#systemView,#counterpartiesView,#videoView,#chatView,#accessView,#homeView.sale-mode:not(.layout-editing),#homeView.role-mode #homeComposer,dialog:not(.home-people-dialog)) :is(input,textarea)::placeholder{color:var(--work-muted)}
:is(#reportView,#systemView,#counterpartiesView,#videoView,#chatView,#accessView,#homeView.sale-mode:not(.layout-editing),#homeView.role-mode #homeComposer,dialog:not(.home-people-dialog)) :is(option,optgroup){background:var(--work-white);color:var(--work-ink)}
:is(#reportView,#systemView,#counterpartiesView,#videoView,#chatView,#accessView,#homeView.sale-mode:not(.layout-editing),#homeView.role-mode #homeComposer,dialog:not(.home-people-dialog)) :is(button,input,textarea,select,a,summary,[tabindex]):focus-visible{outline:2px solid var(--work-focus);outline-offset:2px}
:is(#reportView,#systemView,#counterpartiesView,#videoView,#chatView,#accessView,#homeView.sale-mode:not(.layout-editing),#homeView.role-mode #homeComposer,dialog:not(.home-people-dialog)) :is(.muted,.sale-field,.sale-check,.report-field,.report-period,.report-brief-note,.report-group-title,.cam-hint,.cam-empty,.cam-fields label,.cam-rec,.cam-archive-controls label,.report-metric>span){color:var(--work-muted)}
:is(#reportView,#systemView,#counterpartiesView,#videoView,#chatView,#accessView,#homeView.sale-mode:not(.layout-editing),#homeView.role-mode #homeComposer,dialog:not(.home-people-dialog)) :is(.error-text,.sale-error){color:var(--work-error)}

body[data-view=home] #appShell #homeView.sale-mode:not(.layout-editing){height:auto;min-height:100%;display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;gap:12px;isolation:auto;overflow:visible}
body[data-view=home] #appShell #homeView.sale-mode:not(.layout-editing)>:is(#roleHomeBack,#saleHome){position:static!important;inset:auto!important;height:auto!important;max-height:none;overflow:visible;contain:none;container-type:normal;z-index:auto}
body[data-view=home] #appShell #homeView.sale-mode:not(.layout-editing)>#roleHomeBack{width:auto!important;align-self:start}
body[data-view=home] #appShell #homeView.sale-mode:not(.layout-editing)>#saleHome{background:var(--work-white);color:var(--work-ink);width:100%!important;max-width:none;padding:clamp(12px,2vw,22px);align-self:stretch}
#homeView.sale-mode:not(.layout-editing) .sale-cards{grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));min-height:0;max-height:none;overflow:visible;overscroll-behavior:auto;gap:9px}
#homeView.sale-mode:not(.layout-editing) :is(.sale-stats,.sale-filters){margin:11px 0;gap:8px}
:is(#saleHome,#saleSystem,dialog:not(.home-people-dialog)) :is(.sale-card,.sale-client-summary,.sale-activity,.sale-mail-preview,.sale-settings-meta,.sale-status-note,.crm-match,.crm-activities,.crm-table-wrap){color:var(--work-ink);background:var(--work-bg);border-color:var(--work-outline);border-radius:9px;box-shadow:none}
:is(#saleHome,#saleSystem,dialog:not(.home-people-dialog)) .sale-card-clickable:hover{border-color:var(--work-focus);background:var(--work-tint)}
#homeView.sale-mode:not(.layout-editing) .sale-card{padding:10px 12px;gap:6px}
:is(#saleHome,#saleSystem,dialog:not(.home-people-dialog)) :is(.sale-reason,.sale-empty,.sale-staff-row,.sale-status,.sale-mail-status,.crm-status,.onec-field small){color:var(--work-muted)}
:is(#counterpartiesView,#systemView,dialog:not(.home-people-dialog)) :is(.crm-table-wrap,.crm-table-row,.crm-record,.onec-field,.crm-heading,.sale-staff-row){border-color:var(--work-outline);color:var(--work-ink)}
:is(#counterpartiesView,#systemView) .crm-table-wrap{background:var(--work-white)}
:is(#counterpartiesView,#systemView) .crm-table-row:not(.crm-table-head):hover{background:var(--work-tint)}
:is(#counterpartiesView,#systemView,dialog:not(.home-people-dialog)) :is(.crm-table-head,.crm-tabs,.sale-tabs button[aria-pressed=true]){background:var(--work-tint);color:var(--work-blue)}
:is(#counterpartiesView,#systemView,#saleHome,dialog:not(.home-people-dialog)) :is(.sale-badge,.crm-badge){background:var(--work-tint);color:var(--work-blue);border-color:#b4cbe6}
#systemView .system-layout{gap:12px}
#systemView .system-sidebar.surface{background:var(--work-navy);color:#d8e6f8;border-color:var(--work-navy);padding:14px 10px}
#systemView .system-sidebar :is(.eyebrow,.system-sidebar-note,.system-update-notice){color:#d8e6f8}
#systemView .system-nav button{padding:6px 9px;border-radius:7px;min-height:34px;color:#d8e6f8;font-size:13px}
#systemView .system-nav button:is(:hover,[aria-current=page]){background:#284f82;color:#fff;border-color:transparent;box-shadow:none}
#systemView .system-nav button:focus-visible{outline-color:#a6d4ff}
#systemView :is(.system-panel.system-card,.system-summary,.overview-components,.device-system-card),
#appShell #counterpartyDirectory{padding:clamp(11px,1.6vw,19px)}
#systemView :is(.update-status,.update-progress-panel,.update-preview,.agent-card,.agent-tech,.voice-service-state,.device-card,.learning-entry,.learning-check-card){background:var(--work-bg);color:var(--work-ink);border:1px solid var(--work-outline);border-radius:9px}
#systemView :is(.add-employee,.voice-howto,.voice-setup-help,.status-row,.user-row,.device-card summary,.agent-control-events){border-color:var(--work-outline)}
#systemView :is(.voice-howto ol,.system-panel small,.agent-tech summary,.device-card summary,.device-message){color:var(--work-muted)}
#systemView :is(.voice-service-badge,.agent-control-badge,.alpha-badge){color:var(--work-blue);background:var(--work-tint);border-color:#a8bed8}
#systemView .voice-service-badge[data-ready=true]{color:var(--work-ok);background:#e8f5ee;border-color:#94bda9}
#reportView :is(.report-picker,.report-controls,.report-output,.report-catalog,.report-saved-panel,.report-card){padding:clamp(11px,1.6vw,19px);margin-bottom:10px}
#reportView :is(.report-type-card,.report-saved-card,.report-base-tabs button,.report-result-actions,.report-table-wrap,.report-data-group,.stock-table-wrap,.debt-table-wrap){border-color:var(--work-outline)}
#reportView :is(.report-type-card,.report-saved-card,.report-base-tabs button){color:var(--work-ink);background:var(--work-bg);border-radius:9px}
#reportView :is(.report-type-card,.report-base-tabs button):is(:hover,[aria-pressed=true],[aria-current=page]){background:var(--work-tint);border-color:var(--work-focus)}
#reportView :is(.report-table,.stock-table,.debt-table) :is(th,td){border-color:var(--work-outline);color:var(--work-ink);padding:6px 9px}
#reportView :is(.report-table,.stock-table,.debt-table) th{background:var(--work-tint);color:var(--work-blue)}
#reportView :is(.report-table,.stock-table,.debt-table) tbody tr:nth-child(even){background:var(--work-bg)}
#reportView :is(.report-table,.stock-table,.debt-table) tbody tr:hover{background:var(--work-tint)}
#reportView .report-center summary,#reportView .report-metric.main>strong{color:var(--work-blue)}
#reportView .report-warning{color:var(--work-warn);background:#fff4df;border-left-color:#c28227}
#reportView .report-verified{color:var(--work-ok)}
#chatView .chat-sidebar{background:var(--work-navy);border-color:#284f82;color:#d8e6f8}
#chatView .chat-sidebar :is(h2,.muted,.channel,.chat-tabs button){color:#d8e6f8}
#chatView .chat-sidebar :is(small,.channel-preview){color:#b4c8e3}
#chatView .chat-sidebar :is(.channel,.chat-tabs button):is(:hover,.active,[aria-selected=true],[aria-current],[aria-pressed=true]){background:#284f82;border-color:#7597c0;color:#fff}
#chatView .chat-sidebar :focus-visible{outline-color:#a6d4ff}
#chatView :is(.chat-conversation,.conversation-heading,.chat-compose,.empty-chat,.chat-draft-media,.chat-draft-item,.message-search){background:var(--work-white);color:var(--work-ink);border-color:var(--work-outline)}
#chatView :is(.bubble,.message-bubble,.chat-message,.chat-attachment){color:var(--work-ink);background:var(--work-bg);border-color:var(--work-outline)}
#chatView :is(.own,.mine,.message-own) :is(.bubble,.message-bubble){background:var(--work-tint);border-color:#b6cce3}
#chatView :is(.chat-attachment-download,.chat-media-status,.chat-draft-text pre,.chat-voice-actions){color:var(--work-blue)}
#videoView .cam-shell{background:var(--work-white);border-color:var(--work-outline);color:var(--work-ink)}
#videoView :is(.cam-head,.cam-form details,.cam-tile){border-color:var(--work-outline)}
#videoView :is(.cam-shell button,.cam-shell select){background:var(--work-tint);border-color:var(--work-input);color:var(--work-blue)}
#videoView .cam-shell button:is(:hover,[aria-pressed=true]){background:var(--work-selected);color:var(--work-ink)}
#videoView .cam-tile-bar{background:var(--work-tint)}
#videoView .cam-shell a{color:var(--work-blue)}
#videoView .cam-picture .cam-overlay{color:#d7e5f7}

@media(max-width:760px){
 #appShell :is(#reportView,#systemView,#counterpartiesView,#videoView,#chatView,#accessView),#appShell #homeView.sale-mode:not(.layout-editing){padding:9px}
 #appShell :is(#reportView,#systemView,#counterpartiesView,#chatView,#accessView) .page-title{gap:6px;margin-bottom:9px}
 #homeView.sale-mode:not(.layout-editing) .sale-heading>.sale-actions{margin-left:0}
 #systemView .system-layout{gap:7px}
}
@media(pointer:coarse){
 :is(#reportView,#systemView,#counterpartiesView,#videoView,#chatView,#accessView,#homeView.sale-mode:not(.layout-editing),dialog:not(.home-people-dialog)) :is(.outline-button,.quiet-button,.back-button,.icon-button,.sale-stat,.send-button,.primary-button){min-height:38px}
 :is(#reportView,#systemView,#counterpartiesView,#videoView,#chatView,#homeView.sale-mode:not(.layout-editing),dialog:not(.home-people-dialog)) :is(input:not([type=checkbox],[type=radio],[type=range],[type=file],[type=color]),textarea,select){font-size:16px}
}
@media(forced-colors:active){
 :is(#reportView,#systemView,#counterpartiesView,#videoView,#chatView,#accessView,#homeView.sale-mode:not(.layout-editing),dialog:not(.home-people-dialog)) :is(button,input,textarea,select,a,summary,[tabindex]):focus-visible{outline-color:Highlight}
}

/* These selectors also cover the compact chat and saved hidden Sale layout. */
:root{--work-input:#8295af}
body[data-view=home] #appShell #homeView.sale-mode:not(.layout-editing)>#saleHome:not([hidden]){display:block!important}
#chatView .chat-layout.conversation .chat-conversation{background:var(--work-white)}
#chatView .message{background:var(--work-bg);color:var(--work-ink);border-color:var(--work-outline);box-shadow:none}
#chatView .message.own{background:var(--work-tint);border-color:#b6cce3}
#chatView :is(.message strong,.message small,.message-meta,.message-receipt,.day-divider,.compose-note){color:var(--work-muted)}
#chatView .message-receipt[data-state=read]{color:var(--work-blue)}
#chatView .chat-sidebar :is(.channel.active,.chat-tabs button[aria-pressed=true]){background:#284f82;color:#fff}
#chatView .chat-sidebar .outline-button{background:#284f82;color:#fff;border-color:#7597c0}
#chatView .chat-sidebar .unread{background:#d7e9fd;color:var(--work-navy)}
#systemView .system-mobile-switch select{width:100%}

/* Список новых клиентов и проверка Excel: общая визуальная система рабочего места. */
.rh-filter{display:grid;gap:4px;align-self:stretch;min-width:120px;font-size:12px;color:#405675}
.rh-filter select{min-height:34px;padding:4px 8px;border:1px solid #bdcce1;border-radius:8px;background:#fff;color:#152743;font:inherit;font-size:13px}
.rh-list-scroll{overflow:auto;max-width:100%;margin:8px 0}
.rh-lead-table{width:100%;border-collapse:collapse;min-width:670px;font-size:13px;color:#142747;text-align:left}
.rh-lead-table td,.rh-lead-table th{padding:7px 10px;border-bottom:1px solid #dfe7f3;vertical-align:middle}
.rh-lead-table th{background:#edf3fb;color:#374d6e;white-space:nowrap}
.rh-lead-table tr:hover td{background:#f6f9fe}
.rh-lead-table small{display:block;color:#526987;font-size:12px}
.rh-client-button{border:0;background:none;color:#154d96;text-align:left;font:inherit;font-weight:650;padding:0;cursor:pointer}
.rh-client-button:hover{text-decoration:underline}
.rh-import-dialog .rh-import-rows{max-height:250px;overflow:auto}
.rh-import-dialog .rh-import-rows p{margin:0;padding:6px;border-bottom:1px solid #dfe7f3}
.rh-import-dialog .rh-btn{display:inline-flex;align-items:center;text-decoration:none}
@media(max-width:680px){.rh-filter{min-width:0;flex:1 1 43%}.rh-lead-table td,.rh-lead-table th{padding:6px}}

/* Accessible visual preferences; both palettes use the same flow geometry. */
:root{--work-scheme:light;--work-nav-bg:#142440;--work-nav-ink:#e7f0ff;--work-nav-muted:#c6d9f3;--work-nav-active:#284f82;--work-nav-focus:#a6d4ff;--work-nav-border:#7597c0;--work-warning-bg:#fff4df;--work-good-bg:#e8f5ee;--work-good-border:#94bda9;--work-primary-ink:#fff}
html[data-brig-theme=night]{
 color-scheme:dark;--work-scheme:dark;--work-bg:#07172c;--work-white:#10233a;--work-outline:#3a5771;--work-input:#7191b2;
 --work-ink:#f0f5fc;--work-muted:#b6c8dd;--work-navy:#e0efff;--work-blue:#a6d4ff;--work-blue-strong:#9cccf6;
 --work-tint:#142f4b;--work-selected:#21476b;--work-focus:#a6d4ff;--work-ok:#a8e8c5;--work-warn:#f8d59b;--work-error:#ffb4a2;
 --work-nav-bg:#0d2038;--work-nav-ink:#edf5ff;--work-nav-muted:#c3d5eb;--work-nav-active:#24476b;--work-nav-focus:#a6d4ff;--work-nav-border:#789bbe;
 --work-warning-bg:#422d1a;--work-good-bg:#183c31;--work-good-border:#75a992;--work-primary-ink:#10233a
}
html[data-brig-theme=day]{color-scheme:light}
#themeModeButton{border:1px solid var(--work-nav-border);border-radius:8px;display:inline-flex;align-items:center;justify-content:center;gap:4px;min-height:36px;padding:5px 8px;white-space:nowrap;background:var(--work-nav-bg);color:var(--work-nav-ink);font-size:13px;font-weight:650;line-height:1.2}
#themeModeButton:hover,#themeModeButton[aria-pressed=true]{background:var(--work-nav-active);color:#fff}
#themeModeButton:focus-visible{outline:2px solid var(--work-nav-focus);outline-offset:2px}
html:is([data-brig-theme=day],[data-brig-theme=night]) #mainMenu{background:var(--work-white);color:var(--work-ink);border-color:var(--work-outline);color-scheme:var(--work-scheme)}
html:is([data-brig-theme=day],[data-brig-theme=night]) #mainMenu :is(.menu-user,.menu-diagnostics,.version-pill,.motion-setting){color:var(--work-ink)}
#mainMenu .version-pill{background:var(--work-tint);border-color:var(--work-outline)}
#mainMenu button:not(#themeModeButton){background:var(--work-tint);color:var(--work-blue);border:1px solid var(--work-input);border-radius:7px;line-height:1.3}
#mainMenu button:not(#themeModeButton):is(:hover,[aria-current=page]){background:var(--work-selected);border-color:var(--work-focus);color:var(--work-ink)}
#mainMenu :is(button,input,summary):focus-visible{outline:2px solid var(--work-focus);outline-offset:2px}
#roleHome,.rh-main{background:var(--work-bg);color:var(--work-ink);border-color:var(--work-outline);color-scheme:var(--work-scheme)}
#roleHome :is(.rh-heading h1,.rh-box h2,.rh-box h3,.rh-metric,.rh-lead-table,.rh-row,.rh-strip){color:var(--work-ink)}
#roleHome :is(.rh-sub,.rh-row small,.rh-strip small,.rh-metric small,.rh-filter),.rh-lead-table small{color:var(--work-muted)}
#roleHome .rh-kicker,.rh-client-button{color:var(--work-blue)}
#roleHome .rh-message,.rh-import-dialog .rh-message{color:var(--work-error)}
#roleHome :is(.rh-strip,.rh-box,.rh-metric),.rh-import-dialog :is(.rh-import-rows,.rh-strip){background:var(--work-white);border-color:var(--work-outline)}
#roleHome .rh-strip{border-left-color:#d89432}
#roleHome .rh-metric:is(:hover,:focus-visible){border-color:var(--work-focus)}
#roleHome .rh-btn:not(.rh-nav .rh-btn),.rh-import-dialog .rh-btn{background:var(--work-tint);color:var(--work-blue);border-color:var(--work-input)}
#roleHome .rh-btn:not(.rh-nav .rh-btn):is(:hover,.rh-active),.rh-import-dialog .rh-btn:hover{background:var(--work-selected);color:var(--work-ink)}
#roleHome .rh-filter select{background:var(--work-white);color:var(--work-ink);border-color:var(--work-input)}
#roleHome .rh-lead-table :is(td,th),.rh-import-dialog .rh-import-rows p{border-color:var(--work-outline)}
#roleHome .rh-lead-table th{background:var(--work-tint);color:var(--work-blue)}
#roleHome .rh-lead-table tr:hover td{background:var(--work-selected)}
#appShell :is(.rh-nav,#systemView .system-sidebar.surface,#chatView .chat-sidebar){background:var(--work-nav-bg);color:var(--work-nav-ink);border-color:var(--work-nav-bg)}
#appShell :is(.rh-nav,#systemView .system-sidebar,#chatView .chat-sidebar) :is(.rh-btn,.system-nav button,.channel,.chat-tabs button,h2,.eyebrow){color:var(--work-nav-ink)}
#appShell :is(.rh-nav,#systemView .system-sidebar,#chatView .chat-sidebar) :is(.channel-preview,.muted,.system-sidebar-note,.system-update-notice,small){color:var(--work-nav-muted)}
#appShell :is(.rh-nav,#systemView .system-sidebar,#chatView .chat-sidebar) :is(.rh-btn,.system-nav button,.channel,.chat-tabs button):is(:hover,.active,.rh-active,[aria-current=page],[aria-selected=true],[aria-pressed=true]){background:var(--work-nav-active);color:#fff;border-color:transparent;box-shadow:none}
#appShell :is(.rh-nav,#systemView .system-sidebar,#chatView .chat-sidebar) :focus-visible{outline:2px solid var(--work-nav-focus);outline-offset:2px}
#appShell #chatView .chat-sidebar .outline-button{background:var(--work-nav-active);color:#fff;border-color:var(--work-nav-border)}
#chatView .chat-sidebar .unread{background:#d7e9fd;color:#142440}
#reportView .report-base-tabs,.employee-tabs{border-color:var(--work-outline)}
#reportView .report-base-tabs button,.employee-tabs button{color:var(--work-blue);background:var(--work-tint);border-color:var(--work-input)}
#reportView .report-base-tabs button:is(:hover,[aria-pressed=true],[aria-selected=true],[aria-current=page],.active),.employee-tabs button:is(:hover,[aria-selected=true]){color:var(--work-ink);background:var(--work-selected);border-color:var(--work-focus)}
.employee-tabs{background:var(--work-white);position:sticky}
#systemView .system-mobile-switch select{background:var(--work-white);color:var(--work-ink);border-color:var(--work-input)}
#appShell :is(#reportView,#systemView,#counterpartiesView,#videoView,#chatView,#accessView,#tasksView,#homeView.sale-mode:not(.layout-editing),#homeView.role-mode #homeComposer) :is(.primary-button,.send-button),
dialog:not(.home-people-dialog) :is(.primary-button,.send-button){background:var(--work-blue-strong);color:var(--work-primary-ink);border-color:var(--work-blue-strong)}
#systemView .voice-service-badge[data-ready=true]{color:var(--work-ok);background:var(--work-good-bg);border-color:var(--work-good-border)}
#reportView .report-warning{color:var(--work-warn);background:var(--work-warning-bg);border-left-color:var(--work-warn)}
html[data-brig-theme=day] :is(#homeView.role-mode:not(.layout-editing),#homeView.sale-mode:not(.layout-editing)) .report-window{color:var(--work-ink);background:var(--work-white);border-color:var(--work-outline);box-shadow:none}
html[data-brig-theme=day] #homeView.role-mode:not(.layout-editing) .report-window :is(.report-window-period,.report-window-time,.report-window-footer,.report-window-row,.report-window-handle){color:var(--work-muted);border-color:var(--work-outline)}
html[data-brig-theme=day] #homeView.role-mode:not(.layout-editing) .report-window .report-window-state{color:var(--work-ok)}
html[data-brig-theme=day] #homeView.role-mode:not(.layout-editing) .report-window :is(.report-window-warning,.report-window-state[data-state=error],.report-window-state[data-state=paused],.report-window-state[data-state=offline]){color:var(--work-warn)}
html[data-brig-theme=day] #homeView.role-mode:not(.layout-editing) :is(.report-window,.report-windows-tools) button{color:var(--work-blue);background:var(--work-tint);border-color:var(--work-input)}
html[data-brig-theme=night] #appShell :is(#systemView,#chatView,#reportView,#videoView,#counterpartiesView,#accessView) .page-title>div{color:var(--work-ink)}
html[data-brig-theme=night] #systemView :is(.agent-control-badge,.voice-service-badge,.alpha-badge){border-color:var(--work-input)}
html[data-brig-theme=night] dialog[open]{box-shadow:0 18px 58px #020916aa}
html[data-brig-theme=night] #reportView :is(.report-verified,.stock-complete,.debt-complete){color:var(--work-ok)}

body[data-view=tasks] .app-main{background:var(--work-bg);color:var(--work-ink);color-scheme:var(--work-scheme);overflow:auto}
#tasksView{width:100%;max-width:1600px;margin:0 auto;padding:clamp(10px,2vw,24px);color:var(--work-ink);--text:var(--work-ink);--muted:var(--work-muted);--edge:var(--work-outline);--aqua:var(--work-blue);--gold:var(--work-blue)}
#tasksView :is(.surface,.task-card,.task-list){background:var(--work-white);color:var(--work-ink);border:1px solid var(--work-outline);border-radius:var(--work-radius);box-shadow:none}
#tasksView .eyebrow{color:var(--work-blue)}
#tasksView :is(.outline-button,.quiet-button,.back-button){background:var(--work-tint);color:var(--work-blue);border:1px solid var(--work-input);border-radius:7px;min-height:34px;padding:6px 9px}
#tasksView :is(.outline-button,.quiet-button,.back-button):is(:hover,[aria-pressed=true],[aria-current=page]){background:var(--work-selected);color:var(--work-ink);border-color:var(--work-focus)}
#tasksView :is(input:not([type=checkbox],[type=radio],[type=file],[type=range],[type=color]),textarea,select){background:var(--work-white);color:var(--work-ink);border:1px solid var(--work-input);border-radius:7px;min-height:34px;padding:6px 8px;max-width:100%}
:is(#tasksView,#roleHome) :is(button,input,textarea,select,a,summary,[tabindex]):focus-visible{outline:2px solid var(--work-focus);outline-offset:2px}
@media(max-width:450px){#themeModeButton{min-height:36px;padding:4px 6px;font-size:12px}}
@media(forced-colors:active){:is(#tasksView,#mainMenu,#roleHome) :is(button,input,textarea,select,a,summary,[tabindex]):focus-visible,#themeModeButton:focus-visible{outline-color:Highlight}}

/* Daylight behind the dashboard, but never behind the separate Saturn workspace. */
html[data-brig-theme=day] body[data-view=home]:has(#homeView.role-mode:not(.layout-editing)) .app-main{background:var(--work-bg);color:var(--work-ink);color-scheme:light}
#appShell :is(#reportView,#systemView,#counterpartiesView,#videoView,#chatView,#tasksView,#homeView.sale-mode:not(.layout-editing)) :is(.sale-tabs,.crm-tabs) button:is([aria-pressed=true],[aria-selected=true],[aria-current=page],.active),
dialog:not(.home-people-dialog) :is(.sale-tabs,.crm-tabs) button:is([aria-pressed=true],[aria-selected=true],[aria-current=page],.active){background:var(--work-selected);color:var(--work-ink);border-color:var(--work-focus)}
.task-item>div{overflow-wrap:anywhere}
#workTasksBoard .task-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px}
#workTasksBoard .task-toolbar button{min-height:40px;padding:6px 12px;line-height:1.2}
#workTasksBoard .task-filter-toggle{display:inline-flex;align-items:center;gap:9px}
.task-filter-toggle::after{content:"";width:7px;height:7px;border:solid currentColor;border-width:0 1.5px 1.5px 0;transform:translateY(-2px) rotate(45deg)}
.task-filter-toggle[aria-expanded=true]::after{transform:translateY(2px) rotate(225deg)}
#workTasksBoard .task-filter-panel{display:flex;align-items:end;flex-wrap:wrap;gap:8px;margin-top:8px;padding:10px;border:1px solid var(--work-outline);border-radius:8px;background:var(--work-bg)}
.task-filter-panel .rh-filter{flex:0 1 230px;min-width:0}
.task-filter-panel select{width:100%;min-width:0}
.task-filter-panel .task-filter-note{flex-basis:100%;margin:0}
#workTasksBoard .task-filter-summary{margin:6px 0 0;overflow-wrap:anywhere}
@media(max-width:600px){
 #workTasksBoard .task-filter-panel{display:grid;grid-template-columns:minmax(0,1fr)}
 #workTasksBoard .task-filter-panel button{justify-self:start}
 #workTasksBoard .task-item>div:first-child{flex:1 0 100%}
 #workTasksBoard .task-item{align-items:flex-start;flex-wrap:wrap;row-gap:4px}
 #workTasksBoard .task-toolbar button{min-height:44px;font-size:.9rem}
}
#tasksView .page-title h1{color:var(--work-ink)}
#tasksView .rh-box,#tasksView .rh-row,.chat-task-actions .outline-button{background:var(--work-white);color:var(--work-ink);border-color:var(--work-outline)}
#tasksView .rh-sub,#tasksView .rh-row small,#tasksView .rh-filter{color:var(--work-muted)}
.chat-task-actions{display:flex;flex-wrap:wrap;gap:4px;padding-top:5px}
#chatView .chat-task-actions .outline-button{min-height:26px;padding:3px 6px;font-size:12px}
#chatView .message.task-message-anchor{outline:2px solid var(--work-focus);outline-offset:3px}
.chat-task-links{display:flex;flex-wrap:wrap;gap:4px;padding-top:4px}
.chat-task-links:empty{display:none}
#chatView .chat-task-links .outline-button{min-height:26px;padding:3px 6px;font-size:12px;text-align:left;overflow-wrap:anywhere;max-width:100%}
#reportView .report-task-row-button{margin-inline-start:.35em;min-height:24px;padding:2px 6px;font-size:12px}

/* Pair the System sidebar's foreground and background at the same specificity.
   This wins over the generic workspace .surface rule in both themes. */
#appShell #systemView .system-layout > .system-sidebar.surface{
  --system-nav-surface:#fff;--system-nav-text:#243e5c;--system-nav-caption:#495f7a;
  --system-nav-line:#bfcee0;--system-nav-hover:#e3effc;--system-nav-hover-text:#183957;
  --system-nav-chosen:#244c7d;--system-nav-chosen-text:#fff;
  background:var(--system-nav-surface);color:var(--system-nav-text);border-color:var(--system-nav-line)
}
html[data-brig-theme=night] #appShell #systemView .system-layout > .system-sidebar.surface{
  --system-nav-surface:#0d2038;--system-nav-text:#edf5ff;--system-nav-caption:#c3d5eb;
  --system-nav-line:#3d5c7c;--system-nav-hover:#24476b;--system-nav-hover-text:#fff;
  --system-nav-chosen:#2e5277;--system-nav-chosen-text:#fff
}
#appShell #systemView .system-sidebar.surface .system-nav button{color:var(--system-nav-text);background:transparent}
#appShell #systemView .system-sidebar.surface .system-nav button:hover{color:var(--system-nav-hover-text);background:var(--system-nav-hover)}
#appShell #systemView .system-sidebar.surface .system-nav button[aria-current=page]{color:var(--system-nav-chosen-text);background:var(--system-nav-chosen)}
#appShell #systemView .system-sidebar.surface :is(.eyebrow,.system-sidebar-note){color:var(--system-nav-caption);border-color:var(--system-nav-line)}
#appShell #systemView .system-sidebar.surface .system-nav button:focus-visible,
#appShell #systemView #updateZip:focus-visible{outline:2px solid var(--work-focus);outline-offset:2px}
#appShell #systemView .system-mobile-switch label{color:var(--work-muted)}
#appShell #systemUpdatesPanel :is(.update-status > span,.update-status > p,.update-form > label,.update-check){
  color:var(--work-muted)
}
#appShell #systemUpdatesPanel #updateZip{
  width:100%;min-width:0;min-height:40px;padding:5px 8px;overflow:hidden;
  color:var(--work-ink);background:var(--work-white);
  border:1px solid var(--work-input);border-radius:8px
}
#appShell #systemUpdatesPanel #updateZip::file-selector-button{
  margin-inline-end:8px;padding:5px 8px;font:inherit;color:var(--work-blue);
  background:var(--work-tint);border:1px solid var(--work-input);border-radius:5px
}
@media(forced-colors:active){
 #appShell #systemView .system-sidebar.surface .system-nav button[aria-current=page]{
   border-color:Highlight;color:Highlight
 }
 #appShell #systemView .system-sidebar.surface .system-nav button:focus-visible,
 #appShell #systemView #updateZip:focus-visible{outline-color:Highlight}
}

.topbar .global-voice-button{
  display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:4px 8px;
  color:#edf5ff;background:#183754;border:1px solid #6f91b6;border-radius:8px;
  font-size:13px;font-weight:650;white-space:nowrap
}
.topbar .global-voice-button[hidden]{display:none}
.topbar .global-voice-button[aria-pressed=true]{color:#10233a;background:#cbe3ff;border-color:#cbe3ff}
.topbar .global-voice-button:focus-visible{outline:2px solid #a6d4ff;outline-offset:2px}
.global-voice-status:empty{display:none}
.global-voice-status:not(:empty){position:absolute;inset-inline-end:0;top:calc(100% + 6px);z-index:2;width:max-content;max-width:min(23rem,calc(100vw - 24px));padding:7px 10px;border:1px solid #6f91b6;border-radius:8px;background:#102840;color:#f0f5fc;font-size:13px;font-weight:500;line-height:1.35;pointer-events:none}
@media(max-width:480px){.global-voice-caption{display:none}}

/* Saved correspondence is read-only and shares the workspace colors. */
dialog.sale-dialog .sale-history-email {
  border-color:var(--work-outline);
  color:var(--work-ink);
}
dialog.sale-dialog .sale-sent-text {
  margin:8px 0 0;padding:10px 12px;white-space:pre-wrap;overflow-wrap:anywhere;
  line-height:1.55;border:1px solid var(--work-outline);border-radius:8px;
  color:var(--work-ink);background:var(--work-bg);user-select:text
}
dialog.sale-dialog .sale-mail-history .sale-event,
dialog.sale-dialog .sale-mail-editor .sale-note {
  color:var(--work-ink);background:var(--work-bg);border-color:var(--work-outline)
}
dialog.sale-dialog .sale-readonly-mail {margin-top:5px;color:var(--work-blue)}
dialog.sale-dialog .sale-readonly-mail summary {cursor:pointer}
dialog.sale-dialog .sale-mail-state {color:var(--work-blue)}
dialog.sale-dialog > .window-bottom-actions {background:var(--work-white);border-color:var(--work-outline)}

dialog.rh-import-dialog .rh-import-fields{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr));
  gap:8px;margin:6px 0 12px;
}
dialog.rh-import-dialog .rh-import-fields select,
dialog.rh-import-dialog .rh-import-map select{max-width:100%;min-width:0;width:100%}
dialog.rh-import-dialog .rh-import-pasted{margin:10px 0}
dialog.rh-import-dialog .rh-import-pasted textarea{width:100%}
dialog.rh-import-dialog .rh-import-pasted summary{cursor:pointer}
dialog.rh-import-dialog .rh-lead-table{min-width:420px;color:var(--work-ink)}
dialog.rh-import-dialog .rh-lead-table th{color:var(--work-ink);background:var(--work-tint)}
dialog.rh-import-dialog .rh-lead-table :is(td,th){border-color:var(--work-outline);overflow-wrap:anywhere}
dialog.rh-import-dialog .rh-lead-table tr:hover td{background:var(--work-tint)}

dialog.sale-dialog .crm-overview {display:grid;gap:12px}
dialog.sale-dialog .crm-overview[hidden] {display:none}
dialog.sale-dialog .crm-overview > section {border:1px solid var(--work-outline);border-radius:8px;padding:10px 12px;color:var(--work-ink);background:var(--work-white)}
dialog.sale-dialog .crm-overview h3 {margin:0 0 7px;font-size:1rem}
dialog.sale-dialog .crm-overview h4 {margin:5px 0;font-size:.95rem;overflow-wrap:anywhere}
dialog.sale-dialog .crm-overview-contacts {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(150px,100%),1fr));gap:7px}
dialog.sale-dialog .crm-overview-contacts p {margin:0;min-width:0;overflow-wrap:anywhere}
dialog.sale-dialog .crm-overview-contacts :is(strong,small) {display:block}
dialog.sale-dialog .crm-overview-task {padding:5px 0;border-bottom:1px solid var(--work-outline)}
dialog.sale-dialog .crm-overview-letter {margin-top:7px;padding:8px 0;overflow-wrap:anywhere}
.client-directory-row .rh-client-button {color:var(--work-blue);text-align:left}

.crm-compact-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.crm-compact-heading h3{margin:0}
.crm-client-work{padding:10px 0}
.crm-client-work .sale-handoff-form{max-width:460px;margin-top:8px}
.crm-client-work .sale-handoff-form[hidden]{display:none}

dialog.crm-dialog .crm-card-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.crm-card-heading>div:first-child{min-width:0;overflow-wrap:anywhere}
dialog.crm-dialog .crm-card-heading h2{margin:0;font-size:1.15rem;line-height:1.25}
.crm-card-heading p,.crm-card-contacts{margin:3px 0 6px;font-size:.81rem}
.crm-card-tools,.crm-card-shortcuts,.crm-card-contacts{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.crm-card-tools{flex-wrap:nowrap}
dialog.crm-dialog .crm-card-close{font-size:1.35rem;line-height:1;min-width:36px;padding:2px 6px}
.crm-card-contacts{gap:4px 14px;overflow-wrap:anywhere}
.crm-card-actions{margin:6px 0;padding:8px;background:var(--work-bg);border-radius:8px}
.crm-card-actions[hidden]{display:none}
.crm-card-actions .crm-client-work{padding:4px 0 0}
.crm-card-actions :is(.crm-client-work,.sale-save-status):empty{display:none}
dialog.crm-dialog .crm-overview{gap:0;margin-top:8px}
dialog.crm-dialog .crm-overview>section{padding:9px 0;border:0;border-top:1px solid var(--work-outline);border-radius:0}
.crm-plan-entry{display:flex;align-items:baseline;justify-content:space-between;gap:4px 12px;padding:4px 0;font-size:.86rem}
.crm-plan-entry>*{min-width:0;overflow-wrap:anywhere}
.crm-plan-entry small{flex-shrink:0;max-width:48%}
dialog.crm-dialog .crm-entry-link{font:inherit;font-weight:650;text-align:start;padding:0;color:var(--work-blue);background:transparent;border:0}
dialog.crm-dialog .crm-entry-link:hover{text-decoration:underline}
dialog.crm-dialog .crm-card-records{margin:6px 0;border-top:1px solid var(--work-outline);padding-top:6px}
.crm-card-records>summary,.crm-deal-editor>summary{cursor:pointer;font-weight:650;padding:7px 0;color:var(--work-blue)}
@media(max-width:600px){
 .crm-plan-entry{display:block}
 .crm-plan-entry small{display:block;max-width:none;margin-top:2px}
 dialog.crm-dialog .crm-card-tools button{min-height:40px}
}

.crm-directory-actions{display:flex;flex-wrap:wrap;gap:6px;padding:8px 0}
#counterpartiesView .crm-status{color:var(--work-muted)}
dialog.rh-import-dialog input[type=file]{background:var(--work-white);color:var(--work-ink);border-color:var(--work-outline);max-width:100%}
.crm-directory-toolbar{display:flex;align-items:end;justify-content:space-between;gap:8px;margin-bottom:8px}
.crm-directory-toolbar>label{max-width:22rem;min-width:0;flex:1}

/* Each cell is a working window in both viewing and editing modes. */
body[data-view=home]:has(#homeView.role-mode) .app-main{overflow-y:auto;overflow-x:hidden}
#homeView.role-mode :is(#reportWindows,#reportWindowTools),#homeView.role-mode>#homeComposer{display:none!important}
#homeView.role-mode .hw-body>#homeComposer{position:static;width:100%;max-width:none;box-sizing:border-box;margin:0}
#homeView.role-mode.has-report-windows{padding-top:8px;min-height:100%}
.hw-toolbar,.hw-controls{display:flex;align-items:center;flex-wrap:wrap;gap:6px;color:var(--work-ink)}
.hw-toolbar{margin:10px 0;padding:8px;background:var(--work-white);border:1px solid var(--work-outline);border-radius:8px}
.hw-toolbar[hidden]{display:none}
.hw-toolbar strong{margin-inline-end:4px;font-size:14px}
.hw-toolbar select{max-width:100%;min-height:34px;background:var(--work-white);color:var(--work-ink);border:1px solid var(--work-input);border-radius:6px;padding:4px 8px}
.hw-note{font-size:13px;color:var(--work-muted)}
.hw-board{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:10px;margin-top:12px}
.hw-cell{min-width:0}.hw-wide,.hw-empty{grid-column:1/-1}
.hw-body>.rh-metrics,.hw-body>.rh-strip,.hw-body>.rh-box{margin:0}
.hw-editing>.hw-cell{border:1px dashed var(--work-focus);border-radius:9px;padding:5px}
.hw-editing>.hw-target{outline:2px solid var(--work-focus)}
.hw-controls{padding:1px 3px 6px;flex-wrap:nowrap}
.hw-controls strong{flex:1;min-width:0;overflow-wrap:anywhere;font-size:13px}
.hw-controls .rh-btn{padding:4px 9px;min-height:32px;text-align:center}
.hw-handle{cursor:grab;user-select:none;padding:2px 6px;color:var(--work-blue);font-size:21px}
#roleHome .hw-body>.report-window{position:relative;inset:auto!important;width:100%!important;height:232px!important;z-index:auto}
#roleHome .report-window-handle{display:none}
#roleHome #saleHome{position:static;width:100%;min-width:0;max-width:none;box-sizing:border-box;padding:12px;background:var(--work-white);color:var(--work-ink)}
#roleHome #saleHome :is(.sale-heading h2,.sale-card-name){color:var(--work-ink)}
@media(max-width:1180px){.hw-board{grid-template-columns:minmax(0,1fr)}}
@media(max-width:760px){.hw-toolbar strong{flex-basis:100%}.hw-controls .rh-btn{min-height:38px}.hw-handle{display:none}}

#roleHome .rh-work-link{display:flex;align-items:center;gap:8px;flex-wrap:nowrap;width:100%;margin:0;padding:10px 0;background:none;color:var(--work-ink);font:inherit;text-align:start;border:0;border-top:1px solid var(--work-outline);border-radius:0;cursor:pointer}
#roleHome .rh-work-client{flex:1;min-width:0;overflow-wrap:anywhere}
#roleHome .rh-work-client strong,.rh-work-arrow{color:var(--work-blue)}
#roleHome .rh-work-link:hover strong{text-decoration:underline}
#roleHome .rh-work-link:focus-visible{outline:2px solid var(--work-focus);outline-offset:-2px}
#roleHome .rh-work-link small{margin-bottom:0}
#roleHome .rh-static-metric,#roleHome .rh-static-metric:hover{cursor:default;border-color:var(--work-outline)}

.notice-types{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,290px),1fr));gap:4px 18px;margin:6px 0 12px}
.notice-types label{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0;padding:4px 0;border-bottom:1px solid #7691a533}
.notice-types select{width:auto;min-width:98px}
#pbxPanel>label:not([hidden]),.pbx-member label{display:grid;gap:.22rem}
#pbxPanel input:not([type=checkbox]){min-width:0;width:100%;box-sizing:border-box}
#pbxPanel>.device-check:not([hidden]){display:flex;align-items:center}
#pbxPanel h3{margin:1rem 0 .4rem}.pbx-member{display:grid;grid-template-columns:minmax(8rem,1.3fr) repeat(2,minmax(7rem,1fr));align-items:center;gap:.5rem;border-top:1px solid #8199aa55;padding:.45rem 0}
#pbxJournal{margin:.5rem 0}.pbx-entry{display:flex;flex-wrap:wrap;gap:.6rem;align-items:center;padding:.45rem 0;border-bottom:1px solid #8199aa55}
#pbxIncoming:not([hidden]){position:fixed;top:4.7rem;right:.8rem;max-width:min(25rem,calc(100vw - 1.6rem));box-sizing:border-box;z-index:2000;padding:.8rem 1rem;border-radius:.7rem;background:#102e47;color:white;border:1px solid #78bad8;box-shadow:0 .4rem 1.8rem #03152655}
#pbxIncoming button{margin:.4rem .3rem 0 0}
@media(max-width:620px){.pbx-member{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr)}.pbx-member strong{grid-column:1/-1}}

.section-bell{display:inline-flex;align-items:center;margin-inline-start:.5em;gap:.22em;padding:.06em .38em;border-radius:1em;font-size:.8em;font-weight:700;vertical-align:middle;white-space:nowrap;color:#fff;background:#a72232}
.topbar-right .unread-trigger:not([hidden]){display:inline-flex;align-items:center;justify-content:center;flex:none;gap:.25rem;min-height:36px;min-width:36px;padding:.3rem .45rem;color:#f0f5fc;border:1px solid #638098;background:#102a41}
.topbar-right .unread-trigger[data-unread=true]{color:white;border-color:#ea8793;background:#a72232}
.unseen-dialog{box-sizing:border-box;width:min(28rem,calc(100vw - 1.4rem));max-height:78vh;max-height:min(85dvh,42rem);overflow:hidden}
.unseen-dialog[open]{display:flex;flex-direction:column;gap:.5rem}
.unseen-dialog .unseen-head,.unseen-dialog .unseen-foot{flex:none}
.unseen-foot:has(button[hidden]){display:none}
#unseenList{flex:auto;min-height:0;overflow-y:auto;overscroll-behavior:contain}
.unseen-agent summary{cursor:pointer;padding:.6rem 0;font-weight:600;overflow-wrap:anywhere}
.unseen-agent{border-bottom:1px solid var(--work-outline)}
.unseen-agent .unseen-entry{padding-inline-start:.7rem}
.unseen-head,.unseen-entry{display:flex;align-items:center;justify-content:space-between;gap:.6rem}
.unseen-head h2,.unseen-dialog h3{margin:.5rem 0}.unseen-dialog h3{font-size:.95rem;margin-top:1rem}
.unseen-entry{width:100%;text-align:left;padding:.45rem .25rem;border:0;border-bottom:1px solid #8199aa55;background:transparent;color:inherit;box-shadow:none}
.unseen-entry small{flex:none}.unseen-entry span{min-width:0;overflow-wrap:anywhere}
#callsList{margin-top:.6rem}.pbx-entry[data-selected]{outline:2px solid #3386b2;outline-offset:-2px;border-radius:.35rem}
body[data-view=calls] .app-main{overflow:auto;background:var(--work-bg);color:var(--work-ink);color-scheme:var(--work-scheme)}
#callsView{box-sizing:border-box;width:100%;max-width:1600px;margin:0 auto;padding:clamp(10px,2vw,24px);color:var(--work-ink)}
#callsView h1{color:var(--work-ink)}
#callsView .rh-box{color:var(--work-ink);background:var(--work-white);border-color:var(--work-outline)}
#callsView .pbx-entry{border-color:var(--work-outline);overflow-wrap:anywhere}
#callsView .muted{color:var(--work-muted)}
#callsView a{color:var(--work-blue)}
#callsView :is(.outline-button,.quiet-button,.back-button){color:var(--work-blue);background:var(--work-tint);border:1px solid var(--work-input);border-radius:7px;min-height:34px;padding:6px 9px;max-width:100%;overflow-wrap:anywhere}
@media(max-width:500px){.topbar-right:has(.unread-trigger:not([hidden])){gap:.15rem}.topbar-right:has(.unread-trigger:not([hidden])) .counterparty-due-shortcut{max-width:22vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}

.ledger-totals{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,15rem),1fr));gap:.65rem;margin:.5rem 0}
.ledger-party{border-bottom:1px solid var(--line,#71809655)}
.ledger-party summary,.ledger-line{display:flex;justify-content:space-between;align-items:baseline;gap:1rem;padding:.65rem .3rem}
.ledger-party summary{cursor:pointer}.ledger-party summary span::before{content:'▸ ';opacity:.7}.ledger-party[open] summary span::before{content:'▾ '}
.ledger-party strong,.ledger-line span:last-child{white-space:nowrap;font-variant-numeric:tabular-nums}
.ledger-line{font-size:.9em;padding-left:1rem}

.sms-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.2rem .8rem;padding:.65rem 0;border-bottom:1px solid currentColor}
.sms-row small{grid-column:1/-1}.sms-row strong{overflow-wrap:anywhere}
#smsPairForm{display:flex;flex-wrap:wrap;align-items:end;gap:.65rem;margin:.75rem 0}
#smsPairForm label,#smsIssued{display:grid;gap:.35rem}#smsIssued[hidden]{display:none}
#smsKey{width:100%;font-family:monospace}.ledger-totals .rh-metric strong{color:inherit}

.stock-coverage summary{cursor:pointer}.stock-coverage[open] small{display:block;margin-top:.25rem;overflow-wrap:anywhere}
