/* The theme switch is available in the sidebar and on the sign-in screen. */
.theme-toggle{display:grid;place-items:center;flex:none;width:36px;height:36px;border:1px solid #d8e8e4;border-radius:50%;background:#fff;color:#397c7c;font-size:21px;line-height:1;cursor:pointer}
.theme-toggle:hover{border-color:#69b7a6;background:#f0f8f5}
.auth-theme-toggle{position:absolute;top:18px;right:18px;z-index:1;width:44px;height:44px}
@media(max-width:610px){.top-actions .theme-toggle{width:44px;height:44px}}

html[data-theme="dark"]{
  --ink:#e9f3f2;
  --muted:#a9c1c4;
  --line:#344d54;
  --bg:#111e25;
  --shadow:0 14px 42px #06101540;
  color-scheme:dark;
}

html[data-theme="dark"] .sidebar{background:#172931;border-color:#344a50}
html[data-theme="dark"] .brand{color:#eff8f6}
html[data-theme="dark"] .brand-small{background:#172931}
html[data-theme="dark"] .sidebar-caption,
html[data-theme="dark"] .help-card small,
html[data-theme="dark"] .profile small,
html[data-theme="dark"] .profile-more{color:#a9c1c4}
html[data-theme="dark"] .nav-item{color:#b5cbce}
html[data-theme="dark"] .nav-item:hover{background:#244047;color:#f0f8f7}
html[data-theme="dark"] .nav-item.is-active{background:#244d49;color:#9be1cf}
html[data-theme="dark"] .mobile-more-panel{background:#1b3038;border-color:#344d54;box-shadow:0 12px 35px #06101566}
html[data-theme="dark"] .mobile-more-link{color:#c4d8d9}
html[data-theme="dark"] .mobile-more-link:hover,html[data-theme="dark"] .mobile-more-link.is-active{background:#244d49;color:#9be1cf}
html[data-theme="dark"] .nav-count{background:#315a53;color:#d4f4e9}
html[data-theme="dark"] .sidebar-theme-toggle{background:#244139;border-color:#416b5d;color:#c7f3df;box-shadow:0 5px 18px #061b1840}
html[data-theme="dark"] .sidebar-theme-toggle:hover{background:#315448;border-color:#69ad90}
html[data-theme="dark"] .help-card{background:linear-gradient(130deg,#1f3838,#203e46);border-color:#3c605b}
html[data-theme="dark"] .help-icon{background:#2f5555;color:#b5f0e3}
html[data-theme="dark"] .profile{border-color:#344d54}
html[data-theme="dark"] .topbar{background:#172931e8;border-color:#344d54}
html[data-theme="dark"] .crumbs{color:#adc3c6}
html[data-theme="dark"] .crumbs span{color:#729197}
html[data-theme="dark"] .crumbs strong{color:#e7f2f0}
html[data-theme="dark"] .demo-badge{background:#244438;border-color:#3d6855;color:#c9ebd4}
html[data-theme="dark"] .icon-button,
html[data-theme="dark"] .theme-toggle{background:#263d45;border-color:#45616a;color:#d8f3ee}
html[data-theme="dark"] .icon-button:hover,
html[data-theme="dark"] .theme-toggle:hover{background:#34525a;border-color:#77b4ac}
html[data-theme="dark"] .top-profile-button{background:#244940;border-color:#518771;color:#c5f0dc}
html[data-theme="dark"] .page-intro,
html[data-theme="dark"] .summary-label,
html[data-theme="dark"] .summary-note{color:#adc5c8}
html[data-theme="dark"] .eyebrow{color:#8ce0d8}
html[data-theme="dark"] .primary-button{background:linear-gradient(110deg,#397e58,#2c857d,#287d9d);box-shadow:0 9px 18px #07171755}

html[data-theme="dark"] .summary,
html[data-theme="dark"] .catalog,
html[data-theme="dark"] .detail-panel,
html[data-theme="dark"] .clients-content{background:#1b3038;border-color:#344d54;box-shadow:var(--shadow)}
html[data-theme="dark"] .summary-green{background:#274839;color:#a8e8ba}
html[data-theme="dark"] .summary-blue{background:#263f50;color:#a8d8f4}
html[data-theme="dark"] .summary-turquoise{background:#234c4b;color:#a5e6dc}
html[data-theme="dark"] .summary-divider{border-color:#405860}
html[data-theme="dark"] .live-mark{color:#9bd8ab}
html[data-theme="dark"] .building-tab,
html[data-theme="dark"] .room-button,
html[data-theme="dark"] .floor-field select,
html[data-theme="dark"] .input-wrap,
html[data-theme="dark"] .building-tab:hover{border-color:#72baa5}
html[data-theme="dark"] .building-tab.is-active,
html[data-theme="dark"] .room-button.is-active{background:#245249;border-color:#4d9c81;color:#c7f4dd}
html[data-theme="dark"] .filters{background:#20363e;border-color:#365159}
html[data-theme="dark"] .filter-extra{border-color:#3a555d}
html[data-theme="dark"] .filter-extra summary{color:#90e0d4}
html[data-theme="dark"] .filter-extra-grid select,
html[data-theme="dark"] .filter-pair input{background:#162a32;border-color:#3a555d;color:#dcebe9}
html[data-theme="dark"] .filter-pair legend{color:#b1c8ca}
html[data-theme="dark"] .building-picker{border-color:#3a555d}
html[data-theme="dark"] .building-picker-label{color:#b1c8ca}
html[data-theme="dark"] .building-match-count{background:#459d70;color:#fff}
html[data-theme="dark"] .view-switch{background:#162a32;border-color:#3a555d}
html[data-theme="dark"] .view-button{color:#b1c8ca}
html[data-theme="dark"] .view-button.is-active{background:#285141;color:#c7f4dd}
html[data-theme="dark"] .property-list-card{background:#20363e;border-color:#3a555d}
html[data-theme="dark"] .property-list-card.is-active{border-color:#66c5a2}
html[data-theme="dark"] .property-list-thumb{background:#285141;color:#b9f1cf}
html[data-theme="dark"] .plan-gallery-item,
html[data-theme="dark"] .plan-empty{background:#20363e;border-color:#3a555d;color:#b1c8ca}
html[data-theme="dark"] .plan-dialog{background:#20363e}
html[data-theme="dark"] .plan-dialog-head{color:#e2efec}
html[data-theme="dark"] .plan-dialog-head button{background:#285141;color:#b9f1cf}
html[data-theme="dark"] .property-list-title{color:#e2efec}
html[data-theme="dark"] .property-list-info p,
html[data-theme="dark"] .list-empty,
html[data-theme="dark"] .list-pagination{color:#b1c8ca}
html[data-theme="dark"] .property-list-add,
html[data-theme="dark"] .list-pagination button{background:#214339;border-color:#4f856d;color:#b9f1cf}
html[data-theme="dark"] .filter-field>span,
html[data-theme="dark"] .input-wrap span{color:#b1c8ca}
html[data-theme="dark"] input::placeholder{color:#92aeb2;opacity:1}
html[data-theme="dark"] .reset-button,
html[data-theme="dark"] .back-link{color:#90e0d4}
html[data-theme="dark"] .filter-ranges,
html[data-theme="dark"] .grid-toolbar,
html[data-theme="dark"] .legend,
html[data-theme="dark"] .price-row,
html[data-theme="dark"] .selection-box{border-color:#3a555d}
html[data-theme="dark"] .grid-toolbar,
html[data-theme="dark"] .board-head,
html[data-theme="dark"] .floor-number,
html[data-theme="dark"] .board-head .corner{background:#1b3038}
html[data-theme="dark"] .grid-toolbar span,
html[data-theme="dark"] .floor-number,
html[data-theme="dark"] .legend,
html[data-theme="dark"] .legend small,
html[data-theme="dark"] .board-empty{color:#b1c5c8}
html[data-theme="dark"] .grid-toolbar .grid-count,
html[data-theme="dark"] .panel-tag{background:#285141;color:#b9f1cf}
html[data-theme="dark"] .section-label{color:#bfdbda;border-color:#40635f}
html[data-theme="dark"] .unit-cell,
html[data-theme="dark"] .legend-muted{background:#2a3b41;border-color:#42565b;color:#b6c6c8}
html[data-theme="dark"] .unit-cell.available,
html[data-theme="dark"] .legend-free{background:#214339;border-color:#4f856d;color:#b5eec9}
html[data-theme="dark"] .unit-cell.available.active{background:#28564a;border-color:#86d6c9}
html[data-theme="dark"] .unit-cell.selected{background:linear-gradient(145deg,#398162,#287d83);border-color:#72c4ae;color:#fff}
html[data-theme="dark"] .unit-cell.filtered{background:#26373d;border-color:#3b5056;color:#a7bdc0}
html[data-theme="dark"] .unit-cell.hole{background:transparent;border:0}
html[data-theme="dark"] .panel-eyebrow,
html[data-theme="dark"] .panel-subtitle,
html[data-theme="dark"] .plan-caption,
html[data-theme="dark"] .fact small,
html[data-theme="dark"] .price-row small,
html[data-theme="dark"] .selection-box p,
html[data-theme="dark"] .selection-empty,
html[data-theme="dark"] .selection-footer small{color:#abc4c7}
html[data-theme="dark"] .apartment-price{background:#203c38;border-color:#3e685b}
html[data-theme="dark"] .previous-price,
html[data-theme="dark"] .square-price{color:#bad2d0}
html[data-theme="dark"] .apartment-specs h3{color:#c2e1da}
html[data-theme="dark"] .apartment-specs .fact{border-color:#3a555d}
html[data-theme="dark"] .feature-chip{background:#27483d;border-color:#3e6855;color:#c0e9d1}
html[data-theme="dark"] .plan-visual{background:#20363e;border-color:#3b555b}
html[data-theme="dark"] .plan-svg path:first-child{fill:#1b3038;stroke:#86b6ac}
html[data-theme="dark"] .plan-svg rect{fill:#294a42}
html[data-theme="dark"] .plan-svg rect:last-of-type{fill:#294451}
html[data-theme="dark"] .plan-svg text{fill:#b8d6d1}
html[data-theme="dark"] .property-tags span{background:#294048;color:#c3dcda}
html[data-theme="dark"] .selection-empty-icon{background:linear-gradient(130deg,#28523e,#255154);color:#b7ebd4}
html[data-theme="dark"] .selection-empty strong{color:#e8f4f1}
html[data-theme="dark"] .selection-row{background:#263e42;border-color:#41635a}
html[data-theme="dark"] .selection-row small{color:#b0cebd}
html[data-theme="dark"] .selection-row button{color:#c2d8d8}

html[data-theme="dark"] .auth-screen{background:radial-gradient(circle at 10% 10%,#1d3e38,transparent 35%),radial-gradient(circle at 90% 90%,#1b3748,transparent 40%),#111e25}
html[data-theme="dark"] .auth-backdrop:not(.auth-screen),
html[data-theme="dark"] .assignment-overlay{background:#061116b8}
html[data-theme="dark"] .auth-dialog,
html[data-theme="dark"] .assignment-dialog{background:#1b3038;color:#e9f3f2;box-shadow:0 24px 70px #050e14aa}
html[data-theme="dark"] .auth-brand,
html[data-theme="dark"] .assignment-dialog h2{color:#e9f3f2}
html[data-theme="dark"] .auth-brand small,
html[data-theme="dark"] .auth-hero>div:last-child>p:last-child,
html[data-theme="dark"] .auth-intro,
html[data-theme="dark"] .auth-field span,
html[data-theme="dark"] #assignment-form label,
html[data-theme="dark"] .assignment-message{color:#b0cbce}
html[data-theme="dark"] .auth-field input,
html[data-theme="dark"] .agency-option,
html[data-theme="dark"] #assignment-form input{background:#152a32;border-color:#45616a;color:#e9f3f2}
html[data-theme="dark"] #assignment-form textarea{background:#152a32;border-color:#45616a;color:#e9f3f2}
html[data-theme="dark"] .assignment-other-fields{background:#233a42;border-color:#45616a}
html[data-theme="dark"] .assignment-legal-links{background:#233a42;border-color:#45616a;color:#b7d0d1}
html[data-theme="dark"] .assignment-legal-links a{color:#99e3d7}
html[data-theme="dark"] .auth-dialog form+form,
html[data-theme="dark"] .profile-facts{border-color:#3b555c}
html[data-theme="dark"] .profile-facts{background:#233a42}
html[data-theme="dark"] .profile-facts dt{color:#afc6c9}
html[data-theme="dark"] .auth-close,
html[data-theme="dark"] .assignment-close{color:#c3d8d9}
html[data-theme="dark"] .auth-links button,
html[data-theme="dark"] .auth-logout{color:#99e3d7}
html[data-theme="dark"] .auth-legal-links,html[data-theme="dark"] .auth-consents{border-color:#36565b}html[data-theme="dark"] .auth-consents label,html[data-theme="dark"] .auth-consents small{color:#b7d0d1}html[data-theme="dark"] .auth-legal-links a,html[data-theme="dark"] .auth-consents a{color:#99e3d7}
html[data-theme="dark"] .auth-message,
html[data-theme="dark"] .assignment-message.is-error{color:#ffb2a9}
html[data-theme="dark"] .assignment-apartment,
html[data-theme="dark"] .client-apartment{background:#26463f;color:#c3efd9}

html[data-theme="dark"] .clients-summary,
html[data-theme="dark"] .client-card{border-color:#38535a}
html[data-theme="dark"] .client-card{background:#1b3038}
html[data-theme="dark"] .clients-filters{border-color:#38535a}
html[data-theme="dark"] .clients-filter-field{color:#b5cbcd}
html[data-theme="dark"] .clients-filter-field input,html[data-theme="dark"] .clients-filter-field select,html[data-theme="dark"] .clients-filters-reset{background:#182d35;border-color:#45616a;color:#e9f3f2;color-scheme:dark}
html[data-theme="dark"] .clients-date-trigger,html[data-theme="dark"] .clients-calendar{background:#182d35;border-color:#45616a;color:#e9f3f2}
html[data-theme="dark"] .clients-date-trigger.is-filtered{background:#24483a;border-color:#56a783;color:#c7f1d5}
html[data-theme="dark"] .clients-calendar-modes{background:#254149}
html[data-theme="dark"] .clients-calendar-modes button{color:#b5cbcd}
html[data-theme="dark"] .clients-calendar-modes button.is-active{background:#366656;color:#e9f3f2}
html[data-theme="dark"] .clients-calendar-head button:hover,html[data-theme="dark"] .clients-calendar-month button:hover,html[data-theme="dark"] .clients-calendar-days button:hover{background:#2b5149}
html[data-theme="dark"] .clients-calendar-days button.is-selected{background:#409d79;color:#fff}
html[data-theme="dark"] .clients-calendar-days button.is-in-range{background:#285440}
html[data-theme="dark"] .clients-calendar-actions{border-color:#38535a}
html[data-theme="dark"] .clients-calendar-actions button:last-child{background:#285440;color:#c7f1d5}
html[data-theme="dark"] .clients-summary,
html[data-theme="dark"] .clients-empty,
html[data-theme="dark"] .client-phone,
html[data-theme="dark"] .client-card-side{color:#b5cbcd}
html[data-theme="dark"] .clients-summary strong,
html[data-theme="dark"] .client-name,
html[data-theme="dark"] .client-name[type="button"],
html[data-theme="dark"] .client-commission{color:#e9f3f2}
html[data-theme="dark"] .client-meta,
html[data-theme="dark"] .client-apartment-label{color:#a8c2c1}
html[data-theme="dark"] .client-status,
html[data-theme="dark"] .clients-notice{background:#285340;color:#c4f0d6}
html[data-theme="dark"] .client-card.status-working{border-color:#527666}html[data-theme="dark"] .client-card.status-working .client-status{background:#29463c;color:#c1dfcc}
html[data-theme="dark"] .client-card.status-booking{border-color:#8d7955}html[data-theme="dark"] .client-card.status-booking .client-status{background:#4b4231;color:#e5d3aa}
html[data-theme="dark"] .client-card.status-closing{border-color:#5f7690}html[data-theme="dark"] .client-card.status-closing .client-status{background:#2e4357;color:#c4d8ec}
html[data-theme="dark"] .client-card.status-success{border-color:#5d906d}html[data-theme="dark"] .client-card.status-success .client-status{background:#2b4b37;color:#c2e6c9}
html[data-theme="dark"] .client-card.status-closed{border-color:#66777b}html[data-theme="dark"] .client-card.status-closed .client-status{background:#34464b;color:#cfdbdc}
html[data-theme="dark"] .client-card.status-expired,html[data-theme="dark"] .client-card.status-duplicate{border-color:#966d68}html[data-theme="dark"] .client-card.status-expired .client-status,html[data-theme="dark"] .client-card.status-duplicate .client-status{background:#503a3b;color:#f0c9c2}
html[data-theme="dark"] .client-renewal{color:#a2e0e4}
html[data-theme="dark"] .client-demo{color:#f2c996}
html[data-theme="dark"] .client-card.is-expiring{background:#482e32;border-color:#a65a55;border-left-color:#ed8271}
html[data-theme="dark"] .client-card.is-expiring .client-renewal{color:#ffc4b9}
html[data-theme="dark"] .clients-notice.is-error{background:#482e32;color:#ffc4b9}
html[data-theme="dark"] .client-renew-button{background:#277e76;color:#fff}
html[data-theme="dark"] .client-drawer-actions button,html[data-theme="dark"] .client-drawer-share button,html[data-theme="dark"] #client-drawer-prepared button{background:#285340;color:#c4f0d6;border-color:#4c806b}
html[data-theme="dark"] .client-drawer-status.status-booking .client-status{background:#4b4231;color:#e5d3aa}
html[data-theme="dark"] .client-drawer-status.status-working .client-status{background:#29463c;color:#c1dfcc}
html[data-theme="dark"] .client-drawer-status.status-closing .client-status{background:#2e4357;color:#c4d8ec}
html[data-theme="dark"] .client-drawer-status.status-success .client-status{background:#2b4b37;color:#c2e6c9}
html[data-theme="dark"] .client-drawer-status.status-closed .client-status{background:#34464b;color:#cfdbdc}
html[data-theme="dark"] .client-drawer-status.status-expired .client-status,html[data-theme="dark"] .client-drawer-status.status-duplicate .client-status{background:#503a3b;color:#f0c9c2}
html[data-theme="dark"] .client-drawer-notice{background:#285340;color:#c4f0d6}
html[data-theme="dark"] .client-drawer-notice.is-error,html[data-theme="dark"] .client-drawer-error{background:#482e32;color:#ffc4b9}
html[data-theme="dark"] .client-drawer,html[data-theme="dark"] .client-drawer-head,html[data-theme="dark"] .client-drawer-facts>div{background:#1b3038;color:#e9f3f2}
html[data-theme="dark"] .client-drawer-head,html[data-theme="dark"] .client-drawer-section,html[data-theme="dark"] .client-drawer-facts,html[data-theme="dark"] .client-drawer-head button{border-color:#38535a}
html[data-theme="dark"] .client-drawer-facts{background:#38535a}
html[data-theme="dark"] .client-drawer-facts span,html[data-theme="dark"] .client-drawer-section p,html[data-theme="dark"] .client-drawer-event p,html[data-theme="dark"] .client-drawer-event time,html[data-theme="dark"] .client-drawer-status{color:#b5cbcd}
html[data-theme="dark"] .client-drawer-share select{background:#182d35;color:#e9f3f2;border-color:#45616a}
html[data-theme="dark"] .client-drawer-phone{color:#99e3d7}

@media(max-width:610px){
  html[data-theme="dark"] .sidebar{border-color:#344a50}
}
html[data-theme="dark"] .selections-editor, html[data-theme="dark"] .selection-card, html[data-theme="dark"] .selections-empty { background:#1b3038; border-color:#344d54; }
html[data-theme="dark"] .selections-editor-actions input, html[data-theme="dark"] .selection-card-actions button, html[data-theme="dark"] .selection-version button, html[data-theme="dark"] .selection-version a { background:#203941; color:#e9f3f2; border-color:#3c555c; }
html[data-theme="dark"] .selection-version-count { background:#285348; color:#b4eadb; }
html[data-theme="dark"] .detail-reopen,html[data-theme="dark"] .panel-collapse{background:#24453e;border-color:#4b7769;color:#b9edda}
html[data-theme="dark"] .detail-reopen:hover,html[data-theme="dark"] .panel-collapse:hover{background:#2e5a4e;border-color:#69a38d}
html[data-theme="dark"] .agency-create-switch{background:#24453e;border-color:#4b7769;color:#b9edda}
html[data-theme="dark"] .agency-create-switch:hover:not(:disabled){background:#2e5a4e;border-color:#69a38d}
