/* Fenony ERP Color Engine — centralized, user-selectable accent */
:root{
  --accent:#4776B8;
  --accent-hover:#3B69A8;
  --accent-soft:#E8EFF9;
  --accent-contrast:#FFFFFF;
  --focus-ring:color-mix(in srgb,var(--accent) 22%,transparent);
  --orange:var(--accent);
  --orange2:var(--accent-hover);
  --blue:var(--accent);
}
[data-theme="dark"]{
  --accent:#7EA6DA;
  --accent-hover:#9CC0F0;
  --accent-soft:#293B56;
  --accent-contrast:#182235;
  --focus-ring:color-mix(in srgb,var(--accent) 30%,transparent);
  --orange:var(--accent);
  --orange2:var(--accent-hover);
  --blue:var(--accent);
}
/* Rebind legacy hard-coded accent UI to the engine */
.primary,.nav.active,.quick .qico,footer span,.orange-bg,.blue-bg,
.tyke-auth-eyebrow,.tyke-auth-submit,.tyke-auth-mark,.tyke-auth-brand{
  border-color:var(--accent);
}
.primary,.nav.active,.tyke-auth-submit{
  background:var(--accent);
}
.primary:hover{background:var(--accent-hover)}
.orange-bg,.blue-bg{background:var(--accent-soft);color:var(--accent)}
.quick button:hover,.nav.active{box-shadow:0 4px 12px color-mix(in srgb,var(--accent) 24%,transparent)}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:2px;
}
.theme-color-toggle{
  position:relative;height:35px;padding:0 10px;border:1px solid var(--line);
  border-radius:9px;background:var(--card);color:var(--text-primary,inherit);
  font:600 12px Cairo,Tahoma,sans-serif;cursor:pointer;white-space:nowrap;
}
.theme-color-toggle:hover{border-color:var(--accent);color:var(--accent)}
.theme-color-popover{
  position:absolute;z-index:10000;top:calc(100% + 8px);inset-inline-end:0;
  width:230px;padding:13px;background:var(--card);color:var(--text-primary,inherit);
  border:1px solid var(--line);border-radius:14px;box-shadow:0 16px 40px #0002;
}
.theme-color-popover[hidden]{display:none!important}
.theme-color-popover-title{font-weight:800;font-size:13px;margin:0 0 10px}
.theme-color-swatches{display:grid;grid-template-columns:repeat(6,1fr);gap:8px}
.theme-color-swatch{width:27px;height:27px;border-radius:50%;border:2px solid transparent;cursor:pointer;background:var(--swatch);padding:0}
.theme-color-swatch[aria-pressed="true"]{outline:2px solid var(--accent);outline-offset:2px}
.theme-color-custom{display:flex;align-items:center;justify-content:space-between;margin-top:12px;padding-top:10px;border-top:1px solid var(--line);font-size:12px}
.theme-color-custom input{width:35px;height:30px;padding:2px;border:1px solid var(--line);border-radius:7px;background:var(--card);cursor:pointer}
.theme-color-reset{margin-top:9px;width:100%;border:1px solid var(--line);border-radius:8px;background:var(--surface-hover,var(--bg));color:inherit;padding:7px;cursor:pointer}
.theme-color-reset:hover{border-color:var(--accent);color:var(--accent)}
@media(max-width:620px){.theme-color-popover{inset-inline-end:0;width:min(230px,calc(100vw - 24px))}}

/* Pass259: Dashboard data-source visibility and sync status */
.dash-source-status{display:flex;flex-wrap:wrap;gap:7px;align-items:center;margin-top:8px;font-size:12px;padding:8px 10px;border:1px solid var(--line);border-radius:10px;color:var(--text-primary,inherit);background:var(--card)}
.dash-source-status b{font-weight:800;white-space:nowrap}
.dash-source-status span{opacity:.78}
.dash-source-ok b{color:#21865b}.dash-source-warn b{color:#b97822}.dash-source-sync b{color:var(--accent)}.dash-source-local b{color:var(--text-primary,inherit)}
