@import url('https://fonts.googleapis.com/css2?family=Sora:wght@600;700;800&family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@500;600&display=swap');

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink-900);
}

:focus-visible { outline: 2px solid var(--gold-500); outline-offset: 2px; }

a { color: inherit; text-decoration: none; }

/* ---------------------------------------------------------
   Shell: sidebar + topbar + content
--------------------------------------------------------- */
.admin-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--navy-900);
  color: #fff;
  padding: var(--sp-5) 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar__brand {
  padding: 0 var(--sp-5) var(--sp-5);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: var(--sp-4);
}

.sidebar__brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
}

.sidebar__brand-row img { height: 34px; width: auto; flex-shrink: 0; }

.sidebar__brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.2;
  color: #fff;
  white-space: nowrap;
}

.sidebar__brand-tagline {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.66rem;
  color: var(--gold-300);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar__nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 var(--sp-3);
}

.sidebar__link {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-3);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  border-left: 3px solid transparent;
  transition: background .15s ease, color .15s ease;
}

.sidebar__link:hover { background: rgba(255,255,255,0.06); color: #fff; }

.sidebar__link.is-active {
  background: rgba(201,162,39,0.12);
  border-left-color: var(--gold-500);
  color: #fff;
}

.sidebar__link .icon { width: 18px; text-align: center; }

/* ---- Grup menu bertingkat (Master Data, Pengaturan) ---- */
.sidebar__group-toggle {
  width: 100%;
  background: none;
  border: 0;
  border-left: 3px solid transparent;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.sidebar__chevron {
  margin-left: auto;
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.7;
  transition: transform .2s ease;
}

.sidebar__group.is-open > .sidebar__group-toggle { color: #fff; }
.sidebar__group.is-open .sidebar__chevron { transform: rotate(225deg); }

.sidebar__submenu {
  display: none;
  flex-direction: column;
  gap: 2px;
  margin: 2px 0 4px;
}
.sidebar__group.is-open .sidebar__submenu { display: flex; }

.sidebar__link--child {
  padding-left: calc(var(--sp-3) + 18px + var(--sp-3)); /* sejajar dengan teks menu induk */
  font-size: 0.84rem;
}

.sidebar__footer {
  padding: var(--sp-4) var(--sp-5) 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: var(--sp-4);
}

.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--gold-500);
  color: var(--navy-900);
}

.sidebar__user {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.85);
  margin-top: var(--sp-2);
}

.sidebar__logout {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: var(--sp-3);
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255,255,255,0.55);
  border: 1px solid transparent;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.sidebar__logout-icon { flex-shrink: 0; opacity: 0.85; }

.sidebar__logout:hover {
  background: rgba(179,56,44,0.14);
  border-color: rgba(179,56,44,0.35);
  color: #F3AEA6;
}

.sidebar__logout:active,
.sidebar__logout:focus-visible {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

/* Backdrop gelap di belakang sidebar saat dibuka di layar sempit (dibuat lewat JS) */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11,35,64,0.5);
  z-index: 40; /* di bawah .sidebar (z-index:50), di atas konten */
  display: none;
}
.sidebar-backdrop.is-open { display: block; }

/* Topbar */
.topbar {
  height: var(--topbar-height);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--sp-6);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy-900);
}

.topbar__actions { display: flex; align-items: center; gap: var(--sp-4); }

.bell {
  position: relative;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--navy-100);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--navy-700);
}

.bell__badge {
  position: absolute;
  top: -2px; right: -2px;
  background: var(--danger);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
}

.bell-dropdown {
  position: absolute;
  top: calc(var(--topbar-height) + 4px);
  right: var(--sp-6);
  width: 320px;
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
  display: none;
  overflow: hidden;
  z-index: 20;
}
.bell-dropdown.is-open { display: block; }

.bell-dropdown__head {
  padding: var(--sp-3) var(--sp-4);
  font-weight: 700;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bell-dropdown__head button {
  background: none; border: none; color: var(--navy-700);
  font-size: 0.75rem; font-weight: 600; cursor: pointer;
}

.notif-item {
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
  display: flex;
  gap: 10px;
  cursor: pointer;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--bg); }
.notif-item.is-unread .notif-dot { background: var(--navy-700); }

.notif-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--line-strong);
  margin-top: 5px; flex-shrink: 0;
}

.notif-item__text strong { color: var(--ink-900); }
.notif-item__time { color: var(--ink-300); font-size: 0.72rem; margin-top: 2px; }

.avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--navy-700);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem;
  font-family: var(--font-display);
}

/* Content area */
.content { padding: var(--sp-6); }

/* ---------------------------------------------------------
   Stat cards (dashboard)
--------------------------------------------------------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: var(--sp-5);
  border-top: 3px solid var(--gold-500);
}

.stat-card__label {
  font-size: 0.78rem;
  color: var(--ink-500);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stat-card__value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--navy-900);
  margin-top: var(--sp-1);
}

/* ---------------------------------------------------------
   Panel / card generic
--------------------------------------------------------- */
.panel {
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: var(--sp-5);
  margin-bottom: var(--sp-5);
}

.panel__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-4);
  flex-wrap: wrap;
  gap: var(--sp-3);
}

.panel__title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy-900);
}

/* ---------------------------------------------------------
   Table
--------------------------------------------------------- */
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.data-table th {
  text-align: left;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-500);
  padding: var(--sp-3);
  border-bottom: 2px solid var(--line);
}

.data-table td {
  padding: var(--sp-3);
  border-bottom: 1px solid var(--line);
  color: var(--ink-700);
}

.data-table tr:hover td { background: var(--bg); }

.data-table .mono { font-family: var(--font-mono); font-size: 0.82rem; color: var(--navy-800); }

/* Badges status & priority & role */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.badge--review { background: var(--stamp-review-bg); color: var(--stamp-review); }
.badge--on_process { background: var(--stamp-process-bg); color: var(--stamp-process); }
.badge--finish { background: var(--stamp-finish-bg); color: var(--stamp-finish); }

.badge--low { background: var(--navy-100); color: var(--navy-700); }
.badge--medium { background: var(--gold-100); color: var(--gold-600); }
.badge--high { background: var(--danger-bg); color: var(--danger); }

.badge--role-staff_it { background: var(--navy-100); color: var(--navy-700); }
.badge--role-admin { background: var(--gold-100); color: var(--gold-600); }
.badge--role-spv_admin { background: var(--navy-900); color: #fff; }
.badge--role-staff_ga { background: var(--navy-100); color: var(--navy-700); }
.badge--role-leader_ga { background: var(--gold-100); color: var(--gold-600); }
.badge--role-manager_ga { background: var(--navy-900); color: #fff; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  border-radius: var(--radius-sm);
  padding: var(--sp-2) var(--sp-4);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background .15s ease, box-shadow .15s ease;
}

.btn-primary { background: var(--navy-900); color: #fff; }
.btn-primary:hover { background: var(--navy-800); }

.btn-secondary { background: var(--navy-100); color: var(--navy-700); }
.btn-secondary:hover { background: #dbe4ee; }

.btn-danger { background: var(--danger-bg); color: var(--danger); }
.btn-danger:hover { background: #f5d6d2; }

.btn-sm { padding: 6px 12px; font-size: 0.78rem; }

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-500);
  font-size: 0.95rem;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
}
.icon-btn:hover { background: var(--bg); color: var(--navy-800); }

/* Form fields (dipakai di modal & profile) */
.field { margin-bottom: var(--sp-4); }
.field label {
  display: block; font-size: 0.8rem; font-weight: 600;
  color: var(--ink-700); margin-bottom: var(--sp-2);
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 16px; /* wajib >=16px, kalau tidak Safari iOS auto-zoom saat field difokus */
  color: var(--ink-900);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--navy-600);
  box-shadow: 0 0 0 3px rgba(27,77,122,0.12);
}
.field textarea { min-height: 90px; resize: vertical; }

/* Filter input/select mandiri (di luar .field, dipakai di panel head) */
.filter-select,
input[type="month"] {
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--ink-700);
  background: var(--surface);
}
.filter-select:focus, input[type="month"]:focus {
  outline: none;
  border-color: var(--navy-600);
  box-shadow: 0 0 0 3px rgba(27,77,122,0.12);
}

/* Toggle switch (sidebar settings) */
.toggle {
  position: relative;
  display: inline-block;
  width: 42px; height: 24px;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle .slider {
  position: absolute; cursor: pointer; inset: 0;
  background: var(--line-strong);
  border-radius: 999px;
  transition: background .2s ease;
}
.toggle .slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s ease;
  box-shadow: var(--shadow-sm);
}
.toggle input:checked + .slider { background: var(--navy-700); }
.toggle input:checked + .slider::before { transform: translateX(18px); }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(11,35,64,0.45);
  display: none;
  align-items: center; justify-content: center;
  z-index: 100;
  padding: var(--sp-4);
}
.modal-overlay.is-open { display: flex; }

.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  overflow-y: auto;
  animation: modalIn .2s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal__head {
  padding: var(--sp-5) var(--sp-5) var(--sp-3);
  display: flex; justify-content: space-between; align-items: flex-start;
  border-bottom: 1px solid var(--line);
}

.modal__title { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--navy-900); }
.modal__close { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: var(--ink-500); }
.modal__body { padding: var(--sp-5); }
.modal__footer { padding: var(--sp-4) var(--sp-5); border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: var(--sp-3); }

/* Empty state */
.empty-state {
  text-align: center;
  padding: var(--sp-7) var(--sp-4);
  color: var(--ink-300);
}
.empty-state .icon { font-size: 2rem; margin-bottom: var(--sp-3); }
.empty-state p { font-size: 0.88rem; }

/* Login page (tidak pakai shell sidebar) */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy-900);
  background-image: radial-gradient(circle at 20% 20%, rgba(201,162,39,0.08), transparent 40%);
}

.login-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-7) var(--sp-6);
  width: 100%;
  max-width: 380px;
  border-top: 4px solid var(--gold-500);
}

.login-card img { height: 48px; margin: 0 auto var(--sp-4); display: block; }
.login-card h1 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  text-align: center;
  color: var(--navy-900);
  margin-bottom: var(--sp-1);
}
.login-card p.subtitle { text-align: center; font-size: 0.8rem; color: var(--ink-500); margin-bottom: var(--sp-5); }

/* ---------------------------------------------------------
   Responsive — tablet & bawahnya (sidebar jadi off-canvas)
--------------------------------------------------------- */
@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    width: 240px;
    transform: translateX(-100%);
    transition: transform .2s ease;
    z-index: 50;
  }
  .sidebar.is-open { transform: translateX(0); }
  .topbar { padding: 0 var(--sp-4); }
  .content { padding: var(--sp-4); }

  /* Tombol hamburger: HTML-nya ditulis dengan inline style="display:none" (default
     desktop, sidebar selalu terlihat). !important di sini WAJIB supaya bisa
     menimpa inline style tersebut begitu layar masuk ke lebar mobile/tablet. */
  #menu-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    font-size: 1.15rem;
  }
}

/* ---------------------------------------------------------
   Search box (toolbar tabel — dipakai di tickets.html & dashboard.html)
--------------------------------------------------------- */
.search-input-wrap {
  position: relative;
}
.search-input-wrap input[type="text"] {
  padding: 8px 12px 8px 30px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--ink-700);
  background: var(--surface);
  width: 220px;
}
.search-input-wrap input[type="text"]:focus {
  outline: none;
  border-color: var(--navy-600);
  box-shadow: 0 0 0 3px rgba(27,77,122,0.12);
}
.search-input-wrap::before {
  content: "\1F50D";
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.78rem;
  color: var(--ink-300);
  pointer-events: none;
}

/* ---------------------------------------------------------
   Sortable table header (klik untuk ascending/descending)
--------------------------------------------------------- */
.data-table th.sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.data-table th.sortable:hover {
  color: var(--navy-800);
}
.data-table th.sortable .sort-icon {
  display: inline-block;
  margin-left: 4px;
  font-size: 0.65rem;
  color: var(--ink-300);
}
.data-table th.sortable.sort-active .sort-icon {
  color: var(--navy-700);
}

/* ---------------------------------------------------------
   Pagination bar (di bawah tabel — hanya dipakai di tickets.html)
--------------------------------------------------------- */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
  font-size: 0.82rem;
  color: var(--ink-500);
}

.pagination-bar .rows-select-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pagination-bar .rows-select-wrap select {
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--ink-700);
  background: var(--surface);
}
.pagination-bar .rows-select-wrap select:focus {
  outline: none;
  border-color: var(--navy-600);
  box-shadow: 0 0 0 3px rgba(27,77,122,0.12);
}

.pagination-bar .page-controls {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.pagination-bar .page-controls button {
  background: var(--navy-100);
  color: var(--navy-700);
  border: none;
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 0.8rem;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background .15s ease;
}
.pagination-bar .page-controls button:hover:not(:disabled) {
  background: #dbe4ee;
}
.pagination-bar .page-controls button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ---------------------------------------------------------
   Row actions — grup tombol aksi tabel (Profile/Cabang/Kategori)
--------------------------------------------------------- */
.row-actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.row-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-500);
  cursor: pointer;
  transition: background .15s ease, color .15s ease, transform .12s ease;
}

.row-action-btn svg {
  width: 15px;
  height: 15px;
  display: block;
}

.row-action-btn:hover {
  transform: translateY(-1px);
}
.row-action-btn:active {
  transform: translateY(0);
}

.row-action-btn--edit:hover   { background: var(--navy-100); color: var(--navy-800); }
.row-action-btn--reset:hover  { background: var(--gold-100); color: var(--gold-600); }
.row-action-btn--delete:hover { background: var(--danger-bg); color: var(--danger); }

/* ---------------------------------------------------------
   Lampiran tiket (dalam modal detail Tiket)
--------------------------------------------------------- */
.attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

.attachment-empty {
  font-size: 0.85rem;
  color: var(--ink-300);
  padding: var(--sp-2) 0;
}

.attachment-item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 6px 12px 6px 6px;
  text-decoration: none;
  background: var(--bg);
  max-width: 100%;
  transition: border-color .15s ease, background .15s ease;
}

.attachment-item:hover {
  border-color: var(--navy-600);
  background: var(--navy-100);
}

.attachment-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: var(--navy-100);
}

.attachment-thumb--video {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy-700);
  font-size: 1rem;
}

.attachment-meta {
  display: flex;
  flex-direction: column;
  font-size: 0.76rem;
  line-height: 1.35;
}

.attachment-type { font-weight: 600; color: var(--navy-800); }
.attachment-size { color: var(--ink-300); }

/* ---------------------------------------------------------
   Hint validasi status di modal detail Tiket
--------------------------------------------------------- */
.field-hint {
  font-size: 0.76rem;
  color: var(--ink-300);
  margin-top: 6px;
  line-height: 1.4;
}

.field-hint.is-warning {
  color: var(--danger);
  font-weight: 600;
}

#modal-resolution-field textarea {
  resize: vertical;
  min-height: 72px;
}

#modal-resolution-hint {
  color: var(--danger);
  font-weight: 600;
}

/* ---------------------------------------------------------
   Mobile (≤640px): stat-grid 2 kolom tetap, tabel jadi kartu
   bertumpuk (card-view), area sentuh tombol diperbesar.
--------------------------------------------------------- */
@media (max-width: 640px) {
  /* Stat cards: dikunci 2 kolom (bukan auto-fit) supaya rapi & ringkas di HP */
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-3);
  }
  .stat-card { padding: var(--sp-4); }
  .stat-card__value { font-size: 1.5rem; }
  .stat-card__label { font-size: 0.7rem; }

  .panel { padding: var(--sp-4); }

  /* Toolbar panel (search + filter) full-width & bertumpuk rapi */
  .panel__head { flex-direction: column; align-items: stretch; }
  .panel__head > div { width: 100%; }
  .search-input-wrap input[type="text"] { width: 100%; }

  /* --- Tabel -> kartu bertumpuk --- */
  .data-table thead { display: none; }

  .data-table, .data-table tbody, .data-table tr, .data-table td {
    display: block;
    width: 100%;
  }

  .data-table tr {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    margin-bottom: var(--sp-3);
    padding: var(--sp-2) var(--sp-3);
  }
  .data-table tr:last-child { margin-bottom: 0; }
  .data-table tr:hover td { background: transparent; }

  .data-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
    text-align: right;
  }
  .data-table td:last-child {
    border-bottom: none;
    justify-content: flex-end;
  }

  .data-table td::before {
    content: attr(data-label);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--ink-500);
    text-align: left;
    flex-shrink: 0;
    margin-right: var(--sp-3);
  }

  /* Baris "Tidak ada data" (colspan) jangan ikut dibungkus jadi kartu penuh label kosong */
  .data-table td .empty-state { text-align: center; }
  .data-table td .empty-state::before { content: none; }

  /* Pagination bar bertumpuk rapi di layar sempit */
  .pagination-bar { flex-direction: column; align-items: stretch; text-align: center; }
  .pagination-bar .page-controls { justify-content: center; }

  /* Perbesar target sentuh tombol & aksi baris */
  .btn { min-height: 42px; }
  .btn-sm { min-height: 36px; }
  .row-action-btn { width: 38px; height: 38px; }
  .row-action-btn svg { width: 17px; height: 17px; }
}
/* ---------------------------------------------------------
   History > Activity Logs & tautan "Lihat semua" di dropdown lonceng
--------------------------------------------------------- */
#notif-list { max-height: 420px; overflow-y: auto; }

.bell-dropdown__foot {
  display: block;
  padding: var(--sp-3) var(--sp-4);
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--navy-700);
  text-decoration: none;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.bell-dropdown__foot:hover { background: var(--bg); }

.history-row--unread { cursor: pointer; }
.history-row--unread .history-message { font-weight: 600; color: var(--ink-900); }
.history-read { color: var(--ink-500); font-size: 0.8rem; }
.history-time-rel { color: var(--ink-300); font-size: 0.72rem; margin-top: 2px; }
