/* ================================================================
   MFB-SPORT — Miss Fish Bali Sports Hub
   HTML5 · Tailwind CSS · Vanilla JS · Google Apps Script
   IT Department · Miss Fish Bali
   Version   : 1.8
   Generated : 14 September 2026, 10:00:00 WITA
   ================================================================ */

:root {
  --mfb-navy-950: #0a1725;
  --mfb-navy-900: #0f2438;
  --mfb-navy-800: #173752; /* Brand Primary Navy */
  --mfb-navy-700: #234d6f;
  --mfb-navy-600: #2b5f89;
  --mfb-navy-100: #dce7f2;
  --mfb-navy-50:  #f0f5fa;

  --mfb-teal:     #14aeb3; /* Brand Accent Teal */
  --mfb-teal-hover:#109397;
  --mfb-teal-soft: rgba(20, 174, 179, 0.12);
  --mfb-mint:     #5be0df; /* Brand Light Mint */
  --mfb-coral:    #ff6b6b;
  --mfb-gold:     #f59e0b;
  --mfb-green:    #10b981;

  --sidebar-w:    280px;
}

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  overflow-x: hidden;
  width: 100%;
}

/* CSS Reset Wajib untuk Button (Standar Coding Miss Fish Bali v1.7 Bagian 11.2) */
button {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  cursor: pointer;
  padding: 0;
  margin: 0;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Layout container selebar layar (SOP v2.1 Kategori 1 & Blueprint B/E) */
.main-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

@media (min-width: 1024px) {
  .main-wrapper {
    padding-left: var(--sidebar-w);
  }
}

/* Topbar Standar Miss Fish Bali (v1.7 Bagian 11.1) */
.topbar {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1rem, 3vw, 2.5rem);
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  box-sizing: border-box;
}

/* Main Content Area: Selebar Layar Penuh Sesuai SOP v2.1 Aturan Width */
#mainContentArea {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 1.5rem clamp(1rem, 3vw, 2.5rem) 6rem;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  #mainContentArea {
    padding: 2rem clamp(1rem, 3vw, 2.5rem) 3.5rem;
  }
}

/* Site Footer: Selebar Layar Penuh */
.site-footer {
  width: 100%;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  padding: 1.5rem clamp(1rem, 3vw, 2.5rem);
  box-sizing: border-box;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.topbar .hdr-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--mfb-navy-800);
  letter-spacing: -0.015em;
}

/* Sidebar Standar Miss Fish Bali (v1.7 Bagian 11.1 & 11.3) */
.sidebar {
  background-color: var(--mfb-navy-800);
  width: var(--sidebar-w);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 4px 0 20px rgba(10, 23, 37, 0.15);
}

.sidebar-top-branding {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-top-branding .logo-box {
  display: block;
  width: 100%;
  height: 80px;
  background: transparent !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-top-branding .logo-box img {
  height: 80px;
  width: 100%;
  object-fit: contain;
  background: transparent !important;
}

/* Nav items di sidebar gelap */
.sidebar-nav {
  padding: 1.25rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  color: rgba(255, 255, 255, 0.88) !important;
  font-weight: 500;
  font-size: 0.9375rem;
  transition: all 0.15s ease-in-out;
  text-decoration: none;
}

.nav-item:hover {
  background: rgba(20, 174, 179, 0.18) !important;
  color: #ffffff !important;
}

.nav-item.active {
  background: rgba(20, 174, 179, 0.28) !important;
  border-left: 3px solid var(--mfb-mint);
  color: #ffffff !important;
  font-weight: 700;
}

.nav-kicker {
  color: #8bb0cf !important;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1rem 1rem 0.35rem 1rem;
}

/* Badge Miss Fish Bali */
.badge-mfb {
  background: var(--mfb-teal-soft);
  color: #0f766e; /* WCAG AAA Pass: 6.1:1 on white */
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  border: 1px solid rgba(20, 174, 179, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  letter-spacing: -0.01em;
}

/* Mobile Bottom Navigation (Standar SOP Kategori 16) */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 45;
  box-shadow: 0 -4px 16px rgba(10, 23, 37, 0.06);
}

.mobile-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #475569; /* WCAG AA Pass: 5.9:1 */
  font-size: 0.7rem;
  font-weight: 600;
  flex: 1;
  height: 100%;
  transition: color 0.15s ease;
}

.mobile-nav-btn.active {
  color: #0f766e; /* WCAG AAA Pass */
  font-weight: 800;
}

.mobile-nav-btn.active svg {
  stroke: #0f766e;
  stroke-width: 2.5;
}

/* Capacity bar visual */
.capacity-progress-bg {
  height: 8px;
  border-radius: 9999px;
  background-color: #e2e8f0;
  overflow: hidden;
  position: relative;
}

.capacity-progress-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.4s ease-out;
}

/* Event card animations & styling */
.sport-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.sport-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -4px rgba(23, 55, 82, 0.12);
  border-color: rgba(20, 174, 179, 0.4);
}

/* Pulse badge for live updates */
@keyframes pulse-soft {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.03); }
}

.animate-pulse-soft {
  animation: pulse-soft 2s infinite ease-in-out;
}

/* Modal overlay transitions */
.modal-backdrop {
  background: rgba(10, 23, 37, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Filter pills */
.filter-pill {
  padding: 0.5rem 1.1rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  transition: all 0.15s ease;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155; /* WCAG AAA Pass: 9.6:1 */
}

.filter-pill:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f2438;
}

.filter-pill.active {
  background: var(--mfb-navy-800);
  color: #ffffff;
  border-color: var(--mfb-navy-800);
  box-shadow: 0 4px 12px rgba(23, 55, 82, 0.25);
}

/* Wellness Leaderboard & Badges */
.rank-badge-gold {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  border: 1px solid #fcd34d;
}

.rank-badge-silver {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  color: #334155;
  border: 1px solid #cbd5e1;
}

.rank-badge-bronze {
  background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%);
  color: #9a3412;
  border: 1px solid #fdba74;
}

/* Toast Notification */
#toastContainer {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: 90%;
  max-width: 420px;
}

@media (min-width: 768px) {
  #toastContainer {
    bottom: 24px;
    right: 24px;
    left: auto;
    transform: none;
  }
}

.toast-item {
  pointer-events: auto;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toast-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.toast-success {
  background: #0f2438;
  color: #ffffff;
  border-left: 4px solid var(--mfb-teal);
}

.toast-error {
  background: #0f2438;
  color: #ffffff;
  border-left: 4px solid var(--mfb-coral);
}

.toast-info {
  background: #0f2438;
  color: #ffffff;
  border-left: 4px solid var(--mfb-mint);
}

/* Confetti animation canvas */
#confettiCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 100;
}
