/* Optional daylight palette. Layout and default night mode stay in dark.css. */
:root[data-theme="light"]{
  color-scheme:light;
  --bg:#f2f5f9;--surface:#fff;--raised:#f2f5f9;--ink:#172b41;
  --muted:#5c6f84;--line:#dce3eb;--accent:#087b70;--blue:#2f67b3;--amber:#8f5a16;
  --green:#087b70;--dark:#172b41;--soft:#eaf0f6;--green-light:#e4f2f0;
  --white:#fff;--orange:#8f5a16;--active-bg:#e4f2f0;--subtle:#75869a;--danger:#ac4141;
  color:var(--ink);background:var(--bg);
}
[data-theme="light"] body{color:var(--ink);background:var(--bg)}
[data-theme="light"] ::selection{background:#c9e7e0;color:#173e39}
[data-theme="light"] *{scrollbar-color:#c2cfdd #edf2f7}
[data-theme="light"] ::-webkit-scrollbar-track{background:#edf2f7}
[data-theme="light"] ::-webkit-scrollbar-thumb{background:#c2cfdd}
[data-theme="light"] a{color:var(--accent)}
[data-theme="light"] a:hover{color:#055b53}
[data-theme="light"] button:focus-visible,[data-theme="light"] a:focus-visible{outline-color:#087b70}
[data-theme="light"] input,[data-theme="light"] select,[data-theme="light"] textarea{color:#21384e;background:#fff;border-color:#cbd7e4}
[data-theme="light"] input:focus,[data-theme="light"] select:focus,[data-theme="light"] textarea:focus{border-color:#468e85;box-shadow:0 0 0 3px rgba(8,123,112,.08)}
[data-theme="light"] input::placeholder,[data-theme="light"] textarea::placeholder{color:var(--muted)}
[data-theme="light"] input[type=checkbox]{accent-color:#087b70}
[data-theme="light"] input[type=date],[data-theme="light"] input[type=datetime-local],[data-theme="light"] input[type=time]{color-scheme:light}
[data-theme="light"] select option{color:#21384e;background:#fff}
[data-theme="light"] .muted,[data-theme="light"] .note,[data-theme="light"] .subtle-note{color:var(--muted)}

[data-theme="light"] .sidebar{background:#f9fbfd;border-color:#dce3eb;box-shadow:3px 0 18px rgba(31,53,77,.025)}
[data-theme="light"] .sidebar .brand{color:#172b41}
[data-theme="light"] .sidebar .brand img{background:#fff;box-shadow:0 0 0 1px #e1e7ef}
[data-theme="light"] .sidebar .brand small{color:var(--muted)}
[data-theme="light"] .sidebar .nav-caption{color:var(--muted)}
[data-theme="light"] .sidebar nav a{color:#5c7086;border-color:transparent;background:transparent}
[data-theme="light"] .sidebar nav a:hover{background:#edf2f7;color:#233b53}
[data-theme="light"] .sidebar nav a.active{color:#066a61;background:#e4f2f0;border-color:#cce4de;box-shadow:none}
[data-theme="light"] .sidebar nav a.active:before{background:#087b70}
[data-theme="light"] .sidebar .nav-count{color:#256c69;background:#d8ebe7}
[data-theme="light"] .sidebar .sidebar-foot{color:var(--muted);border-color:#dce3eb}
[data-theme="light"] .sidebar-foot .local-tag{color:#537882}
[data-theme="light"] .sidebar-foot .local-tag i,[data-theme="light"] .connection i{background:#168b75;box-shadow:0 0 0 3px rgba(22,139,117,.07)}
[data-theme="light"] .sidebar-foot p{color:var(--muted)}
[data-theme="light"] .sidebar-foot>a{color:#537385;border-color:#dce3eb}
[data-theme="light"] .sidebar-foot>a:hover{color:#087b70}
[data-theme="light"] .sidebar-foot small{color:var(--muted)}
[data-theme="light"] .topbar{background:rgba(255,255,255,.94);border-color:#dce3eb;box-shadow:0 2px 12px rgba(40,60,84,.025)}
[data-theme="light"] .breadcrumb{color:var(--muted)}
[data-theme="light"] .breadcrumb b{color:var(--muted)}
[data-theme="light"] .breadcrumb strong{color:#354f68}
[data-theme="light"] .connection{color:#286a62;background:#edf7f3;border-color:#d5e9e0}
[data-theme="light"] .connection.error{color:#8f5a16;background:#fff5e6;border-color:#eed9b8}
[data-theme="light"] .connection.error i{background:#b77b2c}
[data-theme="light"] .workspace-avatar{color:#386b79;background:#e8f0f5;border-color:#cddde7}
[data-theme="light"] .icon-button{color:#647e94;background:transparent}
[data-theme="light"] .icon-button:hover{color:#086f65;background:#e8f1f2}
[data-theme="light"] .page-head{border-color:#dbe3ed}
[data-theme="light"] .page-head .eyebrow,[data-theme="light"] .eyebrow{color:#547d94}
[data-theme="light"] .page-head h1{color:#172b41}
[data-theme="light"] .page-head p,[data-theme="light"] .page-head p.description{color:#657b91}
[data-theme="light"] .primary{color:#fff;background:#087b70;border-color:#087b70;box-shadow:0 2px 6px rgba(8,123,112,.09)}
[data-theme="light"] .primary:hover{color:#fff;background:#05685f;border-color:#05685f;box-shadow:0 3px 10px rgba(8,123,112,.13)}
[data-theme="light"] .secondary{color:#405c76;background:#fff;border-color:#cedae6;box-shadow:none}
[data-theme="light"] .secondary:hover{color:#244760;background:#edf4f8;border-color:#afc4d6}
[data-theme="light"] .quiet{color:var(--muted);background:transparent}
[data-theme="light"] .quiet:hover{color:#2e5068;background:#eaf0f5}

[data-theme="light"] .metric{color:#172b41;background:linear-gradient(125deg,#fff,#fbfdff);border-color:#dce3eb;box-shadow:0 2px 8px rgba(42,65,90,.025)}
[data-theme="light"] .metric:before{background:#70a6b5}
[data-theme="light"] .metric:nth-child(2):before{background:#84a7d4}
[data-theme="light"] .metric:nth-child(3):before{background:#5ba995}
[data-theme="light"] .metric:nth-child(4):before{background:#c29e65}
[data-theme="light"] .metric-top{color:#536f87}
[data-theme="light"] .metric-icon{color:#4b7d93;background:#eaf2f7;border-color:#d5e3ed}
[data-theme="light"] .metric:nth-child(2) .metric-icon{color:#476fa3;background:#edf2fb;border-color:#d9e4f4}
[data-theme="light"] .metric:nth-child(3) .metric-icon{color:#217e6d;background:#eaf5ef;border-color:#d1e7dd}
[data-theme="light"] .metric:nth-child(4) .metric-icon{color:#996c2e;background:#fbf4e9;border-color:#eadfc9}
[data-theme="light"] .metric-value{color:#19324b}
[data-theme="light"] .metric-value small{color:var(--muted)}
[data-theme="light"] .metric-foot{color:var(--muted)}
[data-theme="light"] .metric-foot strong{color:#347a7a}
[data-theme="light"] .metric-pending .metric-value{color:#946022}
[data-theme="light"] .panel{background:#fff;border-color:#dce3eb;box-shadow:0 2px 8px rgba(42,65,90,.02)}
[data-theme="light"] .panel-heading h2{color:#254259}
[data-theme="light"] .panel-heading p{color:var(--muted)}
[data-theme="light"] .panel-heading a{color:#257d79}
[data-theme="light"] .financial-grid{border-color:#e0e7ef}
[data-theme="light"] .financial-grid span{color:var(--muted)}
[data-theme="light"] .financial-grid strong{color:#284c65}
[data-theme="light"] .financial-grid strong small{color:var(--muted)}
[data-theme="light"] .financial-grid>div:nth-child(2) strong{color:#966b37}
[data-theme="light"] .mini-chart{border-color:#d7e1eb;background:repeating-linear-gradient(to top,transparent 0px,transparent 39px,#e6edf4 40px,transparent 41px)}
[data-theme="light"] .chart-column{color:var(--muted)}
[data-theme="light"] .chart-value{color:#5d7c94}
[data-theme="light"] .chart-bar{background:linear-gradient(to top,#16877d,#56b7a9);border-color:#399a8c;box-shadow:none}
[data-theme="light"] .chart-bar.negative{background:linear-gradient(to top,#ad805c,#d3ad88);border-color:#b58e6a}
[data-theme="light"] .chart-bar.unavailable{background:repeating-linear-gradient(135deg,#dae3ec,#dae3ec 3px,#edf2f7 3px,#edf2f7 6px);border-color:#cbd7e2}
[data-theme="light"] .subtle-note{color:var(--muted)}
[data-theme="light"] .quick-link{color:#3d5b72;border-color:#e1e8ef;background:transparent}
[data-theme="light"] .quick-link:hover{color:#183c50;background:#f1f6f9}
[data-theme="light"] .quick-link .quick-icon{color:#5a8a9e;background:#edf4f8;border-color:#d7e5ee}
[data-theme="light"] .quick-link small{color:var(--muted)}
[data-theme="light"] .quick-number{color:#46758c}
[data-theme="light"] .progress-label{color:#55738c}
[data-theme="light"] .progress-label>span:last-child{color:var(--muted)}
[data-theme="light"] .progress-track,[data-theme="light"] .bar-track{background:#e5edf4}
[data-theme="light"] .progress-track i,[data-theme="light"] .bar-track i{background:linear-gradient(90deg,#3c8f93,#63b6a5)}

[data-theme="light"] .toolbar{background:#f8fafc;border-color:#dce3eb}
[data-theme="light"] .toolbar .search-box{color:var(--muted);background:#fff;border-color:#d3deea}
[data-theme="light"] .toolbar .search-box input,[data-theme="light"] .toolbar .search-box input:focus{color:#29465d;background:transparent}
[data-theme="light"] .toolbar .search-box input::placeholder{color:var(--muted)}
[data-theme="light"] .toolbar .search-box:focus-within{border-color:#659e96;background:#fff;box-shadow:0 0 0 3px rgba(8,123,112,.06)}
[data-theme="light"] .toolbar select,[data-theme="light"] .filters select,[data-theme="light"] .filter-select{color:#4b687f;background-color:#fff;border-color:#d1ddea}
[data-theme="light"] .table-caption{color:var(--muted);background:#fff;border-color:#e0e7ef}
[data-theme="light"] .table-caption strong{color:#46677f}
[data-theme="light"] .count-pill{color:#3c7682;background:#ecf4f7;border-color:#d7e7ed}
[data-theme="light"] .table-scroll{background:#fff}
[data-theme="light"] table{color:#29495f}
[data-theme="light"] th{color:#607d94;background:#f1f5f9;border-color:#d8e2ed}
[data-theme="light"] td{color:#4f6b82;border-color:#e6ecf3}
[data-theme="light"] td.primary-cell,[data-theme="light"] .primary-cell{color:#284d67}
[data-theme="light"] td small{color:var(--muted)}
[data-theme="light"] tbody tr[data-row]:hover,[data-theme="light"] tbody tr:hover{background:#eff6f9}
[data-theme="light"] tbody tr:focus-visible{outline-color:#53998b;background:#eaf4f3}
[data-theme="light"] .record-link,[data-theme="light"] .text-link,[data-theme="light"] .product-external-link{color:#237e7a}
[data-theme="light"] .record-link:hover,[data-theme="light"] .product-external-link:hover{color:#075e57}
[data-theme="light"] .row-edit{color:#247f77;background:transparent}
[data-theme="light"] .row-edit:hover{color:#096b61;background:#e3f1ed}
[data-theme="light"] .badge{color:#647b91;background:#eef2f7;border-color:#dde5ee}
[data-theme="light"] .badge.good,[data-theme="light"] .badge.green{color:#286e5d;background:#eaf5ee;border-color:#d4e8dc}
[data-theme="light"] .badge.warn,[data-theme="light"] .badge.amber{color:#946423;background:#fff5e5;border-color:#efdebd}
[data-theme="light"] .badge.bad{color:#a65a54;background:#fbeeed;border-color:#eed6d2}
[data-theme="light"] .badge.blue{color:#426fa8;background:#edf3fc;border-color:#d9e5f7}
[data-theme="light"] .badge.gray{color:var(--muted);background:#f0f4f8;border-color:#dde5ef}
[data-theme="light"] .pagination{color:var(--muted);background:#f9fbfd;border-color:#e0e7ef}
[data-theme="light"] .listing-progress small{color:var(--muted)}
[data-theme="light"] .listing-progress .progress-track{background:#e5eef5}
[data-theme="light"] .product-group{border-color:#dce6ef;background:#fff}
[data-theme="light"] .product-group-toggle{color:#365b73;background:#fff}
[data-theme="light"] .product-group-toggle:hover{background:#f2f7fa}
[data-theme="light"] .product-group.expanded>.product-group-toggle{background:#edf5f6;box-shadow:inset 2px 0 0 #087b70}
[data-theme="light"] .product-group-chevron{color:var(--muted)}
[data-theme="light"] .product-group.expanded .product-group-chevron{color:#087b70}
[data-theme="light"] .product-group-symbol{color:#517f99;background:#edf4f8;border-color:#d5e5ef}
[data-theme="light"] .product-group-name strong{color:#2b526b}
[data-theme="light"] .product-group-name small{color:var(--muted)}
[data-theme="light"] .product-group-price{color:#3e7189}
[data-theme="light"] .product-group-price small{color:var(--muted)}
[data-theme="light"] .product-group-action{color:#287d78}
[data-theme="light"] .product-variants{background:#f8fbfd;border-color:#d5e5ed}
[data-theme="light"] .product-variant-table{background:#f8fbfd}
[data-theme="light"] .product-variant-table table{background:transparent}
[data-theme="light"] .product-variant-table th{background:#eff5f9;color:var(--muted)}
[data-theme="light"] .product-variant-table tbody tr:hover{background:#edf5f8}
[data-theme="light"] .product-link-missing{color:var(--muted)}
[data-theme="light"] .product-link-missing button{color:#658398}
[data-theme="light"] .product-link-help{color:#4e8291!important}
[data-theme="light"] .cost-pending{color:#936523;background:#fff6e7;border-color:#ecdab9}
[data-theme="light"] .cost-note,[data-theme="light"] .weimob-pending{color:#90632b}
[data-theme="light"] .weimob-panel{background:linear-gradient(115deg,#edf5f9,#f8fbfd);border-color:#d5e4ed;box-shadow:none}
[data-theme="light"] .weimob-panel.connected{background:linear-gradient(115deg,#edf7f4,#f7fbfa);border-color:#d0e6dc}
[data-theme="light"] .weimob-panel.error{background:linear-gradient(115deg,#fff7ec,#fbfaf6);border-color:#e9d9be}
[data-theme="light"] .weimob-heading h2{color:#315d72}
[data-theme="light"] .weimob-heading p{color:var(--muted)}
[data-theme="light"] .weimob-status{color:var(--muted)}
[data-theme="light"] .weimob-status i{background:#85a8c0}
[data-theme="light"] .weimob-panel.connected .weimob-status{color:#2c7d68}
[data-theme="light"] .weimob-panel.connected .weimob-status i{background:#148773}
[data-theme="light"] .weimob-panel.error .weimob-status,[data-theme="light"] .weimob-panel.error .weimob-message{color:#966f34}
[data-theme="light"] .weimob-panel.error .weimob-status i{background:#b88b49}
[data-theme="light"] .weimob-meta{color:var(--muted)}
[data-theme="light"] .weimob-meta strong{color:#3e796f}
[data-theme="light"] .weimob-message{color:var(--muted)}
[data-theme="light"] .jobs-strip{color:#397668;background:#eaf5ef;border-color:#d0e6da}
[data-theme="light"] .jobs-strip.error{color:#946e37;background:#fff6e9;border-color:#ead9bc}
[data-theme="light"] .jobs-strip button:hover{background:rgba(30,75,70,.04)}
[data-theme="light"] .error-state{color:#936b32;background:#fff6e8;border-color:#ead7b5}
[data-theme="light"] .empty{color:var(--muted)}
[data-theme="light"] .empty strong{color:#4e748c}
[data-theme="light"] .loading{color:var(--muted)}
[data-theme="light"] .footer{color:var(--muted)}

[data-theme="light"] .overlay{background:rgba(27,45,67,.34)}
[data-theme="light"] .drawer{background:#fff;border-color:#cddce8;box-shadow:-18px 0 65px rgba(28,49,75,.14)}
[data-theme="light"] .drawer-head{background:#f5f8fb;border-color:#dce6f0}
[data-theme="light"] .drawer-head h2{color:#2b4d66}
[data-theme="light"] .drawer-head .eyebrow{color:var(--muted)}
[data-theme="light"] .drawer-head .icon-button{color:var(--muted);background:#edf3f8;border-color:#d7e3ee}
[data-theme="light"] .drawer form{background:#fff}
[data-theme="light"] .field label{color:#55758e}
[data-theme="light"] .field input,[data-theme="light"] .field select,[data-theme="light"] .field textarea{color:#2b4b63;background:#fff;border-color:#cddde9}
[data-theme="light"] .field input[readonly],[data-theme="light"] .field textarea[readonly]{color:var(--muted);background:#f1f5f9;border-color:#dce5ef;box-shadow:none}
[data-theme="light"] .field small,[data-theme="light"] .field-help{color:var(--muted)}
[data-theme="light"] .field-divider{color:#548696;border-color:#dce7f0}
[data-theme="light"] .drawer-bottom{background:#f5f9fc;border-color:#d8e4ee;box-shadow:0 -8px 22px rgba(47,75,102,.035)}
[data-theme="light"] .save-description{color:var(--muted)}
[data-theme="light"] .error-text{color:#a65d4b}
[data-theme="light"] .toast{color:#fff;background:#176c64;border-color:#0b5f57;box-shadow:0 8px 26px rgba(28,70,65,.14)}
[data-theme="light"] .toast.error{color:#fff;background:#8d603d;border-color:#775032}
[data-theme="light"] .login-screen{min-width:0;grid-template-columns:minmax(0,1fr);background:radial-gradient(ellipse at 50% 25%,#e2edf5,transparent 65%),#f2f5f9}
[data-theme="light"] .login-card{min-width:0;width:100%;max-width:420px;justify-self:center;background:#fff;border-color:#d4e1ec;box-shadow:0 22px 70px rgba(40,67,95,.08)}
[data-theme="light"] .login-card img{background:#fff;box-shadow:0 0 0 1px #e4ebf1}
[data-theme="light"] .login-card h1{color:#234258}
[data-theme="light"] .login-card label{color:#628299}
[data-theme="light"] .login-card .muted{color:var(--muted)}
[data-theme="light"] .login-card .back-portal{color:#65899f}
@media(hover:hover) and (pointer:fine){
  [data-theme="light"] .metric:hover{border-color:#b8ccdd;box-shadow:0 5px 18px rgba(42,65,90,.05)}
}
@media(max-width:600px){
  :root[data-theme="light"],[data-theme="light"] body{background:#f2f5f9}
  [data-theme="light"] .topbar{background:rgba(255,255,255,.97);border-color:#dce3eb}
  [data-theme="light"] .mobile-menu{color:#64869f}
  [data-theme="light"] .breadcrumb strong{color:#3c627c}
  [data-theme="light"] .filter-toggle{color:#507c93;background:#edf5f9;border-color:#d0e2ee}
  [data-theme="light"] .record-card,[data-theme="light"] .product-variant-card{background:transparent;border-color:#dce7ef;box-shadow:none}
  [data-theme="light"] .record-card-head h3{color:#2d5872}
  [data-theme="light"] .record-card-head small{color:var(--muted)}
  [data-theme="light"] .record-card-head .row-edit{color:#327b78;background:#eaf5f3;border-color:#cfe5df}
  [data-theme="light"] .card-field label{color:var(--muted)}
  [data-theme="light"] .card-field>div{color:#496e88}
  [data-theme="light"] .card-badges{color:var(--muted);border-color:#d8e7f0}
  [data-theme="light"] .product-variants{background:#f7fbfd}
  [data-theme="light"] .sidebar{background:#f9fbfd;box-shadow:10px 0 45px rgba(30,53,78,.12)}
  [data-theme="light"] .nav-scrim:not([hidden]){background:rgba(30,51,75,.3)}
  [data-theme="light"] .bottom-nav{background:rgba(255,255,255,.98);border-color:#d8e3ec;box-shadow:0 -5px 20px rgba(36,62,88,.05)}
  [data-theme="light"] .bottom-nav a,[data-theme="light"] .bottom-nav button{color:var(--muted)}
  [data-theme="light"] .bottom-nav a.active,[data-theme="light"] .bottom-nav button[style]{color:#087b70!important;background:#e4f2f0!important}
  [data-theme="light"] .drawer{background:#fff}
}
