:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-light: #e0e7ff;
  --sidebar-width: 270px;
  --card-radius: 18px;
  --bg-app: #f4f6fa;
}

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

body {
  background-color: var(--bg-app);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  color: #1e293b;
  line-height: 1.5;
}

/* ---------- MODERN LOGIN PAGE ---------- */
.login-page-wrapper {
  min-height: 100vh;
  width: 100%;
  background: radial-gradient(circle at 10% 20%, #eef5ff 0%, #e0eaff 45%, #d8e4ff 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 30px 60px;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

.login-page-wrapper::before {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -10%;
  width: 120%;
  height: 60%;
  background: radial-gradient(ellipse at center, rgba(79, 70, 229, 0.22) 0%, rgba(99, 102, 241, 0.12) 50%, transparent 80%);
  filter: blur(60px);
  pointer-events: none;
}

.login-top-logo {
  z-index: 10;
}
.login-brand-logo-img {
  max-height: 80px;
  max-width: 280px;
  object-fit: contain;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  mix-blend-mode: multiply;
}
.login-brand-default-icon {
  display: inline-flex;
  align-items: center;
  font-size: 1.3rem;
  color: var(--primary);
}

.login-main-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1140px;
  width: 100%;
  margin: 0 auto;
  z-index: 10;
  padding: 20px 0;
}

.login-info-left {
  flex: 1;
  max-width: 540px;
  padding-right: 40px;
}
.login-app-title {
  font-size: 3.4rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.12;
  letter-spacing: -1.8px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #0f172a 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.login-app-tagline {
  font-size: 1.1rem;
  color: #475569;
  line-height: 1.6;
  font-weight: 400;
}

.login-form-card {
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 38px 36px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 20px 50px rgba(79, 70, 229, 0.08), 0 4px 14px rgba(0, 0, 0, 0.03);
}
.login-card-head-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}
.login-card-head-subtitle {
  color: #64748b;
  font-size: 0.88rem;
  margin-bottom: 24px;
  line-height: 1.4;
}

.login-input-group {
  margin-bottom: 18px;
}
.login-input-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
  display: block;
}
.login-input-wrap {
  position: relative;
}
.login-input-wrap .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}
.login-input-wrap .form-control {
  padding-left: 42px;
  padding-right: 42px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}
.login-input-wrap .form-control:focus {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}
.login-input-wrap .form-control:focus ~ .input-icon {
  color: var(--primary);
}
.login-input-wrap .toggle-pw-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px 8px;
}
.login-input-wrap .toggle-pw-btn:hover {
  color: #334155;
}

.login-btn-submit {
  height: 48px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border: none;
  color: #fff;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.25);
  transition: all 0.2s ease;
  width: 100%;
}
.login-btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(79, 70, 229, 0.35);
  color: #fff;
}

.login-footer-bar {
  z-index: 10;
  font-size: 0.82rem;
  color: #64748b;
  padding-top: 15px;
}

@media (max-width: 991.98px) {
  .login-page-wrapper {
    padding: 20px 16px;
  }
  .login-top-logo {
    text-align: center;
    margin-bottom: 10px;
  }
  .login-main-body {
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    padding: 10px 0;
  }
  .login-info-left {
    max-width: 100%;
    padding-right: 0;
    text-align: center;
  }
  .login-app-title {
    font-size: 2.2rem;
  }
  .login-form-card {
    padding: 28px 20px;
    max-width: 100%;
  }
  .login-footer-bar {
    text-align: center;
  }
}

/* ---------- APP LAYOUT ---------- */
.app-wrapper {
  display: flex;
  min-height: 100vh;
  background-color: var(--bg-app);
}

.sidebar {
  width: var(--sidebar-width);
  background: #ffffff !important;
  border-right: 1px solid #f1f5f9 !important;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1030;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  display: flex;
  flex-direction: column;
  box-shadow: 2px 0 16px rgba(15, 23, 42, 0.04) !important;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  font-weight: 800;
  font-size: 1.15rem;
  color: #0f172a !important;
  min-height: 64px;
  letter-spacing: -0.5px;
  border-bottom: 1px solid #f1f5f9 !important;
}
.sidebar-brand-img {
  max-height: 40px;
  max-width: 170px;
  object-fit: contain;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
.sidebar-brand .sidebar-app-name-text {
  color: #0f172a !important;
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.4px !important;
}
.sidebar-brand i {
  font-size: 1.25rem;
  color: #2563eb;
}

.sidebar-nav {
  padding: 12px 14px 30px;
  flex: 1;
}

.sidebar-section-title {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8 !important;
  padding: 18px 12px 8px;
  font-weight: 700;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: 12px;
  color: #475569 !important;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  margin-bottom: 4px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}
.sidebar-link i {
  width: 20px;
  text-align: center;
  color: #64748b !important;
  font-size: 1.05rem;
  transition: color 0.2s ease;
}
.sidebar-link:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}
.sidebar-link:hover i {
  color: #2563eb !important;
}

/* ACTIVE MENU ITEM - SOLID VIBRANT BLUE PILL (SALESMONK DESIGN) */
.sidebar-link.active {
  background: #2563eb !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28) !important;
}
.sidebar-link.active i {
  color: #ffffff !important;
}

/* Submenu dropdown */
.sidebar-submenu {
  padding-left: 10px;
  display: none;
  margin-top: 4px;
  margin-bottom: 8px;
  background: #f8fafc;
  border-radius: 12px;
  padding-top: 4px;
  padding-bottom: 4px;
  border: 1px solid #f1f5f9;
}
.sidebar-submenu .sidebar-link {
  font-size: 0.83rem;
  padding: 9px 14px;
  color: #475569 !important;
}
.sidebar-submenu .sidebar-link:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}
.sidebar-submenu .sidebar-link.active {
  background: #eff6ff !important;
  color: #2563eb !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}
.sidebar-submenu .sidebar-link.active i {
  color: #2563eb !important;
}

.sidebar-group.open .sidebar-submenu {
  display: block;
}
.sidebar-group.open > .sidebar-link .chevron-icon {
  transform: rotate(90deg);
}
.chevron-icon {
  transition: transform 0.2s ease;
  margin-left: auto;
  font-size: 0.75rem;
  color: #94a3b8 !important;
}

/* =========================================================
   SIDEBAR COLLAPSED (SHOW / HIDE - ICON ONLY MINI SIDEBAR)
   ========================================================= */
body.sidebar-collapsed .sidebar,
html.sidebar-collapsed-init body .sidebar {
  width: 74px !important;
}

body.sidebar-collapsed .app-content,
html.sidebar-collapsed-init body .app-content {
  margin-left: 74px !important;
  width: calc(100% - 74px) !important;
}

body.sidebar-collapsed .sidebar-brand-img,
html.sidebar-collapsed-init body .sidebar-brand-img {
  max-width: 38px !important;
  margin: 0 auto;
}

body.sidebar-collapsed .sidebar-app-name-text,
body.sidebar-collapsed .sidebar-section-title,
body.sidebar-collapsed .sidebar-link span,
body.sidebar-collapsed .chevron-icon,
html.sidebar-collapsed-init body .sidebar-app-name-text,
html.sidebar-collapsed-init body .sidebar-section-title,
html.sidebar-collapsed-init body .sidebar-link span,
html.sidebar-collapsed-init body .chevron-icon {
  display: none !important;
}

body.sidebar-collapsed .sidebar-brand,
html.sidebar-collapsed-init body .sidebar-brand {
  padding: 14px 10px !important;
  justify-content: center !important;
  align-items: center !important;
}

body.sidebar-collapsed .sidebar-nav,
html.sidebar-collapsed-init body .sidebar-nav {
  padding: 12px 8px !important;
}

body.sidebar-collapsed .sidebar-link,
html.sidebar-collapsed-init body .sidebar-link {
  justify-content: center !important;
  padding: 12px 0 !important;
  gap: 0 !important;
  border-radius: 12px !important;
  position: relative;
}

body.sidebar-collapsed .sidebar-link i,
html.sidebar-collapsed-init body .sidebar-link i {
  font-size: 1.15rem !important;
  margin: 0 !important;
}

body.sidebar-collapsed .sidebar-submenu,
html.sidebar-collapsed-init body .sidebar-submenu {
  display: none !important;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  z-index: 1025;
}

.app-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 70px;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
  position: sticky;
  top: 0;
  z-index: 1020;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.015);
}

.topbar-search-wrap {
  position: relative;
  width: 280px;
}
.topbar-search-wrap .topbar-search-input {
  height: 40px;
  border-radius: 20px;
  padding-left: 38px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 0.88rem;
  transition: all 0.2s ease;
}
.topbar-search-wrap .topbar-search-input:focus {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.topbar-search-wrap .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.9rem;
}

.topbar-user-btn {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 4px 12px 4px 6px;
  transition: all 0.2s ease;
}
.topbar-user-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.app-main { flex: 1; }

/* ---------- CARDS / WIDGETS ---------- */
.card {
  border-radius: var(--card-radius);
  border: 1px solid #f1f5f9;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.025), 0 1px 4px rgba(0, 0, 0, 0.01);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card {
  background: #ffffff;
  border-radius: var(--card-radius);
  padding: 22px;
  border: 1px solid #f1f5f9;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.025);
  height: 100%;
}
.stat-card .stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  background: var(--primary-light);
  color: var(--primary);
}
.stat-card .stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}
.stat-card .stat-label {
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 500;
}

/* BANNER CARD */
.banner-card {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--card-radius);
  color: #ffffff;
  padding: 24px;
  box-shadow: 0 12px 28px rgba(79, 70, 229, 0.25);
}

.status-badge-clean {
  background: #dcfce7;
  color: #15803d;
  border-radius: 20px;
  padding: 5px 12px;
  font-weight: 600;
  font-size: 0.78rem;
}
.status-badge-dirty {
  background: #fee2e2;
  color: #b91c1c;
  border-radius: 20px;
  padding: 5px 12px;
  font-weight: 600;
  font-size: 0.78rem;
}

/* ---------- BUTTONS & INPUTS ---------- */
.btn {
  border-radius: 12px;
  font-weight: 600;
  padding: 8px 16px;
  transition: all 0.2s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
  border: none !important;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.25);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(79, 70, 229, 0.35);
}

.form-control, .form-select {
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 10px 14px;
  font-size: 0.92rem;
}
.form-control:focus, .form-select:focus {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* ---------- FORM CHECKLIST & CAMERA ---------- */
.item-check-group .btn-check:checked + .btn-outline-success { background: #16a34a; color: #fff; border-color: #16a34a; }
.item-check-group .btn-check:checked + .btn-outline-danger { background: #dc2626; color: #fff; border-color: #dc2626; }
.photo-upload-box {
  border: 2px dashed #cbd5e1;
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  color: #64748b;
  font-size: .85rem;
  background: #f8fafc;
  transition: all .15s ease;
}
.photo-upload-box:hover { border-color: var(--primary); background: var(--primary-light); }

/* ---------- FOTO SQUARE CROP (1:1 CENTER) ---------- */
.img-square-crop {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

/* ---------- PRINT LAYOUT A4 (NO BROWSER HEADER/FOOTER & PROPORTIONAL MARGINS) ---------- */
@media print {
  @page {
    size: A4 portrait;
    margin: 0; /* Menghilangkan tanggal/judul di header atas & URL di footer bawah dari browser */
  }
  .sidebar, 
  .topbar, 
  .mobile-bottom-nav, 
  .app-footer, 
  footer, 
  .no-print, 
  .btn, 
  nav, 
  .modal, 
  .modal-backdrop, 
  .modal-footer, 
  .dropdown-menu { 
    display: none !important; 
  }
  
  body { 
    background: #ffffff !important; 
    color: #1e293b !important; 
    font-size: 9.5pt !important; 
    line-height: 1.3 !important; 
    padding: 0 !important; 
    padding-bottom: 0 !important; 
    margin: 0 !important; 
  }
  
  .app-wrapper, .app-content, .app-main { 
    margin: 0 !important; 
    padding: 0 !important; 
    width: 100% !important; 
  }

  .print-container {
    padding: 12mm 10mm !important;
    box-sizing: border-box !important;
    width: 100% !important;
  }
  
  .card { 
    border: none !important; 
    box-shadow: none !important; 
    margin-bottom: 10px !important; 
    padding: 0 !important;
  }
  
  .print-page-break {
    page-break-after: always !important;
    break-after: page !important;
  }
  
  .print-header-table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin-bottom: 12px !important;
  }
  
  .print-header-table td, .print-header-table th {
    padding: 6px 8px !important;
    border: 1px solid #cbd5e1 !important;
    font-size: 9pt !important;
  }
  
  .print-table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin-bottom: 15px !important;
  }
  
  .print-table th {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
    font-weight: 700 !important;
    text-align: left !important;
    padding: 6px 8px !important;
    border: 1px solid #cbd5e1 !important;
    font-size: 9pt !important;
  }
  
  .print-table td {
    padding: 6px 8px !important;
    border: 1px solid #cbd5e1 !important;
    font-size: 9pt !important;
    page-break-inside: avoid !important;
  }
  
  .print-photo-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 12px !important;
    margin-top: 10px !important;
  }
  
  .print-photo-card {
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    padding: 8px !important;
    background: #fff !important;
    box-sizing: border-box !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    text-align: center !important;
  }
  
  .print-photo-card img {
    width: 100% !important;
    height: 145px !important;
    max-height: 145px !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 4px !important;
  }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.show { transform: translateX(0); }
  .app-content { margin-left: 0; }
  .sidebar-backdrop.show { display: block; }
  .topbar-search-wrap { display: none; }
}

/* ---------- MOBILE BOTTOM NAVIGATION BAR (FIXED STICKY) ---------- */
@media (max-width: 767.98px) {
  body {
    padding-bottom: 70px !important;
  }
  .mobile-bottom-nav {
    height: 62px;
    z-index: 1050;
    background: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid #e2e8f0 !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05) !important;
  }
  .nav-item-mobile {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 500;
    flex: 1;
    transition: all 0.2s ease;
  }
  .nav-item-mobile i {
    font-size: 1.15rem;
  }
  .nav-item-mobile.active, .nav-item-mobile:hover {
    color: #4f46e5 !important;
    font-weight: 700;
  }
}

/* ---------- 3-DOTS ACTION DROPDOWN & PASTEL HIGHLIGHTS ---------- */
.dropdown-action-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  transition: all 0.15s ease-in-out;
}
.dropdown-action-btn:hover,
.dropdown-action-btn:focus,
.dropdown-action-btn[aria-expanded="true"] {
  background-color: #e0e7ff;
  border-color: #c7d2fe;
  color: #4338ca;
}

/* Prevent table dropdown menu clipping inside cards & containers */
.table-responsive,
.dataTables_wrapper {
  overflow: visible;
}

@media (max-width: 767.98px) {
  .table-responsive {
    overflow-x: auto;
  }
}

.table .dropdown-menu {
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  padding: 6px;
  min-width: 155px;
  z-index: 1080 !important;
}

.table .dropdown-item {
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.15s ease-in-out;
  cursor: pointer;
}

/* Pastel Highlight Variants */
.dropdown-item-pastel-blue:hover, 
.dropdown-item-pastel-blue:focus {
  background-color: #e0f2fe !important;
  color: #0284c7 !important;
}

.dropdown-item-pastel-yellow:hover, 
.dropdown-item-pastel-yellow:focus {
  background-color: #fef3c7 !important;
  color: #d97706 !important;
}

.dropdown-item-pastel-red:hover, 
.dropdown-item-pastel-red:focus {
  background-color: #ffe4e6 !important;
  color: #e11d48 !important;
}

.dropdown-item-pastel-green:hover, 
.dropdown-item-pastel-green:focus {
  background-color: #dcfce7 !important;
  color: #15803d !important;
}

.dropdown-item-pastel-purple:hover, 
.dropdown-item-pastel-purple:focus {
  background-color: #f3e8ff !important;
  color: #7e22ce !important;
}

.dropdown-item-pastel-gray:hover, 
.dropdown-item-pastel-gray:focus {
  background-color: #f1f5f9 !important;
  color: #475569 !important;
}

/* ---------- CHECKLIST FORM MOBILE OPTIMIZATIONS ---------- */
.checklist-item-card {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.checklist-item-card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.checklist-item-card.has-finding {
  border-color: #fca5a5 !important;
  background-color: #fff5f5 !important;
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.08);
}

.item-check-group-responsive {
  display: flex;
  width: 100%;
  gap: 8px;
}

.item-check-group-responsive .btn-check + .btn {
  flex: 1;
  text-align: center;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 8px 12px;
  border-radius: 12px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.2s ease;
  min-height: 40px;
}

.item-check-group-responsive .btn-check:checked + .btn-outline-success {
  background-color: #10b981 !important;
  border-color: #10b981 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.item-check-group-responsive .btn-check:checked + .btn-outline-danger {
  background-color: #ef4444 !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

@media (max-width: 575.98px) {
  .checklist-item-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }
  .checklist-item-title {
    font-size: 0.95rem;
    font-weight: 700;
  }
}

/* ---------- EXECUTIVE HERO WELCOME CARD ---------- */
.hero-welcome-card {
  background-color: #4f46e5 !important;
  background-image: linear-gradient(135deg, #4f46e5 0%, #312e81 100%) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 10px 30px rgba(79, 70, 229, 0.25) !important;
}

.hero-welcome-card h3,
.hero-welcome-card h4,
.hero-welcome-card h5 {
  color: #ffffff !important;
}

.hero-welcome-card p,
.hero-welcome-card .hero-subtitle {
  color: rgba(255, 255, 255, 0.9) !important;
}

/* ==========================================================================
   APPIFY MODERN MOBILE APP UI DESIGN THEME
   Strictly scoped to screens < 768px (Desktop view remains 100% untouched)
   ========================================================================== */
@media (max-width: 767.98px) {
  /* 1. Appify Mobile Header Banner */
  .appify-mobile-header {
    background: linear-gradient(135deg, #3730a3 0%, #4f46e5 50%, #6366f1 100%) !important;
    border-radius: 24px !important;
    padding: 20px 18px !important;
    color: #ffffff !important;
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.22) !important;
    margin-bottom: 20px !important;
    position: relative;
    overflow: hidden;
  }

  .appify-mobile-header::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -20%;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
  }

  .appify-search-box {
    background: #ffffff !important;
    border-radius: 16px !important;
    padding: 8px 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08) !important;
    margin-top: 14px !important;
  }

  .appify-search-box input {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    font-size: 0.85rem !important;
    background: transparent !important;
    width: 100% !important;
    padding: 0 8px !important;
  }

  /* 2. Appify Quick Access Icon Grid */
  .appify-quick-section {
    margin-bottom: 22px !important;
  }

  .appify-quick-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 14px 10px !important;
  }

  .appify-quick-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    text-decoration: none !important;
    color: #1e293b !important;
    transition: transform 0.15s ease !important;
  }

  .appify-quick-item.d-none {
    display: none !important;
  }

  .appify-quick-item:active {
    transform: scale(0.92) !important;
  }

  .appify-icon-box {
    width: 58px !important;
    height: 58px !important;
    border-radius: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.35rem !important;
    margin-bottom: 6px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04) !important;
    transition: all 0.2s ease !important;
  }

  .appify-icon-label {
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    color: #334155 !important;
    line-height: 1.25 !important;
  }

  /* Appify Icon Pastel Variants */
  .icon-box-emerald { background-color: #d1fae5 !important; color: #059669 !important; }
  .icon-box-blue    { background-color: #dbeafe !important; color: #2563eb !important; }
  .icon-box-amber   { background-color: #fef3c7 !important; color: #d97706 !important; }
  .icon-box-purple  { background-color: #e0e7ff !important; color: #4f46e5 !important; }
  .icon-box-cyan    { background-color: #cff4fc !important; color: #0891b2 !important; }
  .icon-box-rose    { background-color: #ffe4e6 !important; color: #e11d48 !important; }
  .icon-box-teal    { background-color: #ccfbf1 !important; color: #0d9488 !important; }
  .icon-box-gray    { background-color: #f1f5f9 !important; color: #475569 !important; }

  /* 3. Appify Promo Feature Card */
  .appify-promo-card {
    background: linear-gradient(135deg, #818cf8 0%, #4f46e5 100%) !important;
    border-radius: 22px !important;
    padding: 18px !important;
    color: #ffffff !important;
    position: relative !important;
    overflow: hidden !important;
    margin-bottom: 22px !important;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.2) !important;
  }

  /* 4. Android Top Bar */
  .topbar {
    height: 60px !important;
    padding: 0 16px !important;
    background: #ffffff !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
    position: sticky !important;
    top: 0;
    z-index: 1030;
    border-bottom: 1px solid #f1f5f9 !important;
  }

  /* 2. Main Page Spacing to accommodate bottom navigation */
  .app-main {
    padding: 14px 14px 90px 14px !important;
    background-color: #f8fafc !important;
  }

  /* 3. Appify Modern Bottom Navigation Bar (Center Raised Action Style) */
  .mobile-bottom-nav {
    height: 68px !important;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid #f1f5f9 !important;
    box-shadow: 0 -8px 30px rgba(15, 23, 42, 0.08) !important;
    border-radius: 20px 20px 0 0 !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 4px !important;
    z-index: 1040 !important;
  }

  .nav-item-mobile {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 !important;
    color: #64748b !important;
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
  }

  .nav-item-mobile .pill-icon-wrap {
    width: 46px;
    height: 28px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    margin-bottom: 2px;
    transition: all 0.22s ease-in-out;
  }

  .nav-item-mobile.active {
    color: #4f46e5 !important;
    font-weight: 700 !important;
  }

  .nav-item-mobile.active .pill-icon-wrap {
    background-color: #e0e7ff;
    color: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.15);
  }

  /* Center Raised Action Button (Absen Scanner) */
  .nav-center-raised {
    overflow: visible !important;
  }

  .center-raised-btn {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-top: -24px;
    margin-bottom: 3px;
    border: 4px solid #ffffff;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }

  .nav-center-raised:active .center-raised-btn {
    transform: scale(0.92);
  }

  .nav-center-raised.active .center-raised-btn {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.5);
  }

  .center-raised-label {
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    color: #2563eb !important;
  }

  /* 5. Android Material Cards & Elevation */
  .card, 
  .stat-card {
    border-radius: 20px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03) !important;
    background-color: #ffffff !important;
    margin-bottom: 14px;
  }

  .card-header {
    border-radius: 20px 20px 0 0 !important;
    padding: 14px 16px !important;
  }

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

  /* 6. Executive Hero Card Mobile Adaptation */
  .hero-welcome-card {
    border-radius: 24px !important;
    padding: 20px 16px !important;
    margin-bottom: 16px !important;
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.2) !important;
  }

  .hero-welcome-card h3 {
    font-size: 1.35rem !important;
  }

  .hero-welcome-card .btn {
    width: 100%;
    margin-top: 4px;
    font-size: 0.88rem;
    padding: 10px 16px;
    border-radius: 20px;
  }

  /* 7. Stat Cards 5-Column Grid Fix for Mobile */
  .col-lg-2-4 {
    width: 50% !important;
  }

  /* 8. Touch-Friendly Form Elements */
  .form-control, 
  .form-select {
    min-height: 48px !important;
    border-radius: 14px !important;
    font-size: 0.92rem !important;
    border: 1px solid #cbd5e1 !important;
    padding: 10px 14px !important;
  }

  .form-control:focus, 
  .form-select:focus {
    border-color: #4f46e5 !important;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12) !important;
  }

  .btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
  }

  .btn-pill, 
  .btn-rounded-pill,
  .rounded-pill {
    border-radius: 24px !important;
  }

  /* 9. Mobile Table Improvements */
  .table-responsive {
    border-radius: 16px;
    overflow: hidden;
  }

  .table th, .table td {
    padding: 10px 12px !important;
    font-size: 0.82rem !important;
  }
}

/* =========================================================
   TWO DISTINCT VIEW MODES (MOBILE PORTAL VS CMS ADMIN)
   ========================================================= */

/* 1. MOBILE PORTAL MODE (URL: / or /login.php) */
body.app-mode-mobile .app-sidebar {
  display: none !important;
}

body.app-mode-mobile .app-content {
  margin-left: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  padding-bottom: 90px !important;
}

body.app-mode-mobile .mobile-bottom-nav {
  display: flex !important;
}

body.app-mode-mobile .cms-only {
  display: none !important;
}

body.app-mode-mobile .mobile-only {
  display: block !important;
}

/* 2. CMS ADMIN MODE (URL: /bc-login/) */
@media (min-width: 992px) {
  body.app-mode-cms .mobile-bottom-nav {
    display: none !important;
  }
}

@media (max-width: 991.98px) {
  .mobile-bottom-nav {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1050 !important;
  }
}

body.app-mode-cms .app-sidebar {
  display: flex !important;
}

@media (min-width: 992px) {
  body.app-mode-cms .app-content {
    margin-left: 260px;
    width: calc(100% - 260px);
    padding-bottom: 24px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  }
  body.app-mode-cms.sidebar-collapsed .app-content,
  html.sidebar-collapsed-init body.app-mode-cms .app-content {
    margin-left: 74px !important;
    width: calc(100% - 74px) !important;
  }
}

@media (max-width: 991.98px) {
  body.app-mode-cms .app-content {
    margin-left: 0 !important;
    width: 100% !important;
    padding-bottom: 90px !important;
  }
}

body.app-mode-cms .cms-only {
  display: block !important;
}

body.app-mode-cms .mobile-only {
  display: none !important;
}

.mobile-back-btn {
  background-color: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #1e293b !important;
  transition: all 0.2s ease !important;
}

.mobile-back-btn:hover,
.mobile-back-btn:active {
  transform: scale(0.92) !important;
  background-color: #e2e8f0 !important;
}

/* =========================================================
   PROFESSIONAL TYPOGRAPHY FOR PORTAL ADMIN (CMS)
   ========================================================= */
body.app-mode-cms {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.865rem !important; /* ~13.8px clean body text */
  line-height: 1.5 !important;
  color: #1e293b;
}

body.app-mode-cms h1, 
body.app-mode-cms h2 {
  font-size: 1.35rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.3px !important;
}

body.app-mode-cms h3 {
  font-size: 1.2rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.2px !important;
}

body.app-mode-cms h4 {
  font-size: 1.05rem !important;
  font-weight: 700 !important;
}

body.app-mode-cms h5, 
body.app-mode-cms h6 {
  font-size: 0.92rem !important;
  font-weight: 700 !important;
}

body.app-mode-cms .topbar {
  height: 64px !important;
}

body.app-mode-cms .topbar h5 {
  font-size: 1.05rem !important;
  letter-spacing: -0.3px;
}

body.app-mode-cms .table {
  font-size: 0.83rem !important;
}

body.app-mode-cms .table th {
  font-size: 0.72rem !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: #475569;
  background: #f8fafc;
  padding: 10px 14px !important;
}

body.app-mode-cms .table td {
  padding: 11px 14px !important;
  vertical-align: middle;
}

body.app-mode-cms .form-control, 
body.app-mode-cms .form-select {
  min-height: 38px !important;
  height: 38px !important;
  font-size: 0.85rem !important;
  padding: 6px 12px !important;
  border-radius: 10px !important;
  border: 1px solid #cbd5e1 !important;
}

body.app-mode-cms textarea.form-control {
  min-height: 80px !important;
  height: auto !important;
}

body.app-mode-cms .btn {
  min-height: 36px !important;
  font-size: 0.83rem !important;
  padding: 6px 14px !important;
  border-radius: 10px !important;
  font-weight: 600 !important;
}

body.app-mode-cms .badge {
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  padding: 4px 9px !important;
}

body.app-mode-cms .card-header {
  padding: 12px 18px !important;
}

body.app-mode-cms .card-body {
  padding: 18px !important;
}

/* ---------- POPUP TOAST NOTIFICATIONS ---------- */
@keyframes toastSlideInDown {
  from {
    transform: translate3d(0, -35px, 0) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
  }
}

@keyframes toastSlideOutUp {
  from {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
  }
  to {
    transform: translate3d(0, -35px, 0) scale(0.92);
    opacity: 0;
  }
}

.animate-toast-in {
  animation: toastSlideInDown 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-toast-out {
  animation: toastSlideOutUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#appGlobalToastContainer {
  pointer-events: none;
}

#appGlobalToastContainer .toast {
  pointer-events: auto;
}

/* ---------- MOBILE & TABLET RESPONSIVE ENHANCEMENTS ---------- */
/* Smartphone Devices (< 576px) */
@media (max-width: 575.98px) {
  .container, .container-fluid {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  .btn-md, .form-control-md {
    min-height: 42px;
  }
  .photo-preview-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
  }
  .photo-preview-card:active {
    transform: scale(0.97);
  }
}

/* Tablet Devices (576px to 991.98px) */
@media (min-width: 576px) and (max-width: 991.98px) {
  .container-tablet-fluid {
    max-width: 100% !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
  .grid-tablet-2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .modal-dialog {
    max-width: 92% !important;
    margin: 1.75rem auto;
  }
}

/* Swipable Pill Custom Scrollbar Utility */
.custom-scrollbar::-webkit-scrollbar {
  height: 4px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 10px;
}
.cursor-pointer {
  cursor: pointer !important;
}

/* Custom Dots Outside Below Carousel Slide Banner */
.custom-carousel-dots {
  position: static !important;
  margin-top: 10px !important;
  margin-bottom: 0 !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
}
.custom-carousel-dots [data-bs-target] {
  width: 8px !important;
  height: 8px !important;
  border-radius: 50% !important;
  background-color: #cbd5e1 !important;
  border: none !important;
  opacity: 0.7 !important;
  margin: 0 4px !important;
  padding: 0 !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.custom-carousel-dots [data-bs-target].active {
  width: 22px !important;
  border-radius: 10px !important;
  background-color: #4f46e5 !important;
  opacity: 1 !important;
}

/* =========================================================
   PORTAL ADMIN (CMS) — INTEGRA HRIS MODERN DESIGN SYSTEM
   ========================================================= */

/* Deep Royal Navy Gradient Sidebar in CMS Mode */
.app-mode-cms .sidebar {
  background: linear-gradient(180deg, #072a6b 0%, #031740 100%) !important;
  border-right: none !important;
  box-shadow: 4px 0 25px rgba(0, 0, 0, 0.12) !important;
}

.app-mode-cms .sidebar-brand {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.app-mode-cms .sidebar-brand .sidebar-app-name-text {
  color: #ffffff !important;
}

.app-mode-cms .sidebar-section-title {
  color: #8da4d0 !important;
}

.app-mode-cms .sidebar-link {
  color: #c4d7f5 !important;
}

.app-mode-cms .sidebar-link i {
  color: #9ab9ed !important;
}

.app-mode-cms .sidebar-link:hover {
  background: rgba(255, 255, 255, 0.09) !important;
  color: #ffffff !important;
}

.app-mode-cms .sidebar-link:hover i {
  color: #ffffff !important;
}

.app-mode-cms .sidebar-link.active {
  background: #1b68f3 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 18px rgba(27, 104, 243, 0.45) !important;
}

.app-mode-cms .sidebar-link.active i {
  color: #ffffff !important;
}

.app-mode-cms .sidebar-submenu {
  background: rgba(0, 0, 0, 0.22) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.app-mode-cms .sidebar-submenu .sidebar-link {
  color: #b0c9f0 !important;
}

.app-mode-cms .sidebar-submenu .sidebar-link:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
}

.app-mode-cms .sidebar-submenu .sidebar-link.active {
  background: rgba(27, 104, 243, 0.35) !important;
  color: #ffffff !important;
  border: 1px solid rgba(27, 104, 243, 0.6);
}

.app-mode-cms .chevron-icon {
  color: #8da4d0 !important;
}

/* Sidebar Shortcuts Widget */
.sidebar-shortcut-item {
  color: #c5d9f8;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
}
.sidebar-shortcut-item:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

/* Topbar in CMS Mode */
.app-mode-cms .topbar {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
}

/* Metric KPI Cards in CMS Dashboard */
.cms-kpi-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #f1f5f9;
  padding: 16px;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.03);
  transition: all 0.2s ease-in-out;
}
.cms-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
}

.cms-kpi-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}
.cms-kpi-icon-blue { background: #e0edff; color: #1b68f3; }
.cms-kpi-icon-green { background: #e1f9ee; color: #10b981; }
.cms-kpi-icon-pink { background: #ffe8ec; color: #f43f5e; }
.cms-kpi-icon-teal { background: #ccfbf1; color: #0d9488; }
.cms-kpi-icon-orange { background: #fff3e0; color: #f59e0b; }
.cms-kpi-icon-sky { background: #e0f2fe; color: #0284c7; }
.cms-kpi-icon-red { background: #fee2e2; color: #dc2626; }

.cms-kpi-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 2px;
}
.cms-kpi-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}
.cms-kpi-unit {
  font-size: 0.78rem;
  font-weight: 500;
  color: #64748b;
}
.cms-kpi-trend {
  font-size: 0.7rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 6px;
}
.cms-kpi-trend-up { color: #10b981; }
.cms-kpi-trend-down { color: #ef4444; }

/* Dashboard Cards (White rounded) */
.cms-dashboard-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #f1f5f9;
  box-shadow: 0 2px 14px rgba(15, 23, 42, 0.03);
  padding: 24px;
}

/* Stat Mini Card with proper padding */
.cms-stat-mini-card {
  padding: 14px 16px !important;
  border-radius: 12px !important;
  min-height: 88px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-width: 1px;
  border-style: solid;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cms-stat-mini-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

/* Fractional padding helpers */
.p-2\.5 { padding: 0.75rem !important; }
.p-3\.5 { padding: 1.25rem !important; }
.px-2\.5 { padding-left: 0.75rem !important; padding-right: 0.75rem !important; }
.py-2\.5 { padding-top: 0.75rem !important; padding-bottom: 0.75rem !important; }
.pt-2\.5 { padding-top: 0.75rem !important; }
.pb-2\.5 { padding-bottom: 0.75rem !important; }

/* Spacing for KPI bottom row beneath divider line */
.cms-kpi-bottom-row {
  margin-top: 14px !important;
  padding-top: 14px !important;
}

/* Custom Donut Chart Center Label */
.chart-donut-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}

/* Dashboard Calendar Widget Styling */
.widget-cal-table {
  table-layout: fixed;
  width: 100%;
}
.widget-cal-table th {
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  padding: 6px 0 !important;
  color: #64748b !important;
  background: transparent !important;
  border: none !important;
}
.widget-cal-table td {
  padding: 2px 0 !important;
  height: 34px;
  vertical-align: middle;
  text-align: center;
  border: none !important;
}
.widget-cal-day {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  margin: 0 auto;
  position: relative;
}
.widget-cal-day.today {
  background: linear-gradient(135deg, #1b68f3 0%, #074bb8 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 3px 10px rgba(27, 104, 243, 0.4) !important;
  font-weight: 700 !important;
}
.widget-cal-day.holiday-date {
  color: #ef4444 !important;
  font-weight: 700;
}
.widget-cal-day.holiday-date::after {
  content: '';
  position: absolute;
  bottom: 2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: #ef4444;
}
.widget-cal-day.today::after {
  background-color: #ffffff !important;
}
.widget-cal-day.selected-date:not(.today) {
  background-color: #e0edff !important;
  color: #1b68f3 !important;
  border: 1px solid #1b68f3 !important;
  font-weight: 700 !important;
}
.widget-cal-day.other-month {
  color: #cbd5e1 !important;
  font-weight: 400 !important;
  cursor: default;
}
.widget-cal-day:hover:not(.other-month):not(.today) {
  background-color: #f1f5f9;
  color: #0f172a;
  transform: scale(1.12);
}

/* ==========================================================================
   PRINT MEDIA STYLES
   ========================================================================== */
@media print {
  .mobile-bottom-nav,
  .no-print,
  .d-print-none,
  .sidebar,
  .topbar,
  #modalScanQR,
  header,
  footer,
  aside,
  nav {
    display: none !important;
  }
}

/* ==========================================================================
   FRACTIONAL SPACING & ICON MARGIN UTILITIES
   ========================================================================== */
.me-1\.5 { margin-right: 0.375rem !important; }
.me-2\.5 { margin-right: 0.625rem !important; }
.ms-1\.5 { margin-left: 0.375rem !important; }
.ms-2\.5 { margin-left: 0.625rem !important; }
.gap-1\.5 { gap: 0.375rem !important; }
.gap-2\.5 { gap: 0.625rem !important; }

/* Ensure icons have reliable breathing room next to text */
i[class*="fa-"].me-2 { margin-right: 0.5rem !important; }
i[class*="fa-"].me-2\.5 { margin-right: 0.625rem !important; }
i[class*="fa-"].me-3 { margin-right: 0.85rem !important; }

/* ==========================================================================
   MODUL CHAT & PESAN INTERNAL (3-COLUMN MODERN SAAS STYLE)
   ========================================================================== */
.chat-app-wrapper {
  display: flex;
  height: calc(100vh - 110px);
  min-height: 600px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
  position: relative;
}

/* --------------------------------------------------------------------------
   KOLOM 1: SIDEBAR PESAN & KONTAK
   -------------------------------------------------------------------------- */
.chat-sidebar {
  width: 350px;
  flex-shrink: 0;
  border-right: 1px solid #eef2f6;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  z-index: 5;
}

.chat-sidebar-header {
  padding: 16px 20px;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
}

.chat-header-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.5px;
}

.chat-header-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
}
.chat-header-icon-btn:hover {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
  transform: translateY(-1px);
}

/* SEARCH BAR */
.chat-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.chat-search-input {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 9999px !important;
  height: 40px !important;
  font-size: 0.85rem !important;
  padding-left: 42px !important;
  padding-right: 14px !important;
  transition: all 0.2s ease !important;
}
.chat-search-input:focus {
  background: #ffffff !important;
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
}

/* ONLINE NOW HORIZONTAL BAR */
.online-now-wrap {
  padding: 12px 18px 10px;
  border-bottom: 1px solid #f1f5f9;
  background: #ffffff;
}

.online-now-title {
  font-size: 0.74rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 8px;
}

.online-now-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}
.online-now-scroll::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.online-now-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  text-decoration: none;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.online-now-item:hover {
  transform: translateY(-2px);
}

.online-now-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  position: relative;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.online-now-dot {
  position: absolute;
  bottom: 0px;
  right: 0px;
  width: 11px;
  height: 11px;
  background-color: #10b981;
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.25);
}

.online-now-name {
  font-size: 0.7rem;
  font-weight: 600;
  color: #334155;
  margin-top: 4px;
  text-align: center;
  max-width: 50px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* SECTION HEADERS IN CONVERSATIONS LIST */
.chat-section-divider {
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 18px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* CONVERSATION ITEMS */
.chat-conv-list .conv-item {
  padding: 12px 18px;
  border-bottom: 1px solid #f8fafc;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}
.chat-conv-list .conv-item:hover {
  background-color: #f8fafc;
}
.chat-conv-list .conv-item.active {
  background-color: #f0f7ff;
  border-right: 3.5px solid #2563eb;
}
.chat-conv-list .conv-item.active .conv-name {
  color: #1d4ed8;
}

.conv-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
}

.conv-time {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 500;
}

.conv-preview {
  font-size: 0.78rem;
  color: #64748b;
}

.conv-badge-unread {
  background-color: #ef4444;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
  box-shadow: 0 1px 3px rgba(239, 68, 68, 0.3);
}

.conv-read-check {
  color: #2563eb;
  font-size: 0.8rem;
}

.chat-online-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 11px;
  height: 11px;
  background-color: #10b981;
  border: 2px solid #ffffff;
  border-radius: 50%;
}

.chat-offline-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background-color: #94a3b8;
  border: 2px solid #ffffff;
  border-radius: 50%;
}

.avatar-circle-sm {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-circle-md {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-circle-lg {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --------------------------------------------------------------------------
   KOLOM 2: CHAT MAIN (OBROLAN TENGAH)
   -------------------------------------------------------------------------- */
.chat-main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  overflow: hidden;
  position: relative;
}

.chat-room-header {
  padding: 14px 22px;
  background: #ffffff;
  border-bottom: 1px solid #eef2f6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 4;
}

.chat-room-header-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
  cursor: pointer;
}
.chat-room-header-btn:hover {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}
.chat-room-header-btn.active {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #2563eb;
}

.chat-messages-body {
  flex-grow: 1;
  overflow-y: auto;
  padding: 20px 24px;
  background-color: #ffffff;
  background-image: radial-gradient(#f1f5f9 1px, transparent 1px);
  background-size: 20px 20px;
  display: flex;
  flex-direction: column;
}

.chat-date-separator {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 18px 0;
}
.chat-date-separator::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background-color: #f1f5f9;
  z-index: 1;
}
.chat-date-separator span {
  position: relative;
  z-index: 2;
  background: #f8fafc;
  padding: 4px 14px;
  border-radius: 9999px;
  border: 1px solid #e2e8f0;
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

/* MESSAGE ROWS WITH METADATA ABOVE BUBBLE */
.chat-msg-row {
  margin-bottom: 16px;
  display: flex;
  width: 100%;
}
.chat-msg-row.incoming {
  justify-content: flex-start;
  gap: 10px;
}
.chat-msg-row.outgoing {
  justify-content: flex-end;
}

.chat-msg-content-wrap {
  display: flex;
  flex-direction: column;
  max-width: 70%;
}
.chat-msg-row.incoming .chat-msg-content-wrap {
  align-items: flex-start;
}
.chat-msg-row.outgoing .chat-msg-content-wrap {
  align-items: flex-end;
}

.chat-msg-sender-meta {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.chat-msg-row.incoming .chat-msg-sender-meta {
  padding-left: 4px;
}
.chat-msg-row.outgoing .chat-msg-sender-meta {
  padding-right: 4px;
}

/* MODERN BUBBLE STYLES */
.chat-bubble-in {
  background: #f1f5f9;
  color: #0f172a;
  border-radius: 18px 18px 18px 4px;
  padding: 10px 16px;
  font-size: 0.88rem;
  line-height: 1.5;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  word-break: break-word;
}

.chat-bubble-out {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  color: #ffffff;
  border-radius: 18px 18px 4px 18px;
  padding: 10px 16px;
  font-size: 0.88rem;
  line-height: 1.5;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.22);
  word-break: break-word;
}

.chat-attachment-img-wrap img {
  border-radius: 12px;
  max-height: 220px;
  max-width: 100%;
  object-fit: cover;
  cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease;
}
.chat-attachment-img-wrap img:hover {
  transform: scale(1.02);
}

.chat-attachment-file-pill {
  border-radius: 12px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 0.82rem;
}

/* PILL INPUT BAR */
.chat-input-bar {
  padding: 14px 22px;
  border-top: 1px solid #eef2f6;
  background: #ffffff;
}

.chat-pill-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 30px;
  padding: 6px 8px 6px 14px;
  transition: all 0.2s ease;
}
.chat-pill-wrapper:focus-within {
  background: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 0 0 3.5px rgba(37, 99, 235, 0.12);
}

.chat-action-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.05rem;
  padding: 6px;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}
.chat-action-btn:hover {
  color: #2563eb;
}

.chat-input-field {
  flex-grow: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.88rem;
  color: #0f172a;
  resize: none;
  max-height: 100px;
  padding: 6px 0;
  line-height: 1.4;
}

.chat-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  border: none;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.chat-send-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.45);
}
.chat-send-btn:disabled {
  opacity: 0.6;
  transform: none;
  cursor: not-allowed;
}

/* --------------------------------------------------------------------------
   KOLOM 3: INFO PENGGUNA & SHARED MEDIA (RIGHT SIDEBAR)
   -------------------------------------------------------------------------- */
.chat-info-sidebar {
  width: 320px;
  flex-shrink: 0;
  border-left: 1px solid #eef2f6;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transition: width 0.25s ease, opacity 0.2s ease;
  z-index: 5;
}

.chat-info-sidebar.collapsed {
  display: none !important;
}

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

.chat-info-profile-card {
  padding: 24px 20px 18px;
  text-align: center;
  border-bottom: 1px solid #f1f5f9;
}

.chat-info-avatar-wrap {
  width: 80px;
  height: 80px;
  margin: 0 auto 12px;
  position: relative;
}

.chat-info-avatar-wrap img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #ffffff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
}

.chat-info-dot-lg {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  background-color: #10b981;
  border: 2.5px solid #ffffff;
  border-radius: 50%;
}

.chat-info-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 4px;
}

.chat-info-quick-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 14px;
}
.chat-info-action-chip {
  padding: 6px 14px;
  border-radius: 9999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 0.74rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}
.chat-info-action-chip:hover {
  background: #eff6ff;
  color: #1d4ed8;
}

.chat-info-section {
  padding: 18px 20px;
  border-bottom: 1px solid #f1f5f9;
}

.chat-info-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-info-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 0.82rem;
}
.chat-info-item:last-child {
  margin-bottom: 0;
}
.chat-info-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #f8fafc;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* MEDIA & FILES GRID */
.chat-media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.chat-media-item {
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  border: 1px solid #e2e8f0;
}
.chat-media-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}
.chat-media-item:hover img {
  transform: scale(1.08);
}

.chat-file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #eef2f6;
  margin-bottom: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
}
.chat-file-item:hover {
  background: #f1f7fe;
  border-color: #bfdbfe;
}
.chat-file-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.chat-file-icon.pdf { background: #fee2e2; color: #ef4444; }
.chat-file-icon.doc { background: #dbeafe; color: #2563eb; }
.chat-file-icon.xls { background: #dcfce7; color: #16a34a; }
.chat-file-icon.other { background: #f1f5f9; color: #64748b; }

.cursor-pointer {
  cursor: pointer;
}

/* RESPONSIVE FULL PAGE CHAT */
@media (max-width: 1199.98px) {
  .chat-info-sidebar {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    box-shadow: -8px 0 24px rgba(15, 23, 42, 0.12);
  }
}

@media (max-width: 767.98px) {
  .chat-app-wrapper {
    height: calc(100vh - 140px);
    border-radius: 14px;
  }
  .chat-sidebar {
    width: 100%;
  }
  .chat-main {
    display: none;
    width: 100%;
  }
  .chat-info-sidebar {
    width: 100%;
  }
}

/* ==========================================================================
   FLOATING CIRCULAR CHAT BUTTON & POPUP MINI CHATBOX (MODERN REDESIGN)
   ========================================================================== */
.floating-chat-trigger-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  box-shadow: 0 6px 22px rgba(29, 78, 216, 0.4), 0 2px 6px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  z-index: 1050;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: 2px solid rgba(255, 255, 255, 0.4);
}
.floating-chat-trigger-btn:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 10px 28px rgba(29, 78, 216, 0.5), 0 4px 10px rgba(0, 0, 0, 0.15);
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
}
.floating-chat-trigger-btn:active {
  transform: scale(0.94);
}

.floating-chat-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  background-color: #ef4444;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 9999px;
  border: 2px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.docked-chat-box {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 370px;
  max-width: calc(100vw - 32px);
  height: 535px;
  max-height: calc(100vh - 48px);
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.22), 0 2px 10px rgba(15, 23, 42, 0.08);
  border: 1px solid #cbd5e1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1055;
  animation: dockedChatPopIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  transition: all 0.25s ease;
}

@keyframes dockedChatPopIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(16px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* HEADER DOCKED CHAT (KEPALANYA - ROYAL BLUE MODERN GRADIENT) */
.docked-chat-header {
  height: 52px;
  min-height: 52px;
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  color: #ffffff;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  border-radius: 15px 15px 0 0;
  transition: all 0.2s ease;
}

.docked-chat-header:hover {
  background: linear-gradient(135deg, #1e40af 0%, #172554 100%);
}

.docked-chat-header .header-action-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.16);
  border: none;
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 0.8rem;
}
.docked-chat-header .header-action-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  color: #ffffff;
  transform: scale(1.05);
}

.docked-chat-badge {
  background-color: #ef4444;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
  border: 1.5px solid #ffffff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}

/* TABS DI DALAM MINI CHATBOX */
.docked-tab-btn {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  color: #64748b;
  border: none;
  background: transparent;
  transition: all 0.2s ease;
}
.docked-tab-btn.active {
  color: #1d4ed8;
  background: #eff6ff;
  font-weight: 700;
}

.docked-chat-body {
  flex-grow: 1;
  overflow-y: auto;
  position: relative;
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
}

/* MINI ONLINE NOW ROW IN DOCKED CHAT */
.docked-online-wrap {
  padding: 8px 12px;
  border-bottom: 1px solid #f1f5f9;
  background: #ffffff;
}
.docked-online-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.docked-online-scroll::-webkit-scrollbar {
  display: none;
}
.docked-online-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}
.docked-online-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  position: relative;
  box-shadow: 0 1px 4px rgba(15,23,42,0.08);
}
.docked-online-dot {
  position: absolute;
  bottom: 0px;
  right: 0px;
  width: 9px;
  height: 9px;
  background-color: #10b981;
  border: 1.5px solid #ffffff;
  border-radius: 50%;
}
.docked-online-name {
  font-size: 0.65rem;
  font-weight: 600;
  color: #475569;
  margin-top: 2px;
  max-width: 42px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* DOCKED MESSAGE BUBBLES */
.docked-msg-row {
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  width: 100%;
}
.docked-msg-row.outgoing {
  align-items: flex-end;
}
.docked-msg-row.incoming {
  align-items: flex-start;
}

.docked-msg-meta {
  font-size: 0.65rem;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 2px;
  padding: 0 4px;
}

.docked-msg-bubble {
  max-width: 84%;
  border-radius: 14px;
  padding: 7px 12px;
  font-size: 0.83rem;
  line-height: 1.4;
}
.docked-msg-out {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  color: #ffffff;
  border-bottom-right-radius: 3px;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2);
}
.docked-msg-in {
  background: #f1f5f9;
  color: #0f172a;
  border-bottom-left-radius: 3px;
}

/* Responsif Mobile Portal - Sembunyikan Chat Widget pada Mobile */
@media (max-width: 991.98px) {
  .floating-chat-trigger-btn {
    display: none !important;
  }
  .docked-chat-box {
    display: none !important;
  }
}
body.app-mode-mobile .floating-chat-trigger-btn,
body.app-mode-mobile .docked-chat-box {
  display: none !important;
}

/* ==========================================================================
   POP-UP PICKER LAMPIRAN BERKAS (GAMBAR, DOKUMEN, FOTO KAMERA, VIDEO)
   ========================================================================== */
.attach-picker-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.attach-picker-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 12px;
  background: #ffffff;
  border: 1.5px solid #eef2f6;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none !important;
  color: #1e293b;
  position: relative;
  overflow: hidden;
}

.attach-picker-card:hover {
  transform: translateY(-3px);
  border-color: #bfdbfe;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.08);
}

.attach-picker-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 8px;
  transition: transform 0.2s ease;
}
.attach-picker-card:hover .attach-picker-icon {
  transform: scale(1.08);
}

.attach-picker-icon.image {
  background: #eff6ff;
  color: #2563eb;
}
.attach-picker-icon.doc {
  background: #fef3c7;
  color: #d97706;
}
.attach-picker-icon.photo {
  background: #ecfdf5;
  color: #059669;
}
.attach-picker-icon.video {
  background: #fdf2f8;
  color: #db2777;
}

.attach-picker-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 2px;
}
.attach-picker-desc {
  font-size: 0.7rem;
  color: #64748b;
  text-align: center;
}

/* VIDEO PLAYER DI CHAT BUBBLE */
.chat-attachment-video-wrap {
  border-radius: 12px;
  overflow: hidden;
  max-width: 100%;
  margin-bottom: 6px;
  background: #000000;
}
.chat-attachment-video-wrap video {
  width: 100%;
  max-height: 260px;
  display: block;
  border-radius: 12px;
}

/* GRUP CHAT STYLING */
.group-avatar-circle {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.group-avatar-general {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
}

.group-member-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f8fafc;
  margin-bottom: 6px;
  border: 1px solid #eef2f6;
}
.group-member-badge {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  text-transform: uppercase;
}



