/* Correcto WMS 18.6.1 — shared Premium Theme Engine */
:root{
  color-scheme:light;
  --wms-bg:#f3f6fb;--wms-bg-accent:#eaf2ff;
  --wms-surface:#ffffff;--wms-surface-2:#f7f9fc;--wms-surface-3:#eef3f9;
  --wms-text:#101828;--wms-heading:var(--wms-text);--wms-muted:#667085;
  --wms-line:#d7e0ec;--wms-line-strong:#b9c8dc;
  --wms-input:#f8fafc;--wms-hover:#eef5ff;
  --wms-brand:#2563eb;--wms-brand-hover:#1d4ed8;--wms-brand-soft:#dbeafe;
  --wms-success:#15803d;--wms-danger:#dc2626;--wms-warning:#d97706;
  --wms-shadow:0 16px 44px rgba(15,23,42,.09);
  --wms-shadow-hover:0 22px 58px rgba(15,23,42,.14);
  --wms-radius:20px;--wms-radius-sm:12px;
}
html[data-theme="dark"]{
  color-scheme:dark;
  --wms-bg:#07101f;--wms-bg-accent:#0e1d34;
  --wms-surface:#0e1a2d;--wms-surface-2:#111f35;--wms-surface-3:#172842;
  --wms-text:#eef4ff;--wms-heading:var(--wms-text);--wms-muted:#9fb0c7;
  --wms-line:#263956;--wms-line-strong:#365174;
  --wms-input:#091629;--wms-hover:#172a46;
  --wms-brand:#3478ff;--wms-brand-hover:#5b94ff;--wms-brand-soft:#132d59;
  --wms-success:#4ade80;--wms-danger:#f87171;--wms-warning:#fbbf24;
  --wms-shadow:0 18px 50px rgba(0,0,0,.30);
  --wms-shadow-hover:0 24px 64px rgba(0,0,0,.38);
}
html,body{min-height:100%;background:var(--wms-bg)!important;color:var(--wms-text)!important}
body{transition:background-color .18s ease,color .18s ease}
main{color:var(--wms-text)}
.panel,.card,.box,.setting-card,.status-card,.metrics>div,.v14-card{
  background:var(--wms-surface)!important;color:var(--wms-text)!important;
  border-color:var(--wms-line)!important;box-shadow:var(--wms-shadow);
}
h1,h2,h3,h4,strong,b{color:var(--wms-heading)}
p,small,.muted{color:var(--wms-muted)}
input,select,textarea{
  background:var(--wms-input)!important;color:var(--wms-text)!important;
  border-color:var(--wms-line)!important;caret-color:var(--wms-brand);
}
input::placeholder,textarea::placeholder{color:var(--wms-muted);opacity:.78}
input:focus,select:focus,textarea:focus{outline:0;border-color:var(--wms-brand)!important;box-shadow:0 0 0 4px color-mix(in srgb,var(--wms-brand) 18%,transparent)}
button,a{font:inherit}.primary,.v14-primary{background:var(--wms-brand)!important;color:#fff!important}.primary:hover,.v14-primary:hover{background:var(--wms-primary-press,var(--wms-brand-hover))!important}
html .password-toggle{color:#fff}.secondary{background:var(--wms-surface-3)!important;color:var(--wms-text)!important;border:1px solid var(--wms-line)!important}.ghost{background:transparent!important;color:var(--wms-text)!important;border:1px solid var(--wms-line)!important}.secondary:hover,.ghost:hover{background:var(--wms-hover)!important}
table{color:var(--wms-text)}th,td{border-color:var(--wms-line)!important}th{color:var(--wms-brand-hover)!important}
input[type="checkbox"],input[type="radio"]{accent-color:var(--wms-brand)}
@media(max-width:700px){:root{--wms-radius:16px}.panel,.setting-card,.status-card{border-radius:var(--wms-radius)!important}}


/* Correcto WMS 19.7.0 — global production theme + typography */
:root{--wms-font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif}
html,body,button,input,select,textarea,option,table,a,label{font-family:var(--wms-font-family)!important}
html,body{background:var(--wms-bg)!important;color:var(--wms-text)!important}
body.wms-has-sidebar header.wms-legacy-header{display:none!important}
body.wms-has-sidebar .card,body.wms-has-sidebar .panel,body.wms-has-sidebar section[class*="panel"],body.wms-has-sidebar section[class*="card"]{background:var(--wms-surface)!important;color:var(--wms-text)!important;border-color:var(--wms-line)!important}
body.wms-has-sidebar table{background:transparent!important;color:var(--wms-text)!important}
body.wms-has-sidebar th,body.wms-has-sidebar td{background:transparent!important;border-color:var(--wms-line)!important;color:var(--wms-text)!important}
body.wms-has-sidebar input,body.wms-has-sidebar select,body.wms-has-sidebar textarea{background:var(--wms-input)!important;color:var(--wms-text)!important;border-color:var(--wms-line)!important}

/* =========================================================
   DS.12.2 - JEDINSTVENA PREMIUM TEMA (jedan izvor --wms-* tokena)
   Light: jaci selektor, pobedjuje stare tokene iz wms-core.css.
   Dark: dopunjene varijable koje su bile maslinaste/sive.
   Legacy imena (--wms-theme-*, --wms-border, --wms-primary, ...) su aliasi.
   ========================================================= */
:root,
html[data-theme="light"],
html:not([data-theme="dark"]){
  color-scheme:light;
  --wms-bg:#f3f6fb;
  --wms-bg-accent:#eaf2ff;
  --wms-surface:#ffffff;
  --wms-surface-2:#f7f9fc;
  --wms-surface-3:#eef3f9;
  --wms-text:#101828;
  --wms-heading:var(--wms-text);
  --wms-muted:#667085;
  --wms-line:#d7e0ec;
  --wms-line-strong:#b9c8dc;
  --wms-input:#f8fafc;
  --wms-hover:#eef5ff;
  --wms-brand:#2563eb;
  --wms-brand-hover:#1d4ed8;
  --wms-brand-soft:#dbeafe;
  --wms-success:#15803d;
  --wms-danger:#dc2626;
  --wms-warning:#d97706;
  --wms-shadow:0 16px 44px rgba(15,23,42,.09);
  --wms-shadow-hover:0 22px 58px rgba(15,23,42,.14);
  --wms-bg-secondary:#eef3f9;
  --wms-text-secondary:#475467;
  --wms-primary-soft:#dbeafe;
  --wms-selected:rgba(37,99,235,.12);
  --wms-overlay:rgba(15,23,42,.48);
  --wms-shadow-sm:0 1px 2px rgba(15,23,42,.06);
  --wms-shadow-lg:0 18px 45px rgba(15,23,42,.14);
  --wms-sidebar-bg:#ffffff;
  --wms-topbar-bg:rgba(255,255,255,.96);
  --wms-theme-bg:var(--wms-bg);
  --wms-theme-surface:var(--wms-surface);
  --wms-theme-surface-2:var(--wms-surface-2);
  --wms-theme-surface-3:var(--wms-surface-3);
  --wms-theme-input:var(--wms-input);
  --wms-theme-hover:var(--wms-hover);
  --wms-theme-text:var(--wms-text);
  --wms-theme-heading:var(--wms-heading);
  --wms-theme-muted:var(--wms-muted);
  --wms-theme-line:var(--wms-line);
  --wms-theme-line-strong:var(--wms-line-strong);
  --wms-border:var(--wms-line);
  --wms-border-strong:var(--wms-line-strong);
  --wms-primary:var(--wms-brand);
  --wms-primary-hover:var(--wms-brand-hover);
  --wms-input-bg:var(--wms-input);
  --wms-input-border:var(--wms-line);
}
html[data-theme="dark"]{
  color-scheme:dark;
  --wms-bg-secondary:#111f35;
  --wms-text-secondary:#c3cfe0;
  --wms-primary-soft:rgba(52,120,255,.16);
  --wms-selected:rgba(52,120,255,.16);
  --wms-sidebar-bg:#0e1a2d;
  --wms-topbar-bg:rgba(14,26,45,.96);
  --wms-theme-bg:var(--wms-bg);
  --wms-theme-surface:var(--wms-surface);
  --wms-theme-surface-2:var(--wms-surface-2);
  --wms-theme-surface-3:var(--wms-surface-3);
  --wms-theme-input:var(--wms-input);
  --wms-theme-hover:var(--wms-hover);
  --wms-theme-text:var(--wms-text);
  --wms-theme-heading:var(--wms-heading);
  --wms-theme-muted:var(--wms-muted);
  --wms-theme-line:var(--wms-line);
  --wms-theme-line-strong:var(--wms-line-strong);
  --wms-border:var(--wms-line);
  --wms-border-strong:var(--wms-line-strong);
  --wms-primary:var(--wms-brand);
  --wms-primary-hover:var(--wms-brand-hover);
  --wms-input-bg:var(--wms-input);
  --wms-input-border:var(--wms-line);
}

/* DS.12.5 - legacy aliasi (nedefinisane varijable iz activity, ai-assistant, reports, mobile-devices, location-sync, products) */
:root,
html[data-theme="light"],
html:not([data-theme="dark"]){
  --surface:var(--wms-surface);
  --surface-soft:var(--wms-surface-3);
  --border:var(--wms-line);
  --wms-soft:var(--wms-brand-soft);
  --wms-link:var(--wms-brand);
}
html[data-theme="dark"]{
  --surface:var(--wms-surface);
  --surface-soft:var(--wms-surface-3);
  --border:var(--wms-line);
  --wms-soft:var(--wms-brand-soft);
  --wms-link:var(--wms-brand-hover);
  --wms-primary-press:#2563eb;
}
