/* WV071_WAREVEXO_DESIGN_SYSTEM_V1 — presentation-only, no scripts.
   Shared tokens for the existing Unified Management dark screens and
   the light Owner/Tenant component tree. Never overrides tenant brand
   preview variables (--brand-*), app data/role state or offline paths. */
:root{
  --wv-font-ui:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Tahoma,Arial,sans-serif;
  --wv-font-mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  --wv-space-1:4px;
  --wv-space-2:8px;
  --wv-space-3:12px;
  --wv-space-4:16px;
  --wv-space-5:20px;
  --wv-space-6:24px;
  --wv-space-8:32px;
  --wv-radius-control:10px;
  --wv-radius-card:14px;
  --wv-radius-pill:999px;
  --wv-control-min-height:44px;
  --wv-line-height:1.6;
  --wv-transition-fast:140ms;
  --wv-shadow-card:0 12px 24px rgba(0,0,0,.12);
}
/* Dark is the existing secure sign-in/Leader/signed warehouse surface. */
#managementRoot{
  --wv-bg:#07111f;
  --wv-surface:#0f1b2e;
  --wv-surface-raised:#152940;
  --wv-surface-muted:#091526;
  --wv-text:#e7eef9;
  --wv-text-muted:#bccce0;
  --wv-border:#334a66;
  --wv-primary:#7dd3fc;
  --wv-primary-on:#07111f;
  --wv-accent:#39c5bb;
  --wv-focus:#7dd3fc;
  --wv-success:#a7f3d0;
  --wv-warning:#fcd34d;
  --wv-danger:#fecaca;
  --wv-danger-border:#93434e;
  color-scheme:dark;
}
/* This subtree is intentionally light and retains its existing visual mode. */
#managementRoot .owner-portal-root,
.owner-portal-root{
  --wv-bg:#f5f7fb;
  --wv-surface:#ffffff;
  --wv-surface-raised:#f8fafc;
  --wv-surface-muted:#eef2f7;
  --wv-text:#172033;
  --wv-text-muted:#475467;
  --wv-border:#cbd5e1;
  --wv-primary:#105c79;
  --wv-primary-on:#ffffff;
  --wv-accent:#087f78;
  --wv-focus:#105c79;
  --wv-success:#176b3a;
  --wv-warning:#8a5100;
  --wv-danger:#ad251d;
  --wv-danger-border:#b42318;
  color-scheme:light;
}
/* Opt-in reusable primitives: no generic global button, input or card
   selectors, so owner / regional / staff legacy elements cannot regress. */
#managementRoot .wv-ds-surface,
.owner-portal-root .wv-ds-surface{
  background:var(--wv-surface);
  color:var(--wv-text);
  border:1px solid var(--wv-border);
  border-radius:var(--wv-radius-card);
  padding:var(--wv-space-4);
}
#managementRoot .wv-ds-panel-title,
.owner-portal-root .wv-ds-panel-title{
  margin:0;
  font-family:var(--wv-font-ui);
  font-weight:750;
  font-size:clamp(1rem,1.3vw,1.2rem);
  line-height:1.35;
}
#managementRoot .wv-ds-muted,
.owner-portal-root .wv-ds-muted{
  color:var(--wv-text-muted);
  font-size:.875rem;
  line-height:var(--wv-line-height);
}
#managementRoot .wv-ds-grid,
.owner-portal-root .wv-ds-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr));
  gap:var(--wv-space-3);
}
#managementRoot .wv-ds-control,
.owner-portal-root .wv-ds-control{
  min-height:var(--wv-control-min-height);
  padding:var(--wv-space-2) var(--wv-space-3);
  border:1px solid var(--wv-border);
  border-radius:var(--wv-radius-control);
  font:inherit;
  color:var(--wv-text);
  background:var(--wv-surface);
}
#managementRoot .wv-ds-action,
.owner-portal-root .wv-ds-action{
  min-height:var(--wv-control-min-height);
  padding:var(--wv-space-2) var(--wv-space-4);
  border:1px solid var(--wv-border);
  border-radius:var(--wv-radius-control);
  font:inherit;
  font-weight:650;
  color:var(--wv-text);
  background:var(--wv-surface-raised);
  cursor:pointer;
}
#managementRoot .wv-ds-action-primary,
.owner-portal-root .wv-ds-action-primary{
  background:var(--wv-primary);
  color:var(--wv-primary-on);
  border-color:var(--wv-primary);
}
#managementRoot .wv-ds-badge,
.owner-portal-root .wv-ds-badge{
  display:inline-flex;
  align-items:center;
  max-width:100%;
  padding:var(--wv-space-1) var(--wv-space-2);
  border:1px solid var(--wv-border);
  border-radius:var(--wv-radius-pill);
  font-size:.75rem;
  font-weight:650;
  background:var(--wv-surface-muted);
  color:var(--wv-text);
}
#managementRoot .wv-ds-status-error,
.owner-portal-root .wv-ds-status-error{color:var(--wv-danger)}
#managementRoot .wv-ds-status-warning,
.owner-portal-root .wv-ds-status-warning{color:var(--wv-warning)}
#managementRoot .wv-ds-status-ok,
.owner-portal-root .wv-ds-status-ok{color:var(--wv-success)}
/* Keyboard users: pointer hover is not the only signal. */
#managementRoot :is(.wv-ds-action,.wv-ds-control,.op-button,.op-tab,.op-org-item,.btn,.input):focus-visible,
.owner-portal-root :is(.wv-ds-action,.wv-ds-control,.op-button,.op-tab,.op-org-item):focus-visible{
  outline:3px solid var(--wv-focus);
  outline-offset:2px;
}
#managementRoot :is(.wv-ds-action,.wv-ds-control):disabled,
.owner-portal-root :is(.wv-ds-action,.wv-ds-control):disabled{
  opacity:.55;
  cursor:not-allowed;
}
#managementRoot .wv-ds-scroll,
.owner-portal-root .wv-ds-scroll{max-width:100%;overflow-x:auto}
#managementRoot .wv-ds-scroll table,
.owner-portal-root .wv-ds-scroll table{min-width:580px}
@media(max-width:640px){
  #managementRoot .wv-ds-surface,
  .owner-portal-root .wv-ds-surface{padding:var(--wv-space-3)}
  #managementRoot .wv-ds-grid,
  .owner-portal-root .wv-ds-grid{grid-template-columns:1fr}
}
@media(prefers-reduced-motion:reduce){
  #managementRoot :is(.wv-ds-action,.wv-ds-control,.op-button,.op-tab,.btn,.input),
  .owner-portal-root :is(.wv-ds-action,.wv-ds-control,.op-button,.op-tab){
    animation-duration:.01ms;
    transition-duration:.01ms;
  }
}
@media print{
  #managementRoot :is(.wv-ds-action,.wv-ds-action-primary),
  .owner-portal-root :is(.wv-ds-action,.wv-ds-action-primary){display:none}
  #managementRoot :is(.wv-ds-surface,.wv-ds-grid),
  .owner-portal-root :is(.wv-ds-surface,.wv-ds-grid){break-inside:avoid}
}
