/* ═══════════════════════════════════════════════════════════════
   GARMENT ERP — Design System
   Premium Dark Theme with Amber Accents
═══════════════════════════════════════════════════════════════ */

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

:root {
  /* Colors */
  --bg-base:        #0a0b0f;
  --bg-surface:     #111318;
  --bg-card:        #161b22;
  --bg-card-hover:  #1c2230;
  --bg-input:       #1a1f2e;
  --border:         rgba(255,255,255,0.08);
  --border-accent:  rgba(251,191,36,0.35);

  /* Accent — Amber/Gold */
  --accent:         #fbbf24;
  --accent-dim:     #d97706;
  --accent-glow:    rgba(251,191,36,0.15);
  --accent-soft:    rgba(251,191,36,0.08);

  /* Status Colors */
  --success:        #10b981;
  --success-bg:     rgba(16,185,129,0.12);
  --warning:        #f59e0b;
  --warning-bg:     rgba(245,158,11,0.12);
  --danger:         #ef4444;
  --danger-bg:      rgba(239,68,68,0.12);
  --info:           #3b82f6;
  --info-bg:        rgba(59,130,246,0.12);

  /* Text */
  --text-primary:   #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted:     #475569;

  /* Layout */
  --sidebar-w:      240px;
  --sidebar-w-collapsed: 68px;
  --topbar-h:       64px;
  --radius:         12px;
  --radius-sm:      8px;
  --radius-lg:      16px;

  /* Shadows */
  --shadow-sm:      0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:      0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg:      0 8px 32px rgba(0,0,0,0.6);
  --shadow-accent:  0 0 20px rgba(251,191,36,0.2);

  /* Transitions */
  --transition:     all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

html { font-size: 14px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.25); }

/* ── Sidebar ───────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 100;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.sidebar.collapsed { width: var(--sidebar-w-collapsed); }

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 16px;
  border-bottom: 1px solid var(--border);
  min-height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  white-space: nowrap;
}

.logo-icon {
  font-size: 22px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(251,191,36,0.4));
}

.logo-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  display: block;
  letter-spacing: -0.3px;
}

.logo-sub {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sidebar-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 30px; height: 30px;
  border-radius: 6px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  transition: var(--transition);
  flex-shrink: 0;
}
.sidebar-toggle:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

.sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  transition: var(--transition);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.nav-item::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
  opacity: 0;
  transition: var(--transition);
}

.nav-item:hover {
  background: var(--accent-soft);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--border-accent);
}

.nav-item.active::before { opacity: 1; }

.nav-icon { font-size: 18px; flex-shrink: 0; }
.nav-label { transition: var(--transition); }
.sidebar.collapsed .nav-label { opacity: 0; width: 0; overflow: hidden; }
.sidebar.collapsed .logo-text { opacity: 0; width: 0; overflow: hidden; }
.sidebar.collapsed .sidebar-version { opacity: 0; }

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}

.sidebar-version {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  transition: var(--transition);
}

/* ── Main Content ──────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-content.expanded { margin-left: var(--sidebar-w-collapsed); }

/* ── Topbar ────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
}

.page-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.4px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.clock {
  font-size: 13px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  background: var(--bg-card);
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.business-badge {
  background: var(--accent-soft);
  border: 1px solid var(--border-accent);
  color: var(--accent);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

/* ── Content Area ──────────────────────────────────────────── */
.content-area {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: var(--transition);
}

.card:hover { border-color: rgba(255,255,255,0.12); }

.card-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* ── Stat Cards ─────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
  cursor: default;
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  opacity: 0;
  transition: var(--transition);
}

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

.stat-card:hover::after { opacity: 1; }

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

.stat-icon.amber  { background: var(--accent-soft); }
.stat-icon.green  { background: var(--success-bg); }
.stat-icon.blue   { background: var(--info-bg); }
.stat-icon.red    { background: var(--danger-bg); }
.stat-icon.purple { background: rgba(168,85,247,0.12); }

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

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
  font-weight: 500;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  border: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent);
  color: #000;
}
.btn-primary:hover { background: #fcd34d; box-shadow: 0 0 16px rgba(251,191,36,0.4); }

.btn-secondary {
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(239,68,68,0.2);
}
.btn-danger:hover { background: var(--danger); color: #fff; }

.btn-success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(16,185,129,0.2);
}
.btn-success:hover { background: var(--success); color: #fff; }

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-icon { padding: 8px; width: 34px; height: 34px; justify-content: center; }

/* ── Tables ─────────────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}

th {
  padding: 12px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  white-space: nowrap;
}

td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  vertical-align: middle;
}

tbody tr {
  transition: var(--transition);
}

tbody tr:hover { background: var(--bg-card-hover); }
tbody tr:last-child td { border-bottom: none; }

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-info    { background: var(--info-bg);    color: var(--info); }
.badge-amber   { background: var(--accent-soft); color: var(--accent); }
.badge-muted   { background: rgba(255,255,255,0.05); color: var(--text-muted); }

/* ── Forms ──────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 16px;
}

label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input, select, textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 10px 13px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13.5px;
  transition: var(--transition);
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

input::placeholder, textarea::placeholder { color: var(--text-muted); }

select option { background: var(--bg-card); }

textarea { resize: vertical; min-height: 80px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}

/* ── Modal ──────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 680px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.2s ease;
}

.modal-overlay.active .modal { transform: scale(1) translateY(0); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  width: 32px; height: 32px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}

.modal-close:hover { background: var(--danger-bg); color: var(--danger); }

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

.modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

/* ── Toast ──────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  min-width: 280px;
  max-width: 400px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-md);
  animation: slideInToast 0.3s ease;
  font-size: 13.5px;
  font-weight: 500;
}

.toast.success { border-left: 3px solid var(--success); }
.toast.error   { border-left: 3px solid var(--danger); }
.toast.warning { border-left: 3px solid var(--warning); }
.toast.info    { border-left: 3px solid var(--info); }

@keyframes slideInToast {
  from { transform: translateX(120%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ── Page Section ───────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  width: 280px;
  transition: var(--transition);
}

.search-bar:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-bar input {
  background: none;
  border: none;
  padding: 10px 0;
  width: 100%;
}
.search-bar input:focus { box-shadow: none; }

.search-icon { color: var(--text-muted); font-size: 15px; }

/* ── Dashboard ──────────────────────────────────────────────── */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-top: 24px;
}

/* ── Stock Movement ─────────────────────────────────────────── */
.movement-type-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.movement-tab {
  padding: 8px 20px;
  border-radius: 6px;
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  background: var(--bg-card);
  color: var(--text-secondary);
  transition: var(--transition);
}

.movement-tab[data-type="IN"].active  { background: var(--success-bg); color: var(--success); border-color: rgba(16,185,129,0.3); }
.movement-tab[data-type="OUT"].active { background: var(--danger-bg);  color: var(--danger);  border-color: rgba(239,68,68,0.3); }
.movement-tab[data-type="ADJUSTMENT"].active { background: var(--info-bg); color: var(--info); border-color: rgba(59,130,246,0.3); }

/* ── Barcode Labels ─────────────────────────────────────────── */
.barcode-preview-area {
  background: var(--bg-input);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  transition: var(--transition);
}

.barcode-preview-area.has-content {
  border-style: solid;
  border-color: var(--accent);
}

.label-preview-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px;
}

/* ── Print Area ─────────────────────────────────────────────── */
.print-area { display: none; }

@media print {
  body > *:not(.print-area) { display: none !important; }
  .print-area { display: block !important; }

  @page {
    size: 2in 1in;
    margin: 0;
  }

  .print-label {
    width: 2in;
    height: 1in;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 3pt 4pt;
    page-break-after: always;
    box-sizing: border-box;
    background: white;
    font-family: Arial, sans-serif;
    overflow: hidden;
  }

  .print-label:last-child { page-break-after: avoid; }

  .print-label .lbl-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
  }

  .print-label .lbl-brand {
    font-size: 7pt;
    font-weight: bold;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 0.5pt;
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .print-label .lbl-price {
    font-size: 9pt;
    font-weight: bold;
    color: #000;
  }

  .print-label .lbl-desc {
    font-size: 6pt;
    color: #333;
    text-align: center;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .print-label .lbl-barcode {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .print-label .lbl-barcode svg {
    max-width: 100%;
    height: 24pt !important;
  }

  .print-label .lbl-sku {
    font-size: 5.5pt;
    color: #555;
    text-align: center;
    width: 100%;
  }
}

/* Screen label preview */
.label-card {
  background: white;
  color: #000;
  border-radius: 6px;
  padding: 8px 10px;
  width: 192px;   /* 2in at 96dpi */
  height: 96px;   /* 1in at 96dpi */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  border: 1px solid #ddd;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.label-card:hover {
  transform: scale(1.04);
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}

.label-card .lbl-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
}

.label-card .lbl-brand {
  font-size: 7px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.label-card .lbl-price {
  font-size: 9px;
  font-weight: 700;
}

.label-card .lbl-desc {
  font-size: 6px;
  color: #333;
  text-align: center;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.label-card .lbl-barcode svg {
  max-width: 100%;
  max-height: 30px;
}

.label-card .lbl-sku {
  font-size: 5.5px;
  color: #666;
}

/* ── Reports ────────────────────────────────────────────────── */
.report-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }

/* ── Variants Table ─────────────────────────────────────────── */
.variant-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.variant-row:last-child { border-bottom: none; }

/* ── Qty chip ───────────────────────────────────────────────── */
.qty-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  min-width: 36px;
}

.qty-chip.ok      { background: var(--success-bg); color: var(--success); }
.qty-chip.low     { background: var(--warning-bg); color: var(--warning); }
.qty-chip.out     { background: var(--danger-bg);  color: var(--danger); }

/* ── Responsive tweaks ─────────────────────────────────────── */
@media (max-width: 900px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .content-area { padding: 16px; }
  .sidebar { width: var(--sidebar-w-collapsed); }
  .main-content { margin-left: var(--sidebar-w-collapsed); }
}

/* ── Animations ─────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeIn 0.25s ease forwards; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.loading { animation: pulse 1.5s ease infinite; }

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

/* ── Product thumbnail ──────────────────────────────────────── */
.product-info {
  display: flex;
  flex-direction: column;
}
.product-name { font-weight: 600; color: var(--text-primary); }
.product-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ── Number input spinner remove ───────────────────────────── */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; }
input[type=number] { -moz-appearance: textfield; }

/* ── Tooltip ────────────────────────────────────────────────── */
[data-tip] { position: relative; }
[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: #fff;
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 5px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 999;
  box-shadow: var(--shadow-md);
}

/* ── Barcode Scanner ────────────────────────────────────────── */
.scanner-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(251,191,36,0.08), rgba(251,191,36,0.03));
  border: 1px solid var(--border-accent);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.scanner-bar::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
}
.scanner-icon { font-size: 22px; flex-shrink: 0; animation: scanPulse 2s ease-in-out infinite; }
@keyframes scanPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.95); }
}
.scanner-input-wrap { flex: 1; }
.scanner-input {
  background: var(--bg-card) !important;
  border: 1.5px solid var(--border-accent) !important;
  border-radius: var(--radius-sm) !important;
  font-size: 14px !important;
  font-family: 'Courier New', monospace !important;
  letter-spacing: 1px;
  width: 100%;
}
.scanner-input:focus { border-color: var(--accent) !important; box-shadow: 0 0 0 3px var(--accent-glow) !important; }
.scanner-input.found { border-color: var(--success) !important; background: rgba(16,185,129,0.05) !important; }
.scanner-input.not-found { border-color: var(--danger) !important; animation: shake 0.3s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}
.scanner-result {
  background: var(--success-bg);
  border: 1px solid rgba(16,185,129,0.25);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: fadeIn 0.2s ease;
}
.scanner-result.error { background: var(--danger-bg); border-color: rgba(239,68,68,0.25); }

/* ── Transfer tab ────────────────────────────────────────────── */
.movement-tab[data-type="TRANSFER"].active {
  background: rgba(168,85,247,0.12);
  color: #a855f7;
  border-color: rgba(168,85,247,0.3);
}

/* ── Location Cards ─────────────────────────────────────────── */
.location-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}
.location-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-accent);
}
.location-card.default-loc { border-color: var(--border-accent); }
.location-card.default-loc::after {
  content: 'Default';
  position: absolute;
  top: 10px; right: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 10px;
  border: 1px solid var(--border-accent);
}
.location-stock-bar { margin-top: 12px; display: flex; gap: 10px; }
.loc-stat { flex: 1; background: var(--bg-input); border-radius: 6px; padding: 8px 10px; text-align: center; }
.loc-stat-val { font-size: 16px; font-weight: 800; color: var(--text-primary); }
.loc-stat-label { font-size: 10px; color: var(--text-muted); margin-top: 2px; }
