:root {
  --navy: #0f172a;
  --navy-2: #1e293b;
  --blue: #0284c7;
  --soft-blue: #e0f2fe;
  --green: #16a34a;
  --yellow: #ca8a04;
  --red: #dc2626;
  --gray: #64748b;
  --bg: #f5f7fb;
  --card: #ffffff;
  --line: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --shadow: 0 18px 40px rgba(15, 23, 42, .08);
  --radius: 22px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a { color: inherit; }

.app-shell {
  display: grid;
  grid-template-columns: 270px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: linear-gradient(180deg, var(--navy), #111827);
  color: white;
  padding: 22px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 28px;
}
.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-weight: 800;
  background: linear-gradient(135deg, #38bdf8, #22c55e);
}
.brand span { display: block; color: #cbd5e1; font-size: 12px; margin-top: 2px; }

.nav { display: grid; gap: 8px; }
.nav a {
  text-decoration: none;
  color: #dbeafe;
  padding: 12px 14px;
  border-radius: 14px;
  transition: .2s ease;
}
.nav a:hover { background: rgba(255,255,255,.10); transform: translateX(2px); }

.main { padding: 24px; min-width: 0; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.topbar h1 { margin: 0; font-size: 26px; }
.topbar p { margin: 6px 0 0; color: var(--muted); }
.user-pill {
  background: white;
  padding: 10px 14px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  display: grid;
  text-align: right;
}
.user-pill small { color: var(--muted); text-transform: capitalize; }

.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-6 { grid-column: span 6; }
.col-8 { grid-column: span 8; }
.col-12 { grid-column: span 12; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
.stat { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stat .icon { font-size: 30px; }
.stat h3 { margin: 0; font-size: 28px; }
.stat p { margin: 6px 0 0; color: var(--muted); }
.section-title { margin: 0 0 14px; font-size: 18px; }

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.form-grid .full { grid-column: span 2; }
label { display: block; font-weight: 700; font-size: 13px; margin-bottom: 7px; color: #334155; }
input, select, textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 12px 13px;
  font-size: 14px;
  background: white;
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(2,132,199,.12);
}
textarea { min-height: 94px; resize: vertical; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  text-decoration: none;
  background: var(--blue);
  color: white;
  font-weight: 800;
  cursor: pointer;
}
.btn:hover { filter: brightness(.94); }
.btn.secondary { background: #e2e8f0; color: #0f172a; }
.btn.danger { background: var(--red); }
.btn.green { background: var(--green); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }

.table-wrap { overflow-x: auto; border-radius: 18px; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; min-width: 850px; background: white; }
th, td { padding: 13px 14px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: top; }
th { background: #f8fafc; color: #334155; }
tr:last-child td { border-bottom: 0; }

.badge {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .02em;
  white-space: nowrap;
}
.badge.green { background: #dcfce7; color: #166534; }
.badge.blue { background: #dbeafe; color: #1d4ed8; }
.badge.yellow { background: #fef3c7; color: #92400e; }
.badge.red { background: #fee2e2; color: #991b1b; }
.badge.gray { background: #e2e8f0; color: #334155; }

.alert {
  border-radius: 16px;
  padding: 13px 15px;
  margin-bottom: 14px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}
.alert.error { background: #fef2f2; color: #991b1b; border-color: #fecaca; }

.public-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: radial-gradient(circle at top left, #38bdf8 0, transparent 33%), linear-gradient(135deg, #0f172a, #1e293b 58%, #0369a1);
}
.public-card {
  width: 100%;
  max-width: 560px;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 28px;
  padding: 24px;
  box-shadow: 0 24px 80px rgba(0,0,0,.35);
}
.public-badge {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--soft-blue);
  color: #0369a1;
  font-weight: 900;
  font-size: 12px;
  margin-bottom: 12px;
}
.public-card h1 { margin: 0 0 8px; font-size: 26px; }
.public-card .desc { margin: 0 0 20px; color: var(--muted); line-height: 1.5; }
.public-card .btn { width: 100%; margin-top: 4px; }
.public-footer { margin-top: 14px; text-align: center; font-size: 12px; color: var(--muted); }
.qr-box { display: grid; place-items: center; gap: 12px; padding: 18px; border-radius: 18px; background: #f8fafc; border: 1px dashed #cbd5e1; }
.qr-box img { width: 210px; height: 210px; }
.url-text { word-break: break-all; color: var(--muted); font-size: 13px; }

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
    border-radius: 0 0 24px 24px;
  }
  .nav { grid-template-columns: repeat(2, 1fr); }
  .main { padding: 18px; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .user-pill { text-align: left; }
  .col-3, .col-4, .col-6, .col-8 { grid-column: span 12; }
}

@media (max-width: 560px) {
  .nav { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: span 1; }
  .public-card { padding: 20px; border-radius: 24px; }
  .public-card h1 { font-size: 23px; }
  .topbar h1 { font-size: 23px; }
  .btn { width: 100%; }
  .actions { width: 100%; }
}


.top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.notif-wrap {
  position: relative;
}

.notif-btn {
  position: relative;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .08);
  cursor: pointer;
  font-size: 20px;
}

.notif-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notif-dropdown {
  display: none;
  position: absolute;
  top: 58px;
  right: 0;
  width: 360px;
  max-width: 88vw;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .18);
  z-index: 9999;
  overflow: hidden;
}

.notif-dropdown.show {
  display: block;
}

.notif-head {
  padding: 14px 16px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notif-head a {
  font-size: 12px;
  color: #2563eb;
  text-decoration: none;
}

.notif-item {
  padding: 13px 16px;
  border-bottom: 1px solid #f1f5f9;
}

.notif-item.unread {
  background: #eff6ff;
}

.notif-item strong {
  display: block;
  color: #0f172a;
  font-size: 14px;
  margin-bottom: 4px;
}

.notif-item p {
  margin: 0 0 5px;
  color: #475569;
  font-size: 13px;
  line-height: 1.4;
}

.notif-item small {
  color: #94a3b8;
  font-size: 11px;
}

.notif-empty {
  padding: 18px;
  color: #64748b;
  font-size: 13px;
  text-align: center;
}

@media (max-width: 768px) {
  .top-actions {
    gap: 8px;
  }

  .notif-btn {
    width: 44px;
    height: 44px;
    border-radius: 15px;
  }

  .notif-dropdown {
    right: -80px;
    width: 320px;
  }
}

.btn.delete {
  background: #7f1d1d;
  color: #ffffff;
}

.btn.delete:hover {
  background: #450a0a;
}


/* =========================
   MOBILE QR FORM VIEW
========================= */

.public-page {
  min-height: 100vh;
  padding: 24px 16px;
  background:
    radial-gradient(circle at top left, rgba(20, 184, 166, .18), transparent 32%),
    linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.public-card {
  width: 100%;
  max-width: 720px;
  background: rgba(255, 255, 255, .96);
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, .28);
  border: 1px solid rgba(226, 232, 240, .9);
}

.public-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 13px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.public-card h1 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 30px;
  line-height: 1.15;
}

.public-card .desc {
  margin: 0 0 24px;
  color: #64748b;
  line-height: 1.6;
  font-size: 15px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-grid .full {
  grid-column: 1 / -1;
}

.public-card label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  color: #334155;
  font-weight: 700;
}

.public-card input,
.public-card select,
.public-card textarea {
  width: 100%;
  min-height: 50px;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  padding: 13px 15px;
  font-size: 16px;
  color: #0f172a;
  background: #ffffff;
  outline: none;
  box-sizing: border-box;
}

.public-card textarea {
  min-height: 110px;
  resize: vertical;
}

.public-card input:focus,
.public-card select:focus,
.public-card textarea:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 4px rgba(2, 132, 199, .14);
}

.public-card input[type="file"] {
  padding: 12px;
  background: #f8fafc;
}

.public-card .btn {
  width: 100%;
  min-height: 54px;
  margin-top: 20px;
  border-radius: 18px;
  font-size: 16px;
  font-weight: 800;
}

.public-footer {
  margin-top: 18px;
  color: #64748b;
  text-align: center;
  font-size: 12px;
}

.alert {
  padding: 13px 15px;
  border-radius: 16px;
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
  margin-bottom: 18px;
  font-size: 14px;
}

/* HP VIEW */
@media (max-width: 640px) {
  .public-page {
    align-items: flex-start;
    padding: 14px;
  }

  .public-card {
    padding: 22px 18px;
    border-radius: 24px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .24);
  }

  .public-card h1 {
    font-size: 24px;
  }

  .public-card .desc {
    font-size: 14px;
    margin-bottom: 20px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .public-card input,
  .public-card select,
  .public-card textarea {
    font-size: 16px;
    min-height: 52px;
    border-radius: 15px;
  }

  .public-card textarea {
    min-height: 100px;
  }

  .public-card .btn {
    position: sticky;
    bottom: 12px;
    z-index: 10;
    box-shadow: 0 14px 30px rgba(2, 132, 199, .32);
  }
}

/* EXTRA SMALL HP */
@media (max-width: 380px) {
  .public-card {
    padding: 20px 15px;
  }

  .public-card h1 {
    font-size: 22px;
  }

  .public-badge {
    font-size: 12px;
    padding: 7px 11px;
  }
}

.brand-logo {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .18);
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


.photo-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.btn.small.secondary {
  background: #e2e8f0;
  color: #0f172a;
}


.photo-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.photo-actions .btn {
  width: auto;
  border: none;
  cursor: pointer;
}

.photo-modal {
  display: none;
  position: fixed;
  z-index: 99999;
  inset: 0;
  background: rgba(15, 23, 42, .72);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.photo-modal.show {
  display: flex;
}

.photo-modal-content {
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  background: #ffffff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
}

.photo-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
}

.photo-modal-header h3 {
  margin: 0;
  font-size: 18px;
  color: #0f172a;
}

.photo-modal-header button {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 12px;
  background: #fee2e2;
  color: #991b1b;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.photo-modal-body {
  padding: 18px;
  max-height: calc(90vh - 75px);
  overflow: auto;
  text-align: center;
  background: #f8fafc;
}

.photo-modal-body img {
  max-width: 100%;
  max-height: 72vh;
  border-radius: 16px;
  object-fit: contain;
  background: #ffffff;
}

@media (max-width: 640px) {
  .photo-modal {
    padding: 12px;
  }

  .photo-modal-content {
    border-radius: 20px;
  }

  .photo-modal-header {
    padding: 14px 16px;
  }

  .photo-modal-body {
    padding: 12px;
  }

  .photo-modal-body img {
    max-height: 70vh;
  }
}


.visitor-filter {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
}

.visitor-filter label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
}

.visitor-filter input,
.visitor-filter select {
  width: 100%;
  min-height: 48px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 10px 13px;
  font-size: 14px;
}

.filter-actions {
  display: flex;
  gap: 8px;
}

.filter-actions .btn {
  width: auto;
  min-height: 48px;
  padding: 12px 18px;
  text-decoration: none;
}

@media (max-width: 768px) {
  .visitor-filter {
    grid-template-columns: 1fr;
  }

  .filter-actions {
    flex-direction: column;
  }

  .filter-actions .btn {
    width: 100%;
    text-align: center;
  }
}


.btn:disabled,
.btn-loading {
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
}


.dashboard-table-card {
  max-height: 380px;
  overflow: hidden;
}

.dashboard-table-card .table-wrap {
  max-height: 280px;
  overflow: auto;
}

.dashboard-table-card table {
  min-width: 650px;
}

.stat {
  min-height: 115px;
}

/* Laptop Asset Report - Better Table UI */
#laptopAssetTable {
  width: 100% !important;
}

.asset-table {
  min-width: 1900px;
  border-collapse: separate;
  border-spacing: 0 8px;
}

.asset-table thead th {
  background: #0f172a;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 14px 12px;
  border: none;
  white-space: nowrap;
}

.asset-table thead th:first-child {
  border-radius: 12px 0 0 12px;
}

.asset-table thead th:last-child {
  border-radius: 0 12px 12px 0;
}

.asset-table tbody tr {
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
  transition: all .18s ease;
}

.asset-table tbody tr:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .12);
}

.asset-table tbody td {
  padding: 14px 12px;
  font-size: 13px;
  vertical-align: top;
  border-top: 1px solid #eef2f7;
  border-bottom: 1px solid #eef2f7;
  background: #ffffff;
}

.asset-table tbody td:first-child {
  border-left: 1px solid #eef2f7;
  border-radius: 12px 0 0 12px;
}

.asset-table tbody td:last-child {
  border-right: 1px solid #eef2f7;
  border-radius: 0 12px 12px 0;
}

.asset-table .col-item-name {
  min-width: 260px;
  max-width: 320px;
  white-space: normal;
  line-height: 1.45;
}

.asset-table td.col-item-name strong {
  color: #0f172a;
  font-size: 14px;
  font-weight: 800;
}

.asset-table .col-notes {
  min-width: 340px;
  max-width: 460px;
  white-space: normal;
}

.asset-notes {
  line-height: 1.5;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  max-height: 95px;
  overflow: auto;
}

.asset-table td:nth-child(5) {
  min-width: 260px;
  max-width: 340px;
  white-space: normal;
  line-height: 1.45;
}

.asset-table td:nth-child(6),
.asset-table td:nth-child(7),
.asset-table td:nth-child(8) {
  white-space: nowrap;
}

.asset-table .actions {
  min-width: 135px;
}

.dataTables_wrapper {
  margin-top: 12px;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 7px 10px;
  outline: none;
}

.dataTables_wrapper .dataTables_filter input:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, .15);
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: 9px !important;
  border: 1px solid #e2e8f0 !important;
  background: #ffffff !important;
  color: #0f172a !important;
  margin: 0 2px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: #0f172a !important;
  color: #ffffff !important;
  border-color: #0f172a !important;
}

.dataTables_scrollBody {
  border: none !important;
}


/* DataTables pagination biar angka kelihatan */
.dataTables_wrapper .dataTables_paginate .paginate_button {
  color: #0f172a !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 10px !important;
  min-width: 42px;
  text-align: center;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
  border-color: #94a3b8 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: #0f172a !important;
  color: #ffffff !important;
  border: 1px solid #0f172a !important;
  font-weight: 700;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
  color: #94a3b8 !important;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}


.dataTables_wrapper .dataTables_paginate span .paginate_button.current {
  color: #ffffff !important;
}

.asset-preview {
  margin-top: 10px;
  margin-bottom: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #dbe3ef;
  color: #0f172a;
  line-height: 1.7;
  font-size: 13px;
}

.asset-preview strong {
  display: block;
  margin-bottom: 6px;
}


/* Laptop Asset QR */
.qr-cell {
  text-align: center;
  min-width: 78px;
}

.asset-qr-small {
  width: 52px;
  height: 52px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 4px;
  background: #ffffff;
  transition: transform .15s ease, box-shadow .15s ease;
}

.asset-qr-small:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 20px rgba(15, 23, 42, .18);
}

/* QR Popup Label */
.qr-popup-btn {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.qr-cell {
  text-align: center;
  min-width: 78px;
}

.asset-qr-small {
  width: 52px;
  height: 52px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 4px;
  background: #ffffff;
  transition: transform .15s ease, box-shadow .15s ease;
}

.asset-qr-small:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 20px rgba(15, 23, 42, .18);
}

.qr-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.qr-modal.show {
  display: flex;
}

.qr-modal-content {
  width: 420px;
  max-width: 95vw;
  background: #ffffff;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .35);
}

.qr-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.qr-modal-header h3 {
  margin: 0;
  font-size: 20px;
  color: #0f172a;
}

.qr-modal-header button {
  border: 0;
  background: #e2e8f0;
  border-radius: 10px;
  width: 36px;
  height: 36px;
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
}

.qr-label-print {
  width: 340px;
  min-height: 140px;
  background: #ffffff;
  border: 1px solid #0f172a;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 0 auto;
}

.qr-label-print img {
  width: 95px;
  height: 95px;
  flex-shrink: 0;
}

.qr-label-info {
  font-size: 11px;
  color: #0f172a;
  line-height: 1.35;
}

.qr-label-title {
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 5px;
}

.qr-label-muted {
  color: #475569;
  margin-top: 4px;
}

.qr-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 16px;
}

@media print {
  body.qr-print-mode * {
    visibility: hidden !important;
  }

  body.qr-print-mode #qrPrintArea,
  body.qr-print-mode #qrPrintArea * {
    visibility: visible !important;
  }

  body.qr-print-mode #qrPrintArea {
    position: fixed;
    left: 0;
    top: 0;
    margin: 0;
  }
}


.qr-popup-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  z-index: 3;
}

.qr-popup-link img {
  pointer-events: auto;
}

.qr-cell {
  text-align: center;
  min-width: 78px;
}

.qr-wrap {
  position: relative;
  width: 19mm;
  height: 19mm;
  flex-shrink: 0;
}

.qr-code {
  width: 19mm;
  height: 19mm;
  display: block;
}



.qr-popup-wrap {
  position: relative;
  width: 95px;
  height: 95px;
  flex-shrink: 0;
}

.qr-popup-code {
  width: 95px;
  height: 95px;
  display: block;
}


.qr-image-box {
  width: 95px;
  height: 95px;
  flex-shrink: 0;
}

.qr-code-img {
  width: 95px !important;
  height: 95px !important;
  display: block;
}

.qr-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 5px;
}

.qr-label-logo {
  width: 22px !important;
  height: 22px !important;
  border-radius: 5px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}


/* QR readable fix - logo moved outside QR */
.qr-code-plain {
  width: 21mm !important;
  height: 21mm !important;
  flex-shrink: 0;
  display: block;
}

.qr-logo,
.qr-center-logo,
.qr-popup-logo {
  display: none !important;
}

.label-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 2px;
}

.label-title {
  font-size: 8px !important;
  font-weight: 900;
  line-height: 1.1;
  max-height: 18px;
  overflow: hidden;
  flex: 1;
}

.label-logo-small {
  width: 12px !important;
  height: 12px !important;
  object-fit: contain;
  border-radius: 2px;
  flex-shrink: 0;
}


/* ========================================
   GLOBAL CONFIRM MODAL
======================================== */

.app-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(3px);
}

.app-modal-overlay.show {
  display: flex;
}

.app-modal {
  width: 100%;
  max-width: 440px;
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 25px 70px rgba(15, 23, 42, 0.35);
  animation: appModalShow 0.18s ease-out;
}

@keyframes appModalShow {
  from {
    opacity: 0;
    transform: translateY(15px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.app-modal-body {
  padding: 28px 26px 20px;
  text-align: center;
}

.app-modal-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  margin: 0 auto 17px;
  border-radius: 50%;
  font-size: 32px;
}

.app-modal-icon.danger {
  background: #fee2e2;
  color: #b91c1c;
}

.app-modal-icon.warning {
  background: #fef3c7;
  color: #b45309;
}

.app-modal-icon.info {
  background: #dbeafe;
  color: #0369a1;
}

.app-modal-title {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: 22px;
  font-weight: 800;
}

.app-modal-message {
  margin: 0;
  color: #64748b;
  font-size: 15px;
  line-height: 1.6;
}

.app-modal-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 18px 24px 24px;
}

.app-modal-actions button {
  min-width: 130px;
  padding: 12px 18px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
}

.app-modal-cancel {
  background: #e2e8f0;
  color: #0f172a;
}

.app-modal-confirm {
  background: #0284c7;
  color: #ffffff;
}

.app-modal-confirm.danger {
  background: #b91c1c;
}

.app-modal-confirm.warning {
  background: #d97706;
}

.app-modal-confirm.info {
  background: #0284c7;
}

/* ========================================
   GLOBAL TOAST MESSAGE
======================================== */

.app-toast-container {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 100000;
  display: grid;
  width: min(390px, calc(100vw - 32px));
  gap: 12px;
}

.app-toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 13px;
  background: #ffffff;
  box-shadow: 0 16px 45px rgba(15, 23, 42, 0.23);
  animation: appToastShow 0.25s ease-out;
}

@keyframes appToastShow {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.app-toast.success {
  border-left: 6px solid #16a34a;
}

.app-toast.error {
  border-left: 6px solid #dc2626;
}

.app-toast.warning {
  border-left: 6px solid #d97706;
}

.app-toast.info {
  border-left: 6px solid #0284c7;
}

.app-toast-icon {
  flex: 0 0 auto;
  font-size: 23px;
}

.app-toast-message {
  flex: 1;
  color: #1e293b;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}

.app-toast-close {
  padding: 0;
  border: 0;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  font-size: 21px;
}

.app-toast.hide {
  opacity: 0;
  transform: translateX(30px);
  transition: 0.25s ease;
}

@media (max-width: 600px) {
  .app-modal-actions {
    flex-direction: column-reverse;
  }

  .app-modal-actions button {
    width: 100%;
  }

  .app-toast-container {
    top: 12px;
    right: 16px;
    left: 16px;
    width: auto;
  }
}



/* =====================================================
   FORCE INDEPENDENT SCROLL: SIDEBAR + MAIN CONTENT
===================================================== */

@media (min-width: 901px) {
  html,
  body {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    overflow: hidden !important;
  }

  body {
    position: fixed !important;
    inset: 0 !important;
  }

  .app-shell {
    position: fixed !important;
    inset: 0 !important;

    display: grid !important;
    grid-template-columns: 320px minmax(0, 1fr) !important;

    width: 100vw !important;
    height: 100vh !important;
    overflow: hidden !important;
  }

  .sidebar {
    position: relative !important;

    width: 320px !important;
    height: 100vh !important;
    max-height: 100vh !important;

    overflow-y: auto !important;
    overflow-x: hidden !important;

    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .main {
    position: relative !important;

    width: 100% !important;
    height: 100vh !important;
    max-height: 100vh !important;
    min-width: 0 !important;

    overflow-y: auto !important;
    overflow-x: hidden !important;

    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .topbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 5000 !important;
    background: #f8fafc !important;
  }

  .table-wrap {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch !important;
  }

  table.dataTable,
  table {
    max-width: none !important;
  }
}

/* Scrollbar */
.sidebar::-webkit-scrollbar,
.main::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.sidebar::-webkit-scrollbar-thumb,
.main::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.55);
}

.sidebar::-webkit-scrollbar-track,
.main::-webkit-scrollbar-track,
.table-wrap::-webkit-scrollbar-track {
  background: transparent;
}


/* =====================================================
   FIX DESKTOP INDEPENDENT SCROLL
   Sidebar kiri dan konten kanan scroll masing-masing
===================================================== */

@media (min-width: 901px) {
  html,
  body {
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    margin: 0 !important;
    overflow: hidden !important;
  }

  .app-shell {
    display: grid !important;
    grid-template-columns: 320px minmax(0, 1fr) !important;

    width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;

    overflow: hidden !important;
    background: #f4f7fb !important;
  }

  .sidebar {
    position: relative !important;
    z-index: 20 !important;

    width: 320px !important;
    height: 100vh !important;
    min-height: 100vh !important;
    max-height: 100vh !important;

    overflow-y: auto !important;
    overflow-x: hidden !important;

    background: #0f172a !important;
    border-radius: 0 !important;

    overscroll-behavior: contain !important;
  }

  .sidebar .nav {
    padding-bottom: 40px !important;
  }

  .main {
    position: relative !important;

    width: 100% !important;
    height: 100vh !important;
    min-height: 100vh !important;
    max-height: 100vh !important;
    min-width: 0 !important;

    overflow-y: auto !important;
    overflow-x: hidden !important;

    background: #f4f7fb !important;

    overscroll-behavior: contain !important;
  }

  .topbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;

    background: rgba(248, 250, 252, 0.96) !important;
    backdrop-filter: blur(12px);
  }

  .table-wrap {
    width: 100% !important;
    max-width: 100% !important;

    overflow-x: auto !important;
    overflow-y: visible !important;

    -webkit-overflow-scrolling: touch !important;
  }

  table,
  table.dataTable {
    max-width: none !important;
  }
}

/* Scrollbar lebih rapi */
.sidebar::-webkit-scrollbar,
.main::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.sidebar::-webkit-scrollbar-thumb,
.main::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.55);
}

.sidebar::-webkit-scrollbar-track,
.main::-webkit-scrollbar-track,
.table-wrap::-webkit-scrollbar-track {
  background: transparent;
}

/* FIX TOPBAR + CONTENT SPACING */

@media (min-width: 901px) {
  .topbar {
    min-height: 96px !important;
    padding: 22px 32px 18px !important;
    align-items: flex-start !important;
  }

  .main {
    padding: 0 28px 32px !important;
  }

  .main > .card,
  .main > .grid,
  .main > form,
  .main > section {
    margin-top: 22px !important;
  }

  .topbar h1 {
    margin-top: 0 !important;
    margin-bottom: 6px !important;
  }

  .topbar p {
    margin: 0 !important;
  }
}
/* ===== MOBILE FINAL PATCH START ===== */
/* =====================================================
   MOBILE FINAL PATCH
   Visitor Asset Access
   Scope: HP / Tablet kecil
===================================================== */

@media (max-width: 900px) {
  html,
  body {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 100% !important;
    margin: 0 !important;
    overflow-x: hidden !important;
  }

  body.mobile-sidebar-open {
    overflow: hidden !important;
  }

  * {
    box-sizing: border-box;
  }

  img,
  video,
  canvas,
  svg {
    max-width: 100%;
    height: auto;
  }

  /* =========================
     APP LAYOUT
  ========================= */

  .app-shell {
    display: block !important;
    width: 100% !important;
    min-height: 100vh !important;
    overflow-x: hidden !important;
    background: #f4f7fb !important;
  }

  .main {
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 12px 24px !important;
    overflow-x: hidden !important;
    background: #f4f7fb !important;
  }

  /* =========================
     SIDEBAR MOBILE
  ========================= */

  .mobile-menu-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 44px !important;
    height: 44px !important;
    flex: 0 0 44px !important;

    padding: 0 !important;
    border: 1px solid #dbe3ee !important;
    border-radius: 14px !important;

    background: #ffffff !important;
    color: #0f172a !important;

    font-size: 23px !important;
    line-height: 1 !important;
    cursor: pointer !important;

    box-shadow: 0 7px 18px rgba(15, 23, 42, 0.08) !important;
  }

  .sidebar {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    z-index: 30000 !important;

    display: block !important;
    width: min(84vw, 310px) !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    max-height: 100dvh !important;

    padding: 22px 18px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;

    border-radius: 0 24px 24px 0 !important;
    background: #0f172a !important;

    transform: translateX(-105%) !important;
    transition: transform 0.24s ease !important;

    box-shadow: 20px 0 55px rgba(15, 23, 42, 0.28) !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .sidebar.mobile-open {
    transform: translateX(0) !important;
  }

  .sidebar .brand {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin-bottom: 22px !important;
  }

  .sidebar .brand-logo {
    flex: 0 0 auto !important;
  }

  .sidebar .nav {
    display: flex !important;
    flex-direction: column !important;
    gap: 7px !important;
    padding-bottom: 44px !important;
  }

  .sidebar .nav a,
  .sidebar summary {
    min-height: 44px !important;
    padding: 11px 12px !important;
    border-radius: 12px !important;
    font-size: 15px !important;
  }

  .admin-nav-submenu {
    margin-left: 10px !important;
    padding-left: 8px !important;
  }

  .admin-nav-submenu a {
    font-size: 14px !important;
  }

  .mobile-sidebar-overlay {
    position: fixed !important;
    inset: 0 !important;
    z-index: 29990 !important;

    display: block !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;

    background: rgba(15, 23, 42, 0.58) !important;
    backdrop-filter: blur(2px) !important;

    transition:
      opacity 0.24s ease,
      visibility 0.24s ease !important;
  }

  .mobile-sidebar-overlay.show {
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  /* =========================
     TOPBAR MOBILE
  ========================= */

  .topbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 2000 !important;

    display: grid !important;
    grid-template-columns: 44px minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 9px !important;

    width: calc(100% + 24px) !important;
    margin: 0 -12px 14px !important;
    padding: 10px 12px !important;

    border-radius: 0 !important;
    border-bottom: 1px solid #e2e8f0 !important;

    background: rgba(248, 250, 252, 0.96) !important;
    backdrop-filter: blur(12px) !important;

    box-shadow: 0 6px 22px rgba(15, 23, 42, 0.08) !important;
  }

  .topbar-title,
  .topbar > div:first-child {
    min-width: 0 !important;
  }

  .topbar h1 {
    overflow: hidden !important;
    margin: 0 !important;

    color: #0f172a !important;

    font-size: clamp(18px, 5vw, 23px) !important;
    line-height: 1.15 !important;

    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .topbar p {
    display: -webkit-box !important;
    overflow: hidden !important;
    margin: 4px 0 0 !important;

    color: #64748b !important;
    font-size: 11px !important;
    line-height: 1.25 !important;

    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 1 !important;
  }

  .topbar .top-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px !important;
    min-width: 0 !important;
  }

  .topbar .notif-btn {
    width: 42px !important;
    height: 42px !important;
    border-radius: 14px !important;
    font-size: 19px !important;
  }

  .topbar .notif-badge {
    top: -6px !important;
    right: -6px !important;
    min-width: 20px !important;
    height: 20px !important;
    font-size: 10px !important;
  }

  .topbar-user-card {
    width: 42px !important;
    min-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 4px !important;
    border-radius: 14px !important;
  }

  .topbar-user-avatar {
    width: 34px !important;
    height: 34px !important;
    flex-basis: 34px !important;
    border-radius: 11px !important;
    font-size: 14px !important;
  }

  .topbar-user-info,
  .topbar-user-status,
  .topbar-user-chevron {
    display: none !important;
  }

  .topbar .notif-dropdown,
  .profile-dropdown {
    position: fixed !important;
    top: 68px !important;
    right: 12px !important;
    left: 12px !important;

    width: auto !important;
    max-width: none !important;
    max-height: calc(100dvh - 84px) !important;
    overflow-y: auto !important;
  }

  /* =========================
     CARDS / GRID / FORMS
  ========================= */

  .card,
  .public-card {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 20px !important;
  }

  .card {
    padding: 18px !important;
    margin-bottom: 16px !important;
  }

  .grid,
  .form-grid,
  .visitor-filter,
  .filter-card .grid,
  .profile-settings-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  [class*="col-"] {
    grid-column: auto !important;
  }

  .actions,
  .filter-actions,
  .profile-form-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 9px !important;
  }

  .actions .btn,
  .filter-actions .btn {
    flex: 1 1 auto !important;
  }

  label {
    font-size: 13px !important;
  }

  input,
  select,
  textarea {
    width: 100% !important;
    max-width: 100% !important;
    font-size: 16px !important;
  }

  textarea {
    min-height: 120px !important;
  }

  input[type="file"] {
    padding: 12px !important;
    font-size: 14px !important;
  }

  .btn,
  button.btn,
  a.btn {
    min-height: 44px !important;
    padding: 11px 14px !important;
    border-radius: 13px !important;
    font-size: 15px !important;
  }

  .btn.small,
  button.btn.small,
  a.btn.small {
    min-height: 38px !important;
    padding: 8px 12px !important;
    font-size: 13px !important;
  }

  /* =========================
     DATATABLE / TABLE
  ========================= */

  .table-wrap {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch !important;
  }

  table,
  table.dataTable {
    min-width: 820px !important;
    max-width: none !important;
  }

  table th,
  table td {
    white-space: normal !important;
    vertical-align: top !important;
  }

  .dataTables_wrapper {
    width: 100% !important;
    overflow: visible !important;
  }

  .dataTables_wrapper .dataTables_length,
  .dataTables_wrapper .dataTables_filter {
    float: none !important;
    width: 100% !important;
    text-align: left !important;
    margin: 0 0 10px !important;
  }

  .dataTables_wrapper .dataTables_filter input {
    width: 100% !important;
    margin: 6px 0 0 !important;
  }

  .dataTables_wrapper .dataTables_info,
  .dataTables_wrapper .dataTables_paginate {
    float: none !important;
    width: 100% !important;
    text-align: left !important;
    margin-top: 10px !important;
  }

  .dataTables_wrapper .dataTables_paginate {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  /* =========================
     PUBLIC PAGES
     login, register, visitor form, server room form
  ========================= */

  .public-page {
    min-height: 100dvh !important;
    padding: 14px !important;
    align-items: flex-start !important;
  }

  .public-card {
    margin: 0 auto !important;
    padding: 20px 16px !important;
  }

  .public-card h1 {
    font-size: clamp(24px, 7vw, 32px) !important;
    line-height: 1.15 !important;
  }

  .public-card .desc {
    font-size: 14px !important;
    line-height: 1.5 !important;
  }

  .visitor-tabs {
    grid-template-columns: 1fr !important;
  }

  .visitor-tab {
    min-height: 44px !important;
  }

  /* =========================
     MODAL / TOAST MOBILE
  ========================= */

  .app-modal-overlay {
    padding: 14px !important;
  }

  .app-modal {
    max-width: 100% !important;
    border-radius: 18px !important;
  }

  .app-modal-actions {
    flex-direction: column-reverse !important;
  }

  .app-modal-actions button {
    width: 100% !important;
  }

  .app-toast-container {
    top: 12px !important;
    right: 12px !important;
    left: 12px !important;
    width: auto !important;
  }
}

/* HP sangat kecil */
@media (max-width: 420px) {
  .main {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .topbar {
    width: calc(100% + 20px) !important;
    margin-left: -10px !important;
    margin-right: -10px !important;
    grid-template-columns: 42px minmax(0, 1fr) auto !important;
    gap: 7px !important;
  }

  .topbar p {
    display: none !important;
  }

  .topbar .notif-btn,
  .topbar-user-card {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
  }

  .topbar-user-avatar {
    width: 32px !important;
    height: 32px !important;
    flex-basis: 32px !important;
  }

  .card,
  .public-card {
    padding: 16px 14px !important;
  }
}
/* ===== MOBILE FINAL PATCH END ===== */



/* =====================================================
   FORCE MOBILE LAYOUT FIX
   Dashboard / Sidebar / Topbar Mobile
===================================================== */

@media screen and (max-width: 900px) {
  html,
  body {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  .app-shell {
    display: block !important;
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  .main {
    display: block !important;
    width: 100% !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
  }

  /* Sidebar jadi menu geser */
  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    z-index: 99999 !important;

    width: 300px !important;
    max-width: 84vw !important;
    height: 100dvh !important;

    padding: 22px 18px !important;
    overflow-y: auto !important;

    border-radius: 0 24px 24px 0 !important;

    transform: translateX(-110%) !important;
    transition: transform 0.25s ease !important;

    box-shadow: 20px 0 55px rgba(15, 23, 42, 0.35) !important;
  }

  .sidebar.mobile-open {
    transform: translateX(0) !important;
  }

  .mobile-sidebar-overlay {
    position: fixed !important;
    inset: 0 !important;
    z-index: 99990 !important;

    display: block !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;

    background: rgba(15, 23, 42, 0.6) !important;
    backdrop-filter: blur(2px) !important;

    transition: 0.25s ease !important;
  }

  .mobile-sidebar-overlay.show {
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  /* Topbar HP */
  .topbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 5000 !important;

    display: grid !important;
    grid-template-columns: 46px 1fr auto !important;
    grid-template-areas:
      "menu title actions"
      "subtitle subtitle subtitle" !important;

    align-items: center !important;
    gap: 8px 10px !important;

    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;

    margin: 0 !important;
    padding: 11px 12px 13px !important;

    border-radius: 0 !important;
    border-bottom: 1px solid #e2e8f0 !important;

    background: rgba(248, 250, 252, 0.98) !important;
    box-shadow: 0 6px 22px rgba(15, 23, 42, 0.08) !important;
  }

  .mobile-menu-btn {
    grid-area: menu !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;

    padding: 0 !important;
    border: 1px solid #dbe3ee !important;
    border-radius: 14px !important;

    background: #ffffff !important;
    color: #0f172a !important;

    font-size: 24px !important;
    font-weight: 800 !important;
    line-height: 1 !important;

    box-shadow: 0 7px 18px rgba(15, 23, 42, 0.08) !important;
  }

  .topbar-title {
    grid-area: title !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  .topbar-title h1,
  .topbar h1 {
    display: block !important;
    overflow: visible !important;

    max-width: 100% !important;
    margin: 0 !important;

    color: #0f172a !important;
    font-size: 22px !important;
    font-weight: 900 !important;
    line-height: 1.15 !important;

    white-space: normal !important;
    text-overflow: clip !important;
  }

  .topbar-title p,
  .topbar p {
    grid-area: subtitle !important;

    display: block !important;
    overflow: visible !important;

    max-width: 100% !important;
    margin: 4px 0 0 !important;

    color: #64748b !important;
    font-size: 13px !important;
    line-height: 1.35 !important;

    white-space: normal !important;
    text-overflow: clip !important;
  }

  .topbar .top-actions {
    grid-area: actions !important;

    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px !important;

    margin: 0 !important;
    min-width: max-content !important;
  }

  .topbar .notif-btn,
  .topbar-user-card {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    padding: 4px !important;
    border-radius: 14px !important;
  }

  .topbar-user-avatar {
    width: 34px !important;
    height: 34px !important;
    flex: 0 0 34px !important;
    border-radius: 11px !important;
  }

  .topbar-user-info,
  .topbar-user-status,
  .topbar-user-chevron {
    display: none !important;
  }

  /* Semua isi halaman diberi padding aman */
  .main > :not(.topbar) {
    width: auto !important;
    max-width: calc(100vw - 24px) !important;
    box-sizing: border-box !important;

    margin-left: 12px !important;
    margin-right: 12px !important;
  }

  /* Grid dashboard jadi 1 kolom */
  .grid,
  .stats-grid,
  .dashboard-grid,
  .summary-grid,
  .kpi-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;

    width: auto !important;
    max-width: calc(100vw - 24px) !important;
    box-sizing: border-box !important;
  }

  .card,
  .stat-card,
  .dashboard-card,
  .summary-card,
  .kpi-card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;

    margin-left: 0 !important;
    margin-right: 0 !important;
    border-radius: 22px !important;
  }

  .table-wrap {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
}



/* =====================================================
   FORCE MOBILE FIX FINAL
===================================================== */

@media screen and (max-width: 1200px) {
  html,
  body {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  .app-shell {
    display: block !important;
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  .main {
    display: block !important;
    width: 100% !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
  }

  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    z-index: 99999 !important;

    width: 300px !important;
    max-width: 84vw !important;
    height: 100dvh !important;

    padding: 22px 18px !important;
    overflow-y: auto !important;

    border-radius: 0 24px 24px 0 !important;

    transform: translateX(-110%) !important;
    transition: transform 0.25s ease !important;

    box-shadow: 20px 0 55px rgba(15, 23, 42, 0.35) !important;
  }

  .sidebar.mobile-open {
    transform: translateX(0) !important;
  }

  .mobile-sidebar-overlay {
    position: fixed !important;
    inset: 0 !important;
    z-index: 99990 !important;

    display: block !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;

    background: rgba(15, 23, 42, 0.6) !important;
    backdrop-filter: blur(2px) !important;

    transition: 0.25s ease !important;
  }

  .mobile-sidebar-overlay.show {
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .topbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 5000 !important;

    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;

    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;

    margin: 0 !important;
    padding: 12px 12px 14px 66px !important;

    border-radius: 0 !important;
    border-bottom: 1px solid #e2e8f0 !important;

    background: rgba(248, 250, 252, 0.98) !important;
    box-shadow: 0 6px 22px rgba(15, 23, 42, 0.08) !important;
  }

  .mobile-menu-btn {
    position: fixed !important;
    top: 11px !important;
    left: 12px !important;
    z-index: 60000 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;

    padding: 0 !important;
    border: 1px solid #dbe3ee !important;
    border-radius: 14px !important;

    background: #ffffff !important;
    color: #0f172a !important;

    font-size: 24px !important;
    font-weight: 900 !important;
    line-height: 1 !important;

    box-shadow: 0 7px 18px rgba(15, 23, 42, 0.12) !important;
  }

  .topbar-title {
    order: 2 !important;
    flex: 1 1 100% !important;
    width: 100% !important;
    min-width: 0 !important;
    margin-top: 4px !important;
  }

  .topbar-title h1,
  .topbar h1 {
    display: block !important;
    overflow: visible !important;

    max-width: 100% !important;
    margin: 0 !important;

    color: #0f172a !important;
    font-size: 26px !important;
    font-weight: 900 !important;
    line-height: 1.15 !important;

    white-space: normal !important;
    text-overflow: clip !important;
  }

  .topbar-title p,
  .topbar p {
    display: block !important;
    overflow: visible !important;

    max-width: 100% !important;
    margin: 6px 0 0 !important;

    color: #64748b !important;
    font-size: 14px !important;
    line-height: 1.35 !important;

    white-space: normal !important;
    text-overflow: clip !important;
  }

  .topbar .top-actions {
    order: 1 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px !important;

    margin-left: auto !important;
    min-width: max-content !important;
  }

  .topbar .notif-btn,
  .topbar-user-card {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    padding: 4px !important;
    border-radius: 14px !important;
  }

  .topbar-user-avatar {
    width: 34px !important;
    height: 34px !important;
    flex: 0 0 34px !important;
    border-radius: 11px !important;
  }

  .topbar-user-info,
  .topbar-user-status,
  .topbar-user-chevron {
    display: none !important;
  }

  .main > :not(.topbar) {
    width: auto !important;
    max-width: calc(100vw - 24px) !important;
    box-sizing: border-box !important;

    margin-left: 12px !important;
    margin-right: 12px !important;
  }

  .grid,
  .stats-grid,
  .dashboard-grid,
  .summary-grid,
  .kpi-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;

    width: auto !important;
    max-width: calc(100vw - 24px) !important;
    box-sizing: border-box !important;
  }

  .card,
  .stat-card,
  .dashboard-card,
  .summary-card,
  .kpi-card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;

    margin-left: 0 !important;
    margin-right: 0 !important;
    border-radius: 22px !important;
  }

  .table-wrap {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
}


/* =====================================================
   FIX MOBILE SIDEBAR CLEAR / SHARP
===================================================== */

@media screen and (max-width: 1200px) {
  body.mobile-sidebar-open {
    overflow: hidden !important;
  }

  .mobile-sidebar-overlay {
    position: fixed !important;
    inset: 0 !important;
    z-index: 70000 !important;

    display: block !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;

    background: rgba(15, 23, 42, 0.55) !important;

    /* Matikan blur supaya sidebar tidak ikut terlihat buram */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;

    transition:
      opacity 0.22s ease,
      visibility 0.22s ease !important;
  }

  .mobile-sidebar-overlay.show {
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    z-index: 80000 !important;

    width: 310px !important;
    max-width: 82vw !important;
    height: 100dvh !important;

    padding: 24px 18px !important;

    background: #0f172a !important;
    color: #ffffff !important;

    opacity: 1 !important;
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;

    transform: translateX(-110%) !important;
    transition: transform 0.25s ease !important;

    border-radius: 0 26px 26px 0 !important;

    box-shadow:
      18px 0 55px rgba(15, 23, 42, 0.42) !important;

    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  .sidebar.mobile-open {
    transform: translateX(0) !important;
  }

  .sidebar * {
    filter: none !important;
    opacity: 1 !important;
  }

  .sidebar .brand {
    display: flex !important;
    align-items: center !important;
    gap: 13px !important;
    margin-bottom: 28px !important;
  }

  .sidebar .brand-logo {
    width: 58px !important;
    height: 58px !important;
    flex: 0 0 58px !important;
  }

  .sidebar .brand-logo img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  .sidebar .brand strong {
    display: block !important;
    color: #ffffff !important;
    font-size: 17px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
  }

  .sidebar .brand span {
    display: block !important;
    margin-top: 3px !important;
    color: #cbd5e1 !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
  }

  .sidebar .nav {
    display: flex !important;
    flex-direction: column !important;
    gap: 7px !important;
  }

  .sidebar .nav a,
  .sidebar .admin-nav-group summary {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;

    width: 100% !important;
    box-sizing: border-box !important;

    padding: 13px 14px !important;
    border-radius: 13px !important;

    color: #e5e7eb !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    text-decoration: none !important;

    background: transparent !important;

    transition:
      background 0.18s ease,
      color 0.18s ease !important;
  }

  .sidebar .nav a:hover,
  .sidebar .admin-nav-group summary:hover {
    background: rgba(255, 255, 255, 0.09) !important;
    color: #ffffff !important;
  }

  .sidebar .nav a.active,
  .sidebar .admin-nav-submenu a.active {
    background: rgba(14, 165, 233, 0.18) !important;
    color: #ffffff !important;
  }

  .sidebar .admin-nav-group {
    border: 0 !important;
    background: transparent !important;
  }

  .sidebar .admin-nav-group summary {
    cursor: pointer !important;
    list-style: none !important;
    justify-content: space-between !important;
  }

  .sidebar .admin-nav-group summary::-webkit-details-marker {
    display: none !important;
  }

  .sidebar .admin-nav-submenu {
    display: grid !important;
    gap: 5px !important;
    margin-top: 6px !important;
    padding-left: 12px !important;
  }

  .sidebar .admin-nav-submenu a {
    padding: 11px 12px !important;
    font-size: 13px !important;
    color: #cbd5e1 !important;
  }

  .mobile-menu-btn {
    z-index: 90000 !important;
  }
}


/* =====================================================
   EMERGENCY FIX - SIDEBAR MENU HARUS BISA DIKLIK
===================================================== */

@media screen and (max-width: 1200px) {
  .mobile-sidebar-overlay,
  .mobile-sidebar-overlay.show {
    pointer-events: none !important;
  }

  .sidebar {
    z-index: 999999 !important;
    pointer-events: auto !important;
  }

  .sidebar * {
    pointer-events: auto !important;
  }

  .sidebar a,
  .sidebar button,
  .sidebar summary,
  .sidebar details,
  .sidebar .nav a,
  .sidebar .admin-nav-group summary,
  .sidebar .admin-nav-submenu a {
    position: relative !important;
    z-index: 1000000 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
  }

  .sidebar.mobile-open {
    transform: translateX(0) !important;
  }

  .mobile-menu-btn {
    z-index: 1000001 !important;
    pointer-events: auto !important;
  }
}


/* =====================================================
   MOBILE SIDEBAR BRIGHTER / CLEARER
===================================================== */

@media screen and (max-width: 1200px) {
  .mobile-sidebar-overlay,
  .mobile-sidebar-overlay.show {
    background: rgba(15, 23, 42, 0.38) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .sidebar {
    background:
      linear-gradient(
        180deg,
        #172033 0%,
        #111827 100%
      ) !important;

    color: #ffffff !important;
    opacity: 1 !important;
    filter: none !important;
  }

  .sidebar .brand strong {
    color: #ffffff !important;
    opacity: 1 !important;
  }

  .sidebar .brand span {
    color: #cbd5e1 !important;
    opacity: 1 !important;
  }

  .sidebar .nav a,
  .sidebar .admin-nav-group summary,
  .sidebar .admin-nav-submenu a {
    color: #e5edf8 !important;
    opacity: 1 !important;
    font-weight: 800 !important;
  }

  .sidebar .nav a:hover,
  .sidebar .admin-nav-group summary:hover,
  .sidebar .admin-nav-submenu a:hover {
    background: rgba(59, 130, 246, 0.20) !important;
    color: #ffffff !important;
  }

  .sidebar .nav a.active,
  .sidebar .admin-nav-submenu a.active {
    background: rgba(14, 165, 233, 0.26) !important;
    color: #ffffff !important;
  }

  .sidebar .admin-nav-arrow {
    color: #93c5fd !important;
  }

  .sidebar .brand-logo {
    box-shadow:
      0 10px 28px rgba(14, 165, 233, 0.22) !important;
  }
}

/* =====================================================
   DASHBOARD MOBILE COMPACT CARDS
   Membuat card dashboard lebih compact dan rapi di HP
===================================================== */

@media screen and (max-width: 1200px) {
  .main > .grid {
    margin-top: 14px !important;
  }

  .grid {
    gap: 12px !important;
  }

  .card.stat {
    position: relative !important;

    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;

    min-height: auto !important;
    padding: 18px 18px !important;

    border-radius: 20px !important;

    background:
      linear-gradient(
        135deg,
        #ffffff 0%,
        #f8fafc 100%
      ) !important;

    box-shadow:
      0 10px 26px rgba(15, 23, 42, 0.08) !important;
  }

  .card.stat > div:first-child {
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }

  .card.stat h3 {
    margin: 0 !important;

    color: #0f172a !important;

    font-size: 34px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
  }

  .card.stat p {
    margin: 8px 0 0 !important;

    color: #64748b !important;

    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
  }

  .card.stat .icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 54px !important;
    height: 54px !important;
    flex: 0 0 54px !important;

    margin-left: 14px !important;
    border-radius: 17px !important;

    background: #eff6ff !important;

    color: #0284c7 !important;
    font-size: 27px !important;
    line-height: 1 !important;

    box-shadow:
      inset 0 0 0 1px rgba(14, 165, 233, 0.08) !important;
  }

  .card.col-12 {
    padding: 18px !important;
    border-radius: 20px !important;
  }

  .section-title {
    margin-bottom: 12px !important;
    font-size: 18px !important;
    line-height: 1.25 !important;
  }

  .card.col-12 table {
    min-width: 620px !important;
  }

  .photo-actions {
    gap: 6px !important;
  }

  .btn.small {
    padding: 8px 11px !important;
    border-radius: 10px !important;
    font-size: 12px !important;
  }
}

@media screen and (max-width: 480px) {
  .main > .grid {
    margin-top: 12px !important;
  }

  .card.stat {
    padding: 16px 16px !important;
    border-radius: 18px !important;
  }

  .card.stat h3 {
    font-size: 31px !important;
  }

  .card.stat p {
    margin-top: 7px !important;
    font-size: 14px !important;
  }

  .card.stat .icon {
    width: 48px !important;
    height: 48px !important;
    flex-basis: 48px !important;

    margin-left: 10px !important;

    border-radius: 15px !important;

    font-size: 24px !important;
  }

  .card.col-12 {
    padding: 16px !important;
  }
}

/* Mode sangat kecil agar card tidak terlalu tinggi */
@media screen and (max-width: 380px) {
  .card.stat {
    padding: 14px 14px !important;
  }

  .card.stat h3 {
    font-size: 28px !important;
  }

  .card.stat p {
    font-size: 13px !important;
  }

  .card.stat .icon {
    width: 44px !important;
    height: 44px !important;
    flex-basis: 44px !important;
    font-size: 22px !important;
  }
}


/* =====================================================
   REPORT MOBILE COMPACT PATCH
   Visitor / Server Room / Laptop Asset / User Management
===================================================== */

@media screen and (max-width: 1200px) {
  /*
   * Card halaman report
   */
  .main > .card {
    padding: 16px !important;
    border-radius: 20px !important;
  }

  /*
   * Tombol atas seperti Open Form, QR Management, Import, Export
   */
  .card > .actions,
  .admin-header,
  .page-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
  }

  .card > .actions .btn,
  .admin-header .btn,
  .page-actions .btn {
    flex: 1 1 auto !important;
    min-width: 145px !important;
    padding: 11px 13px !important;
    border-radius: 13px !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
    text-align: center !important;
  }

  /*
   * Filter form report
   */
  .visitor-filter,
  .filter-card .grid,
  form.visitor-filter {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 14px !important;
  }

  .visitor-filter > div,
  .filter-card .grid > div {
    width: 100% !important;
    max-width: 100% !important;
  }

  .visitor-filter label,
  .filter-card label {
    display: block !important;
    margin-bottom: 6px !important;
    color: #334155 !important;
    font-size: 13px !important;
    font-weight: 800 !important;
  }

  .visitor-filter input,
  .visitor-filter select,
  .filter-card input,
  .filter-card select {
    width: 100% !important;
    min-height: 46px !important;
    box-sizing: border-box !important;
    padding: 10px 13px !important;
    border-radius: 13px !important;
    font-size: 14px !important;
  }

  .filter-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 9px !important;
    align-items: end !important;
    width: 100% !important;
  }

  .filter-actions .btn,
  .filter-actions button,
  .filter-actions a {
    width: 100% !important;
    min-height: 46px !important;
    padding: 11px 12px !important;
    border-radius: 13px !important;
    text-align: center !important;
  }

  /*
   * DataTables controls
   */
  .dataTables_wrapper {
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
  }

  .dataTables_wrapper .dataTables_length,
  .dataTables_wrapper .dataTables_filter {
    float: none !important;
    width: 100% !important;
    margin: 0 0 10px !important;
    text-align: left !important;
  }

  .dataTables_wrapper .dataTables_length label,
  .dataTables_wrapper .dataTables_filter label {
    display: grid !important;
    gap: 6px !important;
    color: #334155 !important;
    font-size: 13px !important;
    font-weight: 800 !important;
  }

  .dataTables_wrapper .dataTables_length select,
  .dataTables_wrapper .dataTables_filter input {
    width: 100% !important;
    min-height: 42px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    padding: 8px 11px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    font-size: 14px !important;
  }

  .dataTables_wrapper .dataTables_info,
  .dataTables_wrapper .dataTables_paginate {
    float: none !important;
    width: 100% !important;
    margin-top: 12px !important;
    text-align: center !important;
    font-size: 12px !important;
    color: #64748b !important;
  }

  .dataTables_wrapper .dataTables_paginate {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 5px !important;
  }

  .dataTables_wrapper .dataTables_paginate .paginate_button {
    margin: 0 !important;
    padding: 7px 10px !important;
    border-radius: 9px !important;
    font-size: 12px !important;
  }

  /*
   * Table wrapper
   */
  .table-wrap {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    border-radius: 16px !important;
    border: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
  }

  .table-wrap table,
  table.dataTable {
    width: max-content !important;
    min-width: 760px !important;
    border-collapse: collapse !important;
  }

  .table-wrap th,
  .table-wrap td,
  table.dataTable th,
  table.dataTable td {
    padding: 11px 12px !important;
    font-size: 12px !important;
    line-height: 1.35 !important;
    vertical-align: top !important;
    white-space: normal !important;
  }

  .table-wrap th,
  table.dataTable th {
    position: sticky !important;
    top: 0 !important;
    z-index: 2 !important;
    background: #f8fafc !important;
    color: #0f172a !important;
    font-size: 12px !important;
    font-weight: 900 !important;
  }

  /*
   * Action buttons di table
   */
  td .actions,
  td.actions,
  .photo-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    align-items: flex-start !important;
  }

  td .actions .btn,
  td.actions .btn,
  .photo-actions .btn,
  td .actions button,
  td.actions button {
    min-width: auto !important;
    padding: 8px 10px !important;
    border-radius: 10px !important;
    font-size: 11px !important;
    line-height: 1.15 !important;
  }

  td .actions form,
  td.actions form {
    margin: 0 !important;
  }

  /*
   * Badge status
   */
  .badge,
  .status-badge,
  td span[class*="badge"] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 5px 8px !important;
    border-radius: 999px !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  /*
   * User Management mobile
   */
  .grid > .card.col-4,
  .grid > .card.col-8,
  .grid > .card.col-12 {
    grid-column: auto !important;
    width: 100% !important;
  }

  .grid .card form input,
  .grid .card form select,
  .grid .card form textarea {
    width: 100% !important;
    min-height: 45px !important;
    box-sizing: border-box !important;
    border-radius: 12px !important;
  }

  .grid .card form .btn {
    width: 100% !important;
    margin-top: 8px !important;
    text-align: center !important;
  }

  /*
   * Modal foto tetap nyaman di HP
   */
  .photo-modal-content {
    width: calc(100vw - 26px) !important;
    max-width: calc(100vw - 26px) !important;
    max-height: calc(100dvh - 40px) !important;
    border-radius: 18px !important;
  }

  .photo-modal-body img {
    max-width: 100% !important;
    max-height: calc(100dvh - 130px) !important;
    object-fit: contain !important;
  }
}

@media screen and (max-width: 480px) {
  .main > .card {
    padding: 14px !important;
    border-radius: 18px !important;
  }

  .card > .actions .btn,
  .admin-header .btn,
  .page-actions .btn {
    min-width: 100% !important;
    width: 100% !important;
  }

  .filter-actions {
    grid-template-columns: 1fr !important;
  }

  .table-wrap table,
  table.dataTable {
    min-width: 700px !important;
  }

  .table-wrap th,
  .table-wrap td,
  table.dataTable th,
  table.dataTable td {
    padding: 10px 10px !important;
    font-size: 11px !important;
  }
}


/* Dropdown sidebar lebih jelas */
.admin-nav-group {
    margin: 6px 0;
}

.admin-nav-group > summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    font-weight: 800;
}

.admin-nav-group > summary::-webkit-details-marker {
    display: none;
}

.admin-nav-group > summary:hover {
    background: rgba(255,255,255,0.08);
}

.admin-nav-group[open] > summary {
    background: rgba(255,255,255,0.10);
}

.admin-nav-group .menu-caret {
    font-size: 13px;
    opacity: .85;
    transition: transform .18s ease;
}

.admin-nav-group[open] .menu-caret {
    transform: rotate(180deg);
}

.admin-nav-submenu {
    margin: 6px 0 8px 18px;
    padding-left: 10px;
    border-left: 1px solid rgba(255,255,255,0.18);
}

.admin-nav-submenu a {
    display: block;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 14px;
    opacity: .95;
}

.admin-nav-submenu a:hover {
    background: rgba(255,255,255,0.08);
}

/* Disable pulse animation supaya header tidak terasa zoom/goyang */
.door-bell-pulse {
    animation: none !important;
    transform: none !important;
}

/* Disable efek animasi yang bikin halaman terasa zoom/goyang */
.door-bell-pulse,
.door-loading-overlay,
.door-spinner,
.btn.is-loading,
button.is-loading {
    animation: none !important;
    transform: none !important;
    transition: none !important;
}

.door-bell-pulse {
    animation: none !important;
    transform: none !important;
}

/* Emergency anti zoom / pulse */
.door-bell-pulse,
.door-bell-badge-wrap,
.door-bell-badge {
    animation: none !important;
    transform: none !important;
    transition: none !important;
}

@keyframes doorBellPulse {
    from { transform: none !important; }
    to { transform: none !important; }
}
