/* ============================================================
   MONGGODEV PREMIUM COMPONENT LIBRARY v1.0
   24 komponen — modern, profesional, konsisten
   Accent: #2563EB (primary-600)
   Font: Inter (Google Fonts)
   ============================================================ */

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

/* === 1. BUTTON DESIGN === */
.btn-premium {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}
.btn-premium::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.2s;
}
.btn-premium:hover::after { opacity: 1; }
.btn-premium:active { transform: scale(0.97); }
.btn-premium:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}
.btn-primary:hover { box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4); transform: translateY(-1px); }

.btn-danger {
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}
.btn-danger:hover { box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: #374151;
  border: 1.5px solid #D1D5DB;
}
.btn-outline:hover { border-color: #2563EB; color: #2563EB; background: #EFF6FF; }

.btn-ghost {
  background: transparent;
  color: #6B7280;
}
.btn-ghost:hover { background: #F3F4F6; color: #111827; }

.btn-sm { padding: 6px 14px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 14px 28px; font-size: 16px; border-radius: 14px; }
.btn-icon { padding: 10px; aspect-ratio: 1; }

/* === 2. SKELETON LOADER === */
.skeleton {
  background: linear-gradient(90deg, #E5E7EB 25%, #F3F4F6 50%, #E5E7EB 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; }
}
.skeleton-text { height: 14px; margin-bottom: 8px; }
.skeleton-text:last-child { width: 60%; }
.skeleton-title { height: 24px; width: 40%; margin-bottom: 16px; }
.skeleton-avatar { width: 48px; height: 48px; border-radius: 50%; }
.skeleton-card { height: 200px; border-radius: 16px; }
.skeleton-image { width: 100%; height: 160px; border-radius: 12px; }

/* === 3. ACCORDION UI === */
.accordion { display: flex; flex-direction: column; gap: 8px; }
.accordion-item {
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.accordion-item.active { border-color: #2563EB; }
.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #fff;
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: #111827;
  text-align: left;
  transition: background 0.2s;
}
.accordion-trigger:hover { background: #F9FAFB; }
.accordion-trigger .icon {
  width: 20px;
  height: 20px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: #9CA3AF;
}
.accordion-item.active .accordion-trigger .icon { transform: rotate(180deg); color: #2563EB; }
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.accordion-content-inner {
  padding: 0 20px 16px;
  font-size: 14px;
  color: #6B7280;
  line-height: 1.6;
}

/* === 4. SNACKBAR UI === */
.snackbar-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.snackbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: 12px;
  background: #1F2937;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  transform: translateX(120%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 400px;
}
.snackbar.show { transform: translateX(0); }
.snackbar.success { background: #059669; }
.snackbar.error { background: #DC2626; }
.snackbar.warning { background: #D97706; }
.snackbar.info { background: #2563EB; }
.snackbar-close {
  margin-left: auto;
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  padding: 4px;
}

/* === 5. SUCCESS POPUP === */
.success-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.success-popup-overlay.show { opacity: 1; visibility: visible; }
.success-popup {
  background: #fff;
  border-radius: 24px;
  padding: 40px;
  text-align: center;
  max-width: 380px;
  width: 90%;
  transform: scale(0.8) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}
.success-popup-overlay.show .success-popup { transform: scale(1) translateY(0); }
.success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
}
.success-icon svg { width: 36px; height: 36px; color: #fff; }
.success-title { font-size: 20px; font-weight: 700; color: #111827; margin-bottom: 8px; }
.success-message { font-size: 14px; color: #6B7280; margin-bottom: 24px; line-height: 1.5; }

/* === 6. STICKY HEADER === */
.sticky-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.3s;
}
.sticky-header.scrolled { box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08); }

/* === 7. BREADCRUMB UI === */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: #9CA3AF;
}
.breadcrumb a {
  color: #6B7280;
  text-decoration: none;
  transition: color 0.2s;
}
.breadcrumb a:hover { color: #2563EB; }
.breadcrumb .separator { color: #D1D5DB; }
.breadcrumb .current { color: #111827; font-weight: 600; }

/* === 8. DRAG & DROP UPLOAD === */
.drag-drop-zone {
  border: 2px dashed #D1D5DB;
  border-radius: 16px;
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: #F9FAFB;
}
.drag-drop-zone:hover { border-color: #2563EB; background: #EFF6FF; }
.drag-drop-zone.dragover { border-color: #2563EB; background: #DBEAFE; transform: scale(1.01); }
.drag-drop-zone .icon { width: 48px; height: 48px; color: #9CA3AF; margin: 0 auto 12px; }
.drag-drop-zone.dragover .icon { color: #2563EB; }
.drag-drop-zone .text { font-size: 14px; color: #6B7280; }
.drag-drop-zone .text strong { color: #2563EB; }
.drag-drop-zone .hint { font-size: 12px; color: #9CA3AF; margin-top: 4px; }
.drag-drop-preview {
  margin-top: 16px;
  position: relative;
  display: inline-block;
}
.drag-drop-preview img {
  max-height: 120px;
  border-radius: 8px;
  border: 1px solid #E5E7EB;
}
.drag-drop-preview .remove {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #EF4444;
  color: #fff;
  border: 2px solid #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

/* === 9. STAR RATING === */
.star-rating { display: flex; gap: 4px; }
.star-rating .star {
  width: 24px;
  height: 24px;
  cursor: pointer;
  color: #D1D5DB;
  transition: color 0.15s, transform 0.15s;
}
.star-rating .star:hover { transform: scale(1.15); }
.star-rating .star.filled { color: #F59E0B; }
.star-rating .star.half { color: #F59E0B; }
.star-rating-display { display: flex; align-items: center; gap: 6px; }
.star-rating-display .score { font-weight: 700; color: #111827; }
.star-rating-display .count { font-size: 13px; color: #9CA3AF; }

/* === 10. MARQUEE UI === */
.marquee-wrapper {
  overflow: hidden;
  background: linear-gradient(135deg, #1E40AF 0%, #2563EB 100%);
  color: #fff;
  padding: 10px 0;
}
.marquee-content {
  display: flex;
  gap: 48px;
  animation: marquee-scroll 30s linear infinite;
  white-space: nowrap;
}
.marquee-content:hover { animation-play-state: paused; }
@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.marquee-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  flex-shrink: 0;
}
.marquee-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.5); }

/* === 11. PREMIUM TOAST === */
.premium-toast {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10001;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  border-left: 4px solid #10B981;
  font-family: 'Inter', sans-serif;
  transform: translateX(120%);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 420px;
}
.premium-toast.show { transform: translateX(0); }
.premium-toast.error { border-left-color: #EF4444; }
.premium-toast.warning { border-left-color: #F59E0B; }
.premium-toast-icon { width: 24px; height: 24px; flex-shrink: 0; }
.premium-toast-text { flex: 1; font-size: 14px; font-weight: 500; color: #111827; }
.premium-toast-close {
  background: none;
  border: none;
  color: #9CA3AF;
  cursor: pointer;
  padding: 4px;
}

/* === 12. PROFILE CARD === */
.profile-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #E5E7EB;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: box-shadow 0.2s;
}
.profile-card:hover { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06); }
.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 20px;
  font-family: 'Inter', sans-serif;
  flex-shrink: 0;
}
.profile-info { flex: 1; min-width: 0; }
.profile-name { font-weight: 700; color: #111827; font-size: 15px; }
.profile-role { font-size: 13px; color: #9CA3AF; }

/* === 13. DASHBOARD HEADER === */
.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  gap: 16px;
  flex-wrap: wrap;
}
.dash-greeting h1 { font-size: 24px; font-weight: 800; color: #111827; }
.dash-greeting p { font-size: 14px; color: #6B7280; margin-top: 2px; }
.dash-actions { display: flex; gap: 8px; }

/* === 14. FOOTER SECTION === */
.footer-premium {
  background: #0F172A;
  color: #94A3B8;
  padding: 60px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand .logo { font-size: 20px; font-weight: 800; color: #fff; margin-bottom: 12px; }
.footer-brand .desc { font-size: 14px; line-height: 1.6; }
.footer-col h4 { color: #fff; font-size: 14px; font-weight: 700; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.05em; }
.footer-col a { display: block; color: #94A3B8; text-decoration: none; font-size: 14px; padding: 4px 0; transition: color 0.2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid #1E293B;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}
.footer-socials { display: flex; gap: 12px; }
.footer-socials a { width: 36px; height: 36px; border-radius: 10px; background: #1E293B; display: flex; align-items: center; justify-content: center; color: #94A3B8; transition: all 0.2s; }
.footer-socials a:hover { background: #2563EB; color: #fff; }

/* === 15. SHOPPING CART MINI === */
.mini-cart {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  height: 100%;
  background: #fff;
  z-index: 50;
  box-shadow: -4px 0 32px rgba(0, 0, 0, 0.12);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}
.mini-cart.open { transform: translateX(0); }
.mini-cart-header {
  padding: 20px 24px;
  border-bottom: 1px solid #E5E7EB;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mini-cart-items { flex: 1; overflow-y: auto; padding: 16px 24px; }
.mini-cart-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #F3F4F6;
}
.mini-cart-item img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; }
.mini-cart-footer {
  padding: 20px 24px;
  border-top: 1px solid #E5E7EB;
}

/* === 16. ADD TO CART BUTTON === */
.add-to-cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}
.add-to-cart-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4); }
.add-to-cart-btn.added {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}
.cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  background: #EF4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

/* === 17. PROMO INPUT === */
.promo-input-group {
  display: flex;
  gap: 8px;
}
.promo-input-group input {
  flex: 1;
  padding: 12px 16px;
  border: 1.5px solid #E5E7EB;
  border-radius: 10px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s;
}
.promo-input-group input:focus { outline: none; border-color: #2563EB; }
.promo-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #ECFDF5;
  color: #059669;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}

/* === 18. CASCADING DROPDOWN === */
.cascading-group { display: flex; gap: 12px; flex-wrap: wrap; }
.cascading-group select {
  flex: 1;
  min-width: 200px;
  padding: 10px 14px;
  border: 1.5px solid #E5E7EB;
  border-radius: 10px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s;
}
.cascading-group select:focus { outline: none; border-color: #2563EB; }

/* === 19. SIDEBAR PREMIUM === */
.sidebar-premium {
  width: 260px;
  background: #fff;
  border-right: 1px solid #E5E7EB;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
}
.sidebar-logo {
  padding: 20px 24px;
  font-size: 18px;
  font-weight: 800;
  color: #111827;
  border-bottom: 1px solid #F3F4F6;
}
.sidebar-nav { flex: 1; overflow-y: auto; padding: 12px; }
.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: #6B7280;
  text-decoration: none;
  transition: all 0.15s;
  cursor: pointer;
}
.sidebar-nav-item:hover { background: #F3F4F6; color: #111827; }
.sidebar-nav-item.active { background: #EFF6FF; color: #2563EB; font-weight: 600; }
.sidebar-nav-group {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9CA3AF;
  padding: 16px 14px 6px;
}

/* === 20. 2FA/OTP INPUT === */
.otp-input-group {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.otp-input {
  width: 48px;
  height: 56px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  border: 2px solid #E5E7EB;
  border-radius: 12px;
  background: #F9FAFB;
  transition: all 0.2s;
  caret-color: #2563EB;
}
.otp-input:focus { outline: none; border-color: #2563EB; background: #fff; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); }
.otp-input.filled { border-color: #10B981; background: #ECFDF5; }

/* === 21. EMAIL INPUT === */
.email-input-wrapper {
  position: relative;
}
.email-input-wrapper .icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: #9CA3AF;
}
.email-input-wrapper input {
  width: 100%;
  padding: 12px 14px 12px 44px;
  border: 1.5px solid #E5E7EB;
  border-radius: 10px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s;
}
.email-input-wrapper input:focus { outline: none; border-color: #2563EB; }

/* === 22. THEME SWITCH === */
.theme-switch {
  width: 52px;
  height: 28px;
  border-radius: 14px;
  background: #E5E7EB;
  border: none;
  cursor: pointer;
  position: relative;
  transition: background 0.3s;
}
.theme-switch.active { background: #2563EB; }
.theme-switch::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  top: 3px;
  left: 3px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}
.theme-switch.active::after { transform: translateX(24px); }

/* === 23. PREMIUM PAGINATION === */
.pagination-premium {
  display: flex;
  align-items: center;
  gap: 4px;
}
.pagination-premium button {
  min-width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid #E5E7EB;
  background: #fff;
  color: #374151;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.15s;
}
.pagination-premium button:hover { border-color: #2563EB; color: #2563EB; }
.pagination-premium button.active { background: #2563EB; color: #fff; border-color: #2563EB; }
.pagination-premium button:disabled { opacity: 0.4; cursor: not-allowed; }

/* === 24. PROFILE CARD (Member) === */
.member-card {
  background: linear-gradient(135deg, #1E40AF 0%, #2563EB 50%, #3B82F6 100%);
  border-radius: 20px;
  padding: 28px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.member-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}
.member-card-name { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.member-card-email { font-size: 13px; opacity: 0.7; }
.member-card-stats { display: flex; gap: 24px; margin-top: 20px; }
.member-stat { text-align: center; }
.member-stat-value { font-size: 20px; font-weight: 800; }
.member-stat-label { font-size: 11px; opacity: 0.6; text-transform: uppercase; letter-spacing: 0.05em; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .mini-cart { width: 100%; }
  .otp-input { width: 40px; height: 48px; font-size: 18px; }
  .dash-header { flex-direction: column; align-items: flex-start; }
  .cascading-group { flex-direction: column; }
  .cascading-group select { min-width: auto; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .snackbar-container { left: 16px; right: 16px; bottom: 16px; }
  .snackbar { max-width: none; }
}
