:root{color-scheme:light}
.theme-control{position:fixed;right:23px;bottom:22px;z-index:30;display:flex;align-items:center;gap:6px;border:1px solid #d3dfd4;border-radius:24px;background:#fff;color:#244b36;padding:3px 7px 3px 12px;box-shadow:0 4px 18px #10291b16;font-weight:500}
.theme-control>.icon{width:18px;height:18px}
.theme-control select{border:0;border-radius:20px;background-color:transparent;color:inherit;padding-top:8px;padding-bottom:8px;font-size:.85rem;max-width:155px;cursor:pointer}
.theme-control select:focus-visible{outline:2px solid #649576}
:root[data-theme="dark"]{color-scheme:dark;color:#e4ede7;background:#101916;--muted:#a3b4aa;--border:#314139;--red:#f2a29d;--soft:#23342a}
:root[data-theme="dark"] .topbar,
:root[data-theme="dark"] .card,
:root[data-theme="dark"] .stat,
:root[data-theme="dark"] .visit-card,
:root[data-theme="dark"] .auth-screen,
:root[data-theme="dark"] .auth-form,
:root[data-theme="dark"] dialog{background:#18251f;color:#e4ede7}
:root[data-theme="dark"] .sidebar{background:#112d25}
:root[data-theme="dark"] .nav button.active{background:#2c5141}
:root[data-theme="dark"] .breadcrumb b{color:#e4ede7}
:root[data-theme="dark"] .eyebrow{color:#a6b89e}
:root[data-theme="dark"] .stat-icon{color:#a2c9ae}
:root[data-theme="dark"] .hero{background:#1a4435}
:root[data-theme="dark"] .hero h2{color:#f0f5ed}
:root[data-theme="dark"] .button,
:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea,
:root[data-theme="dark"] .field{background-color:#1c2b23;color:#e4ede7;border-color:#405547}
:root[data-theme="dark"] input::placeholder,
:root[data-theme="dark"] textarea::placeholder{color:#9dac9e;opacity:1}
:root[data-theme="dark"] input:focus,
:root[data-theme="dark"] select:focus,
:root[data-theme="dark"] textarea:focus{outline-color:#acd4b7}
:root[data-theme="dark"] .button:hover{background:#2c4031}
:root[data-theme="dark"] .button.primary{background:#a2cfb3;color:#10291b;border-color:#a2cfb3}
:root[data-theme="dark"] .button.primary:hover{background:#b6dfc5}
:root[data-theme="dark"] .button.gold{background:#e7b76b;color:#173b30;border-color:#e7b76b}
:root[data-theme="dark"] .button.gold:hover{background:#efc685}
:root[data-theme="dark"] .button.danger{background:#3b2523;color:#ffb6ad;border-color:#75463e}
:root[data-theme="dark"] a,
:root[data-theme="dark"] .text-button{color:#b0d9bb}
:root[data-theme="dark"] .brand{color:#fff}
:root[data-theme="dark"] th{background:#202f26;color:#bbccc1}
:root[data-theme="dark"] td,
:root[data-theme="dark"] .attention-item{border-color:#2c3d31}
:root[data-theme="dark"] tr:hover td{background:#203027}
:root[data-theme="dark"] .finance-total{background:#293e2e}
:root[data-theme="dark"] .finance-total:hover td{background:#304935}
:root[data-theme="dark"] .badge{background:#2b4130;color:#c8debd}
:root[data-theme="dark"] .badge.amber{background:#453820;color:#f1d392}
:root[data-theme="dark"] .badge.red{background:#492a26;color:#ffc2b9}
:root[data-theme="dark"] .badge.gray{background:#2b3730;color:#c1cdc4}
:root[data-theme="dark"] .badge.green{background:#224630;color:#aee0b8}
:root[data-theme="dark"] .team-pill,
:root[data-theme="dark"] .crew-checks label{background:#293d2e;color:#c5ddc9}
:root[data-theme="dark"] .attention-icon{background:#443721;color:#edcf93}
:root[data-theme="dark"] .visit-note{background:#25392b;color:#e0ecdc}
:root[data-theme="dark"] .visit-card{border-left-color:#93b592}
:root[data-theme="dark"] .note{border-color:#66572e;background:#362e1d;color:#ecd79e}
:root[data-theme="dark"] .note.info{border-color:#3d624a;background:#22382a;color:#c9e2cd}
:root[data-theme="dark"] .note.error{border-color:#805049;background:#402823;color:#ffc7bd}
:root[data-theme="dark"] .mini-calendar{border-color:#526a50;color:#c1dcb5}
:root[data-theme="dark"] .close{background:#2b3d2f;color:#d2e1d1}
:root[data-theme="dark"] .definition dd{color:#e4ede7}
:root[data-theme="dark"] .integration-logo{background:#3a3021;color:#e8c481;border-color:#655234}
:root[data-theme="dark"] .logout{color:#c4dfcc}
:root[data-theme="dark"] .progress{background:#304232}
:root[data-theme="dark"] .theme-control{background:#22372a;color:#d7edda;border-color:#527256;box-shadow:0 4px 18px #0005}
:root[data-theme="dark"] .theme-control select{background-color:transparent;border:0}
:root[data-theme="dark"] #toast{background:#b2d5b8;color:#10291b}
:root[data-theme="dark"] hr{border:0;border-top:1px solid #405547}
@media(max-width:760px){.theme-control{right:12px;bottom:80px}.theme-control select{font-size:.8rem}.workspace{padding-bottom:145px}}
@media print{
 .theme-control{display:none!important}
 :root[data-theme="dark"]{color-scheme:light;color:#111;background:#fff;--muted:#555;--border:#ccc}
 :root[data-theme="dark"] .card,:root[data-theme="dark"] .stat,:root[data-theme="dark"] .visit-card,:root[data-theme="dark"] .hero{background:#fff!important;color:#111!important;border-color:#ccc}
 :root[data-theme="dark"] th,:root[data-theme="dark"] td,:root[data-theme="dark"] .team-pill,:root[data-theme="dark"] .badge,:root[data-theme="dark"] .visit-note,:root[data-theme="dark"] .note{background:#fff!important;color:#111!important;border-color:#ccc}
 :root[data-theme="dark"] .hero h2,:root[data-theme="dark"] .hero p{color:#111!important}
}
