/* ============================================================
   Whirlpool IMS — Modern Design System v2.0
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --wp-primary:      #003087;
  --wp-primary-light:#1a4aa8;
  --wp-primary-dark: #001d5c;
  --wp-accent:       #e31837;
  --wp-accent-light: #ff3355;

  --wp-bg:           #eef1f8;
  --wp-surface:      #ffffff;
  --wp-surface-2:    #f7f9fd;
  --wp-border:       #e4e8f4;
  --wp-border-hover: #c8d0e8;

  --wp-text-primary:   #0f1729;
  --wp-text-secondary: #5a6a8a;
  --wp-text-muted:     #8fa0c0;

  --wp-sidebar-w:  268px;
  --wp-topbar-h:   60px;
  --wp-radius-sm:  8px;
  --wp-radius:     12px;
  --wp-radius-lg:  16px;
  --wp-radius-xl:  20px;

  --wp-shadow-xs:  0 1px 3px rgba(15,23,41,.06);
  --wp-shadow-sm:  0 2px 8px rgba(15,23,41,.08);
  --wp-shadow:     0 4px 16px rgba(15,23,41,.10);
  --wp-shadow-lg:  0 8px 32px rgba(15,23,41,.12);
  --wp-shadow-blue:0 4px 20px rgba(0,48,135,.18);

  --wp-transition: all .2s cubic-bezier(.4,0,.2,1);
  --wp-transition-fast: all .15s cubic-bezier(.4,0,.2,1);
}

/* ── Reset & Base ───────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--wp-bg);
  color: var(--wp-text-primary);
  font-size: 13.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── Scrollbar ──────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--wp-border-hover); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--wp-text-muted); }

/* ============================================================
   SIDEBAR
   ============================================================ */
#sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--wp-sidebar-w);
  height: 100vh;
  background: linear-gradient(180deg, #001a52 0%, #002276 40%, #001f6e 100%);
  display: flex;
  flex-direction: column;
  z-index: 1050;
  transition: var(--wp-transition);
  overflow: hidden;
}

#sidebar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 200px;
  background: radial-gradient(ellipse at 50% 0%, rgba(255,255,255,.04) 0%, transparent 70%);
  pointer-events: none;
}

/* Brand */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 20px;
  height: 60px;
  min-height: 60px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  text-decoration: none;
  flex-shrink: 0;
}

.sidebar-logo-wrap {
  width: 34px;
  height: 34px;
  background: rgba(255,255,255,.12);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,.15);
}

.sidebar-logo-wrap svg { width: 20px; height: 20px; }

.sidebar-brand-text .brand-name {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .3px;
  line-height: 1.1;
}

.sidebar-brand-text .brand-sub {
  color: rgba(255,255,255,.38);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Nav scroll area */
.sidebar-nav-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 0 16px;
}

.sidebar-nav-scroll::-webkit-scrollbar { width: 3px; }
.sidebar-nav-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); }

/* Section labels */
.nav-section {
  padding: 16px 20px 5px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  color: rgba(255,255,255,.25);
  user-select: none;
}

/* Nav links */
.nav-item { list-style: none; }

.nav-link-wp {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8.5px 12px 8.5px 16px;
  margin: 1px 10px;
  border-radius: var(--wp-radius-sm);
  color: rgba(255,255,255,.6);
  text-decoration: none;
  font-size: 13px;
  font-weight: 400;
  transition: var(--wp-transition-fast);
  position: relative;
  cursor: pointer;
  user-select: none;
}

.nav-link-wp:hover {
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.9);
}

.nav-link-wp.active {
  background: rgba(255,255,255,.12);
  color: #fff;
  font-weight: 500;
}

.nav-link-wp.active::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 6px; bottom: 6px;
  width: 3px;
  background: #4d9fff;
  border-radius: 0 3px 3px 0;
}

.nav-icon {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13.5px;
  flex-shrink: 0;
  background: rgba(255,255,255,.05);
  transition: var(--wp-transition-fast);
}

.nav-link-wp:hover .nav-icon { background: rgba(255,255,255,.1); }

.nav-link-wp.active .nav-icon {
  background: rgba(77,159,255,.2);
  color: #7dbfff;
}

.nav-label { flex: 1; }

.nav-badge-count {
  background: var(--wp-accent);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.nav-chevron {
  font-size: 10px;
  color: rgba(255,255,255,.3);
  transition: transform .25s;
  flex-shrink: 0;
}

.nav-link-wp[aria-expanded="true"] .nav-chevron { transform: rotate(90deg); }

/* Submenu */
.nav-sub {
  list-style: none;
  margin: 0 10px 4px;
}

.nav-sub-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px 7px 20px;
  border-radius: var(--wp-radius-sm);
  color: rgba(255,255,255,.5);
  text-decoration: none;
  font-size: 12.5px;
  transition: var(--wp-transition-fast);
}

.nav-sub-link:hover { color: rgba(255,255,255,.85); background: rgba(255,255,255,.05); }

.nav-sub-link.active { color: #7dbfff; font-weight: 500; }

.nav-sub-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,.25);
  flex-shrink: 0;
}

.nav-sub-link.active .nav-sub-dot { background: #4d9fff; }

/* Sidebar divider */
.sidebar-divider {
  height: 1px;
  background: rgba(255,255,255,.06);
  margin: 8px 20px;
}

/* Sidebar footer */
.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}

.sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--wp-radius-sm);
  transition: var(--wp-transition-fast);
  cursor: pointer;
  text-decoration: none;
}

.sidebar-user-card:hover { background: rgba(255,255,255,.07); }

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #1a4aa8, #4d9fff);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.user-info-name {
  color: rgba(255,255,255,.85);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.2;
}

.user-info-role {
  color: rgba(255,255,255,.35);
  font-size: 11px;
}

/* ============================================================
   TOPBAR
   ============================================================ */
#topbar {
  position: fixed;
  top: 0;
  left: var(--wp-sidebar-w);
  right: 0;
  height: var(--wp-topbar-h);
  background: var(--wp-surface);
  border-bottom: 1px solid var(--wp-border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 14px;
  z-index: 1040;
  transition: var(--wp-transition);
}

#sidebar-toggle {
  width: 34px; height: 34px;
  border: none;
  background: var(--wp-surface-2);
  border-radius: var(--wp-radius-sm);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--wp-text-secondary);
  font-size: 14px;
  transition: var(--wp-transition-fast);
  flex-shrink: 0;
}

#sidebar-toggle:hover { background: var(--wp-border); color: var(--wp-primary); }

/* Breadcrumb */
.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--wp-text-muted);
}

.topbar-breadcrumb .bc-sep { font-size: 10px; }
.topbar-breadcrumb .bc-current { color: var(--wp-text-primary); font-weight: 500; }

.topbar-spacer { flex: 1; }

/* Search */
.topbar-search {
  position: relative;
  width: 240px;
}

.topbar-search input {
  width: 100%;
  padding: 7px 14px 7px 34px;
  border: 1.5px solid var(--wp-border);
  border-radius: 20px;
  font-size: 13px;
  background: var(--wp-surface-2);
  color: var(--wp-text-primary);
  outline: none;
  transition: var(--wp-transition-fast);
  font-family: inherit;
}

.topbar-search input:focus {
  border-color: var(--wp-primary);
  background: var(--wp-surface);
  box-shadow: 0 0 0 3px rgba(0,48,135,.07);
}

.topbar-search input::placeholder { color: var(--wp-text-muted); }

.topbar-search .search-icon {
  position: absolute;
  left: 11px; top: 50%;
  transform: translateY(-50%);
  color: var(--wp-text-muted);
  font-size: 12px;
  pointer-events: none;
}

/* Topbar action buttons */
.topbar-btn {
  width: 36px; height: 36px;
  border: none;
  background: transparent;
  border-radius: var(--wp-radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--wp-text-secondary);
  font-size: 14.5px;
  cursor: pointer;
  position: relative;
  transition: var(--wp-transition-fast);
  text-decoration: none;
}

.topbar-btn:hover { background: var(--wp-surface-2); color: var(--wp-primary); }

.topbar-notif-dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 7px; height: 7px;
  background: var(--wp-accent);
  border-radius: 50%;
  border: 2px solid var(--wp-surface);
}

/* Avatar */
.topbar-avatar-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 4px 4px;
  border: none;
  background: var(--wp-surface-2);
  border-radius: 20px;
  cursor: pointer;
  transition: var(--wp-transition-fast);
  border: 1px solid var(--wp-border);
}

.topbar-avatar-btn:hover { border-color: var(--wp-border-hover); background: var(--wp-surface); }

.topbar-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--wp-primary), var(--wp-primary-light));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}

.topbar-user-name {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--wp-text-primary);
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Search results dropdown */
#search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--wp-surface);
  border: 1px solid var(--wp-border);
  border-radius: var(--wp-radius);
  box-shadow: var(--wp-shadow-lg);
  z-index: 9999;
  max-height: 360px;
  overflow-y: auto;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  text-decoration: none;
  border-bottom: 1px solid var(--wp-border);
  transition: var(--wp-transition-fast);
}

.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--wp-surface-2); }

/* ============================================================
   MAIN CONTENT
   ============================================================ */
#main-content {
  margin-left: var(--wp-sidebar-w);
  padding-top: var(--wp-topbar-h);
  min-height: 100vh;
  transition: var(--wp-transition);
}

.content-body { padding: 24px 28px 48px; }

/* Page Header */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 22px;
  gap: 12px;
  flex-wrap: wrap;
}

.page-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--wp-text-primary);
  letter-spacing: -.3px;
  line-height: 1.2;
}

.page-subtitle {
  font-size: 13px;
  color: var(--wp-text-muted);
  margin-top: 3px;
}

/* ============================================================
   STAT CARDS
   ============================================================ */
.stat-card {
  background: var(--wp-surface);
  border-radius: var(--wp-radius-lg);
  padding: 20px;
  border: 1px solid var(--wp-border);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--wp-transition);
  box-shadow: var(--wp-shadow-xs);
}

.stat-card:hover {
  box-shadow: var(--wp-shadow);
  border-color: var(--wp-border-hover);
  transform: translateY(-1px);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--wp-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.stat-icon.blue   { background: #dbeafe; color: #1d4ed8; }
.stat-icon.green  { background: #dcfce7; color: #16a34a; }
.stat-icon.amber  { background: #fef3c7; color: #d97706; }
.stat-icon.red    { background: #fee2e2; color: #dc2626; }
.stat-icon.purple { background: #ede9fe; color: #7c3aed; }
.stat-icon.teal   { background: #ccfbf1; color: #0d9488; }
.stat-icon.indigo { background: #e0e7ff; color: #4338ca; }
.stat-icon.pink   { background: #fce7f3; color: #be185d; }

.stat-info .stat-label {
  font-size: 11.5px;
  color: var(--wp-text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 3px;
}

.stat-info .stat-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--wp-text-primary);
  letter-spacing: -.5px;
  line-height: 1;
}

.stat-info .stat-meta {
  font-size: 12px;
  color: var(--wp-text-muted);
  margin-top: 4px;
}

.stat-info .stat-up   { color: #16a34a; }
.stat-info .stat-down { color: #dc2626; }

/* ============================================================
   CARDS
   ============================================================ */
.wp-card {
  background: var(--wp-surface);
  border-radius: var(--wp-radius-lg);
  border: 1px solid var(--wp-border);
  box-shadow: var(--wp-shadow-xs);
  overflow: hidden;
}

.wp-card .card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--wp-border);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: var(--wp-surface);
}

.wp-card .card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--wp-text-primary);
  margin: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wp-card .card-title i { color: var(--wp-primary); font-size: 14px; }

.wp-card .card-body { padding: 20px; }

.wp-card .card-footer {
  padding: 12px 20px;
  background: var(--wp-surface-2);
  border-top: 1px solid var(--wp-border);
}

/* ============================================================
   TABLES
   ============================================================ */
.wp-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.wp-table thead th {
  padding: 10px 16px;
  background: var(--wp-surface-2);
  color: var(--wp-text-muted);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .7px;
  border-bottom: 1px solid var(--wp-border);
  white-space: nowrap;
  user-select: none;
}

.wp-table tbody tr {
  transition: background .1s;
}

.wp-table tbody tr:hover { background: var(--wp-surface-2); }

.wp-table tbody td {
  padding: 12px 16px;
  vertical-align: middle;
  color: var(--wp-text-primary);
  border-bottom: 1px solid var(--wp-border);
}

.wp-table tbody tr:last-child td { border-bottom: none; }

/* ============================================================
   BADGES
   ============================================================ */
.wp-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  letter-spacing: .1px;
}

.wp-badge i { font-size: 7px; }

.wp-badge.pending    { background: #fef3c7; color: #92400e; }
.wp-badge.approved   { background: #dcfce7; color: #14532d; }
.wp-badge.rejected   { background: #fee2e2; color: #7f1d1d; }
.wp-badge.dispatched { background: #e0f2fe; color: #075985; }
.wp-badge.delivered  { background: #dcfce7; color: #14532d; }
.wp-badge.in-transit { background: #ede9fe; color: #4c1d95; }
.wp-badge.in-stock   { background: #dcfce7; color: #14532d; }
.wp-badge.low-stock  { background: #fef3c7; color: #92400e; }
.wp-badge.out-stock  { background: #fee2e2; color: #7f1d1d; }
.wp-badge.info       { background: #dbeafe; color: #1e3a5f; }
.wp-badge.draft      { background: #f3f4f6; color: #4b5563; }
.wp-badge.received   { background: #dcfce7; color: #14532d; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-wp {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--wp-radius-sm);
  font-size: 13px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: var(--wp-transition-fast);
  text-decoration: none;
  white-space: nowrap;
  font-family: inherit;
  line-height: 1;
}

.btn-wp:focus-visible { outline: 2px solid var(--wp-primary); outline-offset: 2px; }

.btn-wp-primary {
  background: var(--wp-primary);
  color: #fff;
  box-shadow: 0 1px 3px rgba(0,48,135,.25);
}

.btn-wp-primary:hover {
  background: var(--wp-primary-light);
  color: #fff;
  box-shadow: var(--wp-shadow-blue);
  transform: translateY(-1px);
}

.btn-wp-primary:active { transform: translateY(0); }

.btn-wp-outline {
  background: transparent;
  color: var(--wp-primary);
  border: 1.5px solid var(--wp-primary);
}

.btn-wp-outline:hover {
  background: var(--wp-primary);
  color: #fff;
}

.btn-wp-ghost {
  background: var(--wp-surface-2);
  color: var(--wp-text-secondary);
  border: 1px solid var(--wp-border);
}

.btn-wp-ghost:hover {
  background: var(--wp-border);
  color: var(--wp-text-primary);
}

.btn-wp-danger {
  background: #dc2626;
  color: #fff;
}

.btn-wp-danger:hover { background: #b91c1c; color: #fff; }

.btn-wp-success {
  background: #16a34a;
  color: #fff;
}

.btn-wp-success:hover { background: #15803d; color: #fff; }

.btn-wp-sm { padding: 5px 12px; font-size: 12px; }
.btn-wp-xs { padding: 3px 8px;  font-size: 11.5px; }
.btn-wp-lg { padding: 11px 22px; font-size: 14px; }

.btn-wp-icon {
  width: 34px; height: 34px;
  padding: 0;
  justify-content: center;
}

/* ============================================================
   ACTION BUTTONS (table row)
   ============================================================ */
.action-group { display: flex; align-items: center; gap: 3px; }

.action-btn {
  width: 28px; height: 28px;
  border: none;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  cursor: pointer;
  transition: var(--wp-transition-fast);
  text-decoration: none;
}

.action-btn.view   { background: #dbeafe; color: #1d4ed8; }
.action-btn.edit   { background: #fef3c7; color: #d97706; }
.action-btn.delete { background: #fee2e2; color: #dc2626; }
.action-btn.approve{ background: #dcfce7; color: #16a34a; }
.action-btn.ship   { background: #ede9fe; color: #7c3aed; }

.action-btn:hover { filter: brightness(.9); transform: scale(1.08); }

/* ============================================================
   FORMS
   ============================================================ */
.wp-form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--wp-text-secondary);
  margin-bottom: 5px;
}

.wp-form-control {
  width: 100%;
  padding: 8.5px 12px;
  border: 1.5px solid var(--wp-border);
  border-radius: var(--wp-radius-sm);
  font-size: 13px;
  color: var(--wp-text-primary);
  background: var(--wp-surface);
  outline: none;
  transition: var(--wp-transition-fast);
  font-family: inherit;
  line-height: 1.4;
}

.wp-form-control:hover { border-color: var(--wp-border-hover); }

.wp-form-control:focus {
  border-color: var(--wp-primary);
  box-shadow: 0 0 0 3px rgba(0,48,135,.08);
}

.wp-form-control.is-invalid { border-color: #dc2626; }
.wp-form-control.is-invalid:focus { box-shadow: 0 0 0 3px rgba(220,38,38,.1); }

.wp-form-control::placeholder { color: var(--wp-text-muted); }

select.wp-form-control { cursor: pointer; }

textarea.wp-form-control { resize: vertical; min-height: 80px; }

.wp-input-group { position: relative; }

.wp-input-group .input-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--wp-text-muted);
  font-size: 13px;
  pointer-events: none;
}

.wp-input-group .wp-form-control { padding-left: 34px; }

/* ============================================================
   MODALS
   ============================================================ */
.wp-modal .modal-content {
  border: none;
  border-radius: var(--wp-radius-xl);
  box-shadow: 0 20px 60px rgba(0,0,0,.15);
}

.wp-modal .modal-header {
  padding: 18px 24px 14px;
  border-bottom: 1px solid var(--wp-border);
  border-radius: var(--wp-radius-xl) var(--wp-radius-xl) 0 0;
  background: var(--wp-surface-2);
}

.wp-modal .modal-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--wp-text-primary);
  display: flex;
  align-items: center;
  gap: 9px;
}

.wp-modal .modal-title i {
  color: var(--wp-primary);
  font-size: 15px;
}

.wp-modal .modal-body { padding: 20px 24px; }

.wp-modal .modal-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--wp-border);
  background: var(--wp-surface-2);
  border-radius: 0 0 var(--wp-radius-xl) var(--wp-radius-xl);
}

/* ============================================================
   ALERTS
   ============================================================ */
.wp-alert {
  padding: 12px 16px;
  border-radius: var(--wp-radius);
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid transparent;
  line-height: 1.5;
}

.wp-alert i { margin-top: 1px; flex-shrink: 0; }

.wp-alert.success { background: #f0fdf4; border-color: #bbf7d0; color: #14532d; }
.wp-alert.danger  { background: #fef2f2; border-color: #fecaca; color: #7f1d1d; }
.wp-alert.warning { background: #fffbeb; border-color: #fde68a; color: #78350f; }
.wp-alert.info    { background: #eff6ff; border-color: #bfdbfe; color: #1e3a5f; }

/* ============================================================
   TIMELINE / PROGRESS
   ============================================================ */
.order-timeline {
  display: flex;
  align-items: center;
}

.tl-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.tl-dot {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 2px solid var(--wp-border);
  background: var(--wp-surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  color: var(--wp-text-muted);
  z-index: 1;
  transition: var(--wp-transition-fast);
}

.tl-step.done .tl-dot  { background: #16a34a; border-color: #16a34a; color: #fff; }
.tl-step.active .tl-dot {
  background: var(--wp-primary);
  border-color: var(--wp-primary);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(0,48,135,.12);
}

.tl-label {
  font-size: 10px;
  color: var(--wp-text-muted);
  margin-top: 5px;
  text-align: center;
}

.tl-step.done  .tl-label,
.tl-step.active .tl-label {
  color: var(--wp-text-secondary);
  font-weight: 500;
}

.tl-line {
  flex: 1;
  height: 2px;
  background: var(--wp-border);
  margin-top: -16px;
}

.tl-line.done { background: #16a34a; }

/* ============================================================
   EMPTY STATES
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--wp-text-muted);
}

.empty-state i {
  font-size: 38px;
  opacity: .25;
  display: block;
  margin-bottom: 12px;
}

.empty-state p { font-size: 13.5px; }

/* ============================================================
   SIDEBAR COLLAPSED
   ============================================================ */
body.sidebar-collapsed #sidebar { width: 62px; }

body.sidebar-collapsed #sidebar::before { display: none; }

body.sidebar-collapsed #topbar,
body.sidebar-collapsed #main-content { left: 62px; margin-left: 62px; }

body.sidebar-collapsed .sidebar-brand-text,
body.sidebar-collapsed .nav-label,
body.sidebar-collapsed .nav-chevron,
body.sidebar-collapsed .nav-badge-count,
body.sidebar-collapsed .nav-section,
body.sidebar-collapsed .sidebar-divider,
body.sidebar-collapsed .user-info-name,
body.sidebar-collapsed .user-info-role { display: none !important; }

body.sidebar-collapsed .nav-link-wp {
  justify-content: center;
  padding: 10px 0;
  margin: 1px 6px;
}

body.sidebar-collapsed .nav-icon { background: transparent; }
body.sidebar-collapsed .nav-link-wp.active .nav-icon { background: rgba(77,159,255,.2); }

body.sidebar-collapsed .sidebar-brand { padding: 0 14px; justify-content: center; }

body.sidebar-collapsed .sidebar-user-card { justify-content: center; padding: 8px 0; }

body.sidebar-collapsed .nav-sub { display: none !important; }

body.sidebar-collapsed .sidebar-footer { padding: 10px 8px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 992px) {
  #sidebar { left: calc(-1 * var(--wp-sidebar-w)); box-shadow: none; }
  #sidebar.mobile-open { left: 0; box-shadow: var(--wp-shadow-lg); }
  #topbar, #main-content { margin-left: 0; left: 0 !important; }
  .content-body { padding: 18px 16px 36px; }
}

@media (max-width: 576px) {
  .page-header { flex-direction: column; align-items: stretch; }
  .topbar-search { display: none; }
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
  min-height: 100vh;
  display: flex;
  background: #f0f4ff;
}

.login-left {
  flex: 1;
  background: linear-gradient(145deg, #001244 0%, #003087 50%, #0047b3 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.login-left::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,.04) 0%, transparent 70%);
  border-radius: 50%;
}

.login-left::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -80px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,.03) 0%, transparent 70%);
  border-radius: 50%;
}

.login-right {
  width: 480px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 56px;
}

.login-form-wrap { width: 100%; max-width: 360px; }

.login-logo-box {
  width: 46px; height: 46px;
  background: var(--wp-primary);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}

.login-heading {
  font-size: 22px;
  font-weight: 700;
  color: var(--wp-text-primary);
  letter-spacing: -.3px;
  margin-bottom: 4px;
}

.login-sub {
  font-size: 13.5px;
  color: var(--wp-text-muted);
  margin-bottom: 28px;
}

.login-feat {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 22px;
  position: relative;
  z-index: 1;
}

.login-feat-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.login-feat-title { font-size: 13.5px; font-weight: 600; margin-bottom: 2px; }
.login-feat-desc  { font-size: 12px; opacity: .6; line-height: 1.4; }

.pass-toggle {
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  color: var(--wp-text-muted);
  cursor: pointer;
  font-size: 13px;
  padding: 4px;
  transition: var(--wp-transition-fast);
}

.pass-toggle:hover { color: var(--wp-primary); }

@media (max-width: 768px) {
  .login-left  { display: none; }
  .login-right { width: 100%; padding: 40px 24px; }
}

/* ============================================================
   UTILITIES
   ============================================================ */
.text-primary-wp  { color: var(--wp-primary) !important; }
.text-muted-wp    { color: var(--wp-text-muted) !important; }
.text-secondary-wp{ color: var(--wp-text-secondary) !important; }
.bg-primary-wp    { background: var(--wp-primary) !important; }
.bg-surface       { background: var(--wp-surface) !important; }

.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

.fs-11 { font-size: 11px; }
.fs-12 { font-size: 12px; }
.fs-13 { font-size: 13px; }
.fs-14 { font-size: 14px; }
.fs-16 { font-size: 16px; }

.rounded-wp   { border-radius: var(--wp-radius) !important; }
.rounded-wp-lg{ border-radius: var(--wp-radius-lg) !important; }
.shadow-wp    { box-shadow: var(--wp-shadow) !important; }
.border-wp    { border: 1px solid var(--wp-border) !important; }
.cursor-pointer { cursor: pointer; }

/* Dropdown polish */
.dropdown-menu {
  border: 1px solid var(--wp-border);
  border-radius: var(--wp-radius-lg);
  box-shadow: var(--wp-shadow-lg);
  padding: 6px;
  font-size: 13px;
}

.dropdown-item {
  border-radius: var(--wp-radius-sm);
  padding: 8px 12px;
  color: var(--wp-text-primary);
  transition: var(--wp-transition-fast);
}

.dropdown-item:hover { background: var(--wp-surface-2); }

.dropdown-divider { border-color: var(--wp-border); margin: 4px 0; }

/* DataTables styling override */
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
  border: 1.5px solid var(--wp-border);
  border-radius: var(--wp-radius-sm);
  padding: 5px 10px;
  font-size: 12.5px;
  font-family: inherit;
  color: var(--wp-text-primary);
  background: var(--wp-surface);
  outline: none;
}

.dataTables_wrapper .dataTables_filter input:focus {
  border-color: var(--wp-primary);
  box-shadow: 0 0 0 3px rgba(0,48,135,.08);
}

.dataTables_wrapper .dataTables_info {
  font-size: 12px;
  color: var(--wp-text-muted);
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: var(--wp-radius-sm) !important;
  border: none !important;
  padding: 5px 10px !important;
  font-size: 12.5px !important;
  color: var(--wp-text-secondary) !important;
  transition: var(--wp-transition-fast) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: var(--wp-surface-2) !important;
  color: var(--wp-primary) !important;
  box-shadow: none !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--wp-primary) !important;
  color: #fff !important;
  font-weight: 500 !important;
}

/* Product thumbnail */
.product-thumb {
  width: 36px; height: 36px;
  border-radius: var(--wp-radius-sm);
  object-fit: cover;
  background: var(--wp-surface-2);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--wp-border);
}

/* Toast container */
#toast-container {
  position: fixed;
  top: 72px; right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 300px;
  max-width: 380px;
}
