:root{color-scheme:light}.badge.issued{color:#226a90}.badge.cancelled{color:#5e6672}.theme-toggle{border:1px solid var(--line);border-radius:8px;background:var(--white);color:var(--ink);min-height:40px;padding:7px 12px;font-size:.78rem;white-space:nowrap}.sidebar>.theme-toggle{margin:14px 0}.mobile-header>.theme-toggle{margin-left:auto;margin-right:10px;font-size:.7rem}
[data-theme=dark]{color-scheme:dark;--ink:#f5f5f5;--muted:#b8b8b8;--paper:#080808;--white:#141414;--accent:#ededed;--accent-soft:#262626;--line:#3d3d3d;--red:#ffaaa2}
[data-theme=dark] body{background:var(--paper);color:var(--ink)}
[data-theme=dark] :is(.panel,.metric,.client-hub,.sidebar,.mobile-header,.topbar,.editor,.project-card,.dd-listing,.dd-upload,.dd-dialog,.choice-popup,.choice-trigger,.auth-card,.auth-content,.cg-tool){background:var(--white);color:var(--ink);border-color:var(--line)}
[data-theme=dark] :is(input,textarea,select,.search-box,.choice-search){background:#0c0c0c;color:#f5f5f5;border-color:#676767}
[data-theme=dark] :is(input,textarea)::placeholder{color:#a0aec2}
[data-theme=dark] :is(input,select):disabled{background:#292929;color:#c0cad8}
[data-theme=dark] :is(.button,.button.small){background:#dce8ff;color:#142035;border-color:#dce8ff}
[data-theme=dark] :is(.button.secondary,.text-button,.icon-button,.logout,.cg-tool,.row-action){background:transparent;color:#e2e8f0;border-color:#676767}
[data-theme=dark] :is(.button.secondary,.cg-tool,.choice-trigger):hover{background:#292929}
[data-theme=dark] .danger{color:#ffb1a9!important;border-color:#99483f!important}
[data-theme=dark] :is(th,.finance-period,.panel-footer,.dd-selection,.dd-dropzone,.dd-icon-file,.invoice-list thead,.message,.service-money-summary,.service-price-preview,.ai-message.user){background:#202020;color:var(--ink);border-color:var(--line)}
[data-theme=dark] :is(.panel-heading,.simple-row,.agenda-row,.renewal-row,.note,.requirement,td){border-color:var(--line)}
[data-theme=dark] :is(.choice-option:hover,.choice-option.is-highlighted,.dd-item:hover,[data-row-link]:hover,.billing-item:hover){background:#292929}
[data-theme=dark] :is(.choice-option[aria-selected=true],.choice-check){color:#abc9ff}
[data-theme=dark] .sidebar nav a{color:#bbc7d8}[data-theme=dark] .sidebar nav a[aria-current]{color:#111c2d;background:#dce8ff}
[data-theme=dark] :is(.sidebar nav a>.section-icon,.client-monogram,.large-monogram){background:#292929;color:#bfd0e7}
[data-theme=dark] .sidebar nav a[aria-current]>.section-icon{color:#183356;background:#bcd0ef}
[data-theme=dark] .brand-logo{background:transparent;filter:url(#brand-on-dark);mix-blend-mode:normal}
[data-theme=dark] .panel[data-section-kind]>.panel-heading{background:#1c1c1c}
[data-theme=dark] :is(.panel-heading .section-icon,.eyebrow){color:#a5bde5}
[data-theme=dark] .page-heading{border-color:#7fa6ff}
[data-theme=dark] :is(.badge,.status-colored){color:#172334}[data-theme=dark] .badge.neutral{background:#333333;color:#edf3fc}
[data-theme=dark] .badge.paid{background:#c8eee2;color:#064f43}[data-theme=dark] .badge.planned{background:#e5dafe;color:#4a278c}[data-theme=dark] .badge.overdue{background:#ffd8d3;color:#8d231b}
[data-theme=dark] .errorlist,[data-theme=dark] .message.error{background:#40262c;color:#ffcdc6}
[data-theme=dark] .sticky-note{background:#181818;color:#f5f5f5;border-color:#c9a54c}[data-theme=dark] .sticky-note textarea{background:#0c0c0c;color:#f5f5f5}
[data-theme=dark] .flatpickr-calendar{background:#202020;border-color:#676767;box-shadow:0 12px 35px #0008}
[data-theme=dark] :is(.flatpickr-month,.flatpickr-current-month,.flatpickr-weekday,.flatpickr-day,.flatpickr-monthSelect-month){color:#edf3fc}
[data-theme=dark] :is(.flatpickr-prev-month,.flatpickr-next-month){fill:#edf3fc;color:#edf3fc}
[data-theme=dark] :is(.flatpickr-day:hover,.flatpickr-monthSelect-month:hover){background:#363636;border-color:#363636}
[data-theme=dark] :is(.flatpickr-day.prevMonthDay,.flatpickr-day.nextMonthDay){color:#8392a7}
[data-theme=dark] :is(.flatpickr-day.selected,.flatpickr-monthSelect-month.selected){background:#b3cfff;color:#152a48;border-color:#b3cfff}
[data-theme=dark] :is(.cg-stage,.cg-viewport,.cg-canvas){background-color:#0c0c0c;border-color:#424242}
[data-theme=dark] .cg-node{background:#1c1c1c;color:#f5f5f5;border-color:#737373}
[data-theme=dark] .cg-node--client{background:#c8dbf9;color:#172b49}
[data-theme=dark] :is(.dd-icon,.dd-name,.dd-heading){color:#e4edfb}
[data-theme=dark] .dd-item.is-selected{background:#303030}
[data-theme=dark] .entity-logo,[data-theme=dark] .choice-avatar img{background:transparent}
[data-theme=dark] :is(.dd-layout [aria-pressed=true],.ai-history>a[aria-current]){background:#c4d9fa;color:#173050}
@media print{[data-theme-toggle]{display:none!important}html[data-theme=dark]{--ink:#111;--muted:#555;--white:#fff;--paper:#fff;--line:#ddd;color-scheme:light}}

[data-theme=dark] [data-section-kind]{--section-color:#b4c2d7;--section-tint:#262626}
[data-theme=dark] [data-section-kind=clients]{--section-color:#a5c2ff}
[data-theme=dark] [data-section-kind=projects]{--section-color:#c9adff}
[data-theme=dark] [data-section-kind=internal-projects]{--section-color:#87d6ed}
[data-theme=dark] [data-section-kind=activities],[data-theme=dark] [data-section-kind=reminders]{--section-color:#f5d183}
[data-theme=dark] [data-section-kind=services]{--section-color:#8ce0d5}
[data-theme=dark] [data-section-kind=invoices]{--section-color:#8ad9a5}
[data-theme=dark] [data-section-kind=expenses]{--section-color:#ffb28e}
[data-theme=dark] [data-section-kind=notes]{--section-color:#d6b1ff}
[data-theme=dark] [data-section-kind=collaborators]{--section-color:#f6a6ce}
[data-theme=dark] [data-section-kind=documents],[data-theme=dark] [data-section-kind=websites]{--section-color:#93d5ff}
[data-theme=dark] .count-pill,[data-theme=dark] .cg-count{background:#353535;color:#edf4ff;border-color:#737373}
[data-theme=dark] .choice-chevron{color:#b8c6db}
[data-theme=dark] .metric.attention>strong{color:#ffba92}
[data-theme=dark] :is(.dd-tools-links,.dd-upload-wrap,.file-drop,.pdf-drop,.pdf-notice){background:#202020;color:var(--ink)}
[data-theme=dark] :is(.dd-select-bar,.dd-dropzone,.file-drop.is-dragover,.pdf-drop.is-dragging){background:#202020;color:var(--ink);border-color:#737373}
[data-theme=dark] .dd .dd-layout .button[aria-pressed=true],[data-theme=dark] .dd .dd-layout .button[aria-pressed=true]:hover{background:#c4d9fa;border-color:#c4d9fa;color:#173050}
[data-theme=dark] .dd-tools-links .button:hover{background:#333333}
[data-theme=dark] .dd .dd-icon svg{fill:#353535}
[data-theme=dark] .dd .dd-upload-target,[data-theme=dark] .dd .dd-drop-target,[data-theme=dark] .dd.dd-external-drag .dd-listing{background:#333333;color:var(--ink)}
[data-theme=dark] .dd .dd-drop-indicator{background:#c4d9fa;color:#173050}
[data-theme=dark] :is(.dd-upload-error,.dd-dialog-error,.dd-queue-item.is-error .dd-queue-status,.pdf-upload-status .is-error){color:#ffb1a9}
[data-theme=dark] :is(.dd-queue-item.is-done .dd-queue-status,.dd-queue-item.is-success .dd-queue-status){color:#8ad9a5}
[data-theme=dark] .cg-node--client :is(.cg-sub,.cg-detail,.cg-state,.cg-open,.cg-state-link){color:#203653;border-color:#7e98bd}
[data-theme=dark] .cg-node--client .cg-count{background:#353535;color:#fff}
[data-theme=dark] .cg-node--client :focus-visible{outline-color:#172b49}
[data-theme=dark] .cg-phase--closed .cg-title{color:#bac8dc}
[data-theme=dark] .cg .badge.active,[data-theme=dark] .cg.is-fullscreen .cg-tool--fullscreen{background:#c4d9fa;color:#173050}
[data-theme=dark] .cg .badge.potential,[data-theme=dark] .cg-retry{background:#262626;color:#edf4ff}
[data-theme=dark] :is(.pdf-drop span,.pdf-drop small,.pdf-drop .pdf-drop-icon,.pdf-source dt,.pdf-discard summary){color:#bdcbe0}
[data-theme=dark] .invoice-list th[aria-sort=ascending],[data-theme=dark] .invoice-list th[aria-sort=descending]{background:#353535;color:#edf4ff}
[data-theme=dark] .row-action:hover{background:#353535;border-color:#737373}
[data-theme=dark] .row-action.danger:hover{background:#502d31;border-color:#99564f}
[data-theme=dark] .sticky-note .help{color:var(--muted)}
[data-theme=dark] .sticky-note .danger{color:#ffb1a9!important}
[data-theme=dark] .sticky-note textarea::placeholder{color:#b8b8b8;opacity:1}
[data-theme=dark] .sidebar nav a:hover{background:#292929;color:#edf4ff}
[data-theme=dark] .sidebar nav a[aria-current]:hover{background:#dce8ff;color:#142035}
[data-theme=dark] :is(a,button,input,select,textarea,summary):focus-visible{outline-color:#95baff}
[data-theme=dark] .secret-key{background:#262626;color:#edf4ff}
[data-theme=dark] .skip{background:#c4d9fa;color:#173050}
[data-theme=dark] .sidebar nav a[data-section-kind]>.section-icon{background:#262626;color:var(--section-color)}
[data-theme=dark] .sidebar nav a[data-section-kind][aria-current]{background:#262626;color:var(--section-color)}
[data-theme=dark] .finance-kpis .finance-income{border-color:#8ad9a5}
[data-theme=dark] .finance-kpis .finance-cost{border-color:#ffb28e}
[data-theme=dark] .finance-kpis .finance-work{border-color:#c9adff}
[data-theme=dark] .finance-kpis .finance-renewal{border-color:#87d6ed}
[data-theme=dark] .finance-undated{background:#3b3020;color:#ffddb0}
[data-theme=dark] .finance-undated :is(b,a,small){color:#ffddb0}

/* Dark lists keep the same surface, regardless of the logo. */
[data-theme=dark] :is(.record-list tbody tr,.billing-client>summary){background:var(--white);color:var(--ink)}
[data-theme=dark] :is(.record-list tbody tr:hover,.billing-client>summary:hover){background:#252525}
[data-theme=dark] :is(.entity-logo,.logo-slot .entity-logo,.choice-avatar,.choice-avatar img,.client-hub .large-monogram:has(img)){background:transparent;border-color:transparent}
[data-theme=dark] img[data-logo-treatment=reverse]{filter:brightness(0) invert(.96)}
[data-theme=dark] img[data-logo-tone=dark][data-logo-treatment=original]{filter:brightness(1.3)}
[data-theme=dark] img[data-logo-treatment=outline]{filter:drop-shadow(0 0 .65px #e2e8f0)}
[data-theme=dark] img[data-logo-treatment=paper]{filter:url(#logo-paper-on-dark) brightness(1.3)}
[data-theme=dark] img[data-logo-treatment=paper-reverse]{filter:url(#brand-on-dark)}
[data-theme=dark] :is(.lifecycle,.security-strip,.invoice-originals,.service-coverage){background:var(--white);color:var(--ink);border-color:var(--line)}
[data-theme=dark] .choice-copy small,[data-theme=dark] .choice-empty{color:var(--muted)}
[data-theme=dark] .choice-trigger[aria-expanded=true]{background:#252525;border-color:#95baff}
[data-theme=dark] :is(.choice-option:hover,.choice-option.is-highlighted){background:#333333;color:#f5f5f5}
[data-theme=dark] .choice-trigger:disabled{background:#292929;color:#c0cad8}
[data-theme=dark] .button.danger{background:#40262c;color:#ffb1a9;border-color:#a56058}
[data-theme=dark] .button.danger:hover{background:#543038}
[data-theme=dark] .message.success{background:#173c32;color:#b2efd0;border-color:#4d9975}
[data-theme=dark] .check-button{background:#292929;color:#d6e2f2;border-color:#71839d}
[data-theme=dark] .done .check-button{background:#18463b;color:#b2efd0;border-color:#579b7f}
[data-theme=dark] :is(.priority,.project-card-bottom,.project-card-bottom span){color:var(--muted)}
[data-theme=dark] .sticky-note :focus-visible{outline-color:#95baff}
[data-theme=dark] :is(.agenda-row:hover,.simple-row[href]:hover,.renewal-row:hover,tbody tr:hover){background:#252525}
[data-theme=dark] .choice-avatar{color:#e5e5e5}
[data-theme=dark] :is(.sticky-new,.sticky-note.priority-1,.sticky-note.priority-3){background:#181818}
[data-theme=dark] .sticky-note header{color:var(--muted)}
[data-theme=dark] .sticky-note.priority-1{border-top-color:#ffaaa2}
[data-theme=dark] .sticky-note.priority-3{border-top-color:#a5c2ff}
[data-theme=dark] :is(.dd-dropzone.is-dragover,.dd-upload.is-dragover .dd-dropzone){background:#292929;color:var(--ink);border-color:#95baff}
[data-theme=dark] .cg-tool:active{background:#333;color:#f5f5f5}
[data-theme=dark] .pdf-drop.is-dragging{outline-color:#95baff}
[data-theme=dark] .studio-calendar :is(.flatpickr-prev-month:hover,.flatpickr-next-month:hover){background:#363636;color:#f5f5f5}
[data-theme=dark] .studio-calendar :is(.flatpickr-prev-month:hover,.flatpickr-next-month:hover) svg{fill:#f5f5f5}
[data-theme=dark] .studio-calendar .flatpickr-day.today{background:#333;color:#f5f5f5;border-color:#949494}
[data-theme=dark] .studio-calendar .flatpickr-day.selected{background:#c8d9f5;color:#152a48;border-color:#c8d9f5}
[data-theme=dark] progress{background:#343434}
[data-theme=dark] progress::-webkit-progress-bar{background:#343434}
[data-theme=dark] progress::-webkit-progress-value{background:#a5c2ff}
[data-theme=dark] progress::-moz-progress-bar{background:#a5c2ff}

/* Keep light surfaces uniform; adapt pale logos without dimming a backplate. */
[data-theme=light] img[data-logo-tone=light]{background:transparent;border-color:transparent;filter:brightness(.45)}
