:root {
  --mi-primary: #0d6efd;
  --mi-sidebar: #0b1220;
  --mi-sidebar-border: rgba(148, 163, 184, 0.12);
  --mi-sidebar-hover: #151f32;
  --mi-accent: #06b6d4;
  --mi-card-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  --mi-topbar-h: 64px;
}
body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
  background: #f1f5f9;
  color: #0f172a;
}
.navbar-landing { backdrop-filter: blur(8px); background: rgba(15, 23, 42, 0.92) !important; }
.hero-gradient {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 45%, #0e7490 100%);
}
.card-soft {
  border: none;
  box-shadow: var(--mi-card-shadow);
  border-radius: 12px;
  background: #fff;
}
.stat-card { border-left: 4px solid var(--mi-accent); }
.sidebar-admin {
  /* Lock to viewport so overflow-y creates a scrollbar (long nav stays reachable). */
  height: 100vh;
  max-height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  min-height: 0;
  background: var(--mi-sidebar);
  color: #e2e8f0;
  width: 274px;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1040;
  padding: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  border-right: 1px solid var(--mi-sidebar-border);
}
.sidebar-admin .brand-block {
  padding: 1.1rem 1.15rem;
  border-bottom: 1px solid var(--mi-sidebar-border);
}
.sidebar-admin .brand-block .product-name {
  font-size: 1.02rem;
  letter-spacing: -0.02em;
}
.sidebar-admin .nav-section-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #64748b;
  padding: 1rem 1.15rem 0.35rem;
  font-weight: 600;
}
.sidebar-admin a.nav-link {
  color: #94a3b8;
  border-radius: 8px;
  margin: 1px 10px;
  padding: 0.45rem 0.65rem;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.sidebar-admin a.nav-link i { font-size: 1rem; opacity: 0.85; }
.sidebar-admin a.nav-link:hover {
  background: var(--mi-sidebar-hover);
  color: #f8fafc;
}
.sidebar-admin a.nav-link.active {
  background: linear-gradient(90deg, rgba(6, 182, 212, 0.18), transparent);
  color: #fff;
  border-left: 3px solid var(--mi-accent);
  margin-left: 7px;
  padding-left: calc(0.65rem - 3px);
}
.main-with-sidebar {
  margin-left: 274px;
  min-height: 100vh;
}
.admin-shell { min-height: 100vh; }
.topbar {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  min-height: var(--mi-topbar-h);
  padding: 0.65rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 1020;
}
.admin-page-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
}
.admin-breadcrumb {
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.table thead th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  font-weight: 600;
  border-bottom-width: 1px;
  background: #f8fafc;
  white-space: nowrap;
}
.table tbody td { vertical-align: middle; }
.table-hover tbody tr:hover { background-color: rgba(13, 110, 253, 0.04); }
.btn-brand {
  background: linear-gradient(135deg, #0d6efd, #0891b2);
  border: none;
  color: #fff;
}
.btn-brand:hover { color: #fff; filter: brightness(1.05); }
.detail-card .card-header {
  background: linear-gradient(90deg, #f8fafc, #fff);
  border-bottom: 1px solid #e2e8f0;
  font-weight: 600;
  font-size: 0.9rem;
}
.page-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.landing-feature-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  color: #fff;
}
.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: #64748b;
}
.btn-staff-brand {
  background: linear-gradient(135deg, #059669, #0d9488);
  border: none;
  color: #fff;
}
.btn-staff-brand:hover { color: #fff; filter: brightness(1.06); }
.staff-shell { min-height: 100vh; }
.sidebar-staff {
  height: 100vh;
  max-height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  min-height: 0;
  background: var(--mi-sidebar);
  color: #e2e8f0;
  width: 268px;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1040;
  padding: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  border-right: 1px solid rgba(16, 185, 129, 0.22);
}
.sidebar-staff .brand-block {
  padding: 1.1rem 1.15rem;
  border-bottom: 1px solid var(--mi-sidebar-border);
}
.sidebar-staff .nav-section-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #64748b;
  padding: 1rem 1.15rem 0.35rem;
  font-weight: 600;
}
.sidebar-staff a.nav-link {
  color: #94a3b8;
  border-radius: 8px;
  margin: 1px 10px;
  padding: 0.45rem 0.65rem;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.sidebar-staff a.nav-link i { font-size: 1rem; opacity: 0.85; }
.sidebar-staff a.nav-link:hover {
  background: var(--mi-sidebar-hover);
  color: #f8fafc;
}
.sidebar-staff a.nav-link.active {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.22), transparent);
  color: #fff;
  border-left: 3px solid #10b981;
  margin-left: 7px;
  padding-left: calc(0.65rem - 3px);
}
.staff-main-with-sidebar {
  margin-left: 268px;
  min-height: 100vh;
}
@media print {
  .no-print { display: none !important; }
}
@media (max-width: 991px) {
  .sidebar-admin,
  .sidebar-staff {
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }
  .sidebar-admin.show,
  .sidebar-staff.show { transform: translateX(0); }
  .main-with-sidebar,
  .staff-main-with-sidebar { margin-left: 0; }
}
