/* Theme extends every working surface; status colours remain independent. */
:root{--ink:#243b3c;--surface:#fff;--subtle:#f5f7f8;--muted:#7b8c8d}
html[data-theme="dark"]{--ink:#e2eeeb;--surface:#17272c;--subtle:#101c20;--muted:#a3b6b4;--line:#2b4147;--teal:#61cbb6;background:var(--subtle);color:var(--ink)}
[data-theme="dark"] body,[data-theme="dark"] .main{background:var(--subtle);color:var(--ink)}
[data-theme="dark"] :is(.sidebar,.topbar,.panel,.filters,.schedule,.stat,.entity,table,dialog,input,select,textarea,button){background:var(--surface);color:var(--ink)}
[data-theme="dark"] :is(.muted,.breadcrumb,.navlabel,.legend,.hour,.petmeta,.heading p,.stat span,.entity p,.tip,.history,.minirow p,td small,.topactions select,.schedulehead span:first-child){color:var(--muted)}
[data-theme="dark"] .breadcrumb b{color:var(--ink)}
[data-theme="dark"] :is(input,select,textarea,.appointment){border-color:var(--line)}
[data-theme="dark"] :is(button:hover,.note,.column,th,.tabs,.demo,.badge,.progress){background:#21363b;color:#bbcfcb}
[data-theme="dark"] .sidebar .nav button{background:transparent;color:var(--muted)}
[data-theme="dark"] .sidebar .nav button.active,[data-theme="dark"] .settingsnav button.selected,[data-theme="dark"] .conversation.current{background:#1d413f;color:#9ce5d5;border-color:#35645d}
[data-theme="dark"] .navcount{background:#2a514b;color:#c1efe4}
[data-theme="dark"] .brandmark{background:#238474;color:white}
[data-theme="dark"] .tabs button.selected{background:#32494e;color:#edf9f5;box-shadow:none}
[data-theme="dark"] .tabs button{background:transparent;color:#b4c7c2}
[data-theme="dark"] button.primary{background:#167d6d;border-color:#258c7d;color:white}
[data-theme="dark"] button.primary:hover{background:#1a8b79}
[data-theme="dark"] .avatar,[data-theme="dark"] .statIcon{background:#21463f;color:#8ee4ce}
[data-theme="dark"] .appointment{background:color-mix(in srgb,var(--status) 10%,var(--surface));border-left-color:var(--status)}
[data-theme="dark"] .column .appointment{background:var(--surface)}
[data-theme="dark"] .cardtop>span[style],[data-theme="dark"] .appointment .badge[style]{color:#d5e7e1!important}
[data-theme="dark"] .badge.paid{background:#1e493b;color:#a1dfbe}
[data-theme="dark"] :is(.badge.taxi,.badge.pending){background:#443b24;color:#efcf8a}
[data-theme="dark"] .note.warning{background:#3b3322;color:#eed7a4}
[data-theme="dark"] .bubble{background:#243a3f;color:#e1efea}
[data-theme="dark"] .bubble.out{background:#204c41;color:#d4f2e5}
[data-theme="dark"] .modalfoot{background:#142327}
[data-theme="dark"] dialog{box-shadow:0 24px 90px #0008}
[data-theme="dark"] dialog::backdrop{background:#030e10b0}
[data-theme="dark"] :is(.error,button.danger){color:#ffaaa4}
[data-theme="dark"] :is(.time-row,td,th,.history,.minirow){border-color:var(--line)}
[data-theme="dark"] #toast{background:#256a5a;color:#f1fff8}
[data-theme="dark"] input:focus,[data-theme="dark"] textarea:focus,[data-theme="dark"] select:focus{outline-color:#72c8b8}
button[data-action="theme"]{width:36px;height:36px;display:grid;place-items:center;flex-shrink:0}
@media(max-width:760px){.topactions>.demo{display:none}.topactions{gap:4px}.topactions select{max-width:116px}.topbar{gap:10px}}
[data-theme="dark"] .client-searchbox{background:#17272c;border-color:var(--line)}
[data-theme="dark"] #clientResults{background:#17272c;box-shadow:0 10px 35px #0006}
[data-theme="dark"] #clientResults button.focused{background:#254a41;outline-color:#6ec6b2}
[data-theme="dark"] .selected-client{background:#1d3c35;border-color:#31594c}
[data-theme="dark"] .selected-client small{color:#a4c7b9}
[data-theme="dark"] .picker-create{color:var(--teal)}
