[data-theme-switch]{display:inline-grid;place-items:center;min-width:40px;min-height:40px;flex:none;padding:8px;border:1px solid #c8d5d5;border-radius:8px;background:transparent;color:#254b50;cursor:pointer}
[data-theme-switch] svg{grid-area:1/1;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
[data-theme-switch] .to-light,html[data-theme=dark] [data-theme-switch] .to-dark{display:none}
html[data-theme=dark] [data-theme-switch] .to-light{display:inline}
html[data-theme=dark]{color-scheme:dark;--bg:#10191c;--wash:#182529;--paper:#19272b;--line:#384c50;--deep:#e6eeee;--ink:#e6eeee;--muted:#b0c2c3;--orange:#ff985f;--accent:#ff985f;--teal:#80d3cd;--selected:#263f42;--focus:#8be0da;--route-ink:var(--ink);--route-muted:var(--muted);--route-line:var(--line);--route-soft:#273b3e;--route-orange:#ffad7b;--shadow:none;background:var(--bg)}
html[data-theme=dark] .layout{--desk-ink:var(--ink);--desk-muted:var(--muted);--desk-paper:var(--bg);--desk-line:var(--line);--desk-teal:var(--teal)}
html[data-theme=dark] :is(body,.layout,.layout .main,.page-header,.loading,.office-loading,.auth-form){background-color:var(--bg);color:var(--ink)}
html[data-theme=dark] :is(.sidebar,.nav-panel,.tr-topbar,.card,.tr-panel,.tr-metric,.flow-editor,.flow-heading,.flow-tabs,.flow-node,.flow-inspector,.flow-chat-preview,.flow-block-picker,.table-wrap,.kanban-column,.office-header,.office-toolbar,dialog,.popover,.chat-panel,.conv-list,.contact-panel,.composer,.tr-panel-header,.messages,.bubble,.flow-preview,.office-card,.order-row){background-color:var(--paper)!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-theme=dark] :is(h1,h2,h3,h4,label,summary,th,td,.price,.flow-node-head strong,.user-block h3){color:var(--ink)}
html[data-theme=dark] :is(.muted,.small,.subtitle,small,.tr-metric>div,.tr-panel header p,.tr-empty p,.tr-supervisor p,.tr-supervisor small,.flow-node p,.flow-heading p,.office-heading p){color:var(--muted)!important}
html[data-theme=dark] :is(a,.link,.tr-link,.tr-metric .ico){color:var(--teal)}
html[data-theme=dark] :is(input,select,textarea,button,.tr-global-search,.flow-node small,.flow-node-head,.badge,.pill,.tr-pill,.notice,.avatar,.tr-day,.tr-supervisor,.office-filters,thead,th){background-color:#223438;color:var(--ink);border-color:var(--line)}
html[data-theme=dark] :is(input,textarea)::placeholder{color:#a2b5b7}
html[data-theme=dark] :is(.primary,.button.primary){color:#201810!important;background:#ff985f!important;border-color:#ff985f!important}
html[data-theme=dark] :is(button:disabled,input:disabled){opacity:.65}
html[data-theme=dark] #main-navigation .nav :is(a,summary){color:#d3e1e0}
html[data-theme=dark] #main-navigation .nav :is(a,summary)>svg{color:#a1c1bf}
html[data-theme=dark] #main-navigation .nav :is(a,summary):hover,html[data-theme=dark] #main-navigation .nav a.active,html[data-theme=dark] .tr-tabs button.active{background:#294044!important;color:#a4e7de!important}
html[data-theme=dark] :is(.jaus-brand-image,.office-brand img){content:url(logo-jaus-claro-marca.svg)}
html[data-theme=dark] :is(.jaus-brand-pill,.jaus-brand-tagline){color:#b5dbd9!important}
html[data-theme=dark] .flow-canvas-shell{background-color:#122024!important;background-image:radial-gradient(#45585c .85px,transparent .95px)!important}
html[data-theme=dark] .flow-node.selected{border-color:#81d5ce!important}
html[data-theme=dark] .flow-node-head:has(.flow-type-trigger){background:#4a3026;color:#ffd6bd}
html[data-theme=dark] :is(.flow-lines path){stroke:#93b5b5}
html[data-theme=dark] :is(.notice.warn,.tr-pill.orange){background:#47342c;color:#ffd1ae}
html[data-theme=dark] .tr-pill.green{background:#234039;color:#b4e3d3}
html[data-theme=dark] :focus-visible{outline:2px solid #92e0db!important;outline-offset:2px}
html[data-theme=dark] dialog::backdrop{background:#040a0ccc}
@media(max-width:760px){.layout .tr-topbar .tr-global-search{flex:1;min-width:0}.layout .tr-topbar>.row{flex:none;gap:5px}}
html[data-theme=dark] .layout[data-page=flows] .flow-node-head{background:#233f42;color:#c9eee6}
html[data-theme=dark] .layout[data-page=flows] .flow-node-head:has(.flow-type-trigger){background:#483329;color:#ffdabf}
html[data-theme=dark] .layout[data-page=flows] .flow-scope{background:#20383b;color:#c2e3e1}
html[data-theme=dark] .layout .sidebar .nav-space{background:#1c2c30;border-color:var(--line)}
html[data-theme=dark] .layout .avatar{background:#294447;color:#cce5e3}

/* Inbox has its own three-pane palette, including the contact sheet on mobile. */
html[data-theme="dark"] .layout[data-page="inbox"] {
  --thread:#111c20;
  --inbox-panel:#18272b;
  --inbox-focus:#294246;
  --inbox-copy:#edf5f5;
  --inbox-secondary:#bbcacc;
  --inbox-edge:#384e53;
}
html[data-theme="dark"] .layout[data-page="inbox"] :is(.conv-list,.conv,.contact-panel,.tr-inbox-toolbar,.chat-head) {
  background:var(--inbox-panel)!important;color:var(--inbox-copy);border-color:var(--inbox-edge);
}
html[data-theme="dark"] .layout[data-page="inbox"] .conv:hover {background:#203438!important}
html[data-theme="dark"] .layout[data-page="inbox"] .conv.active {background:var(--inbox-focus)!important;box-shadow:inset 3px 0 #ff985f}
html[data-theme="dark"] .layout[data-page="inbox"] .conv .avatar {background:#31474c;color:#e6f4f3}
html[data-theme="dark"] .layout[data-page="inbox"] :is(.conv .preview,.ops-conv-meta,.tr-conv-title time,.contact-quick label,.tr-eyebrow,.channel-filters button,.tr-conv-channel,.chat-ai-status){color:var(--inbox-secondary)}
html[data-theme="dark"] .layout[data-page="inbox"] .channel-filters button.selected{color:#ffb181}
html[data-theme="dark"] .layout[data-page="inbox"] :is(.channel-filters button .unread-count,.conv .unread-count){background:#344b4f;color:#eff9f8}
html[data-theme="dark"] .layout[data-page="inbox"] :is(.messages,.chat-panel){background:var(--thread)!important}
html[data-theme="dark"] .layout[data-page="inbox"] .bubble{background:#223338!important;color:var(--inbox-copy)!important}
html[data-theme="dark"] .layout[data-page="inbox"] .bubble.out{background:#234640!important}
html[data-theme="dark"] .layout[data-page="inbox"] .message-origin{background:#172a2f;color:#dfeded;border-color:#4c696d;border-left:3px solid #70bab5}
html[data-theme="dark"] .layout[data-page="inbox"] :is(.message-origin a,.message-text a,.message-file){color:#9de2da}
html[data-theme="dark"] :is(.layout[data-page="inbox"],dialog:has(.contact-quick)) :is(select,input,textarea){background-color:#203236!important;color:#edf5f5!important;border-color:#587074!important}
html[data-theme="dark"] :is(.layout[data-page="inbox"],dialog:has(.contact-quick)) :is(input,textarea)::placeholder{color:#b3c5c7;opacity:1}
html[data-theme="dark"] .layout[data-page="inbox"] :is(.tr-contact-notes,#ops-chat button,[data-action="ai-suggest"]){background-color:#25383b;color:#d7e7e5;border-color:#506669}
html[data-theme="dark"] .layout[data-page="inbox"] :is(.composer,.composer textarea){background:#1c2c30!important}

/* Shared dark palette for component surfaces, text and interaction states. */
html[data-theme=dark] {
  --night-panel: #19272b;
  --night-raised: #223438;
  --night-edge: #40565b;
  --night-text: #e6eeee;
  --night-secondary: #b6c8ca;
  --night-warm: #ffd1af;
  --night-cool: #9adfdf;
  --night-success: #a8e4bd;
  --night-danger: #ffb6b3;
  --night-info: #aecff5;
  --night-violet: #d9c7ff;
  --night-warm-panel: #443127;
  --night-cool-panel: #213c40;
  --night-success-panel: #233d31;
  --night-danger-panel: #492c30;
  --night-info-panel: #263749;
  --night-violet-panel: #373148;
}
html[data-theme=dark] :is(.co-workspace,.proposal-page) { --co-ink:var(--ink); --co-muted:var(--muted); --co-paper:var(--paper); --co-line:var(--line); --co-soft:var(--night-warm-panel); }
html[data-theme=dark] .co-workspace .co-primary { background:var(--orange); color:#201810; }

.jaus-back{display:inline-flex;align-items:center;justify-content:center;gap:.35rem;flex:none;min-height:36px;padding:4px 9px;border:1px solid transparent;border-radius:8px;background:transparent;color:inherit;font:inherit;cursor:pointer}
.jaus-back:hover,.jaus-back:focus-visible{border-color:currentColor}
.layout[data-page="inbox"] .page-header .jaus-back{margin-bottom:4px}
@media(max-width:600px){.jaus-back{min-height:40px;padding-inline:5px}.office-header .jaus-back{font-size:12px}}

.daily-periods{display:flex;flex-wrap:wrap;gap:6px;margin:14px 0 8px}.daily-periods button{display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:5px 10px;border-radius:18px}.daily-periods button[aria-pressed=true]{border-color:currentColor;color:var(--night-cool,#00686d);font-weight:700}.daily-periods button span{font-size:.82em;font-variant-numeric:tabular-nums}.daily-insight{margin-block:12px}.daily-insight p{white-space:pre-line}
html[data-theme=dark] #office-main .office-toolbar{background:transparent!important;border-bottom:1px solid #34484b;padding-bottom:12px}
html[data-theme=dark] #office-main .view-switch{padding:3px;gap:3px;border-radius:12px;background:#18282b}
html[data-theme=dark] #office-main .view-switch button{border:1px solid transparent;border-radius:9px;background:transparent;color:#c6d7d8}
html[data-theme=dark] #office-main .view-switch button[aria-pressed=true]{background:#294448;color:#c8fbf5;border-color:#487073}
html[data-theme=dark] #office-main .office-filters{padding:clamp(12px,2vw,20px);border:1px solid #34484b;border-radius:14px;background:#18282b;gap:12px}
html[data-theme=dark] #office-filter :is(select,input:not([type=checkbox])){background:#101e21;color:#edf4f4;border:1px solid #466166}
html[data-theme=dark] #office-main .order-row{padding:clamp(12px,2vw,20px);background:#19292c!important;border:1px solid #34484b!important;border-radius:14px;margin-block:8px;min-width:0}
html[data-theme=dark] #office-main .order-title{color:#a3e8df}
html[data-theme=dark] #office-main .building>img{filter:brightness(.78) saturate(.85)}
html[data-theme=dark] #office-main .room,html[data-theme=dark] #office-main .floor-label{background:#16272a;color:#edf9f7;border:1px solid #66878b;border-radius:9px}
html[data-theme=dark] #office-main .room[aria-pressed=true]{outline:2px solid #83e4d8;outline-offset:2px}
html[data-theme=dark] #office-main .room small{color:#c7dadc}
html[data-theme=dark] .daily-periods button[aria-pressed=true]{color:#a2eee4;background:#294448}

.priority-controls .priority-chat,.priority-controls .priority-done {display:inline-flex;align-items:center;justify-content:center;gap:.35rem;min-height:36px;padding:.4rem .65rem;border:1px solid var(--line,#d2d5d2);border-radius:8px;text-decoration:none;font:inherit;white-space:nowrap}
.priority-controls .priority-chat svg {width:1rem;height:1rem}
.priority-controls .priority-done {color:#19543e;background:#edf7f1;border-color:#a9cdb9}
[data-theme="dark"] .priority-controls .priority-done {color:#c4efdb;background:#203e32;border-color:#527566}
.priority-controls .priority-chat:hover,.priority-controls .priority-done:hover {text-decoration:underline}
.priority-controls :focus-visible {outline:2px solid currentColor;outline-offset:2px}
