/* ===== NAV LINKS ===== */
.nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 36px;
  border-radius: 8px;
  color: #9CA3AF;
  transition: all .15s;
  font-size: 18px;
  text-decoration: none;
}
.nav-link:hover { background: #F3F4F6; color: #374151; }
.nav-link.active { background: #EEF2FF; color: #4F46E5; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 8px; font-size: 13px;
  border: 1px solid #E5E7EB; background: #fff; color: #374151;
  cursor: pointer; transition: all .15s; white-space: nowrap;
}
.btn:hover { background: #F9FAFB; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: #4F46E5; color: #fff; border-color: #4F46E5; }
.btn-primary:hover { background: #4338CA; border-color: #4338CA; }
.btn-success { background: #059669; color: #fff; border-color: #059669; }
.btn-success:hover { background: #047857; border-color: #047857; }
.btn-danger { background: #EF4444; color: #fff; border-color: #EF4444; }
.btn-danger:hover { background: #DC2626; border-color: #DC2626; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-xs { padding: 2px 8px; font-size: 11px; border-radius: 6px; }
.btn-icon { padding: 5px; width: 30px; height: 30px; justify-content: center; }

/* ===== FORMS ===== */
.form-input {
  width: 100%; padding: 7px 10px; font-size: 13px;
  border: 1px solid #E5E7EB; border-radius: 8px;
  background: #fff; color: #111827; transition: border-color .15s;
  outline: none;
}
.form-input:focus { border-color: #4F46E5; box-shadow: 0 0 0 3px rgba(79,70,229,.1); }
.form-label { font-size: 11px; color: #6B7280; margin-bottom: 4px; display: block; }
.form-group { display: flex; flex-direction: column; gap: 4px; }

/* ===== TABLE ===== */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  padding: 8px 12px; text-align: left; font-size: 11px;
  font-weight: 500; color: #6B7280; background: #F9FAFB;
  border-bottom: 1px solid #F3F4F6; white-space: nowrap;
}
.data-table td {
  padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #F3F4F6;
  vertical-align: middle;
}
.data-table tbody tr:hover td { background: #FAFAFA; }
.data-table tbody tr:last-child td { border-bottom: none; }

/* ===== CARDS ===== */
.card { background: #fff; border: 1px solid #F3F4F6; border-radius: 12px; }
.card-header {
  padding: 12px 16px; border-bottom: 1px solid #F3F4F6;
  display: flex; align-items: center; justify-content: space-between;
}
.card-body { padding: 14px 16px; }

/* ===== BADGES ===== */
.badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 500;
}
.badge-green  { background: #DCFCE7; color: #166534; }
.badge-yellow { background: #FEF9C3; color: #854D0E; }
.badge-red    { background: #FEE2E2; color: #991B1B; }
.badge-blue   { background: #DBEAFE; color: #1E40AF; }
.badge-purple { background: #EDE9FE; color: #5B21B6; }
.badge-orange { background: #FFEDD5; color: #9A3412; }
.badge-gray   { background: #F3F4F6; color: #374151; }
.badge-teal   { background: #CCFBF1; color: #134E4A; }

/* ===== STAT CARD ===== */
.stat-card {
  background: #F9FAFB; border-radius: 8px; padding: 12px 16px;
}
.stat-card .label { font-size: 11px; color: #6B7280; margin-bottom: 2px; }
.stat-card .value { font-size: 22px; font-weight: 500; line-height: 1.2; }
.stat-card .sub   { font-size: 11px; color: #9CA3AF; margin-top: 2px; }

/* ===== MODAL ===== */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 16px; z-index: 200; overflow-y: auto;
  animation: fadeIn .15s ease;
}
.modal-box {
  background: #fff; border-radius: 12px; border: 1px solid #E5E7EB;
  width: 100%; margin: auto; animation: slideUp .2s ease;
  max-height: calc(100vh - 80px); display: flex; flex-direction: column;
}
.modal-head {
  padding: 14px 16px; border-bottom: 1px solid #F3F4F6;
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.modal-body { padding: 16px; overflow-y: auto; flex: 1; }
.modal-foot {
  padding: 12px 16px; border-top: 1px solid #F3F4F6;
  display: flex; gap: 8px; justify-content: flex-end; flex-shrink: 0;
}

/* ===== TOAST ===== */
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 10px; font-size: 13px;
  pointer-events: all; min-width: 240px; max-width: 320px;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
  animation: slideInRight .2s ease;
}
.toast-success { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.toast-error   { background: #FEF2F2; color: #991B1B; border: 1px solid #FCA5A5; }
.toast-info    { background: #EEF2FF; color: #3730A3; border: 1px solid #C7D2FE; }
.toast-warning { background: #FFFBEB; color: #92400E; border: 1px solid #FDE68A; }

/* ===== PLATFORM BADGES ===== */
.platform-shopee  { background: #FFF1E6; color: #C05621; }
.platform-tiktok  { background: #FCE7F3; color: #9D174D; }
.platform-lazada  { background: #EFF6FF; color: #1E40AF; }
.platform-tiki    { background: #E0F2FE; color: #075985; }
.platform-direct  { background: #F0FDF4; color: #166534; }

/* ===== STOCK BAR ===== */
.stock-bar { height: 4px; background: #F3F4F6; border-radius: 2px; overflow: hidden; margin-top: 3px; width: 60px; }
.stock-fill { height: 100%; border-radius: 2px; }

/* ===== FIFO BADGE ===== */
.fifo-batch {
  font-size: 10px; padding: 1px 6px; border-radius: 4px;
  background: #EEF2FF; color: #4F46E5; font-family: monospace;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: #9CA3AF; }

/* ===== ANIMATIONS ===== */
@keyframes fadeIn    { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp   { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
.animate-spin { animation: spin 1s linear infinite; }

/* ===== PAGE TRANSITION ===== */
.page-enter { animation: fadeIn .2s ease; }

/* ===== COLOR PICKER ===== */
.color-swatch {
  width: 26px; height: 26px; border-radius: 50%; cursor: pointer;
  border: 2px solid transparent; transition: border-color .15s;
  flex-shrink: 0;
}
.color-swatch.selected { border-color: #111827; }

/* ===== SECTION DIVIDER ===== */
.section-divider {
  font-size: 10px; font-weight: 500; color: #9CA3AF;
  text-transform: uppercase; letter-spacing: .8px;
  padding: 8px 0 4px; margin-top: 4px;
  border-top: 1px solid #F3F4F6;
}
.section-divider:first-child { border-top: none; padding-top: 0; margin-top: 0; }

/* ===== CONFIRM BTN ===== */
.confirm-receive-btn {
  padding: 4px 10px; border-radius: 6px; background: #059669;
  color: #fff; border: none; font-size: 11px; cursor: pointer;
  font-weight: 500; white-space: nowrap; display: inline-flex;
  align-items: center; gap: 4px; transition: background .15s;
}
.confirm-receive-btn:hover { background: #047857; }

/* ===== EMPTY STATE ===== */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 48px 24px; text-align: center;
  color: #9CA3AF;
}
.empty-state i { font-size: 40px; margin-bottom: 12px; display: block; }
.empty-state p { font-size: 14px; margin-bottom: 4px; color: #6B7280; }
.empty-state span { font-size: 12px; }

/* ===== CARD VISUAL ===== */
.bank-card {
  border-radius: 10px; padding: 12px 14px;
  display: flex; flex-direction: column; justify-content: space-between;
  height: 80px; position: relative; overflow: hidden;
}
.bank-card::after {
  content: ''; position: absolute; right: -20px; top: -20px;
  width: 100px; height: 100px; border-radius: 50%;
  background: rgba(255,255,255,.08);
}

/* ===== DETAIL PANEL ===== */
.detail-panel {
  background: #fff; border: 1px solid #F3F4F6; border-radius: 12px;
  overflow: hidden; height: fit-content;
}
.pct-badge {
  font-size: 11px; font-weight: 600; padding: 2px 7px;
  border-radius: 10px; display: inline-block;
}
.pct-high { background: #DCFCE7; color: #166534; }
.pct-mid  { background: #FEF9C3; color: #854D0E; }
.pct-low  { background: #F3F4F6; color: #6B7280; }
