/* =====================================================
   CUSTOM STYLE — Absensi PJJ STIT Muhammadiyah Kediri
   ===================================================== */

* {
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f5f6fa;
  overscroll-behavior: none;
}

/* Pastikan input minimal 16px supaya tidak auto-zoom di iPhone */
input, select, button, textarea {
  font-size: 16px !important;
}

/* Latar belakang gradient lembut */
.gradient-bg {
  background: linear-gradient(160deg, #eef0ff 0%, #f7f4ff 40%, #ffffff 100%);
  min-height: 100vh;
}

/* Blob dekoratif (bulatan blur di latar) */
.blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

/* =====================================================
   TOMBOL BULAT BESAR (untuk mahasiswa absen)
   ===================================================== */
.circle-btn {
  background: linear-gradient(145deg, #3b6cff 0%, #6b5cff 50%, #8a5cff 100%);
  box-shadow:
    0 20px 40px -10px rgba(90, 90, 255, 0.5),
    inset 0 -4px 8px rgba(0, 0, 0, 0.08),
    inset 0 4px 8px rgba(255, 255, 255, 0.15);
  transition: transform 0.15s ease, opacity 0.15s ease;
  color: white;
  border: none;
  cursor: pointer;
}

.circle-btn:active {
  transform: scale(0.96);
}

.circle-btn:disabled {
  background: #cbd0e0;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.7;
}

/* =====================================================
   KARTU dengan efek kaca (glassmorphism)
   ===================================================== */
.card-glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 1rem;
}

.card-solid {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 1rem;
}

/* =====================================================
   HEADER STICKY untuk dashboard
   ===================================================== */
.sticky-top {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* =====================================================
   BOTTOM STICKY untuk tombol aksi di HP
   ===================================================== */
.sticky-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  z-index: 20;
}

@media (min-width: 768px) {
  .sticky-bottom {
    position: static;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-top: none;
    padding: 0;
  }
}

/* =====================================================
   SCROLLBAR hidden (untuk area tertentu)
   ===================================================== */
.hidden-scroll::-webkit-scrollbar {
  display: none;
}
.hidden-scroll {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* =====================================================
   ANIMASI loading / spinner kecil
   ===================================================== */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #e5e7eb;
  border-top-color: #3b6cff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* =====================================================
   TOAST (notifikasi kecil di bawah)
   ===================================================== */
.toast-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: #1f2937;
  color: white;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  animation: slideUp 0.3s ease;
  pointer-events: auto;
  max-width: 90vw;
}

.toast.success { background: #10b981; }
.toast.error { background: #ef4444; }
.toast.warning { background: #f59e0b; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =====================================================
   LOADING overlay full screen
   ===================================================== */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.loading-spinner-big {
  width: 48px;
  height: 48px;
  border: 4px solid #e5e7eb;
  border-top-color: #3b6cff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* =====================================================
   TABEL responsif
   ===================================================== */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* =====================================================
   DETAILS/SUMMARY untuk accordion
   ===================================================== */
details > summary {
  cursor: pointer;
  list-style: none;
}
details > summary::-webkit-details-marker {
  display: none;
}

/* =====================================================
   MODAL / DIALOG custom
   ===================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 150;
  padding: 1rem;
  animation: fadeIn 0.15s ease;
}

.modal-box {
  background: white;
  border-radius: 1.5rem;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: scaleIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* =====================================================
   PRINT — sembunyikan elemen yang tidak perlu saat cetak
   ===================================================== */
@media print {
  .no-print { display: none !important; }
  body { background: white; }
}