/* SYLICOM Distribution V5.8.12 — Apparence commune jour / nuit.
   La palette vert pétrole et or reste celle du mode nuit (défaut).
   Le mode jour applique une palette claire à tous les écrans de gestion.
*/
.sylicom-theme-header-actions {display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;min-width:0}
.sylicom-theme-toggle{
 display:inline-flex;align-items:center;justify-content:center;gap:8px;
 padding:10px 14px;min-height:40px;white-space:nowrap;
 border-radius:11px;border:1px solid #cda85d;background:#114c56;
 color:#f6db96;box-shadow:0 4px 16px rgba(0,25,30,.14);
 cursor:pointer;font:700 12px 'DM Sans',Arial,sans-serif;
 transition:background .2s,color .2s,border-color .2s,box-shadow .2s;
}
.sylicom-theme-toggle:hover{background:#1c6972;border-color:#f0be50}
.sylicom-theme-toggle:focus-visible{outline:3px solid #f0be50;outline-offset:3px}
.sylicom-theme-toggle svg{width:18px;height:18px;flex:none}
html[data-theme="dark"] .sylicom-theme-sun,html[data-theme="light"] .sylicom-theme-moon{display:none}
.sylicom-theme-floating{position:fixed;right:20px;top:18px;z-index:1100}
html[data-theme="light"] .sylicom-theme-toggle{background:#fff;color:#16505a;border-color:#c0d2cd;box-shadow:0 3px 13px rgba(23,67,69,.08)}
html[data-theme="light"] .sylicom-theme-toggle:hover{background:#e9f3ed;border-color:#a88435}
@media(max-width:760px){.sylicom-theme-header-actions{justify-content:flex-start;gap:8px}.sylicom-theme-toggle{min-height:37px;padding:9px 11px}.sylicom-theme-floating{right:12px;top:10px;z-index:1100}}
@media print{.sylicom-theme-toggle{display:none!important}}

@media screen{
html[data-theme="light"]{
 color-scheme:light;
 --bg:#f3f7f5;--sidebar:#e7f0ec;--panel:#ffffff;--panel2:#f0f7f4;
 --line:#cfdfd9;--orange:#b7862f;--gold:#ae7c24;--gold-light:#91651c;
 --cream:#163a3e;--muted:#5c7376;--yellow:#ae7c24;--green:#176b54;
 --surface-hi:#f4f9f6;--surface-low:#e8f2ec;--focus-ring:rgba(16,109,104,.16);
}
html[data-theme="light"] body{background:radial-gradient(ellipse at 95% 0%,#e0f0e6,transparent 45%),#f3f7f5;color:#163a3e}
html[data-theme="light"] ::selection{background:#edd59c;color:#173c3f}
html[data-theme="light"] h1,html[data-theme="light"] h2,html[data-theme="light"] h3{color:#14383d}
html[data-theme="light"] .muted,html[data-theme="light"] p.small,html[data-theme="light"] .rule-help,html[data-theme="light"] .field-help{color:#526e72}
html[data-theme="light"] .sidebar{background:linear-gradient(170deg,#edf6f0,#ddece5);border-color:#cadbd4;box-shadow:5px 0 22px rgba(25,65,59,.04)}
html[data-theme="light"] .sidebar .brand{color:#134d50;border-color:#cedfd5}
html[data-theme="light"] .sidebar .brand-company{color:#173e43}
html[data-theme="light"] .sidebar .brand svg{color:#f7d688;background:linear-gradient(155deg,#0e5960,#1b7776);border-color:#b88b36}
html[data-theme="light"] .nav{scrollbar-color:#a8c9bf #e7f1ec}
html[data-theme="light"] .nav a{color:#345c60}
html[data-theme="light"] .nav a:hover{background:#d4e8df;border-color:#b8d5ca;color:#124b52}
html[data-theme="light"] .nav a.active,html[data-theme="light"] .nav a[aria-current="page"]{background:linear-gradient(90deg,#f6e8c9,#d5e8df);border-color:#dfc58b;border-left-color:#b7872d;color:#174549;box-shadow:none}
html[data-theme="light"] .nav a.active svg{color:#94651d}
html[data-theme="light"] .sidefoot{color:#527175;border-color:#cadcd1}
html[data-theme="light"] .sidefoot strong{color:#173d42}
html[data-theme="light"] .header{border-color:#d2e1d8}
html[data-theme="light"] .eyebrow{color:#996e24}
html[data-theme="light"] .pill{background:#fff;border-color:#cdded5;color:#36575d}
html[data-theme="light"] .card,html[data-theme="light"] .panel,html[data-theme="light"] .kpi-chart,html[data-theme="light"] .stock-kpis .stock-summary{
 background:#fff;border:1px solid #d4e3dc;box-shadow:0 10px 32px rgba(35,75,62,.065);color:#17393e;
}
html[data-theme="light"] .panel h2{color:#17494c;border-color:#e0e9df}
html[data-theme="light"] .card .label{color:#597578}
html[data-theme="light"] .card .value{color:#173b3e}
html[data-theme="light"] .card:hover{border-color:#bea164}
html[data-theme="light"] .hero{background:radial-gradient(ellipse at 95% 10%,#edf3d7 0%,transparent 65%),linear-gradient(120deg,#e3f0e7,#f8fbf7);border-color:#d2bf8f;box-shadow:0 12px 32px rgba(35,75,62,.05)}
html[data-theme="light"] .hero h2{color:#173e42}
html[data-theme="light"] .hero p{color:#506c70}
html[data-theme="light"] .hero strong{color:#a07020}
html[data-theme="light"] th{color:#42686b;background:#f0f6f2}
html[data-theme="light"] td{color:#23474c}
html[data-theme="light"] th,html[data-theme="light"] td{border-bottom:1px solid #e0eae4}
html[data-theme="light"] tbody tr:hover{background:#f0f7f2}
html[data-theme="light"] label{color:#274b4e}
html[data-theme="light"] input,html[data-theme="light"] select,html[data-theme="light"] textarea{color:#1b3c41;background:#fff;border-color:#c8dcd2;accent-color:#117c73}
html[data-theme="light"] input:hover,html[data-theme="light"] select:hover,html[data-theme="light"] textarea:hover{border-color:#9cbfb1}
html[data-theme="light"] input:focus,html[data-theme="light"] select:focus,html[data-theme="light"] textarea:focus{border-color:#168179;box-shadow:0 0 0 3px rgba(16,109,104,.15)}
html[data-theme="light"] input::placeholder,html[data-theme="light"] textarea::placeholder{color:#80979b}
html[data-theme="light"] option{background:#fff;color:#163b3e}
html[data-theme="light"] input[type="file"]::file-selector-button{background:#e8f2eb;border-color:#c7d8cd;color:#295456}
html[data-theme="light"] .btn{background:#e9f3ed;border-color:#bcd2c6;color:#18545b}
html[data-theme="light"] .btn:hover{background:#d7e9df;border-color:#93b7a8}
html[data-theme="light"] .btn.primary{background:linear-gradient(120deg,#efd48c,#e4b956);border-color:#d6ae54;color:#244344;box-shadow:0 4px 11px rgba(147,104,36,.12)}
html[data-theme="light"] .btn.primary:hover{background:#f6dfa4}
html[data-theme="light"] .btn.ghost{background:#fff;color:#195e62;border-color:#bcd2c7}
html[data-theme="light"] .btn.ghost:hover{background:#e3f1e7;border-color:#b48a41}
html[data-theme="light"] .table-link{color:#976b22}
html[data-theme="light"] .alert{background:#fff0e7;color:#783e29;border-color:#eab39d}
html[data-theme="light"] .alert.success,html[data-theme="light"] .success{background:#e4f6e9;color:#1b6345;border-color:#9dcbb1}
html[data-theme="light"] .badge{background:#f7eac8;color:#775625;border-color:#dfc78d}
html[data-theme="light"] .badge.ok{background:#ddf4e5;color:#256746;border-color:#acd8b8}
html[data-theme="light"] .footer{color:#658080;border-color:#d8e5db}
html[data-theme="light"] .notice{color:#416467}
html[data-theme="light"] .big-number,html[data-theme="light"] .stock-summary b{color:#9b7026}
html[data-theme="light"] .kpi-chart .tick{fill:#557375}
html[data-theme="light"] .kpi-chart .bars{fill:#b58b3b}
html[data-theme="light"] .kpi-chart .bar-expense{fill:#328379}
html[data-theme="light"] .vente-total{background:linear-gradient(105deg,#dbeee2,#f7f8ed);border-color:#c5d9c9;color:#1a4d51}
html[data-theme="light"] .vente-total .vente-total-label{color:#577071}
html[data-theme="light"] .vente-total output{color:#93651f}
html[data-theme="light"] .vente-total .vente-total-sub{color:#557071}
html[data-theme="light"] .product-image{background:#eff6ef;border-color:#ccddd2}
html[data-theme="light"] .commission-balance .balance-item{background:#f3f8f4;border-color:#cbded2}
html[data-theme="light"] .commission-balance span{color:#577175}
html[data-theme="light"] .commission-balance strong{color:#1d4649}
html[data-theme="light"] .commission-balance .due strong{color:#976b20}
html[data-theme="light"] .invoice-tip{background:#e7f3eb;color:#355e60;border-color:#bad3c8}
html[data-theme="light"] .field-error{color:#a14039}
html[data-theme="light"] .sale-payment-body{background:#fff;border-color:#cedfd4;color:#153f44;box-shadow:0 10px 26px rgba(20,70,55,.08)}
html[data-theme="light"] .sale-payment-summary{color:#355a5f}
html[data-theme="light"] .sale-payment-summary strong{color:#986d23}
html[data-theme="light"] .auth{background:radial-gradient(ellipse at 50% 0%,#d5e8db,transparent 65%),#f4f8f5}
html[data-theme="light"] .auth::before{border-color:#e6c57b;box-shadow:0 -13px 35px rgba(224,184,91,.12)}
html[data-theme="light"] .auth-card{background:#fff;border-color:#d4e2d8;color:#194247;box-shadow:0 20px 60px rgba(34,81,62,.13)}
html[data-theme="light"] .auth-card p{color:#567376}
html[data-theme="light"] .auth-card .footer{color:#6a8483}
html[data-theme="light"] body.auth .auth-card a{color:#93651e}
html[data-theme="light"] .notice-count{background:#e4bb5f;color:#273f3e}
html[data-theme="light"] .mission-driver-details{color:#557678}
html[data-theme="light"] .mission-not-delivered{border-color:#b56b62!important;color:#963d39!important}
/* Espace Super Admin : appliquer le même thème sans modifier les permissions. */
html[data-theme="light"] .admin-body{--bg:#f3f7f5;--sidebar:#e7f0ec;--panel:#fff;--panel2:#f1f7f3;--line:#d1e1d8;--orange:#a77927;--cream:#163b3e;--muted:#5c7476;background:#f3f7f5;color:#173e43}
html[data-theme="light"] .admin-sidebar{background:linear-gradient(170deg,#eaf4ed,#dbeae2);border-color:#cadcd2}
html[data-theme="light"] .admin-brand{border-color:#cbddd2}
html[data-theme="light"] .admin-brand strong{color:#174448}
html[data-theme="light"] .admin-brand small{color:#8e6a2e}
html[data-theme="light"] .admin-label{color:#667f7e}
html[data-theme="light"] .admin-nav a{color:#345d61}
html[data-theme="light"] .admin-nav a:hover{background:#d7eae0;color:#124b50;border-color:#c1d9cb}
html[data-theme="light"] .admin-nav a.active{background:#f1e6ca;color:#25494c;border-color:#ddc68d;box-shadow:inset 3px 0 #af8133}
html[data-theme="light"] .admin-nav svg{color:#9a752f}
html[data-theme="light"] .admin-sidebottom{border-color:#d0dfd5}
html[data-theme="light"] .admin-avatar{background:#e9c36f;color:#244347}
html[data-theme="light"] .admin-account strong{color:#20484c}
html[data-theme="light"] .admin-account small{color:#638082}
html[data-theme="light"] .admin-logout,html[data-theme="light"] .admin-logout-top{background:#fff;border-color:#c9dcd0;color:#245459}
html[data-theme="light"] .admin-logout:hover,html[data-theme="light"] .admin-logout-top:hover{background:#e0eee5;border-color:#ad914b}
html[data-theme="light"] .admin-main{background:radial-gradient(ellipse at 100% 0%,#e7f2e9,transparent 55%),#f3f7f5}
html[data-theme="light"] .admin-top{border-color:#cfded5}
html[data-theme="light"] .admin-top h1{color:#163b3e}
html[data-theme="light"] .admin-top p{color:#597477}
html[data-theme="light"] .admin-kicker{color:#977026}
html[data-theme="light"] .admin-datestamp{background:#fff;border-color:#d0e0d6;color:#365e60}
html[data-theme="light"] .admin-datestamp svg{color:#9e7527}
html[data-theme="light"] .admin-card-facts .card{background:#fff}
html[data-theme="light"] .admin-client-id{color:#638083}
html[data-theme="light"] .admin-client-name{color:#19484a}
html[data-theme="light"] .admin-nav a.admin-upgrade-v585{background:#f4ead0;color:#725321;border-color:#d9c48f}
html[data-theme="light"] .admin-nav a.admin-upgrade-v585:hover{background:#f1e0ac}
/* Page V5 de migration autonome, utilisant des styles intégrés. */
html[data-theme="light"] body:has(main > .tag){background:#f3f7f5;color:#1d4447}
html[data-theme="light"] body:has(main > .tag) main{background:#fff;border-color:#d3dfd5;color:#1b4347;box-shadow:0 18px 45px rgba(35,70,60,.08)}
html[data-theme="light"] body:has(main > .tag) small,html[data-theme="light"] body:has(main > .tag) .muted{color:#557176}
html[data-theme="light"] body:has(main > .tag) .checks td{border-color:#dae7dd;color:#234b4e}
html[data-theme="light"] body:has(main > .tag) .checks td:last-child{color:#207253}
html[data-theme="light"] body:has(main > .tag) .foot{border-color:#dae6dc;color:#567675}
}
