/* 
 * Sistem Absensi Sekolah - Clean Modern UI Stylesheet
 * Responsive, Mobile-First, Modern Glassmorphism & Micro-animations
 */

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

:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --secondary: #0ea5e9;
  --success: #10b981;
  --success-bg: #ecfdf5;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --dark: #0f172a;
  --slate-800: #1e293b;
  --slate-600: #475569;
  --slate-400: #94a3b8;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  /* Safe Area Insets untuk Mobile App APK & Notch Display */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* Otomatis aktif saat dibuka melalui APK Android WebView */
body.in-mobile-app,
.in-mobile-app {
  --safe-top: max(env(safe-area-inset-top, 0px), 36px);
  --safe-bottom: max(env(safe-area-inset-bottom, 0px), 24px);
}

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

html {
  scrollbar-gutter: stable;
}

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f8fafc;
  color: var(--slate-800);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--dark);
  font-weight: 700;
  line-height: 1.3;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-hover);
}

/* Layout Elements */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.main-content {
  flex: 1;
  padding: 2rem 0;
}

/* Navbar */
.navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--slate-200);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--dark);
}

.nav-brand .brand-badge {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--white);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 1.25rem;
}

.nav-link {
  color: var(--slate-600);
  font-size: 0.925rem;
  font-weight: 500;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
  background: var(--primary-light);
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--slate-100);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
}

/* Cards & Containers */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--slate-100);
}

.card-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--dark);
}

/* Dashboard Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  overflow: hidden;
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.stat-icon.blue { background: #e0f2fe; color: #0284c7; }
.stat-icon.green { background: #dcfce7; color: #16a34a; }
.stat-icon.amber { background: #fef3c7; color: #d97706; }
.stat-icon.purple { background: #ede9fe; color: #7c3aed; }
.stat-icon.red { background: #fee2e2; color: #dc2626; }

.stat-info h4 {
  font-size: 0.825rem;
  color: var(--slate-600);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.stat-info .stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--dark);
  line-height: 1.2;
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--slate-800);
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.9rem;
  font-family: inherit;
  font-size: 0.925rem;
  color: var(--dark);
  background: var(--white);
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-md);
  outline: none;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

textarea.form-control {
  resize: vertical;
  min-height: 90px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-size: 0.925rem;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-success {
  background: var(--success);
  color: var(--white);
}

.btn-success:hover:not(:disabled) {
  background: #059669;
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
}

.btn-danger:hover:not(:disabled) {
  background: #dc2626;
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--slate-200);
  color: var(--slate-600);
}

.btn-outline:hover:not(:disabled) {
  background: var(--slate-100);
  color: var(--dark);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.825rem;
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: 0.775rem;
  font-weight: 700;
  text-transform: capitalize;
}

.badge-success { background: var(--success-bg); color: #065f46; border: 1px solid #a7f3d0; }
.badge-warning { background: var(--warning-bg); color: #92400e; border: 1px solid #fde68a; }
.badge-danger  { background: var(--danger-bg);  color: #991b1b; border: 1px solid #fecaca; }
.badge-info    { background: var(--primary-light); color: #3730a3; border: 1px solid #c7d2fe; }

/* Alerts */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert-success { background: var(--success-bg); color: #065f46; border: 1px solid #a7f3d0; }
.alert-warning { background: var(--warning-bg); color: #92400e; border: 1px solid #fde68a; }
.alert-danger  { background: var(--danger-bg);  color: #991b1b; border: 1px solid #fecaca; }
.alert-info    { background: var(--primary-light); color: #3730a3; border: 1px solid #c7d2fe; }

/* Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-200);
  background: var(--white);
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.table th {
  background: var(--slate-50);
  color: var(--slate-600);
  font-weight: 700;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--slate-200);
  white-space: nowrap;
}

.table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--slate-100);
  color: var(--slate-800);
  vertical-align: middle;
}

.table tbody tr:hover {
  background: #f8fafc;
}

/* Webcam & GPS Attendance Box */
.absen-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

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

.camera-box {
  background: #0f172a;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 380px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  border: 3px solid #334155;
}

.camera-box video, 
.camera-box canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1); /* Efek Cermin Kamera Depan */
}

.camera-box .camera-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-lg);
  margin: 12px;
}

.camera-box .camera-guide {
  width: 220px;
  height: 270px;
  border: 2px dashed rgba(255, 255, 255, 0.7);
  border-radius: 50% / 60%;
  box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.35);
}

.camera-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  justify-content: center;
}

/* Status Panel Geolocation & Photo Size */
.status-indicator-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.indicator-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--slate-100);
}

.indicator-row:last-child {
  border-bottom: none;
}

.indicator-label {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--slate-600);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.indicator-value {
  font-weight: 700;
  font-size: 0.875rem;
}

/* Modal Popup */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1.25rem;
}

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

.modal-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  animation: modalPop 0.25s ease-out;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--slate-100);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-body {
  padding: 1.25rem;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--slate-100);
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* Login Box */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background: radial-gradient(circle at top right, #e0e7ff 0%, #f8fafc 60%);
  padding: 1.5rem;
  box-sizing: border-box;
}

.login-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 440px;
  padding: 2.25rem;
  margin: auto auto;
}

.login-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.login-header .logo-badge {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--white);
  border-radius: var(--radius-lg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

/* Footer */
.footer {
  background: var(--white);
  border-top: 1px solid var(--slate-200);
  padding: 1.25rem 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--slate-400);
  margin-top: auto;
}

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--slate-400); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.d-none { display: none !important; }
.gap-2 { gap: 0.5rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mb-3 { margin-bottom: 1rem; }
.pulse-circle {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* ==========================================================================
   ADMIN LAYOUT WITH SIDEBAR
   ========================================================================== */
.body-admin {
  background: #f8fafc;
}

.admin-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.admin-sidebar {
  width: 250px;
  background: #0f172a; /* Slate 900 */
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.08);
}

.sidebar-header {
  padding: 1.5rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-header .brand-logo {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

.sidebar-user {
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  margin: 1rem 1rem 0.5rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-nav {
  padding: 1rem 0.75rem;
  list-style: none;
  flex: 1;
  overflow-y: auto;
}

.sidebar-item {
  margin-bottom: 0.35rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  color: #94a3b8;
  font-weight: 500;
  font-size: 0.925rem;
  transition: var(--transition);
  text-decoration: none;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.sidebar-link.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
  font-weight: 600;
}

.sidebar-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Admin Main Area */
.admin-main {
  flex: 1;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  margin-left: 250px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #f8fafc;
  overflow-x: hidden;
  transition: var(--transition);
}

.admin-topbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  border-bottom: 1px solid var(--slate-200);
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.btn-sidebar-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.65rem;
  font-size: 1.15rem;
  cursor: pointer;
  color: var(--slate-800);
}

.admin-content {
  flex: 1;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  padding: 2rem;
  overflow-x: hidden;
  box-sizing: border-box;
}

.container-admin {
  width: 100%;
  min-width: 0;
  max-width: 1300px;
  margin: 0 auto;
  box-sizing: border-box;
}

.admin-footer {
  background: var(--white);
  border-top: 1px solid var(--slate-200);
  padding: 1rem 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--slate-400);
  margin-top: auto;
}

.btn-sidebar-close {
  display: none;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: color 0.2s;
}

.btn-sidebar-close:hover {
  color: #ffffff;
}

@media (max-width: 991px) {
  .admin-sidebar {
    transform: translateX(-100%);
    width: 270px;
  }
  .admin-sidebar.open {
    transform: translateX(0);
  }
  .admin-main {
    margin-left: 0;
  }
  .btn-sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .btn-sidebar-close {
    display: block;
  }
  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    z-index: 95;
  }
  .sidebar-backdrop.show {
    display: block;
  }
  .admin-topbar {
    padding: 0 0.85rem;
    height: 56px;
  }
  .admin-content {
    padding: 1rem 0.75rem;
  }
}

/* ==========================================================================
   SISWA MOBILE-ONLY VIEW (CLEAN MOBILE WEB CONTAINER)
   ========================================================================== */
.body-siswa-mobile,
body.role-siswa,
.role-siswa {
  background: #f1f5f9;
  min-height: 100vh;
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-light: #e0f2fe;
}

.role-siswa .btn-primary,
.body-siswa-mobile .btn-primary {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border-color: #0284c7;
  color: #fff;
}

.role-siswa .btn-primary:hover,
.body-siswa-mobile .btn-primary:hover {
  background: #0369a1;
  border-color: #0369a1;
}

.role-siswa .badge-info,
.body-siswa-mobile .badge-info {
  background: #e0f2fe !important;
  color: #0284c7 !important;
  border: 1px solid #bae6fd !important;
}

.mobile-wrapper-outer {
  min-height: 100vh;
  width: 100%;
  background: #f1f5f9;
  display: flex;
  justify-content: center;
  padding: 0;
  overflow-x: hidden;
}

.mobile-device-frame {
  width: 100%;
  max-width: 480px;
  min-width: 0 !important; /* WAJIB: Mencegah flex item membesar karena isi tabel/grid */
  min-height: 100vh;
  background: #ffffff;
  border-left: 1px solid var(--slate-200);
  border-right: 1px solid var(--slate-200);
  box-shadow: 0 0 35px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden !important; /* WAJIB: Mengunci lebar frame tetap 480px di desktop */
  box-sizing: border-box !important;
}

/* Mobile App Bar */
.mobile-app-header {
  position: fixed !important;
  top: 0 !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 100% !important;
  max-width: 480px !important;
  z-index: 9999 !important;
  background: linear-gradient(145deg, #0284c7 0%, #0369a1 40%, #0f172a 100%) !important;
  padding: calc(0.85rem + var(--safe-top, 0px)) 1.15rem 0.85rem !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  box-shadow: 0 8px 24px -4px rgba(2, 132, 199, 0.35) !important;
  box-sizing: border-box !important;
}

.mobile-school-title {
  font-size: 0.725rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  color: #38bdf8 !important;
  font-weight: 800 !important;
  display: block !important;
}

.mobile-user-greeting {
  font-size: 1.15rem !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  line-height: 1.2 !important;
}

.mobile-logout-btn {
  background: rgba(255, 255, 255, 0.18) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  border-radius: var(--radius-full) !important;
  width: 36px !important;
  height: 36px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #ffffff !important;
  transition: var(--transition) !important;
  flex-shrink: 0 !important;
  cursor: pointer !important;
}
.mobile-logout-btn:hover {
  background: rgba(255, 255, 255, 0.28) !important;
  color: #ffffff !important;
  transform: scale(1.05) !important;
}

/* Mobile App Body Content */
.mobile-app-body {
  flex: 1;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important; /* Mencegah child membocorkan lebar */
  padding: calc(4.85rem + var(--safe-top, 0px)) 1rem calc(6.5rem + var(--safe-bottom, 0px)) !important;
  overflow-y: auto;
  overflow-x: hidden !important; /* Mencegah geser horizontal pada container */
  box-sizing: border-box !important;
}

/* Sesuaikan grid & card di dalam mobile frame agar proporsional */
.mobile-app-body h2 {
  font-size: 1.3rem !important;
  line-height: 1.25 !important;
  margin-bottom: 0.35rem !important;
}

.mobile-app-body h3 {
  font-size: 1.1rem !important;
}

.mobile-app-body .absen-container {
  display: flex !important;
  flex-direction: column !important;
  grid-template-columns: 1fr !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  gap: 1rem !important;
  box-sizing: border-box !important;
}

.mobile-app-body #mapContainer {
  height: 240px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.mobile-app-body .status-indicator-card {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  padding: 1rem !important;
}

.mobile-app-body .indicator-row {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.35rem !important;
  justify-content: space-between !important;
}

.mobile-app-body .indicator-label,
.mobile-app-body .indicator-value {
  max-width: 100% !important;
  word-break: break-word !important;
}

.mobile-app-body .stats-grid {
  grid-template-columns: 1fr !important;
  gap: 0.85rem !important;
  width: 100% !important;
}

.mobile-app-body .card {
  padding: 1.15rem !important;
  margin-bottom: 1rem !important;
  border-radius: var(--radius-md) !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.mobile-app-body .table-responsive {
  max-width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  box-sizing: border-box !important;
  margin-bottom: 1rem !important;
}

.mobile-app-body .table th, 
.mobile-app-body .table td {
  padding: 0.65rem 0.75rem !important;
  font-size: 0.825rem !important;
  white-space: nowrap;
}

.mobile-app-body .btn-block {
  padding: 0.75rem 1rem !important;
  font-size: 0.95rem !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Riwayat Mobile Card Items */
.riwayat-card-item {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 0.85rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}
.riwayat-card-item:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-md);
}
.riwayat-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--slate-100);
  padding-bottom: 0.65rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.riwayat-tiles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}
.riwayat-tile {
  background: #f8fafc;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  padding: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.riwayat-tile-meta {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.riwayat-tile-label {
  font-size: 0.675rem;
  font-weight: 700;
  color: var(--slate-500);
  text-transform: uppercase;
}
.riwayat-tile-time {
  font-size: 0.925rem;
  font-weight: 800;
  color: var(--dark);
}
.riwayat-thumb {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--slate-300);
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
.riwayat-thumb:hover {
  transform: scale(1.08);
}
.riwayat-card-footer {
  font-size: 0.75rem;
  color: var(--slate-500);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--slate-200);
}

/* Mobile Bottom Navigation Bar (Fixed di bagian bawah layar seperti App) */
.mobile-bottom-nav {
  position: fixed !important;
  bottom: 0 !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 100% !important;
  max-width: 480px !important;
  height: calc(64px + var(--safe-bottom, 0px)) !important;
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-top: 1px solid var(--slate-200) !important;
  border-left: 1px solid var(--slate-200) !important;
  border-right: 1px solid var(--slate-200) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-around !important;
  z-index: 99999 !important;
  padding: 0 0.25rem var(--safe-bottom, 0px) !important;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08) !important;
}

.bottom-nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--slate-400);
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  flex: 1;
}

.bottom-nav-link .nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  margin-bottom: 0.2rem;
  transition: transform 0.2s ease, color 0.2s ease;
}

.bottom-nav-link:hover {
  color: #0284c7;
}

.bottom-nav-link.active {
  color: #0284c7 !important;
  font-weight: 700;
}

.bottom-nav-link.active .nav-icon svg {
  stroke: #0284c7 !important;
  stroke-width: 2.4;
  transform: scale(1.1);
}

/* Responsif: Jika dibuka di layar HP asli (< 480px) */
@media (max-width: 480px) {
  .mobile-wrapper-outer {
    padding: 0;
    background: #ffffff;
  }
  .mobile-device-frame {
    max-width: 100%;
    border-left: none;
    border-right: none;
    box-shadow: none;
  }
  .mobile-app-header {
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    border-left: none !important;
    border-right: none !important;
    padding: calc(0.85rem + var(--safe-top, 0px)) 1rem 0.85rem !important;
  }
  .mobile-bottom-nav {
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    border-left: none !important;
    border-right: none !important;
  }
}

/* ==========================================================================
   DASHBOARD COMPONENTS & DESIGN SYSTEM (MODERN & CONSISTENT)
   ========================================================================== */

/* Cards */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--slate-100);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--dark);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-body {
  flex: 1;
}

/* Stats Grid & Modern Stat Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 1.15rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: #cbd5e1;
}

.stat-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.65rem;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.stat-card:hover .stat-icon {
  transform: scale(1.1);
}

.stat-icon.purple {
  background: #faf5ff;
  color: #7c3aed;
  border: 1px solid #ede9fe;
}

.stat-icon.blue {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #dbeafe;
}

.stat-icon.green {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.stat-icon.orange,
.stat-icon.amber {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}

.stat-icon.red {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.stat-icon.indigo {
  background: #eef2ff;
  color: #4f46e5;
  border: 1px solid #c7d2fe;
}

.stat-icon.sky {
  background: #f0f9ff;
  color: #0284c7;
  border: 1px solid #bae6fd;
}

.stat-info {
  flex: 1;
  min-width: 0;
}

.stat-info h4 {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--slate-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--dark);
  line-height: 1.2;
}

.stat-subtext {
  font-size: 0.775rem;
  color: var(--slate-500);
  margin-top: 0.2rem;
}

/* ID Referral Banner (Super Admin, Admin Sekolah, Wali Kelas) */
.id-code-banner {
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.65rem;
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.id-code-banner.theme-admin {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 60%, #4338ca 100%);
  color: #ffffff;
}

.id-code-banner.theme-walikelas {
  background: linear-gradient(135deg, #075985 0%, #0284c7 60%, #0ea5e9 100%);
  color: #ffffff;
}

.id-code-banner.theme-superadmin {
  background: linear-gradient(135deg, #3b0764 0%, #6b21a8 60%, #7c3aed 100%);
  color: #ffffff;
}

.id-code-banner .banner-icon {
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  flex-shrink: 0;
}

.id-code-banner .banner-tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  opacity: 0.9;
  margin-bottom: 0.2rem;
}

.id-code-banner .banner-code {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.id-code-banner .banner-sub {
  font-size: 0.825rem;
  opacity: 0.9;
  margin-top: 0.25rem;
}

.id-code-banner .btn-copy {
  background: #ffffff;
  color: var(--dark);
  font-weight: 700;
  border: none;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
}

.id-code-banner .btn-copy:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Action Bars & Quick Navigation Buttons */
.page-header-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.action-btn-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Role Accents on Sidebar Navigation */
body.role-superadmin .sidebar-link.active {
  background: #7c3aed;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.4);
}

body.role-walikelas .sidebar-link.active {
  background: #0284c7;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
}

body.role-admin .sidebar-link.active {
  background: #4f46e5;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
}

/* ==========================================================================
   RESPONSIVE MOBILE STYLES FOR WALI KELAS & ADMIN
   ========================================================================== */

/* Utility Visibility on Mobile */
@media (max-width: 768px) {
  .d-mobile-none {
    display: none !important;
  }
}

/* Fixed Mobile Bottom Navigation Bar (Wali Kelas) */
.walikelas-bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  .walikelas-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(60px + var(--safe-bottom, 0px));
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--slate-200);
    z-index: 90;
    justify-content: space-around;
    align-items: center;
    padding: 0 0.25rem var(--safe-bottom, 0px);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  }

  .walikelas-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    text-decoration: none;
    color: #64748b;
    font-size: 0.675rem;
    font-weight: 600;
    transition: all 0.2s ease;
    position: relative;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }

  .walikelas-nav-item.active {
    color: #0284c7;
  }

  .walikelas-nav-icon {
    font-size: 1.25rem;
    line-height: 1;
    margin-bottom: 2px;
  }

  .walikelas-nav-badge {
    position: absolute;
    top: 6px;
    right: calc(50% - 15px);
    background: #ef4444;
    color: #ffffff;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 999px;
  }

  body.role-walikelas .admin-content {
    padding-bottom: 5.5rem !important;
  }

  body.role-walikelas .admin-footer {
    margin-bottom: 60px;
  }
}

/* Base Layout for Wali Kelas Header & Actions */
.walikelas-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
  gap: 1rem;
  width: 100%;
}

.walikelas-quick-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Mobile Layout, Header & Quick Action Buttons */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
  }

  .admin-wrapper {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
  }

  .admin-main {
    min-width: 0 !important;
    max-width: 100vw !important;
    width: 100% !important;
    overflow-x: hidden !important;
  }

  .admin-topbar {
    width: 100% !important;
    max-width: 100vw !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  .admin-topbar h4 {
    font-size: 0.925rem !important;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .admin-content {
    min-width: 0 !important;
    max-width: 100vw !important;
    width: 100% !important;
    overflow-x: hidden !important;
    padding: 0.85rem 0.65rem 5.5rem !important;
    box-sizing: border-box !important;
  }

  .container-admin {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  .walikelas-header {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .walikelas-header h2 {
    font-size: 1.25rem;
    word-break: break-word;
  }

  .walikelas-header p {
    font-size: 0.825rem;
    word-break: break-word;
  }

  .walikelas-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    width: 100% !important;
  }

  .walikelas-quick-actions .btn {
    font-size: 0.775rem !important;
    padding: 0.45rem 0.65rem !important;
    flex: 1 1 calc(50% - 0.4rem);
    min-width: 120px;
    text-align: center;
    justify-content: center;
  }

  /* Cards & Alerts Mobile Isolation */
  .card {
    padding: 1rem 0.85rem !important;
    margin-bottom: 1rem !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    border-radius: var(--radius-md) !important;
    overflow: hidden !important;
  }

  .alert {
    flex-wrap: wrap !important;
    gap: 0.75rem !important;
    padding: 0.85rem !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .alert > div {
    min-width: 0 !important;
    flex: 1 1 100% !important;
    word-break: break-word !important;
  }

  .alert .btn,
  .alert a.btn {
    width: 100% !important;
    text-align: center !important;
    justify-content: center !important;
    white-space: normal !important;
  }

  /* Stats Grid Compact on Mobile */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.6rem !important;
    margin-bottom: 1.25rem !important;
    width: 100% !important;
  }

  .stat-card {
    padding: 0.75rem 0.75rem !important;
    gap: 0.5rem !important;
    border-radius: var(--radius-md) !important;
    min-width: 0 !important;
  }

  .stat-icon {
    width: 36px !important;
    height: 36px !important;
    font-size: 1.1rem !important;
    border-radius: 8px !important;
    flex-shrink: 0;
  }

  .stat-info {
    min-width: 0 !important;
    overflow: hidden;
  }

  .stat-info h4 {
    font-size: 0.7rem !important;
    margin-bottom: 0.15rem !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .stat-value {
    font-size: 1.15rem !important;
  }

  /* ID Banner Stacked */
  .id-code-banner {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.85rem !important;
    padding: 1rem 0.85rem !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .id-code-banner > div {
    width: 100% !important;
    min-width: 0 !important;
    flex-wrap: wrap !important;
  }

  .id-code-banner .banner-code {
    font-size: 1.35rem !important;
    word-break: break-all !important;
  }

  .id-code-banner .banner-sub {
    word-break: break-word !important;
    font-size: 0.785rem !important;
  }

  .id-code-banner .btn,
  .id-code-banner .btn-copy {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
  }

  /* Geofencing Absen & Maps Grid */
  .absen-container {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
    width: 100% !important;
  }

  #mapContainer, #classMap, #guruMap {
    height: 260px !important;
    width: 100% !important;
  }

  /* Responsive Table View with Touch Scroll */
  .table-responsive {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    border-radius: var(--radius-md);
    box-sizing: border-box !important;
  }

  .table-responsive table {
    min-width: 580px;
    width: 100%;
  }

  .table-scroll-hint {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    font-size: 0.725rem;
    color: #64748b;
    padding: 0.4rem 0.75rem;
    background: #f8fafc;
    border-bottom: 1px solid var(--slate-200);
    width: 100%;
    box-sizing: border-box;
  }

  /* Modals Mobile Friendly */
  .modal {
    padding: 0.75rem !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .modal .card {
    max-height: 88vh !important;
    width: 100% !important;
    overflow-y: auto !important;
    margin: auto !important;
    border-radius: 14px !important;
  }

  .modal form {
    padding: 1.15rem !important;
  }

  /* General Form Inputs */
  .form-control, select, input, textarea {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}

/* ==========================================================================
   PREMIUM CUSTOM POPUP & SWEETALERT2 STYLING
   ========================================================================== */
.swal2-container {
  z-index: 999999 !important;
  backdrop-filter: blur(8px) !important;
  background: rgba(15, 23, 42, 0.65) !important;
}

.custom-swal-popup {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
  border-radius: 22px !important;
  padding: 2rem 1.75rem !important;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(226, 232, 240, 0.9) !important;
  background: #ffffff !important;
  max-width: 440px !important;
  width: 90% !important;
}

.custom-swal-title {
  font-size: 1.25rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  margin: 0.85rem 0 0.35rem 0 !important;
  line-height: 1.35 !important;
}

.custom-swal-html {
  font-size: 0.9rem !important;
  color: #475569 !important;
  line-height: 1.55 !important;
  margin: 0.5rem 0 1.25rem 0 !important;
}

.swal2-actions {
  gap: 0.75rem !important;
  margin-top: 1.25rem !important;
  width: 100% !important;
  justify-content: center !important;
}

.custom-swal-btn {
  padding: 0.7rem 1.35rem !important;
  font-size: 0.875rem !important;
  font-weight: 700 !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  border: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.4rem !important;
}

.custom-swal-btn-confirm {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35) !important;
}

.custom-swal-btn-confirm:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.45) !important;
}

.custom-swal-btn-danger {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35) !important;
}

.custom-swal-btn-danger:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.45) !important;
}

.custom-swal-btn-cancel {
  background: #f1f5f9 !important;
  color: #475569 !important;
  border: 1px solid #cbd5e1 !important;
}

.custom-swal-btn-cancel:hover {
  background: #e2e8f0 !important;
  color: #1e293b !important;
}

/* SweetAlert2 Icon Customization */
.custom-swal-popup .swal2-icon {
  margin: 0.5rem auto 1rem auto !important;
  transform: scale(0.95) !important;
}

/* SweetAlert2 Modern Toast */
.custom-swal-toast {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
  border-radius: 14px !important;
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(226, 232, 240, 0.8) !important;
  padding: 0.75rem 1rem !important;
  font-weight: 600 !important;
}

