/* ==========================================================================
   E-Logbook — "GamaPath" layer (override di atas Argon)
   Scope: semua role via body.el-shell (Admin, Resident/Mahasiswa, Staff/Konsulen).
   Prinsip: flat, 1 aksen ungu GamaPath + garis emas, angka tabular,
   tanpa gradien/glow. Palet diselaraskan ke gamapath.fkkmk.ugm.ac.id:
   ungu vivid #8E22C3, plum #4C1666, ikon/link #9D62A7, emas #FDCB2C.
   ========================================================================== */
:root {
  --el-bg: #F4EFF7;
  --el-surface: #FFFFFF;
  --el-ink: #2D1A33;
  --el-muted: #6E5A73;
  --el-faint: #A08AA8;
  --el-line: #E3D9EA;
  --el-line-soft: #EFE7F4;
  --el-accent: #8E22C3;
  --el-accent-strong: #4C1666;
  --el-accent-soft: #F5EBFA;
  --el-gold: #FDCB2C;
  --el-danger: #B42318;
  --el-danger-soft: #FDECEA;
  --el-warn: #B45309;
  --el-warn-soft: #FEF3E2;
  --el-ok: #15803D;
  --el-ok-soft: #E7F6EC;
  --el-radius: 10px;
  --el-shadow: 0 1px 2px rgba(15, 30, 46, .06);
  /* Motif patologi (sel / virus / ubur-ubur) - palet GamaPath */
  --el-motif-1: #9D62A7;
  --el-motif-2: #BB62CF;
  --el-motif-3: #C77BE0;
  --el-motif-4: #4C1666;
}

body.el-shell {
  font-family: "Plus Jakarta Sans", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--el-bg) !important;
  color: var(--el-ink);
}

/* --- hilangkan hero gradien Argon, ganti flat --- */
body.el-shell .el-page-bg {
  background: var(--el-bg);
  min-height: 0;
  height: 0;
  position: absolute;
  width: 100%;
  top: 0;
  left: 0;
}
body.el-shell .min-height-300.bg-primary {
  background: var(--el-bg) !important;
  min-height: 0 !important;
  height: 72px;
}

/* --- SIDEBAR: dari melayang menjadi panel kerja --- */
body.el-shell .sidenav {
  border-radius: 0 !important;
  margin: 0 !important;
  top: 0;
  bottom: 0;
  left: 0;
  height: 100vh;
  border-right: 1px solid var(--el-line) !important;
  box-shadow: none !important;
  width: 248px !important;
  max-width: 248px !important;
}
body.el-shell .sidenav .sidenav-header {
  height: 72px;
  padding: 14px 18px 10px;
}
body.el-shell .sidenav .navbar-brand {
  display: flex !important;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  max-width: 100%;
  overflow: hidden;
  padding: 0 !important;
  margin: 0 !important;
  text-align: left;
}
body.el-shell .sidenav .navbar-brand-img {
  flex: 0 0 36px;
  width: 36px !important;
  height: 36px !important;
  max-height: 36px !important;
  object-fit: contain;
  border: 1px solid var(--el-line);
  border-radius: 8px;
  padding: 3px;
  background: #fff;
}
body.el-shell .sidenav .navbar-brand .el-brand-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  line-height: 1.25;
}
body.el-shell .sidenav .navbar-brand .el-brand-text strong,
body.el-shell .sidenav .navbar-brand .el-brand-text small {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.el-shell .sidenav .navbar-brand .el-brand-text strong {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--el-ink);
}
body.el-shell .sidenav .navbar-brand .el-brand-text small {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--el-muted);
  letter-spacing: .02em;
}
body.el-shell .sidenav hr.horizontal { background-color: var(--el-line-soft); }
body.el-shell .sidenav .navbar-nav .nav-item > h6,
body.el-shell .el-nav-section {
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #556476 !important;
  opacity: 1 !important;
  padding: 14px 20px 6px !important;
  margin: 0 !important;
}
body.el-shell .sidenav .nav-link {
  margin: 1px 10px !important;
  padding: 9px 12px !important;
  border-radius: 8px !important;
  font-size: 13.5px;
  font-weight: 600;
  color: #33475F !important;
  box-shadow: none !important;
  position: relative;
  display: flex;
  align-items: center;
}
body.el-shell .sidenav .nav-link .icon {
  width: 30px;
  height: 30px;
  border-radius: 8px !important;
  background: #F3ECF8 !important;
  box-shadow: none !important;
  flex: 0 0 30px;
}
body.el-shell .sidenav .nav-link .icon i,
body.el-shell .sidenav .nav-link .icon svg {
  font-size: 13px !important;
  width: 15px;
  height: 15px;
  color: var(--el-muted) !important;
  opacity: 1 !important;
}
body.el-shell .sidenav .nav-link:hover { background: #F7F0FC !important; }
body.el-shell .sidenav .nav-link.active {
  background: var(--el-accent-soft) !important;
  color: var(--el-accent-strong) !important;
  font-weight: 700;
}
body.el-shell .sidenav .nav-link.active::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 3px;
  background: var(--el-gold);
}
body.el-shell .sidenav .nav-link.active .icon { background: #E9D5F5 !important; }
body.el-shell .sidenav .nav-link.active .icon i,
body.el-shell .sidenav .nav-link.active .icon svg { color: var(--el-accent-strong) !important; }

/* --- TOPBAR --- */
body.el-shell .el-topbar {
  background: var(--el-surface) !important;
  border-bottom: 1px solid var(--el-line) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
  padding: 12px 20px !important;
  max-width: 100%;
}
/* Jaring pengaman: halaman admin tidak boleh scroll horizontal;
   scroll tabel tetap jalan di wadahnya masing-masing. */
body.el-shell, body.el-shell .main-content { overflow-x: clip; }
body.el-shell .el-topbar .container-fluid {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap !important;
}
body.el-shell .el-topbar-titlewrap { flex: 1 1 auto; min-width: 0; }
body.el-shell .el-topbar-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; }
body.el-shell .el-breadcrumb-nav .breadcrumb {
  margin: 0;
  padding: 0;
  font-size: 13px;
  background: transparent;
}
body.el-shell .el-breadcrumb-nav .breadcrumb-item {
  color: var(--el-muted);
  min-width: 0;
}
body.el-shell .el-breadcrumb-nav .breadcrumb {
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
}
.el-breadcrumb-sub-fix {
  color: var(--el-muted);
}
body.el-shell .el-breadcrumb-nav .breadcrumb-item a,
body.el-shell .el-breadcrumb-nav .el-breadcrumb-link {
  color: #475569 !important;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 4px 6px;
  border-radius: 6px;
  transition: color .2s ease, background .2s ease;
}
body.el-shell .el-breadcrumb-nav .breadcrumb-item a:hover,
body.el-shell .el-breadcrumb-nav .el-breadcrumb-link:hover {
  color: var(--el-accent-strong) !important;
  background: var(--el-accent-soft);
}
.el-breadcrumb-discarded {
  color: var(--el-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color .2s ease;
}
.el-breadcrumb-old-fix {
  color: var(--el-accent-strong);
}
body.el-shell .el-breadcrumb-nav .breadcrumb-item.active {
  color: var(--el-ink);
  font-weight: 700;
}
body.el-shell .el-breadcrumb-nav .breadcrumb-item + .breadcrumb-item::before {
  color: var(--el-faint);
  content: "/";
  padding: 0 6px;
}
body.el-shell .el-breadcrumb-nav .el-topbar-title {
  display: inline;
  font-size: 13px;
  font-weight: 700;
  color: var(--el-ink);
  margin: 0;
  letter-spacing: normal;
}
body.el-shell .el-topbar-title {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--el-ink);
  margin: 0;
}
@media (max-width: 575.98px) {
  body.el-shell .el-topbar { padding: 10px 14px !important; }
  body.el-shell .el-topbar-title {
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  body.el-shell .el-topbar-sub { display: none; }
  body.el-shell .el-logout-txt { display: none; }
  body.el-shell .el-logout { padding: 8px; }
  body.el-shell .el-logout i { margin-right: 0 !important; }
}
body.el-shell .el-topbar-sub {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--el-muted);
  margin: 2px 0 0;
}
body.el-shell .el-userchip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px 6px 8px;
  border: 1px solid var(--el-line);
  border-radius: 999px;
  background: #fff;
  text-decoration: none;
}
body.el-shell .el-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--el-accent-strong);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 30px;
  letter-spacing: .02em;
}
body.el-shell button.el-userchip { font: inherit; cursor: pointer; }
body.el-shell .el-userchip-caret { font-size: 11px; color: var(--el-faint); margin-right: 8px; }
body.el-shell .el-usermenu {
  border: 1px solid var(--el-line) !important;
  border-radius: 10px !important;
  box-shadow: 0 12px 28px rgba(15, 30, 46, .14) !important;
  padding: 6px !important;
  min-width: 240px;
  font-size: 13.5px;
}
body.el-shell .el-usermenu-head { padding: 8px 12px 6px; }
body.el-shell .el-usermenu-head strong { display: block; font-size: 13.5px; color: var(--el-ink); }
body.el-shell .el-usermenu-head small { font-size: 12px; color: var(--el-muted); font-weight: 500; }
body.el-shell .el-usermenu .dropdown-divider { margin: 4px 0; border-color: var(--el-line-soft); }
body.el-shell .el-usermenu .dropdown-item {
  border-radius: 7px !important;
  padding: 9px 12px !important;
  font-weight: 600;
  color: var(--el-ink) !important;
}
body.el-shell .el-usermenu .dropdown-item:hover { background: #F1F5F9 !important; }
body.el-shell .el-usermenu .dropdown-item i { color: var(--el-muted); width: 16px; }
body.el-shell .el-usermenu .el-usermenu-danger { color: var(--el-danger) !important; }
body.el-shell .el-usermenu .el-usermenu-danger:hover { background: var(--el-danger-soft) !important; }
body.el-shell .el-usermenu .el-usermenu-danger i { color: var(--el-danger); }
body.el-shell .el-userchip-meta { line-height: 1.15; }
body.el-shell .el-userchip-meta strong { display: block; font-size: 12.5px; color: var(--el-ink); }
body.el-shell .el-userchip-meta small { font-size: 11px; color: var(--el-muted); font-weight: 600; }
body.el-shell .el-logout {
  font-size: 13px;
  font-weight: 700;
  color: var(--el-muted);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  white-space: nowrap;
}
body.el-shell .el-logout:hover { background: var(--el-danger-soft); color: var(--el-danger); border-color: #F3C6C1; }
body.el-shell .el-logout i { color: var(--el-danger); }

/* --- KARTU & STAT --- */
body.el-shell .card {
  border: 1px solid var(--el-line) !important;
  border-radius: var(--el-radius) !important;
  box-shadow: var(--el-shadow) !important;
}
body.el-shell .card-header {
  background: transparent !important;
  border-bottom: 1px solid var(--el-line-soft) !important;
  padding: 16px 20px !important;
}
body.el-shell .card-body { padding: 18px 20px !important; }
body.el-shell .el-stat { position: relative; overflow: hidden; }
body.el-shell .el-stat.el-stat-clickable {
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  display: flex;
  flex-direction: column;
  text-decoration: none !important;
  color: inherit !important;
}
body.el-shell .el-stat.el-stat-clickable:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(15, 30, 46, .08);
  border-color: var(--el-accent) !important;
}
body.el-shell .el-stat.el-stat-clickable:hover .el-stat-icon {
  background: var(--el-accent-soft);
  border-color: var(--el-accent);
}
body.el-shell .el-stat.el-stat-clickable:hover .el-stat-foot {
  color: var(--el-accent-strong);
}
body.el-shell .el-stat.el-stat-clickable:hover .el-stat-foot .el-stat-action {
  text-decoration: underline;
}
body.el-shell .el-stat-foot .el-stat-action {
  color: var(--el-accent-strong);
  font-weight: 700;
}
body.el-shell .el-stat-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--el-muted);
  margin: 0 0 6px;
}
body.el-shell .el-stat-value {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--el-ink);
  margin: 0;
  font-variant-numeric: tabular-nums;
}
body.el-shell .el-stat-foot {
  font-size: 12px;
  font-weight: 600;
  color: var(--el-muted);
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--el-line-soft);
}
body.el-shell .el-stat-foot a { color: var(--el-accent-strong); font-weight: 700; text-decoration: none; }
body.el-shell .el-stat-foot a:hover { text-decoration: underline; }
body.el-shell .el-stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: #EFF4F8;
  border: 1px solid var(--el-line-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 38px;
}
body.el-shell .el-stat-icon i { font-size: 15px; color: var(--el-accent-strong); }

/* --- TOMBOL: satu primer teal --- */
body.el-shell .btn {
  border-radius: 8px !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}
body.el-shell .btn-primary,
body.el-shell .bg-gradient-primary {
  background: var(--el-accent) !important;
  border-color: var(--el-accent) !important;
  background-image: none !important;
  color: #fff !important;
}
body.el-shell .btn-primary:hover,
body.el-shell .bg-gradient-primary:hover { background: var(--el-accent-strong) !important; border-color: var(--el-accent-strong) !important; }
body.el-shell .btn-info {
  background: #fff !important;
  border: 1px solid var(--el-line) !important;
  color: var(--el-ink) !important;
  background-image: none !important;
}
body.el-shell .btn-info:hover { border-color: var(--el-accent) !important; color: var(--el-accent-strong) !important; }
body.el-shell .btn-success {
  background: var(--el-ok) !important;
  border-color: var(--el-ok) !important;
  background-image: none !important;
}
body.el-shell .btn-warning { background-image: none !important; }
body.el-shell .btn-danger,
body.el-shell .bg-gradient-danger { background-image: none !important; }

/* toolbar list */
body.el-shell .el-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
/* Search mengisi sisa ruang barisnya; tombol disamakan tingginya
   dengan input (38px) agar sejajar. */
body.el-shell .el-toolbar .el-search { flex: 1 1 220px; }
body.el-shell .el-toolbar .btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0; /* Argon memberi .btn margin-bottom:16px yang merusak alignment */
}
body.el-shell .el-spacer { flex: 1 1 auto; }
/* Toolbar daftar pada layar kecil.
   Di breakpoint ini .card-header menjadi flex container (lihat inline CSS di
   partials/app.php), sementara <select class="el-filter"> memakai lebar
   intrinsik dan <form class="d-inline-flex"> punya min-width:auto. Akibatnya
   baris filter + tombol Excel bisa lebih lebar daripada card sehingga tampak
   keluar dari batas kartu tabel. Perbaikan: toolbar dipaksa memakai satu baris
   penuh, min-width intrinsik anak-anaknya dimatikan (min-width: 0), dan
   select/tombol dibiarkan membungkus di dalam lebar card. */
@media (max-width: 767.98px) {
  body.el-shell .card-header > .el-toolbar {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  body.el-shell .el-toolbar > form,
  body.el-shell .el-toolbar > select,
  body.el-shell .el-toolbar > .el-search { min-width: 0; max-width: 100%; }
  body.el-shell .el-toolbar > form {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    flex-wrap: wrap !important;
    align-items: center;
  }
  body.el-shell .el-toolbar .el-search { flex: 1 1 100%; min-width: 0; }
  body.el-shell .el-toolbar .el-filter { flex: 1 1 auto; min-width: 0; max-width: 100%; }
}

@media (max-width: 575.98px) {
  /* Layar sangat sempit: tumpuk filter & tombol satu per baris agar semuanya
     tetap berada di dalam card. */
  body.el-shell .el-toolbar { flex-direction: column; align-items: stretch; gap: 8px; }
  body.el-shell .el-toolbar > form { display: flex !important; gap: 8px; flex-wrap: wrap; }
  body.el-shell .el-toolbar .el-filter { flex: 1 1 100%; width: 100%; margin: 0; }
  body.el-shell .el-toolbar .btn { width: 100%; min-height: 44px; margin: 0; justify-content: center; }
}
body.el-shell .el-title { font-size: 18px; font-weight: 800; letter-spacing: -.01em; margin: 0; color: var(--el-ink); }
body.el-shell .el-truncate { display: block; max-width: 230px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.el-shell .el-count {
  font-size: 12.5px; font-weight: 600; color: var(--el-muted);
}
body.el-shell .el-search {
  min-width: 220px;
  height: 38px;
  border: 1px solid var(--el-line) !important;
  border-radius: 8px !important;
  font-size: 13.5px;
  padding: 0 12px 0 34px !important;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235B6B7F' stroke-width='2.4'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3'/%3E%3C/svg%3E") 11px center no-repeat !important;
}
body.el-shell .el-filter {
  height: 38px;
  border: 1px solid var(--el-line) !important;
  border-radius: 8px !important;
  font-size: 13px;
  font-weight: 700;
  color: var(--el-ink);
  padding: 0 10px !important;
  background-color: #fff;
}

/* --- TABEL --- */
body.el-shell .table-el,
body.el-shell table.dataTable {
  width: 100% !important;
  border: 0 !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  font-size: 13.5px;
}
body.el-shell .table-el thead th,
body.el-shell table.dataTable thead th {
  background: #F8FAFC !important;
  color: var(--el-muted) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: .02em;
  text-transform: none !important;
  opacity: 1 !important;
  border: 0 !important;
  border-bottom: 1px solid var(--el-line) !important;
  padding: 10px 28px 10px 14px !important;
  white-space: nowrap;
}
body.el-shell table.dataTable thead th.sorting,
body.el-shell table.dataTable thead th.sorting_asc,
body.el-shell table.dataTable thead th.sorting_desc,
body.el-shell .table-el thead th.sorting,
body.el-shell .table-el thead th.sorting_asc,
body.el-shell .table-el thead th.sorting_desc {
  padding-right: 28px !important;
}

/* Hilangkan scrollbar horizontal paksa pada tabel sederhana (< 6 kolom) di layar lebar */
@media (min-width: 992px) {
  body.el-shell .table-responsive.el-table-simple {
    overflow-x: hidden !important;
  }
}
body.el-shell .table-el tbody td,
body.el-shell table.dataTable tbody td {
  border: 0 !important;
  border-bottom: 1px solid var(--el-line-soft) !important;
  padding: 11px 14px !important;
  vertical-align: middle;
  color: #24364D;
  font-weight: 500;
}
body.el-shell .table-el tbody tr:hover td,
body.el-shell table.dataTable tbody tr:hover td { background: #F7EFFC !important; }
body.el-shell .table-el td.num,
body.el-shell table.dataTable td.num { font-variant-numeric: tabular-nums; text-align: right; }
body.el-shell table.dataTable thead .sorting::before,
body.el-shell table.dataTable thead .sorting::after { opacity: .45; }

/* DataTables chrome */
body.el-shell .dataTables_wrapper .dataTables_length select {
  border: 1px solid var(--el-line) !important;
  border-radius: 8px;
  padding: 6px 8px;
  font-weight: 700;
}
body.el-shell .dataTables_wrapper .dataTables_filter input {
  border: 1px solid var(--el-line) !important;
  border-radius: 8px !important;
  padding: 8px 12px !important;
  margin-left: 8px !important;
}
body.el-shell .dataTables_wrapper .dataTables_paginate .paginate_button {
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  min-width: 38px;
  min-height: 38px;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 5px 10px !important;
  font-weight: 700;
  color: var(--el-ink) !important;
  background: transparent !important;
}
body.el-shell .dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--el-accent-strong) !important;
  color: #fff !important;
  border-color: var(--el-accent-strong) !important;
}
body.el-shell .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: var(--el-accent-soft) !important;
  color: var(--el-accent-strong) !important;
  border-color: var(--el-accent-soft) !important;
}
body.el-shell .dataTables_wrapper .dataTables_info { color: var(--el-muted); font-size: 12.5px; font-weight: 600; }

/* pill status */
body.el-shell .el-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
  letter-spacing: .01em;
}
body.el-shell .el-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
body.el-shell .el-pill-ok { background: var(--el-ok-soft); color: var(--el-ok); border-color: #BFE6CC; }
body.el-shell .el-pill-warn { background: var(--el-warn-soft); color: var(--el-warn); border-color: #F2D3A6; }
body.el-shell .el-pill-bad { background: var(--el-danger-soft); color: var(--el-danger); border-color: #F3C6C1; }
body.el-shell .el-pill-mute { background: #EEF2F6; color: var(--el-muted); border-color: var(--el-line); }

/* aksi baris: ghost */
body.el-shell .el-rowactions { display: flex; flex-wrap: wrap; gap: 6px; }
body.el-shell .el-iconbtn {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--el-line);
  background: #fff;
  color: var(--el-muted);
  font-size: 13px;
  text-decoration: none;
}
body.el-shell .el-iconbtn:hover { border-color: var(--el-accent); color: var(--el-accent-strong); background: var(--el-accent-soft); }
body.el-shell .el-iconbtn.danger:hover { border-color: #F3C6C1; color: var(--el-danger); background: var(--el-danger-soft); }

/* aksi baris: satu tombol hamburger + dropdown (hemat ~120px vs 5 ikon).
   Menu dibuka ke kiri (dropdown-menu-end) + flip otomatis ke atas oleh
   Popper bila baris terakhir, agar tidak terpotong .table-responsive. */
body.el-shell .table-el thead th.el-col-action,
body.el-shell .table-el tbody td.el-col-action,
body.el-shell table.dataTable thead th.el-col-action,
body.el-shell table.dataTable tbody td.el-col-action { text-align: center; padding-left: 8px !important; padding-right: 8px !important; }
body.el-shell .el-actionmenu {
  min-width: 210px;
  border: 1px solid var(--el-line) !important;
  border-radius: 10px !important;
  box-shadow: 0 12px 28px rgba(15, 30, 46, .14) !important;
  padding: 6px !important;
  font-size: 13.5px;
}
body.el-shell .el-actionmenu .dropdown-item {
  border-radius: 7px !important;
  padding: 9px 12px !important;
  font-weight: 600;
  color: var(--el-ink) !important;
  display: flex;
  align-items: center;
  gap: 10px;
}
body.el-shell .el-actionmenu .dropdown-item:hover { background: #F1F5F9 !important; }
body.el-shell .el-actionmenu .dropdown-item i { width: 16px; text-align: center; color: var(--el-muted); }
body.el-shell .el-actionmenu .dropdown-divider { margin: 4px 0; border-color: var(--el-line-soft); }
body.el-shell .el-actionmenu .dropdown-item.danger { color: var(--el-danger) !important; }
body.el-shell .el-actionmenu .dropdown-item.danger:hover { background: var(--el-danger-soft) !important; }
body.el-shell .el-actionmenu .dropdown-item.danger i { color: var(--el-danger); }

/* Ringkasan "Data yang akan diunduh" di modal export: kotak kompak
   berisi chip filter aktif + angka hasil. */
body.el-shell .el-export-summary {
  border: 1px solid var(--el-line);
  border-radius: 8px;
  background: #F8FAFC;
  padding: 10px 12px;
  font-size: 13px;
}
body.el-shell .el-export-summary .form-label { margin-bottom: 6px; }
body.el-shell .el-export-summary #exportCount { font-size: 13.5px; color: var(--el-ink); }

/* Modal export: jamin footer (Batal/Unduh) selalu terlihat di layar pendek —
   batasi tinggi konten + rapatkan ritme vertikal khusus modal ini. */
#modalExport .modal-content { max-height: calc(100vh - 32px); }
#modalExport .modal-body { overflow-y: auto; padding: .75rem 1rem; }
#modalExport .modal-header, #modalExport .modal-footer { padding: .6rem 1rem; }
#modalExport .modal-body .mb-3 { margin-bottom: .6rem !important; }
#modalExport .form-control, #modalExport .form-select { min-height: 38px; }
#modalExport .el-export-summary { padding: 8px 10px; }

/* Tabel daftar pengguna (#datatables-user dipakai resident + staff):
   padding sel sedikit dirapatkan agar 9 kolom muat dalam kartu. */
body.el-shell #datatables-user thead th { padding: 10px 12px !important; }
body.el-shell #datatables-user tbody td { padding: 10px 12px !important; }
/* Lebar tabel ikut kartu (100%); lebar kolom tetap dari kalkulasi DataTables
   (~994px) sehingga tidak ada wrap dan tidak ada overflow. Sisa ±19px
   didistribusikan browser secara otomatis. */
body.el-shell #datatables-user { width: 100% !important; }

/* identitas + avatar inisial */
body.el-shell .el-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
body.el-shell .el-identity .el-avatar { background: #DCE7EF; color: #27405E; }
body.el-shell .el-identity strong { display: block; font-size: 13.5px; color: var(--el-ink); }
body.el-shell .el-identity small { display: block; font-size: 12px; color: var(--el-muted); font-weight: 500; }

/* empty state */
body.el-shell .el-empty {
  text-align: center;
  padding: 44px 20px;
  border: 1px dashed var(--el-line);
  border-radius: var(--el-radius);
  background: #F8FAFC;
}
body.el-shell .el-empty-icon {
  width: 46px; height: 46px; border-radius: 12px;
  background: #fff; border: 1px solid var(--el-line);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--el-accent-strong);
  margin-bottom: 12px;
}
body.el-shell .el-empty h5 { font-size: 15px; font-weight: 800; margin: 0 0 4px; color: var(--el-ink); }
body.el-shell .el-empty p { font-size: 13px; color: var(--el-muted); margin: 0 0 14px; }

/* --- FORM --- */
body.el-shell .el-section-title {
  font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
  color: var(--el-accent-strong); margin: 0 0 12px;
  display: flex; align-items: center; gap: 8px;
}
body.el-shell .el-step:not(.el-steps .el-step),
body.el-shell .el-section-title .el-step,
body.el-shell .el-sub-icon {
  width: 26px !important;
  height: 26px !important;
  min-width: 26px !important;
  max-width: 26px !important;
  border-radius: 50% !important;
  background: var(--el-accent-strong) !important;
  color: #fff !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: none !important;
  flex-shrink: 0 !important;
  line-height: 1;
}
body.el-shell .form-label { font-size: 13px; font-weight: 700; color: var(--el-ink); margin-bottom: 6px; }
body.el-shell .form-label .req { color: var(--el-danger); }
body.el-shell .form-control,
body.el-shell .form-select {
  min-height: 44px;
  border: 1px solid #CBD5E1 !important;
  border-radius: 8px !important;
  font-size: 14px;
  box-shadow: none !important;
}
body.el-shell .form-control:focus,
body.el-shell .form-select:focus {
  border-color: var(--el-accent) !important;
  outline: 2px solid rgba(142, 34, 195, .25);
  outline-offset: 0;
}
body.el-shell .invalid-feedback { font-size: 12.5px; font-weight: 600; }
body.el-shell .el-help {
  border: 1px solid var(--el-line);
  border-radius: var(--el-radius);
  background: #F8FAFC;
  padding: 16px 18px;
  font-size: 13px;
  color: var(--el-muted);
}
body.el-shell .el-help h6,
body.el-shell .el-help .el-help-title { font-size: 13px; font-weight: 800; color: var(--el-ink); margin: 0 0 8px; line-height: 1.4; }
body.el-shell .el-help ul { margin: 0; padding-left: 18px; }
body.el-shell .el-actionbar {
  position: sticky;
  bottom: 0;
  background: rgba(255, 255, 255, .96);
  border-top: 1px solid var(--el-line-soft);
  padding: 14px 20px;
  margin: 18px -20px -18px;
  border-radius: 0 0 var(--el-radius) var(--el-radius);
  display: flex; gap: 8px; align-items: center;
}
body.el-shell .el-actionbar .spacer { flex: 1; }
body.el-shell .btn-ghost-el {
  background: #fff !important; border: 1px solid var(--el-line) !important; color: var(--el-muted) !important;
}
body.el-shell .btn-ghost-el:hover { color: var(--el-ink) !important; border-color: #B9C6D4 !important; }

/* alert ramping */
body.el-shell .alert {
  border-radius: 8px !important;
  font-size: 13.5px;
  border: 1px solid var(--el-line) !important;
  box-shadow: none !important;
}
body.el-shell .alert-success { background: var(--el-ok-soft) !important; border-color: #BFE6CC !important; color: #14532D !important; }
body.el-shell .alert-warning { background: var(--el-warn-soft) !important; border-color: #F2D3A6 !important; color: #7C3F06 !important; }
body.el-shell .alert-danger { background: var(--el-danger-soft) !important; border-color: #F3C6C1 !important; color: #7A1F16 !important; }

/* --- DETAIL + TAB --- */
body.el-shell .el-profile { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
body.el-shell .el-profile-photo {
  width: 72px; height: 72px; border-radius: 14px; object-fit: cover;
  border: 1px solid var(--el-line); background: #F1F5F9;
}
body.el-shell .el-profile h3 { font-size: 20px; font-weight: 800; letter-spacing: -.01em; margin: 0; }
body.el-shell .el-profile-meta { font-size: 13px; color: var(--el-muted); font-weight: 600; margin-top: 4px; }
body.el-shell .el-tabs {
  display: flex; gap: 4px; flex-wrap: wrap;
  border-bottom: 1px solid var(--el-line);
  margin: 0 0 16px; padding: 0 4px;
}
body.el-shell .el-tab {
  border: 0; background: transparent;
  font-size: 13.5px; font-weight: 700; color: var(--el-muted);
  padding: 10px 14px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
}
body.el-shell .el-tab:hover { color: var(--el-ink); }
body.el-shell .el-tab[aria-selected="true"] { color: var(--el-accent-strong); border-bottom-color: var(--el-accent); }
@media (max-width: 767.98px) {
  body.el-shell .el-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  body.el-shell .el-tabs::-webkit-scrollbar { display: none; }
  body.el-shell .el-tab { flex: 0 0 auto; white-space: nowrap; }
}
body.el-shell .el-tabpanel { display: none; }
body.el-shell .el-tabpanel.is-active { display: block; }

/* baris definisi (profil read-only) */
body.el-shell .el-defrow {
  display: flex;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--el-line-soft);
}
body.el-shell .el-defrow:last-child { border-bottom: 0; }
body.el-shell .el-defrow dt {
  flex: 0 0 160px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--el-muted);
}
body.el-shell .el-defrow dd {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--el-ink);
  min-width: 0;
  overflow-wrap: anywhere;
}
body.el-shell .el-defrow dd.empty { color: var(--el-faint); font-weight: 500; }
@media (max-width: 575.98px) {
  body.el-shell .el-defrow {
    flex-direction: column !important;
    gap: 3px !important;
    padding: 8px 0 !important;
  }
  body.el-shell .el-defrow dt {
    flex: 0 0 auto !important;
    font-size: 11.5px !important;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--el-muted) !important;
  }
  body.el-shell .el-defrow dd {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--el-ink) !important;
  }
}

/* kartu identitas (profil) */
body.el-shell .el-idcard { overflow: hidden; }
body.el-shell .el-idcard-cover {
  height: 200px;
  background: #4C1666;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border-radius: 10px 10px 0 0;
}
body.el-shell .el-idcard-cover.flat::after {
  content: "";
  position: absolute;
  right: -30px;
  top: 0;
  width: 170px;
  height: 100%;
  background: rgba(255, 255, 255, .07);
  transform: skewX(-12deg);
}
body.el-shell .el-idcard-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
body.el-shell .el-idcard-cover .el-idcard-change {
  position: absolute;
  right: 10px;
  bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: rgba(15, 30, 46, .55);
  border-radius: 999px;
  padding: 4px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transition: opacity .15s ease;
}
body.el-shell .el-idcard-cover:hover .el-idcard-change,
body.el-shell .el-idcard-cover:focus-within .el-idcard-change { opacity: 1; }
body.el-shell .el-idcard-photo {
  width: 108px;
  height: 135px;
  object-fit: cover;
  border-radius: 12px;
  border: 4px solid #fff;
  box-shadow: 0 6px 18px rgba(15, 30, 46, .22);
  background: #EEF2F6;
  cursor: pointer;
  margin-top: -103px; /* overlap 85px setelah dikurangi padding card-body */
  position: relative;
  z-index: 1;
}

body.el-shell .el-idcard-name {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.01em;
  margin: 12px 0 2px;
}
body.el-shell .el-idcard-id {
  font-size: 13px;
  font-weight: 600;
  color: var(--el-muted);
  margin: 0;
}
body.el-shell .el-idcard-org {
  font-size: 13px;
  font-weight: 700;
  color: var(--el-ink);
  margin: 10px 0 0;
}
body.el-shell .el-idcard-org small {
  display: block;
  font-weight: 500;
  color: var(--el-muted);
  font-size: 12.5px;
  margin-top: 2px;
}

/* komposisi bar */
body.el-shell .el-bar { margin-bottom: 12px; }
body.el-shell .el-bar-head { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 700; color: var(--el-ink); margin-bottom: 5px; }
body.el-shell .el-bar-head span:last-child { color: var(--el-muted); font-variant-numeric: tabular-nums; }
body.el-shell .el-bar-track { height: 8px; border-radius: 999px; background: #E7EDF3; overflow: hidden; }
body.el-shell .el-bar-fill { height: 100%; border-radius: 999px; background: var(--el-accent); }

/* attention list */
body.el-shell .el-attn { display: flex; gap: 12px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--el-line-soft); }
body.el-shell .el-attn:last-child { border-bottom: 0; }
body.el-shell .el-attn-body { flex: 1; min-width: 0; }
body.el-shell .el-attn-body strong { display: block; font-size: 13.5px; }
body.el-shell .el-attn-body small { color: var(--el-muted); font-size: 12px; font-weight: 600; }

/* footer */
body.el-shell .footer .copyright { font-size: 12.5px; color: var(--el-muted) !important; }

/* konten sejajar sidebar */
body.el-shell .main-content { margin-left: 248px !important; }
body.el-shell .container-fluid.py-4 { padding-top: 20px !important; }

/* ==========================================================================
   AUTH (login / register / forgot / reset) — satu bahasa dengan admin.
   Scope: body.el-auth. Flat, tanpa foto stok, tanpa gradien.
   ========================================================================== */
body.el-auth {
  font-family: "Plus Jakarta Sans", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--el-bg);
  color: var(--el-ink);
  min-height: 100vh;
}
body.el-auth .el-auth-topbar {
  height: 4px;
  background: var(--el-gold);
}
/* --------------------------------------------------------------------------
   MOTIF PATOLOGI — lapisan dekoratif sel / virus / ubur-ubur.
   Dirender sebagai layer SVG di latar halaman auth, mengikuti palet GamaPath
   (#9D62A7 / #BB62CF / #C77BE0 / #4C1666). Non-blok, aria-hidden, dan
   dimatikan otomatis saat pengguna meminta reduced motion.
   -------------------------------------------------------------------------- */
body.el-auth { position: relative; overflow-x: hidden; }
body.el-auth .el-motif {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  /* Catatan: JANGAN set opacity di layer ini, karena akan
     mengalikan opacity tiap elemen (0.5 * 0.18 = 0.09) sehingga
     motif nyaris tak terlihat. Atur kekuatan pada tiap elemen. */
  opacity: 1;
}
body.el-auth .el-motif i {
  position: absolute;
  display: block;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  will-change: transform;
}
/* sebaran: satu sel besar, dua ubur-ubur, dua partikel virus */
body.el-auth .el-motif .m-cell {
  width: 460px; height: 460px;
  top: -120px; left: -140px;
  background-image: url("../img/motif-cell.svg");
  opacity: .55;
  animation: el-float 26s ease-in-out infinite;
}
body.el-auth .el-motif .m-virus-a {
  width: 150px; height: 150px;
  top: 18%; right: 7%;
  background-image: url("../img/motif-virus.svg");
  opacity: .5;
  animation: el-drift 19s ease-in-out infinite;
}
body.el-auth .el-motif .m-jelly-a {
  width: 230px; height: 250px;
  bottom: -70px; right: -50px;
  background-image: url("../img/motif-jelly.svg");
  opacity: .48;
  animation: el-float 31s ease-in-out infinite reverse;
}
body.el-auth .el-motif .m-cell-s {
  width: 190px; height: 190px;
  bottom: 9%; left: 6%;
  background-image: url("../img/motif-cell-alt.svg");
  opacity: .42;
  animation: el-drift 23s ease-in-out infinite reverse;
}
body.el-auth .el-motif .m-virus-b {
  width: 96px; height: 96px;
  top: 11%; left: 26%;
  background-image: url("../img/motif-virus.svg");
  opacity: .38;
  animation: el-drift 17s ease-in-out infinite;
}
body.el-auth .el-motif .m-jelly-b {
  width: 140px; height: 154px;
  top: 44%; left: 44%;
  background-image: url("../img/motif-jelly.svg");
  opacity: .3;
  animation: el-float 29s ease-in-out infinite;
}
@keyframes el-float {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  50%      { transform: translate3d(14px, -22px, 0) rotate(6deg) scale(1.04); }
}
@keyframes el-drift {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  33%      { transform: translate3d(-16px, 12px, 0) rotate(-8deg); }
  66%      { transform: translate3d(10px, 18px, 0) rotate(5deg); }
}
/* kartu & konten harus mengambang di atas motif */
body.el-auth .el-auth-wrap { position: relative; z-index: 1; }
/* pada layar kecil kurangi kepadatan agar tidak mengganggu isian form */
@media (max-width: 860px) {
  body.el-auth .el-motif { opacity: 1; }
  body.el-auth .el-motif .m-virus-b,
  body.el-auth .el-motif .m-jelly-b { display: none; }
  body.el-auth .el-motif .m-cell { width: 300px; height: 300px; top: -90px; left: -110px; }
  body.el-auth .el-motif .m-cell-s { width: 130px; height: 130px; }
}
@media (prefers-reduced-motion: reduce) {
  body.el-auth .el-motif i { animation: none !important; }
}

body.el-auth .el-auth-wrap {
  min-height: calc(100vh - 4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
body.el-auth .el-auth-card {
  width: 920px;
  max-width: 100%;
  background: var(--el-surface);
  border: 1px solid var(--el-line);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(15, 30, 46, .10);
  overflow: hidden;
  display: grid;
  grid-template-columns: 380px 1fr;
}
body.el-auth .el-auth-brand {
  background: #4C1666;
  color: #F5EBFA;
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
}
body.el-auth .el-auth-logo {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: #fff;
  padding: 5px;
  object-fit: contain;
}
body.el-auth .el-auth-brand h1 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.01em;
  color: #fff;
  margin: 20px 0 4px;
}
body.el-auth .el-auth-brand .el-auth-org {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.6;
  color: #D9C2E8;
  margin: 0;
}
body.el-auth .el-auth-points {
  list-style: none;
  margin: 28px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid rgba(255, 255, 255, .16);
  display: grid;
  gap: 14px;
}
body.el-auth .el-auth-points li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13.5px;
  font-weight: 600;
  color: #F5EBFA;
}
body.el-auth .el-auth-points li i { color: #FDCB2C; margin-top: 2px; }
body.el-auth .el-auth-points li small { display: block; font-weight: 500; color: #C9AEDB; font-size: 12px; }
body.el-auth .el-auth-brandfoot {
  margin-top: auto;
  padding-top: 28px;
  font-size: 11.5px;
  font-weight: 500;
  color: #A98FBB;
}
body.el-auth .el-auth-form { padding: 40px 44px; }
body.el-auth .el-auth-form h2 {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -.01em;
  margin: 0 0 4px;
}
body.el-auth .el-auth-form .el-auth-sub {
  font-size: 13.5px;
  color: var(--el-muted);
  margin: 0 0 22px;
}
body.el-auth .el-field { margin-bottom: 14px; }
body.el-auth .el-field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}
body.el-auth .el-field .form-control {
  min-height: 46px;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  font-size: 14px;
  box-shadow: none;
}
body.el-auth .el-field .form-control:focus {
  border-color: var(--el-accent);
  outline: 2px solid rgba(142, 34, 195, .25);
}
.el-passwrap { position: relative; }
.el-passwrap .form-control { padding-right: 48px; }
.el-passtoggle {
  position: absolute;
  right: 6px;
  top: 6px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--el-muted, #5B6B7F);
}
.el-passtoggle:hover { background: #EFF4F8; color: var(--el-ink, #0F1E2E); }
body.el-auth .el-auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 18px;
  font-size: 13px;
}
body.el-auth .el-auth-row .form-check { display: flex; align-items: center; gap: 8px; }
body.el-auth .el-auth-row a { color: var(--el-accent-strong); font-weight: 700; text-decoration: none; }
body.el-auth .el-auth-row a:hover { text-decoration: underline; }
body.el-auth .el-auth-submit {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  background: var(--el-accent);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}
body.el-auth .el-auth-submit:hover { background: var(--el-accent-strong); }
body.el-auth .el-auth-alt {
  text-align: center;
  font-size: 13.5px;
  color: var(--el-muted);
  margin: 18px 0 0;
}
body.el-auth .el-auth-alt a { color: var(--el-accent-strong); font-weight: 800; text-decoration: none; }
body.el-auth .el-auth-alt a:hover { text-decoration: underline; }
body.el-auth .el-auth-alert {
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 14px;
  margin: 0 0 16px;
  border: 1px solid;
}
body.el-auth .el-auth-alert.warn { background: var(--el-warn-soft); border-color: #F2D3A6; color: #7C3F06; }
body.el-auth .el-auth-alert.err { background: var(--el-danger-soft); border-color: #F3C6C1; color: #7A1F16; }
body.el-auth .el-auth-alert.ok { background: var(--el-ok-soft); border-color: #BFE6CC; color: #14532D; }

@media (max-width: 860px) {
  body.el-auth .el-auth-card { grid-template-columns: 1fr; }
  body.el-auth .el-auth-brand { padding: 28px 24px; }
  body.el-auth .el-auth-points { display: none; }
  body.el-auth .el-auth-brandfoot { display: none; }
  body.el-auth .el-auth-form { padding: 28px 22px; }
}

/* ==========================================================================
   KONSELING — header sesi, stepper status, chat, locked banner.
   Flat mengikuti token GamaPath (tanpa gradien/glow).
   ========================================================================== */
body.el-shell .el-session-head { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
body.el-shell .el-session-id { flex: 1 1 auto; min-width: 220px; }
body.el-shell .el-session-id h3 { font-size: 20px; font-weight: 800; letter-spacing: -.01em; margin: 0; }
body.el-shell .el-topic-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 800;
  background: var(--el-accent-soft); color: var(--el-accent-strong);
  border: 1px solid #E3C9F2; border-radius: 999px; padding: 3px 11px;
}
body.el-shell .el-topic-chip i { font-size: 11px; }
body.el-shell .el-session-sub { font-size: 13px; color: var(--el-muted); font-weight: 600; margin-top: 6px; }
body.el-shell .el-session-date { font-size: 12px; color: var(--el-faint); font-weight: 600; margin-top: 2px; }

/* stepper Pending -> In Progress -> Finish */
body.el-shell .el-steps { display: flex; align-items: flex-start; gap: 0; margin: 16px 0 4px; }
body.el-shell .el-steps .el-step {
  flex: 1 1 0;
  width: auto;
  height: auto;
  min-width: 0;
  max-width: none;
  border-radius: 0;
  background: transparent;
  display: block;
  text-align: center;
  position: relative;
}
body.el-shell .el-steps .el-step::before {
  content: ""; position: absolute; top: 13px; left: -50%; width: 100%;
  border-top: 2px solid var(--el-line); z-index: 0;
}
body.el-shell .el-steps .el-step:first-child::before { display: none; }
body.el-shell .el-steps .el-step.done::before { border-top-color: var(--el-ok); }
body.el-shell .el-steps .el-step-dot {
  width: 28px; height: 28px; border-radius: 50%;
  background: #fff; border: 2px solid var(--el-line);
  color: var(--el-faint); font-size: 12px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  position: relative; z-index: 1;
}
body.el-shell .el-steps .el-step.done .el-step-dot { background: var(--el-ok); border-color: var(--el-ok); color: #fff; }
body.el-shell .el-steps .el-step.current .el-step-dot { background: var(--el-accent-soft); border-color: var(--el-accent); color: var(--el-accent-strong); }
body.el-shell .el-steps .el-step small { display: block; font-size: 11px; font-weight: 700; color: var(--el-muted); margin-top: 5px; }
body.el-shell .el-steps .el-step.current small { color: var(--el-accent-strong); }
body.el-shell .el-steps .el-step.done small { color: var(--el-ok); }
@media (max-width: 575.98px) {
  body.el-shell .el-steps .el-step small { font-size: 10px; }
}

/* segmented nav pills / tabs */
body.el-shell .el-tabs {
  background: #F1F5F9;
  padding: 4px;
  border-radius: 10px;
  gap: 4px;
  display: inline-flex;
  border: 1px solid var(--el-line);
}
body.el-shell .el-tabs .nav-link {
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--el-muted);
  padding: 7px 16px;
  transition: all .2s ease;
  border: 0;
  background: transparent;
}
body.el-shell .el-tabs .nav-link:hover {
  color: var(--el-ink);
}
body.el-shell .el-tabs .nav-link.active {
  background: #fff;
  color: var(--el-accent-strong);
  box-shadow: 0 2px 6px rgba(15, 30, 46, .08);
}

/* locked banner */
body.el-shell .el-locked {
  display: flex; gap: 12px; align-items: flex-start;
  background: #F8FAFC; border: 1px solid var(--el-line); border-radius: var(--el-radius);
  padding: 12px 14px; margin-bottom: 14px; font-size: 13px;
}
body.el-shell .el-locked-icon {
  width: 34px; height: 34px; border-radius: 9px; flex: 0 0 34px;
  background: var(--el-accent-soft); border: 1px solid #E3C9F2;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--el-accent-strong); font-size: 14px;
}
body.el-shell .el-locked strong { display: block; font-size: 13.5px; color: var(--el-ink); }
body.el-shell .el-locked p { margin: 2px 0 0; color: var(--el-muted); font-weight: 500; font-size: 12.5px; }

/* chat berbasis peran: DPA kiri (netral), Mahasiswa kanan (brand) */
body.el-shell .el-chat { display: flex; flex-direction: column; gap: 14px; padding: 4px 2px; }
body.el-shell .el-msg { display: flex; gap: 9px; align-items: flex-end; max-width: 80%; }
body.el-shell .el-msg-dosen { align-self: flex-start; }
body.el-shell .el-msg-mhs { align-self: flex-end; flex-direction: row-reverse; }
body.el-shell .el-msg-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: 0 0 32px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; letter-spacing: .02em;
}
body.el-shell .el-msg-dosen .el-msg-avatar { background: #E7D9F2; color: var(--el-accent-strong); }
body.el-shell .el-msg-mhs .el-msg-avatar { background: var(--el-accent); color: #fff; }
body.el-shell .el-msg-body { min-width: 0; }
body.el-shell .el-msg-meta {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 11.5px; font-weight: 600; color: var(--el-muted); margin: 0 2px 4px;
}
body.el-shell .el-msg-mhs .el-msg-meta { justify-content: flex-end; }
body.el-shell .el-role {
  font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; border: 1px solid transparent; line-height: 1.4;
}
body.el-shell .el-role-dosen { background: var(--el-accent-soft); color: var(--el-accent-strong); border-color: #E3C9F2; }
body.el-shell .el-role-mhs { background: #E8EEF4; color: #33475F; border-color: var(--el-line); }
body.el-shell .el-msg-time { font-weight: 500; color: var(--el-faint); }
body.el-shell .el-msg-bubble {
  border-radius: 12px; padding: 10px 14px;
  font-size: 14px; font-weight: 400; line-height: 1.6;
  overflow-wrap: anywhere;
}
body.el-shell .el-msg-dosen .el-msg-bubble {
  background: #EFF2F6; border: 1px solid var(--el-line); color: var(--el-ink);
  border-bottom-left-radius: 4px;
}
body.el-shell .el-msg-mhs .el-msg-bubble {
  background: var(--el-accent-soft); border: 1px solid var(--el-line); color: var(--el-ink);
  border-bottom-right-radius: 4px;
}
body.el-shell .el-msg-bubble p { margin: 0; color: inherit; font-size: inherit; font-weight: inherit; }
/* chip lampiran kecil di dalam bubble */
body.el-shell .el-attach-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; line-height: 1.4;
  padding: 5px 12px; border-radius: 999px; margin-top: 8px;
  text-decoration: none; white-space: nowrap;
}
body.el-shell .el-msg-dosen .el-attach-chip {
  background: #fff; border: 1px solid var(--el-line); color: #000;
}
body.el-shell .el-msg-dosen .el-attach-chip:hover { border-color: var(--el-accent); background: var(--el-accent-soft); }
body.el-shell .el-msg-mhs .el-attach-chip {
  background: #fff; border: 1px solid var(--el-line); color: #000;
}
body.el-shell .el-msg-mhs .el-attach-chip:hover { background: var(--el-accent-soft); border-color: var(--el-accent); }
body.el-shell .el-attach-chip i { font-size: 11px; }
@media (max-width: 575.98px) {
  body.el-shell .el-msg { max-width: 94%; }
  body.el-shell .el-chat { gap: 12px; }
}

/* mobile sidenav toggler touch target >= 44x44px and visible high-contrast bars */
body.el-shell .el-sidenav-toggle-btn,
body.el-shell #iconNavbarSidenav {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 44px !important;
  min-height: 44px !important;
  padding: 8px !important;
  border-radius: 8px !important;
  transition: background-color .15s ease;
}
body.el-shell .el-sidenav-toggle-btn:hover,
body.el-shell #iconNavbarSidenav:hover {
  background: rgba(15, 30, 46, .06) !important;
}
body.el-shell #iconNavbarSidenav .sidenav-toggler-line,
body.el-shell .el-sidenav-toggle-btn .sidenav-toggler-line {
  background: #0F1E2E !important;
  background-color: #0F1E2E !important;
}

@media (max-width: 575.98px) {
  body.el-shell .el-actionbar {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 10px;
    padding: 12px 14px;
  }
  body.el-shell .el-actionbar .spacer,
  body.el-shell .el-actionbar .el-spacer {
    display: none;
  }
  body.el-shell .el-actionbar .btn {
    width: 100%;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
  }
  body.el-shell .dataTables_wrapper .dataTables_paginate {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
  }
  body.el-shell .dataTables_wrapper .dataTables_paginate .paginate_button {
    min-width: 44px !important;
    min-height: 44px !important;
    font-size: 13px !important;
  }
  body.el-shell .el-breadcrumb-nav {
    max-width: 170px;
    overflow: hidden;
  }
  body.el-shell .el-breadcrumb-nav .breadcrumb {
    overflow: hidden;
    text-overflow: ellipsis;
  }
  body.el-shell .el-breadcrumb-nav .breadcrumb-item.active {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
  }
  body.el-shell .el-breadcrumb-nav .el-topbar-title {
    max-width: 95px;
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
  }
  /* Dropdown mobile positioning anchored neatly under userchip without covering breadcrumb */
  body.el-shell .el-usermenu {
    right: 0 !important;
    left: auto !important;
    top: 100% !important;
    margin-top: 8px !important;
    max-width: calc(100vw - 28px) !important;
  }
}

/* mobile */
@media (max-width: 1199.98px) {
  body.el-shell .main-content { margin-left: 0 !important; }
  body.el-shell .sidenav { box-shadow: 0 12px 32px rgba(15, 30, 46, .18) !important; }
  body.el-shell .el-topbar { margin: 0; border-radius: 0 !important; }
  body.el-shell .el-userchip-meta { display: none; }
  body.el-shell .card-body { padding: 14px !important; }
  body.el-shell .el-actionbar { margin: 14px -14px -14px; }
}

/* ==========================================================================
   EN6 - Aksi massal (bulk action bar)
   Dipakai oleh app/Views/partials/bulk-bar.php + initBulkSelect() di
   admin-patologi.js. Form diberi atribut `hidden` saat tidak ada pilihan,
   sehingga tidak perlu kelas terpisah untuk kondisi tersembunyi.
   ========================================================================== */
body.el-shell .el-bulkbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 0 0 14px;
  padding: 10px 14px;
  background: var(--el-accent-soft);
  border: 1px solid var(--el-line);
  border-left: 3px solid var(--el-accent);
  border-radius: var(--el-radius);
  box-shadow: var(--el-shadow);
}

body.el-shell .el-bulkbar[hidden] { display: none !important; }

/* Masalah 6: bar ini berada di atas tabel, jadi saat pengguna menggulir jauh
   ke bawah (mis. 50-100 baris per halaman) tombol aksinya tertinggal di luar
   layar. Jadikan sticky agar selalu terjangkau selama tabel digulir.
   Topbar admin tidak sticky (ikut tergulir), sehingga offset kecil sudah
   cukup dan bar tidak tertutup navbar. `z-index` sengaja lebih rendah dari
   dropdown/modal (>= 1000) agar menu aksi baris tetap tampil di atasnya. */
body.el-shell .el-bulkbar:not([hidden]) {
  position: sticky;
  top: 12px;
  z-index: 40;
}

body.el-shell .el-bulkbar-count {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  color: var(--el-muted);
  font-size: .875rem;
  line-height: 1.3;
}

body.el-shell .el-bulkbar-count strong {
  color: var(--el-accent-strong);
  font-size: 1.0625rem;
  font-variant-numeric: tabular-nums;
}

body.el-shell .el-bulkbar-sep {
  width: 1px;
  align-self: stretch;
  min-height: 20px;
  background: var(--el-line);
}

/* Indikator pasif: berapa baris terpilih yang saat ini tidak tampil di layar
   karena filter/pencarian/paginasi. Sengaja bukan tombol - aksi massal tetap
   hanya berlaku untuk baris yang terlihat (tidak ada seleksi lintas halaman
   di sisi server). Chip ini hanya memberi tahu pengguna bahwa ada pilihan
   tersembunyi, agar angka penghitung yang lebih besar dari baris tercentang
   di layar tidak membingungkan. */
body.el-shell .el-bulkbar-offpage {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px 3px 10px;
  border: 1px solid var(--el-line);
  border-radius: 999px;
  background: var(--el-surface, #fff);
  color: var(--el-muted);
  font-size: .8125rem;
  line-height: 1.4;
  white-space: nowrap;
}

body.el-shell .el-bulkbar-offpage[hidden] { display: none !important; }

body.el-shell .el-bulkbar-offpage-count {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--el-accent-strong);
}

body.el-shell .el-bulkbar-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

body.el-shell .el-bulkbar-hint {
  flex-basis: 100%;
  margin: 0;
  color: var(--el-faint);
  font-size: .8125rem;
  line-height: 1.35;
}

/* Tombol aksi massal: varian yang tidak ada di Argon, jadi didefinisikan di sini. */
body.el-shell .el-bulkbar .btn-bulk-ok,
body.el-shell .el-bulkbar .btn-bulk-danger,
body.el-shell .el-bulkbar .btn-ghost-el {
  min-height: 38px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: var(--el-radius);
  font-size: .875rem;
  font-weight: 600;
  box-shadow: none;
}

body.el-shell .el-bulkbar .btn-bulk-ok {
  background: var(--el-ok-soft);
  border-color: var(--el-ok);
  color: var(--el-ok);
}
body.el-shell .el-bulkbar .btn-bulk-ok:hover:not(:disabled),
body.el-shell .el-bulkbar .btn-bulk-ok:focus-visible:not(:disabled) {
  background: var(--el-ok);
  border-color: var(--el-ok);
  color: #fff;
}

body.el-shell .el-bulkbar .btn-bulk-danger {
  background: var(--el-danger-soft);
  border-color: var(--el-danger);
  color: var(--el-danger);
}
body.el-shell .el-bulkbar .btn-bulk-danger:hover:not(:disabled),
body.el-shell .el-bulkbar .btn-bulk-danger:focus-visible:not(:disabled) {
  background: var(--el-danger);
  border-color: var(--el-danger);
  color: #fff;
}

body.el-shell .el-bulkbar .btn-ghost-el {
  background: transparent;
  border-color: var(--el-line);
  color: var(--el-muted);
}
body.el-shell .el-bulkbar .btn-ghost-el:hover:not(:disabled) {
  border-color: var(--el-accent);
  color: var(--el-accent-strong);
}

/* Nonaktif = tidak ada pilihan. Tetap terbaca, tanpa bayangan mengambang. */
body.el-shell .el-bulkbar .btn:disabled,
body.el-shell .el-bulkbar .btn.disabled {
  background: var(--el-surface);
  border-color: var(--el-line);
  color: var(--el-faint);
  opacity: .75;
  box-shadow: none;
  cursor: not-allowed;
}

/* Kolom checkbox: sempit, konsisten dengan header DataTables.
   `box-sizing: border-box` wajib: Argon me-reset `th` ke content-box, sehingga
   width 42px + padding melebar jadi 84px (terukur di browser sebelum perbaikan). */
body.el-shell table.dataTable .el-col-check {
  box-sizing: border-box;
  width: 42px;
  min-width: 42px;
  max-width: 42px;
  padding: 10px 8px !important;
  text-align: center;
  vertical-align: middle;
}

body.el-shell .el-col-check .el-check-all,
body.el-shell .el-col-check .el-check-row {
  width: 16px;
  height: 16px;
  margin: 0;
  vertical-align: middle;
  cursor: pointer;
  accent-color: var(--el-accent);
}

body.el-shell .el-col-check .el-check-all:disabled,
body.el-shell .el-col-check .el-check-row:disabled {
  cursor: not-allowed;
  opacity: .5;
}

/* Kesalahan `state save` DataTables saat kolom checkbox ikut tersimpan. */
body.el-shell tr.el-row-selected > td {
  background: var(--el-accent-soft) !important;
}
body.el-shell tr.el-row-selected > td:first-child {
  box-shadow: inset 3px 0 0 var(--el-accent);
}

/* Ikon buka/tutup baris Responsive (`.dtr-control`).
   Saat kolom disembunyikan (layar sempit), DataTables menaruh ikon +/-
   di kolom terlihat pertama. `details.type: 'inline'` mengabaikan
   `details.target`, dan pada tabel ber-aksi massal kolom pertama itu adalah
   kolom checkbox `el-col-check` - sehingga ikon dan checkbox berbagi satu
   sel. Bawaan DataTables hanya menambah `padding-left: 30px` pada sel
   tersebut, tetapi aturan `.el-col-check` di atas memakai `!important`
   sehingga padding itu kalah; ikon hijau lalu tergambar menimpa checkbox
   (Masalah 1 pada audit UX).

   Kolom 42px memang tidak cukup untuk checkbox 16px + ikon 14px berdampingan,
   jadi khusus sel yang benar-benar memikul ikon ini, lebarnya ditambah dan
   checkbox digeser ke kanan ikon. Lebar hanya bertambah saat ikon muncul
   (tabel dalam keadaan `collapsed`), jadi tampilan desktop lebar tidak
   berubah. */
body.el-shell table.dataTable.dtr-inline.collapsed .el-col-check.dtr-control {
  width: 54px;
  min-width: 54px;
  max-width: 54px;
  padding-left: 26px !important;
}
/* Perkecil & rapikan ikon agar pas di gutter, tidak menyentuh checkbox. */
body.el-shell table.dataTable.dtr-inline.collapsed > tbody > tr > td.el-col-check.dtr-control:before,
body.el-shell table.dataTable.dtr-inline.collapsed > tbody > tr > th.el-col-check.dtr-control:before {
  left: 6px;
  height: 14px;
  width: 14px;
  margin-top: -7px;
  font-size: 12px;
  line-height: 14px;
  border-radius: 14px;
  text-indent: 2px;
}

@media (max-width: 575.98px) {
  body.el-shell .el-bulkbar {
    align-items: stretch;
    gap: 8px 10px;
    padding: 10px 12px;
  }
  body.el-shell .el-bulkbar-sep { display: none; }
  body.el-shell .el-bulkbar-count { flex-basis: 100%; }
  body.el-shell .el-bulkbar-actions {
    flex-basis: 100%;
    margin-left: 0;
  }
  body.el-shell .el-bulkbar-actions .btn {
    flex: 1 1 auto;
    min-height: 44px;
    justify-content: center;
  }
}
