/* Aquatique nuit: semantic surfaces and activity colours, never applied to print. */
@media screen {
 :root[data-theme=dark]{color-scheme:dark;--night-bg:#0b1220;--night-nav:#101a2b;--night-surface:#172337;--night-raised:#1e2d43;--night-line:#35465e;--night-text:#f1f5f9;--night-muted:#abbad0;--ink:var(--night-text);--text:var(--night-text);--muted:var(--night-muted);--bg:var(--night-bg);--nav:var(--night-nav);--line:var(--night-line);--teal:#79adff;--accent:#79adff;--green:#8de0b5;--orange:#ffd096;--red:#ffadb6;--brand:#2563eb;--brand-on:#fff}
 :root[data-theme=dark] body,:root[data-theme=dark] .main,:root[data-theme=dark] .content{background:var(--night-bg)!important;color:var(--night-text)!important}
 :root[data-theme=dark] :is(.sidebar,.topbar,.mobile-nav,.bottom-nav,.mobile-bottom-nav){background:var(--night-nav)!important;color:var(--night-text)!important;border-color:var(--night-line)!important}
 :root[data-theme=dark] :is(h1,h2,h3,h4,strong,b,label,th){color:inherit}
 :root[data-theme=dark] :is(.panel,.metric,.ad-panel,.ag-agent-card,.ag-person,.ag-availability,.notification-options,dialog,.modal,.cm-composer){background:var(--night-surface)!important;color:var(--night-text)!important;border-color:var(--night-line)!important;box-shadow:0 8px 28px #0000001a!important}
 :root[data-theme=dark] :is(.subtitle,.muted,small,.footer,.ag-time,.ag-hours,.ag-slot-meta){color:var(--night-muted)!important}
 :root[data-theme=dark] :is(input,select,textarea){background:var(--night-nav)!important;color:var(--night-text)!important;border-color:var(--night-line)!important;accent-color:#79adff}
 :root[data-theme=dark] :is(input,textarea)::placeholder{color:#9cacbf!important;opacity:1}
 :root[data-theme=dark] :is(option,optgroup){background:var(--night-nav);color:var(--night-text)}
 :root[data-theme=dark] :is(.btn,.iconbtn){background:var(--night-raised)!important;color:var(--night-text)!important;border-color:var(--night-line)!important;box-shadow:none!important}
 :root[data-theme=dark] :is(.btn.primary,.cm-send,.phone-days button[aria-pressed=true],.ad-view button[aria-pressed=true],.phone-segments button.active,.phone-segments button[aria-pressed=true]){background:#2563eb!important;color:white!important;border-color:#5797ff!important}
 :root[data-theme=dark] .btn.danger{background:#3b202d!important;color:#ffb6c0!important;border-color:#935365!important}
 :root[data-theme=dark] :is(.nav button.active,.tabs button.active,.mobile-nav .active,.bottom-nav .active){background:#193d73!important;color:#dceaff!important}
 :root[data-theme=dark] :is(.tabs,.ad-view,.ad-kpis>div,.ag-counters>div,.ag-strip,.team-week-person,thead th,.phone-days,.phone-segments){background:var(--night-raised)!important;color:var(--night-text)!important}
 :root[data-theme=dark] :is(.ad-kpis b,.link,.ad-panel summary,.ag-planning-actions summary){color:#94beff!important}
 :root[data-theme=dark] :is(.notice,.alert,.chip.warn,.ha-gap){background:#352b1d!important;color:#ffdb9f!important;border-color:#79623d!important}
 :root[data-theme=dark] :is(.chip.ok,.ha-ok){background:#19382f!important;color:#a3edc3!important}
 :root[data-theme=dark] :is(.chip.bad,.alert.urgent){background:#3b202d!important;color:#ffb6c0!important;border-color:#935365!important}
 :root[data-theme=dark] :is(.avatar,.chip,.chip.blue){background:#233b5c!important;color:#d5e5ff!important}
 :root[data-theme=dark] :is(.ag-slot,.ag-timeline-card,.ha-slot,.team-slot,.phone-event){background:color-mix(in srgb,var(--ag-color,#4288e8) 24%,var(--night-surface))!important;color:var(--night-text)!important;border-color:var(--night-line)!important;border-left-color:var(--ag-color,#79adff)!important;box-shadow:none!important}
 :root[data-theme=dark] :is(.ag-slot,.ag-timeline-card,.ha-slot,.team-slot,.phone-event) :is(strong,span,small){color:inherit!important}
 :root[data-theme=dark] :is(.ag-timeline-mmm,[data-night-activity=mmm]){background:#202630!important;color:#f1f5f9!important;border:1px solid #748398!important;border-left:3px solid #9cabbf!important}
 :root[data-theme=dark] :is(.ag-pause,.ag-timeline-pause,[data-night-activity=pause]){background:repeating-linear-gradient(135deg,#263346,#263346 4px,#354459 4px,#354459 5px)!important;color:#d5dfeb!important}
 :root[data-theme=dark] .ag-timeline-row:before{background:#35465e!important}
 :root[data-theme=dark] .ag-timeline-row:after{border-color:var(--night-bg)!important;background:#94beff!important}
 :root[data-theme=dark] .ag-strip>span{background:color-mix(in srgb,var(--ag-color,#4288e8) 28%,#172337)!important;color:white!important;border-right-color:#101a2b!important}
 :root[data-theme=dark] dialog::backdrop{background:#020713b8;backdrop-filter:blur(4px)}
 :root[data-theme=dark] .cm-v2{--chat-bg:#0b1220;--chat-surface:#172337;--chat-text:#f1f5f9;--chat-muted:#abbad0;--chat-border:#35465e;--chat-sent:#2563eb;--chat-received:#1e2d43;--chat-important:#352b1d;--chat-important-text:#ffdb9f}
 :root[data-theme=dark] .cm-v2 .cm-message.mine{background:#2563eb!important;color:white!important}
 :root[data-theme=dark] :is(button,a,input,select,textarea,summary):focus-visible{outline:3px solid #94beff!important;outline-offset:3px}
 :root[data-theme=dark] ::selection{background:#3263a2;color:white}
 :root[data-theme=dark]{scrollbar-color:#536780 #101a2b}
 .night-theme-settings .night-choice{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.night-choice button{flex:1;min-width:95px}.night-choice button[aria-pressed=true]{outline:2px solid #4385f5;outline-offset:2px}.night-theme-toggle{flex-shrink:0}
 @media(prefers-contrast:more){:root[data-theme=dark]{--night-line:#8194ae;--night-muted:#d7e1ed}}
 @media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}
}
@media screen {
 :root[data-theme=dark] :is(h1,h2,h3,h4,.metric-value,.ad-kpis b,.ag-counters b,.brand span){color:#f1f5f9!important}
 :root[data-theme=dark] :is(.help,.sidebar-foot){background:#101a2b!important;color:#abbad0!important}
 :root[data-theme=dark] .cm-v2 .cm-messages{background:#0b1220!important}
 :root[data-theme=dark] .cm-v2 .cm-message:not(.mine):not(.is-important){background:#1e2d43!important;color:#f1f5f9!important}
 :root[data-theme=dark] .cm-v2 .cm-message.is-important{background:#352b1d!important;color:#ffdb9f!important}
 :root[data-theme=dark] .cm-v2 .cm-message.mine :is(small,time){color:#e1edff!important}
}
@media screen {
 :root[data-theme=dark] [data-night-activity=public]{--night-color:#438bfa}
 :root[data-theme=dark] [data-night-activity=edn]{--night-color:#efa44f}
 :root[data-theme=dark] [data-night-activity=aquagym]{--night-color:#a58af5}
 :root[data-theme=dark] [data-night-activity=bike]{--night-color:#d99bce}
 :root[data-theme=dark] [data-night-activity=cdl]{--night-color:#8acb72}
 :root[data-theme=dark] :is([data-night-activity=public],[data-night-activity=edn],[data-night-activity=aquagym],[data-night-activity=bike],[data-night-activity=cdl]){background:color-mix(in srgb,var(--night-color) 28%,#172337)!important;color:#f1f5f9!important;border-left-color:var(--night-color)!important}
}
@media screen {
 :root[data-theme=dark] :is(.phone-nav,.modal-foot){background:#101a2b!important;color:#abbad0!important;border-color:#35465e!important}
 :root[data-theme=dark] .phone-nav button.active{background:#193d73!important;color:#dceaff!important}
 :root[data-theme=dark] .ag-modern .phone-days{background:#0b1220!important}
}
