/**
 * SIM Lab - Admin Layout
 * Bootstrap 5.3 + tema modern, responsive
 */

:root {
  --bs-primary: #16a34a;
  --bs-primary-rgb: 22, 163, 74;
  --admin-sidebar-width: 228px;
  --admin-sidebar-bg: #1e293b;
  --admin-sidebar-text: rgba(255, 255, 255, 0.85);
  --admin-sidebar-hover: rgba(255, 255, 255, 0.1);
  --admin-sidebar-active: #16a34a;
  --admin-primary: #16a34a;
  --admin-primary-dark: #15803d;
  --admin-navbar-height: 56px;
  --admin-content-bg: #f8fafc;
  --admin-card-radius: 12px;
  --admin-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  --admin-shadow-lg: 0 10px 40px -10px rgba(0, 0, 0, 0.1);
}

/* ---- Body & layout ---- */
.admin-body {
  min-height: 100vh;
  background: var(--admin-content-bg);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

.admin-main {
  margin-left: var(--admin-sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.2s ease;
}

@media (max-width: 991.98px) {
  .admin-main {
    margin-left: 0;
  }
}

/* ---- Sidebar (desktop) ---- */
.admin-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--admin-sidebar-width);
  height: 100vh;
  background: var(--admin-sidebar-bg);
  color: var(--admin-sidebar-text);
  display: flex;
  flex-direction: column;
  z-index: 1030;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, width 0.2s ease;
}

@media (max-width: 991.98px) {
  .admin-sidebar {
    display: none;
  }
}

.sidebar-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--admin-navbar-height);
}

/* ---- Sidebar brand: logo + nama aplikasi (sama seperti halaman login) ---- */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.sidebar-brand:hover {
  color: #fff;
  opacity: 0.95;
}

.sidebar-brand-logo-wrap {
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

.sidebar-brand-img {
  height: 100%;
  width: 100%;
  object-fit: contain;
  display: block;
}

.sidebar-brand-fallback {
  position: absolute;
  inset: 0;
  display: flex !important;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.25rem;
}

.sidebar-brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.1rem;
  line-height: 1.2;
  min-width: 0;
  flex: 1;
}

.sidebar-brand-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.sidebar-brand-subtitle {
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.82);
  white-space: normal;
}

/* Legacy single-line (jika masih dipakai di tempat lain) */
.sidebar-brand-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-offcanvas .offcanvas-header .sidebar-brand {
  margin-right: auto;
}

/* ---- Brand logo (konsisten di halaman lain) ---- */
.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: #0f172a;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.brand-logo:hover {
  color: #0f172a;
}

.brand-logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.brand-logo-text {
  letter-spacing: -0.02em;
}

.brand-logo-sm .brand-logo-icon {
  width: 32px;
  height: 32px;
  font-size: 1.1rem;
}

.brand-logo-sm .brand-logo-text {
  font-size: 1.05rem;
}

.brand-logo-wrap {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #22c55e, #16a34a);
}
.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.brand-logo-fallback {
  color: #fff;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-logo-sm .brand-logo-wrap {
  width: 32px;
  height: 32px;
}
.brand-logo-sm .brand-logo-fallback { font-size: 1.1rem; }

/* Logo di sidebar/offcanvas (background gelap) */
.admin-sidebar .brand-logo,
.admin-offcanvas .brand-logo {
  color: #fff;
}

.admin-sidebar .brand-logo:hover,
.admin-offcanvas .brand-logo:hover {
  color: #fff;
  opacity: 0.95;
}

.admin-sidebar .brand-logo-icon,
.admin-offcanvas .brand-logo-icon {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
}

.sidebar-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0.5rem 0;
  -webkit-overflow-scrolling: touch;
}

.sidebar-menu-list {
  margin: 0;
  padding: 0 0.35rem;
  list-style: none;
}

.sidebar-nav .nav-link {
  color: var(--admin-sidebar-text);
  padding: 0.5rem 0.85rem;
  margin: 0 0.2rem 0.1rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.9rem;
  min-height: 40px;
  box-sizing: border-box;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}

.sidebar-nav .nav-link i {
  font-size: 1.15rem;
  opacity: 0.9;
  width: 1.5rem;
  min-width: 1.5rem;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-nav .nav-link span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-nav .nav-link:hover {
  background: var(--admin-sidebar-hover);
  color: #fff;
}

.sidebar-nav .nav-link.active {
  background: var(--admin-sidebar-active);
  color: #fff;
}

.sidebar-nav .nav-link:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

/* Main menu group (toggle) */
.sidebar-menu-group {
  cursor: pointer;
  position: relative;
}
.sidebar-menu-group .bi-chevron-down {
  margin-left: auto;
  font-size: 0.75rem;
  opacity: 0.8;
  transition: transform 0.2s ease;
}
.sidebar-menu-group:not(.collapsed) .bi-chevron-down {
  transform: rotate(180deg);
}
.sidebar-menu-group.active-parent {
  background: var(--admin-sidebar-hover);
  color: #fff;
}

/* Submenu (collapse) */
.sidebar-submenu-wrap {
  padding-left: 0.35rem;
  margin-left: 1.15rem;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}
.sidebar-submenu {
  list-style: none;
  padding: 0.2rem 0 0.4rem 0.45rem;
  margin: 0;
}
/* Label kelompok di dalam submenu (Master, Alat, Bahan, …) */
.sidebar-nav-heading {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  padding: 0.65rem 0.75rem 0.3rem 1rem;
  margin: 0;
  list-style: none;
}
.sidebar-submenu > .sidebar-nav-heading:first-child {
  padding-top: 0.2rem;
}
.sidebar-submenu .nav-link {
  padding: 0.35rem 0.65rem;
  font-size: 0.8125rem;
  min-height: 34px;
  padding-left: 0.85rem;
}
.sidebar-submenu .nav-link i {
  font-size: 1rem;
  width: 1.25rem;
  min-width: 1.25rem;
}

.sidebar-footer {
  flex-shrink: 0;
  padding: 0.55rem 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-footer .nav-link,
.sidebar-footer-link {
  color: rgba(255, 255, 255, 0.6);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
}

.sidebar-footer .nav-link:hover,
.sidebar-footer-link:hover {
  color: #fff;
  background: var(--admin-sidebar-hover);
}

.sidebar-footer .nav-link:focus-visible,
.sidebar-footer-link:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.4);
  outline-offset: 2px;
}

/* ---- Offcanvas (mobile sidebar) ---- */
.admin-offcanvas {
  width: var(--admin-sidebar-width) !important;
  background: var(--admin-sidebar-bg);
  color: var(--admin-sidebar-text);
}

.admin-offcanvas .offcanvas-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0;
}

.admin-offcanvas .sidebar-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.admin-offcanvas .sidebar-footer {
  flex-shrink: 0;
}

.admin-offcanvas .btn-close {
  filter: invert(1);
  opacity: 0.7;
}

.admin-offcanvas .sidebar-nav .nav-link {
  color: var(--admin-sidebar-text);
}

.admin-offcanvas .sidebar-nav .nav-link.active {
  background: var(--admin-sidebar-active);
  color: #fff;
}

/* ---- Top navbar (modern, responsive) ---- */
.admin-navbar {
  min-height: var(--admin-navbar-height);
  height: auto;
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding: 0.5rem 1rem 0.625rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  position: sticky;
  top: 0;
  z-index: 1020;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s ease;
}

.admin-navbar::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(22, 163, 74, 0.35) 0%, rgba(22, 163, 74, 0.08) 45%, transparent 85%);
  pointer-events: none;
}

@media (min-width: 768px) {
  .admin-navbar {
    padding: 0.625rem 1.5rem 0.75rem;
  }
}

.admin-navbar-left {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: 0;
  flex: 1;
}

.admin-navbar-toggler {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #475569;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  align-self: center;
  flex-shrink: 0;
}

.admin-navbar-toggler:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #0f172a;
}

.admin-navbar-toggler:focus-visible {
  outline: 2px solid var(--admin-primary);
  outline-offset: 2px;
}

.admin-navbar-heading {
  min-width: 0;
  margin: 0;
  padding: 0.35rem 0.7rem 0.45rem;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: linear-gradient(165deg, rgba(248, 250, 252, 0.95) 0%, rgba(255, 255, 255, 0.88) 100%);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

@media (min-width: 768px) {
  .admin-navbar-heading {
    padding: 0.4rem 0.85rem 0.5rem;
  }
}

.admin-page-subtitle {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #64748b;
  line-height: 1.4;
  margin: 0 0 0.3rem;
}

.admin-page-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.03em;
  line-height: 1.3;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
}

.admin-page-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: rgba(22, 163, 74, 0.12);
  color: var(--admin-primary);
  font-size: 0.8rem;
  flex-shrink: 0;
}

.admin-page-title-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 576px) {
  .admin-page-title {
    font-size: 1.15rem;
  }
}

@media (min-width: 768px) {
  .admin-page-title {
    font-size: 1.25rem;
  }
}

.admin-navbar-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  align-self: center;
}

.admin-navbar-lab {
  max-width: min(100%, 28rem);
  margin-top: 0.25rem;
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.35;
}

/* User trigger: avatar + name + chevron */
.admin-user-trigger {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.375rem 0.5rem 0.375rem 0.75rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.03);
  color: #0f172a;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.admin-user-trigger:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #0f172a;
}

.admin-user-trigger:focus-visible {
  outline: none;
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

.admin-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--admin-primary), var(--admin-primary-dark));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 700;
  flex-shrink: 0;
}

.admin-user-avatar-sm {
  width: 32px;
  height: 32px;
  font-size: 0.75rem;
}

.admin-user-meta {
  display: none;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  min-width: 0;
}

@media (min-width: 576px) {
  .admin-user-meta {
    display: flex;
  }
}

.admin-user-name {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.admin-user-role {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  line-height: 1.2;
}

.admin-user-chevron {
  font-size: 0.75rem;
  color: #94a3b8;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.admin-user-trigger[aria-expanded="true"] .admin-user-chevron {
  transform: rotate(180deg);
}

/* Dropdown menu */
.admin-navbar .admin-user-menu {
  min-width: 220px;
  padding: 0.5rem;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.15);
  margin-top: 0.5rem;
}

.admin-navbar .admin-user-menu .dropdown-header {
  background: transparent;
  border-radius: 8px;
}

.admin-navbar .admin-user-menu .dropdown-item {
  border-radius: 8px;
  font-size: 0.9375rem;
}

.admin-navbar .admin-user-menu .dropdown-item:hover {
  background: rgba(22, 163, 74, 0.08);
  color: var(--admin-primary-dark);
}

.admin-navbar .admin-user-menu .dropdown-item i {
  opacity: 0.85;
}

/* ---- Main content ---- */
.admin-content {
  flex: 1;
  padding: 1.125rem;
}

@media (min-width: 768px) {
  .admin-content {
    padding: 1.35rem 1.5rem 1.35rem;
  }
}

.admin-content-inner {
  max-width: 1400px;
  margin: 0 auto;
  min-width: 0;
}

/* ---- Footer admin (konsisten di semua halaman) ---- */
.admin-footer {
  flex-shrink: 0;
  padding: 0.55rem 1.15rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
  color: #64748b;
  font-size: 0.8125rem;
}

@media (min-width: 768px) {
  .admin-footer {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

.admin-footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.admin-footer-copy {
  color: #64748b;
}

.admin-footer-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.admin-footer-link {
  color: #64748b;
  text-decoration: none;
}

.admin-footer-link:hover {
  color: var(--admin-primary);
}

.admin-footer-sep {
  color: rgba(0, 0, 0, 0.2);
  user-select: none;
}

.admin-footer-developer {
  color: #64748b;
}

.admin-footer-developer a {
  color: inherit;
  text-decoration: none;
}

.admin-footer-developer a:hover {
  color: var(--admin-primary);
  text-decoration: underline;
}

@media (max-width: 575.98px) {
  .admin-footer-inner {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
}

.admin-page-toolbar {
  margin-bottom: 1rem;
}

/* ---- Banner (optional, untuk dashboard welcome) ---- */
.admin-banner {
  border-radius: var(--admin-card-radius);
  overflow: hidden;
  box-shadow: var(--admin-shadow);
}

.admin-banner .card,
.admin-banner .iq-navbar-header {
  border-radius: var(--admin-card-radius);
}

/* ---- Card modern ---- */
.admin-content .card {
  border: none;
  border-radius: var(--admin-card-radius);
  box-shadow: var(--admin-shadow);
}

.admin-content .card-header {
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  font-weight: 600;
  padding: 1rem 1.25rem;
  border-radius: var(--admin-card-radius) var(--admin-card-radius) 0 0;
}

/* ---- Table ---- */
.admin-content .table {
  font-size: 0.9375rem;
}

.admin-content .table thead th {
  font-weight: 600;
  color: #475569;
  text-transform: none;
  border-bottom-width: 1px;
}

.admin-content .table-hover tbody tr:hover {
  background: rgba(22, 163, 74, 0.06);
}

/* ---- Buttons ---- */
.admin-content .btn {
  font-weight: 500;
  border-radius: 8px;
}

.admin-content .btn-primary {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border: none;
}

.admin-content .btn-primary:hover {
  background: linear-gradient(135deg, #16a34a, #15803d);
  border: none;
  filter: brightness(1.05);
}

/* ---- Forms ---- */
.admin-content .form-control,
.admin-content .form-select {
  border-radius: 8px;
  border-color: #e2e8f0;
}

.admin-content .form-control:focus,
.admin-content .form-select:focus {
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

/* ---- Alerts ---- */
.admin-content .alert {
  border: none;
  border-radius: 10px;
}

/* ---- Pagination ---- */
.admin-content .pagination .page-link {
  border-radius: 8px;
  margin: 0 2px;
}

/* Pagination admin: ikon panah + nomor halaman (override vendor) */
.admin-pagination-ui .page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.35rem;
  padding: 0.4rem 0.55rem;
  font-weight: 500;
  color: #334155;
  border-color: #e2e8f0;
}
.admin-pagination-ui .page-item.active .page-link {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border-color: #16a34a;
  color: #fff;
  box-shadow: 0 2px 6px rgba(22, 163, 74, 0.35);
}
.admin-pagination-ui .page-item:not(.active):not(.disabled) .page-link:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}
.admin-pagination-ui .page-item.disabled .page-link {
  color: #94a3b8;
  background: #f8fafc;
  border-color: #e2e8f0;
}
.admin-pagination-ui .page-link .bi {
  font-size: 1.1rem;
  line-height: 1;
}

/* ---- Badge ---- */
.admin-content .badge {
  font-weight: 500;
  padding: 0.35em 0.65em;
  border-radius: 6px;
}

/* ========== Admin Tables (modern layout: stats, filter, table, modals) ========== */
.admin-table-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.admin-table-stat-card { background: #fff; border-radius: 12px; padding: 1rem 1.25rem; box-shadow: 0 1px 3px rgba(0,0,0,.06); border: 1px solid rgba(0,0,0,.06); transition: box-shadow .2s, transform .2s; }
.admin-table-stat-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); transform: translateY(-1px); }
.admin-table-stat-value { font-size: 1.5rem; font-weight: 700; color: #0f172a; line-height: 1.2; }
.admin-table-stat-label { font-size: .8125rem; color: #64748b; margin-top: .25rem; }
.admin-table-stat-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; margin-bottom: .5rem; }
.admin-table-stat-icon.primary { background: linear-gradient(135deg, #dbeafe, #93c5fd); color: #1d4ed8; }
.admin-table-stat-icon.success { background: linear-gradient(135deg, #d1fae5, #6ee7b7); color: #047857; }
.admin-table-filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem; margin-bottom: 1rem; }
.admin-table-filter .form-label { font-size: .8125rem; margin-bottom: .25rem; }
.admin-table-filter .search-input-wrap { min-width: 200px; max-width: 280px; }
.admin-table-filter .per-page-wrap { min-width: 120px; }
.admin-table-filter .per-page-wrap select { cursor: pointer; }
.admin-table-info { font-size: .875rem; color: #64748b; margin-bottom: 1rem; }
.admin-table-modern { margin: 0; }
.admin-table-modern thead th { font-weight: 600; font-size: .8125rem; text-transform: uppercase; letter-spacing: .03em; color: #475569; background: #f8fafc; padding: .875rem 1rem; border-bottom: 1px solid #e2e8f0; white-space: nowrap; }
.admin-table-modern thead th:first-child { padding-left: 1.25rem; }
.admin-table-modern thead th:last-child { padding-right: 1.25rem; text-align: right; }
.admin-table-modern tbody tr { transition: background .15s; }
.admin-table-modern tbody tr:hover { background: #f8fafc; }
.admin-table-modern tbody td { padding: .875rem 1rem; vertical-align: middle; border-bottom: 1px solid #f1f5f9; }
.admin-table-modern tbody td:first-child { padding-left: 1.25rem; }
.admin-table-modern tbody td:last-child { padding-right: 1.25rem; text-align: right; }
.admin-table-modern .code-badge { display: inline-flex; align-items: center; font-family: ui-monospace, monospace; font-size: .8125rem; font-weight: 600; padding: .25rem .5rem; border-radius: 6px; background: #e0f2fe; color: #0369a1; }
.admin-table-modern .name-cell { font-weight: 500; color: #0f172a; }
.admin-table-modern .desc-cell { color: #64748b; font-size: .9375rem; }
.admin-table-actions { display: inline-flex; align-items: center; gap: .35rem; }
.admin-table-actions .btn { padding: .35rem .5rem; border-radius: 8px; }
.admin-table-empty { text-align: center; padding: 3rem 1.5rem; color: #64748b; }
.admin-table-empty-icon { font-size: 3rem; opacity: .5; margin-bottom: 1rem; }
.admin-table-pagination { margin-top: 1.5rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; }
.admin-modal-form .modal-dialog { max-width: 500px; }
.admin-modal-form .modal-content { border: none; border-radius: 16px; box-shadow: 0 25px 50px -12px rgba(0,0,0,.25); overflow: hidden; }
.admin-modal-form .modal-header { border-bottom: 1px solid #e2e8f0; padding: 1.25rem 1.5rem; background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%); }
.admin-modal-form .modal-title { font-weight: 700; font-size: 1.125rem; color: #0f172a; display: flex; align-items: center; gap: .5rem; }
.admin-modal-form .modal-title .modal-title-icon { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; }
.admin-modal-form .modal-header.modal-tambah .modal-title-icon { background: linear-gradient(135deg, #dbeafe, #93c5fd); color: #1d4ed8; }
.admin-modal-form .modal-header.modal-edit .modal-title-icon { background: linear-gradient(135deg, #fef3c7, #fcd34d); color: #b45309; }
.admin-modal-form .modal-body { padding: 1.5rem; }
.admin-modal-form .form-label { font-weight: 500; color: #374151; }
.admin-modal-form .modal-footer { border-top: 1px solid #e2e8f0; padding: 1rem 1.5rem; background: #fafafa; gap: .5rem; }
.admin-modal-form .btn-close { filter: none; opacity: .7; }

/* ========== Profile page ========== */
.profile-hero { background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%); border-radius: 14px; padding: 1.35rem 1.5rem; color: #fff; margin-bottom: 1.25rem; position: relative; overflow: hidden; }
.profile-hero::before { content: ''; position: absolute; top: -50%; right: -20%; width: 60%; height: 200%; background: radial-gradient(circle, rgba(255,255,255,.08) 0%, transparent 70%); pointer-events: none; }
.profile-hero-inner { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; }
.profile-avatar-wrap { width: 80px; height: 80px; border-radius: 16px; background: linear-gradient(135deg, #22c55e, #16a34a); display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 700; color: #fff; flex-shrink: 0; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.profile-hero-info { min-width: 0; }
.profile-hero-name { font-size: 1.5rem; font-weight: 700; margin-bottom: .25rem; }
.profile-hero-role { display: inline-block; font-size: .8125rem; padding: .25rem .65rem; border-radius: 20px; background: rgba(255,255,255,.2); color: rgba(255,255,255,.95); text-transform: capitalize; }
.profile-card { border: none; border-radius: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.06); overflow: hidden; margin-bottom: 1.5rem; }
.profile-card .card-header { border: none; padding: 1.25rem 1.5rem; background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%); font-weight: 600; font-size: 1rem; color: #0f172a; display: flex; align-items: center; gap: .5rem; }
.profile-card .card-header .profile-card-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1rem; }
.profile-card .card-header .profile-card-icon.profile { background: linear-gradient(135deg, #dbeafe, #93c5fd); color: #1d4ed8; }
.profile-card .card-header .profile-card-icon.security { background: linear-gradient(135deg, #fef3c7, #fcd34d); color: #b45309; }
.profile-card .card-body { padding: 1.5rem; }
.profile-card .form-label { font-weight: 500; color: #374151; }
.profile-card .form-control { border-radius: 10px; border-color: #e2e8f0; }
.profile-card .form-control:focus { border-color: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,.15); }
.profile-divider { border: none; margin: 1.5rem 0; height: 1px; background: linear-gradient(90deg, transparent, #e2e8f0, transparent); }
.profile-password-note { font-size: .875rem; color: #64748b; margin-bottom: 1rem; padding: .75rem 1rem; border-radius: 10px; background: #f8fafc; border-left: 3px solid #94a3b8; }
.profile-submit { border-radius: 10px; padding: .5rem 1.25rem; font-weight: 600; }
.hover-shadow:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); border-color: #e2e8f0 !important; }

/* ========== Dashboard Superadmin ========== */
.dashboard-hero-super {
  background: linear-gradient(135deg, #4c1d95 0%, #3730a3 35%, #1e1b4b 70%, #0f172a 100%);
  border-radius: 18px;
  padding: 1.25rem 1.4rem;
  color: #fff;
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 40px -12px rgba(76, 29, 149, 0.45);
}
.dashboard-hero-super::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -15%;
  width: 55%;
  height: 180%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.25) 0%, transparent 65%);
  pointer-events: none;
}
.dashboard-hero-super-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
}
.dashboard-super-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 0.65rem;
}
.dashboard-hero-super .dashboard-super-title {
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
  font-weight: 700;
  margin-bottom: 0.35rem;
  line-height: 1.25;
}
.dashboard-hero-super .dashboard-super-lead {
  font-size: 0.9rem;
  opacity: 0.88;
  max-width: 36rem;
  margin-bottom: 0;
}
.dashboard-super-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem;
  min-width: min(100%, 380px);
  flex: 1;
}
.dashboard-super-kpi {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  text-align: center;
  transition: background 0.2s;
}
.dashboard-super-kpi:hover {
  background: rgba(255, 255, 255, 0.14);
}
.dashboard-super-kpi-value {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.dashboard-super-kpi-label {
  font-size: 0.7rem;
  opacity: 0.85;
  margin-top: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.dashboard-super-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.dashboard-super-actions .btn-light {
  color: #312e81;
  font-weight: 600;
  border: none;
}
.dashboard-super-actions .btn-outline-light {
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}
.dashboard-super-actions .btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.dashboard-super-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  margin-bottom: 0.75rem;
}
.dashboard-super-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}
.dashboard-super-role-card {
  border-radius: 12px;
  padding: 1rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: box-shadow 0.2s, transform 0.2s;
}
.dashboard-super-role-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}
.dashboard-super-role-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.dashboard-super-role-count {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.dashboard-super-role-name {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 0.15rem;
}
.dashboard-super-snapshot {
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #fafafa 0%, #fff 100%);
  padding: 1.25rem 1.5rem;
  height: 100%;
}
.dashboard-super-snapshot-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.9rem;
}
.dashboard-super-snapshot-row:last-child {
  border-bottom: none;
}
.dashboard-super-users-table {
  font-size: 0.875rem;
}
.dashboard-super-users-table th {
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
}
@media (max-width: 575.98px) {
  .dashboard-hero-super {
    padding: 1.25rem 1.15rem;
  }
  .dashboard-super-kpis {
    width: 100%;
    min-width: 0;
  }
}

/* ========== Dashboard page (modern responsive layout) ========== */
.dashboard-page {
  --dash-stat-min: 138px;
  max-width: 100%;
}
.dashboard-section {
  margin-bottom: 0.15rem;
}
.dashboard-section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid #e2e8f0;
}
.dashboard-section-header.border-0 {
  border-bottom: none;
  padding-bottom: 0;
}
.dashboard-section-title {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #64748b;
  margin: 0;
  line-height: 1.3;
}
.dashboard-section-desc {
  font-size: 0.8125rem;
  color: #94a3b8;
  line-height: 1.45;
  max-width: 36rem;
}
.dashboard-page .admin-table-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--dash-stat-min)), 1fr));
  gap: 0.75rem 1rem;
  margin-bottom: 1.35rem;
}
@media (min-width: 576px) {
  .dashboard-page {
    --dash-stat-min: 152px;
  }
}
@media (min-width: 1200px) {
  .dashboard-page {
    --dash-stat-min: 170px;
  }
}
.dashboard-page .admin-table-stat-card {
  border-radius: 14px;
  padding: 1rem 1.05rem 1.1rem;
  min-height: 7.25rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 6px 20px -8px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.dashboard-page a.admin-table-stat-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 4px 8px rgba(15, 23, 42, 0.05),
    0 16px 32px -12px rgba(15, 23, 42, 0.14);
  border-color: #cbd5e1;
}
.dashboard-page .admin-table-stat-value {
  font-size: clamp(1.3rem, 3.2vw, 1.65rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.dashboard-page .admin-table-stat-label {
  font-weight: 600;
  color: #475569;
  font-size: 0.78rem;
  margin-top: 0.15rem;
}
.dashboard-page .admin-table-stat-icon {
  margin-bottom: 0.45rem;
  width: 42px;
  height: 42px;
  border-radius: 11px;
}
.dashboard-page .admin-table-stat-card .small.text-muted.mt-1 {
  margin-top: auto !important;
  padding-top: 0.35rem;
  line-height: 1.25;
  font-size: 0.7rem;
}
.dashboard-page .dash-tile {
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
  height: 100%;
}
.dashboard-page .dash-tile:hover {
  border-color: #cbd5e1;
  box-shadow: 0 10px 28px -12px rgba(15, 23, 42, 0.12);
  transform: translateY(-2px);
}
.dashboard-page a.dashboard-feed-link {
  transition: background-color 0.15s ease;
}
.dashboard-page a.dashboard-feed-link:hover {
  background-color: #f8fafc;
}
.dashboard-admin-hero {
  background: linear-gradient(135deg, #0c4a6e 0%, #0f172a 50%, #14532d 100%);
  box-shadow: 0 12px 36px -16px rgba(12, 74, 110, 0.45);
}
.dashboard-super-snapshot-row {
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
}
.dashboard-super-snapshot-row > span.text-secondary {
  flex: 1 1 12rem;
  min-width: 0;
}
@media (min-width: 992px) {
  .dashboard-page .dashboard-sidebar-sticky {
    position: sticky;
    top: 0.75rem;
    align-self: flex-start;
  }
}
@media (max-width: 575.98px) {
  .dashboard-section-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .dashboard-section-header .dashboard-section-desc.text-end {
    text-align: left !important;
    margin-left: 0 !important;
  }
}

/* Dashboard v2 — metric bands & superadmin blocks */
.dashboard-page .dashboard-section-title {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
}
.dashboard-page .dashboard-section-header {
  border-bottom: none;
  margin-bottom: 0.5rem;
  padding-bottom: 0;
}
.dashboard-page .dashboard-section-header::after {
  content: '';
  display: block;
  width: 2.5rem;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #16a34a, #3b82f6);
  margin-top: 0.35rem;
}
.dash-super-block {
  margin-bottom: 1.25rem;
}
.dash-super-block .dashboard-super-snapshot {
  border: 1px solid #e2e8f0;
  background: #fff;
  padding: 1rem 1.15rem;
}
.dash-super-block .dashboard-super-role-card {
  border: 1px solid #e2e8f0;
  background: #fff;
}
.dashboard-page .profile-card.card {
  border-radius: 16px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 8px 24px -6px rgba(15, 23, 42, 0.1);
  overflow: hidden;
}
.dashboard-page .profile-card .card-header {
  background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
  border-bottom: 1px solid #f1f5f9;
  padding: 0.85rem 1rem;
}

/* ========== Member layout (Mahasiswa / Dosen) ========== */
.member-body { background: #f1f5f9; }
.member-navbar { background: #fff !important; box-shadow: 0 1px 3px rgba(0,0,0,.06); padding: .5rem 0; }
.member-navbar .navbar-brand { font-weight: 700; color: #0f172a; }
.member-navbar .navbar-nav { flex-wrap: nowrap; }
.member-navbar .nav-link { color: #475569 !important; font-size: .875rem; padding: .45rem .7rem !important; border-radius: 10px; white-space: nowrap; }
.member-navbar .nav-link:hover { color: #0f172a !important; background: #f1f5f9; }
.member-navbar .nav-link.active { color: #fff !important; background: linear-gradient(135deg, #22c55e, #16a34a) !important; font-weight: 600; }
.member-navbar .nav-link i { opacity: .9; }
.member-navbar .nav-link.dropdown-toggle::after { margin-left: .3rem; vertical-align: 0.12em; }
.member-navbar .dropdown-menu.member-navbar-dropdown {
  min-width: 14rem;
  padding: .4rem;
  margin-top: .35rem !important;
  border-radius: 12px;
  box-shadow: 0 12px 40px -12px rgba(15, 23, 42, 0.2);
}
.member-navbar .member-navbar-dropdown .dropdown-item {
  display: flex;
  align-items: center;
  gap: .25rem;
  padding: .45rem .75rem;
  font-size: .875rem;
  border-radius: 8px;
  color: #334155;
}
.member-navbar .member-navbar-dropdown .dropdown-item:hover { background: #f1f5f9; color: #0f172a; }
.member-navbar .member-navbar-dropdown .dropdown-item.active {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
  font-weight: 600;
}
.member-navbar .member-navbar-dropdown .dropdown-divider { border-color: rgba(15, 23, 42, 0.08); opacity: 1; }
.member-offcanvas-section-label {
  padding: 1rem 1.25rem 0.35rem;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.45);
}
.member-offcanvas-section-label:first-of-type { padding-top: 0.5rem; }
.member-main { max-width: 1200px; margin: 0 auto; }
.member-page-header { margin-bottom: 1.5rem; }
.member-page-header h1, .member-page-header .member-page-title { font-size: 1.375rem; font-weight: 700; color: #0f172a; margin-bottom: .25rem; }
.member-page-header .member-page-desc { font-size: .9375rem; color: #64748b; margin-bottom: 0; }
.member-card { border: none; border-radius: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.06); overflow: hidden; background: #fff; }
.member-card .card-header { border: none; padding: 1rem 1.25rem; background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%); font-weight: 600; font-size: .9375rem; color: #0f172a; }
.member-card .card-body { padding: 1.25rem 1.5rem; }
.member-card .form-label { font-weight: 500; color: #374151; }
.member-card .form-control,
.member-card .form-select { border-radius: 10px; border-color: #e2e8f0; }
.member-card .form-control:focus,
.member-card .form-select:focus { border-color: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,.15); }
.member-btn-primary { background: linear-gradient(135deg, #22c55e, #16a34a); border: none; border-radius: 10px; font-weight: 600; color: #fff; }
.member-btn-primary:hover { background: linear-gradient(135deg, #16a34a, #15803d); color: #fff; }
.member-footer { background: #fff !important; border-top: 1px solid #e2e8f0; font-size: .875rem; }
.member-footer a:hover { color: #16a34a !important; }
.brand-logo { color: #0f172a; font-weight: 700; }
.brand-logo:hover { color: #16a34a; }
.brand-logo-icon { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, #22c55e, #16a34a); color: #fff; display: inline-flex; align-items: center; justify-content: center; margin-right: .5rem; font-size: 1.1rem; }
.brand-logo.brand-logo-sm .brand-logo-icon { width: 32px; height: 32px; font-size: 1rem; }
.brand-logo.brand-logo-sm .brand-logo-text { font-size: 1.1rem; }

/* Member: hamburger / offcanvas menu (mobile) */
.member-toggler { width: 44px; height: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 1.5rem; color: #475569; background: #f1f5f9; transition: background .2s, color .2s; }
.member-toggler:hover { background: #e2e8f0; color: #0f172a; }
.member-offcanvas { width: 300px !important; max-width: 85vw; border: none; box-shadow: 4px 0 24px rgba(0,0,0,.15); }
.member-offcanvas .offcanvas-header { border: none; padding: 1rem 1.25rem; background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%); }
.member-offcanvas-header { display: flex; align-items: center; justify-content: space-between; }
.member-offcanvas-logo-wrap { width: 40px; height: 40px; border-radius: 12px; overflow: hidden; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #22c55e, #16a34a); }
.member-offcanvas-logo-img { width: 100%; height: 100%; object-fit: contain; }
.member-offcanvas-logo-fallback { color: #fff; font-size: 1.25rem; display: inline-flex; align-items: center; justify-content: center; }
.member-offcanvas-title { font-size: 1.25rem; font-weight: 700; color: #fff; letter-spacing: -.02em; }
.member-offcanvas-body { background: #1e293b; color: rgba(255,255,255,.9); }
.member-offcanvas-user { border-bottom: 1px solid rgba(255,255,255,.1); }
.member-offcanvas-avatar { width: 48px; height: 48px; border-radius: 14px; background: linear-gradient(135deg, #22c55e, #16a34a); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 1.25rem; font-weight: 700; margin-bottom: .5rem; }
.member-offcanvas-name { font-weight: 600; font-size: 1rem; color: #fff; }
.member-offcanvas-role { font-size: .8125rem; color: rgba(255,255,255,.6); }
.member-offcanvas-nav { padding: .75rem 0; overflow-y: auto; }
.member-offcanvas-link { display: flex; align-items: center; gap: .875rem; padding: .875rem 1.25rem; color: rgba(255,255,255,.85); text-decoration: none; font-size: .9375rem; font-weight: 500; transition: background .15s, color .15s; border-left: 3px solid transparent; }
.member-offcanvas-link i { font-size: 1.2rem; width: 1.5rem; text-align: center; opacity: .9; }
.member-offcanvas-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.member-offcanvas-link.active { background: rgba(22,163,74,.25); color: #fff; border-left-color: #22c55e; }
.member-offcanvas-link.active i { color: #22c55e; }
.member-offcanvas-footer { border-top: 1px solid rgba(255,255,255,.1); background: rgba(0,0,0,.15); }
.member-offcanvas-logout { background: rgba(255,255,255,.1); color: rgba(255,255,255,.9); border: 1px solid rgba(255,255,255,.15); font-weight: 500; font-size: .9375rem; }
.member-offcanvas-logout:hover { background: rgba(255,255,255,.15); color: #fff; border-color: rgba(255,255,255,.25); }

/* ========== Admin mobile (HP): filter stack, card lists, touch scroll ========== */
.admin-content .table-responsive {
  -webkit-overflow-scrolling: touch;
  min-width: 0;
}
.admin-mobile-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.75rem 1rem 1rem;
}
.admin-mobile-list-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  min-width: 0;
}
.admin-mobile-list-title {
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.5rem;
  word-break: break-word;
  font-size: 1rem;
}
.admin-mobile-list-kv {
  font-size: 0.8125rem;
  color: #64748b;
  margin-bottom: 0.25rem;
  word-break: break-word;
}
.admin-mobile-list-kv .kv-label {
  color: #475569;
  font-weight: 600;
  margin-right: 0.35rem;
}
.admin-mobile-list-actions {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #f1f5f9;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.admin-mobile-list-actions form {
  display: inline-flex;
}
@media (max-width: 767.98px) {
  .admin-table-filter,
  .lab-types-filter {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-table-filter > .search-input-wrap,
  .admin-table-filter > .per-page-wrap,
  .lab-types-filter > .search-input-wrap,
  .lab-types-filter > .per-page-wrap {
    min-width: 0 !important;
    max-width: none !important;
    width: 100%;
  }
  .admin-table-filter > .d-flex.align-items-end,
  .lab-types-filter > .d-flex.align-items-end {
    width: 100%;
  }
  .admin-table-filter > .d-flex.align-items-end .btn,
  .lab-types-filter > .d-flex.align-items-end .btn {
    width: 100%;
  }
  .admin-crud-filter .col-12 + .col-12 {
    margin-top: 0;
  }
}
@media (max-width: 575.98px) {
  .admin-table-stats,
  .lab-types-stats {
    grid-template-columns: 1fr;
  }
  .admin-table-pagination,
  .lab-types-pagination {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-table-pagination .pagination,
  .lab-types-pagination .pagination {
    justify-content: center;
    flex-wrap: wrap;
  }
  .admin-content {
    padding: 1rem;
  }
  .dashboard-super-actions {
    flex-direction: column;
  }
  .dashboard-super-actions .btn {
    width: 100%;
    justify-content: center;
  }
  .profile-hero-actions {
    margin-left: 0 !important;
    width: 100%;
    flex-direction: column;
  }
  .profile-hero-actions .btn {
    width: 100%;
    justify-content: center;
  }
  .admin-page-toolbar .d-flex.flex-wrap.gap-2 {
    width: 100%;
  }
  .admin-page-toolbar .d-flex.flex-wrap.gap-2 .btn {
    flex: 1 1 auto;
    min-width: 0;
    justify-content: center;
  }
}
