/* ============================================================
   LIMS Enterprise — Main Stylesheet
   ============================================================ */

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

:root {
  --primary:        #0ea5e9;
  --primary-dark:   #0284c7;
  --primary-light:  #e0f2fe;
  --success:        #22c55e;
  --success-light:  #dcfce7;
  --danger:         #ef4444;
  --danger-light:   #fee2e2;
  --warning:        #f59e0b;
  --warning-light:  #fef3c7;
  --purple:         #8b5cf6;
  --purple-light:   #ede9fe;
  --orange:         #f97316;
  --orange-light:   #ffedd5;
  --teal:           #14b8a6;
  --teal-light:     #ccfbf1;
  --secondary:      #64748b;

  --sidebar-w:      240px;
  --topbar-h:       60px;
  --border:         #e2e8f0;
  --border-light:   #f1f5f9;
  --text:           #1e293b;
  --text-muted:     #64748b;
  --text-light:     #94a3b8;
  --bg:             #f8fafc;
  --card-bg:        #ffffff;
  --radius:         10px;
  --radius-sm:      6px;
  --shadow:         0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:      0 4px 12px rgba(0,0,0,.10);
  --font:           'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:      'JetBrains Mono', 'Courier New', monospace;
}

html, body { height: 100%; font-family: var(--font); color: var(--text); background: var(--bg); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; letter-spacing: -0.01em; }
a { text-decoration: none; color: var(--primary); }
a:hover { color: var(--primary-dark); }
ul { list-style: none; }

/* ── Layout ─────────────────────────────────────────────────── */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: #0f172a;
  display: flex; flex-direction: column;
  z-index: 100;
  transition: transform .25s ease;
}

.main-wrapper {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex; flex-direction: column;
}

/* ── Sidebar ─────────────────────────────────────────────────── */
.sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 16px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.logo-icon {
  width: 36px; height: 36px; border-radius: 9px;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.logo-name { font-size: 16px; font-weight: 700; color: #fff; display: block; }
.logo-sub  { font-size: 10px; color: rgba(255,255,255,.4); display: block; line-height: 1.2; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 12px 8px; }
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 4px; }

.nav-section-label {
  font-size: 10px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: rgba(255,255,255,.3);
  padding: 10px 8px 4px;
}

.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  color: rgba(255,255,255,.65); font-size: 13px; font-weight: 500;
  margin-bottom: 2px; transition: all .15s;
  position: relative;
}
.nav-link i { width: 16px; text-align: center; font-size: 13px; }
.nav-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-link.active { background: var(--primary); color: #fff; }

.badge-soon {
  margin-left: auto; font-size: 9px; padding: 1px 5px;
  background: rgba(255,255,255,.1); color: rgba(255,255,255,.4);
  border-radius: 20px; font-weight: 600;
}

.sidebar-footer {
  padding: 12px; border-top: 1px solid rgba(255,255,255,.08);
  display: flex; align-items: center; gap: 8px;
}
.user-info { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.user-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.user-name  { font-size: 12px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role  { font-size: 10px; color: rgba(255,255,255,.4); }
.logout-btn {
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,.4); font-size: 15px; padding: 6px;
  border-radius: 6px; transition: all .15s;
}
.logout-btn:hover { color: var(--danger); background: rgba(239,68,68,.15); }

/* ── Topbar ──────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
  padding: 0 24px; position: sticky; top: 0; z-index: 50;
  box-shadow: var(--shadow);
}
.sidebar-toggle {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 18px; padding: 4px;
  display: none;
}
.topbar-title { font-size: 16px; font-weight: 600; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.topbar-branch { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.topbar-date { font-size: 12px; color: var(--text-muted); }

/* ── Flash / Alerts ──────────────────────────────────────────── */
.flash-container { padding: 0 24px; margin-top: 16px; }
.alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: 13px; position: relative;
}
.alert-success { background: var(--success-light); color: #166534; border: 1px solid #bbf7d0; }
.alert-danger   { background: var(--danger-light);  color: #991b1b; border: 1px solid #fecaca; }
.alert-close {
  margin-left: auto; background: none; border: none;
  cursor: pointer; font-size: 18px; line-height: 1; color: inherit; opacity: .6;
}
.alert-close:hover { opacity: 1; }
.mb-4 { margin-bottom: 16px; }

/* ── Page content ────────────────────────────────────────────── */
.page-content { padding: 24px; flex: 1; }

.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 24px; gap: 16px;
}
.page-heading    { font-size: 22px; font-weight: 700; color: var(--text); }
.page-subheading { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.page-header-actions { display: flex; align-items: center; gap: 10px; }

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid var(--border-light);
}
.card-title { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.card-title i { color: var(--primary); }
.card-body { padding: 20px; }
.card-footer {
  padding: 12px 20px; border-top: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--text-muted);
}
.mt-6 { margin-top: 24px; }

/* ── Stat cards ──────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px; margin-bottom: 0;
}
.stat-card {
  border-radius: var(--radius); padding: 20px;
  display: flex; align-items: center; gap: 16px;
  border: 1px solid transparent;
}
.stat-blue   { background: #eff6ff; border-color: #bfdbfe; }
.stat-green  { background: #f0fdf4; border-color: #bbf7d0; }
.stat-purple { background: #faf5ff; border-color: #e9d5ff; }
.stat-orange { background: #fff7ed; border-color: #fed7aa; }

.stat-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.stat-blue   .stat-icon { background: #dbeafe; color: #1d4ed8; }
.stat-green  .stat-icon { background: #dcfce7; color: #15803d; }
.stat-purple .stat-icon { background: #ede9fe; color: #7c3aed; }
.stat-orange .stat-icon { background: #ffedd5; color: #c2410c; }

.stat-value { font-size: 26px; font-weight: 700; line-height: 1; }
.stat-label { font-size: 13px; font-weight: 500; color: var(--text-muted); margin-top: 2px; }
.stat-sub   { font-size: 11px; color: var(--text-light); margin-top: 3px; }

/* ── Tables ──────────────────────────────────────────────────── */
.table-responsive { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  padding: 10px 16px; text-align: left;
  font-size: 11px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--text-muted);
  background: var(--bg); border-bottom: 1px solid var(--border);
}
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border-light); vertical-align: middle; }
.table-hover tbody tr:hover { background: #f8fafc; }
.table tbody tr:last-child td { border-bottom: none; }

.user-cell { display: flex; align-items: center; gap: 10px; }
.table-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }

.fw-medium { font-weight: 500; }
.text-muted { color: var(--text-muted); }
.text-sm    { font-size: 12px; }
.py-6       { padding-top: 24px; padding-bottom: 24px; }
.text-center{ text-align: center; }

.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.empty-state i { font-size: 36px; opacity: .3; display: block; margin-bottom: 10px; }
.empty-state p  { margin-bottom: 12px; }

/* ── Badges ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 20px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
}
.badge-primary   { background: var(--primary-light); color: var(--primary-dark); }
.badge-success   { background: var(--success-light); color: #166534; }
.badge-danger    { background: var(--danger-light);  color: #991b1b; }
.badge-warning   { background: var(--warning-light); color: #92400e; }
.badge-info      { background: #e0f2fe; color: #075985; }
.badge-purple    { background: var(--purple-light);  color: #5b21b6; }
.badge-orange    { background: var(--orange-light);  color: #9a3412; }
.badge-teal      { background: var(--teal-light);    color: #115e59; }
.badge-secondary { background: #f1f5f9; color: var(--secondary); }

.badge-live { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--success); }
.badge-live i { font-size: 8px; animation: pulse 1.5s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.3} }

.test-code-list { display: flex; flex-wrap: wrap; gap: 6px; max-width: 360px; }
.test-code-item { display: inline-flex; align-items: center; gap: 4px; }

/* ── Toggle status button ────────────────────────────────────── */
.toggle-status {
  border: none; cursor: pointer; padding: 3px 10px;
  border-radius: 20px; font-size: 11px; font-weight: 600;
  transition: all .15s;
}
.status-active   { background: var(--success-light); color: #166534; }
.status-active:hover { background: #bbf7d0; }
.status-inactive { background: var(--danger-light);  color: #991b1b; }
.status-inactive:hover { background: #fecaca; }

/* ── Action buttons ──────────────────────────────────────────── */
.action-btns { display: flex; gap: 6px; align-items: center; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500; cursor: pointer;
  border: 1px solid transparent; transition: all .15s;
  white-space: nowrap;
}
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-primary {
  background: var(--primary); color: #fff; border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-outline {
  background: transparent; color: var(--text); border-color: var(--border);
}
.btn-outline:hover { background: var(--bg); color: var(--text); }
.btn-danger-outline {
  background: transparent; color: var(--danger); border-color: #fecaca;
}
.btn-danger-outline:hover { background: var(--danger-light); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-login { width: 100%; justify-content: center; padding: 11px 16px; font-size: 14px; }
.w-full { width: 100%; justify-content: center; }
.mt-2 { margin-top: 8px; }

/* ── Forms ───────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--text-muted); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .03em;
}
.form-label.required::after { content: ' *'; color: var(--danger); }

.form-control {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 13px; color: var(--text);
  background: #fff; transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(14,165,233,.12); }
.form-control.is-invalid { border-color: var(--danger); }
.form-control.is-invalid:focus { box-shadow: 0 0 0 3px rgba(239,68,68,.12); }
.invalid-feedback { font-size: 11px; color: var(--danger); margin-top: 4px; }

select.form-control { cursor: pointer; }

.input-icon-wrap { position: relative; }
.input-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-light); font-size: 13px; }
.input-icon-wrap .form-control { padding-left: 32px; }
.input-icon-right {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: var(--text-light); padding: 4px;
}
.input-icon-right:hover { color: var(--text); }

.checkbox-label {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; font-size: 13px; color: var(--text);
}
.checkbox-label input[type="checkbox"] { width: 15px; height: 15px; cursor: pointer; accent-color: var(--primary); }

.filter-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.filter-field { flex: 1; min-width: 150px; max-width: 220px; }
.filter-actions { display: flex; gap: 8px; }
.form-row-split { margin-bottom: 18px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Two-column form layout */
.form-grid { display: grid; grid-template-columns: 1fr 280px; gap: 20px; align-items: start; }
.form-col-main { }
.form-col-side { }
.card-actions { display: flex; flex-direction: column; }

/* ── Pagination ──────────────────────────────────────────────── */
.pagination-nav { display: flex; gap: 4px; align-items: center; }
.pagination-info { font-size: 12px; color: var(--text-muted); }
.page-btn {
  min-width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); font-size: 13px; border: 1px solid var(--border);
  color: var(--text); background: #fff; cursor: pointer; padding: 0 6px;
  transition: all .15s;
}
.page-btn:hover:not(.active):not(.disabled) { background: var(--bg); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-btn.disabled { opacity: .4; cursor: default; }

/* ── User meta ───────────────────────────────────────────────── */
.user-meta-info { display: flex; align-items: center; gap: 12px; }
.meta-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-body { background: #0f172a; }
.login-wrapper { display: flex; min-height: 100vh; }

.login-left {
  width: 400px; flex-shrink: 0;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
  display: flex; flex-direction: column; justify-content: center;
  padding: 48px 40px;
}
.login-brand { margin-bottom: 48px; }
.brand-icon {
  width: 56px; height: 56px; background: var(--primary); border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: #fff; margin-bottom: 16px;
}
.brand-name { font-size: 32px; font-weight: 800; color: #fff; display: block; margin-bottom: 6px; }
.brand-tagline { font-size: 15px; color: rgba(255,255,255,.5); line-height: 1.5; }
.login-features { display: flex; flex-direction: column; gap: 12px; }
.feature-item { display: flex; align-items: center; gap: 10px; font-size: 13px; color: rgba(255,255,255,.6); }
.feature-item i { color: var(--success); font-size: 14px; }

.login-right {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 32px; background: #f8fafc;
}
.login-card { width: 100%; max-width: 420px; }
.login-header { margin-bottom: 28px; }
.login-header h2 { font-size: 24px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.login-header p  { font-size: 14px; color: var(--text-muted); }

.login-form .form-group { margin-bottom: 18px; }
.login-footer { margin-top: 28px; text-align: center; font-size: 12px; color: var(--text-light); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .login-left { display: none; }
  .form-grid  { grid-template-columns: 1fr; }
  .grid-2     { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-wrapper { margin-left: 0; }
  .sidebar-toggle { display: flex; }
  .topbar-branch, .topbar-date { display: none; }
  .filter-row { flex-direction: column; }
  .filter-field { max-width: 100%; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .page-content { padding: 16px; }
}

/* ============================================================
   EXTENDED STYLES — All modules
   ============================================================ */

/* ── Mono badge (codes, IDs) ─────────────────────────────── */
.mono-badge {
  display: inline-block;
  font-family: var(--font-mono, 'JetBrains Mono', 'Courier New', monospace);
  font-size: 12px;
  font-weight: 600;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 2px 7px;
  color: #334155;
  letter-spacing: .02em;
}
.ml-auto { margin-left: auto; }
.ml-2    { margin-left: 8px;  }
.ml-1    { margin-left: 4px;  }
.mt-4    { margin-top: 16px;  }
.mb-0    { margin-bottom: 0;  }
.ps-3    { padding-left: 12px; }
.alert-info-alert { background: #e0f2fe; color: #075985; border: 1px solid #bae6fd; }

/* ── Grid 3 & 4 ──────────────────────────────────────────── */
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.grid-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 12px; }

/* ── Profile page layout ─────────────────────────────────── */
.profile-grid { display: grid; grid-template-columns: 1fr 280px; gap: 20px; align-items: start; }
.profile-main { }
.profile-side { }

/* ── Detail grid (show pages) ────────────────────────────── */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.detail-item { padding: 10px 0; border-bottom: 1px solid var(--border-light); }
.detail-item.detail-full { grid-column: 1 / -1; }
.detail-label { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin-bottom: 3px; }
.detail-value { font-size: 13px; color: var(--text); }

/* ── Info rows (sidebar cards) ───────────────────────────── */
.info-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border-light); font-size: 13px; gap: 8px; }
.info-row:last-child { border-bottom: none; }
.info-row > span:first-child { color: var(--text-muted); flex-shrink: 0; }
.info-row > span:last-child  { font-size: 12px; text-align: right; }
.total-row > span { font-weight: 700 !important; font-size: 14px !important; }

/* ── Profile avatar large ────────────────────────────────── */
.profile-avatar-lg {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700; margin: 0 auto;
}
.mx-auto { margin-left: auto; margin-right: auto; }

/* ── Tag lists ───────────────────────────────────────────── */
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 500;
}
.tag-warning { background: var(--warning-light); color: #92400e; }
.tag-danger  { background: var(--danger-light);  color: #991b1b; }

/* ── Test list (order create) ────────────────────────────── */
.test-list { max-height: 420px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.test-list::-webkit-scrollbar { width: 4px; }
.test-list::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.test-group-header {
  padding: 6px 12px; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-muted); background: var(--bg);
  border-bottom: 1px solid var(--border-light); position: sticky; top: 0;
}
.test-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; cursor: pointer;
  border-bottom: 1px solid var(--border-light);
  transition: background .1s;
}
.test-item:hover { background: #f0f9ff; }
.test-item input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); flex-shrink: 0; }
.test-item-info { flex: 1; }
.test-item-name { display: block; font-size: 13px; font-weight: 500; color: var(--text); }
.test-item-code { font-size: 11px; color: var(--text-muted); font-family: monospace; }
.test-item-fasting { font-size: 10px; color: var(--warning); margin-left: 6px; }
.test-item-price { font-size: 13px; font-weight: 600; color: var(--primary); white-space: nowrap; }

/* ── Order summary ───────────────────────────────────────── */
.selected-tests-list { min-height: 60px; }
.selected-test-row { display: flex; justify-content: space-between; font-size: 12px; padding: 5px 0; border-bottom: 1px solid var(--border-light); }
.divider-line { height: 1px; background: var(--border); margin: 10px 0; }
.summary-row { display: flex; justify-content: space-between; font-size: 13px; padding: 5px 0; }
.summary-row.total-row { font-weight: 700; font-size: 15px; border-top: 2px solid var(--border); margin-top: 4px; padding-top: 8px; }

/* ── Parameters (test create) ────────────────────────────── */
.param-row { border-bottom: 1px solid var(--border-light); }
.param-row:last-child { border-bottom: none; }
.param-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 20px; background: var(--bg); font-size: 12px; font-weight: 600;
  color: var(--text-muted); border-bottom: 1px solid var(--border-light);
}
.param-body { padding: 16px 20px; }
.p-0 { padding: 0; }

/* ── Result entry ────────────────────────────────────────── */
.row-abnormal { background: #fffbeb !important; }
.row-critical  { background: #fff1f2 !important; }
.text-abnormal { color: #d97706 !important; }
.text-critical  { color: #dc2626 !important; }
.result-input { width: 120px; }

/* ── Report status bar ───────────────────────────────────── */
.report-status-bar {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 20px;
  margin-bottom: 20px; display: flex;
  align-items: center; justify-content: space-between; gap: 16px;
}
.report-status-steps { display: flex; align-items: center; gap: 4px; }
.status-step { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0 16px; position: relative; }
.status-step::after { content: ''; position: absolute; right: -2px; top: 10px; width: 4px; height: 1px; background: var(--border); }
.status-step:last-child::after { display: none; }
.step-dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border); background: #fff; }
.status-step.active .step-dot { border-color: var(--primary); background: var(--primary); }
.status-step.done   .step-dot { border-color: var(--success); background: var(--success); }
.status-step span { font-size: 11px; color: var(--text-muted); }
.status-step.active span, .status-step.done span { color: var(--text); font-weight: 600; }

/* ── Btn success ─────────────────────────────────────────── */
.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-success:hover { background: #16a34a; border-color: #16a34a; color: #fff; }

/* ── Inventory ───────────────────────────────────────────── */
.btn-outline-sm { padding: 4px 8px; font-size: 11px; }

/* ── Responsive profile ──────────────────────────────────── */
@media (max-width: 900px) {
  .profile-grid { grid-template-columns: 1fr; }
  .detail-grid  { grid-template-columns: 1fr; }
  .grid-3       { grid-template-columns: 1fr; }
  .grid-4       { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .grid-4 { grid-template-columns: 1fr; }
}

/* ── Dashboard specific ──────────────────────────────────── */
.dash-grid { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }

.quick-alerts { display: flex; flex-direction: column; gap: 8px; }
.quick-alert {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: 13px; text-decoration: none; transition: opacity .15s;
  border: 1px solid transparent;
}
.quick-alert:hover { opacity: .85; }
.quick-alert i:first-child { font-size: 16px; flex-shrink: 0; }
.quick-alert-warning { background: var(--warning-light); color: #92400e; border-color: #fde68a; }
.quick-alert-info    { background: #e0f2fe; color: #075985; border-color: #bae6fd; }
.quick-alert-danger  { background: var(--danger-light);  color: #991b1b; border-color: #fecaca; }

.approval-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 16px; border-bottom: 1px solid var(--border-light);
  gap: 10px;
}
.approval-row:last-child { border-bottom: none; }

@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }

/* ── Typography refinements (Plus Jakarta Sans) ──────────── */
h1, h2, h3, h4, h5, h6 { letter-spacing: -0.02em; }
.page-heading    { font-weight: 800; letter-spacing: -0.03em; }
.card-title      { font-weight: 700; letter-spacing: -0.01em; }
.logo-name       { letter-spacing: -0.04em; font-weight: 800; }
.brand-name      { letter-spacing: -0.04em; font-weight: 900; }
.stat-value      { letter-spacing: -0.04em; font-weight: 800; }
.fw-medium       { font-weight: 600; }
.sidebar-nav .nav-link { font-weight: 500; letter-spacing: -0.01em; }
.btn             { font-weight: 600; letter-spacing: -0.01em; }
.form-label      { letter-spacing: 0.04em; }
.nav-section-label { letter-spacing: 0.1em; }
.badge           { letter-spacing: 0.01em; }
.table th        { letter-spacing: 0.06em; }

/* ── Quick action buttons (dashboard) ───────────────────── */
.quick-action-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 12px 8px; border-radius: var(--radius-sm);
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 11px; font-weight: 600;
  text-decoration: none; transition: all .15s; text-align: center;
}
.quick-action-btn i { font-size: 18px; color: var(--primary); }
.quick-action-btn:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
.quick-action-btn:hover i { color: var(--primary-dark); }

/* ── mb-4 utility ────────────────────────────────────────── */
.mb-4 { margin-bottom: 16px; }
