.theme-toggle{display:inline-flex;align-items:center;justify-content:center;flex:0 0 40px;width:40px;height:40px;min-height:40px;padding:8px;border:1px solid #dce5ef;border-radius:8px;background:#f5f8fc;color:#375e88}.theme-toggle svg{flex-shrink:0}.theme-toggle:focus-visible{outline:2px solid #568bca;outline-offset:3px}
@media(max-width:1100px), (hover:none) and (pointer:coarse) and (max-width:1400px){#app .header-right .theme-toggle{grid-column:3;grid-row:1;justify-self:end;width:36px;height:36px;min-height:36px}}
@media(max-width:700px){#app .header-right .theme-toggle{grid-column:3/5;grid-row:1;justify-self:start}#app .header-profile-control{max-width:calc(100% - 44px)}}
@media print{.theme-toggle{display:none!important}}
@media(min-width:701px) and (max-width:1100px), (min-width:701px) and (max-width:1400px) and (hover:none) and (pointer:coarse){#app .header-right .theme-toggle{grid-column:2;grid-row:1;justify-self:end}}
@media screen{
:root[data-theme=dark]{color-scheme:dark;--ink:#e1e9f3;--muted:#a3b3c7;--border:#34455b;--bg:#101923;--blue:#94bcf1;--theme-surface:#192636;--theme-raised:#213248;--theme-soft:#172333;--theme-text:#e1e9f3;--theme-muted:#a3b3c7;--theme-link:#a2c9ff}
html[data-theme=dark],html[data-theme=dark] body{background:#101923;color:var(--theme-text)}
html[data-theme=dark] :is(.main-shell,main,.login-side,.session-panel){background:#101923;color:var(--theme-text)}
html[data-theme=dark] :is(.panel,.stat,.module,.role-card,.settings-body,.appearance-preview,.appearance-form section,.logo-preview,.system-logo-preview,.crm-investor-card,.crm-detail,.crm-intro,.crm-kpi,.crm-funnel,.crm-agenda,.crm-timeline,.crm-inv-property,.task-summary-card,.property-card,.home-tool,.outlook-calendar,.outlook-day-list,.contract-original,.contract-history,.history-entry,.investor-assignment-history,.owner-correction-actions,.parameter-documents,dialog,.market-popover,.account-menu){background:var(--theme-surface);color:var(--theme-text);border-color:var(--border)}
html[data-theme=dark] #app .main-shell>header{background:var(--theme-surface);border-color:var(--border)}
html[data-theme=dark] #app .workspace-brand{background:transparent;border-radius:4px}
html[data-theme=dark] #app .header-right :is(.workspace-clock,.fx-button,.notifications-button,.theme-toggle){background:var(--theme-raised);border-color:var(--border);color:#d9e8fb}
html[data-theme=dark] :is(.header-breadcrumb,.header-profile-info>small,.header-profile-info>span,.workspace-clock [data-clock-time]){color:#c5d7ed}
html[data-theme=dark] :is(h1,h2,h3,h4,legend,label,.panel-head,.section-title,.dialog-head,.crm-detail-head,.home-report-heading h2,.home-report-card h3,.home-report-next strong){color:var(--theme-text)}
html[data-theme=dark] :is(.muted,.field-help,.notice,.page-heading p,.date,.eyebrow.blue,.home-report-heading p,.home-report-heading small,.home-report-metric>span,.home-report-empty,.home-report-footnote,.home-report-pair,.home-report-progress-label,.home-report-next p,.home-report-next small,.panel-head span,.stat-top,.stat small,td small,.empty,.empty p,.crm-live,.crm-investor-card p,.crm-investor-card small,.text-dictation-status,.text-dictation-help){color:var(--theme-muted)}
html[data-theme=dark] :is(input,select,textarea){background:#111e2d;color:var(--theme-text);border-color:#455b75}
html[data-theme=dark] :is(input,textarea)::placeholder{color:#94a8c0;opacity:1}
html[data-theme=dark] :is(input,select,textarea):disabled{background:#243346;color:#b4c5d9}
html[data-theme=dark] :is(input[type=checkbox],input[type=radio]){accent-color:#85b8f5}
html[data-theme=dark] :is(th,thead,.permissions th,.property-pagination,.history-summary,.history-facts,.settings-note,.crm-summary-strip,.contract-party-picker,.contract-investor-picker,.ct-case-summary,.ct-history,.zone-summary,.zone-calculated){background:var(--theme-raised);color:var(--theme-text);border-color:var(--border)}
html[data-theme=dark] :is(td,th,.role-card,.panel-head,.dialog-actions,.history-heading,.home-report-pair,.crm-agenda-row,.crm-assignment-list>div,.outlook-event,.investor-assignment-history article){border-color:var(--border)}
html[data-theme=dark] :is(td,td strong,.stat strong,.empty h3,.module h3,.crm-summary-strip strong,.history-summary strong,.history-facts b){color:var(--theme-text)}
html[data-theme=dark] a:not([class]),html[data-theme=dark] :is(.text-btn,.tabs button,.crm-tabs button,.crm-actions .text-btn,.property-maps-link,.contract-history summary,.parameter-dialog summary){color:var(--theme-link)}
html[data-theme=dark] :is(.primary,.preview-submit){background:#285a96;color:#fff;border-color:#5681b7}
html[data-theme=dark] :is(.secondary,.property-row-actions .text-btn,.lead-row-action,.contract-open-button,.parameter-open-button,.investor-followup-action,.investor-card-action,.task-actions button,.parameter-document-links a,.parameter-documents a,.text-dictation-button,.ct-actions button){background:#223a55;border-color:#486481;color:#d4e6ff}
html[data-theme=dark] :is(.secondary,.text-btn,.home-report-link):hover{background:#2c4665;color:#eaf2ff}
html[data-theme=dark] :is(.badge,.crm-badge,.ct-badge,.tag,.property-card-type){background:#2b4361;color:#d1e3ff;border-color:#486481}
html[data-theme=dark] :is(.contract-state-vigente,.crm-badge.success,.ct-signed,.ct-on_time){background:#183c35;color:#9fe4c7}
html[data-theme=dark] :is(.contract-state-pendiente,.ct-warning,.ct-missing_send){background:#4a391e;color:#ffdb8d}
html[data-theme=dark] :is(.crm-badge.discarded,.ct-overdue,.ct-rejected,.ct-cancelled,.contract-state-finalizado){background:#4a2733;color:#ffbbc8;border-color:#925768}
html[data-theme=dark] :is(.lead-retire-action,.owner-followup-delete,.investor-followup-delete button,#account-menu #logout){color:#ffb7c3}
html[data-theme=dark] .property-card-grid{background:#101923}
html[data-theme=dark] :is(.property-card-body,.property-card-actions,.crm-detail-head,.outlook-connection,.outlook-month-grid button,.property-view-switch,.report-toolbar,.special-access-grant){background:var(--theme-surface);color:var(--theme-text);border-color:var(--border)}
html[data-theme=dark] :is(.property-view-switch button,.outlook-weekdays span,.outlook-event small,.outlook-event p){color:#b2c6df}
html[data-theme=dark] :is(.property-view-switch button[aria-pressed=true],.outlook-month-grid button[aria-pressed=true],.task-summary-card[aria-pressed=true]){background:#2b4668;color:#e6f0ff;border-color:#87b4eb}
html[data-theme=dark] .outlook-month-grid button>span{background:#2c4565;color:#d6e8ff}
html[data-theme=dark] :is(.home-report-card){--report-accent:#a3caff;--report-tint:#20364f;background:linear-gradient(145deg,#223b58,#192636 50%);border-color:var(--border)}
html[data-theme=dark] .report-alerts{--report-accent:#ffda91;--report-tint:#42351f;background:linear-gradient(145deg,#3b3123,#192636 50%)}
html[data-theme=dark] .report-agenda{--report-accent:#b7bdf9;--report-tint:#2d3151}
html[data-theme=dark] :is(.home-report-icon,.home-report-link,.home-report-live,.assistant-group,.assistant-totals>span,.assistant-pending,.assistant-pending.is-overdue){background:var(--theme-raised);border-color:var(--border);color:var(--theme-text)}
html[data-theme=dark] :is(.home-report-pair b,.home-report-metric strong,.assistant-totals strong){color:var(--report-accent,#b5d4ff)}
html[data-theme=dark] .home-report-progress{background:#33465d}
html[data-theme=dark] :is(.assistant-greeting,.assistant-pending h3,.assistant-pending p,.assistant-pending small,.assistant-urgency,.assistant-group strong){color:var(--theme-text)}
html[data-theme=dark] .assistant-pending.is-overdue{border-left-color:#ff91a4}
html[data-theme=dark] #app .pending-assistant-trigger{background:#243d5b;color:#d9e9ff;border-color:#537799}
html[data-theme=dark] #app .pending-assistant-trigger.has-pending{background:#493719;color:#ffda91;border-color:#b78637}
html[data-theme=dark] #app .pending-assistant-trigger.has-overdue{background:#4c2833;color:#ffbcc8;border-color:#ce6a7c}
html[data-theme=dark] :is(#internal-chat-panel,#admin-activity-panel,.chat-panel-heading,.admin-activity-heading,.chat-user-row,.chat-directory button,.chat-compose,.admin-activity-tabs,.admin-activity-items article,.chat-incoming-notice){background:var(--theme-surface);color:var(--theme-text);border-color:var(--border)}
html[data-theme=dark] :is(.chat-messages,.chat-directory button:disabled,.admin-activity-tabs button,.investor-sent-grid>div,.investor-delivery-options label,.property-gallery,.property-gallery-card,.unit-card,.owner-card){background:var(--theme-soft);color:var(--theme-text);border-color:var(--border)}
html[data-theme=dark] :is(.chat-bubble,.chat-bubble.mine){background:#243e5c;border-color:#49617d;color:#e1eaf5}
html[data-theme=dark] :is(.chat-help,.chat-peer-state,.chat-directory small,.chat-bubble time,.admin-activity-items time,.admin-activity-note,.admin-activity [data-activity-status]){color:var(--theme-muted)}
html[data-theme=dark] :is(#account-menu button:hover,#account-menu button:focus-visible){background:#2b415e}
html[data-theme=dark] :is(.permissions-settings tr,.permissions-settings tr td,.permissions-settings tbody tr:nth-child(even)){background:var(--theme-surface);color:var(--theme-text)}
html[data-theme=dark] .home-tool img{background:transparent;border-radius:5px}
html[data-theme=dark] :is(.report-print-document,.report-print-document h1,.report-print-document h2,.report-print-document h3,.report-print-document p,.report-print-document td){color:#243247;color-scheme:light}
html[data-theme=dark] .report-print-document{background:#fff}
html[data-theme=dark] .leaflet-popup-content-wrapper,html[data-theme=dark] .leaflet-popup-tip{background:var(--theme-surface);color:var(--theme-text)}
html[data-theme=dark] .leaflet-control a{color:#243247;background:white}
}
@media screen{
html[data-theme=dark] .welcome:not(.custom-home-background){background:linear-gradient(120deg,#1b3552,#1a293c);border-color:#3b5270}
html[data-theme=dark] .welcome:not(.custom-home-background)::after{color:#2d4867}
html[data-theme=dark] .welcome:not(.custom-home-background) :is(p,.eyebrow){color:#bdcfe4}
html[data-theme=dark] :is(.preview-input,.welcome-preview-login,.preview-logo,.welcome-preview-hero){background:var(--theme-raised);color:var(--theme-text);border-color:var(--border)}
html[data-theme=dark] :is(.home-tool span,.module p,.settings-note,.role-card p,.welcome-preview-login p,.preview-footer){color:var(--theme-muted)}
}
@media screen{
html[data-theme=dark] #breadcrumb,html[data-theme=dark] .header-breadcrumb b,html[data-theme=dark] #app .header-right .fx-button strong,html[data-theme=dark] #app .workspace-clock .clock-hour{color:#c5d7ed}
html[data-theme=dark] :is(.property-card-price,.property-card-progress strong,.property-card-unit-counts strong,.property-card-progress summary){color:#a9ceff}
html[data-theme=dark] :is(.property-card-facts,.property-card-progress>small,.property-card-progress details,.property-card-unit-counts span,.property-card-state>span,.property-card-responsible>span,.map-property-card span){color:#afc1d7}
}
@media screen{
html[data-theme=dark] :is(.ct-late,.ct-table .ct-late,.crm-overdue,.form-alert,[role=alert]){color:#ffb7c3}
html[data-theme=dark] .investor-sent-grid>div.is-sent{background:#183c35;color:#9fe4c7;border-color:#397c68}
}

@media screen{
html[data-theme=dark] .home-tools-panel{background:#142030;border-color:var(--border)}
html[data-theme=dark] .home-tool{background:#192b3e;color:#e0eaf6}
html[data-theme=dark] .home-tool span{color:#d5e2f2}
html[data-theme=dark] .home-tool-icon{background:#263b52;border-radius:10px;min-width:68px;padding:7px}
html[data-theme=dark] .home-tool-external{color:#b1c9e7}
html[data-theme=dark] :is(.home-tool:hover,.home-tool:focus-visible){background:#28435f;color:#f1f6ff}
html[data-theme=dark] .home-tool-web{color:#a2c9ff}
}
@media screen{
/* Sticky form chrome needs its own dark surface, including the shared modal's ID rules. */
html[data-theme=dark] dialog :is(.dialog-head,.dialog-actions,.history-form-actions,.assistant-footer){background:var(--theme-surface);color:var(--theme-text);border-color:var(--border)}
html[data-theme=dark] #modal:not(.property-dialog) .dialog-actions{background:var(--theme-surface);border-color:var(--border)}
html[data-theme=dark] #modal:not(.property-dialog) textarea,html[data-theme=dark] .parameter-dialog .parameter-comment textarea{background:#111e2d;color:var(--theme-text);border-color:#455b75}
html[data-theme=dark] :is(.unit-association,.unit-owner-card,.owner-lead-summary>div,.owner-phone-editor-row,.contract-history [data-history-form],.property-dialog .unit-card.unit-linked.unit-collapsed){background:var(--theme-soft);color:var(--theme-text);border-color:var(--border)}
html[data-theme=dark] #special-access-settings form{background:var(--theme-soft);border-color:var(--border)}
html[data-theme=dark] .contract-dialog input[readonly]{background:#243346;color:#c5d7ed;border-color:#455b75}
html[data-theme=dark] .owner-contact-card{background:var(--theme-surface);color:var(--theme-text);border-color:var(--border)}
html[data-theme=dark] :is(.owner-contact-card:hover,.owner-contact-card[aria-pressed=true]){background:#2b4668;color:#e6f0ff;border-color:#87b4eb}
html[data-theme=dark] .owner-collapse-toggle{background:var(--theme-raised);color:#d4e6ff;border-color:#486481}
html[data-theme=dark] .form-alert{background:#422833;color:#ffc4ce;border-color:#925768;border-left-color:#e48b9d}
}
@media screen{
/* Lead detail cards and follow-up surfaces share the dark workspace palette. */
html[data-theme=dark] .crm-source-data{background:var(--theme-soft);color:var(--theme-text);border-color:var(--border)}
html[data-theme=dark] .crm-source-data :is(dd,li,li strong){color:var(--theme-text)}
html[data-theme=dark] :is(.crm-source-data dt,.crm-detail-title p,.crm-detail-meta,.crm-assignment-list small,.crm-assignment-list .crm-notes,.crm-followup-top>span:last-child,.crm-followup>small,.crm-followup p,.crm-followup-company,.crm-agenda-row small,.crm-agenda-row span,.crm-empty-note){color:#b1c3da}
html[data-theme=dark] .crm-next{background:var(--theme-raised);color:#c8d9ed;border-color:var(--border)}
html[data-theme=dark] :is(.crm-company-icon,.crm-company-icon.has-logo){background:#253a53;color:#c7deff;border-color:#486481}
html[data-theme=dark] :is(.crm-funnel button,.crm-funnel strong,.crm-investor-strip button,.crm-investor-numbers strong){color:#c7deff}
html[data-theme=dark] :is(.crm-intro p,.crm-investor-strip small,.crm-investor-numbers){color:#b1c3da}
html[data-theme=dark] .crm-funnel button>div{background:#33465e}
html[data-theme=dark] :is(.crm-followup,.crm-assignment-list>div,.crm-investor-strip button){border-color:var(--border)}
html[data-theme=dark] :is(.crm-investor-card .investor-card-action:hover,.lead-row-actions .lead-row-action:hover){background:#2c4665;color:#eaf2ff;border-color:#7296bd}
html[data-theme=dark] .lead-row-actions .lead-retire-action{background:#422833;color:#ffc4ce;border-color:#925768}
html[data-theme=dark] .lead-row-actions .lead-retire-action:hover{background:#57303e;color:#ffd7df;border-color:#bc7b8c}
}
@media screen{
html[data-theme=dark] .investor-sent-summary summary{background:var(--theme-raised);color:#c7deff;border-color:#486481}
html[data-theme=dark] :is(.investor-delivery-badges span,.investor-agreement.is-present strong){background:#183c35;color:#9fe4c7;border-color:#397c68}
html[data-theme=dark] :is(.investor-agreement.is-missing strong,.owner-phone-tag){background:#2b3e56;color:#c8d8ec;border-color:#486481}
html[data-theme=dark] :is(.investor-followup-delete button:not(.investor-followup-edit),.owner-correction-actions .owner-followup-delete){background:#422833;color:#ffc4ce;border-color:#925768}
html[data-theme=dark] .investor-followup-delete .investor-followup-edit{background:#223a55;color:#d4e6ff;border-color:#486481}
}
