/* MKKS Sidoarjo - Custom CSS */

/* ─── Global ─── */
body { font-family: 'Plus Jakarta Sans', sans-serif; }

/* ─── Toast Notification ─── */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  pointer-events: all;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(15,23,42,.14);
  border: 1px solid #becabc;
  min-width: 280px;
  max-width: 400px;
  animation: toastIn .3s ease forwards;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
}
.toast.toast-success { border-left: 4px solid #15803d; }
.toast.toast-error   { border-left: 4px solid #ba1a1a; }
.toast.toast-info    { border-left: 4px solid #2563eb; }
.toast.toast-warning { border-left: 4px solid #d97706; }
.toast.toast-out { animation: toastOut .3s ease forwards; }
@keyframes toastIn  { from { opacity:0; transform: translateY(16px); } to { opacity:1; transform: translateY(0); } }
@keyframes toastOut { from { opacity:1; transform: translateY(0); } to { opacity:0; transform: translateY(16px); } }

/* ─── Search Overlay ─── */
#search-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(19,27,46,.5);
  backdrop-filter: blur(4px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
}
#search-overlay.active { display: flex; }
#search-box {
  background: #fff;
  border-radius: 16px;
  width: min(640px, calc(100vw - 48px));
  box-shadow: 0 24px 48px rgba(15,23,42,.2);
  overflow: hidden;
}

/* ─── Sidebar ─── */
#sidebar {
  transition: width .25s ease, transform .25s ease;
}
#sidebar.collapsed { width: 72px !important; }
#sidebar.collapsed .sidebar-label { display: none !important; }
#sidebar.collapsed .sidebar-logo-text { display: none !important; }

/* ─── Mobile Sidebar Drawer ─── */
#mobile-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 800;
  background: rgba(19,27,46,.4);
}
#mobile-sidebar-overlay.active { display: block; }
#mobile-sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 280px;
  z-index: 900;
  transform: translateX(-100%);
  transition: transform .3s ease;
  background: #faf8ff;
  overflow-y: auto;
}
#mobile-sidebar.active { transform: translateX(0); }

/* ─── Active Nav Link ─── */
.nav-link.active {
  color: #00652c !important;
  font-weight: 700;
  border-bottom: 2px solid #00652c;
}
.sidebar-link.active {
  background: #d3ffd5 !important;
  color: #00652c !important;
  font-weight: 600;
}
.sidebar-link.active .material-symbols-outlined {
  color: #00652c !important;
}

/* ─── Skeleton Loading ─── */
.skeleton {
  background: linear-gradient(90deg, #eaedff 25%, #f2f3ff 50%, #eaedff 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: 8px;
}
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── QR Code Placeholder ─── */
.qr-placeholder {
  background: #fff;
  border: 2px solid #becabc;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #3f493f;
}

/* ─── Table Hover ─── */
tr.table-row-hover:hover { background: #f2f3ff; cursor: pointer; }

/* ─── Print / Certificate ─── */
@media print {
  .no-print { display: none !important; }
  body { background: white !important; }
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #becabc; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #6f7a6e; }

/* ─── Mobile bottom nav active ─── */
.bottom-nav-item.active .material-symbols-outlined { color: #00652c; }
.bottom-nav-item.active span:last-child { color: #00652c; font-weight: 600; }

/* ─── Global Smooth Scrolling & Page Entrance Animation ─── */
html {
  scroll-behavior: smooth;
}

@keyframes pageEntrance {
  0% { opacity: 0; transform: translateY(12px); }
  100% { opacity: 1; transform: translateY(0); }
}

main, .main-content {
  animation: pageEntrance 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Base Component & Card Scroll Reveal (Single 1x Trigger on First Load) */
.scroll-reveal, 
.scroll-reveal-left, 
.scroll-reveal-right, 
.scroll-reveal-scale, 
.float-in-card, 
.zoom-point-card {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.scroll-reveal.revealed, 
.scroll-reveal-left.revealed, 
.scroll-reveal-right.revealed, 
.scroll-reveal-scale.revealed, 
.float-in-card.revealed, .float-in-card.in-view,
.zoom-point-card.revealed, .zoom-point-card.in-view {
  opacity: 1 !important;
  transform: translateY(0) scale(1) !important;
}

/* Stagger delays */
.stagger-1 { transition-delay: 60ms; }
.stagger-2 { transition-delay: 140ms; }
.stagger-3 { transition-delay: 220ms; }
.stagger-4 { transition-delay: 300ms; }

/* Sticky Header on scroll */
header.header-scrolled {
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(12px);
}

/* Scroll To Top Button */
#btn-scroll-top {
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#btn-scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ─── Transitions ─── */
a, button { transition: all .15s ease; }

