/*
 * WMS Portal CSS v7.0 — ElaAdmin-inspired Professional Theme
 * TechPigeon · https://techpigeonsolutions.com/
 */
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,300;0,14..32,400;0,14..32,500;0,14..32,600;0,14..32,700;0,14..32,800;1,14..32,400&family=JetBrains+Mono:wght@400;500&display=swap');

/* ─── DESIGN TOKENS ───────────────────────────────────────────── */
:root {
  /* Page */
  --wp-page:        #ffffff;
  --wp-sidebar:     #1e3144;
  --wp-sidebar-dark:#162538;
  --wp-sidebar-text:#ffffff;
  --wp-card:        #ffffff;
  --wp-card2:       #f5f7fa;
  --wp-topbar:      #ffffff;

  /* Borders */
  --wp-bd:          #e3e8ef;
  --wp-bd2:         #c9d3df;
  --wp-bd3:         #9ca3af;

  /* Text */
  --wp-t1:          #1a2332;
  --wp-t2:          #5a6a7e;
  --wp-t3:          #8fa0b3;
  --wp-t4:          #c9d3df;

  /* Inputs */
  --wp-input:       #f9fafb;

  /* Primary button = sidebar colour */
  --wp-btn:         #76a3c0;
  --wp-btn-dark:    #5e8caa;
  --wp-btn-glow:    rgba(118,163,192,.22);

  /* Accent (green — kept for status badges) */
  --wp-accent:       #76a3c0;
  --wp-accent-dark:  #5e8caa;
  --wp-accent-light: #9bc0d8;
  --wp-accent-dim:   rgba(118,163,192,.12);
  --wp-accent-glow:  rgba(118,163,192,.22);
  --wp-accent-tint:  rgba(118,163,192,.08);
  --wp-accent-bg:    #edf4f9;

  /* KPI card colours — vivid like ElaAdmin */
  --wp-kpi-green:   #4cae8a;
  --wp-kpi-purple:  #9b6dcc;
  --wp-kpi-blue:    #5ba4d4;
  --wp-kpi-orange:  #e8835c;

  /* Status colours */
  --wp-green:   #16a34a; --wp-green-bg:  #f0fdf4; --wp-green-bd:  #bbf7d0;  --wp-green-t:  #15803d;
  --wp-red:     #dc2626; --wp-red-bg:    #fef2f2; --wp-red-bd:    #fecaca;  --wp-red-t:    #b91c1c;
  --wp-amber:   #d97706; --wp-amber-bg:  #fffbeb; --wp-amber-bd:  #fde68a;  --wp-amber-t:  #b45309;
  --wp-blue:    #2563eb; --wp-blue-bg:   #eff6ff; --wp-blue-bd:   #bfdbfe;  --wp-blue-t:   #1d4ed8;
  --wp-purple:  #7c3aed; --wp-purple-bg: #f5f3ff; --wp-purple-bd: #ddd6fe;  --wp-purple-t: #6d28d9;
  --wp-cyan:    #0891b2; --wp-cyan-bg:   #ecfeff; --wp-cyan-bd:   #a5f3fc;  --wp-cyan-t:   #0e7490;
  --wp-orange:  #ea580c; --wp-orange-bg: #fff7ed; --wp-orange-bd: #fed7aa;  --wp-orange-t: #c2410c;

  /* Shadows */
  --wp-shadow-xs: 0 1px 4px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04);
  --wp-shadow:    0 2px 10px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,.05);
  --wp-shadow-md: 0 4px 20px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.06);
  --wp-shadow-lg: 0 8px 36px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.07);

  /* Radii */
  --wp-r:    10px;
  --wp-r-lg: 14px;
  --wp-r-xl: 18px;

  /* Layout */
  --wp-sidebar-w: 280px;
  --wp-font: 'Times New Roman', Times, Georgia, serif;
  --wp-mono: 'JetBrains Mono', 'Courier New', monospace;
}

/* ─── RESET & BASE ────────────────────────────────────────────── */
.wms-portal *, .wms-portal-login-wrap *, .wms-neu-login-wrap *, .wms-login-page * { box-sizing: border-box; margin: 0; padding: 0; text-decoration: none !important; }
.wms-portal a, .wms-portal a:hover, .wms-portal a:visited, .wms-portal a:focus,
.wms-neu-login-wrap a, .wms-neu-login-wrap a:hover,
.wms-login-page a, .wms-login-page a:hover { text-decoration: none !important; }
.wms-portal, .wms-portal-login-wrap, .wms-login-page { font-family: var(--wp-font); color: var(--wp-t1); -webkit-font-smoothing: antialiased; }
.wms-portal { min-height: 100vh; background: var(--wp-page); display: flex; }

/* ─── SIDEBAR ─────────────────────────────────────────────────── */
.wms-sidebar {
  width: var(--wp-sidebar-w);
  min-height: 100vh; height: 100%;
  background: #1e3144;
  border-right: none;
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 200; overflow-y: auto; scrollbar-width: none;
  transition: transform .22s cubic-bezier(.4,0,.2,1);
  box-shadow: 4px 0 20px rgba(0,0,0,.22);
}
.wms-sidebar::-webkit-scrollbar { display: none; }

/* Brand */
.wms-sb-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 18px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0; text-decoration: none !important; overflow: hidden;
}
.wms-sb-logo-wrap {
  width: 42px; height: 42px; border-radius: 11px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.22);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
}
.wms-sb-logo-img { max-width: 30px; max-height: 30px; object-fit: contain; }
.wms-sb-logo-icon { font-size: 1.1rem; filter: brightness(10); }
.wms-sb-brand-name { display: block; font-size: 1rem; font-weight: 800; color: #fff; line-height: 1.25; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wms-sb-brand-sub { display: block; font-size: .72rem; color: rgba(255,255,255,.65); font-weight: 600; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Nav */
.wms-sb-nav { flex: 1; padding: 20px 14px 10px; display: flex; flex-direction: column; gap: 1px; }
.wms-sb-group { margin-bottom: 10px; }
.wms-sb-group-label {
  font-size: .72rem; font-weight: 800; color: rgba(255,255,255,.38);
  text-transform: uppercase; letter-spacing: .14em;
  padding: 7px 10px 6px; display: block;
}
.wms-sb-link {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--wp-r);
  text-decoration: none !important; color: rgba(255,255,255,.78);
  font-size: 1.02rem; font-weight: 700;
  transition: background .14s, color .12s; position: relative;
}
.wms-sb-link:hover { color: #fff; background: rgba(255,255,255,.1); }
.wms-sb-link.active {
  background: #76a3c0;
  color: #fff;
  font-weight: 800;
}
.wms-sb-link.active::before {
  content: ''; position: absolute; left: 0; top: 6px; bottom: 6px;
  width: 4px; background: #fff; border-radius: 0 4px 4px 0;
}
.wms-sb-link-icon {
  width: 34px; height: 34px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0;
  color: rgba(255,255,255,.65); background: rgba(255,255,255,.08);
}
.wms-sb-link:hover .wms-sb-link-icon { color: #fff; background: rgba(255,255,255,.14); }
.wms-sb-link.active .wms-sb-link-icon { background: rgba(255,255,255,.25); color: #fff; }
.wms-sb-link-text { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wms-sb-badge {
  background: #76a3c0; color: #fff;
  font-size: .62rem; font-weight: 800;
  padding: 2px 8px; border-radius: 50px;
  min-width: 20px; text-align: center; line-height: 1.7;
}

/* User panel */
/* ─── TOPBAR USER ACCOUNT MENU ───────────────────────────────── */
.wms-topbar-user {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 10px 6px 6px;
  border-radius: 50px;
  cursor: pointer; position: relative;
  border: 1.5px solid var(--wp-bd2);
  background: var(--wp-card);
  transition: border-color .14s, box-shadow .14s;
  user-select: none;
  margin-left: 4px;
}
.wms-topbar-user:hover { border-color: #76a3c0; box-shadow: 0 0 0 3px rgba(118,163,192,.12); }
.wms-topbar-user.open  { border-color: #76a3c0; box-shadow: 0 0 0 3px rgba(118,163,192,.15); }
.wms-topbar-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #1e3144 0%, #2d4a6b 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 800; color: #fff; flex-shrink: 0;
  border: 2px solid rgba(118,163,192,.4);
}
.wms-topbar-user-info { display: flex; flex-direction: column; line-height: 1.25; }
.wms-topbar-user-name { font-size: .8rem; font-weight: 700; color: var(--wp-t1); white-space: nowrap; max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
.wms-topbar-user-role { font-size: .65rem; font-weight: 700; color: var(--wp-t3); text-transform: uppercase; letter-spacing: .05em; }
.wms-topbar-chevron { color: var(--wp-t3); flex-shrink: 0; transition: transform .15s; }
.wms-topbar-user.open .wms-topbar-chevron { transform: rotate(180deg); }

/* Topbar dropdown */
.wms-topbar-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 240px;
  background: #fff; border: 1px solid var(--wp-bd2);
  border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.14);
  overflow: hidden; display: none; z-index: 400;
}
.wms-topbar-dropdown.visible { display: block; animation: wms-dd-in .15s ease; }
@keyframes wms-dd-in { from { opacity: 0; transform: translateY(-6px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }

.wms-tb-dd-head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 16px 14px;
  background: linear-gradient(135deg, #1e3144 0%, #2d4a6b 100%);
}
.wms-tb-dd-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255,255,255,.18); border: 2px solid rgba(255,255,255,.3);
  display: flex; align-items: center; justify-content: center;
  font-size: .82rem; font-weight: 800; color: #fff; flex-shrink: 0;
}
.wms-tb-dd-name  { font-size: .9rem; font-weight: 700; color: #fff; }
.wms-tb-dd-email { font-size: .72rem; color: rgba(255,255,255,.6); margin-top: 2px; }
.wms-tb-dd-badge {
  display: inline-block; margin-top: 5px;
  padding: 2px 8px; border-radius: 50px;
  font-size: .64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  background: rgba(255,255,255,.18); color: rgba(255,255,255,.9);
}
.wms-tb-dd-body { padding: 6px 0; }
.wms-tb-dd-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; font-size: .84rem; color: var(--wp-t2);
  text-decoration: none; cursor: pointer; transition: background .1s;
}
.wms-tb-dd-item:hover { background: var(--wp-card2); color: var(--wp-t1); }
.wms-tb-dd-item svg { color: var(--wp-t3); flex-shrink: 0; }
.wms-tb-dd-footer {
  border-top: 1px solid var(--wp-bd);
  padding: 6px 0;
}
.wms-tb-dd-logout {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 16px; font-size: .84rem; font-weight: 600;
  color: #dc2626; background: none; border: none; cursor: pointer;
  font-family: var(--wp-font); transition: background .1s;
}
.wms-tb-dd-logout:hover { background: #fef2f2; }
.wms-tb-dd-logout svg { flex-shrink: 0; }

/* Mobile */
.wms-sb-hamburger {
  display: none; position: fixed; top: 12px; left: 12px; z-index: 400;
  width: 40px; height: 40px; background: var(--wp-sidebar); border: none;
  border-radius: 9px; cursor: pointer; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px;
  box-shadow: var(--wp-shadow);
}
.wms-sb-hamburger span { display: block; width: 16px; height: 2px; background: #fff; border-radius: 2px; }
.wms-sb-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.32); z-index: 199; backdrop-filter: blur(2px); }
.wms-sb-overlay.open { display: block; }

/* ─── MAIN AREA ───────────────────────────────────────────────── */
.wms-portal-body { flex: 1; margin-left: var(--wp-sidebar-w); display: flex; flex-direction: column; min-height: 100vh; background: #ffffff; }

/* Topbar */
.wms-portal-topbar {
  height: 62px; background: var(--wp-topbar);
  border-bottom: 1px solid var(--wp-bd);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 36px; flex-shrink: 0;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 6px rgba(0,0,0,.05);
}
.wms-portal-topbar-left { display: flex; align-items: center; gap: 10px; }
.wms-portal-topbar-breadcrumb { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--wp-t3); }
.wms-portal-topbar-breadcrumb a { color: var(--wp-t3); text-decoration: none; }
.wms-portal-topbar-breadcrumb span.sep { opacity: .5; }
.wms-portal-topbar-page { font-size: .9rem; font-weight: 700; color: var(--wp-t1); }
.wms-portal-topbar-right { display: flex; align-items: center; gap: 10px; }
.wms-topbar-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 14px; border-radius: 50px;
  font-size: .78rem; font-weight: 700;
  text-decoration: none; border: 1.5px solid;
  transition: opacity .12s, transform .1s;
}
.wms-topbar-pill:hover { opacity: .8; transform: translateY(-1px); }
.wms-topbar-pill-blue  { background: #76a3c0; border-color: #76a3c0; color: #fff; }
.wms-topbar-pill-amber { background: #e8835c; border-color: #e8835c; color: #fff; }
.wms-topbar-clock { font-size: .76rem; color: var(--wp-t3); font-family: var(--wp-mono); font-weight: 600; }

/* Content */
.wms-portal-main { flex: 1; padding: 36px 36px 72px; }
.wms-portal-content { max-width: 100%; margin: 0 auto; }
.wms-portal-page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 36px; flex-wrap: wrap;
}
.wms-portal-page-title { font-size: 1.75rem; font-weight: 800; color: var(--wp-t1); line-height: 1.2; letter-spacing: -.03em; }
.wms-portal-page-sub { font-size: .85rem; color: var(--wp-t2); margin-top: 6px; line-height: 1.6; }
.wms-portal-page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Footer */
.wms-portal-footer {
  padding: 18px 32px; border-top: 1px solid var(--wp-bd);
  font-size: .72rem; color: var(--wp-t3);
  display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
}
.wms-portal-footer a { color: var(--wp-accent); text-decoration: none; transition: opacity .12s; }
.wms-portal-footer a:hover { opacity: .7; }
.wms-pf-sep { opacity: .4; }

/* ─── BUTTONS ─────────────────────────────────────────────────── */
.wms-pcard-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 20px; border-radius: var(--wp-r);
  font-size: .92rem; font-weight: 800; cursor: pointer;
  text-decoration: none; border: 1.5px solid #76a3c0;
  background: #76a3c0; color: #fff !important;
  font-family: var(--wp-font); white-space: nowrap;
  transition: opacity .12s, transform .1s; box-shadow: 0 2px 8px rgba(118,163,192,.28);
}
.wms-pcard-btn:hover { opacity: .85; transform: translateY(-1px); }
.wms-pcard-btn-primary {
  background: #76a3c0; border-color: #76a3c0;
  color: #fff !important; font-weight: 800;
  box-shadow: 0 2px 12px rgba(118,163,192,.35);
}
.wms-pcard-btn-success { background: #4cae8a; border-color: #4cae8a; color: #fff !important; box-shadow: 0 2px 8px rgba(76,174,138,.28); }
.wms-pcard-btn-danger  { background: var(--wp-red); border-color: var(--wp-red); color: #fff !important; box-shadow: 0 2px 8px rgba(220,38,38,.22); }
.wms-pcard-btn-secondary { background: var(--wp-card2); border-color: var(--wp-bd2); color: var(--wp-t2) !important; box-shadow: none; }

/* ─── KPI CARDS ───────────────────────────────────────────────── */
/* ─── PIPELINE STRIP (replaces old kpi-grid) ─────────────────── */
.wms-pipeline-strip {
  display: flex; align-items: center; gap: 0;
  background: var(--wp-card); border: 1px solid var(--wp-bd);
  border-radius: var(--wp-r-lg); overflow: hidden;
  margin-bottom: 0; box-shadow: var(--wp-shadow);
}
.wms-pipe-card {
  flex: 1; display: flex; align-items: center; gap: 12px;
  padding: 20px 18px; text-decoration: none; color: inherit;
  border-right: 1px solid var(--wp-bd); position: relative;
  transition: opacity .18s;
}
.wms-pipe-card:last-child { border-right: none; }
.wms-pipe-card:hover { opacity: .72; }
.wms-pipe-card-warn { background: var(--wp-amber-bg); }
.wms-pipe-card-icon {
  width: 42px; height: 42px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.wms-pipe-card-body { min-width: 0; }
.wms-pipe-num { font-size: 1.9rem; font-weight: 800; color: var(--wp-t1); line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.wms-pipe-label { font-size: .75rem; font-weight: 600; color: var(--wp-t1); margin-top: 4px; }
.wms-pipe-sub { font-size: .68rem; color: var(--wp-t3); margin-top: 2px; font-weight: 500; }
.wms-pipe-badge {
  position: absolute; top: 10px; right: 10px;
  background: var(--wp-amber); color: #fff;
  font-size: .62rem; font-weight: 700; border-radius: 50px;
  padding: 2px 6px; line-height: 1.2;
}
.wms-pipe-arrow {
  color: var(--wp-t4); font-size: .9rem; padding: 0 2px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.wms-pipeline-bar {
  display: flex; height: 4px; border-radius: 0 0 var(--wp-r-lg) var(--wp-r-lg);
  overflow: hidden; background: var(--wp-bd);
}
.wms-pipeline-bar-seg { height: 100%; min-width: 4%; }

/* ─── OLD KPI GRID (kept for other uses) ─────────────────────── */
.wms-portal-kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px,1fr)); gap: 18px; margin-bottom: 32px; }
.wms-pcard {
  background: var(--wp-card); border: 1px solid var(--wp-bd);
  border-radius: var(--wp-r-lg); padding: 24px 22px 20px;
  display: flex; flex-direction: column; gap: 14px;
  box-shadow: var(--wp-shadow-xs); position: relative; overflow: hidden;
}
.wms-pcard-warn { border-color: var(--wp-amber-bd); background: var(--wp-amber-bg); }
.wms-pcard-sm { padding: 18px 18px; gap: 10px; }
.wms-pcard-header { display: flex; align-items: flex-start; justify-content: space-between; }
.wms-pcard-icon {
  width: 44px; height: 44px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center; font-size: 1.15rem;
}
.wms-pcard-icon-green { background: var(--wp-green-bg); }
.wms-pcard-icon-teal  { background: var(--wp-accent-dim); }
.wms-pcard-icon-orange { background: var(--wp-amber-bg); }
.wms-pcard-icon-blue  { background: var(--wp-blue-bg); }
.wms-pcard-icon-purple { background: var(--wp-purple-bg); }
.wms-pcard-icon-red { background: var(--wp-red-bg); }
.wms-pcard-meta { font-size: .7rem; color: var(--wp-t3); font-weight: 500; text-align: right; }
.wms-pcard-body { }
.wms-pcard-num { font-size: 2.2rem; font-weight: 800; color: var(--wp-t1); line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.wms-pcard-sm .wms-pcard-num { font-size: 1.45rem; }
.wms-pcard-label { font-size: .72rem; color: var(--wp-t2); font-weight: 500; margin-top: 6px; }
.wms-pcard-sub-line { font-size: .72rem; color: var(--wp-t3); margin-top: 3px; }
.wms-pcard-accent { position: absolute; bottom: 0; left: 0; right: 0; height: 3px; }
.wms-pc-amber { color: var(--wp-amber-t) !important; }
.wms-pc-red   { color: var(--wp-red-t) !important; }
.wms-pc-green { color: var(--wp-green-t) !important; }
.wms-pc-blue  { color: var(--wp-blue-t) !important; }
.wms-pc-purple { color: var(--wp-purple-t) !important; }

/* ─── QUICK ACCESS — horizontal rows ─────────────────────────── */
.wms-quick-section { margin-bottom: 32px; }
.wms-quick-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.wms-quick-title { font-size: .8rem; font-weight: 700; color: var(--wp-t1); text-transform: uppercase; letter-spacing: .08em; }
.wms-quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px,1fr)); gap: 12px; }
.wms-quick-card {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 20px;
  background: var(--wp-card); border: 1px solid var(--wp-bd);
  border-radius: var(--wp-r-lg); text-decoration: none; color: var(--wp-t1);
  box-shadow: var(--wp-shadow-xs); transition: opacity .12s;
  position: relative; cursor: pointer;
}
.wms-quick-card:hover { opacity: .7; }
.wms-quick-icon { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.wms-quick-content { flex: 1; min-width: 0; }
.wms-quick-label { font-size: .9rem; font-weight: 600; color: var(--wp-t1); line-height: 1.2; }
.wms-quick-sub { font-size: .73rem; color: var(--wp-t2); margin-top: 3px; }
.wms-quick-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.wms-quick-stat {
  font-size: .72rem; font-weight: 700;
  padding: 4px 10px; border-radius: 50px;
  background: var(--wp-card2); color: var(--wp-t2);
  border: 1px solid var(--wp-bd2);
  font-family: var(--wp-mono);
}
.wms-quick-arrow {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--wp-card2); border: 1px solid var(--wp-bd2);
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; color: var(--wp-t3);
}
.wms-quick-badge {
  position: absolute; top: 10px; right: 10px;
  background: var(--wp-red); color: #fff;
  font-size: .6rem; font-weight: 700;
  padding: 2px 7px; border-radius: 50px;
}

/* ─── FINANCE STRIP ───────────────────────────────────────────── */
.wms-portal-finance { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; margin-bottom: 32px; }
.wms-pfin-item { padding: 26px 26px; display: flex; align-items: center; gap: 18px; background: var(--wp-card); border: 1px solid var(--wp-bd); border-radius: var(--wp-r-lg); box-shadow: var(--wp-shadow); }
.wms-pfin-icon { font-size: 1.4rem; flex-shrink: 0; width: 48px; height: 48px; border-radius: 12px; background: var(--wp-card2); display: flex; align-items: center; justify-content: center; }
.wms-pfin-label { font-size: .72rem; color: var(--wp-t3); font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.wms-pfin-amount { font-size: 1.5rem; font-weight: 800; color: var(--wp-t1); margin-top: 6px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.wms-pfin-in .wms-pfin-amount { color: var(--wp-kpi-green); }
.wms-pfin-out .wms-pfin-amount { color: var(--wp-red-t); }

/* ─── ElaAdmin-style KPI ROW ─────────────────────────────────── */
.wms-ela-kpi-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 22px; margin-bottom: 30px;
}
.wms-ela-kpi-card {
  position: relative; display: flex; align-items: center; justify-content: space-between;
  padding: 30px 28px; border-radius: var(--wp-r-lg);
  text-decoration: none; overflow: hidden;
  box-shadow: 0 6px 24px rgba(0,0,0,.15);
  transition: transform .18s, box-shadow .18s;
}
.wms-ela-kpi-card:hover { transform: translateY(-3px); box-shadow: 0 12px 36px rgba(0,0,0,.2); }
.wms-ela-kpi-green  { background: linear-gradient(135deg, #4cae8a 0%, #3a9878 100%); }
.wms-ela-kpi-purple { background: linear-gradient(135deg, #9b6dcc 0%, #8558b8 100%); }
.wms-ela-kpi-blue   { background: linear-gradient(135deg, #5ba4d4 0%, #4690c0 100%); }
.wms-ela-kpi-orange { background: linear-gradient(135deg, #e8835c 0%, #d4704a 100%); }
.wms-ela-kpi-inner { position: relative; z-index: 2; }
.wms-ela-kpi-num {
  font-size: 2.6rem; font-weight: 800; color: #fff; line-height: 1;
  letter-spacing: -.04em; font-variant-numeric: tabular-nums;
}
.wms-ela-kpi-label {
  font-size: .75rem; font-weight: 800; color: rgba(255,255,255,.88);
  text-transform: uppercase; letter-spacing: .12em; margin-top: 8px;
}
.wms-ela-kpi-change {
  display: flex; align-items: center; gap: 4px;
  font-size: .8rem; font-weight: 600; color: rgba(255,255,255,.92); margin-top: 10px;
}
.wms-ela-kpi-change.up { color: rgba(255,255,255,.95); }
.wms-ela-kpi-icon {
  position: absolute; right: -12px; bottom: -12px; z-index: 1;
  opacity: .25; pointer-events: none;
}
.wms-ela-kpi-badge {
  position: absolute; top: 12px; right: 14px;
  background: rgba(255,255,255,.3); color: #fff;
  font-size: .68rem; font-weight: 800; border-radius: 50px;
  padding: 3px 10px; border: 1px solid rgba(255,255,255,.4);
}

/* ─── ElaAdmin Charts Row ─────────────────────────────────────── */
.wms-ela-charts-row {
  display: grid; grid-template-columns: 2fr 1fr;
  gap: 22px; margin-bottom: 26px;
}
.wms-ela-chart-main { }
.wms-ela-chart-donut .wms-pchart-body { height: 240px; }

/* ─── ElaAdmin Bottom Row ────────────────────────────────────── */
.wms-ela-bottom-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 22px; margin-bottom: 28px;
}

/* Recent Activity rows */
.wms-ela-act-row {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 16px 24px; border-bottom: 1px solid var(--wp-bd);
}
.wms-ela-act-row:last-child { border-bottom: none; }
.wms-ela-act-dot {
  width: 38px; height: 38px; border-radius: 50%;
  flex-shrink: 0; opacity: .85; margin-top: 2px;
  display: flex; align-items: center; justify-content: center;
}
.wms-ela-act-info { flex: 1; min-width: 0; }
.wms-ela-act-title { font-size: .9rem; font-weight: 700; color: var(--wp-t1); line-height: 1.3; }
.wms-ela-act-sub { font-size: .78rem; color: var(--wp-t2); margin-top: 3px; }
.wms-ela-act-time { font-size: .72rem; color: var(--wp-t3); margin-top: 4px; }

/* ─── PANELS ──────────────────────────────────────────────────── */
.wms-portal-panels { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 22px; margin-bottom: 36px; }
.wms-ppanel { background: var(--wp-card); border: 1px solid var(--wp-bd); border-radius: var(--wp-r-lg); overflow: hidden; box-shadow: var(--wp-shadow-xs); margin-bottom: 28px; }
.wms-portal-panels .wms-ppanel { margin-bottom: 0; }
.wms-ppanel-head { display: flex; align-items: center; gap: 10px; padding: 18px 24px; border-bottom: 1px solid var(--wp-bd); background: var(--wp-card); flex-shrink: 0; }
.wms-ppanel-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.wms-ppanel-title { font-size: 1rem; font-weight: 700; color: var(--wp-t1); flex: 1; }
.wms-ppanel-link { font-size: .82rem; color: var(--wp-accent); font-weight: 600; text-decoration: none; cursor: pointer; background: none; border: none; font-family: var(--wp-font); padding: 0; transition: opacity .12s; }
.wms-ppanel-link:hover { opacity: .65; }
.wms-ppanel-row { display: flex; align-items: center; gap: 14px; padding: 16px 24px; border-bottom: 1px solid var(--wp-bd); }
.wms-ppanel-row:last-child { border-bottom: none; }
.wms-ppanel-row-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: .9rem; flex-shrink: 0; }
.wms-ppanel-row-info { flex: 1; min-width: 0; }
.wms-ppanel-row-name { font-size: .95rem; font-weight: 600; color: var(--wp-t1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wms-ppanel-row-sub { font-size: .78rem; color: var(--wp-t3); margin-top: 2px; }
.wms-ppanel-num { font-size: 1rem; font-weight: 700; color: var(--wp-t1); white-space: nowrap; }
.wms-ppanel-num-sub { font-size: .74rem; color: var(--wp-t3); white-space: nowrap; margin-top: 2px; }
.wms-ppanel-time { font-size: .78rem; color: var(--wp-t3); white-space: nowrap; flex-shrink: 0; }
.wms-ppanel-bar { height: 5px; background: var(--wp-bd); border-radius: 3px; margin-top: 8px; }
.wms-ppanel-bar-fill { height: 100%; border-radius: 3px; }
.wms-ppanel-bar-fill.ok { background: var(--wp-green); }
.wms-ppanel-bar-fill.warn { background: var(--wp-amber); }
.wms-ppanel-bar-fill.danger { background: var(--wp-red); }
.wms-ppanel-notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--wp-blue); flex-shrink: 0; }
.wms-ppanel-empty { padding: 48px 24px; text-align: center; font-size: .95rem; color: var(--wp-t3); }
.wms-ppanel-avatar { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .74rem; font-weight: 700; color: #fff; flex-shrink: 0; }

/* ─── CHARTS ──────────────────────────────────────────────────── */
.wms-portal-charts { display: grid; grid-template-columns: 2fr 1fr; gap: 22px; margin-bottom: 36px; }
.wms-pchart { background: var(--wp-card); border: 1px solid var(--wp-bd); border-radius: var(--wp-r-lg); overflow: hidden; box-shadow: var(--wp-shadow-xs); }
.wms-pchart-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; border-bottom: 1px solid var(--wp-bd); }
.wms-pchart-title { font-size: .9rem; font-weight: 700; color: var(--wp-t1); }
.wms-pchart-period { font-size: .7rem; color: var(--wp-t3); font-family: var(--wp-mono); }
.wms-pchart-body { padding: 20px; height: 280px; }

/* ─── TABLES ──────────────────────────────────────────────────── */
.wms-portal-table-wrap { overflow-x: auto; }
.wms-portal-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.wms-portal-table thead th {
  padding: 14px 20px; background: var(--wp-card2);
  font-size: .76rem; font-weight: 700; color: var(--wp-t2);
  text-transform: uppercase; letter-spacing: .07em;
  border-bottom: 1px solid var(--wp-bd); text-align: left; white-space: nowrap;
}
.wms-portal-table tbody td { padding: 16px 20px; border-bottom: 1px solid var(--wp-bd); color: var(--wp-t1); vertical-align: middle; font-size: .9rem; }
.wms-portal-table tbody tr:last-child td { border-bottom: none; }
.wms-portal-table tbody tr { transition: background .12s; }
.wms-portal-table tbody tr:hover { background: var(--wp-card2); }
.wms-row-low td { background: var(--wp-amber-bg) !important; }

/* ─── BADGES ──────────────────────────────────────────────────── */
.wms-pbadge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 50px; font-size: .7rem; font-weight: 600; }
.wms-pbadge-retail, .wms-pbadge-incoming  { background: var(--wp-green-bg); color: var(--wp-green-t); }
.wms-pbadge-wholesale                      { background: var(--wp-blue-bg);  color: var(--wp-blue-t); }
.wms-pbadge-supplier, .wms-pbadge-expense  { background: var(--wp-amber-bg); color: var(--wp-amber-t); }
.wms-pbadge-pending                        { background: var(--wp-amber-bg); color: var(--wp-amber-t); }
.wms-pbadge-approved, .wms-pbadge-ok       { background: var(--wp-green-bg); color: var(--wp-green-t); }
.wms-pbadge-rejected, .wms-pbadge-low      { background: var(--wp-red-bg);   color: var(--wp-red-t); }
.wms-pbadge-mv-in                          { background: var(--wp-green-bg); color: var(--wp-green-t); }
.wms-pbadge-mv-out                         { background: var(--wp-red-bg);   color: var(--wp-red-t); }
.wms-pbadge-mv-adjustment                  { background: var(--wp-blue-bg);  color: var(--wp-blue-t); }
.wms-pbadge-mv-transfer                    { background: var(--wp-purple-bg); color: var(--wp-purple-t); }

/* ─── FILTER / PILLS ──────────────────────────────────────────── */
.wms-pfilter-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--wp-bd); flex-wrap: wrap; }
.wms-pfilter-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.wms-ppill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 13px; border-radius: 50px; font-size: .75rem; font-weight: 600; border: 1px solid var(--wp-bd2); background: #fff; color: var(--wp-t2); cursor: pointer; font-family: var(--wp-font); text-decoration: none; transition: opacity .12s; }
.wms-ppill:hover { opacity: .65; }
.wms-ppill.active { background: var(--wp-accent-bg); border-color: var(--wp-green-bd); color: var(--wp-accent-dark); }
.wms-ppill-count { background: var(--wp-card2); color: var(--wp-t2); font-size: .65rem; padding: 1px 6px; border-radius: 50px; border: 1px solid var(--wp-bd); }
.wms-ppill.active .wms-ppill-count { background: var(--wp-accent); border-color: var(--wp-accent); color: #fff; }

/* ─── FORM FIELDS ─────────────────────────────────────────────── */
.wms-pf-label { display: block; font-size: .78rem; font-weight: 700; color: var(--wp-t2); margin-bottom: 8px; }
.wms-pf-input { width: 100%; padding: 10px 14px; border-radius: var(--wp-r); border: 1.5px solid var(--wp-bd2); background: var(--wp-input); color: var(--wp-t1); font-size: .9rem; font-family: var(--wp-font); outline: none; transition: border-color .15s, box-shadow .15s; }
.wms-pf-input:focus { border-color: #76a3c0; box-shadow: 0 0 0 3px rgba(118,163,192,.18); }
.wms-pf-input::placeholder { color: var(--wp-t4); }
.wms-pf-input option { background: #fff; color: var(--wp-t1); }
.wms-req { color: var(--wp-red); font-weight: 700; }
.wms-editable { display: flex; align-items: center; gap: 6px; }
.wms-edit-val { cursor: pointer; color: var(--wp-t1); font-weight: 600; }
.edit-hint { font-size: .68rem; color: var(--wp-t3); }
.wms-edit-val:hover .edit-hint { color: var(--wp-accent); }
.wms-inline-input { width: 80px; padding: 4px 7px; font-size: .8rem; border: 1px solid var(--wp-accent); border-radius: 6px; font-family: var(--wp-font); display: none; background: #fff; color: var(--wp-t1); }
.wms-inline-save { display: none; padding: 3px 8px; border-radius: 5px; font-size: .72rem; font-weight: 700; cursor: pointer; border: none; background: var(--wp-accent); color: #fff; }
.wms-inline-cancel { display: none; padding: 3px 8px; border-radius: 5px; font-size: .72rem; font-weight: 700; cursor: pointer; border: none; background: var(--wp-red-bg); color: var(--wp-red-t); }
.wms-editable.editing .wms-edit-val { display: none; }
.wms-editable.editing .wms-inline-input, .wms-editable.editing .wms-inline-save, .wms-editable.editing .wms-inline-cancel { display: inline-flex; }

/* ─── LOGO UPLOAD ─────────────────────────────────────────────── */
.wms-logo-upload-btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: var(--wp-r); border: 1.5px dashed var(--wp-bd2); background: var(--wp-input); color: var(--wp-t2); font-size: .83rem; font-weight: 600; cursor: pointer; font-family: var(--wp-font); transition: opacity .12s; }
.wms-logo-upload-btn:hover { opacity: .7; }
.wms-logo-preview-wrap { width: 88px; height: 88px; background: var(--wp-card2); border: 1.5px dashed var(--wp-bd2); border-radius: 12px; display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.wms-logo-preview-img { max-height: 68px; max-width: 160px; object-fit: contain; margin: 0 auto; display: block; }

/* ─── ACTION PILLS ────────────────────────────────────────────── */
.wms-ppill-action { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 7px; font-size: .82rem; font-weight: 700; cursor: pointer; text-decoration: none; border: 1px solid; font-family: var(--wp-font); transition: opacity .12s; }
.wms-ppill-action:hover { opacity: .78; }
.wms-ppill-green  { border-color: var(--wp-btn); background: var(--wp-btn); color: #fff; }
.wms-ppill-orange { border-color: var(--wp-amber-t); background: var(--wp-amber-t); color: #fff; }
.wms-ppill-blue   { border-color: var(--wp-btn); background: var(--wp-btn); color: #fff; }
.wms-ppill-teal   { border-color: var(--wp-btn-dark); background: var(--wp-btn-dark); color: #fff; }
.wms-ppill-purple { border-color: var(--wp-purple-t); background: var(--wp-purple-t); color: #fff; }
.wms-ppill-neutral { border-color: var(--wp-bd2); background: var(--wp-card2); color: var(--wp-t2); }
.wms-ppill-red    { border-color: var(--wp-red-bd); background: var(--wp-red-bg); color: var(--wp-red-t); }

/* ─── PAGINATION ──────────────────────────────────────────────── */

/* ─── NOTIFICATION BELL ─────────────────────────────────────────── */
.wms-notif-bell { position: relative; }
.wms-notif-btn {
  position: relative; background: none; border: none; cursor: pointer;
  padding: 7px; border-radius: 10px; color: var(--wp-t2);
  display: flex; align-items: center; justify-content: center;
  transition: background .14s, color .14s;
}
.wms-notif-btn:hover,
.wms-notif-bell.open .wms-notif-btn {
  background: var(--wp-card2); color: var(--wp-t1);
}
.wms-notif-badge {
  position: absolute; top: 2px; right: 2px;
  background: #dc2626; color: #fff; font-size: .6rem; font-weight: 800;
  min-width: 16px; height: 16px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px; line-height: 1; border: 2px solid #fff;
  font-family: var(--wp-mono);
  transition: transform .2s;
}
.wms-notif-badge-pulse {
  animation: wms-badge-pop .35s ease;
}
@keyframes wms-badge-pop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.45); }
  100% { transform: scale(1); }
}
.wms-notif-dropdown {
  position: absolute; top: calc(100% + 10px); right: -10px;
  width: 340px; background: #fff;
  border: 1px solid var(--wp-bd); border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,.13);
  z-index: 9999; opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(-6px) scale(.98);
  transition: opacity .16s, transform .16s, visibility .16s;
}
.wms-notif-dropdown.visible {
  opacity: 1; visibility: visible; pointer-events: all;
  transform: translateY(0) scale(1);
}
.wms-notif-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 10px; border-bottom: 1px solid var(--wp-bd);
}
.wms-notif-title {
  font-size: .86rem; font-weight: 700; color: var(--wp-t1);
}
.wms-notif-mark-all {
  background: none; border: none; cursor: pointer;
  font-size: .72rem; color: var(--wp-accent); font-weight: 600;
  padding: 0; font-family: var(--wp-font);
}
.wms-notif-mark-all:hover { text-decoration: underline; }
.wms-notif-list {
  max-height: 320px; overflow-y: auto; padding: 6px 0;
}
.wms-notif-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 14px; cursor: default;
  transition: background .1s; position: relative;
}
.wms-notif-item:hover { background: var(--wp-card2); }
.wms-notif-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; flex-shrink: 0;
}
.wms-notif-body { flex: 1; min-width: 0; }
.wms-notif-msg {
  font-size: .8rem; color: var(--wp-t1); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.wms-notif-meta {
  font-size: .68rem; color: var(--wp-t3); margin-top: 3px;
  font-family: var(--wp-mono);
}
.wms-notif-read-btn {
  background: none; border: none; cursor: pointer;
  color: var(--wp-t3); font-size: 1rem; padding: 0 2px; line-height: 1;
  opacity: 0; transition: opacity .12s; flex-shrink: 0; align-self: center;
}
.wms-notif-item:hover .wms-notif-read-btn { opacity: 1; }
.wms-notif-read-btn:hover { color: var(--wp-red); }
.wms-notif-empty, .wms-notif-loading {
  text-align: center; padding: 24px 16px;
  font-size: .8rem; color: var(--wp-t3);
}
.wms-notif-footer {
  padding: 10px 16px; border-top: 1px solid var(--wp-bd); text-align: center;
}
.wms-notif-viewall {
  font-size: .76rem; color: var(--wp-accent); font-weight: 600;
  text-decoration: none;
}
.wms-notif-viewall:hover { text-decoration: underline; }

/* ─── PAGINATION ────────────────────────────────────────────────── */
.wms-pagination {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid var(--wp-bd);
  background: var(--wp-card2);
  border-radius: 0 0 var(--wp-r-lg) var(--wp-r-lg);
  gap: 10px; flex-wrap: wrap;
}
.wms-pagination-meta {
  font-size: .78rem; color: var(--wp-t3); font-weight: 500; white-space: nowrap;
}
.wms-pagination-meta strong { color: var(--wp-t2); }
.wms-pagination-controls {
  display: flex; align-items: center; gap: 3px;
}
.wms-pagination-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 34px; padding: 0 8px;
  border-radius: 8px; font-size: .82rem; font-weight: 600;
  cursor: pointer; border: 1.5px solid transparent;
  background: transparent; color: var(--wp-t3);
  font-family: var(--wp-font); transition: all .14s;
  line-height: 1; user-select: none;
}
.wms-pagination-btn:hover:not(:disabled):not(.active) {
  color: var(--wp-t1); background: #fff;
  border-color: var(--wp-bd); box-shadow: 0 1px 3px rgba(0,0,0,.07);
}
.wms-pagination-btn.active {
  background: #1e3144; color: #fff; border-color: #1e3144;
  box-shadow: 0 2px 6px rgba(30,49,68,.25);
  font-weight: 700;
}
.wms-pagination-btn:disabled { opacity: .3; cursor: not-allowed; }
.wms-pagination-btn.nav {
  color: var(--wp-t3); min-width: 34px; font-size: .8rem;
}
.wms-pagination-btn.nav:hover:not(:disabled) {
  color: var(--wp-t1); background: #fff;
  border-color: var(--wp-bd); box-shadow: 0 1px 3px rgba(0,0,0,.07);
}
.wms-pagination-ellipsis {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 34px; font-size: .78rem; color: var(--wp-t3);
  letter-spacing: .08em; user-select: none;
}
.wms-pagination-jump {
  display: flex; align-items: center; gap: 6px;
  font-size: .76rem; color: var(--wp-t3);
}
.wms-pagination-jump input {
  width: 44px; height: 30px; border-radius: 6px;
  border: 1.5px solid var(--wp-bd); background: #fff;
  text-align: center; font-size: .8rem; font-family: var(--wp-font);
  color: var(--wp-t1); outline: none; padding: 0 4px;
}
.wms-pagination-jump input:focus { border-color: #76a3c0; }
.wms-pagin-hidden-search { display: none !important; }

/* ─── ALERT BANNERS ────────────────────────────────────────────── */
.wms-alert {
  padding: 13px 18px; border-radius: var(--wp-r-lg);
  font-size: .86rem; font-weight: 600; display: flex; align-items: center; gap: 10px;
}
.wms-alert-success {
  background: var(--wp-green-bg); border: 1px solid var(--wp-green-bd); color: var(--wp-green);
}
.wms-alert-error {
  background: var(--wp-red-bg); border: 1px solid #fecaca; color: var(--wp-red);
}
.wms-alert-info {
  background: var(--wp-blue-bg); border: 1px solid #bfdbfe; color: var(--wp-blue);
}

/* ─── PORTAL PILLS ROW ────────────────────────────────────────── */
.wms-portal-pills-row { display: flex; align-items: center; gap: 8px; padding: 10px 14px; flex-wrap: wrap; }
.wms-portal-pills-label { font-size: .69rem; font-weight: 700; color: var(--wp-t3); text-transform: uppercase; letter-spacing: .08em; flex-shrink: 0; }
.wms-portal-pills { display: flex; gap: 6px; flex-wrap: wrap; }

/* ─── TOGGLE / SETTINGS ROWS ──────────────────────────────────── */
.wms-toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--wp-bd); transition: opacity .12s; }
.wms-toggle-row:hover { opacity: .75; }
.wms-toggle-row:last-child { border-bottom: none; }
.wms-toggle-label { font-size: .875rem; font-weight: 600; color: var(--wp-t1); }
.wms-toggle-sub { font-size: .72rem; color: var(--wp-t3); margin-top: 3px; }

/* ─── SECTION DIVIDER ─────────────────────────────────────────── */
.wms-section-divider { height: 1px; background: var(--wp-bd); margin: 28px 0; }
.wms-section-title { font-size: .7rem; font-weight: 700; color: var(--wp-t3); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 14px; }

/* ─── BACKUP / IMPORT CARDS ───────────────────────────────────── */
.wms-backup-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 14px; margin-bottom: 24px; }
.wms-backup-card { background: var(--wp-card); border: 1px solid var(--wp-bd); border-radius: var(--wp-r-lg); padding: 20px 22px; box-shadow: var(--wp-shadow-xs); }
.wms-backup-card-title { font-size: .9rem; font-weight: 700; color: var(--wp-t1); margin-bottom: 4px; }
.wms-backup-card-desc { font-size: .77rem; color: var(--wp-t2); margin-bottom: 16px; line-height: 1.5; }
.wms-backup-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.wms-import-zone { border: 2px dashed var(--wp-bd2); border-radius: var(--wp-r-lg); padding: 24px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; background: var(--wp-card2); }
.wms-import-zone:hover { border-color: var(--wp-accent); background: var(--wp-accent-bg); }
.wms-import-zone.drag-over { border-color: var(--wp-accent); background: var(--wp-accent-bg); }
.wms-import-zone-icon { font-size: 2rem; margin-bottom: 8px; opacity: .4; }
.wms-import-zone-text { font-size: .83rem; color: var(--wp-t2); font-weight: 500; }
.wms-import-zone-hint { font-size: .72rem; color: var(--wp-t3); margin-top: 4px; }
.wms-import-result { margin-top: 10px; padding: 10px 14px; border-radius: var(--wp-r); font-size: .8rem; font-weight: 600; display: none; }
.wms-import-result.success { background: var(--wp-green-bg); color: var(--wp-green-t); border: 1px solid var(--wp-green-bd); }
.wms-import-result.error   { background: var(--wp-red-bg);   color: var(--wp-red-t);   border: 1px solid var(--wp-red-bd); }

/* ─── ANIMATIONS ──────────────────────────────────────────────── */
.wms-reveal { animation: wms-up .35s ease both; }
.wms-reveal-1 { animation-delay: .04s; }
.wms-reveal-2 { animation-delay: .08s; }
.wms-reveal-3 { animation-delay: .12s; }
.wms-reveal-4 { animation-delay: .16s; }
.wms-reveal-5 { animation-delay: .20s; }
.wms-reveal-6 { animation-delay: .24s; }
@keyframes wms-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes wms-spin { to { transform: rotate(360deg); } }

/* ─── LOGIN PAGE — Clean White Card ──────────────────────────── */
.wms-login-page {
  min-height: 100vh;
  background: linear-gradient(145deg, #e8edf4 0%, #dde4ed 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
  font-family: var(--wp-font);
}

/* Card */
.wms-login-card {
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(30,49,68,.14), 0 6px 20px rgba(30,49,68,.08);
  padding: 52px 44px 36px;
  width: 100%; max-width: 440px;
  text-align: center;
  position: relative;
}

/* Avatar circle */
.wms-login-avatar {
  width: 90px; height: 90px; border-radius: 50%;
  background: linear-gradient(135deg, #76a3c0 0%, #1e3144 100%);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px;
  box-shadow: 0 8px 28px rgba(30,49,68,.3);
}
.wms-login-avatar-img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }

/* Headings */
.wms-login-title {
  font-size: 1.25rem; font-weight: 800; color: #1e3144;
  letter-spacing: -.01em; margin-bottom: 6px; line-height: 1.3;
}
.wms-login-company {
  font-size: .84rem; color: #8fa0b3; font-weight: 600; margin-bottom: 32px; line-height: 1.5;
}

/* Error */
.wms-login-error {
  display: flex; align-items: center; gap: 9px;
  background: #fef2f2; border: 1.5px solid #fecaca; color: #c0392b;
  padding: 12px 16px; border-radius: 12px; font-size: .83rem; font-weight: 600;
  margin-bottom: 22px; text-align: left;
}

/* Fields */
.wms-login-field { margin-bottom: 18px; }
.wms-login-input-wrap {
  position: relative; display: flex; align-items: center;
  background: #f4f7fb;
  border: 1.5px solid #e3e8ef;
  border-radius: 12px;
  transition: border-color .15s, box-shadow .15s;
}
.wms-login-input-wrap:focus-within {
  border-color: #76a3c0;
  box-shadow: 0 0 0 3px rgba(118,163,192,.18);
}
.wms-login-field-icon {
  position: absolute; left: 16px; color: #8fa0b3;
  display: flex; align-items: center; pointer-events: none; flex-shrink: 0;
  z-index: 1;
}
.wms-login-input {
  width: 100%; padding: 15px 48px 15px 52px;
  background: transparent; border: none; outline: none;
  font-family: var(--wp-font); font-size: .95rem; color: #1e3144;
  border-radius: 12px; position: relative; z-index: 2;
}
.wms-login-input::placeholder { color: #b0bec8; }
.wms-login-eye {
  position: absolute; right: 14px; background: none; border: none;
  cursor: pointer; color: #8fa0b3; display: flex; align-items: center; padding: 5px;
  transition: color .14s; flex-shrink: 0; z-index: 3;
}
.wms-login-eye:hover { color: #1e3144; }

/* Remember + Forgot */
.wms-login-opts {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px; padding: 0 2px;
}
.wms-login-remember {
  display: flex; align-items: center; gap: 9px;
  font-size: .83rem; color: #5a6a7e; cursor: pointer; font-weight: 600;
}
.wms-login-remember input[type="checkbox"] { display: none; }
.wms-login-check {
  width: 20px; height: 20px; border-radius: 6px; flex-shrink: 0;
  background: #f4f7fb; border: 1.5px solid #c9d3df;
  position: relative; transition: .15s;
}
.wms-login-remember input:checked + .wms-login-check {
  background: #76a3c0; border-color: #76a3c0;
}
.wms-login-remember input:checked + .wms-login-check::after {
  content: '✓'; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%); color: #fff;
  font-size: .65rem; font-weight: 900; line-height: 1;
}
.wms-login-forgot { font-size: .82rem; color: #76a3c0; font-weight: 700; }

/* Submit button */
.wms-login-btn {
  width: 100%; padding: 16px;
  background: linear-gradient(135deg, #76a3c0 0%, #1e3144 100%);
  border: none; border-radius: 14px; cursor: pointer;
  font-family: var(--wp-font); font-size: 1.05rem; font-weight: 800;
  color: #fff; letter-spacing: .15em;
  box-shadow: 0 8px 24px rgba(30,49,68,.3);
  transition: transform .15s, box-shadow .15s; outline: none;
}
.wms-login-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(30,49,68,.4); }
.wms-login-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* Warnings */
.wms-login-warn {
  font-size: .76rem; color: #d97706; margin-top: 14px; font-weight: 600;
}
.wms-login-locked-msg {
  font-size: .88rem; color: #c0392b; font-weight: 600;
  padding: 20px 0; line-height: 1.6;
}

/* Footer */
.wms-login-footer {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: .72rem; color: #8fa0b3; margin-top: 28px;
  padding-top: 20px; border-top: 1px solid #e8edf4;
}

/* ─── RESPONSIVE ──────────────────────────────────────────────── */
@media(min-width:1440px) {
  .wms-portal-main { padding: 40px 48px 72px; }
}
@media(max-width:1200px) {
  .wms-portal-main { padding: 30px 28px 56px; }
  .wms-portal-topbar { padding: 0 28px; }
}
@media(max-width:1024px) {
  .wms-portal-main { padding: 26px 22px 48px; }
  .wms-portal-charts { grid-template-columns: 1fr; }
  .wms-portal-kpi-grid { grid-template-columns: repeat(3,1fr); }
  .wms-quick-grid { grid-template-columns: repeat(2,1fr); }
  .portal-users-top-grid, .wms-portal-mat-grid, .portal-create-user-grid { grid-template-columns: 1fr !important; }
  .wms-ela-kpi-row { grid-template-columns: repeat(2,1fr); }
  .wms-ela-charts-row { grid-template-columns: 1fr; }
  .wms-ela-bottom-row { grid-template-columns: 1fr; }
}
@media(max-width:900px) {
  .wms-sidebar { transform: translateX(calc(-1 * var(--wp-sidebar-w))); }
  .wms-sidebar.open { transform: translateX(0); }
  .wms-portal-body { margin-left: 0; }
  .wms-sb-hamburger { display: flex; }
  .wms-portal-topbar { padding: 0 16px 0 62px; }
  .wms-portal-main { padding: 24px 18px 42px; }
  .wms-portal-kpi-grid { grid-template-columns: repeat(2,1fr); }
  .wms-portal-panels { grid-template-columns: 1fr; }
  .wms-portal-finance { grid-template-columns: 1fr 1fr; gap: 14px; }
  .wms-quick-grid { grid-template-columns: 1fr; }
  .wms-portal-footer { padding: 14px 18px; }
  .wms-pipeline-strip { flex-wrap: wrap; }
  .wms-pipe-card { flex: 0 0 calc(50% - 0px); border-right: none; border-bottom: 1px solid var(--wp-bd); }
  .wms-pipe-arrow { display: none; }
  .wms-ela-kpi-row { grid-template-columns: repeat(2,1fr); gap: 14px; }
  .wms-ela-charts-row, .wms-ela-bottom-row { grid-template-columns: 1fr; gap: 16px; }
  /* Sidebar overlay when open */
  .wms-sidebar.open ~ .wms-portal-body::before {
    content: ''; position: fixed; inset: 0;
    background: rgba(0,0,0,.45); z-index: 190;
  }
}

@media(max-width:640px) {
  /* Layout */
  .wms-portal-topbar { padding: 0 12px 0 58px; height: 56px; }
  .wms-portal-main   { padding: 18px 12px 36px; }
  .wms-topbar-clock  { display: none; }
  .wms-portal-topbar-page { display: none; }

  /* Page header */
  .wms-portal-page-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .wms-portal-page-actions { width: 100%; }
  .wms-portal-page-actions .wms-pcard-btn { width: 100%; justify-content: center; }
  .wms-portal-page-title { font-size: 1.3rem; }
  .wms-portal-page-sub { font-size: .82rem; }

  /* KPI cards */
  .wms-portal-kpi-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .wms-pcard { padding: 18px 16px 16px; }
  .wms-pcard-num { font-size: 1.7rem; }
  .wms-ela-kpi-row { grid-template-columns: 1fr 1fr; gap: 12px; }
  .wms-ela-kpi-card { padding: 20px 18px; }
  .wms-ela-kpi-num { font-size: 1.9rem; }
  .wms-portal-finance { grid-template-columns: 1fr; gap: 10px; }

  /* Tables — card-stack layout on mobile */
  .wms-portal-table { font-size: .88rem; }
  .wms-portal-table thead { display: none; }
  .wms-portal-table tbody tr {
    display: block;
    border: 1.5px solid var(--wp-bd);
    border-radius: 12px;
    margin-bottom: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
  }
  .wms-portal-table tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    font-size: .88rem;
    border-bottom: 1px solid var(--wp-bd);
    gap: 8px;
  }
  .wms-portal-table tbody td:last-child { border-bottom: none; }
  .wms-portal-table tbody td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--wp-t3);
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    flex-shrink: 0;
    min-width: 90px;
  }
  .wms-portal-table tbody tr:hover { background: var(--wp-card2); }

  /* Topbar user - hide name/role on mobile, show avatar only */
  .wms-topbar-user-info { display: none; }
  .wms-topbar-user { padding: 4px; border-radius: 50%; }
  .wms-topbar-chevron { display: none; }
  .wms-topbar-dropdown { right: -8px; min-width: 220px; }

  /* Pagination */
  .wms-pagination { padding: 12px 14px; gap: 8px; }
  .wms-pagination-jump { display: none; }
  .wms-pagination-btn { min-width: 32px; height: 32px; font-size: .82rem; }

  /* Filter bar */
  .wms-pfilter-bar { flex-direction: column; align-items: stretch; gap: 8px; }
  .wms-pfilter-pills { overflow-x: auto; padding-bottom: 4px; flex-wrap: nowrap; }
  .wms-ppill { white-space: nowrap; }

  /* Forms */
  .wms-portal-form-grid { grid-template-columns: 1fr !important; }
  .wms-pcard-btn { font-size: .88rem; padding: 9px 16px; }

  /* Login */
  .wms-login-card { padding: 40px 24px 28px; border-radius: 18px; }
  .wms-login-avatar { width: 78px; height: 78px; margin-bottom: 20px; }
  .wms-login-title { font-size: 1.1rem; }
  .wms-login-input { font-size: .92rem; }
  .wms-login-btn { font-size: .98rem; padding: 14px; }

  /* Panels */
  .wms-ppanel-head { padding: 14px 16px; }
  .wms-ppanel-row { padding: 12px 16px; }
  .wms-ppanel-title { font-size: .92rem; }
  
  /* Charts */
  .wms-ela-charts-row, .wms-ela-bottom-row { gap: 12px; }
  .wms-pchart { min-height: 260px; }
  .wms-pchart-body canvas { max-height: 200px !important; }

  /* Invoice print */
  .inv-meta { grid-template-columns: 1fr 1fr; }
  .inv-parties { grid-template-columns: 1fr; gap: 20px; }
  .inv-party-block + .inv-party-block { border-left: none; padding-left: 0; border-top: 1px solid #e2e8f0; padding-top: 18px; }
  .inv-items, .inv-notes, .inv-footer { margin-left: 16px; margin-right: 16px; }
  .inv-meta-cell { padding: 14px 16px; }
}

@media(max-width:400px) {
  .wms-portal-kpi-grid { grid-template-columns: 1fr 1fr; }
  .wms-ela-kpi-row { grid-template-columns: 1fr 1fr; }
  .wms-portal-main { padding: 14px 10px 28px; }
  .wms-pcard-num { font-size: 1.5rem; }
  .wms-ela-kpi-num { font-size: 1.7rem; }
  .wms-pagination-meta { display: none; }
  .wms-pagination-btn { min-width: 30px; height: 30px; font-size: .8rem; }
  .wms-portal-page-title { font-size: 1.15rem; }
}


/* ─── LOGIN BRAND CIRCLES (legacy) ───────────────────────────── */
.wms-login-brand-circles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.wms-lbc { position: absolute; border-radius: 50%; border: 1px solid rgba(255,255,255,.06); }
.wms-lbc-1 { width: 320px; height: 320px; right: -120px; top: -80px; }
.wms-lbc-2 { width: 200px; height: 200px; right: -50px; bottom: 80px; background: rgba(255,255,255,.03); }
.wms-lbc-3 { width: 120px; height: 120px; left: -30px; top: 180px; }
