﻿/* =============================================================
   quan-ly-kho.css  –  Admin Warehouse Panel Styles
   ============================================================= */

:root {
  --pn-blue: #0766f7;
  --pn-blue-dark: #0550d0;
  --pn-blue-light: #eff6ff;
  --pn-blue-border: #dce9fe;
  --pn-red: #e53e3e;
  --pn-red-dark: #c53030;
  --pn-orange: #f97316;
  --pn-green: #059669;
  --pn-bg: #f5f6fa;
  --pn-border: #e5e7eb;
  --pn-text: #1a1a2e;
  --pn-muted: #6b7280;
}

/* ── Reset / base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

/* ── Auth gate ────────────────────────────────────────────── */
.wh-auth-gate {
  display: flex; align-items: center; justify-content: center;
  min-height: 70vh; padding: 24px;
}
.wh-auth-card {
  background: #fff; border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,.09);
  padding: 40px 36px; max-width: 420px; width: 100%; text-align: center;
}
.wh-auth-icon { font-size: 40px; color: var(--pn-blue); margin-bottom: 12px; }
.wh-auth-title { font-size: 22px; font-weight: 700; color: var(--pn-text); margin-bottom: 6px; }
.wh-auth-sub { font-size: 13.5px; color: var(--pn-muted); margin-bottom: 24px; }
.wh-auth-input {
  width: 100%; padding: 10px 14px; border: 1.5px solid #d1d5db; border-radius: 8px;
  font-size: 15px; margin-bottom: 12px; outline: none; transition: border .2s;
}
.wh-auth-input:focus { border-color: var(--pn-blue); }
.wh-auth-btn {
  width: 100%; padding: 11px; background: linear-gradient(135deg, var(--pn-blue), var(--pn-blue-dark)); color: #fff; border: none;
  border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; transition: background .2s;
}
.wh-auth-btn:hover { background: linear-gradient(135deg, var(--pn-blue-dark), #0442ad); }
.wh-auth-err { color: #dc2626; font-size: 13px; margin-top: 10px; }

/* ── Admin layout ─────────────────────────────────────────── */
.wh-admin-wrap {
  display: flex; min-height: 100vh; background: var(--pn-bg);
}

/* ── Sidebar ──────────────────────────────────────────────── */
.wh-sidebar {
  width: 220px; min-width: 220px; background: linear-gradient(180deg, var(--pn-blue-dark) 0%, var(--pn-blue) 100%); color: rgba(255,255,255,.84);
  display: flex; flex-direction: column; position: sticky; top: 0;
  height: 100vh; overflow-y: auto; z-index: 100;
  box-shadow: 10px 0 30px rgba(7,102,247,.12);
}
.wh-sidebar-header {
  display: flex; align-items: center; gap: 10px; padding: 20px 18px 16px;
  font-weight: 700; font-size: 15px; color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.14);
}
.wh-sidebar-header i { font-size: 18px; color: #fff; }
.wh-sidebar-nav { flex: 1; padding: 12px 0; }
.wh-nav-item {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 11px 18px; background: none; border: none; cursor: pointer;
  font-size: 14px; color: rgba(255,255,255,.78); border-left: 3px solid transparent;
  transition: all .15s; text-align: left; text-decoration: none;
}
.wh-nav-item:hover { background: rgba(255,255,255,.12); color: #fff; }
.wh-nav-item.active {
  background: rgba(255,255,255,.16); color: #fff;
  border-left-color: #fff;
}
.wh-nav-item i { font-size: 15px; width: 18px; text-align: center; color: #dbeafe; transition: color .15s; }
.wh-nav-item:hover i,
.wh-nav-item.active i { color: #fff; }
.wh-nav-item span { text-decoration: none; }
.wh-sidebar-footer { padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.14); }
.wh-btn-back {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 12px; background: rgba(255,255,255,.14); color: #fff;
  border-radius: 7px; font-size: 13px; text-decoration: none; transition: all .15s;
}
.wh-btn-back:hover { background: rgba(255,255,255,.24); color: #fff; }
.wh-btn-back i { color: #dbeafe; transition: color .15s; }
.wh-btn-back:hover i { color: #fff; }

/* ── Main content area ────────────────────────────────────── */
.wh-content {
  flex: 1; min-width: 0; overflow-x: auto;
  padding: 28px 28px 48px;
}

/* ── Section wrapper ──────────────────────────────────────── */
.wh-section { animation: wh-fade .2s ease; }
@keyframes wh-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.wh-section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px; flex-wrap: wrap; gap: 10px;
}
.wh-section-title { font-size: 20px; font-weight: 700; color: var(--pn-text); margin: 0; }
.wh-section-title i { color: var(--pn-blue); }
.wh-section-subtitle {
  display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 700; color: var(--pn-muted); text-transform: uppercase;
  letter-spacing: .6px; margin-bottom: 10px; padding-bottom: 6px;
  border-bottom: 1px solid #f0f0f0;
}

/* ── Tabs ─────────────────────────────────────────────────── */
.wh-tabs {
  display: flex; gap: 2px; background: #e5e7eb; border-radius: 10px;
  padding: 4px; margin-bottom: 16px; flex-wrap: wrap;
}
.wh-tab {
  display: flex; align-items: center; gap: 7px; padding: 8px 16px;
  background: none; border: none; border-radius: 7px; cursor: pointer;
  font-size: 13.5px; color: var(--pn-muted); font-weight: 500; transition: all .15s;
  position: relative;
}
.wh-tab:hover { background: rgba(255,255,255,.6); color: #374151; }
.wh-tab.active { background: #fff; color: var(--pn-blue); font-weight: 600; box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.wh-tab-badge {
  min-width: 18px; height: 18px; line-height: 18px; padding: 0 5px;
  background: #dc2626; color: #fff; border-radius: 9px; font-size: 11px;
  font-weight: 700; text-align: center;
}

/* ── Toolbar ──────────────────────────────────────────────── */
.wh-toolbar {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  margin-bottom: 12px;
}
.wh-search-box {
  display: flex; align-items: center; gap: 8px; background: #fff;
  border: 1.5px solid #d1d5db; border-radius: 8px; padding: 6px 12px;
  min-width: 220px; flex: 1;
}
.wh-search-box:focus-within { border-color: var(--pn-blue); box-shadow: 0 0 0 3px rgba(7,102,247,.08); }
.wh-search-box i { color: #9ca3af; font-size: 13px; flex-shrink: 0; }
.wh-search-box input { flex: 1; border: none; outline: none; font-size: 13.5px; background: transparent; }
.wh-search-clear { background: none; border: none; cursor: pointer; color: #9ca3af; padding: 0; line-height: 1; }
.wh-search-clear:hover { color: var(--pn-blue); }
.wh-select, .wh-date-input {
  padding: 7px 11px; border: 1.5px solid #d1d5db; border-radius: 8px;
  font-size: 13.5px; background: #fff; outline: none; cursor: pointer;
}
.wh-select:focus, .wh-date-input:focus { border-color: var(--pn-blue); box-shadow: 0 0 0 3px rgba(7,102,247,.08); }
.wh-toggle-label { display: flex; align-items: center; gap: 6px; font-size: 13.5px; cursor: pointer; }
.wh-label-inline { font-size: 13px; color: var(--pn-muted); flex-shrink: 0; }

/* ── Stat cards (exports) ─────────────────────────────────── */
.wh-stats-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.wh-stat {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  background: #fff; border: 1.5px solid #e5e7eb; border-radius: 10px;
  cursor: pointer; transition: all .15s; min-width: 120px;
}
.wh-stat:hover { border-color: var(--pn-blue); box-shadow: 0 6px 18px rgba(7,102,247,.08); }
.wh-stat.active { border-color: var(--pn-blue); background: var(--pn-blue-light); }
.wh-stat-icon { width: 34px; height: 34px; background: #f3f4f6; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 14px; color: #6b7280; }
.wh-stat.active .wh-stat-icon { background: var(--pn-blue-border); color: var(--pn-blue); }
.wh-stat-label { font-size: 12px; color: var(--pn-muted); }
.wh-stat-val   { font-size: 18px; font-weight: 700; color: var(--pn-text); }

/* ── Buttons ──────────────────────────────────────────────── */
.wh-btn-primary {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; background: linear-gradient(135deg, var(--pn-blue), var(--pn-blue-dark)); color: #fff; border: none;
  border-radius: 8px; font-size: 13.5px; font-weight: 600;
  cursor: pointer; transition: background .15s, box-shadow .15s, transform .15s; white-space: nowrap;
}
.wh-btn-primary:hover { box-shadow: 0 8px 20px rgba(7,102,247,.22); transform: translateY(-1px); }
.wh-btn-outline {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; background: #fff; color: #374151;
  border: 1.5px solid #d1d5db; border-radius: 8px; font-size: 13.5px;
  cursor: pointer; transition: all .15s; white-space: nowrap;
}
.wh-btn-outline:hover { border-color: var(--pn-blue); color: var(--pn-blue); background: var(--pn-blue-light); }
.wh-btn-danger {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; background: var(--pn-red); color: #fff; border: none;
  border-radius: 8px; font-size: 13.5px; font-weight: 600;
  cursor: pointer; transition: background .15s;
}
.wh-btn-danger:hover { background: var(--pn-red-dark); }
.wh-btn-sm {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; background: #f3f4f6; color: #374151;
  border: 1px solid #e5e7eb; border-radius: 6px; font-size: 12.5px;
  cursor: pointer; transition: all .15s;
}
.wh-btn-sm:hover { background: var(--pn-blue-light); border-color: var(--pn-blue-border); color: var(--pn-blue); }
.wh-btn-icon {
  width: 30px; height: 30px; display: inline-flex; align-items: center;
  justify-content: center; background: none; border: none; cursor: pointer;
  border-radius: 6px; font-size: 13px; transition: background .15s;
}
.wh-btn-icon:hover { background: #f3f4f6; }

/* ── Table ────────────────────────────────────────────────── */
.wh-table-wrap { background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid #e5e7eb; }
.wh-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.wh-table thead th {
  background: #f9fafb; padding: 10px 14px; text-align: left;
  font-size: 12px; font-weight: 600; color: #6b7280;
  text-transform: uppercase; letter-spacing: .5px;
  border-bottom: 1px solid #e5e7eb; white-space: nowrap;
}
.wh-table tbody td {
  padding: 11px 14px; border-bottom: 1px solid #f3f4f6; vertical-align: middle;
}
.wh-table tbody tr:last-child td { border-bottom: none; }
.wh-table tbody tr:hover { background: #f9fafb; }
.wh-table .text-end { text-align: right; }
.wh-table .text-center { text-align: center; }

/* ── Report table footer ──────────────────────────────────── */
.rpt-table tfoot .rpt-total-row td {
  padding: 11px 14px; background: #f0f9ff;
  border-top: 2px solid #bfdbfe; font-size: 13.5px;
}

/* ── Loading / Empty ──────────────────────────────────────── */
.wh-loading {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; padding: 40px; color: #6b7280; font-size: 14px;
}
.wh-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 50px 20px; color: #9ca3af; font-size: 14px; text-align: center; gap: 8px;
}

/* ── Pagination ───────────────────────────────────────────── */
.wh-pagination { display: flex; gap: 4px; flex-wrap: wrap; padding: 12px 14px; justify-content: center; }
.wh-page-btn {
  min-width: 32px; height: 32px; padding: 0 8px; border: 1.5px solid #d1d5db;
  border-radius: 6px; background: #fff; color: #374151; font-size: 13px;
  cursor: pointer; transition: all .15s;
}
.wh-page-btn:hover:not(:disabled) { border-color: var(--pn-blue); color: var(--pn-blue); }
.wh-page-btn.active { background: var(--pn-blue); border-color: var(--pn-blue); color: #fff; font-weight: 600; }
.wh-page-btn:disabled { opacity: .4; cursor: default; }

/* ── Badges ───────────────────────────────────────────────── */
.wh-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600;
}
.wh-badge-draft     { background: #f3f4f6; color: #374151; }
.wh-badge-pending   { background: #fef3c7; color: #92400e; }
.wh-badge-confirmed { background: #dcfce7; color: #166534; }
.wh-badge-cancelled { background: #fee2e2; color: #991b1b; }
.wh-badge-internal  { background: var(--pn-blue-light); color: var(--pn-blue); }
.wh-badge-destroy   { background: #fce7f3; color: #9d174d; }
.wh-badge-return    { background: #f0fdf4; color: #065f46; }
.wh-badge-other     { background: #f9fafb; color: #6b7280; }
.wh-badge-order     { background: #ede9fe; color: #5b21b6; }
.wh-badge-manual    { background: #fff7ed; color: #c2410c; }

/* ── Stock badges ─────────────────────────────────────────── */
.wh-stock-ok   { color: #166534; }
.wh-stock-warn { color: #92400e; }
.wh-stock-zero { color: #991b1b; }
.wh-stock-badge { font-size: 12px; padding: 2px 7px; border-radius: 5px; font-weight: 600; }
.wh-stock-badge.wh-stock-ok   { background: #dcfce7; color: #166534; }
.wh-stock-badge.wh-stock-warn { background: #fef3c7; color: #92400e; }
.wh-stock-badge.wh-stock-zero { background: #fee2e2; color: #991b1b; }

/* ── Modals ───────────────────────────────────────────────── */
.wh-modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,.45); align-items: flex-start; justify-content: center;
  padding: 40px 16px; overflow-y: auto;
}
.wh-modal-overlay.active { display: flex; }
.wh-modal {
  background: #fff; border-radius: 14px; width: 100%; max-width: 560px;
  box-shadow: 0 8px 40px rgba(0,0,0,.18); animation: wh-modal-in .18s ease; margin: auto;
}
.wh-modal--a4 { max-width: 980px; }
.wh-modal--lg { max-width: 760px; }
.wh-modal--sm { max-width: 420px; }
@keyframes wh-modal-in { from { opacity:0; transform: scale(.97) translateY(-12px); } to { opacity:1; transform: none; } }
.wh-modal-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 18px 20px 14px; border-bottom: 1px solid #f0f0f0;
}
.wh-modal-title { font-size: 16px; font-weight: 700; color: #111827; }
.wh-modal-sub   { font-size: 12.5px; color: #6b7280; margin-top: 3px; }
.wh-modal-close {
  background: none; border: none; cursor: pointer; color: #9ca3af;
  font-size: 16px; padding: 4px; margin: -4px; border-radius: 6px; line-height: 1;
}
.wh-modal-close:hover { color: #374151; background: #f3f4f6; }
.wh-modal-body  { padding: 18px 20px; max-height: 60vh; overflow-y: auto; }
.wh-modal--a4 .wh-modal-body { background: #eef2f7; padding: 24px; }
.wh-modal-footer {
  display: flex; gap: 8px; align-items: center; padding: 14px 20px;
  border-top: 1px solid #f0f0f0;
}
.wh-modal-footer .ms-auto { margin-left: auto; }

/* ── Form inputs ──────────────────────────────────────────── */
.wh-label { display: block; font-size: 12.5px; font-weight: 600; color: #374151; margin-bottom: 5px; }
.wh-input {
  width: 100%; padding: 8px 12px; border: 1.5px solid #d1d5db; border-radius: 8px;
  font-size: 13.5px; outline: none; transition: border .2s; background: #fff;
  font-family: inherit;
}
.wh-input:focus { border-color: var(--pn-blue); box-shadow: 0 0 0 3px rgba(7,102,247,.08); }
textarea.wh-input { resize: vertical; }

/* ── Export item row ──────────────────────────────────────── */
.wh-exp-item {
  display: flex; gap: 8px; align-items: center; padding: 10px 0;
  border-bottom: 1px solid #f3f4f6; flex-wrap: wrap;
}
.wh-exp-item:last-child { border-bottom: none; }
.wh-exp-item .exp-prod-select { flex: 2; min-width: 160px; }
.wh-exp-item .exp-qty   { width: 90px; min-width: 80px; flex-shrink: 0; }
.wh-exp-item .exp-price { width: 140px; min-width: 110px; flex-shrink: 0; }
.wh-exp-item .exp-note  { flex: 1; min-width: 100px; }
.exp-stock-info { flex-shrink: 0; }

/* ── Info row (detail modal) ──────────────────────────────── */
.wh-info-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px 20px; margin-bottom: 16px;
}
.wh-info-label { font-size: 11.5px; font-weight: 600; color: #9ca3af; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 2px; }
.wh-info-value { font-size: 13.5px; color: #111827; }
.wh-detail-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.wh-detail-table thead th { background: #f9fafb; padding: 8px 10px; font-weight: 600; color: #6b7280; font-size: 11.5px; text-transform: uppercase; border-bottom: 1px solid #e5e7eb; }
.wh-detail-table tbody td { padding: 9px 10px; border-bottom: 1px solid #f3f4f6; }
.wh-sub-title { font-size: 11.5px; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: .6px; margin-bottom: 8px; }
.wh-err-msg { color: #dc2626; font-size: 13px; margin-top: 8px; padding: 8px 12px; background: #fff5f5; border-radius: 6px; border: 1px solid #fecaca; }

/* ── Export report A4 ─────────────────────────────────────── */
.wh-report-sheet {
  width: 210mm; min-height: 297mm; margin: 0 auto; background: #fff; color: #111827;
  padding: 18mm 14mm; box-shadow: 0 18px 40px rgba(15, 23, 42, .12);
}
.wh-report-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 20px;
  padding-bottom: 18px; border-bottom: 2px solid #dbe4f0;
}
.wh-report-company-name {
  font-size: 20px; line-height: 1.35; font-weight: 800; text-transform: uppercase; color: #0f172a;
}
.wh-report-company-line {
  margin-top: 6px; font-size: 13px; color: #475569;
}
.wh-report-meta {
  min-width: 250px; padding: 14px 16px; border: 1px solid #dbe4f0; background: #f8fbff;
}
.wh-report-title {
  font-size: 24px; font-weight: 800; letter-spacing: 1px; text-align: center; color: #0f172a; margin-bottom: 12px;
}
.wh-report-meta-row {
  display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 4px 0; border-bottom: 1px dashed #dbe4f0;
}
.wh-report-meta-row:last-child { border-bottom: none; }
.wh-report-meta-row span { color: #64748b; }
.wh-report-block { margin-top: 18px; }
.wh-report-block-title {
  font-size: 14px; font-weight: 800; text-transform: uppercase; color: #0f172a;
  padding: 8px 12px; background: var(--pn-blue-light); border-left: 4px solid var(--pn-blue); margin-bottom: 10px;
}
.wh-report-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 22px; font-size: 13px;
}
.wh-report-grid div {
  padding-bottom: 6px; border-bottom: 1px dashed #e2e8f0;
}
.wh-report-grid span { display: inline-block; min-width: 110px; color: #64748b; }
.wh-report-grid strong { color: #0f172a; font-weight: 600; }
.wh-report-grid-full { grid-column: 1 / -1; }
.wh-report-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.wh-report-table thead th {
  background: #0f172a; color: #fff; font-weight: 700; padding: 10px 8px; border: 1px solid #d1d5db;
}
.wh-report-table tbody td,
.wh-report-table tfoot td {
  padding: 9px 8px; border: 1px solid #d1d5db;
}
.wh-report-table tbody tr:nth-child(even) { background: #f8fafc; }
.wh-report-table tfoot td {
  background: #f8fafc; font-weight: 700;
}
.wh-report-grand-label,
.wh-report-grand-total {
  background: var(--pn-blue-light) !important; color: var(--pn-blue);
}

@media print {
  body { background: #fff !important; }
  body * { visibility: hidden !important; }
  #whDetailOverlay,
  #whDetailOverlay * { visibility: visible !important; }
  #whDetailOverlay {
    position: static !important; display: block !important; padding: 0 !important; background: transparent !important;
  }
  #whDetailOverlay .wh-modal {
    width: auto !important; max-width: none !important; box-shadow: none !important; border-radius: 0 !important; margin: 0 !important;
  }
  #whDetailOverlay .wh-modal-header,
  #whDetailOverlay .wh-modal-footer { display: none !important; }
  #whDetailOverlay .wh-modal-body {
    max-height: none !important; overflow: visible !important; padding: 0 !important; background: transparent !important;
  }
  .wh-report-sheet {
    width: 210mm !important; min-height: 297mm !important; margin: 0 !important; box-shadow: none !important; padding: 12mm !important;
  }
  @page {
    size: A4 portrait;
    margin: 8mm;
  }
}

/* ── Report summary cards ─────────────────────────────────── */
.rpt-summary-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 6px; }
.rpt-card {
  flex: 1; min-width: 200px; background: #fff; border-radius: 12px;
  border: 1.5px solid #e5e7eb; padding: 18px 20px;
  display: flex; align-items: center; gap: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.rpt-card-icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0;
}
.rpt-card.import .rpt-card-icon { background: #dcfce7; color: #166534; }
.rpt-card.export .rpt-card-icon { background: #fee2e2; color: #991b1b; }
.rpt-card.stock  .rpt-card-icon { background: var(--pn-blue-border); color: var(--pn-blue); }
.rpt-card-label { font-size: 12px; color: #6b7280; margin-bottom: 4px; }
.rpt-card-qty   { font-size: 18px; font-weight: 700; color: #111827; }
.rpt-card-amt   { font-size: 12.5px; color: #6b7280; }

/* ── Pick customer list ───────────────────────────────────── */
.pick-cust-item:hover { background: #f0f9ff; }

/* ── Inventory inline price edit ─────────────────────────── */
.inv-price-display {
  display: inline-block; transition: color .15s;
}
.inv-price-display:hover { color: var(--pn-blue) !important; }
.inv-price-display:hover span { color: var(--pn-blue) !important; }

/* ── Price edit modal ─────────────────────────────────────── */
.price-input-wrap {
  position: relative; display: flex; align-items: center;
}
.price-input-wrap .wh-input {
  padding-right: 36px;
  font-size: 22px; font-weight: 700; letter-spacing: .5px;
}
.price-input-unit {
  position: absolute; right: 13px; font-size: 15px;
  color: #6b7280; pointer-events: none; font-weight: 600;
}

/* ── Batch price display in inventory table ───────────────── */
.batch-price-list { display: flex; flex-direction: column; gap: 3px; }
.batch-price-item {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 6px; font-size: 12.5px;
}
.batch-qty-tag {
  background: #f0f9ff; color: #0369a1; border-radius: 5px;
  padding: 1px 6px; font-size: 11.5px; font-weight: 600;
}
.batch-price-tag { color: #166534; font-weight: 600; }

.has-batches { background: #fffbeb !important; }
.has-batches:hover { background: #fef9c3 !important; }
.batch-cont-row { background: #fafaf7 !important; border-top: none !important; }
.batch-cont-row td { border-top: 1px dashed #e5e7eb !important; padding-top: 4px !important; padding-bottom: 4px !important; }

/* ── Order management admin page ─────────────────────────── */
.odm-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 0 16px;
}
.odm-page-header {
  margin-bottom: 20px;
}
.odm-page-title {
  display: flex;
  align-items: center;
  gap: 2px;
}
.odm-page-title i {
  color: var(--pn-blue);
}
.odm-btn-back {
  text-decoration: none;
}
.odm-stats-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.odm-stat-card.wh-stat {
  width: 100%;
  min-width: 0;
  padding: 14px 16px;
  border-radius: 12px;
  gap: 12px;
}
.odm-stat-card.active {
  box-shadow: inset 0 0 0 1px rgba(37,99,235,.08);
}
.odm-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.odm-stat-all .odm-stat-icon { background: #e2e8f0; color: #334155; }
.odm-stat-pending .odm-stat-icon { background: #fef3c7; color: #92400e; }
.odm-stat-processing .odm-stat-icon { background: var(--pn-blue-border); color: var(--pn-blue); }
.odm-stat-done .odm-stat-icon { background: #dcfce7; color: #166534; }
.odm-stat-cancelled .odm-stat-icon { background: #fee2e2; color: #991b1b; }
.odm-stat-label {
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .45px;
}
.odm-stat-value {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}
.odm-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.odm-toolbar-search.wh-search-box {
  flex: 1 1 320px;
  min-width: 260px;
}
.odm-sort-select.wh-select {
  flex: 0 0 170px;
}
.odm-empty.wh-empty {
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
}
.odm-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.odm-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.odm-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 10px 24px rgba(37, 99, 235, .08);
  transform: translateY(-1px);
}
.odm-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px 10px;
  border-bottom: 1px solid #eef2f7;
}
.odm-card-id {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: .35px;
}
.odm-card-body {
  padding: 14px 18px;
}
.odm-card-preview {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 8px;
}
.odm-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 12.5px;
  color: #64748b;
}
.odm-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px 16px;
  border-top: 1px solid #eef2f7;
}
.odm-card-total {
  font-size: 18px;
  font-weight: 800;
  color: var(--pn-blue);
}
.odm-btn-detail {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--pn-blue-border);
  background: var(--pn-blue-light);
  color: var(--pn-blue);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
}
.odm-btn-detail:hover {
  background: var(--pn-blue-border);
  border-color: #93c5fd;
}
.odm-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 11.5px;
  font-weight: 700;
}
.odm-badge-pending { background: #fef3c7; color: #92400e; }
.odm-badge-processing { background: var(--pn-blue-border); color: var(--pn-blue); }
.odm-badge-done { background: #dcfce7; color: #166534; }
.odm-badge-cancelled { background: #fee2e2; color: #991b1b; }
.odm-modal.wh-modal {
  max-width: 760px;
}
.odm-modal-order-id {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
  font-size: 12.5px;
  color: #64748b;
}
.odm-modal-body.wh-modal-body {
  background: #f8fafc;
}
.odm-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #e5e7eb;
}
.odm-info-item {
  display: grid;
  grid-template-columns: 28px 96px minmax(0, 1fr);
  align-items: center;
  gap: 0 8px;
  padding: 10px 12px;
  background: #fff;
}
.odm-info-item.odm-info-full {
  grid-column: 1 / -1;
}
.odm-info-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--pn-blue-light);
  color: var(--pn-blue);
  border-radius: 8px;
  font-size: 11px;
}
.odm-info-label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: #64748b;
}
.odm-info-value {
  min-width: 0;
  font-size: 13px;
  color: #0f172a;
  word-break: break-word;
}
.odm-pay-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.odm-pay-paid { background: #dcfce7; color: #166534; }
.odm-pay-unpaid { background: #fef3c7; color: #92400e; }
.odm-items-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}
.odm-items-table th {
  padding: 10px 12px;
  text-align: left;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #64748b;
}
.odm-items-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #eef2f7;
  color: #0f172a;
  vertical-align: top;
}
.odm-items-table tfoot td {
  border-top: 1px solid #e5e7eb;
  border-bottom: none;
  background: #f8fafc;
}
.odm-modal-footer .ms-auto {
  margin-left: auto;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .wh-admin-wrap { flex-direction: column; }
  .wh-sidebar {
    width: 100%; min-width: unset; height: auto; position: static;
  }
  .wh-sidebar-nav { display: flex; gap: 4px; padding: 8px 10px; overflow-x: auto; }
  .wh-nav-item { flex-direction: column; gap: 4px; padding: 8px 10px; border-left: none; border-bottom: 3px solid transparent; font-size: 11px; }
  .wh-nav-item.active { border-left: none; border-bottom-color: #fff; }
  .wh-content { padding: 16px 12px; }
  .wh-info-row { grid-template-columns: 1fr; }
  .wh-exp-item { flex-direction: column; }
  .wh-modal--a4 .wh-modal-body { padding: 12px; }
  .wh-report-sheet { width: 100%; min-height: auto; padding: 18px 14px; }
  .wh-report-head { flex-direction: column; }
  .wh-report-meta { width: 100%; min-width: 0; }
  .wh-report-grid { grid-template-columns: 1fr; }
  .wh-exp-item .exp-prod-select,
  .wh-exp-item .exp-qty,
  .wh-exp-item .exp-price,
  .wh-exp-item .exp-note { width: 100%; min-width: unset; }
  .rpt-summary-row { flex-direction: column; }
  .rpt-card { min-width: unset; }
  .wh-stats-row { flex-direction: column; }
  .odm-stats-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .odm-card-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .odm-btn-detail {
    justify-content: center;
  }
  .odm-info-grid {
    grid-template-columns: 1fr;
  }
  .odm-info-item {
    grid-template-columns: 28px 88px minmax(0, 1fr);
  }
}

@media (max-width: 480px) {
  .odm-stats-row {
    grid-template-columns: 1fr;
  }
  .odm-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .odm-toolbar-search.wh-search-box,
  .odm-sort-select.wh-select {
    min-width: 0;
    width: 100%;
    flex-basis: auto;
  }
  .odm-card-header,
  .odm-card-body,
  .odm-card-footer {
    padding-left: 14px;
    padding-right: 14px;
  }
}
