/* ==========================================================================
   Gathering Ditsy ke-5 — Master Design System v2.0
   Aesthetic: Chic, Warm, Elegant — Premium Mobile-First
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;500;600;700&family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,600&family=Outfit:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,600;1,400&display=swap');

:root {
  /* ── Color Palette: Ditsy Pastel Luxe ───────────────────── */
  --color-cream-light:  #FFFDF9;
  --color-cream-bg:     #FBF7F1;
  --color-cream-card:   rgba(255, 255, 255, 0.88);
  --color-blush-soft:   #FDEEE9;
  --color-blush:        #F7D6CC;
  --color-blush-accent: #E59886;
  --color-rose-gold:    #C27D6B;
  --color-rose-mid:     #A9614F;
  --color-rose-deep:    #854237;
  --color-rose-soft:    rgba(229, 152, 134, 0.35);
  --color-sage-soft:    #EBF2ED;
  --color-sage:         #8CA996;
  --color-sage-deep:    #4A6B56;
  --color-charcoal:     #231C1C;
  --color-charcoal-soft:#5A4848;
  --color-muted:        #8E7C7C;
  --color-border:       rgba(194, 125, 107, 0.20);
  --color-border-subtle:rgba(142, 124, 124, 0.13);
  --color-surface:      rgba(255, 255, 255, 0.95);

  /* ── Gradients ──────────────────────────────────────────── */
  --gradient-rose:      linear-gradient(135deg, #854237 0%, #C27D6B 55%, #D4957F 100%);
  --gradient-blush:     linear-gradient(145deg, #FDEEE9 0%, #FFFFFF 100%);
  --gradient-cream:     linear-gradient(180deg, #FFFDF9 0%, #F8F2E8 100%);
  --gradient-ticket:    linear-gradient(135deg, #6B3228 0%, #A9614F 45%, #C27D6B 100%);

  /* ── Status Colors ──────────────────────────────────────── */
  --status-success-bg:     #E8F5E9;
  --status-success-text:   #2E7D32;
  --status-success-border: #A5D6A7;
  --status-warning-bg:     #FFF8E1;
  --status-warning-text:   #E65100;
  --status-warning-border: #FFCC80;
  --status-error-bg:       #FFEBEE;
  --status-error-text:     #C62828;
  --status-error-border:   #EF9A9A;

  /* ── Typography ─────────────────────────────────────────── */
  --font-serif:   'Cormorant Garamond', Georgia, serif;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-sans:    'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;

  /* ── Shadows & Depth ────────────────────────────────────── */
  --shadow-xs:  0 2px 8px rgba(133, 66, 55, 0.06);
  --shadow-sm:  0 4px 16px rgba(133, 66, 55, 0.08);
  --shadow-md:  0 8px 28px rgba(133, 66, 55, 0.11);
  --shadow-lg:  0 18px 48px rgba(133, 66, 55, 0.16);
  --shadow-xl:  0 30px 70px rgba(133, 66, 55, 0.20);
  --glass-filter: blur(20px) saturate(1.6);

  /* ── Border Radius ──────────────────────────────────────── */
  --radius-xs:   6px;
  --radius-sm:   10px;
  --radius-md:   16px;
  --radius-lg:   22px;
  --radius-xl:   30px;
  --radius-2xl:  40px;
  --radius-full: 9999px;

  /* ── Transitions ────────────────────────────────────────── */
  --transition-fast:   0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.32s cubic-bezier(0.25, 1, 0.5, 1);
  --transition-bounce: 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-spring: 0.6s cubic-bezier(0.22, 1, 0.36, 1);

  /* ── Spacing ────────────────────────────────────────────── */
  --nav-height: 76px;
}

/* ── Reset & Base ───────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-cream-bg);
  color: var(--color-charcoal);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

img { display: block; max-width: 100%; }
a { text-decoration: none; }
button { font-family: var(--font-sans); }

/* ── Phosphor Icons Global Styling ──────────────────────── */
i.ph, i[class^="ph-"], i[class*=" ph-"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  line-height: 1;
  font-style: normal;
}

/* Icon sizes in specific contexts */
.portal-icon i { font-size: 1.7rem; }
.portal-icon.icon-invite i  { color: var(--color-rose-deep); }
.portal-icon.icon-scanner i { color: #FFFFFF; }
.portal-icon.icon-admin i   { color: var(--color-sage-deep); }
.stat-icon i   { font-size: 1.5rem; }
.detail-icon-box i { font-size: 1.5rem; }
.event-info-icon i { font-size: 1.25rem; }
.botanical-divider i { font-size: 1.2rem; color: var(--color-rose-gold); }

/* ── Atmospheric Background ─────────────────────────────── */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 8% 12%, rgba(253, 238, 233, 0.9) 0%, transparent 50%),
    radial-gradient(ellipse at 92% 88%, rgba(235, 242, 237, 0.75) 0%, transparent 48%),
    radial-gradient(ellipse at 50% 50%, #FFFDF9 0%, #F5EEE5 100%);
}

.ambient-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.28;
  animation: floatOrb 20s infinite alternate ease-in-out;
  will-change: transform;
}

.ambient-blob-1 {
  width: 420px;
  height: 420px;
  background: var(--color-blush);
  top: -100px;
  left: -100px;
}

.ambient-blob-2 {
  width: 480px;
  height: 480px;
  background: #DDEAE0;
  bottom: 0;
  right: -120px;
  animation-duration: 25s;
  animation-delay: -8s;
}

@keyframes floatOrb {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(50px, 70px) scale(1.1); }
  100% { transform: translate(-30px, 35px) scale(0.94); }
}

/* ── Typography ─────────────────────────────────────────── */
h1, h2, h3, .font-serif {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-charcoal);
  line-height: 1.2;
}

.title-display {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 6vw, 2.8rem);
  line-height: 1.1;
  font-weight: 700;
  color: var(--color-charcoal);
}

.title-subtitle {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--color-rose-gold);
  font-weight: 700;
}

.text-gold-gradient {
  background: var(--gradient-rose);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Glass Cards ────────────────────────────────────────── */
.glass-card {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: var(--glass-filter);
  -webkit-backdrop-filter: var(--glass-filter);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-lg);
}

.glass-card-elevated {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: var(--glass-filter);
  -webkit-backdrop-filter: var(--glass-filter);
  border: 1px solid rgba(230, 205, 198, 0.45);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-xl);
}

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.9rem 1.8rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-smooth);
  letter-spacing: 0.01em;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0);
  transition: background 0.15s ease;
}

.btn:active::after {
  background: rgba(255, 255, 255, 0.12);
}

.btn-primary {
  background: var(--gradient-rose);
  color: #FFFFFF;
  box-shadow: 0 6px 22px rgba(133, 66, 55, 0.30);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 12px 32px rgba(133, 66, 55, 0.40);
}

.btn-primary:active {
  transform: translateY(0) scale(0.99);
  box-shadow: 0 4px 12px rgba(133, 66, 55, 0.25);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.95);
  color: var(--color-charcoal);
  border: 1.5px solid var(--color-border);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  background: var(--color-blush-soft);
  border-color: var(--color-rose-gold);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:active {
  transform: translateY(0);
}

.btn-outline-gold {
  background: transparent;
  color: var(--color-rose-gold);
  border: 1.5px solid var(--color-rose-gold);
}

.btn-outline-gold:hover {
  background: var(--color-blush-soft);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.55rem 1.1rem;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 1rem 2.2rem;
  font-size: 1rem;
}

/* ── Status Badges ──────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.badge-vip {
  background: linear-gradient(135deg, #FFF3E0, #FFE0B2);
  color: #BF6000;
  border: 1px solid #FFD180;
}

.badge-hadir {
  background: var(--status-success-bg);
  color: var(--status-success-text);
  border: 1px solid var(--status-success-border);
}

.badge-belum {
  background: var(--status-warning-bg);
  color: var(--status-warning-text);
  border: 1px solid var(--status-warning-border);
}

/* ── Botanical Divider ──────────────────────────────────── */
.botanical-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
  opacity: 0.7;
}

.botanical-divider::before,
.botanical-divider::after {
  content: '';
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-rose-gold), transparent);
  flex: 1;
}

.botanical-divider span {
  color: var(--color-rose-gold);
  font-size: 1rem;
}

/* ── Bottom Navigation Bar (Mobile-First) ───────────────── */
.mobile-nav-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: rgba(255, 252, 248, 0.96);
  backdrop-filter: blur(24px) saturate(1.8);
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
  border-top: 1px solid rgba(194, 125, 107, 0.18);
  box-shadow: 0 -4px 24px rgba(133, 66, 55, 0.10);
  display: flex;
  align-items: stretch;
  padding: 0;
  padding-bottom: env(safe-area-inset-bottom, 0);
  height: var(--nav-height);
}

.mobile-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0.5rem 0.5rem;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--color-muted);
  text-decoration: none;
  transition: all var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  line-height: inherit;
}

.mobile-nav-item i,
.mobile-nav-item svg {
  font-size: 1.45rem;
  line-height: 1;
  transition: transform var(--transition-bounce);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-nav-item.active {
  color: var(--color-rose-deep);
}

.mobile-nav-item.active i,
.mobile-nav-item.active svg {
  transform: translateY(-2px) scale(1.12);
}

.mobile-nav-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 2.5px;
  background: var(--gradient-rose);
  border-radius: 0 0 4px 4px;
}

.mobile-nav-item:active i,
.mobile-nav-item:active svg {
  transform: scale(0.9);
}

/* ── Toast Notifications ────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  pointer-events: none;
  width: calc(100% - 2rem);
  max-width: 420px;
}

.toast {
  pointer-events: auto;
  padding: 0.9rem 1.15rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.14);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideDownToast 0.35s var(--transition-bounce) both;
  border-left: 4px solid var(--color-rose-gold);
  font-size: 0.88rem;
  font-weight: 500;
}

.toast-success { border-left-color: #2E7D32; }
.toast-warning { border-left-color: #E65100; }
.toast-error   { border-left-color: #C62828; }

@keyframes slideDownToast {
  from { opacity: 0; transform: translateY(-16px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Animations ─────────────────────────────────────────── */
@keyframes pulseGlow {
  0%   { box-shadow: 0 0 0 0 rgba(194, 125, 107, 0.45); }
  70%  { box-shadow: 0 0 0 14px rgba(194, 125, 107, 0); }
  100% { box-shadow: 0 0 0 0 rgba(194, 125, 107, 0); }
}

.pulse-glow {
  animation: pulseGlow 2.8s ease-out infinite;
}

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

.fade-in-up {
  animation: fadeInUp 0.5s var(--transition-smooth) both;
}

/* ── Form Elements (shared) ─────────────────────────────── */
.form-group {
  margin-bottom: 1.15rem;
  text-align: left;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-charcoal);
  margin-bottom: 0.45rem;
  letter-spacing: 0.01em;
}

.form-select, .form-input, .form-textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-border-subtle);
  background: rgba(251, 247, 241, 0.8);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--color-charcoal);
  outline: none;
  transition: all var(--transition-fast);
  -webkit-appearance: none;
  appearance: none;
}

.form-select:focus, .form-input:focus, .form-textarea:focus {
  border-color: var(--color-rose-gold);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(194, 125, 107, 0.14);
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238E7C7C' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

/* ── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(194, 125, 107, 0.3);
  border-radius: 99px;
}

/* ── Utilities ──────────────────────────────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
