/* Theme surfaces are paired with their foregrounds, including legacy modules. */
html[data-theme=dark] :is(.topbar .nav-item,.topbar summary,.topbar .icon-button,.role-switcher summary,.role-switcher button,.access-profile-toggle,.profile-toggle){color:#e8efff;background-color:transparent}
html[data-theme=dark] :is(.topbar .nav-item.active,.topbar summary:hover,.topbar .nav-item:hover){background:#294569;color:#fff}
html[data-theme=dark] .sidebar :is(.nav-item,.nav-dropdown>summary,.commercial-menu-group>summary,.sidebar-footer>summary){color:#e8efff;background-color:transparent}
html[data-theme=dark] .sidebar :is(.nav-item.active,.nav-item:hover,.nav-dropdown>summary:hover,.commercial-menu-group>summary:hover){background:#294569;color:#fff}
html[data-theme=dark] .sidebar .nav :is(summary span,button span){color:inherit}
html[data-theme=dark] .sidebar .brand>div>span{color:#bdcde4}
html[data-theme=dark] :is(.orbit-news-card,.orbit-news-empty,.home-command-center>.orbit-news,.crm20-reminders,.home-agenda,.home-agenda-card,.sector-tool,.orbit-priorities,.contact-profile-hero,.member-profile .panel){background:#172841;color:#edf3ff;border-color:#526b90}
html[data-theme=dark] :is(.orbit-news-card,.orbit-news-empty,.crm20-reminders,.home-command-center>.orbit-news,.home-agenda,.sector-tool,.orbit-priorities) :is(h2,h3,h4,strong,p,span,small){color:inherit}
html[data-theme=dark] :is(.orbit-news-card,.orbit-news-empty) :is(p,.orbit-kicker){color:#bdcde4}
html[data-theme=dark] .orbit-news-card .news-number{color:#ff74b0}
html[data-theme=dark] .crm20-reminders{background:#252a48;border-left-color:#ff61a5}
html[data-theme=dark] .crm20-reminders button{background:#203958;color:#edf3ff;border-color:#6982a6}
html[data-theme=dark] .orbit-explore,html[data-theme=dark] .orbit-explore:visited{background:#ffd6e9;color:#17243e}
html[data-theme=dark] .orbit-explore span{color:#17243e}
html[data-theme=dark] :is(.role-switcher,.access-switcher,.access-panel,.profile-access,.role-select){background:#203553;color:#edf3ff;border-color:#6982a6}
html[data-theme=dark] :is(button,summary){color:#edf3ff}
html[data-theme=dark] button:not(.primary-button):not(.danger-button):not(.orbit-station):not(.sector-tool):not(.nav-item):not(.orbit-link):not(.theme-toggle):not(.v27-ai-toggle){background-color:#203553}
html[data-theme=dark] button :is(span,small){color:inherit}
html[data-theme=dark] :is(.primary-button,.danger-button){color:#fff}
html[data-theme=dark] :is(.orbit-link,.orbit-footer button,.orbit-breadcrumb button){color:#ff9ec8;background:transparent!important}
html[data-theme=dark] .v27-institution-chip{background:#294569;color:#f2f6ff}
html[data-theme=dark] :is(.v27-contact-kind,.v27-contact-links,.v27-duplicate-card,.v27-ai-window,.v27-ai-message,.v27-card-review){background:#1b2e4b;color:#f2f6ff;border-color:#6982a6}
html[data-theme=dark] :is(.v27-duplicate-dialog,.v27-ai-dialog){background:#223653;color:#f2f6ff}
html[data-theme=dark] :is(.v27-contact-form,.v27-ai-window) :is(label,h2,h3,p,small){color:inherit}
.brand-logo-wrap{background:transparent!important;border:0!important;box-shadow:none!important}.brand-logo,.auth-logo{object-fit:contain;animation:none!important;transform:none!important;border-radius:0;background:transparent!important}.brand-logo-wrap .brand-fallback{background:transparent}
html[data-theme=dark] :is(.brand-logo,.auth-logo){content:url('assets/ideia-space-mark-light.svg')}.auth-gate .auth-visual .auth-logo{content:url('assets/ideia-space-mark-light.svg')}
html[data-theme=dark] .sidebar-footer{color:#edf3ff;background:#203553}html[data-theme=dark] .sidebar-footer summary{color:#edf3ff;background:#203553}
/* A quiet lifted surface, rather than a white rectangle, around the daily agenda. */
html[data-theme=dark] #page-home .home-agenda{background:#142139;color:#edf3ff;border:1px solid #344861;box-shadow:0 8px 24px #03091824}
html[data-theme=dark] #page-home .home-agenda :is(h2,h3,strong){color:#edf3ff}
html[data-theme=dark] #page-home .home-agenda :is(p,.eyebrow,small){color:#bdcde4}
html[data-theme=dark] .home-agenda-counts article{background:#1b2e49;color:#edf3ff;border-color:#344861}
html[data-theme=dark] .home-agenda-columns :is(section,button,details){background:#1b2e49;color:#edf3ff;border-color:#405a7d}
/* Quiet cards: the container has one surface; individual actions are separated. */
html[data-theme=dark] .home-agenda-columns>section{background:transparent}
.home-agenda-columns>section{min-width:0}
.home-agenda-columns button{overflow-wrap:anywhere}
html[data-theme=dark] .home-agenda-columns button{background:#1b2e49;border-color:#405a7d}
.home-agenda-columns>section>h3{margin:0 0 16px}
.nav-dropdown-panel{display:flex;flex-direction:column;gap:5px}
html[data-theme=dark] .sidebar .nav-dropdown-panel :is(button,.nav-item){background:transparent;color:#e8efff}
html[data-theme=dark] .sidebar .nav-dropdown-panel :is(button:hover,button:focus-visible,.nav-item.active){background:#294569;color:#fff}
html[data-theme=dark] :is(.sector-workflows,.orbit-priorities,.task-notices){background:#142139;color:#edf3ff;border-color:#344861}
html[data-theme=dark] :is(.sector-workflows,.orbit-priorities,.task-notices) :is(h2,h3,strong,summary){color:#edf3ff}
html[data-theme=dark] :is(.sector-workflows,.orbit-priorities,.task-notices) :is(p,small,.orbit-kicker){color:#bdcde4}
html[data-theme=dark] .sector-workflows .sector-tags span{background:#1b2e49;color:#d7e4fa;border-color:#405a7d}
html[data-theme=dark] .sector-resource-links a{background:#1b2e49;color:#d7e4fa;border-color:#405a7d}
html[data-theme=dark] .task-notices button{border:1px solid #405a7d;background:#1b2e49;border-radius:12px;margin:8px 0;padding:13px 15px;overflow-wrap:anywhere;white-space:normal}
html[data-theme=dark] .task-notices button small{color:#bdcde4}
html[data-theme=dark] .orbit-priorities>button{border:1px solid #405a7d;background:#1b2e49;border-radius:12px;margin:9px 0;padding:16px;gap:18px}
html[data-theme=dark] .orbit-priorities>button>span{color:#bdcde4}
.orbit-priorities>button strong{min-width:0;overflow-wrap:anywhere}
.v27-contact-kind{display:flex;gap:8px;padding:10px;border:1px solid var(--border);border-radius:14px;margin:0 0 18px}.v27-contact-kind button[aria-pressed=true]{background:#19395f;color:white;outline:2px solid #ed006b}.v27-contact-form .required{color:#ed006b}.v27-contact-links,.v27-duplicate-card{padding:15px;border:1px solid var(--border);border-radius:12px;margin:10px 0}.v27-institution-chip{display:inline-flex;align-items:center;gap:8px;padding:7px 10px;background:#e3edfc;border-radius:9px;margin:4px}.v27-institution-chip button{padding:2px 6px}.v27-contact-links .portal-choice{display:block}.v27-phone{display:flex;gap:8px;align-items:center}.v27-phone select{width:145px}.v27-phone input{min-width:0;flex:1}.v27-phone-code{white-space:nowrap;font-size:12px}.v27-extra-row{display:flex;gap:8px;margin:8px 0}.v27-extra-row input{flex:1;min-width:0}.v27-duplicate-dialog,.v27-ai-dialog{width:min(650px,92vw);padding:24px;border:1px solid var(--border);border-radius:18px;background:var(--surface,#fff);color:var(--text,#17243e)}.v27-duplicate-dialog::backdrop,.v27-ai-dialog::backdrop{background:#030918b8;backdrop-filter:blur(7px)}.v27-duplicate-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}.v27-linked-task{display:block;width:100%;text-align:left;margin:8px 0}.v27-unclassified{color:var(--muted);font-size:12px}.v27-ai-toggle{position:fixed;right:22px;bottom:22px;z-index:1300;border:1px solid #ff77b4;border-radius:50%;width:58px;height:58px;background:#17243e;color:#fff;box-shadow:0 8px 26px #0004}.v27-ai-cube{display:inline-block;color:#ff3992;font-size:30px;animation:v27-cube 7s linear infinite}.v27-ai-window{position:fixed;right:22px;bottom:92px;width:min(390px,calc(100vw - 32px));max-height:70vh;overflow:auto;z-index:1300;padding:20px;border:1px solid var(--border);border-radius:18px;background:var(--surface,#fff);color:var(--text,#17243e);box-shadow:0 16px 60px #0005}.v27-ai-window header{display:flex;justify-content:space-between;align-items:center}.v27-ai-window form{display:grid;gap:10px}.v27-ai-message{white-space:pre-wrap;overflow-wrap:anywhere;padding:12px;border-radius:10px;background:var(--surface-soft,#edf2fc);margin:10px 0}.v27-ai-window textarea{width:100%;box-sizing:border-box}.v27-ai-message[data-author=user]{border-left:3px solid #ed006b}.v27-card-review textarea{width:100%;min-height:220px}.v27-ai-window [role=log]{max-height:35vh;overflow:auto}
@keyframes v27-cube{to{transform:rotateY(360deg) rotateX(360deg)}}
@media(prefers-reduced-motion:reduce){.v27-ai-cube{animation:none}}
