:root {
  --brand-primary: #2563eb;
  --brand-primary-dark: #1d4ed8;
  --brand-navy: #0f2d6e;
  --brand-secondary: #7c3aed;
}

/* ============================================================
   SISTEM INFORMASI CONSUMABLE - Main Stylesheet
   Self-hosted, tidak bergantung CDN external
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #f1f5f9;
  color: #1e293b;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 14px;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* ── Layout ── */
.page-wrapper { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: 24px 20px; }

/* ── Navbar ── */
.navbar {
  background: var(--brand-navy);
  color: #fff;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.navbar-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; height: 60px;
  position: relative;
}
.navbar-brand {
  display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px;
}
.navbar-logo {
  width: 36px; height: 36px; background: var(--brand-primary); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 900;
}
.navbar-subtitle { font-size: 11px; color: #93c5fd; }
.navbar-menu { display: flex; align-items: center; gap: 2px; }
.nav-link {
  padding: 6px 12px; border-radius: 7px; font-size: 13.5px; font-weight: 500;
  color: #bfdbfe; transition: background .15s, color .15s; white-space: nowrap;
}
.nav-link:hover, .nav-link.active { background: var(--brand-primary-dark); color: #fff; }
.navbar-right { display: flex; align-items: center; gap: 10px; }
.user-badge {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.1); border-radius: 8px;
  padding: 5px 12px; cursor: pointer; position: relative;
}
.user-avatar {
  width: 28px; height: 28px; border-radius: 50%; background: var(--brand-primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px;
}
.user-name { font-size: 13px; font-weight: 500; }
.dropdown-menu {
  display: none; position: absolute; top: calc(100% + 8px); right: 0;
  background: #fff; color: #1e293b; border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.15); border: 1px solid #e2e8f0;
  min-width: 200px; overflow: hidden; z-index: 200;
}
.dropdown-menu.show { display: block; }
.dropdown-header {
  padding: 12px 16px; border-bottom: 1px solid #f1f5f9;
  font-size: 12px; color: #64748b;
}
.dropdown-header strong { display: block; font-size: 13px; color: #1e293b; }
.dropdown-item {
  display: block; padding: 10px 16px; font-size: 13px;
  transition: background .12s; color: #334155;
}
.dropdown-item:hover { background: #f8fafc; }
.dropdown-item.danger { color: #dc2626; }
.navbar-toggle {
  display: none; background: none; border: none; color: #fff;
  cursor: pointer; padding: 6px;
}
.mobile-menu {
  display: none; background: var(--brand-navy); padding: 8px 16px 12px;
}
.mobile-menu.open { display: block; }
.mobile-menu .nav-link { display: block; padding: 9px 12px; margin: 2px 0; }
.btn-login-nav {
  background: var(--brand-primary); color: #fff; padding: 7px 16px; border-radius: 7px;
  font-size: 13px; font-weight: 600; transition: background .15s;
}
.btn-login-nav:hover { background: var(--brand-primary-dark); }

/* ── Cards ── */
.card {
  background: #fff; border-radius: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,.07);
  border: 1px solid #e8edf4;
}
.card-body { padding: 22px; }
.card-title { font-size: 15px; font-weight: 700; color: #1e293b; margin-bottom: 4px; }
.card-subtitle { font-size: 12.5px; color: #64748b; }

/* ── Stat Cards ── */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card {
  border-radius: 14px; padding: 20px 22px; color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
}
.stat-card .stat-label { font-size: 12px; opacity: .85; font-weight: 500; margin-bottom: 6px; }
.stat-card .stat-value { font-size: 28px; font-weight: 800; line-height: 1; }
.stat-card .stat-sub { font-size: 11px; opacity: .7; margin-top: 4px; }
.stat-blue { background: linear-gradient(135deg, var(--brand-primary-dark), var(--brand-primary)); }
.stat-amber { background: linear-gradient(135deg, #d97706, #f59e0b); }
.stat-green { background: linear-gradient(135deg, #059669, #10b981); }

/* ── Grid layouts ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-dash { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.col-span-2 { grid-column: span 2; }

/* ── Page header ── */
.page-header { margin-bottom: 22px; display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.page-title { font-size: 22px; font-weight: 800; color: #0f172a; }
.page-desc { font-size: 13px; color: #64748b; margin-top: 3px; }
.header-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 600;
  border: none; cursor: pointer; transition: all .15s; white-space: nowrap;
  text-decoration: none;
}
.btn-primary { background: var(--brand-primary); color: #fff; }
.btn-primary:hover { background: var(--brand-primary-dark); }
.btn-secondary { background: #f1f5f9; color: #334155; }
.btn-secondary:hover { background: #e2e8f0; }
.btn-success { background: #059669; color: #fff; }
.btn-success:hover { background: #047857; }
.btn-danger { background: #fef2f2; color: #b91c1c; }
.btn-danger:hover { background: #fee2e2; }
.btn-outline { background: #fff; border: 1.5px solid #cbd5e1; color: #334155; }
.btn-outline:hover { background: #f8fafc; border-color: #94a3b8; }
.btn-sm { padding: 5px 11px; font-size: 12px; border-radius: 6px; }
.btn-xs { padding: 3px 8px; font-size: 11px; border-radius: 5px; }
.btn-w100 { width: 100%; justify-content: center; }

/* ── Forms ── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 12px; font-weight: 600; color: #475569; margin-bottom: 5px; }
.form-input, .form-select, .form-textarea {
  width: 100%; border: 1.5px solid #cbd5e1; border-radius: 8px;
  padding: 9px 12px; font-size: 13.5px; background: #fff; color: #1e293b;
  transition: border-color .15s, box-shadow .15s; font-family: inherit;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.form-input:disabled, .form-select:disabled { background: #f8fafc; color: #94a3b8; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.form-row-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 14px; }
.input-sm { padding: 5px 9px; font-size: 12.5px; border-radius: 6px; width: 80px; }

/* ── Tables ── */
.table-wrap { overflow-x: auto; margin: -22px; margin-top: 0; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table th {
  background: #f8fafc; text-align: left; padding: 11px 14px;
  font-weight: 700; color: #475569; font-size: 12px; text-transform: uppercase;
  letter-spacing: .04em; border-bottom: 2px solid #e2e8f0; white-space: nowrap;
}
.data-table td { padding: 11px 14px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: #f8fafc; }
.data-table tfoot td { background: #f8fafc; font-weight: 700; border-top: 2px solid #e2e8f0; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.font-mono { font-family: 'Courier New', monospace; font-size: 12px; }
.font-bold { font-weight: 700; }
.text-muted { color: #94a3b8; }
.text-sm { font-size: 12px; }
.text-danger { color: #dc2626; }
.text-success { color: #059669; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }

/* ── Badges ── */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .02em;
}
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-green { background: #d1fae5; color: #065f46; }
.badge-yellow { background: #fef3c7; color: #92400e; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-gray { background: #f1f5f9; color: #475569; }
.badge-purple { background: #ede9fe; color: #5b21b6; }

/* ── Alerts/Flash ── */
.alert { padding: 12px 16px; border-radius: 10px; font-size: 13.5px; font-weight: 500; margin-bottom: 18px; display: flex; align-items: flex-start; gap: 8px; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.alert-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.alert-info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }

/* ── Modals ── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(15,23,42,.55); z-index: 300;
  align-items: center; justify-content: center; padding: 16px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff; border-radius: 16px; width: 100%; max-width: 520px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2); max-height: 90vh; overflow-y: auto;
}
.modal-lg { max-width: 860px; }
.modal-header {
  padding: 20px 24px 16px; border-bottom: 1px solid #f1f5f9;
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-size: 16px; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 22px; cursor: pointer; color: #94a3b8; line-height: 1; }
.modal-close:hover { color: #475569; }
.modal-body { padding: 22px 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid #f1f5f9; display: flex; gap: 10px; justify-content: flex-end; }

/* ── Filter bar ── */
.filter-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 20px; }
.filter-bar .form-group { margin-bottom: 0; }

/* ── Flash alerts ── */
.flash-wrap { margin-bottom: 18px; }

/* ── Section divider ── */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; gap: 8px; }
.section-title { font-size: 15px; font-weight: 700; color: #1e293b; }

/* ── Pill tabs ── */
.pill-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.pill-tab {
  padding: 8px 18px; border-radius: 999px; font-size: 13px; font-weight: 700;
  border: none; cursor: pointer; transition: all .2s;
  background: #f1f5f9; color: #64748b;
}
.pill-tab:hover { background: #e2e8f0; color: #334155; }
.pill-tab.active {
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(79,70,229,.35);
}

/* ── Toolbar dengan aksen gradient (tab + filter bulan/tahun sejajar) ── */
.gradient-toolbar {
  position: relative;
  background: linear-gradient(120deg, #f5f7ff 0%, #ffffff 55%, #faf5ff 100%);
  border: 1px solid #eef0fb;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(79,70,229,.04), 0 8px 24px -12px rgba(79,70,229,.15);
}
.gradient-toolbar::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary), #ec4899);
}
.gradient-toolbar::after {
  content: '';
  position: absolute; top: -60px; right: -60px; width: 160px; height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,.08) 0%, rgba(124,58,237,0) 70%);
  pointer-events: none;
}
.gradient-toolbar .card-body { position: relative; z-index: 1; }
.gradient-toolbar .filter-inline-select {
  position: relative;
}
.filter-inline-select select {
  padding-left: 34px;
  border-radius: 999px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  font-weight: 600;
  font-size: 13px;
  color: #334155;
  transition: border-color .15s, box-shadow .15s;
}
.filter-inline-select select:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}
.filter-inline-select .filter-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: #818cf8; pointer-events: none; display: flex;
}
.btn-gradient {
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
  color: #fff; border: none;
  box-shadow: 0 4px 14px rgba(99,102,241,.3);
  transition: transform .15s, box-shadow .15s;
}
.btn-gradient:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(99,102,241,.4); }

/* ── Search pill (dipakai di dalam toolbar gradient, mis. cari barang) ── */
.search-pill {
  position: relative;
}
.search-pill input {
  padding-left: 36px;
  border-radius: 999px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  font-size: 13px;
  transition: border-color .15s, box-shadow .15s;
}
.search-pill input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}
.search-pill .filter-icon {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: #818cf8; pointer-events: none; display: flex;
}

/* ── Estimasi warning ── */
.estimasi-box { border-radius: 8px; padding: 8px 12px; font-size: 12.5px; margin: 8px 0; }
.estimasi-ok { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.estimasi-warn { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }

/* ── Login page ── */
.login-page {
  min-height: 100vh; background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-primary-dark) 60%, var(--brand-primary) 100%);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.login-box {
  background: #fff; border-radius: 20px; padding: 40px 36px;
  width: 100%; max-width: 420px; box-shadow: 0 24px 64px rgba(0,0,0,.3);
}
.login-logo {
  width: 52px; height: 52px; background: var(--brand-primary); border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 22px; color: #fff; margin: 0 auto 16px;
}
.login-title { text-align: center; font-size: 20px; font-weight: 800; color: #0f172a; }
.login-sub { text-align: center; font-size: 13px; color: #64748b; margin-top: 4px; margin-bottom: 28px; }

/* ── Footer ── */
.site-footer {
  background: #fff; border-top: 1px solid #e2e8f0;
  text-align: center; padding: 16px; font-size: 12px; color: #94a3b8; margin-top: 40px;
}

/* ── Utilities ── */
.mt-1 { margin-top: 4px; }   .mt-2 { margin-top: 8px; }   .mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }  .mt-5 { margin-top: 24px; }
.mb-1 { margin-bottom: 4px; }.mb-2 { margin-bottom: 8px; }.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }.mb-5 { margin-bottom: 24px; }
.me-1 { margin-right: 4px; } .me-2 { margin-right: 8px; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; }
.d-flex { display: flex; } .align-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; } .justify-between { justify-content: space-between; }
.w-100 { width: 100%; } .h-100 { height: 100%; }
.p-4 { padding: 16px; } .p-5 { padding: 20px; } .p-6 { padding: 24px; }
.rounded { border-radius: 8px; } .rounded-lg { border-radius: 12px; }
.hidden { display: none !important; }
.overflow-x-auto { overflow-x: auto; }
.whitespace-nowrap { white-space: nowrap; }
.max-w-md { max-width: 460px; }

/* ── Card hover polish ── */
.card { transition: box-shadow .18s, transform .18s; }
.card.card-hover:hover { box-shadow: 0 8px 24px rgba(15,23,42,.09); transform: translateY(-1px); }

/* ── Icon circle (dipakai di stat card, feature card, empty state) ── */
.icon-circle {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.icon-circle svg { width: 22px; height: 22px; }
.icon-circle-sm { width: 34px; height: 34px; border-radius: 9px; }
.icon-circle-sm svg { width: 17px; height: 17px; }

/* ── Stat card v2 (dengan icon) ── */
.stat-card {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  position: relative; overflow: hidden;
}
.stat-card::after {
  content: ''; position: absolute; right: -30px; top: -30px;
  width: 110px; height: 110px; border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.stat-card .icon-circle { background: rgba(255,255,255,.18); color: #fff; }

/* ── Empty state ── */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px 20px; text-align: center; color: #94a3b8;
}
.empty-state .icon-circle {
  background: #f1f5f9; color: #94a3b8; width: 56px; height: 56px; border-radius: 16px; margin-bottom: 14px;
}
.empty-state .icon-circle svg { width: 26px; height: 26px; }
.empty-state-title { font-size: 14px; font-weight: 600; color: #475569; margin-bottom: 2px; }
.empty-state-sub { font-size: 12.5px; color: #94a3b8; }

/* ── Feature card (Report & Permohonan grid) ── */
.feature-card {
  background: #fff; border-radius: 16px; border: 1px solid #e8edf4;
  padding: 22px; display: flex; flex-direction: column; gap: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
  transition: box-shadow .18s, transform .18s;
}
.feature-card:hover { box-shadow: 0 10px 28px rgba(15,23,42,.1); transform: translateY(-2px); }
.feature-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.feature-card-title { font-size: 15px; font-weight: 700; color: #0f172a; display: flex; align-items: center; gap: 10px; }
.feature-card-list { display: flex; flex-direction: column; gap: 8px; max-height: 280px; overflow-y: auto; }
.feature-card-empty { font-size: 12.5px; color: #94a3b8; padding: 18px 0; text-align: center; }

.doc-row {
  display: flex; align-items: center; justify-content: space-between;
  border: 1px solid #f1f5f9; border-radius: 10px; padding: 10px 12px;
  transition: background .15s, border-color .15s;
}
.doc-row:hover { background: #f8fafc; border-color: #e2e8f0; }
.doc-row-title { font-size: 13px; font-weight: 600; color: #1e293b; }
.doc-row-sub { font-size: 11.5px; color: #94a3b8; margin-top: 1px; }
.doc-row-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ── Status legend cards (Request) ── */
.status-legend-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 24px; }
.status-legend-card {
  background: #fff; border-radius: 14px; padding: 16px 18px;
  border-left: 4px solid transparent; box-shadow: 0 1px 4px rgba(0,0,0,.05);
  display: flex; gap: 12px; align-items: flex-start;
}
.status-legend-card.legend-waiting { border-left-color: #f59e0b; }
.status-legend-card.legend-estimated { border-left-color: #2563eb; }
.status-legend-card.legend-close { border-left-color: #10b981; }
.status-legend-icon {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.legend-waiting .status-legend-icon { background: #fef3c7; color: #d97706; }
.legend-estimated .status-legend-icon { background: #dbeafe; color: #2563eb; }
.legend-close .status-legend-icon { background: #d1fae5; color: #059669; }
.status-legend-text { font-size: 12.5px; color: #64748b; margin-top: 2px; line-height: 1.5; }

/* ── Section icon badge (dipakai di judul halaman) ── */
.page-icon {
  width: 46px; height: 46px; border-radius: 13px; background: #2563eb;
  display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0;
}
.page-icon svg { width: 22px; height: 22px; }
.page-title-row { display: flex; align-items: center; gap: 14px; }

/* ── Alert with icon ── */
.alert { align-items: center; }
.alert svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ── Divisi grouped table header ── */
.data-table thead tr:first-child th { background: #eff6ff; }
.data-table thead tr:last-child th { background: #f8fafc; }

/* ── Zebra stripe untuk tabel panjang (scan-ability) ── */
.data-table tbody tr:nth-child(even) { background: #fafbfc; }
.data-table tbody tr:nth-child(even):hover { background: #f1f5f9; }

/* ── Kode/unit tag (chip kecil, bukan teks polos) ── */
.kode-tag {
  display: inline-block; font-family: 'Courier New', monospace; font-size: 11.5px;
  background: #f1f5f9; color: #475569; padding: 3px 9px; border-radius: 6px;
  letter-spacing: .01em; font-weight: 600;
}
.unit-tag {
  display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .03em; background: #eff6ff; color: #1d4ed8; padding: 3px 10px; border-radius: 999px;
}

/* ── Stok badge (status persediaan, bukan teks warna polos) ── */
.stok-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  min-width: 44px; justify-content: center;
}
.stok-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.stok-ok { background: #f0fdf4; color: #15803d; }
.stok-ok::before { background: #22c55e; }
.stok-low { background: #fffbeb; color: #b45309; }
.stok-low::before { background: #f59e0b; }
.stok-empty { background: #fef2f2; color: #b91c1c; }
.stok-empty::before { background: #ef4444; }

/* ── Angka rata kanan + tabular-nums agar mudah dibandingkan ── */
.text-right { text-align: right; }
.num { font-variant-numeric: tabular-nums; }

/* ── Nama barang + spec dalam 1 kolom (hierarki lebih jelas) ── */
.item-name { font-weight: 700; color: #1e293b; font-size: 13.5px; }
.item-spec { font-size: 12px; color: #94a3b8; margin-top: 1px; }

/* ── Sticky table header saat scroll vertikal panjang ── */
.table-scroll { max-height: 560px; overflow-y: auto; }
.table-scroll thead th { position: sticky; top: 0; z-index: 5; box-shadow: 0 1px 0 #e2e8f0; }

/* ── Sticky table first column (opsional utk tabel lebar) ── */
.table-wrap { border-radius: 0 0 14px 14px; }

/* ── Tombol Notifikasi Bell ── */
.notif-bell {
  position: relative;
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.1); color: #dbeafe;
  border: none; cursor: pointer; transition: background .15s;
}
.notif-bell:hover { background: rgba(255,255,255,.18); }
.notif-bell.active { color: #fbbf24; }
.notif-dot {
  position: absolute; top: 6px; right: 7px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #22c55e; border: 2px solid var(--brand-navy, #0f2d6e);
}
.notif-dot.denied { background: #ef4444; }

/* ── Custom Dropdown (menggantikan tampilan <option> bawaan OS/browser) ── */
.custom-select {
  position: relative;
}
.custom-select-trigger {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 34px 8px 34px;
  border-radius: 999px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  font-weight: 600;
  font-size: 13px;
  color: #334155;
  cursor: pointer;
  user-select: none;
  transition: border-color .15s, box-shadow .15s;
  white-space: nowrap;
}
.custom-select-trigger:hover { border-color: #c7d2fe; }
.custom-select.open .custom-select-trigger {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}
.custom-select-trigger .chevron {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  color: #94a3b8; transition: transform .18s; display: flex;
}
.custom-select.open .chevron { transform: translateY(-50%) rotate(180deg); color: #6366f1; }

.custom-select-panel {
  display: none;
  position: fixed; min-width: 160px;
  background: #fff; border-radius: 12px; border: 1px solid #eef0fb;
  box-shadow: 0 12px 32px -8px rgba(30,41,59,.25);
  z-index: 500; overflow: hidden; padding: 5px;
  max-height: 260px; overflow-y: auto;
}
.custom-select-panel.open { display: block; }
.custom-select-option {
  padding: 8px 12px; border-radius: 8px; font-size: 13px; font-weight: 500;
  color: #475569; cursor: pointer; white-space: nowrap;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  transition: background .12s;
}
.custom-select-option:hover { background: #f1f5f9; }
.custom-select-option.selected {
  background: linear-gradient(135deg, #eef2ff, #f5f3ff);
  color: #4f46e5; font-weight: 700;
}
.custom-select-option .check-icon { color: #6366f1; display: flex; flex-shrink: 0; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .navbar-menu { display: none; }
  .navbar-toggle { display: block; }
  .grid-dash { grid-template-columns: 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr; }
  .form-row, .form-row-3, .form-row-4 { grid-template-columns: 1fr 1fr; }
  .status-legend-grid { grid-template-columns: 1fr; }
  /* Dashboard: form input penggunaan tampil di atas, tabel stok di bawah */
  .dash-input-card { order: -1; }
}
@media (max-width: 580px) {
  .page-wrapper { padding: 16px 12px; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .card-body { padding: 16px; }
  .login-box { padding: 28px 20px; }
  .form-row, .form-row-3, .form-row-4 { grid-template-columns: 1fr; }
  .modal { border-radius: 12px; }
  .stat-value { font-size: 22px !important; }
  .page-icon { width: 38px; height: 38px; border-radius: 10px; }
  .page-icon svg { width: 18px; height: 18px; }
  .page-title { font-size: 19px; }
}
