:root{--tdx-accent:#318ce7;--tdx-command-width:340px}
.app.command-open{grid-template-columns:248px minmax(0,1fr) var(--tdx-command-width)}
.app.command-open.nav-collapsed{grid-template-columns:72px minmax(0,1fr) var(--tdx-command-width)}
.app>main{min-width:0}
.command-center{position:sticky;top:0;height:100dvh;min-width:0;overflow-y:auto;border-left:1px solid #dfe4ea;background:#f8f9fb;padding:14px 14px 28px;overscroll-behavior:contain}
.command-center[hidden]{display:none}
.command-backdrop{display:none}
.command-header,.calendar-dialog-header{display:flex;align-items:center;justify-content:space-between;gap:8px}
.command-header strong{font-size:14px;color:#172431}
.command-header .ghost,.calendar-dialog-header .ghost{font-size:25px;line-height:1;padding:4px 10px}
.command-context{font-size:12px;color:#687582;margin:4px 0 12px;overflow-wrap:anywhere}
.command-card{border:1px solid #dfe4ea;background:#fff;border-radius:15px;margin:0 0 12px;overflow:hidden}
.command-card>summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;min-height:48px;padding:12px 14px;color:#172431;font-weight:750;font-size:14px}
.command-card>summary::-webkit-details-marker{display:none}
.command-card>summary::after{content:'⌄';font-size:19px;color:#687582}
.command-card:not([open])>summary::after{transform:rotate(-90deg)}
.command-card>summary:focus-visible,.command-resize:focus-visible{outline:2px solid var(--tdx-accent);outline-offset:-3px}
.command-card>div{padding:0 14px 14px;font-size:13px;min-width:0}
.command-card p{font-size:12px;margin:5px 0 10px}
.command-card button{min-height:40px;max-width:100%;margin:4px 4px 4px 0}
.command-card dl{display:grid;grid-template-columns:auto 1fr;gap:5px 9px;margin:10px 0;font-size:12px}
.command-card dt{color:#687582}.command-card dd{margin:0;color:#172431;overflow-wrap:anywhere}
.command-card .command-metric{display:flex;justify-content:space-between;gap:8px;border-top:1px solid #e6e9ee;padding:7px 0;font-size:12px}
.command-card .command-metric strong{color:#172431;text-align:right}
.command-card .command-work{border-top:1px solid #e6e9ee;padding:10px 0;overflow-wrap:anywhere}
.command-card .command-work strong{display:block;color:#172431}
.command-work>summary,.command-work details>summary{cursor:pointer;font-weight:650;color:#172431;min-height:30px}
.command-work>summary:focus-visible,.command-work details>summary:focus-visible{outline:2px solid var(--tdx-accent)}
.command-card .command-empty{border:1px dashed #ccd4de;border-radius:10px;padding:12px;color:#687582}
.command-resize{position:absolute;left:0;top:0;width:8px;height:100%;cursor:ew-resize;z-index:2}
.command-resize:hover,.command-resize:focus-visible{background:#318ce71f}
#command-toggle{font-weight:650;color:#075da8;white-space:nowrap}
.project-status-strip{display:flex;align-items:center;gap:12px;min-height:38px;padding:6px 24px;border-bottom:1px solid #e6e8ec;font-size:11px;color:#526271}
.project-status-strip[hidden]{display:none}
.project-status-strip progress{width:min(160px,20vw);height:7px;accent-color:var(--tdx-accent)}
.project-status-unknown{font-style:italic;color:#687582}
.composer-tools{display:flex;align-items:center;gap:2px}
.composer-tools .ghost{font-size:17px;padding:4px 8px}
.composer-tools .ghost:disabled{cursor:not-allowed;opacity:.48}
#command-calendar{width:min(700px,calc(100vw - 24px));max-height:calc(100dvh - 24px);border:1px solid #dfe4ea;border-radius:18px;padding:20px;background:#fff;color:#172431;overflow-y:auto}
#command-calendar::backdrop{background:#14263b88}
.calendar-dialog-header h2{margin:0;font-size:20px}
.calendar-controls{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:12px 0}
.calendar-controls button{width:auto;min-height:40px}
.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px}
.calendar-grid .calendar-weekday{text-align:center;font-size:11px;font-weight:700;color:#687582}
.calendar-day{min-height:64px;border:1px solid #e1e5eb;border-radius:8px;padding:5px;overflow-wrap:anywhere;font-size:11px}
.calendar-day.today{border-color:var(--tdx-accent);background:#edf6ff}
.calendar-day.has-record{background:#f4f8fd}
.calendar-day strong{display:block;margin-bottom:3px}
.calendar-day small{display:block;font-size:10px;color:#596675}
.command-center .bot-preview{width:45px;height:60px;object-fit:contain;vertical-align:middle}
.community-stage{text-align:center;border:1px solid #e1e5eb;background:#f9fbfe;border-radius:12px;padding:12px}
.community-stage .bot-preview{display:block;margin:0 auto 2px}
.community-stage strong{display:block;font-size:12px}
.community-stage p{margin:8px 0 0}
.community-empty-seats{display:flex;justify-content:center;gap:10px;margin:10px 0}
.community-empty-seats span{width:23px;height:23px;border:1px dashed #a7b9cc;border-radius:50%}
@media(max-width:1180px){.app.command-open,.app.command-open.nav-collapsed{grid-template-columns:248px minmax(0,1fr)}.app.command-open.nav-collapsed{grid-template-columns:72px minmax(0,1fr)}.command-backdrop:not([hidden]){display:block;position:fixed;inset:0;z-index:9;border:0;background:#14263b66;padding:0}.command-center{position:fixed;right:0;top:0;z-index:10;width:min(var(--tdx-command-width),100vw);box-shadow:-12px 0 28px #17243125}.command-resize{display:none}}
@media(max-width:760px){.app.command-open,.app.command-open.nav-collapsed{display:block}.command-center{width:min(100vw,380px);padding-bottom:env(safe-area-inset-bottom)}.top-actions{gap:4px}.top-actions #command-toggle{font-size:12px;padding:4px}.calendar-day{min-height:48px;font-size:10px}}
@media(max-width:760px){.project-status-strip{padding-inline:12px;gap:7px;flex-wrap:wrap}.project-status-strip progress{width:80px}.composer-tools .ghost{padding-inline:3px}}
/* The accepted light palette remains the default. Dark mode changes surfaces,
   never the official logo or Bot assets, and keeps blue as an accent. */
body[data-theme=dark]{background:#111923;color:#eef3f9}
body[data-theme=dark] .app,body[data-theme=dark] main,body[data-theme=dark] .content,body[data-theme=dark] #workspace-view{background:#111923;color:#eef3f9}
body[data-theme=dark] .sidebar,body[data-theme=dark] .command-center{background:#17212d;border-color:#344251;color:#eef3f9}
body[data-theme=dark] .topbar{border-color:#344251;background:#111923;color:#eef3f9}
body[data-theme=dark] .project-status-strip{border-color:#344251;color:#b6c3d0}
body[data-theme=dark] h1,body[data-theme=dark] h2,body[data-theme=dark] h3,body[data-theme=dark] h4,body[data-theme=dark] h5,body[data-theme=dark] strong{color:#eef3f9}
body[data-theme=dark] p,body[data-theme=dark] label,body[data-theme=dark] .muted,body[data-theme=dark] .command-context{color:#b6c3d0}
body[data-theme=dark] .sidebar nav button,body[data-theme=dark] .recent-list button,body[data-theme=dark] .ghost{color:#c0cbd6}
body[data-theme=dark] .sidebar nav button:hover,body[data-theme=dark] .recent-list button:hover,body[data-theme=dark] .new-chat:hover{background:#263646;color:#fff}
body[data-theme=dark] .sidebar nav button.active,body[data-theme=dark] .recent-list button.active{background:#173b60;color:#b6dcff}
body[data-theme=dark] .sidebar .brand-home{background:#f7f9fc;border-radius:12px;margin-bottom:10px}
body[data-theme=dark] .chat-empty .local-intelligence-hero-title{color:#eef3f9}
body[data-theme=dark] .chat-empty .local-intelligence-hero-support,body[data-theme=dark] .chat-empty .local-intelligence-hero-state{color:#b6c3d0}
body[data-theme=dark] .card,body[data-theme=dark] .auth-card,body[data-theme=dark] .project-folder,body[data-theme=dark] .command-card,body[data-theme=dark] .chat-composer,body[data-theme=dark] .empty,body[data-theme=dark] #command-calendar{background:#1c2936;border-color:#3b4a5a;color:#eef3f9}
body[data-theme=dark] .chat-message.user,body[data-theme=dark] .raw,body[data-theme=dark] .boundary{background:#263646;color:#e4edf6}
body[data-theme=dark] .chat-message.tdx{color:#eef3f9}
body[data-theme=dark] input,body[data-theme=dark] textarea,body[data-theme=dark] select,body[data-theme=dark] .secondary,body[data-theme=dark] .new-chat{background:#17212d;border-color:#45596c;color:#eef3f9}
body[data-theme=dark] input::placeholder,body[data-theme=dark] textarea::placeholder{color:#a8b7c7}
body[data-theme=dark] .chat-examples button{background:#1c2936;border-color:#45596c;color:#d3deea}
body[data-theme=dark] .command-card>summary,body[data-theme=dark] .command-card .command-metric strong,body[data-theme=dark] .command-card .command-work strong,body[data-theme=dark] .command-card dd,body[data-theme=dark] .command-header strong{color:#eef3f9}
body[data-theme=dark] .command-card .command-metric,body[data-theme=dark] .command-card .command-work{border-color:#3b4a5a}
body[data-theme=dark] .command-work>summary,body[data-theme=dark] .command-work details>summary{color:#eef3f9}
body[data-theme=dark] .command-card .command-empty,body[data-theme=dark] .calendar-day{border-color:#45596c;background:#17212d;color:#c0cbd6}
body[data-theme=dark] .community-stage{border-color:#45596c;background:#17212d}
body[data-theme=dark] .calendar-day.today{border-color:#54a5f1;background:#173b60}
body[data-theme=dark] .calendar-day.has-record{background:#263646}
body[data-theme=dark] .primary{background:#318ce7;border-color:#318ce7;color:#fff}
body[data-theme=dark] #command-toggle{color:#9bceff}
body[data-theme=dark] :focus-visible{outline-color:#73b9ff}
