/* ============================================================
   SHARED CUSTOM STYLES — E-Ijazah SMAN 1 Mlonggo
   Supplements Tailwind CSS with custom animations & effects.
   ============================================================ */

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

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Background Gradient ---------- */
.bg-portal {
  background: linear-gradient(135deg, #eff6ff 0%, #eef2ff 40%, #f5f3ff 70%, #fdf4ff 100%);
  min-height: 100vh;
}

.bg-admin-portal {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #1e0a3c 100%);
  min-height: 100vh;
}

/* ---------- Glass Card ---------- */
.glass-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.07),
    0 25px 50px -12px rgba(37, 99, 235, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.4) inset;
}

/* ---------- Gradient Button ---------- */
.btn-gradient {
  background: linear-gradient(135deg, #2563eb 0%, #6d28d9 100%);
  color: white;
  border: none;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.btn-gradient::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1d4ed8 0%, #5b21b6 100%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.btn-gradient:hover::before { opacity: 1; }
.btn-gradient:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(99, 60, 237, 0.35); }
.btn-gradient:active { transform: translateY(0); }
.btn-gradient span, .btn-gradient svg { position: relative; z-index: 1; }

/* ---------- Blue Download Button ---------- */
.btn-blue {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  color: white;
  border: none;
  transition: all 0.25s ease;
}
.btn-blue:hover {
  background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.4);
}
.btn-blue:active { transform: translateY(-1px); }

/* ---------- Purple Download Button ---------- */
.btn-purple {
  background: linear-gradient(135deg, #6d28d9 0%, #7c3aed 100%);
  color: white;
  border: none;
  transition: all 0.25s ease;
}
.btn-purple:hover {
  background: linear-gradient(135deg, #5b21b6 0%, #6d28d9 100%);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(124, 58, 237, 0.4);
}
.btn-purple:active { transform: translateY(-1px); }

/* ---------- Notice Box ---------- */
.notice-box {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fde68a;
  border-left: 4px solid #f59e0b;
}

/* ---------- Input Fields ---------- */
.input-field {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.input-field:focus {
  border-color: #6d28d9;
  box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.12);
  outline: none;
}

/* ---------- Native Date Input ---------- */
.date-input {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  color-scheme: dark;  /* agar kalender popup tampil dalam dark mode */
}
.date-input:focus {
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
  outline: none;
}
/* Placeholder teks (dd/mm/yyyy) dan ikon kalender berwarna terang */
.date-input::-webkit-datetime-edit { color: white; }
.date-input::-webkit-datetime-edit-fields-wrapper { color: white; }
.date-input::-webkit-datetime-edit-text { color: rgba(165, 180, 252, 0.7); } /* separator "/" */
.date-input::-webkit-datetime-edit-day-field,
.date-input::-webkit-datetime-edit-month-field,
.date-input::-webkit-datetime-edit-year-field { color: white; }
.date-input::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(1.5);   /* ikon kalender jadi putih */
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.date-input::-webkit-calendar-picker-indicator:hover { opacity: 1; }

/* ---------- Decorative Blobs ---------- */
.blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
  animation: blobFloat 8s ease-in-out infinite alternate;
}

.blob-blue {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, #2563eb, #60a5fa);
  top: -100px;
  left: -100px;
}

.blob-purple {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #7c3aed, #c4b5fd);
  bottom: -80px;
  right: -80px;
  animation-delay: -3s;
}

@keyframes blobFloat {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(30px, -30px) scale(1.08); }
}

/* ---------- Fade-in Animation ---------- */
.fade-in {
  animation: fadeIn 0.45s ease both;
}

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

/* ---------- Spinner ---------- */
.spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- Table ---------- */
.data-table th {
  background: linear-gradient(135deg, #f8faff 0%, #f3f4f6 100%);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #6b7280;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e5e7eb;
}

.data-table td {
  border-bottom: 1px solid #f3f4f6;
}

/* ---------- Admin Sidebar / Panel ---------- */
.admin-panel-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

/* ---------- Responsive Utility ---------- */
.hidden { display: none !important; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c7d2fe; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #818cf8; }

/* ---------- Logo glow ---------- */
.logo-img {
  filter: drop-shadow(0 4px 12px rgba(37, 99, 235, 0.25));
  transition: transform 0.3s ease;
}
.logo-img:hover { transform: scale(1.05); }

/* ---------- Dashboard header ---------- */
.dashboard-header {
  background: linear-gradient(135deg, #1e40af 0%, #3730a3 50%, #5b21b6 100%);
}
