/* First-pass visual refresh. Existing page markup, IDs, routes, and data bindings stay intact. */
:root {
  --ink: #091e1a;
  --muted: #65746f;
  --paper: #f5f7f3;
  --card: #fff;
  --line: rgba(9, 30, 26, .10);
  --green: #0f8063;
  --soft: #eaf4ed;
  --danger: #a7443e;
  --forest-950: #071d18;
  --forest-900: #0b2821;
  --forest-800: #123a30;
  --emerald-500: #19a47c;
  --emerald-300: #69d7b0;
  --surface-soft: #eef3ee;
  --text-muted: #8a9692;
  --warning-bg: #fff8e8;
  --card-shadow: 0 1px 2px rgba(9, 30, 26, .02), 0 8px 28px rgba(9, 30, 26, .025);
}

html { scroll-behavior: smooth; }
body { background: var(--paper); color: var(--ink); font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 14px; }
button, input, select, textarea { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid rgba(25, 164, 124, .34); outline-offset: 2px; }

.app-shell { min-height: 100vh; grid-template-columns: 258px minmax(0, 1fr); background: var(--paper); }
.sidebar { position: sticky; top: 0; height: 100vh; min-height: 620px; padding: 25px 15px 16px; background: var(--forest-950); color: #eff8f4; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #315748 transparent; }
.brand { gap: 11px; padding: 0 12px; color: #f3fbf7; font-size: 17px; font-weight: 650; letter-spacing: .01em; }
.brand > span:last-child { line-height: 1.1; }
.brand > span:last-child small { display: block; margin-top: 5px; color: #83a899; font-size: 8px; font-weight: 500; letter-spacing: .15em; }
.brand-mark { width: 33px; height: 33px; border-radius: 10px; background: linear-gradient(145deg, #1aa47c, #0c604c); color: #f3fff8; font: 700 20px/1 Inter, sans-serif; box-shadow: inset 0 1px 0 rgba(255,255,255,.2); }
.profile { gap: 10px; min-width: 0; margin: 25px 1px 24px; padding: 12px 10px; border: 1px solid rgba(255,255,255,.08); border-radius: 11px; background: rgba(255,255,255,.035); }
.avatar { width: 34px; height: 34px; flex: 0 0 auto; background: #d7eee4; color: #165b45; font-size: 13px; }
.profile-copy { min-width: 0; flex: 1; }
.profile-copy strong, .profile-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-copy strong { color: #f0f7f3; font-size: 11px; font-weight: 570; }
.profile-copy small { margin-top: 4px; color: #8fb4a6; font-size: 9px; }
.sidebar nav { display: grid; gap: 4px; }
.nav-caption { margin: 0 11px 5px; color: #6f9284; font-size: 8px; font-weight: 650; letter-spacing: .15em; }
.nav-item, .nav-more summary { min-height: 39px; display: flex; align-items: center; gap: 10px; padding: 0 11px; border: 0; border-radius: 8px; background: transparent; color: #a8c0b5; font-size: 11px; font-weight: 450; transition: background .18s ease, color .18s ease, transform .18s ease; }
.nav-item:hover, .nav-more summary:hover, .nav-more[open] summary { background: rgba(255,255,255,.055); color: #eef8f3; }
.nav-item.active { background: rgba(105,215,176,.14); color: #f6fffb; }
.nav-symbol { display: inline-grid; place-items: center; width: 17px; flex: 0 0 17px; color: #82a999; font-size: 15px; }
.nav-item.active .nav-symbol { color: var(--emerald-300); }
.nav-more { margin-top: 13px; }
.nav-more summary { cursor: pointer; list-style: none; }
.nav-more summary::-webkit-details-marker { display: none; }
.nav-more summary::after { content: "⌄"; margin-left: auto; color: #779889; transition: transform .18s ease; }
.nav-more[open] summary::after { transform: rotate(180deg); }
.nav-more-menu { display: grid; gap: 3px; padding: 5px 0 2px 8px; }
.nav-more-menu .nav-item { min-height: 35px; font-size: 10px; }
.sidebar-foot { display: flex; align-items: center; gap: 7px; margin-top: auto; padding: 16px 10px 2px; border-top: 1px solid rgba(255,255,255,.1); color: #8da99b; font-size: 9px; }
.sidebar-foot .status-dot { color: #69d7b0; font-size: 8px; }

.workspace { width: 100%; max-width: none; min-width: 0; margin: 0; padding: 0; overflow: clip; }
.workspace > header { position: sticky; z-index: 8; top: 0; min-height: 68px; align-items: center; gap: 13px; margin: 0; padding: 10px clamp(22px, 3.3vw, 48px); border-bottom: 1px solid rgba(9,30,26,.065); background: rgba(255,255,255,.91); backdrop-filter: blur(14px); }
.workspace-heading { min-width: 0; }
.workspace-heading .eyebrow { margin: 0 0 2px; color: #238367; font-size: 8px; font-weight: 650; letter-spacing: .15em; }
.workspace-heading h1 { color: #122b22; font-size: 16px; font-weight: 590; letter-spacing: -.025em; }
.header-actions { align-items: center; gap: 9px; }
.workspace-date { margin-right: 8px; color: #85918b; font-size: 9px; white-space: nowrap; }
.quiet-button { min-height: 32px; padding: 7px 11px; border-color: rgba(9,30,26,.11); border-radius: 8px; background: #fff; color: #596a61; font-size: 10px; transition: background .18s ease, transform .18s ease; }
.quiet-button:hover { background: #f7faf7; transform: translateY(-1px); }
.sidebar-toggle { display: none; }
.sidebar-scrim { display: none; }
.mobile-context-toggle, .mobile-context-close, .context-scrim { display: none; }
.public-demo-notice { max-width: 1360px; margin: 18px auto 0; padding: 10px 13px; border: 1px solid #e4d8b4; border-radius: 9px; background: var(--warning-bg); color: #806535; font-size: 10px; line-height: 1.6; }
.module-notice, .page-notice { border-radius: 9px; font-size: 11px; }
.page-notice { top: 82px; right: 25px; }

.workspace > .user-view:not(.hidden) { width: min(1380px, 100%); margin: 0 auto; padding: 33px clamp(22px, 3.3vw, 48px) 48px; animation: workspace-in .36s ease both; }
.page-intro { align-items: flex-end; margin: 0 0 20px; }
.page-intro .eyebrow { margin-bottom: 8px; color: #238367; font-size: 9px; font-weight: 650; letter-spacing: .14em; }
.page-intro h2 { color: #0b221c; font-size: clamp(25px, 2.4vw, 34px); font-weight: 590; letter-spacing: -.045em; line-height: 1.24; }
.page-intro > div > p:last-child { margin: 9px 0 0; color: #75827c; font-size: 11px; line-height: 1.7; }
.page-intro > div > p:first-child { overflow: hidden; }
.page-intro h2 { animation: title-rise .62s cubic-bezier(.2,.72,.24,1) both; }
.section-gap { margin-top: 28px; }

/* Home dashboard: one lead balance, two compact status metrics, one grounded reminder. */
.home-summary { grid-template-columns: minmax(280px, 1.55fr) minmax(145px, .72fr) minmax(165px, .82fr) minmax(230px, 1.2fr); gap: 11px; margin: 22px 0 25px; }
.home-summary article { position: relative; min-width: 0; min-height: 166px; justify-content: space-between; gap: 11px; padding: 17px 18px; border: 1px solid rgba(9,30,26,.075); border-radius: 12px; box-shadow: var(--card-shadow); }
.home-summary article:first-child { overflow: hidden; border-color: transparent; background: linear-gradient(114deg, #0b2821 0%, #0d3027 63%, #123a30 100%); isolation: isolate; }
.home-summary article:first-child > span { position: relative; z-index: 2; color: #b3c9c0; font-size: 10px; }
.home-summary article:first-child > strong { position: relative; z-index: 2; margin-top: auto; color: #f2faf6; font-size: clamp(28px, 2.7vw, 39px); font-weight: 550; font-variant-numeric: tabular-nums; letter-spacing: -.045em; }
.home-summary article:first-child > button { position: relative; z-index: 2; color: #d8e9e0; font-size: 9px; }
.home-summary article:first-child > button:hover { color: #8ee1bd; }
.financial-orb { position: absolute; z-index: 1; top: 50%; right: -2px; width: min(48%, 195px); aspect-ratio: 1; transform: translateY(-51%); opacity: .78; pointer-events: none; }
.financial-orb::before { content: ""; position: absolute; inset: 3%; border-radius: 50%; background: radial-gradient(circle at 34% 30%, rgba(105,215,176,.16), rgba(19,77,59,.2) 45%, transparent 70%); filter: blur(5px); }
.financial-orb::after { content: ""; position: absolute; inset: 8%; border: 1px solid rgba(105,215,176,.15); border-radius: 50%; transform: rotate(-24deg) scaleY(.38); box-shadow: 0 0 0 12px rgba(105,215,176,.025), 0 0 0 25px rgba(105,215,176,.02); }
.financial-orb svg { position: relative; width: 100%; height: 100%; overflow: visible; animation: orb-drift 28s ease-in-out infinite; }
.financial-orb .orb-base { fill: rgba(10,52,41,.3); stroke: rgba(105,215,176,.45); stroke-width: 1; }
.financial-orb .orb-lines { fill: none; stroke: rgba(154,231,203,.23); stroke-width: .8; }
.financial-orb .orb-links { fill: none; stroke: rgba(105,215,176,.62); stroke-width: .8; }
.financial-orb .orb-links circle { fill: #9be7cb; stroke: none; filter: drop-shadow(0 0 3px rgba(105,215,176,.7)); }
.home-summary article:not(:first-child) { background: #fff; }
.home-summary article:not(:first-child) > span { color: #74817b; font-size: 10px; }
.home-summary article:not(:first-child) > strong { color: #122c23; font-size: 27px; font-weight: 560; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.home-summary article:not(:first-child) > button { color: #26745a; font-size: 9px; }
.home-summary article:not(:first-child) > button:hover { text-decoration: underline; }
.home-summary .home-insight { justify-content: flex-start; background: #eef5ef; border-color: #e5eee7; }
.home-insight .insight-label { color: #497663; font-size: 8px; font-weight: 650; letter-spacing: .1em; }
.home-insight p { margin: 0; color: #4c6256; font-size: 10px; line-height: 1.65; }
.home-insight button { align-self: flex-start; margin-top: auto; color: #176c53 !important; }
.panel-title { color: #293e34; font-size: 12px; font-weight: 600; }
.panel-title h3 { font-size: 16px; font-weight: 590; letter-spacing: -.025em; }
#homeUpdated { color: var(--text-muted); font-size: 9px; font-weight: 400; }
.todo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.todo-item { min-height: 88px; padding: 15px; border: 1px solid rgba(9,30,26,.075); border-radius: 11px; background: #fff; box-shadow: 0 1px 2px rgba(9,30,26,.02); }
.todo-item h3 { margin: 8px 0 4px; color: #24372f; font-size: 11px; font-weight: 580; }
.todo-item p { color: #849189; font-size: 9px; line-height: 1.6; }
.todo-item button { border-radius: 7px; background: #f0f7f2; color: #176c53; font-size: 9px; }
.status-pill { border-radius: 5px; background: #eff4ef; color: #62796b; font-size: 8px; }
.status-pill.warning { background: #fff4df; color: #98651d; }
.home-shortcuts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.home-shortcuts button { min-height: 32px; border: 1px solid #e1e8e2; border-radius: 8px; background: #fff; color: #50645a; font-size: 9px; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.home-shortcuts button:hover { transform: translateY(-1px); border-color: #b8d7c5; background: #f7fbf8; }

/* Assistant stays connected to the original chat and action-confirmation flow. */
.content-grid { grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: stretch; }
.chat-card, .panel { border: 1px solid rgba(9,30,26,.075); border-radius: 13px; background: #fff; box-shadow: var(--card-shadow); }
.chat-card { min-height: 565px; display: flex; flex-direction: column; overflow: hidden; }
.chat { height: 460px; min-height: 300px; flex: 1 1 auto; padding: 23px; background: #fff; }
.chat:empty { height: 0; min-height: 0; flex: 0 0 0; padding: 0; }
.assistant-empty-state { display: none; flex: 1 1 auto; min-height: 350px; flex-direction: column; align-items: center; justify-content: center; padding: 20px 22px 25px; text-align: center; }
.chat:empty + .assistant-empty-state { display: flex; }
.assistant-orb { position: relative; display: grid; place-items: center; width: 82px; height: 82px; margin: 0 auto 16px; border: 1px solid rgba(65,151,113,.4); border-radius: 50%; background: radial-gradient(circle at 35% 30%, #c6edd7 0%, #75bd94 26%, #277450 57%, #0c392b 78%, #08261f 100%); box-shadow: 0 0 0 10px #f1f7f2, 0 11px 28px rgba(24,105,72,.15); animation: orb-breathe 6s ease-in-out infinite; }
.assistant-orb::before, .assistant-orb::after { content: ""; position: absolute; width: 100px; height: 35px; border: 1px solid rgba(79,153,112,.38); border-radius: 50%; transform: rotate(-28deg); }
.assistant-orb::after { width: 108px; height: 28px; transform: rotate(45deg); border-color: rgba(82,159,115,.26); }
.assistant-orb-core { width: 21px; height: 21px; border-radius: 50%; background: #e4fff0; box-shadow: 0 0 22px 8px rgba(170,242,198,.55); }
.assistant-orb-node { position: absolute; z-index: 1; width: 4px; height: 4px; border-radius: 50%; background: #d9ffe8; box-shadow: 0 0 9px #8cebc2; }
.assistant-orb .node-one { top: 8px; left: 25px; }
.assistant-orb .node-two { right: -6px; top: 39px; }
.assistant-orb .node-three { bottom: 8px; left: 18px; }
.assistant-empty-eyebrow { margin: 0 0 8px; color: #5a9276; font-size: 8px; font-weight: 650; letter-spacing: .15em; }
.assistant-empty-state h2 { margin: 0; color: #172d24; font-size: 18px; font-weight: 550; letter-spacing: -.025em; }
.assistant-empty-copy { max-width: 370px; margin: 8px 0 17px; color: #85918b; font-size: 10px; line-height: 1.7; }
.assistant-prompt-chips { display: flex; justify-content: center; flex-wrap: wrap; gap: 7px; max-width: 500px; }
.assistant-prompt-chips button { min-height: 30px; padding: 0 10px; border: 1px solid #e1eae3; border-radius: 7px; background: #fbfdfb; color: #56695f; font-size: 9px; transition: background .16s ease, border-color .16s ease, transform .16s ease; }
.assistant-prompt-chips button:hover { transform: translateY(-1px); border-color: #b7d7c5; background: #f1f8f3; }
.assistant-prompt-chips button span { margin-left: 5px; color: #78a38b; }
.composer { position: sticky; z-index: 2; bottom: 8px; flex: 0 0 auto; gap: 9px; margin: 0 15px; padding: 8px 8px 8px 13px; border: 1px solid rgba(9,30,26,.13); border-radius: 11px; background: #fff; box-shadow: 0 4px 18px rgba(9,30,26,.045); }
.composer:focus-within { border-color: #55a982; box-shadow: 0 0 0 3px rgba(25,164,124,.1); }
.composer input { min-width: 0; min-height: 31px; padding: 7px 2px; border: 0; border-radius: 0; outline: 0; background: transparent; color: #21372d; font-size: 10px; }
.composer input:focus { border-color: transparent; }
.composer input::placeholder { color: #9aa69f; }
.composer button { width: 35px; height: 35px; flex: 0 0 35px; border-radius: 8px; background: var(--green); font-size: 20px; transition: background .18s ease, transform .18s ease; }
.composer button:hover { transform: translateY(-1px); background: #0b6b52; }
.disclaimer { margin: 9px 0 13px; color: #97a29c; font-size: 8px; }
.right-rail { display: grid; grid-template-columns: 1fr; gap: 11px; align-content: start; }
.panel { padding: 16px; }
.panel-title { display: flex; align-items: center; }
.badge { padding: 3px 6px; border-radius: 5px; background: #e8f3eb; color: #497763; font-size: 8px; font-weight: 550; }
.balance { margin: 19px 0 5px; color: #142e24; font-size: 25px; font-weight: 570; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.muted { color: #839088; font-size: 9px; }
.panel hr { margin: 15px 0; border-color: #edf0ed; }
.metric { margin-top: 11px; color: #7f8c85; font-size: 9px; }
.metric strong { color: #3e5148; font-size: 9px; font-weight: 550; }
.audit-log { color: #77867e; font-size: 9px; }
.audit-log p { margin: 10px 0; line-height: 1.5; }
.message { max-width: 88%; gap: 9px; margin-bottom: 16px; }
.message .bot-icon { width: 25px; height: 25px; flex: 0 0 25px; border-radius: 8px; background: #e5f3eb; color: #167354; }
.message .bubble { padding: 10px 13px; border-radius: 3px 12px 12px 12px; background: #f1f5f1; color: #32463b; font-size: 11px; line-height: 1.7; }
.message.user .bubble { border-radius: 12px 3px 12px 12px; background: #0f8063; color: #fff; }
.assistant-request-error .bubble { border: 1px solid #f0c5c2; background: #fff6f5; color: #853c36; }
.assistant-request-error .bot-icon { background: #fae5e2; color: #a34239; }
.request-error-copy { margin: 0 0 8px; }
.request-retry { padding: 5px 9px; border: 1px solid #d9a29d; border-radius: 7px; background: #fff; color: #853c36; cursor: pointer; font-size: 11px; }
.request-retry:hover { background: #fce9e7; }
.assistant-workflow .bubble small { color: #24795c; }
.assistant-task-detail { border-radius: 8px; background: #edf5ef; font-size: 10px; }
.assistant-examples button, .assistant-workflow .row-actions button { min-height: 31px; border-radius: 7px; font-size: 9px; }
.history-more { border-radius: 7px; font-size: 9px; }

/* Shared presentation for unchanged business modules. */
.form-card, .security-card, .security-explain { border: 1px solid rgba(9,30,26,.075); border-radius: 12px; background: #fff; box-shadow: var(--card-shadow); }
.form-card h3, .security-explain h3, .security-card h3 { color: #20362b; font-size: 15px; font-weight: 590; letter-spacing: -.02em; }
.form-card label { color: #596a61; font-size: 10px; font-weight: 550; }
.form-card input, .form-card select, .form-card textarea, .task-toolbar select { min-height: 43px; border-color: rgba(9,30,26,.13); border-radius: 9px; background-color: #fff; color: #20362b; font-size: 11px; }
.form-card input:focus, .form-card select:focus, .form-card textarea:focus { border-color: #4ea17c; box-shadow: 0 0 0 3px rgba(25,164,124,.09); outline: 0; }
.submit-action, .assistant-workflow .row-actions .assistant-primary { border-radius: 8px; background: var(--green); font-size: 10px; font-weight: 550; transition: filter .18s ease, transform .18s ease; }
.submit-action:hover, .assistant-workflow .row-actions .assistant-primary:hover { transform: translateY(-1px); filter: brightness(.94); }
.segmented { border-radius: 9px; background: #f0f4f0; }
.segmented button { font-size: 10px; }
.segmented button.active { color: #0f7256; box-shadow: 0 1px 3px rgba(9,30,26,.08); }
.security-explain { background: #0b2821; }
.security-explain h3 { color: #f0f8f3; }
.security-icon { border-radius: 13px; background: linear-gradient(145deg, #1c7459, #102d23); }
.overview-stat { border: 1px solid rgba(9,30,26,.075); border-radius: 11px; box-shadow: var(--card-shadow); }
.data-row, .task-item, .contact-item, .card-control { border-color: rgba(9,30,26,.085); border-radius: 9px; }
.task-item { background: #fff; box-shadow: 0 1px 2px rgba(9,30,26,.02); }
.task-toolbar { border-color: rgba(9,30,26,.08); }
.page-intro + .task-toolbar { margin-top: 10px; }
.page-intro .quiet-button { display: inline-flex; align-items: center; }
.empty-copy, .form-hint { color: #819087; font-size: 10px !important; }
.app-request-card { border-radius: 14px; }
.app-request-card .app-request-approve { background: var(--green); }
.hidden { display: none !important; }
.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; }

@media (max-width: 1200px) {
  .app-shell { grid-template-columns: 244px minmax(0, 1fr); }
  .home-summary { grid-template-columns: minmax(250px, 1.4fr) minmax(130px, .7fr) minmax(140px, .75fr); }
  .home-summary .home-insight { grid-column: 1 / -1; min-height: 98px; }
  .home-insight p { max-width: 75%; }
  .content-grid { grid-template-columns: minmax(0, 1fr) 250px; }
}
@media (max-width: 900px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; z-index: 25; top: 0; bottom: 0; left: 0; width: 278px; height: 100dvh; min-height: 0; display: flex; visibility: hidden; transform: translateX(-102%); transition: transform .24s ease, visibility .24s; box-shadow: 16px 0 40px rgba(5,25,19,.18); }
  .sidebar nav { grid-template-columns: 1fr; overflow: visible; }
  .sidebar .nav-item { min-width: 0; min-height: 39px; padding: 0 11px; text-align: left; font-size: 11px; }
  .nav-more { position: static; margin-top: 13px; }
  .nav-more summary { padding: 0 11px; text-align: left; font-size: 11px; white-space: normal; }
  .nav-more-menu { position: static; right: auto; bottom: auto; width: auto; max-height: none; overflow: visible; padding: 5px 0 2px 8px; border-radius: 0; background: transparent; box-shadow: none; }
  .nav-more-menu .nav-item { text-align: left; font-size: 10px; }
  body.mobile-nav-open .sidebar { visibility: visible; transform: translateX(0); }
  .sidebar-scrim { position: fixed; z-index: 24; inset: 0; border: 0; background: rgba(5,22,17,.48); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
  body.mobile-nav-open .sidebar-scrim { display: block; opacity: 1; pointer-events: auto; }
  .workspace { width: 100%; }
  .workspace > header { min-height: 62px; padding-right: 22px; padding-left: 22px; }
  .sidebar-toggle { width: 31px; height: 31px; display: flex; flex: 0 0 31px; flex-direction: column; justify-content: center; gap: 4px; padding: 7px; border: 1px solid rgba(9,30,26,.1); border-radius: 8px; background: #fff; }
  .sidebar-toggle span { width: 15px; height: 1.5px; border-radius: 2px; background: #456055; }
  .workspace > .user-view:not(.hidden) { padding-right: 22px; padding-left: 22px; }
  .content-grid { grid-template-columns: minmax(0, 1fr); }
  .right-rail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .audit { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .workspace-date { display: none; }
  .home-summary { grid-template-columns: minmax(0, 1.25fr) minmax(120px, .75fr); }
  .home-summary article:first-child { grid-row: span 2; min-height: 195px; }
  .home-summary article:not(:first-child) { min-height: 92px; }
  .home-summary .home-insight { grid-column: 1 / -1; grid-row: auto; }
  .home-insight p { max-width: 80%; }
  .todo-grid { grid-template-columns: 1fr; }
  .assistant-layout { display: grid; grid-template-columns: minmax(0, 1fr); }
  .right-rail { display: none; }
  .right-rail.mobile-open { position: fixed; z-index: 32; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); left: 12px; display: grid; grid-template-columns: 1fr; max-height: min(74dvh, 540px); overflow: auto; padding: 13px; border: 1px solid rgba(9,30,26,.09); border-radius: 15px; background: #fff; box-shadow: 0 16px 50px rgba(5,25,19,.22); }
  .right-rail.mobile-open .audit { grid-column: auto; }
  .mobile-context-toggle { display: inline-flex; min-height: 31px; align-items: center; padding: 0 9px; border: 1px solid rgba(9,30,26,.1); border-radius: 8px; background: #fff; color: #52655a; font-size: 9px; }
  .mobile-context-close { display: inline-grid; place-items: center; width: 25px; height: 25px; margin-left: auto; border: 0; border-radius: 6px; background: #f0f4f0; color: #50645a; font-size: 17px; }
  .context-scrim { position: fixed; z-index: 31; inset: 0; display: block; border: 0; background: rgba(5,22,17,.34); opacity: 0; pointer-events: none; }
  .context-scrim.active { opacity: 1; pointer-events: auto; }
}
@media (max-width: 560px) {
  .workspace > header { min-height: 56px; gap: 8px; padding: 8px 12px; }
  .workspace-heading .eyebrow { display: none; }
  .workspace-heading h1 { font-size: 14px; }
  .header-actions { gap: 6px; }
  .header-actions .quiet-button { min-height: 30px; padding: 6px 8px; font-size: 9px; }
  #logout { display: none; }
  .workspace > .user-view:not(.hidden) { padding: 22px 13px 35px; }
  .page-intro { align-items: flex-start; gap: 8px; margin-bottom: 16px; }
  .page-intro h2 { font-size: 25px; }
  .page-intro > div > p:last-child { max-width: 290px; font-size: 10px; }
  .page-intro .quiet-button { min-height: 30px; margin-top: 3px; padding: 6px 8px; font-size: 9px; white-space: nowrap; }
  .home-summary { grid-template-columns: 1fr 1fr; gap: 8px; margin: 17px 0 21px; }
  .home-summary article { min-height: 108px; padding: 12px; }
  .home-summary article:first-child { grid-column: 1 / -1; grid-row: auto; min-height: 170px; }
  .home-summary article:first-child > strong { font-size: 32px; }
  .financial-orb { right: -3px; width: 43%; opacity: .64; }
  .home-summary article:not(:first-child) > strong { font-size: 24px; }
  .home-summary .home-insight { grid-column: 1 / -1; min-height: 122px; }
  .home-insight p { max-width: 90%; font-size: 9px; }
  .section-gap { margin-top: 23px; }
  .todo-item { padding: 12px; }
  .home-shortcuts { gap: 6px; }
  .home-shortcuts button { min-height: 30px; padding: 0 8px; font-size: 8px; }
  .chat-card { min-height: min(620px, calc(100dvh - 160px)); }
  .chat { min-height: 220px; padding: 15px 11px; }
  .assistant-empty-state { min-height: 315px; padding: 15px 8px 17px; }
  .assistant-orb { width: 68px; height: 68px; margin-bottom: 14px; }
  .assistant-orb::before { width: 84px; height: 29px; }
  .assistant-orb::after { width: 91px; height: 23px; }
  .assistant-empty-state h2 { font-size: 15px; }
  .assistant-empty-copy { max-width: 295px; margin-bottom: 14px; font-size: 9px; }
  .assistant-prompt-chips { gap: 6px; }
  .assistant-prompt-chips button { min-height: 28px; padding: 0 7px; font-size: 8px; }
  .composer { bottom: max(6px, env(safe-area-inset-bottom)); margin: 0 9px; padding: 6px 6px 6px 10px; }
  .composer input { font-size: 9px; }
  .composer button { width: 32px; height: 32px; flex-basis: 32px; }
  .disclaimer { margin-bottom: 10px; font-size: 7px; }
  .right-rail.mobile-open { right: 8px; left: 8px; }
  .transfer-layout, .contacts-layout, .extension-grid, .overview-metrics { grid-template-columns: 1fr; }
  .form-card, .security-card { padding: 17px; }
  .form-row-grid { grid-template-columns: 1fr; }
  .page-notice { top: 63px; right: 10px; left: 10px; }
}
@keyframes workspace-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes title-rise { from { opacity: .5; transform: translateY(10px); clip-path: inset(0 0 100% 0); } to { opacity: 1; transform: translateY(0); clip-path: inset(0); } }
@keyframes orb-drift { 0%,100% { transform: rotate(-2deg) translateY(0); } 50% { transform: rotate(2deg) translateY(-3px); } }
@keyframes orb-breathe { 0%,100% { box-shadow: 0 0 0 10px #f1f7f2, 0 11px 28px rgba(24,105,72,.15); } 50% { box-shadow: 0 0 0 13px #f1f7f2, 0 12px 34px rgba(24,105,72,.2); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* Purple direction, adapted from the supplied reference video. */
:root {
  --ink: #17131f;
  --muted: #716b7d;
  --paper: #f7f5fa;
  --card: #fff;
  --line: rgba(33, 20, 49, .11);
  --green: #7950ce;
  --soft: #f1eaff;
  --forest-950: #100b18;
  --forest-900: #191025;
  --forest-800: #2b1a3b;
  --emerald-500: #9964f5;
  --emerald-300: #c9a8ff;
  --surface-soft: #f0ebf7;
  --text-muted: #8d8798;
  --card-shadow: 0 1px 2px rgba(25, 14, 39, .025), 0 9px 30px rgba(38, 21, 58, .045);
}
body { background: #f7f5fa; color: #17131f; }
.sidebar { background: linear-gradient(180deg, #100b18 0%, #15101f 58%, #100b18 100%); }
.brand-mark { background: linear-gradient(145deg, #bd94ff, #7447c6); box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 5px 16px rgba(132,86,210,.24); }
.nav-caption { color: #9282a8; }
.nav-item, .nav-more summary { color: #c0b6cf; }
.nav-item:hover, .nav-more summary:hover, .nav-more[open] summary { background: rgba(196,164,255,.095); color: #faf7ff; }
.nav-item.active { background: rgba(165,119,255,.19); color: #fffaff; box-shadow: inset 2px 0 0 #b991ff; }
.nav-symbol, .nav-item.active .nav-symbol { color: #c19cff; }
.nav-more summary::after { color: #a08eb9; }
.sidebar-foot { border-color: rgba(210,185,245,.14); color: #b7a9c8; }
.sidebar-foot .status-dot { color: #c69fff; }
.workspace > header { border-bottom-color: rgba(33,20,49,.08); }
.workspace-heading .eyebrow, .page-intro .eyebrow, .eyebrow { color: #7650bc; }
.workspace-heading h1, .page-intro h2 { color: #1b1526; }
.workspace-date { color: #817a8d; }
.quiet-button, .refresh-button { border-color: rgba(47,30,69,.13); color: #5c526b; }
.quiet-button:hover, .refresh-button:hover { border-color: #d0b8f1; background: #fbf8ff; }
.public-demo-notice { border-color: #ead9b1; }

.home-summary article { border-color: rgba(45,28,68,.085); }
.home-summary article:first-child { background: linear-gradient(112deg, #130d1d 0%, #21142f 52%, #392054 100%); }
.home-summary article:first-child::before { content: ""; position: absolute; z-index: 0; inset: 0; pointer-events: none; background: radial-gradient(1.5px 1.5px at 12% 22%, rgba(255,255,255,.75) 50%, transparent 70%), radial-gradient(1px 1px at 31% 73%, rgba(221,202,255,.78) 50%, transparent 70%), radial-gradient(1.2px 1.2px at 71% 14%, rgba(255,255,255,.62) 50%, transparent 70%), radial-gradient(1px 1px at 87% 80%, rgba(206,174,255,.8) 50%, transparent 70%), radial-gradient(1px 1px at 54% 86%, rgba(255,255,255,.55) 50%, transparent 70%), radial-gradient(ellipse at 78% 47%, rgba(142,91,214,.2), transparent 50%); }
.home-summary article:first-child > span { color: #d2c4e2; }
.home-summary article:first-child > strong { color: #fffaff; }
.home-summary article:first-child > button { color: #eadfff; }
.home-summary article:first-child > button:hover { color: #d3b5ff; }
.financial-orb { width: min(55%, 218px); opacity: .95; filter: drop-shadow(0 0 18px rgba(167,121,255,.2)); }
.financial-orb::before { background: radial-gradient(circle at 37% 31%, rgba(213,181,255,.28), rgba(126,69,201,.19) 43%, transparent 71%); }
.financial-orb::after { border-color: rgba(199,158,255,.3); box-shadow: 0 0 0 11px rgba(183,133,255,.04), 0 0 0 24px rgba(183,133,255,.025); }
.financial-orb .orb-base { fill: rgba(66,35,103,.58); stroke: rgba(210,181,255,.78); }
.financial-orb .orb-lines { stroke: rgba(226,207,255,.36); }
.financial-orb .orb-links { stroke: rgba(206,173,255,.83); }
.financial-orb .orb-links circle { fill: #ead9ff; filter: drop-shadow(0 0 4px rgba(192,147,255,.95)); }
.home-summary article:not(:first-child) { border-color: rgba(45,28,68,.085); }
.home-summary article:not(:first-child) > span { color: #777084; }
.home-summary article:not(:first-child) > strong { color: #21182d; }
.home-summary article:not(:first-child) > button, .home-insight button { color: #7145bd !important; }
.home-summary .home-insight { border-color: #e8def3; background: linear-gradient(135deg, #f3edfa, #f8f5fb); }
.home-insight .insight-label { color: #7653ad; }
.home-insight p { color: #5d5369; }
.panel-title, .section-heading h2 { color: #2a2036; }
.todo-list, .todo-item { border-color: rgba(45,28,68,.09); }
.todo-item button, .home-shortcuts button { color: #5e4a78; }
.home-shortcuts button:hover { border-color: #cdb8e8; background: #fcfaff; }
.status-pill { background: #f0ebf7; color: #6d5e83; }
.status-pill.warning { background: #fff3df; color: #98651d; }

.chat-card { border-color: rgba(45,28,68,.09); }
.assistant-empty-state { position: relative; isolation: isolate; overflow: hidden; border-radius: 11px; background: radial-gradient(ellipse at 50% 28%, #392453 0%, #21152f 37%, #140e1d 79%); }
.assistant-empty-state::before { content: ""; position: absolute; z-index: -1; inset: 0; opacity: .8; pointer-events: none; background: radial-gradient(1.5px 1.5px at 12% 18%, rgba(255,255,255,.75) 50%, transparent 70%), radial-gradient(1px 1px at 22% 73%, rgba(223,202,255,.78) 50%, transparent 70%), radial-gradient(1.2px 1.2px at 80% 20%, rgba(255,255,255,.66) 50%, transparent 70%), radial-gradient(1px 1px at 87% 68%, rgba(211,181,255,.8) 50%, transparent 70%), radial-gradient(1px 1px at 61% 83%, rgba(255,255,255,.5) 50%, transparent 70%), radial-gradient(1px 1px at 38% 12%, rgba(218,193,255,.6) 50%, transparent 70%); }
.assistant-orb { border-color: rgba(219,190,255,.72); background: radial-gradient(circle at 35% 28%, #f0e4ff 0%, #c197ff 20%, #8052c6 48%, #3d235e 73%, #1b1128 100%); box-shadow: 0 0 0 10px rgba(255,255,255,.045), 0 0 28px 8px rgba(160,108,232,.25), inset -8px -12px 22px rgba(12,7,20,.48); }
.assistant-orb::before, .assistant-orb::after { border-color: rgba(222,196,255,.65); box-shadow: 0 0 12px rgba(176,133,239,.14); }
.assistant-orb::after { border-color: rgba(185,146,240,.42); }
.assistant-orb-core { background: #fffaff; box-shadow: 0 0 24px 9px rgba(216,188,255,.76); }
.assistant-orb-node { background: #fffaff; box-shadow: 0 0 10px #c99eff; }
.assistant-empty-eyebrow { color: #c7a6f4; }
.assistant-empty-state h2 { color: #fffaff; }
.assistant-empty-copy { color: #c9bfd7; }
.assistant-prompt-chips button { border-color: rgba(224,205,255,.28); background: rgba(255,255,255,.07); color: #f0e7fc; }
.assistant-prompt-chips button:hover { border-color: #c7a0ff; background: rgba(189,145,255,.18); }
.assistant-prompt-chips button span { color: #d2b3ff; }
.composer { border-color: rgba(47,30,69,.15); }
.composer:focus-within { border-color: #9a70dc; box-shadow: 0 0 0 3px rgba(153,100,245,.12); }
.composer button, .submit-action, .assistant-workflow .row-actions .assistant-primary { background: #7950ce; }
.composer button:hover, .submit-action:hover, .assistant-workflow .row-actions .assistant-primary:hover { background: #6840b8; }
.assistant-workflow .bubble small { color: #7650bc; }
.assistant-task-detail { background: #f1eaff; }
.panel { border-color: rgba(45,28,68,.09); }
.badge { background: #f0eafa; color: #70558f; }
.balance { color: #21182d; }
.metric strong { color: #51445f; }
.security-explain { background: #20142d; }
.security-icon { background: linear-gradient(145deg, #9a67e2, #3b2455); }
.segmented { background: #f2eef7; }
.segmented button.active { color: #7044bc; }
.form-card input:focus, .form-card select:focus, .form-card textarea:focus { border-color: #9a70dc; box-shadow: 0 0 0 3px rgba(153,100,245,.11); }
.contact-item > span { background: #efe7fb; color: #7447c2; }
.app-request-icon { background: #efe8fa; color: #7549bf; }
.app-request-target { border-color: #e4d8f2; background: #faf7fd; }
.app-request-approve { background: #7950ce; }
.security-check { background: #f0eafa; color: #7650bc; }
.log-ok { color: #9062d6; }

@media (max-width: 560px) {
  .assistant-empty-state { background: radial-gradient(ellipse at 50% 28%, #392453 0%, #21152f 37%, #140e1d 79%); }
}

/* Refined violet finish: slightly richer surfaces and clearer visual hierarchy. */
body { background: radial-gradient(ellipse at 73% 0%, rgba(215,195,244,.2), transparent 37%), #f7f5fa; }
.sidebar { background: radial-gradient(ellipse at 12% 5%, rgba(116,71,171,.23), transparent 35%), linear-gradient(180deg, #100b18 0%, #171020 58%, #100b18 100%); }
.workspace > header { background: rgba(250,248,253,.9); }
.workspace > .user-view:not(.hidden) { position: relative; }
.page-intro .eyebrow { color: #8759d3; }
.page-intro h2 { text-shadow: 0 2px 18px rgba(135,89,211,.08); }
.home-summary article:not(:first-child) { background: linear-gradient(145deg, #fff 0%, #fcfaff 100%); }
.home-summary article:nth-child(2), .home-summary article:nth-child(3) { box-shadow: 0 8px 26px rgba(66,39,99,.055), inset 0 1px 0 #fff; }
.home-summary article:first-child { box-shadow: 0 12px 32px rgba(42,24,65,.18), inset 0 1px 0 rgba(255,255,255,.12); }
.home-summary article:first-child::before { background: radial-gradient(1.5px 1.5px at 12% 22%, rgba(255,255,255,.92) 50%, transparent 70%), radial-gradient(1px 1px at 31% 73%, rgba(221,202,255,.92) 50%, transparent 70%), radial-gradient(1.2px 1.2px at 71% 14%, rgba(255,255,255,.82) 50%, transparent 70%), radial-gradient(1px 1px at 87% 80%, rgba(206,174,255,.9) 50%, transparent 70%), radial-gradient(1px 1px at 54% 86%, rgba(255,255,255,.8) 50%, transparent 70%), radial-gradient(ellipse at 78% 47%, rgba(171,123,244,.34), transparent 50%); }
.financial-orb { filter: drop-shadow(0 0 24px rgba(167,121,255,.32)); }
.home-summary .home-insight { box-shadow: inset 3px 0 0 #a47ade, 0 8px 24px rgba(66,39,99,.04); }
.todo-item, .panel, .chat-card { box-shadow: 0 7px 24px rgba(50,34,70,.035); }
.nav-item.active { background: linear-gradient(90deg, rgba(165,119,255,.24), rgba(165,119,255,.1)); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline-color: rgba(153,100,245,.42); }

/* Transient assistant status; no simulated progress or business result. */
.assistant-pending .bot-icon { background: #f0e7ff; color: #8558ce; animation: assistant-pulse 2s ease-in-out infinite; }
.assistant-pending .bubble { display: flex; align-items: center; gap: 15px; min-height: 42px; padding: 12px 16px; border: 1px solid rgba(153,100,245,.14); background: linear-gradient(120deg, #f7f3ff, #fcfaff); color: #79698f; }
.assistant-pending-copy { font-size: 12px; letter-spacing: .2px; }
.assistant-pending-dots { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.assistant-pending-dots i { width: 5px; height: 5px; border-radius: 50%; background: #9964e5; animation: assistant-dot 1.4s ease-in-out infinite; }
.assistant-pending-dots i:nth-child(2) { animation-delay: .16s; }
.assistant-pending-dots i:nth-child(3) { animation-delay: .32s; }
.composer.is-busy button { display: grid; place-items: center; font-size: 0; cursor: wait; opacity: .72; }
.composer.is-busy button::before { content: ""; width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: assistant-spin .85s linear infinite; }
@keyframes assistant-dot { 0%, 70%, 100% { opacity: .35; transform: translateY(0); } 35% { opacity: 1; transform: translateY(-4px); } }
@keyframes assistant-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(153,100,245,.06); } 50% { box-shadow: 0 0 0 5px rgba(153,100,245,.09); } }
@keyframes assistant-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .assistant-pending .bot-icon, .assistant-pending-dots i, .composer.is-busy button::before { animation: none; }
  .assistant-pending-dots i { opacity: .7; }
}
