/* ── Reset & Base ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #F0F2F5;
  color: #1A1A2E;
  line-height: 1.5;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ── Design Tokens ────────────────────────────────── */
:root {
  --navy:       #1A1A2E;
  --navy-light: #252540;
  --gold:       #C9A84C;
  --gold-light: #E8C96A;
  --white:      #FFFFFF;
  --bg:         #F0F2F5;
  --surface:    #FFFFFF;
  --border:     #E0E3E8;
  --text:       #1A1A2E;
  --text-muted: #6B7280;
  --success:    #10B981;
  --warning:    #F59E0B;
  --danger:     #EF4444;
  --info:       #3B82F6;
  --radius:     8px;
  --shadow:     0 1px 4px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08);
}

/* ── Login Page ───────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1A1A2E 0%, #252550 100%);
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.3);
  overflow: hidden;
}

.login-header {
  background: linear-gradient(135deg, #1A1A2E 0%, #252550 100%);
  padding: 36px 32px 28px;
  text-align: center;
}

.login-logo {
  width: 56px;
  height: 56px;
  background: var(--gold);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-weight: 800;
  font-size: 22px;
  color: var(--navy);
}

.login-header h1 {
  color: var(--white);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .3px;
}
.login-header p {
  color: rgba(255,255,255,.55);
  font-size: 12px;
  margin-top: 4px;
}

.login-body {
  padding: 32px;
}

.login-body h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}
.login-body p {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 28px;
}

/* ── Form Controls ────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text);
  background: var(--white);
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.form-control:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,.15);
}
.form-control::placeholder { color: #C0C4CC; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
textarea.form-control { resize: vertical; min-height: 80px; }

/* ── Buttons ──────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  border: none;
  transition: all .15s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--gold);
  color: var(--navy);
}
.btn-primary:hover { background: var(--gold-light); }
.btn-navy {
  background: var(--navy);
  color: var(--white);
}
.btn-navy:hover { background: var(--navy-light); }
.btn-outline {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--gold); color: var(--navy); }
.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover { background: #DC2626; }
.btn-success {
  background: var(--success);
  color: #fff;
}
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-full { width: 100%; }
.btn:disabled { opacity: .5; pointer-events: none; }

/* ── App Layout ───────────────────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform .25s;
}

.sidebar-logo {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-logo .logo-mark {
  width: 40px; height: 40px;
  background: var(--gold);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px; color: var(--navy);
  margin-bottom: 10px;
}
.sidebar-logo img.logo-img {
  height: 36px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  margin-bottom: 6px;
  display: block;
}
.sidebar-logo h1 {
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
}
.sidebar-logo span {
  font-size: 11px;
  color: rgba(255,255,255,.4);
  display: block;
  margin-top: 2px;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
  padding: 12px 8px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,.6);
  cursor: pointer;
  transition: all .15s;
  margin-bottom: 2px;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: rgba(255,255,255,.9); }
.nav-item.active { background: rgba(201,168,76,.15); color: var(--gold); }
.nav-item svg { flex-shrink: 0; opacity: .7; }
.nav-item.active svg { opacity: 1; }

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.dealer-info {
  padding: 10px;
  background: rgba(255,255,255,.05);
  border-radius: 8px;
  margin-bottom: 10px;
}
.dealer-info .name {
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dealer-info .role-badge {
  font-size: 10px;
  color: var(--gold);
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: 240px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top bar */
.topbar {
  height: 56px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  flex: 1;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Cart Badge */
.cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--gold);
  color: var(--navy);
  border: none;
  border-radius: var(--radius);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}
.cart-btn:hover { background: var(--gold-light); }
.cart-badge {
  background: var(--navy);
  color: var(--white);
  border-radius: 50px;
  font-size: 10px;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* Page */
.page-content {
  padding: 24px;
  flex: 1;
}
.page-header {
  margin-bottom: 24px;
}
.page-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
}
.page-header p {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 4px;
}

/* ── Filter Bar ───────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  align-items: center;
}
.filter-bar .search-wrap {
  flex: 1;
  min-width: 200px;
  position: relative;
}
.filter-bar .search-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.filter-bar .search-wrap input {
  width: 100%;
  padding: 9px 14px 9px 38px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  outline: none;
  transition: border-color .15s;
}
.filter-bar .search-wrap input:focus { border-color: var(--gold); }

.cat-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.cat-tab {
  padding: 7px 14px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--text-muted);
  transition: all .15s;
}
.cat-tab:hover { border-color: var(--gold); color: var(--navy); }
.cat-tab.active { background: var(--navy); color: var(--white); border-color: var(--navy); }

/* ── Product Table ────────────────────────────────── */
.product-table-wrap {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.product-table {
  width: 100%;
  border-collapse: collapse;
}
.product-table th {
  background: #F8F9FB;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--text-muted);
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.product-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.product-table tr:last-child td { border-bottom: none; }
.product-table tr:hover td { background: #FAFBFC; }

.product-img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  background: #F0F2F5;
  display: block;
  cursor: zoom-in;
}

/* Image hover tooltip */
.img-hover-wrap {
  position: relative;
  display: inline-block;
}
.img-hover-wrap .img-tooltip {
  display: none;
  position: fixed;
  z-index: 9999;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  padding: 6px;
  pointer-events: none;
}
.img-hover-wrap:hover .img-tooltip {
  display: block;
}
.img-tooltip img {
  width: 200px;
  height: 200px;
  object-fit: contain;
  border-radius: 6px;
  display: block;
}

/* Image fullscreen modal */
#img-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,.6);
  align-items: center;
  justify-content: center;
}
#img-modal.open {
  display: flex;
}
#img-modal-inner {
  position: relative;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 16px 64px rgba(0,0,0,.3);
  width: 50vw;
  height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
#img-modal-inner img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}
#img-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,.5);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
  z-index: 1;
  transition: background .15s;
}
#img-modal-close:hover { background: rgba(0,0,0,.75); }

.product-img-placeholder {
  width: 60px;
  height: 60px;
  border-radius: 6px;
  background: #F0F2F5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--border);
}

.product-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--navy);
}
.product-sku {
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'Courier New', monospace;
  margin-top: 2px;
}
.product-designer {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Color Picker */
.color-select-wrap { position: relative; }
.color-select {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  min-width: 160px;
  background: var(--white);
  font-size: 12px;
  transition: border-color .15s;
}
.color-select:hover { border-color: var(--gold); }
.color-swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,.1);
  flex-shrink: 0;
}

.color-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 10px;
  z-index: 200;
  min-width: 260px;
  display: none;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
}
.color-dropdown.open { display: grid; }

/* Color option wrapper with label */
.color-opt-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 6px 4px;
  border-radius: 6px;
  border: 1.5px solid transparent;
  transition: background .12s, border-color .12s;
}
.color-opt-wrap:hover { background: var(--bg); }
.color-opt-wrap.selected { border-color: var(--navy); background: rgba(26,26,46,.05); }
.color-opt-name {
  font-size: 9px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80px;
}
.color-option {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid transparent;
  pointer-events: none;
  position: relative;
}
.color-opt-wrap.selected .color-option { border-color: var(--navy); box-shadow: 0 0 0 2px rgba(26,26,46,.2); }

/* Size select */
.size-select {
  padding: 7px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 12px;
  outline: none;
  background: var(--white);
  min-width: 72px;
  transition: border-color .15s;
}
.size-select:focus { border-color: var(--gold); }

/* Qty */
.qty-input {
  width: 64px;
  padding: 7px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  outline: none;
  transition: border-color .15s;
}
.qty-input:focus { border-color: var(--gold); }

/* Price */
.price-cell {
  font-weight: 600;
  color: var(--navy);
  font-size: 13px;
  white-space: nowrap;
}
.price-tbd {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
}

/* ── Cart / Request Drawer ────────────────────────── */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.drawer-overlay.open { opacity: 1; pointer-events: all; }

.drawer {
  position: fixed;
  top: 0; right: 0;
  width: 480px;
  max-width: 100vw;
  height: 100vh;
  background: var(--white);
  box-shadow: -8px 0 32px rgba(0,0,0,.15);
  z-index: 301;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .25s;
}
.drawer.open { transform: translateX(0); }

.drawer-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.drawer-header h3 {
  flex: 1;
  font-size: 16px;
  font-weight: 700;
}
.drawer-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: background .15s;
}
.drawer-close:hover { background: var(--bg); color: var(--navy); }

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
}

.cart-empty {
  text-align: center;
  padding: 60px 0;
  color: var(--text-muted);
}
.cart-empty svg { opacity: .3; margin-bottom: 12px; }
.cart-empty p { font-size: 13px; }

.cart-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.cart-item:last-child { border-bottom: none; }
.cart-item-img {
  width: 52px;
  height: 52px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--bg);
  flex-shrink: 0;
}
.cart-item-info { flex: 1; }
.cart-item-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
}
.cart-item-variant {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.cart-item-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.cart-item-qty-ctrl {
  display: flex;
  align-items: center;
  gap: 6px;
}
.qty-btn {
  width: 24px; height: 24px;
  border-radius: 4px;
  border: 1.5px solid var(--border);
  background: var(--white);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--navy);
  transition: all .1s;
}
.qty-btn:hover { border-color: var(--gold); background: #FFF8E7; }
.qty-val {
  font-size: 13px;
  font-weight: 700;
  min-width: 24px;
  text-align: center;
}
.cart-item-remove {
  background: none;
  border: none;
  color: #CBD5E1;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color .1s;
  flex-shrink: 0;
}
.cart-item-remove:hover { color: var(--danger); }

.drawer-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  background: #FAFBFC;
}
.drawer-summary {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.drawer-summary strong { color: var(--navy); }
.notes-area {
  width: 100%;
  padding: 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  resize: none;
  outline: none;
  margin-bottom: 12px;
  font-family: inherit;
  transition: border-color .15s;
}
.notes-area:focus { border-color: var(--gold); }

/* ── Modal ────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--white);
  border-radius: 12px;
  width: 100%;
  max-width: 560px;
  box-shadow: 0 24px 64px rgba(0,0,0,.25);
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(.95);
  transition: transform .2s;
}
.modal-overlay.open .modal { transform: scale(1); }

.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.modal-header h3 {
  flex: 1;
  font-size: 16px;
  font-weight: 700;
}
.modal-body { padding: 20px 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Wide modal for request detail + chat */
.modal.modal-wide { max-width: 900px; }
.modal-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: 420px;
}
.modal-col-left { padding: 20px 24px; border-right: 1px solid var(--border); overflow-y: auto; max-height: 70vh; }
.modal-col-right { display: flex; flex-direction: column; }
.chat-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--navy);
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 320px;
  min-height: 160px;
}
.chat-empty { text-align: center; color: var(--text-muted); font-size: 12px; padding: 20px 0; }
.chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 85%;
}
.chat-msg.me { align-self: flex-end; align-items: flex-end; }
.chat-msg.other { align-self: flex-start; align-items: flex-start; }
.chat-bubble {
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.5;
  word-break: break-word;
}
.chat-msg.me .chat-bubble { background: var(--navy); color: white; border-bottom-right-radius: 4px; }
.chat-msg.other .chat-bubble { background: #F1F3F7; color: var(--text); border-bottom-left-radius: 4px; }
.chat-meta { font-size: 10px; color: var(--text-muted); margin-top: 3px; }
.chat-input-row {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.chat-input-row textarea {
  flex: 1;
  padding: 8px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 12px;
  resize: none;
  font-family: inherit;
  transition: border-color .15s;
}
.chat-input-row textarea:focus { outline: none; border-color: var(--gold); }
.chat-send-btn {
  padding: 8px 14px;
  background: var(--navy);
  color: white;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .15s;
}
.chat-send-btn:hover { background: #2a2a5e; }
.chat-send-btn:disabled { opacity: .5; cursor: default; }

@media (max-width: 700px) {
  .modal.modal-wide { max-width: 100%; }
  .modal-two-col { grid-template-columns: 1fr; }
  .modal-col-left { border-right: none; border-bottom: 1px solid var(--border); max-height: 40vh; }
}

/* ── Cards / Stats ────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
}
.stat-icon {
  width: 48px; height: 48px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-icon.navy { background: rgba(26,26,46,.1); color: var(--navy); }
.stat-icon.gold  { background: rgba(201,168,76,.15); color: var(--gold); }
.stat-icon.green { background: rgba(16,185,129,.1); color: var(--success); }
.stat-icon.blue  { background: rgba(59,130,246,.1); color: var(--info); }
.stat-icon.red   { background: rgba(239,68,68,.1); color: var(--danger); }
.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.stat-value { font-size: 24px; font-weight: 800; color: var(--navy); line-height: 1; margin-top: 4px; }

/* ── Table generic ────────────────────────────────── */
.data-table-wrap {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th {
  background: #F8F9FB;
  padding: 11px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--text-muted);
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #FAFBFC; }

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3px;
  white-space: nowrap;
}
.badge-pending    { background: #FEF3C7; color: #92400E; }
.badge-approved   { background: #D1FAE5; color: #065F46; }
.badge-processing { background: #DBEAFE; color: #1E40AF; }
.badge-completed  { background: #E0E7FF; color: #3730A3; }
.badge-rejected   { background: #FEE2E2; color: #991B1B; }
.badge-active     { background: #D1FAE5; color: #065F46; }
.badge-inactive   { background: #F3F4F6; color: #6B7280; }

/* ── Alert ────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
}
.alert-error   { background: #FEE2E2; color: #991B1B; border-left: 4px solid var(--danger); }
.alert-success { background: #D1FAE5; color: #065F46; border-left: 4px solid var(--success); }
.alert-info    { background: #DBEAFE; color: #1E40AF; border-left: 4px solid var(--info); }

/* ── Pagination ───────────────────────────────────── */
.pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  padding: 16px 0;
}
.page-btn {
  width: 32px; height: 32px;
  border-radius: 6px;
  border: 1.5px solid var(--border);
  background: var(--white);
  font-size: 13px;
  cursor: pointer;
  transition: all .1s;
  font-weight: 600;
}
.page-btn:hover { border-color: var(--gold); }
.page-btn.active { background: var(--navy); color: var(--white); border-color: var(--navy); }

/* ── Empty State ──────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-muted);
}
.empty-state svg { opacity: .25; margin-bottom: 16px; }
.empty-state h3 { font-size: 16px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.empty-state p { font-size: 13px; }

/* ── Spinner ──────────────────────────────────────── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(0,0,0,.1);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay {
  text-align: center;
  padding: 60px;
  color: var(--text-muted);
}

/* ── Divider ──────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 16px 0; }

/* ── Toast ────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: var(--navy);
  color: var(--white);
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
  animation: slideIn .25s ease;
  max-width: 320px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── Responsive ───────────────────────────────────── */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--navy);
  cursor: pointer;
  padding: 6px;
}

@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
  }
  .menu-toggle { display: flex; }
  .drawer { width: 100vw; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .page-content { padding: 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .product-table th:nth-child(1),
  .product-table td:nth-child(1) { display: none; }
  .cat-tabs { display: none; }
}
