.theme-control{display:grid;gap:5px;margin:0 0 16px;font-size:11px;color:var(--muted)}
.theme-control select{padding:7px 9px;font-size:12px;min-height:34px}
.login>.theme-control{max-width:180px;margin-left:auto}.intake-public>.theme-control{max-width:200px;margin-left:auto}
html[data-theme=dark]{--green:#91c9ad;--muted:#adbbb2;--line:#3b4a41;--cream:#141d19;--gold:#e3b96f;color:#e4ece6;background:#141d19;color-scheme:dark}
html[data-theme=dark] body{background:#141d19;color:#e4ece6}
html[data-theme=dark] :is(.panel,.stat,.property,.photo,dialog,.ledger-dialog,.contract-dialog,.source-review-dialog){background:#1d2822;color:#e4ece6;border-color:var(--line)}
html[data-theme=dark] :is(.sidebar,.intake-actions){background:#18211c;border-color:var(--line)}
html[data-theme=dark] :is(input,textarea,select){background:#141d19;color:#e4ece6;border-color:#4c5c51}
html[data-theme=dark] :is(input,textarea,select)::placeholder{color:#88998e;opacity:1}
html[data-theme=dark] :is(input,textarea,select):focus{outline-color:#8dbca1;border-color:#91c9ad}
html[data-theme=dark] :is(label,.property-facts dt,.topbar,.property-foot,.note small,.source-status){color:#adbbb2}
html[data-theme=dark] :is(.property-facts dd,.topbar strong,.note p,.property-body h3,.person strong){color:#e4ece6}
html[data-theme=dark] :is(p,.muted,.checklist,.steps,.property-body p){color:#adbbb2}
html[data-theme=dark] button{background:#39745a;color:#fff}
html[data-theme=dark] button:hover{background:#45886b}
html[data-theme=dark] :is(button.secondary,button.ghost,a.contract-link){background:transparent;color:#a6dbbe;border-color:#526658}
html[data-theme=dark] :is(button.secondary,button.ghost,a.contract-link):hover{background:#2b4033}
html[data-theme=dark] :is(.nav button,.tabs button,.mobile-menu-toggle,.brand-home){background:transparent;color:#adbbb2}
html[data-theme=dark] :is(.brand,.brand-home){color:#a6dbbe}
html[data-theme=dark] .nav button.active{background:#2b4033;color:#b1e3c5}
html[data-theme=dark] .tabs button.active{color:#b1e3c5;border-bottom-color:#91c9ad}
html[data-theme=dark] :is(.nav .count,.avatar){background:#314337;color:#d6e9da}
html[data-theme=dark] :is(.property-image,.photo-upload,.upload,.empty,.welcome,.geo-results button){background:#24352a;color:#b7cbbd;border-color:#526658}
html[data-theme=dark] .property:hover{background:#25352b;box-shadow:0 8px 25px #0003}
html[data-theme=dark] :is(.badge,.badge.green,.notice.green){background:#283e30;color:#aedcba;border-color:#6ca980}
html[data-theme=dark] :is(.badge.amber,.notice,.field-status){background:#3a3220;color:#e8cf98;border-color:#ba964f}
html[data-theme=dark] :is(.badge.red,.missing-summary){background:#3b2727;color:#ffb4ab;border-color:#995d58}
html[data-theme=dark] :is(.missing-value,.missing-value input,.missing-value select,.missing-value textarea,.money-out,.property-facts dd.money-out,.contract-form-error,.source-status-error){color:#ffaba4}
html[data-theme=dark] :is(.money-in,.property-facts dd.money-in){color:#8ed3a4}
html[data-theme=dark] :is(.ledger-table,.osm-table) :is(th,td){border-color:#3b4a41}
html[data-theme=dark] :is(.ledger-table thead,.sale-details-table thead){background:#2b3930;color:#d9e5dc}
html[data-theme=dark] .sale-details-table tbody tr:nth-child(even){background:#202e25}
html[data-theme=dark] :is(.sale-total,.review-total,.ledger-payment){background:#283c2e;color:#d5e8db;border-color:#45614d}
html[data-theme=dark] .sale-total strong{color:#a6dbbe}
html[data-theme=dark] .review-total small{color:#ffaba4}
html[data-theme=dark] :is(.sale-excluded,.contract-info small){color:#adbbb2}
html[data-theme=dark] :is(.property-facts div,.property-foot,.note,.ledger-entry,.contract-row,.tenant-row,.prospect-row,.intake-section,.ledger-balance){border-color:#3b4a41}
html[data-theme=dark] :is(.manual-scan-stage,.source-review-image,.source-viewer,.pdf-canvas-scroll,.contract-pdf){background:#101713;border-color:#3b4a41}
html[data-theme=dark] .manual-scan-sheet .scan-corner{background:transparent;color:#40bd83}
html[data-theme=dark] .photo-compact-actions .photo-delete{color:#ffaba4;border-color:#bb7770;background:transparent}
html[data-theme=dark] .photo-compact-actions .photo-delete:hover{background:#482d2b}
html[data-theme=dark] code{background:#29382e;color:#dce8df}
html[data-theme=dark] dialog::backdrop{background:#0009}
html[data-theme=dark] :is(.field-definition,.mail-toolbar,.mail-editor-toolbar,.mail-editor-hint){background:#202d25;color:#adbbb2;border-color:#3b4a41}
/* Document and e-mail content retain their actual appearance for reliable editing. */
html[data-theme=dark] .mail-editor{background:#fff;color:#222;color-scheme:light}
html[data-theme=dark] .mail-editor :is(p,a,span,td){color:revert}
html[data-theme=dark] ::selection{background:#497b60;color:#fff}
html[data-theme=dark] :is(.generator-data,.prospect-group.content-fold,.source-status span,.source-viewer-content){background:#24352a;color:#c5d5ca}
html[data-theme=dark] :is(.missing-summary h2,.missing-summary h3,.missing-summary li,.source-status .source-status-error){color:#ffb4ab}
html[data-theme=dark] .missing-value{color:#ffb4ab!important}
html[data-theme=dark] .notice.missing-value{background:#3b2727;border-color:#995d58}
html[data-theme=dark] :is(.mail-sent-status,.date-preview){color:#a6dbbe}
html[data-theme=dark] :is(.document-mail-history,.document-tenant>summary small,.field-definition summary small,.contact-links a){color:#adbbb2}
html[data-theme=dark] :is(.document-tenant,.tenant-record,.lease-options fieldset,.mail-history,.missing-group){border-color:#3b4a41}
html[data-theme=dark] .nav-group summary:hover{background:#2b4033}
html[data-theme=dark] .download{background:#39745a;color:white}
html[data-theme=dark] select option{background:#141d19;color:#e4ece6!important}
html[data-theme=dark] :is(.mail-editor,.mail-reading){background:white;color:#222;color-scheme:light}
html[data-theme=dark] :is(.mail-editor,.mail-reading) :is(p,span,td){color:inherit}
@media(max-width:700px){.sidebar.menu-expanded .side-footer{display:block}.sidebar .theme-control{max-width:220px;margin-bottom:12px}}

html {--delete-text:#a92f37;--delete-border:#c36c72;--delete-bg:transparent;--delete-hover:#fff0f0}
html[data-theme=dark]{--delete-text:#ffabae;--delete-border:#b76b70;--delete-bg:#332326;--delete-hover:#482c30}
html button.delete-action.delete-action.delete-action,html[data-theme=dark] button.delete-action.delete-action.delete-action{color:var(--delete-text);border:1px solid var(--delete-border);background:var(--delete-bg);border-radius:8px}
html button.delete-action.delete-action.delete-action:hover,html[data-theme=dark] button.delete-action.delete-action.delete-action:hover{color:var(--delete-text);background:var(--delete-hover);border-color:var(--delete-border)}
.welcome-choices .unavailable-attachment{color:#858b87;opacity:.65;cursor:not-allowed}
.welcome-choices .unavailable-attachment input{opacity:.65;filter:grayscale(1)}
html[data-theme=dark] .welcome-choices .unavailable-attachment{color:#748078;opacity:.55}
html[data-theme=dark] .welcome-choices .unavailable-attachment input{opacity:.4}
html[data-theme=dark] .draft-language-actions a.button{background:#39745a;color:#fff;border:1px solid transparent}
html[data-theme=dark] .draft-language-actions a.button:hover{background:#45886b}

html button.delete-action.delete-action.delete-action:is([data-delete-tenant],[data-contract-delete]),html[data-theme=dark] button.delete-action.delete-action.delete-action:is([data-delete-tenant],[data-contract-delete]){background:transparent;border:0;box-shadow:none;color:var(--delete-text)}
html button.delete-action.delete-action.delete-action:is([data-delete-tenant],[data-contract-delete]):hover{background:transparent;text-decoration:underline;color:var(--delete-text)}
