/* DECYGO dashboard — presentation only.
   Every selector is gated by the existing, visible application root.
   Navigation, hidden states, data, event handlers and document exports are unchanged. */

body:has(#appView:not(.hidden)) {
  --ui-page: #f3f4f6;
  --ui-surface: #fff;
  --ui-soft: #f7f9fc;
  --ui-ink: #06245a;
  --ui-copy: #476987;
  --ui-muted: #6a8197;
  --ui-line: #dde5ee;
  --ui-blue: #126fc5;
  --ui-blue-hover: #07539f;
  --ui-tint: #eaf3fe;
  --ui-shadow: 0 4px 20px #06245a05, 0 1px 3px #06245a03;
  --ui-rail: 254px;
  --ui-offset: 288px;
  --ui-gutter: clamp(24px, 3vw, 44px);
  min-width: 0;
  background: var(--ui-page);
}
body[data-theme="dark"]:has(#appView:not(.hidden)) {
  --ui-page: #071324;
  --ui-surface: #101f35;
  --ui-soft: #13253e;
  --ui-ink: #edf4ff;
  --ui-copy: #b8cbe0;
  --ui-muted: #91a9c2;
  --ui-line: #283b53;
  --ui-blue: #378fe0;
  --ui-blue-hover: #50a4ee;
  --ui-tint: #1c3553;
  --ui-shadow: 0 4px 20px #00000012;
}
body:has(#appView:not(.hidden)) #appView {
  --ink: var(--ui-ink);
  --muted: var(--ui-copy);
  --line: var(--ui-line);
  --paper: var(--ui-page);
  --decygo-surface: var(--ui-page);
  --decygo-navy: var(--ui-ink);
  --decygo-ink: var(--ui-ink);
  --decygo-copy: var(--ui-copy);
  --decygo-line: var(--ui-line);
  color: var(--ui-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
body:has(#appView:not(.hidden)) #appView :is(button, input, select, textarea) { font-family: inherit; }
body:has(#appView:not(.hidden)) #appView :is(button, a, input, select, textarea):focus-visible,
body:has(#appView:not(.hidden)) #toolsModal :is(button, input, select, textarea):focus-visible { outline: 3px solid #68aaea; outline-offset: 3px; }
body:has(#appView:not(.hidden)) #appView button:disabled, body:has(#appView:not(.hidden)) #toolsModal button:disabled { opacity: .55; }
body:has(#appView:not(.hidden)) #appView :is(.app-shell, .app-main, .app-content, #homeModule .assistant) { background: var(--ui-page) !important; }
body:has(#appView:not(.hidden)) #appView #homeModule .assistant { padding: 0 0 10px !important; }

/* Floating brand header and existing section navigation. */
body:has(#appView:not(.hidden)) #appView .chat-topbar {
  top: 16px;
  min-height: 66px;
  margin: 16px 20px 0;
  padding: 12px 24px !important;
  gap: 20px;
  border: 1px solid var(--ui-line) !important;
  border-radius: 22px;
  background: var(--ui-surface) !important;
  box-shadow: 0 8px 26px #06245a08 !important;
}
body:has(#appView:not(.hidden)) #appView .chat-brand-logo { width: 118px; height: 37px; }
body[data-theme="dark"]:has(#appView:not(.hidden)) #appView .chat-brand-logo { filter: brightness(0) invert(1); }
body:has(#appView:not(.hidden)) #appView .chat-workspace { padding-left: 22px; border-color: var(--ui-line); }
body:has(#appView:not(.hidden)) #appView .chat-workspace-label { color: var(--ui-muted) !important; font-size: 9px; font-weight: 550; letter-spacing: .1em; }
body:has(#appView:not(.hidden)) #appView .chat-workspace strong { color: var(--ui-ink) !important; font-size: 14px; font-weight: 600; letter-spacing: -.02em; }
body:has(#appView:not(.hidden)) #appView .chat-live { font-size: 11px; font-weight: 500; color: #427e67 !important; }
body:has(#appView:not(.hidden)) #appView .chat-live i { width: 5px; height: 5px; box-shadow: 0 0 0 3px #35b67d12 !important; }
body:has(#appView:not(.hidden)) #appView .chat-account { min-height: 39px; padding: 4px 13px 4px 4px; gap: 9px; border-radius: 40px; border-color: var(--ui-line) !important; background: var(--ui-soft) !important; color: var(--ui-copy) !important; font-weight: 500; }
body:has(#appView:not(.hidden)) #appView .chat-account-avatar { width: 29px; height: 29px; border-radius: 50%; color: #fff !important; background: #126fc5 !important; font-weight: 550; }
body:has(#appView:not(.hidden)) #appView #homeModule .chat-segments { top: 96px; min-height: 49px; margin-top: 16px; padding: 5px var(--ui-gutter) !important; gap: 5px; border: 0 !important; background: var(--ui-page) !important; }
body:has(#appView:not(.hidden)) #appView .chat-segment { min-height: 39px; padding: 0 18px; gap: 8px; border: 1px solid transparent !important; border-radius: 10px !important; color: var(--ui-muted) !important; font-size: 12px; font-weight: 550; }
body:has(#appView:not(.hidden)) #appView .chat-segment.active { color: var(--ui-ink) !important; border-color: var(--ui-line) !important; background: var(--ui-surface) !important; box-shadow: 0 2px 5px #06245a05 !important; }
body:has(#appView:not(.hidden)) #appView .chat-segment:hover { background: var(--ui-tint) !important; color: var(--ui-blue) !important; }
body:has(#appView:not(.hidden)) #appView .chat-segment svg { stroke-width: 1.6; }

/* The current tools menu keeps its controls, order and mobile drawer behavior. */
body:has(#appView:not(.hidden)) #appView #homeModule .chat-tools-rail {
  border: 1px solid #193c63 !important;
  border-radius: 20px !important;
  background: linear-gradient(155deg, #082a59, #071d40 75%) !important;
  box-shadow: 0 10px 26px #06245a0d !important;
  color: #eaf3ff;
}
body:has(#appView:not(.hidden)) #appView #homeModule .chat-tools-rail .chat-tools-rail-head { border-color: #ffffff17; padding: 2px 9px 20px; }
body:has(#appView:not(.hidden)) #appView #homeModule .chat-tools-rail-kicker { color: #8eafd2 !important; font-size: 8px; font-weight: 550; letter-spacing: .13em; }
body:has(#appView:not(.hidden)) #appView #homeModule .chat-tools-rail-title { color: #fff !important; font-size: 22px; font-weight: 550; letter-spacing: -.04em; line-height: 1.2; margin-top: 7px; }
body:has(#appView:not(.hidden)) #appView #homeModule .chat-tools-rail-subtitle { color: #9bb6d5 !important; font-size: 10px; font-weight: 400; line-height: 1.5; margin-top: 7px; }
body:has(#appView:not(.hidden)) #appView #homeModule .chat-tools-rail .chat-tools-cards { gap: 3px; grid-auto-rows: minmax(58px, auto); align-content: start; margin-top: 14px; padding: 0 3px 8px; scroll-snap-type: none; scrollbar-color: #537395 transparent; }
body:has(#appView:not(.hidden)) #appView #homeModule .chat-tools-cards::-webkit-scrollbar-track { background: transparent; }
body:has(#appView:not(.hidden)) #appView #homeModule .chat-tools-cards::-webkit-scrollbar-thumb { background: #537395; border-color: #0b2448; }
body:has(#appView:not(.hidden)) #appView #homeModule .chat-tool-card { min-height: 58px; padding: 10px 10px; gap: 10px; border: 1px solid transparent !important; border-radius: 11px !important; background: transparent !important; box-shadow: none !important; transition: background .16s, border-color .16s; }
body:has(#appView:not(.hidden)) #appView #homeModule .chat-tool-card:hover { background: #ffffff0d !important; border-color: #ffffff12 !important; transform: none; }
body:has(#appView:not(.hidden)) #appView #homeModule .chat-tool-card-icon { width: 31px; height: 31px; border-radius: 9px; background: #98c6ff10 !important; color: #b2d9ff !important; }
body:has(#appView:not(.hidden)) #appView #homeModule .chat-tool-card-icon svg { width: 18px; height: 18px; stroke-width: 1.55; }
body:has(#appView:not(.hidden)) #appView #homeModule .chat-tool-card-copy b { color: #eaf3ff !important; font-size: 12px; font-weight: 500; letter-spacing: -.01em; }
body:has(#appView:not(.hidden)) #appView #homeModule .chat-tool-card-copy small { color: #91accb !important; font-size: 9px; font-weight: 400; line-height: 1.4; }
body:has(#appView:not(.hidden)) #appView #homeModule .chat-tool-card-go { color: #87a8cd !important; font-size: 14px; }
body:has(#appView:not(.hidden)) #appView #homeModule .chat-tool-card.active { background: #fff !important; border-color: #fff !important; }
body:has(#appView:not(.hidden)) #appView #homeModule .chat-tool-card.active .chat-tool-card-copy b { color: #06245a !important; }
body:has(#appView:not(.hidden)) #appView #homeModule .chat-tool-card.active .chat-tool-card-copy small { color: #607890 !important; }
body:has(#appView:not(.hidden)) #appView #homeModule .chat-tool-card.active .chat-tool-card-icon { color: #126fc5 !important; background: #eaf3fe !important; }
body:has(#appView:not(.hidden)) #appView #homeModule .chat-tool-card.active .chat-tool-card-go { color: #126fc5 !important; }
body:has(#appView:not(.hidden)) #appView #homeModule .chat-tools-sidebar-close { border-color: #ffffff29 !important; background: #ffffff0d !important; color: #fff !important; }

/* Conversation header: the same navy stage and bright type as the public demo. */
body:has(#appView:not(.hidden)) #appView #homeModule .chat-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 215px;
  column-gap: 28px;
  align-items: center;
  padding: 30px 34px !important;
  border: 1px solid #183c69;
  border-radius: 20px;
  background: linear-gradient(115deg, #071d40, #082a59) !important;
  color: #edf5ff;
}
body:has(#appView:not(.hidden)) #appView .chat-intro > :is(.kicker, h3, p) { grid-column: 1; }
body:has(#appView:not(.hidden)) #appView .chat-intro .kicker { margin: 0 0 12px; color: #97b9df !important; font-size: 9px; font-weight: 550; letter-spacing: .12em; }
body:has(#appView:not(.hidden)) #appView .chat-intro h3 { max-width: 630px; margin: 0 0 13px; color: #fff !important; font-size: clamp(30px, 3.3vw, 43px); font-weight: 550; line-height: 1.06; letter-spacing: -.052em; }
body:has(#appView:not(.hidden)) #appView .chat-intro p { max-width: 560px; margin: 0; color: #b9cfe8 !important; font-size: 13px; line-height: 1.65; }
body:has(#appView:not(.hidden)) #appView .voice-launcher { grid-column: 2; grid-row: 1 / span 3; display: flex; flex-direction: column; gap: 12px; width: 100%; min-height: 0; margin: 0; padding: 5px 0 5px 25px; border: 0 !important; border-left: 1px solid #ffffff1a !important; border-radius: 0; background: transparent !important; box-shadow: none !important; text-align: center; }
body:has(#appView:not(.hidden)) #appView .voice-launcher-copy { gap: 5px; }
body:has(#appView:not(.hidden)) #appView .voice-launcher-copy strong { color: #f1f7ff !important; font-size: 13px; font-weight: 500; }
body:has(#appView:not(.hidden)) #appView .voice-launcher-copy span { max-width: 190px; color: #9dbadd !important; font-size: 10px; font-weight: 400; line-height: 1.5; }
body:has(#appView:not(.hidden)) #appView .voice-orb-launcher { border-radius: 50%; }
body:has(#appView:not(.hidden)) #appView .voice-orb { --voice-level: inherit; width: 83px; height: 83px; overflow: hidden; isolation: isolate; background: radial-gradient(circle at 26% 20%, #d5f1ff, #459fea 32%, #0864cf 59%, #052d69 87%) !important; box-shadow: inset 0 0 0 1px #d9f2ff70, inset -6px -7px 14px #06296160, 0 0 0 8px #7cc8ff09, 0 8px 26px #00132d40 !important; transition: transform .25s, box-shadow .25s; }
body:has(#appView:not(.hidden)) #appView .voice-orb::before { content: ""; display: block !important; position: absolute; inset: -30%; border: 0; border-radius: 50%; background: conic-gradient(from 35deg, #0348ac, #72d8ff 74deg, #edfaff 107deg, #2c8ced 150deg, #063f9b 192deg, #117cdb 253deg, #aadfff 290deg, #0348ac); filter: blur(7px); animation: dashboard-orb-drift 5s linear infinite paused; }
body:has(#appView:not(.hidden)) #appView .voice-orb::after { content: ""; display: block !important; position: absolute; width: 140%; height: 74%; inset: 5% auto auto -23%; border: 6px solid transparent; border-bottom: 5px solid #d5f5ffa8; border-left: 4px solid #e2f8ff70; border-radius: 50%; transform: rotate(-32deg); opacity: 1; filter: blur(1px); animation: dashboard-orb-ribbon 2.8s ease-in-out infinite paused; }
body:has(#appView:not(.hidden)) #appView .voice-orb-core { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; border-radius: 50%; background: radial-gradient(ellipse at 28% 16%, #ffffffaa, #ffffff20 20%, transparent 42%), radial-gradient(ellipse at 75% 90%, #03245191, transparent 61%); box-shadow: inset 0 0 1px 1px #ffffff70; }
body:has(#appView:not(.hidden)) #appView .voice-orb-launcher:hover .voice-orb { transform: scale(1.045); }
body:has(#appView:not(.hidden)) #appView :is(.is-recording, .is-speaking, .is-listening, .is-processing) .voice-orb::before,
body:has(#appView:not(.hidden)) #appView :is(.is-recording, .is-speaking, .is-listening, .is-processing) .voice-orb::after { animation-play-state: running; }
body:has(#appView:not(.hidden)) #appView .voice-stage { z-index: 140; background: #04172d99; backdrop-filter: blur(14px); }
body:has(#appView:not(.hidden)) #appView .voice-stage-card { max-width: 440px; padding: 43px 30px 28px; border: 1px solid var(--ui-line); border-radius: 24px; background: var(--ui-surface); color: var(--ui-ink); box-shadow: 0 30px 100px #00000036; }
body:has(#appView:not(.hidden)) #appView .voice-stage-orb { width: 164px; height: 164px; margin-bottom: 30px; box-shadow: inset 0 0 0 1px #d9f2ff70, 0 0 0 calc(10px + var(--voice-level, 0) * 15px) #258bf01a, 0 14px 34px #126fc52b !important; }
body:has(#appView:not(.hidden)) #appView .voice-stage-orb .voice-orb-core { width: 100%; height: 100%; }
body:has(#appView:not(.hidden)) #appView .voice-stage-title { font-size: 27px; font-weight: 550; letter-spacing: -.045em; }
body:has(#appView:not(.hidden)) #appView .voice-stage-hint { color: var(--ui-copy); font-size: 13px; line-height: 1.6; }
body:has(#appView:not(.hidden)) #appView .voice-live-transcript { color: var(--ui-blue); font-size: 15px; font-weight: 500; }
body:has(#appView:not(.hidden)) #appView .voice-stop { min-height: 44px; padding: 11px 19px; border-color: var(--ui-line); border-radius: 12px; color: var(--ui-ink); background: var(--ui-soft); font-size: 12px; font-weight: 550; }
@keyframes dashboard-orb-drift { to { transform: rotate(360deg); } }
@keyframes dashboard-orb-ribbon { 0%, 100% { transform: rotate(-32deg) translateY(0); } 50% { transform: rotate(8deg) translateY(16%); } }

/* Conversation and composer, including proposals and attachments. */
body:has(#appView:not(.hidden)) #appView #homeModule .chat-thread { flex: 1 0 auto; min-height: 220px !important; padding: 24px var(--ui-gutter) 28px !important; background: transparent !important; }
body:has(#appView:not(.hidden)) #appView .chat-day { margin-bottom: 20px; color: var(--ui-muted); font-size: 9px; font-weight: 500; letter-spacing: .13em; }
body:has(#appView:not(.hidden)) #appView .chat-message { width: min(100%, 880px); max-width: 100%; gap: 12px; align-items: flex-start; margin: 0 auto 20px; }
body:has(#appView:not(.hidden)) #appView .chat-avatar { width: 33px; height: 33px; flex: 0 0 33px; border: 1px solid var(--ui-line); border-radius: 11px; color: var(--ui-blue) !important; background: var(--ui-surface) !important; font-size: 12px; font-weight: 600; }
body:has(#appView:not(.hidden)) #appView .chat-bubble { max-width: min(750px, calc(100% - 46px)); padding: 19px 21px; border: 1px solid var(--ui-line) !important; border-radius: 0 17px 17px 17px !important; background: var(--ui-surface) !important; color: var(--ui-ink) !important; box-shadow: var(--ui-shadow) !important; font-size: 14px; line-height: 1.65; }
body:has(#appView:not(.hidden)) #appView .chat-bubble p { color: inherit !important; font-size: inherit; line-height: inherit; }
body:has(#appView:not(.hidden)) #appView .chat-bubble strong { color: inherit !important; font-weight: 600; }
body:has(#appView:not(.hidden)) #appView .user-message .chat-bubble { border-color: #126fc5 !important; border-radius: 17px 0 17px 17px !important; background: #126fc5 !important; color: #fff !important; }
body:has(#appView:not(.hidden)) #appView .chat-meta { margin-top: 13px; color: var(--ui-muted) !important; font-size: 9px; font-weight: 400; }
body:has(#appView:not(.hidden)) #appView .user-message .chat-meta { color: #c7e3ff !important; }
body:has(#appView:not(.hidden)) #appView :is(.chat-suggestions button, .chat-quick-row button) { min-height: 35px; padding: 8px 12px; border: 1px solid var(--ui-line) !important; border-radius: 9px !important; background: var(--ui-soft) !important; color: var(--ui-copy) !important; font-size: 11px; font-weight: 500; }
body:has(#appView:not(.hidden)) #appView :is(.chat-suggestions button, .chat-quick-row button):hover { background: var(--ui-tint) !important; color: var(--ui-blue) !important; border-color: #92bce1 !important; }
body:has(#appView:not(.hidden)) #appView #homeModule .chat-composer-wrap { margin-top: auto; padding: 14px var(--ui-gutter) 18px !important; border: 0 !important; background: var(--ui-page) !important; }
body:has(#appView:not(.hidden)) #appView .chat-composer { min-height: 65px; max-width: 920px; padding: 10px; gap: 8px; border: 1px solid var(--ui-line) !important; border-radius: 18px !important; background: var(--ui-surface) !important; box-shadow: 0 8px 30px #06245a0b !important; }
body:has(#appView:not(.hidden)) #appView .chat-composer:focus-within { border-color: #6aa9df !important; box-shadow: 0 0 0 3px #126fc511, 0 8px 30px #06245a09 !important; }
body:has(#appView:not(.hidden)) #appView .chat-composer textarea { min-height: 43px; padding: 12px 7px; background: transparent; color: var(--ui-ink) !important; font-size: 14px; line-height: 1.45; }
body:has(#appView:not(.hidden)) #appView .chat-composer textarea::placeholder { color: var(--ui-muted) !important; }
body:has(#appView:not(.hidden)) #appView .chat-tool { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; border: 1px solid var(--ui-line) !important; border-radius: 12px !important; background: var(--ui-soft) !important; color: var(--ui-copy) !important; }
body:has(#appView:not(.hidden)) #appView .chat-tool svg { width: 19px; height: 19px; stroke-width: 1.55; }
body:has(#appView:not(.hidden)) #appView .chat-tool:hover { color: var(--ui-blue) !important; background: var(--ui-tint) !important; }
body:has(#appView:not(.hidden)) #appView .chat-send { width: 43px; height: 43px; flex: 0 0 43px; border-radius: 12px !important; background: #126fc5 !important; font-size: 21px; font-weight: 500; }
body:has(#appView:not(.hidden)) #appView .chat-send:hover { background: #07539f !important; }
body:has(#appView:not(.hidden)) #appView :is(.chat-helper, .chat-quick-row) { max-width: 920px; }
body:has(#appView:not(.hidden)) #appView .chat-helper { margin-top: 10px; color: var(--ui-muted) !important; font-size: 10px; line-height: 1.5; }
body:has(#appView:not(.hidden)) #appView .chat-quick-row { margin-top: 11px; gap: 7px; }
body:has(#appView:not(.hidden)) #appView .chat-understood { margin-top: 17px; padding: 15px; gap: 11px; border-color: var(--ui-line); border-radius: 12px; background: var(--ui-soft); }
body:has(#appView:not(.hidden)) #appView .chat-understood-row { color: var(--ui-muted); font-size: 12px; line-height: 1.5; }
body:has(#appView:not(.hidden)) #appView .chat-understood-row b { color: var(--ui-ink); font-size: 12px; font-weight: 550; }
body:has(#appView:not(.hidden)) #appView .chat-actions { margin-top: 15px; gap: 9px; flex-wrap: wrap; }
body:has(#appView:not(.hidden)) #appView .chat-actions button { min-height: 40px; padding: 10px 14px; border-radius: 9px; font-size: 12px; font-weight: 550; }
body:has(#appView:not(.hidden)) #appView .chat-actions .chat-edit { color: var(--ui-copy); background: var(--ui-tint); }
body:has(#appView:not(.hidden)) #appView .chat-actions .chat-confirm { background: #126fc5; color: #fff; }
body:has(#appView:not(.hidden)) #appView .chat-attachment { border-color: var(--ui-line); background: var(--ui-soft); border-radius: 12px; padding: 12px; }
body:has(#appView:not(.hidden)) #appView .chat-attachment-icon { color: var(--ui-blue); background: var(--ui-tint); border-radius: 9px; }
body:has(#appView:not(.hidden)) #appView .chat-attachment-name { color: var(--ui-ink); font-weight: 550; }
body:has(#appView:not(.hidden)) #appView .chat-attachment-size { color: var(--ui-muted); }

/* Summary, sales, expenses, collections and agenda. */
body:has(#appView:not(.hidden)) #appView #homeModule .chat-segment-panel { padding: 29px var(--ui-gutter) 32px !important; background: transparent !important; }
body:has(#appView:not(.hidden)) #appView .chat-segment-panel h3 { color: var(--ui-ink) !important; font-size: clamp(29px, 3.1vw, 39px); font-weight: 550; letter-spacing: -.05em; }
body:has(#appView:not(.hidden)) #appView .chat-segment-panel > p { margin: 10px 0 28px; color: var(--ui-copy) !important; font-size: 13px; line-height: 1.6; }
body:has(#appView:not(.hidden)) #appView .chat-panel-stats { gap: 15px; margin-bottom: 24px; }
body:has(#appView:not(.hidden)) #appView .chat-panel-stat { min-width: 0; padding: 24px; border: 1px solid var(--ui-line) !important; border-radius: 15px !important; background: var(--ui-surface) !important; box-shadow: var(--ui-shadow) !important; }
body:has(#appView:not(.hidden)) #appView .chat-panel-stat span { color: var(--ui-copy); font-size: 12px; }
body:has(#appView:not(.hidden)) #appView .chat-panel-stat strong { margin-top: 18px; color: var(--ui-ink); font-size: clamp(26px, 2.8vw, 36px); font-weight: 550; line-height: 1.2; letter-spacing: -.045em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
body:has(#appView:not(.hidden)) #appView .chat-panel-stat:first-child { background: #082a59 !important; border-color: #082a59 !important; box-shadow: 0 7px 20px #06245a0d !important; }
body:has(#appView:not(.hidden)) #appView .chat-panel-stat:first-child span { color: #aac9ea; }
body:has(#appView:not(.hidden)) #appView .chat-panel-stat:first-child strong { color: #fff; }
body:has(#appView:not(.hidden)) #appView .chat-panel-list { padding: 10px 24px 8px; border: 1px solid var(--ui-line) !important; border-radius: 16px !important; background: var(--ui-surface) !important; box-shadow: var(--ui-shadow) !important; }
body:has(#appView:not(.hidden)) #appView .chat-panel-list h4 { margin: 12px 0 15px; color: var(--ui-ink); font-size: 14px; font-weight: 550; }
body:has(#appView:not(.hidden)) #appView .chat-panel-record { padding: 17px 0; gap: 12px; border-color: var(--ui-line); }
body:has(#appView:not(.hidden)) #appView .record-icon { width: 34px; height: 34px; flex-basis: 34px; border-radius: 10px; color: var(--ui-blue); background: var(--ui-tint); }
body:has(#appView:not(.hidden)) #appView .chat-panel-record .record-info b { color: var(--ui-ink); font-size: 13px; font-weight: 500; }
body:has(#appView:not(.hidden)) #appView .chat-panel-record .record-info small { margin-top: 5px; color: var(--ui-muted); font-size: 11px; }
body:has(#appView:not(.hidden)) #appView .chat-panel-record .record-amount { color: var(--ui-ink); font-size: 14px; font-weight: 550; font-variant-numeric: tabular-nums; white-space: nowrap; }
body:has(#appView:not(.hidden)) #appView .chat-back-button { min-height: 42px; margin-top: 22px; padding: 10px 14px; border: 1px solid var(--ui-line); border-radius: 10px; color: var(--ui-copy); background: var(--ui-surface); font-size: 12px; font-weight: 500; }
body:has(#appView:not(.hidden)) #appView .chat-back-button:hover { background: var(--ui-tint); color: var(--ui-blue); }
body:has(#appView:not(.hidden)) #appView :is(.badge, .status-pill) { border-radius: 6px; padding: 5px 8px; font-size: 10px; font-weight: 550; }
body:has(#appView:not(.hidden)) #appView .empty-state { padding: 38px 15px; color: var(--ui-muted); font-size: 13px; line-height: 1.7; }

/* Existing standalone tools, forms and document workspace. */
body:has(#appView:not(.hidden)) #appView .business-tools-view { padding: 26px clamp(18px, 4vw, 60px) 50px !important; background: var(--ui-page) !important; }
body:has(#appView:not(.hidden)) #appView .workspace-page { width: min(100%, 1260px); }
body:has(#appView:not(.hidden)) #appView .workspace-head { align-items: center; padding: 27px 30px; margin-bottom: 24px; gap: 24px; border: 1px solid var(--ui-line); border-radius: 20px; background: var(--ui-surface); box-shadow: var(--ui-shadow); }
body:has(#appView:not(.hidden)) #appView .workspace-head .kicker { margin-bottom: 10px; color: var(--ui-blue); font-size: 10px; font-weight: 550; letter-spacing: .08em; }
body:has(#appView:not(.hidden)) #appView .workspace-head h1 { margin: 0 0 10px; font-size: clamp(29px, 3.2vw, 39px); font-weight: 550; line-height: 1.1; color: var(--ui-ink) !important; letter-spacing: -.048em; }
body:has(#appView:not(.hidden)) #appView .workspace-head p { color: var(--ui-copy) !important; font-size: 13px; line-height: 1.6; }
body:has(#appView:not(.hidden)) #appView .workspace-head-actions { max-width: 54%; gap: 8px; }
body:has(#appView:not(.hidden)) #appView .workspace-hero { padding: 32px 35px; margin-bottom: 25px; border: 1px solid #183c69; border-radius: 19px !important; background: linear-gradient(115deg, #071d40, #082a59) !important; box-shadow: none !important; }
body:has(#appView:not(.hidden)) #appView .workspace-hero .kicker { color: #97b9df; font-size: 9px; font-weight: 550; letter-spacing: .11em; }
body:has(#appView:not(.hidden)) #appView .workspace-hero h2 { max-width: 650px; margin: 12px 0; color: #fff; font-size: clamp(27px, 3vw, 37px); font-weight: 550; letter-spacing: -.045em; line-height: 1.1; }
body:has(#appView:not(.hidden)) #appView .workspace-hero p { max-width: 710px; color: #b9cfe8; font-size: 13px; line-height: 1.7; }
body:has(#appView:not(.hidden)) #appView .workspace-stat-row { gap: 0; padding: 5px 0 24px; margin-bottom: 24px; border-bottom: 1px solid var(--ui-line); }
body:has(#appView:not(.hidden)) #appView .workspace-stat { padding: 8px 25px; border: 0 !important; border-right: 1px solid var(--ui-line) !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; }
body:has(#appView:not(.hidden)) #appView .workspace-stat:first-child { padding-left: 0; }
body:has(#appView:not(.hidden)) #appView .workspace-stat:last-child { border-right: 0 !important; }
body:has(#appView:not(.hidden)) #appView .workspace-stat strong { color: var(--ui-ink); font-size: 31px; font-weight: 550; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
body:has(#appView:not(.hidden)) #appView .workspace-stat span { margin-top: 9px; color: var(--ui-copy); font-size: 11px; }
body:has(#appView:not(.hidden)) #appView .workspace-grid { gap: 16px; margin: 0 0 25px; }
body:has(#appView:not(.hidden)) #appView .workspace-card { padding: 25px; min-height: 214px; border: 1px solid var(--ui-line) !important; border-radius: 16px !important; background: var(--ui-surface) !important; box-shadow: var(--ui-shadow) !important; text-align: left; transition: border-color .18s, box-shadow .18s; }
body:has(#appView:not(.hidden)) #appView .workspace-card:hover { transform: none; border-color: #8cb7dc !important; box-shadow: 0 7px 20px #06245a0a !important; }
body:has(#appView:not(.hidden)) #appView .workspace-card-icon { width: 38px; height: 38px; margin-bottom: 23px; border-radius: 11px; color: var(--ui-blue) !important; background: var(--ui-tint) !important; }
body:has(#appView:not(.hidden)) #appView .workspace-card-icon svg { stroke-width: 1.55; }
body:has(#appView:not(.hidden)) #appView .workspace-card h3 { color: var(--ui-ink) !important; font-size: 17px; font-weight: 550; letter-spacing: -.025em; }
body:has(#appView:not(.hidden)) #appView .workspace-card p { color: var(--ui-copy) !important; font-size: 12px; line-height: 1.6; }
body:has(#appView:not(.hidden)) #appView .workspace-card small { color: var(--ui-blue); font-size: 11px; font-weight: 550; }
body:has(#appView:not(.hidden)) #appView :is(.workspace-panel, .calculator-card, .panel) { padding: 26px; border: 1px solid var(--ui-line) !important; border-radius: 17px !important; background: var(--ui-surface) !important; box-shadow: var(--ui-shadow) !important; }
body:has(#appView:not(.hidden)) #appView .workspace-panel-head { margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--ui-line); }
body:has(#appView:not(.hidden)) #appView :is(.workspace-panel-head h3, .panel-head b) { color: var(--ui-ink) !important; font-size: 17px; font-weight: 550; letter-spacing: -.025em; }
body:has(#appView:not(.hidden)) #appView :is(.workspace-panel-head span, .panel-head span) { color: var(--ui-muted) !important; font-size: 11px; font-weight: 400; line-height: 1.5; }
body:has(#appView:not(.hidden)) #appView .workspace-toolbar { gap: 14px; margin-bottom: 20px; }
body:has(#appView:not(.hidden)) #appView .ai-badge, body:has(#appView:not(.hidden)) #toolsModal .ai-badge { border-color: var(--ui-line); background: var(--ui-tint); color: var(--ui-blue); font-size: 10px; font-weight: 500; }
body:has(#appView:not(.hidden)) #appView .workspace-btn, body:has(#appView:not(.hidden)) #toolsModal .workspace-btn { min-height: 42px; padding: 11px 16px; border: 1px solid #126fc5 !important; border-radius: 10px !important; background: #126fc5 !important; color: #fff !important; box-shadow: 0 2px 4px #126fc512 !important; font-size: 12px; font-weight: 550; line-height: 1.4; }
body:has(#appView:not(.hidden)) #appView .workspace-btn:hover, body:has(#appView:not(.hidden)) #toolsModal .workspace-btn:hover { background: #07539f !important; border-color: #07539f !important; transform: none; }
body:has(#appView:not(.hidden)) #appView :is(.workspace-btn.secondary, .workspace-btn.ghost), body:has(#appView:not(.hidden)) #toolsModal :is(.workspace-btn.secondary, .workspace-btn.ghost) { background: var(--ui-surface) !important; color: var(--ui-copy) !important; border-color: var(--ui-line) !important; box-shadow: none !important; }
body:has(#appView:not(.hidden)) #appView :is(.workspace-btn.secondary, .workspace-btn.ghost):hover, body:has(#appView:not(.hidden)) #toolsModal :is(.workspace-btn.secondary, .workspace-btn.ghost):hover { color: var(--ui-blue) !important; background: var(--ui-tint) !important; border-color: #8db5dc !important; }
body:has(#appView:not(.hidden)) #appView .workspace-table-wrap { border: 1px solid var(--ui-line) !important; border-radius: 11px; }
body:has(#appView:not(.hidden)) #appView .workspace-table { font-variant-numeric: tabular-nums; }
body:has(#appView:not(.hidden)) #appView .workspace-table th { padding: 13px 15px; border-color: var(--ui-line); background: var(--ui-soft) !important; color: var(--ui-muted) !important; font-size: 10px; font-weight: 550; letter-spacing: .06em; }
body:has(#appView:not(.hidden)) #appView .workspace-table td { padding: 17px 15px; border-color: var(--ui-line) !important; color: var(--ui-copy) !important; font-size: 12px; line-height: 1.5; }
body:has(#appView:not(.hidden)) #appView .workspace-table td b { color: var(--ui-ink); font-size: 13px; font-weight: 550; }
body:has(#appView:not(.hidden)) #appView .workspace-table td small { margin-top: 4px; color: var(--ui-muted); font-size: 10px; }
body:has(#appView:not(.hidden)) #appView .workspace-table tbody tr:hover { background: var(--ui-soft); }
body:has(#appView:not(.hidden)) #appView .workspace-table-actions { gap: 5px; }
body:has(#appView:not(.hidden)) #appView .table-action { min-height: 32px; padding: 7px 9px; border: 1px solid var(--ui-line); border-radius: 7px; background: var(--ui-surface); color: var(--ui-blue); font-size: 10px; font-weight: 500; }
body:has(#appView:not(.hidden)) #appView .table-action:hover { border-color: #8db5dc; background: var(--ui-tint); }
body:has(#appView:not(.hidden)) #appView .workspace-empty { padding: 38px 20px; color: var(--ui-muted) !important; font-size: 13px; line-height: 1.7; }
body:has(#appView:not(.hidden)) #appView .workspace-empty strong { margin-bottom: 8px; color: var(--ui-ink); font-size: 17px; font-weight: 500; letter-spacing: -.025em; }
body:has(#appView:not(.hidden)) #appView .workspace-form-grid, body:has(#appView:not(.hidden)) #toolsModal .workspace-form-grid { gap: 20px 22px; }
body:has(#appView:not(.hidden)) #appView .workspace-field, body:has(#appView:not(.hidden)) #toolsModal .workspace-field { gap: 8px; }
body:has(#appView:not(.hidden)) #appView .workspace-field label, body:has(#appView:not(.hidden)) #toolsModal .workspace-field label { color: var(--ui-copy); font-size: 12px; font-weight: 550; }
body:has(#appView:not(.hidden)) #appView .workspace-field :is(input, select, textarea), body:has(#appView:not(.hidden)) #toolsModal .workspace-field :is(input, select, textarea) { min-height: 45px; padding: 12px 13px; border: 1px solid var(--ui-line) !important; border-radius: 9px !important; background: var(--ui-soft) !important; color: var(--ui-ink) !important; font-size: 14px; font-weight: 400; line-height: 1.45; }
body:has(#appView:not(.hidden)) #appView .workspace-field :is(input, textarea)::placeholder, body:has(#appView:not(.hidden)) #toolsModal .workspace-field :is(input, textarea)::placeholder { color: var(--ui-muted); opacity: .85; }
body:has(#appView:not(.hidden)) #appView .workspace-field :is(input, select, textarea):focus, body:has(#appView:not(.hidden)) #toolsModal .workspace-field :is(input, select, textarea):focus { border-color: #6aa9df !important; background: var(--ui-surface) !important; box-shadow: 0 0 0 3px #126fc511 !important; }
body:has(#appView:not(.hidden)) #appView .workspace-field input[type="file"] { padding: 9px; }
body:has(#appView:not(.hidden)) #appView .workspace-field input::file-selector-button { margin-right: 12px; padding: 7px 10px; border: 0; border-radius: 5px; background: var(--ui-tint); color: var(--ui-blue); }
body:has(#appView:not(.hidden)) #appView .workspace-field-help, body:has(#appView:not(.hidden)) #toolsModal .workspace-field-help { color: var(--ui-muted); font-size: 11px; line-height: 1.55; }
body:has(#appView:not(.hidden)) #appView .workspace-form-actions, body:has(#appView:not(.hidden)) #toolsModal .workspace-form-actions { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--ui-line); }
body:has(#appView:not(.hidden)) #appView .calculator-grid { gap: 20px; }
body:has(#appView:not(.hidden)) #appView .calculator-card h3 { color: var(--ui-ink) !important; font-size: 22px; font-weight: 550; letter-spacing: -.035em; }
body:has(#appView:not(.hidden)) #appView .calculator-card > p { min-height: 41px; margin: 9px 0 22px; color: var(--ui-copy) !important; font-size: 12px; line-height: 1.6; }
body:has(#appView:not(.hidden)) #appView .calculator-result { margin-top: 24px; padding: 20px; border: 1px solid var(--ui-line); border-radius: 12px; background: var(--ui-tint); }
body:has(#appView:not(.hidden)) #appView .calculator-result strong { color: var(--ui-ink); font-size: 30px; font-weight: 550; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
body:has(#appView:not(.hidden)) #appView .calculator-result span { margin-top: 7px; color: var(--ui-copy); font-size: 11px; line-height: 1.5; }
body:has(#appView:not(.hidden)) #appView .calculator-breakdown { gap: 10px; margin-top: 18px; padding-top: 15px; border-color: var(--ui-line); color: var(--ui-copy); font-size: 11px; }
body:has(#appView:not(.hidden)) #appView .calculator-breakdown b { color: var(--ui-ink); font-weight: 550; }

/* Dialogs remain attached to the existing body-level modal. */
body:has(#appView:not(.hidden)) #toolsModal { background: #04172d99; backdrop-filter: blur(9px); }
body:has(#appView:not(.hidden)) #toolsModal .tools-modal-card { width: min(820px, 100%); border: 1px solid var(--ui-line) !important; border-radius: 23px !important; background: var(--ui-surface) !important; box-shadow: 0 30px 90px #00000030 !important; }
body:has(#appView:not(.hidden)) #toolsModal .tools-modal-head { padding: 25px 29px; border-color: var(--ui-line); background: var(--ui-surface); }
body:has(#appView:not(.hidden)) #toolsModal .tools-modal-head h2 { color: var(--ui-ink) !important; font-size: 27px; font-weight: 550; line-height: 1.15; letter-spacing: -.045em; }
body:has(#appView:not(.hidden)) #toolsModal .tools-modal-head p { color: var(--ui-copy) !important; font-size: 12px; line-height: 1.6; }
body:has(#appView:not(.hidden)) #toolsModal .tools-modal-close { width: 36px; height: 36px; flex: 0 0 36px; border: 1px solid var(--ui-line); border-radius: 50%; color: var(--ui-copy) !important; background: var(--ui-soft) !important; }
body:has(#appView:not(.hidden)) #toolsModal .tools-modal-body { padding: 27px 29px; }
body:has(#appView:not(.hidden)) #toolsModal .tools-modal-footer { padding: 18px 29px; border-color: var(--ui-line); background: var(--ui-soft); gap: 9px; }
body:has(#appView:not(.hidden)) #toolsModal .file-drop { padding: 35px 22px; border: 1px dashed #83aed5; border-radius: 15px; color: var(--ui-ink); background: var(--ui-tint); }
body:has(#appView:not(.hidden)) #toolsModal .file-drop strong { color: var(--ui-ink); font-size: 15px; font-weight: 550; }
body:has(#appView:not(.hidden)) #toolsModal .file-drop span { color: var(--ui-copy); font-size: 12px; line-height: 1.6; }
body:has(#appView:not(.hidden)) #toolsModal .analysis-result { color: var(--ui-ink); background: var(--ui-soft); border-color: var(--ui-line); border-radius: 12px; font-size: 14px; line-height: 1.7; }
/* Paper previews retain paper colors in either theme, including inline document text. */
body:has(#appView:not(.hidden)) #appView .document-preview, body:has(#appView:not(.hidden)) #toolsModal .document-preview { padding: 26px; border: 1px solid #d9e3ed !important; border-radius: 13px !important; color: #183b60; background: #fff !important; box-shadow: none !important; }
body:has(#appView:not(.hidden)) #appView .document-preview-brand, body:has(#appView:not(.hidden)) #toolsModal .document-preview-brand { color: #06245a; font-size: 18px; font-weight: 600; }
body:has(#appView:not(.hidden)) #appView .document-preview :is(th, td), body:has(#appView:not(.hidden)) #toolsModal .document-preview :is(th, td) { padding: 11px 5px; font-size: 11px; }
body:has(#appView:not(.hidden)) #appView .document-preview-totals, body:has(#appView:not(.hidden)) #toolsModal .document-preview-totals { gap: 9px; font-size: 11px; }
body:has(#appView:not(.hidden)) #appView .document-preview-total, body:has(#appView:not(.hidden)) #toolsModal .document-preview-total { font-size: 15px; }

/* Responsive presentation; existing menu and visibility state classes are kept. */
@media (min-width: 701px) {
  body:has(#appView:not(.hidden)) #appView #homeModule .chat-tools-rail { top: 101px !important; bottom: 18px !important; left: 20px !important; width: var(--ui-rail) !important; max-width: var(--ui-rail) !important; height: calc(100dvh - 119px) !important; padding: 22px 12px 12px !important; }
  body:has(#appView:not(.hidden)) #appView #homeModule :is(.chat-segments, .chat-thread, .chat-composer-wrap, .chat-segment-panel) { margin-left: var(--ui-offset) !important; width: calc(100% - var(--ui-offset)) !important; }
  body:has(#appView:not(.hidden)) #appView #homeModule .chat-intro { width: calc(100% - var(--ui-offset) - 2 * var(--ui-gutter)) !important; margin: 22px var(--ui-gutter) 0 calc(var(--ui-offset) + var(--ui-gutter)) !important; }
}
@media (min-width: 701px) and (max-width: 1060px) {
  body:has(#appView:not(.hidden)) { --ui-rail: 222px; --ui-offset: 251px; --ui-gutter: 24px; }
  body:has(#appView:not(.hidden)) #appView #homeModule .chat-tools-rail { left: 15px !important; padding: 19px 9px 10px !important; }
  body:has(#appView:not(.hidden)) #appView #homeModule .chat-tool-card { gap: 8px; padding: 10px 8px; }
  body:has(#appView:not(.hidden)) #appView #homeModule .chat-intro { grid-template-columns: 1fr; padding: 28px !important; }
  body:has(#appView:not(.hidden)) #appView .voice-launcher { grid-column: 1; grid-row: auto; flex-direction: row; gap: 20px; justify-content: flex-start; margin-top: 24px; padding: 0; border: 0 !important; text-align: left; }
  body:has(#appView:not(.hidden)) #appView .voice-orb { width: 61px; height: 61px; }
  body:has(#appView:not(.hidden)) #appView .voice-launcher-copy span { max-width: 250px; }
  body:has(#appView:not(.hidden)) #appView .voice-stage-orb { width: 150px; height: 150px; }
  body:has(#appView:not(.hidden)) #appView .chat-panel-stat { padding: 19px; }
  body:has(#appView:not(.hidden)) #appView .chat-panel-stats { grid-template-columns: 1fr; }
  body:has(#appView:not(.hidden)) #appView .chat-panel-stat { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
  body:has(#appView:not(.hidden)) #appView .chat-panel-stat strong { margin: 0; font-size: 27px; }
  body:has(#appView:not(.hidden)) #appView .workspace-head { align-items: flex-start; }
  body:has(#appView:not(.hidden)) #appView .workspace-head-actions { max-width: 100%; }
}
@media (max-width: 900px) {
  body:has(#appView:not(.hidden)) #appView .workspace-head { flex-direction: column; align-items: flex-start; }
  body:has(#appView:not(.hidden)) #appView .workspace-head-actions { max-width: 100%; }
}
@media (max-width: 700px) {
  body:has(#appView:not(.hidden)) { --ui-gutter: 16px; }
  body:has(#appView:not(.hidden)) #appView #homeModule .assistant { padding-bottom: 0 !important; }
  body:has(#appView:not(.hidden)) #appView .chat-topbar { top: 8px; min-height: 61px; margin: 8px 10px 0; padding: 10px 13px !important; border-radius: 17px; gap: 12px; }
  body:has(#appView:not(.hidden)) #appView .chat-brand-logo { width: 94px; height: 31px; }
  body:has(#appView:not(.hidden)) #appView .chat-workspace { padding-left: 12px; margin-left: auto; }
  body:has(#appView:not(.hidden)) #appView .chat-workspace strong { max-width: 32vw; font-size: 12px; }
  body:has(#appView:not(.hidden)) #appView .chat-account { min-height: 32px; padding: 3px; }
  body:has(#appView:not(.hidden)) #appView .chat-account-avatar { width: 26px; height: 26px; }
  body:has(#appView:not(.hidden)) #appView #homeModule .chat-segments { top: 77px; margin-top: 10px; padding: 4px 16px !important; min-height: 47px; }
  body:has(#appView:not(.hidden)) #appView .chat-segment { min-height: 39px; padding: 0 13px; font-size: 11px; }
  body:has(#appView:not(.hidden)) #appView #homeModule .chat-intro { display: block; width: calc(100% - 32px) !important; margin: 15px 16px 0 !important; padding: 26px !important; border-radius: 18px; }
  body:has(#appView:not(.hidden)) #appView .chat-intro h3 { font-size: clamp(29px, 7vw, 38px); }
  body:has(#appView:not(.hidden)) #appView .chat-intro p { font-size: 13px; line-height: 1.6; }
  body:has(#appView:not(.hidden)) #appView .voice-launcher { flex-direction: row; justify-content: flex-start; align-items: center; gap: 20px; margin: 24px 0 0; padding: 20px 0 0; border: 0 !important; border-top: 1px solid #ffffff1a !important; text-align: left; }
  body:has(#appView:not(.hidden)) #appView .voice-orb { width: 66px; height: 66px; }
  body:has(#appView:not(.hidden)) #appView .voice-launcher-copy span { max-width: 245px; font-size: 11px; }
  body:has(#appView:not(.hidden)) #appView .voice-stage-orb { width: 148px; height: 148px; }
  body:has(#appView:not(.hidden)) #appView #homeModule .chat-thread { min-height: 210px !important; padding: 22px 16px !important; }
  body:has(#appView:not(.hidden)) #appView .chat-message { gap: 9px; margin-bottom: 17px; }
  body:has(#appView:not(.hidden)) #appView .chat-avatar { width: 29px; height: 29px; flex-basis: 29px; border-radius: 9px; font-size: 11px; }
  body:has(#appView:not(.hidden)) #appView .chat-bubble { max-width: calc(100% - 38px); padding: 16px; font-size: 14px; }
  body:has(#appView:not(.hidden)) #appView .chat-suggestions { gap: 7px; }
  body:has(#appView:not(.hidden)) #appView .chat-suggestions button { min-height: 39px; font-size: 11px; }
  body:has(#appView:not(.hidden)) #appView #homeModule .chat-composer-wrap { padding: 12px 11px max(14px, env(safe-area-inset-bottom)) !important; }
  body:has(#appView:not(.hidden)) #appView .chat-composer { min-height: 59px; gap: 5px; padding: 7px; border-radius: 15px !important; }
  body:has(#appView:not(.hidden)) #appView .chat-composer textarea { min-height: 66px; padding: 10px 5px; font-size: 16px; }
  body:has(#appView:not(.hidden)) #appView .chat-tool { width: 36px; height: 41px; flex-basis: 36px; border: 0 !important; border-radius: 10px !important; }
  body:has(#appView:not(.hidden)) #appView .chat-send { width: 38px; height: 41px; flex-basis: 38px; border-radius: 10px !important; }
  body:has(#appView:not(.hidden)) #appView .chat-helper { padding: 0 5px; font-size: 9px; }
  body:has(#appView:not(.hidden)) #appView .chat-quick-row { flex-wrap: wrap; overflow: visible; gap: 6px; }
  body:has(#appView:not(.hidden)) #appView .chat-quick-row button { min-height: 34px; padding: 7px 10px; font-size: 10px; }
  body:has(#appView:not(.hidden)) #appView #homeModule .chat-tools-rail { top: 81px !important; bottom: 12px !important; left: 10px !important; width: min(300px, calc(100vw - 42px)) !important; padding: 22px 13px 13px !important; border-radius: 20px !important; transform: translateX(calc(-100% - 22px)); }
  body:has(#appView:not(.hidden)) #appView #homeModule .tools-sidebar-open .chat-tools-rail, body:has(#appView:not(.hidden)) #appView #homeModule.tools-sidebar-open .chat-tools-rail { transform: translateX(0); }
  body:has(#appView:not(.hidden)) #appView #homeModule .chat-sidebar-backdrop { inset: 77px 0 0 !important; background: #04172d66; backdrop-filter: blur(3px); }
  body:has(#appView:not(.hidden)) #appView #homeModule .chat-segment-panel { padding: 25px 16px !important; }
  body:has(#appView:not(.hidden)) #appView .chat-panel-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  body:has(#appView:not(.hidden)) #appView .chat-panel-stat { padding: 19px 17px; }
  body:has(#appView:not(.hidden)) #appView .chat-panel-stat:last-child { grid-column: 1 / -1; }
  body:has(#appView:not(.hidden)) #appView .chat-panel-stat span { font-size: 11px; }
  body:has(#appView:not(.hidden)) #appView .chat-panel-stat strong { margin-top: 13px; font-size: 27px; }
  body:has(#appView:not(.hidden)) #appView .chat-panel-list { padding: 9px 16px; }
  body:has(#appView:not(.hidden)) #appView .chat-panel-record .record-amount { font-size: 12px; }
  body:has(#appView:not(.hidden)) #appView .business-tools-view { padding: 14px 13px 32px !important; }
  body:has(#appView:not(.hidden)) #appView .workspace-head { padding: 23px 20px; gap: 7px; margin-bottom: 17px; border-radius: 17px; }
  body:has(#appView:not(.hidden)) #appView .workspace-head h1 { font-size: 31px; }
  body:has(#appView:not(.hidden)) #appView .workspace-head-actions { max-width: 100%; width: 100%; margin-top: 16px; gap: 7px; }
  body:has(#appView:not(.hidden)) #appView .workspace-hero { padding: 26px 23px; }
  body:has(#appView:not(.hidden)) #appView .workspace-hero h2 { font-size: 29px; }
  body:has(#appView:not(.hidden)) #appView .workspace-stat-row { gap: 18px 0; }
  body:has(#appView:not(.hidden)) #appView .workspace-stat { padding: 5px 18px; }
  body:has(#appView:not(.hidden)) #appView .workspace-stat:nth-child(odd) { padding-left: 0; }
  body:has(#appView:not(.hidden)) #appView .workspace-stat:nth-child(even) { border-right: 0 !important; }
  body:has(#appView:not(.hidden)) #appView .workspace-stat strong { font-size: 28px; }
  body:has(#appView:not(.hidden)) #appView .workspace-grid { gap: 12px; }
  body:has(#appView:not(.hidden)) #appView .workspace-card { padding: 23px; min-height: 190px; }
  body:has(#appView:not(.hidden)) #appView :is(.workspace-panel, .calculator-card, .panel) { padding: 21px 18px; border-radius: 15px !important; }
  body:has(#appView:not(.hidden)) #appView .workspace-panel-head { align-items: flex-start; gap: 12px; }
  body:has(#appView:not(.hidden)) #appView .workspace-panel-head h3 { font-size: 16px; }
  body:has(#appView:not(.hidden)) #appView .workspace-panel-head span { max-width: 44%; font-size: 10px; text-align: right; }
  body:has(#appView:not(.hidden)) #appView .workspace-field :is(input, select, textarea), body:has(#appView:not(.hidden)) #toolsModal .workspace-field :is(input, select, textarea) { font-size: 16px; }
  body:has(#appView:not(.hidden)) #appView .workspace-btn, body:has(#appView:not(.hidden)) #toolsModal .workspace-btn { min-height: 44px; }
  body:has(#appView:not(.hidden)) #appView .calculator-grid { gap: 16px; }
  body:has(#appView:not(.hidden)) #toolsModal { padding: 10px; }
  body:has(#appView:not(.hidden)) #toolsModal .tools-modal-card { border-radius: 19px !important; max-height: 94dvh; }
  body:has(#appView:not(.hidden)) #toolsModal .tools-modal-head { padding: 22px 20px; }
  body:has(#appView:not(.hidden)) #toolsModal .tools-modal-body { padding: 23px 20px; }
  body:has(#appView:not(.hidden)) #toolsModal .tools-modal-footer { padding: 17px 20px; }
  body:has(#appView:not(.hidden)) #toolsModal .tools-modal-head h2 { font-size: 25px; }
  body:has(#appView:not(.hidden)) #toolsModal .document-preview { padding: 18px; overflow-x: auto; }
}
@media (max-width: 360px) {
  body:has(#appView:not(.hidden)) #appView .chat-segment { padding: 0 9px; gap: 6px; font-size: 10px; }
  body:has(#appView:not(.hidden)) #appView .chat-composer textarea { min-height: 86px; }
}
@media (prefers-reduced-motion: reduce) {
  body:has(#appView:not(.hidden)) #appView .voice-orb, body:has(#appView:not(.hidden)) #appView .voice-orb::before, body:has(#appView:not(.hidden)) #appView .voice-orb::after { animation: none !important; transition: none !important; }
  body:has(#appView:not(.hidden)) #appView :is(.chat-tools-rail, .chat-sidebar-backdrop, .workspace-card, .chat-tool-card) { transition: none !important; }
}
