/* ============================================================
   SUMMON BRAND IDENTITY SYSTEM
   "Bringing people together, one gathering at a time"
   ============================================================

   A comprehensive design system that embodies warmth, connection,
   and modern elegance. Inspired by Airbnb's hospitality, Notion's
   clarity, and a meditation app's tranquility.

   ============================================================ */

/* ============================================================
   GOOGLE FONTS - Add to HTML <head>:
   ============================================================

   <link rel="preconnect" href="https://fonts.googleapis.com">
   <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
   <link href="https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300..800;1,9..40,300..800&family=Inter:wght@300..700&family=Fraunces:ital,opsz,wght@0,9..144,300..700;1,9..144,300..700&display=swap" rel="stylesheet">

   ============================================================ */


/* ============================================================
   1. COLOR PALETTE
   ============================================================

   Philosophy: Warm coral and rose tones evoke energy and human
   connection, balanced with sophisticated neutrals. The palette
   feels like a sunset gathering with friends - warm, inviting,
   and memorable.

   ============================================================ */

:root {
  /* -----------------------------------------------------------
     PRIMARY COLORS - Coral Rose
     Energetic yet gentle, like the warmth of gathering with
     people you care about. Not aggressive, but inviting.
     ----------------------------------------------------------- */
  --color-primary-50: #FFF5F3;
  --color-primary-100: #FFE8E3;
  --color-primary-200: #FFD4CC;
  --color-primary-300: #FFB5A8;
  --color-primary-400: #FF8F7A;
  --color-primary-500: #F06449;  /* Main primary - Coral Rose */
  --color-primary-600: #DE4A2E;
  --color-primary-700: #BA3A22;
  --color-primary-800: #9A3320;
  --color-primary-900: #802F21;

  /* -----------------------------------------------------------
     SECONDARY COLORS - Soft Lavender
     Complementary and dreamy, adds depth and a touch of magic
     to the summoning experience. Feminine and refined.
     ----------------------------------------------------------- */
  --color-secondary-50: #F8F5FF;
  --color-secondary-100: #F0EAFF;
  --color-secondary-200: #E4D9FF;
  --color-secondary-300: #CDB8FF;
  --color-secondary-400: #B18EFF;
  --color-secondary-500: #9466FF;  /* Main secondary - Lavender */
  --color-secondary-600: #8347F5;
  --color-secondary-700: #7235E1;
  --color-secondary-800: #5F2BBD;
  --color-secondary-900: #4E259A;

  /* -----------------------------------------------------------
     ACCENT COLORS - Golden Amber
     For celebrations, success moments, and that feeling when
     plans come together perfectly. Warm and celebratory.
     ----------------------------------------------------------- */
  --color-accent-50: #FFFBEB;
  --color-accent-100: #FEF3C7;
  --color-accent-200: #FDE68A;
  --color-accent-300: #FCD34D;
  --color-accent-400: #FBBF24;
  --color-accent-500: #F59E0B;  /* Main accent - Golden Amber */
  --color-accent-600: #D97706;
  --color-accent-700: #B45309;
  --color-accent-800: #92400E;
  --color-accent-900: #78350F;

  /* -----------------------------------------------------------
     NEUTRAL COLORS - Warm Stone
     Warm grays with a hint of rose undertone, keeping
     everything cohesive and inviting. Never cold or clinical.
     ----------------------------------------------------------- */
  --color-neutral-0: #FFFFFF;
  --color-neutral-50: #FDFCFB;
  --color-neutral-100: #F9F7F6;
  --color-neutral-200: #F3F0EE;
  --color-neutral-300: #E8E4E1;
  --color-neutral-400: #D4CEC9;
  --color-neutral-500: #A9A29B;
  --color-neutral-600: #7A736C;
  --color-neutral-700: #5C5651;
  --color-neutral-800: #3D3936;
  --color-neutral-900: #1F1D1B;
  --color-neutral-950: #0F0E0D;

  /* -----------------------------------------------------------
     SEMANTIC COLORS
     Clear, accessible colors for system feedback
     ----------------------------------------------------------- */

  /* Success - Fresh Mint */
  --color-success-50: #ECFDF5;
  --color-success-100: #D1FAE5;
  --color-success-200: #A7F3D0;
  --color-success-300: #6EE7B7;
  --color-success-400: #34D399;
  --color-success-500: #10B981;
  --color-success-600: #059669;
  --color-success-700: #047857;

  /* Warning - Warm Amber */
  --color-warning-50: #FFFBEB;
  --color-warning-100: #FEF3C7;
  --color-warning-200: #FDE68A;
  --color-warning-300: #FCD34D;
  --color-warning-400: #FBBF24;
  --color-warning-500: #F59E0B;
  --color-warning-600: #D97706;
  --color-warning-700: #B45309;

  /* Error - Soft Rose Red */
  --color-error-50: #FEF2F2;
  --color-error-100: #FEE2E2;
  --color-error-200: #FECACA;
  --color-error-300: #FCA5A5;
  --color-error-400: #F87171;
  --color-error-500: #EF4444;
  --color-error-600: #DC2626;
  --color-error-700: #B91C1C;

  /* Info - Calm Sky */
  --color-info-50: #EFF6FF;
  --color-info-100: #DBEAFE;
  --color-info-200: #BFDBFE;
  --color-info-300: #93C5FD;
  --color-info-400: #60A5FA;
  --color-info-500: #3B82F6;
  --color-info-600: #2563EB;
  --color-info-700: #1D4ED8;


  /* ============================================================
     2. TYPOGRAPHY
     ============================================================

     Font Pairing Philosophy:
     - Headlines: "DM Sans" - Modern, geometric, friendly curves
     - Body: "Inter" - Highly readable, warm, versatile
     - Accent: "Fraunces" - Editorial elegance for special moments

     ============================================================ */

  /* Font Families */
  --font-display: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-accent: 'Fraunces', Georgia, serif;

  /* Font Sizes - Fluid type scale (1.25 ratio) */
  --text-xs: clamp(0.7rem, 0.66rem + 0.2vw, 0.8rem);
  --text-sm: clamp(0.8rem, 0.76rem + 0.2vw, 0.9rem);
  --text-base: clamp(0.95rem, 0.91rem + 0.2vw, 1.05rem);
  --text-lg: clamp(1.1rem, 1.04rem + 0.3vw, 1.25rem);
  --text-xl: clamp(1.3rem, 1.22rem + 0.4vw, 1.5rem);
  --text-2xl: clamp(1.6rem, 1.48rem + 0.6vw, 1.9rem);
  --text-3xl: clamp(2rem, 1.84rem + 0.8vw, 2.4rem);
  --text-4xl: clamp(2.5rem, 2.26rem + 1.2vw, 3.2rem);

  /* Font Weights */
  --font-light: 300;
  --font-regular: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  /* Line Heights */
  --leading-tight: 1.2;
  --leading-snug: 1.35;
  --leading-normal: 1.5;
  --leading-relaxed: 1.65;

  /* Letter Spacing */
  --tracking-tighter: -0.03em;
  --tracking-tight: -0.015em;
  --tracking-normal: 0;
  --tracking-wide: 0.015em;
  --tracking-wider: 0.03em;


  /* ============================================================
     4. DESIGN TOKENS - Spacing, Radius, Shadows
     ============================================================

     Spacing Philosophy: Generous, breathable layouts that give
     content room to shine. White space is a feature, not empty
     space. Inspired by meditation apps - calm and spacious.

     ============================================================ */

  /* Spacing Scale (4px base unit) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* -----------------------------------------------------------
     Border Radius
     Soft, approachable curves - never harsh corners. Feminine
     design sensibility with thoughtful, refined details.
     ----------------------------------------------------------- */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* -----------------------------------------------------------
     Shadows
     Soft, diffused shadows that feel lifted but grounded.
     ----------------------------------------------------------- */
  --shadow-xs: 0 1px 2px 0 rgb(31 29 27 / 0.04);
  --shadow-sm: 0 1px 2px 0 rgb(31 29 27 / 0.03), 0 2px 4px 0 rgb(31 29 27 / 0.04);
  --shadow-md: 0 2px 4px -1px rgb(31 29 27 / 0.04), 0 4px 8px -1px rgb(31 29 27 / 0.06);
  --shadow-lg: 0 4px 6px -2px rgb(31 29 27 / 0.04), 0 12px 24px -4px rgb(31 29 27 / 0.10);
  --shadow-xl: 0 8px 12px -4px rgb(31 29 27 / 0.04), 0 20px 32px -8px rgb(31 29 27 / 0.12);
  --shadow-2xl: 0 16px 24px -8px rgb(31 29 27 / 0.06), 0 32px 48px -12px rgb(31 29 27 / 0.16);

  /* Colored shadows for primary elements */
  --shadow-primary: 0 4px 14px -3px rgb(240 100 73 / 0.35);
  --shadow-primary-lg: 0 8px 24px -4px rgb(240 100 73 / 0.4);
  --shadow-secondary: 0 4px 14px -3px rgb(148 102 255 / 0.35);


  /* ============================================================
     ANIMATION & MOTION
     ============================================================ */

  --duration-fast: 100ms;
  --duration-normal: 200ms;
  --duration-slow: 300ms;
  --duration-slower: 500ms;

  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);

  --transition-base: var(--duration-normal) var(--ease-out);
  --transition-fast: var(--duration-fast) var(--ease-out);
  --transition-slow: var(--duration-slow) var(--ease-smooth);


  /* ============================================================
     Z-INDEX SCALE
     ============================================================ */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal: 400;
  --z-toast: 600;
  --z-tooltip: 700;


  /* ============================================================
     LEGACY VARIABLE MAPPINGS (backwards compatibility)
     ============================================================ */
  --primary: var(--color-primary-500);
  --primary-hover: var(--color-primary-600);
  --primary-soft: var(--color-primary-100);
  --success: var(--color-success-500);
  --success-soft: var(--color-success-100);
  --success-glow: rgba(16, 185, 129, 0.4);
  --pending: var(--color-warning-500);
  --pending-soft: var(--color-warning-100);
  --pending-glow: rgba(245, 158, 11, 0.4);
  --danger: var(--color-error-500);
  --danger-hover: var(--color-error-600);
  --bg: var(--color-neutral-50);
  --bg-subtle: var(--color-neutral-100);
  --card: var(--color-neutral-0);
  --card-hover: var(--color-neutral-50);
  --text: var(--color-neutral-900);
  --text-secondary: var(--color-neutral-600);
  --muted: var(--color-neutral-500);
  --border: var(--color-neutral-300);
  --border-focus: var(--color-primary-400);
  --radius: var(--radius-lg);
  --shadow: var(--shadow-md);
}


/* ============================================================
   DARK MODE
   ============================================================ */

@media (prefers-color-scheme: dark) {
  :root {
    --color-neutral-0: #1A1816;
    --color-neutral-50: #1F1D1B;
    --color-neutral-100: #2A2725;
    --color-neutral-200: #3D3936;
    --color-neutral-300: #5C5651;
    --color-neutral-400: #7A736C;
    --color-neutral-500: #A9A29B;
    --color-neutral-600: #D4CEC9;
    --color-neutral-700: #E8E4E1;
    --color-neutral-800: #F3F0EE;
    --color-neutral-900: #FDFCFB;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.2), 0 2px 4px 0 rgb(0 0 0 / 0.15);
    --shadow-md: 0 2px 4px -1px rgb(0 0 0 / 0.2), 0 4px 8px -1px rgb(0 0 0 / 0.2);
    --shadow-lg: 0 4px 6px -2px rgb(0 0 0 / 0.2), 0 12px 24px -4px rgb(0 0 0 / 0.3);
    --shadow-xl: 0 8px 12px -4px rgb(0 0 0 / 0.2), 0 20px 32px -8px rgb(0 0 0 / 0.35);
  }
}


/* ============================================================
   BASE STYLES
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--font-regular);
  line-height: var(--leading-normal);
  color: var(--color-neutral-800);
  background-color: var(--color-neutral-50);
  min-height: 100vh;
}


/* ============================================================
   TYPOGRAPHY STYLES
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--font-semibold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-neutral-900);
}

h1 { font-size: var(--text-3xl); font-weight: var(--font-bold); letter-spacing: var(--tracking-tighter); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }
h5 { font-size: var(--text-base); font-weight: var(--font-semibold); }
h6 { font-size: var(--text-sm); font-weight: var(--font-semibold); text-transform: uppercase; letter-spacing: var(--tracking-wider); }

p {
  line-height: var(--leading-relaxed);
  color: var(--color-neutral-700);
}

.text-accent {
  font-family: var(--font-accent);
  font-style: italic;
}

a {
  color: var(--color-primary-600);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-700);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:focus-visible {
  outline: 2px solid var(--color-primary-500);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

small {
  font-size: var(--text-sm);
  color: var(--color-neutral-600);
}


/* ============================================================
   3. LOGO CONCEPT
   ============================================================

   THE SUMMON MARK

   Visual Description:
   Three overlapping soft circles in a Venn diagram formation,
   representing people coming together. The circles use a subtle
   gradient from coral (primary) to lavender (secondary), and
   where they overlap at the center creates a beautiful
   intersection - the meeting place, the "summon point."

   A small sparkle element at the intersection adds the "magic"
   of summoning friends together.

   Wordmark: "Summon" in DM Sans Bold with slightly increased
   letter-spacing for an elegant, premium feel.

   ============================================================ */

.logo {
  font-family: var(--font-display);
  font-weight: var(--font-bold);
  font-size: var(--text-xl);
  letter-spacing: var(--tracking-wide);
  color: var(--color-primary-500);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  transition: color var(--transition-fast);
}

.logo:hover {
  color: var(--color-primary-600);
  text-decoration: none;
}

.logo-mark {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--color-primary-500) 0%, var(--color-secondary-500) 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: var(--font-bold);
  font-size: var(--text-lg);
}


/* ============================================================
   NAVIGATION
   ============================================================ */

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4) var(--space-6);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--color-neutral-200);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  backdrop-filter: blur(12px);
}

@media (prefers-color-scheme: dark) {
  nav { background: rgba(26, 24, 22, 0.92); }
}

.nav-links {
  display: flex;
  gap: var(--space-1);
}

.nav-links a,
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--color-neutral-600);
  text-decoration: none;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-weight: var(--font-medium);
  font-size: var(--text-sm);
  transition: all var(--transition-base);
}

.nav-links a:hover,
.nav-link:hover {
  color: var(--color-primary-600);
  background: var(--color-primary-50);
  text-decoration: none;
}

.nav-link svg { flex-shrink: 0; }

.nav-link-primary {
  background: var(--color-primary-500) !important;
  color: white !important;
}

.nav-link-primary:hover {
  background: var(--color-primary-600) !important;
  color: white !important;
}

/* Nav Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: var(--space-2);
  background: var(--color-neutral-0);
  border: 1px solid var(--color-neutral-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  z-index: var(--z-dropdown);
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  color: var(--color-neutral-700);
  text-decoration: none;
  font-size: var(--text-sm);
  transition: all 0.15s ease;
}

.dropdown-item:hover {
  background: var(--color-primary-50);
  color: var(--color-primary-600);
}

.dropdown-divider {
  border: none;
  border-top: 1px solid var(--color-neutral-200);
  margin: var(--space-2) 0;
}

@media (prefers-color-scheme: dark) {
  .nav-dropdown-menu {
    background: var(--color-neutral-900);
    border-color: var(--color-neutral-700);
  }
  .dropdown-item {
    color: var(--color-neutral-300);
  }
  .dropdown-item:hover {
    background: var(--color-neutral-800);
    color: var(--color-primary-400);
  }
  .dropdown-divider {
    border-color: var(--color-neutral-700);
  }
}

.notification-badge {
  background: var(--color-error-500, #ef4444);
  color: white;
  font-size: 0.625rem;
  font-weight: var(--font-bold);
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-full);
  margin-left: auto;
}


/* ============================================================
   ICON SYSTEM
   ============================================================ */

.icon { display: inline-flex; align-items: center; justify-content: center; }
.icon svg { display: block; }
[data-icon] { display: inline-flex; align-items: center; justify-content: center; }
[data-icon] svg { display: block; }
.icon-sm { width: 16px; height: 16px; }
.icon-md { width: 20px; height: 20px; }
.icon-lg { width: 24px; height: 24px; }
.icon-xl { width: 32px; height: 32px; }

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-md);
  background: var(--color-neutral-100);
  color: var(--color-neutral-600);
  border: 1px solid var(--color-neutral-200);
  transition: all var(--transition-base);
}

.btn-icon:hover {
  background: var(--color-neutral-0);
  color: var(--color-primary-600);
  border-color: var(--color-primary-400);
  box-shadow: var(--shadow-sm);
}

.btn-icon svg { width: 18px; height: 18px; }


/* ============================================================
   MAIN CONTENT
   ============================================================ */

main {
  padding: var(--space-8) var(--space-6);
  max-width: 900px;
  margin: 0 auto;
}

@media (max-width: 640px) {
  main { padding: var(--space-5) var(--space-4); }
}


/* ============================================================
   5. UI COMPONENT STYLES - CARDS
   ============================================================ */

.card,
.summon-card,
.info-card {
  background: var(--color-neutral-0);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  border: 1px solid var(--color-neutral-200);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s var(--ease-smooth);
}

.summon-card:hover,
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-neutral-300);
}

.summon-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-4);
}

.summon-card h3 {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-2);
  color: var(--color-neutral-900);
}

.summon-meta {
  display: flex;
  gap: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-neutral-600);
}

.summon-card-actions {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-neutral-200);
}

.card-featured {
  position: relative;
  border: none;
  overflow: hidden;
}

.card-featured::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary-500), var(--color-secondary-500));
}


/* ============================================================
   GRIDS
   ============================================================ */

.summons-grid,
.summon-grid {
  display: grid;
  gap: var(--space-5);
}

@media (min-width: 640px) {
  .summons-grid,
  .summon-grid { grid-template-columns: repeat(2, 1fr); }
}


/* ============================================================
   5. UI COMPONENT STYLES - BADGES & STATUS INDICATORS
   ============================================================ */

.badge,
.status-badge,
.activity-type {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  transition: all var(--transition-fast);
}

.activity-type {
  background: var(--color-neutral-100);
  color: var(--color-neutral-700);
}

.badge.success,
.status-badge.success,
.badge.confirmed {
  background: var(--color-success-100);
  color: var(--color-success-700);
  animation: pulse-success 2.5s ease-in-out infinite;
}

.badge.pending,
.status-badge.pending {
  background: var(--color-warning-100);
  color: var(--color-warning-700);
  animation: pulse-pending 2.5s ease-in-out infinite;
}

.badge.invited {
  background: var(--color-neutral-100);
  color: var(--color-neutral-600);
}

.badge-primary { background: var(--color-primary-100); color: var(--color-primary-700); }
.badge-secondary { background: var(--color-secondary-100); color: var(--color-secondary-700); }
.badge-error { background: var(--color-error-100); color: var(--color-error-700); }

@keyframes pulse-success {
  0%, 100% { box-shadow: 0 0 0 0 var(--success-glow); }
  50% { box-shadow: 0 0 0 8px transparent; }
}

@keyframes pulse-pending {
  0%, 100% { box-shadow: 0 0 0 0 var(--pending-glow); }
  50% { box-shadow: 0 0 0 8px transparent; }
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.status-dot-success { background: var(--color-success-500); }
.status-dot-warning { background: var(--color-warning-500); }
.status-dot-error { background: var(--color-error-500); }


/* ============================================================
   5. UI COMPONENT STYLES - BUTTONS
   ============================================================ */

button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.25s var(--ease-smooth);
  white-space: nowrap;
}

button:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--color-primary-500);
  outline-offset: 2px;
}

button:disabled,
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Primary Button */
.btn-primary,
button[type="submit"] {
  background: linear-gradient(135deg, var(--color-primary-500) 0%, var(--color-primary-600) 100%);
  color: white;
  box-shadow: var(--shadow-primary), var(--shadow-sm);
}

.btn-primary:hover,
button[type="submit"]:hover {
  background: linear-gradient(135deg, var(--color-primary-400) 0%, var(--color-primary-500) 100%);
  box-shadow: var(--shadow-primary-lg), var(--shadow-md);
  transform: translateY(-2px);
}

.btn-primary:active,
button[type="submit"]:active {
  transform: translateY(0);
}

/* Secondary Button */
.btn-secondary {
  background: var(--color-neutral-0);
  color: var(--color-neutral-800);
  border: 1.5px solid var(--color-neutral-300);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--color-neutral-50);
  border-color: var(--color-primary-400);
  color: var(--color-primary-600);
  box-shadow: var(--shadow-md);
}

/* Ghost Button */
.btn-ghost {
  background: transparent;
  color: var(--color-neutral-700);
}

.btn-ghost:hover {
  background: var(--color-neutral-100);
  color: var(--color-neutral-900);
}

/* Danger Button */
.btn-danger {
  background: linear-gradient(135deg, var(--color-error-500) 0%, var(--color-error-600) 100%);
  color: white;
}

.btn-danger:hover {
  background: linear-gradient(135deg, var(--color-error-400) 0%, var(--color-error-500) 100%);
  transform: translateY(-1px);
}

/* Button Sizes */
.btn-large {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
  border-radius: var(--radius-lg);
}

.btn-remove {
  padding: var(--space-1) var(--space-3);
  background: var(--color-error-500);
  font-size: var(--text-xs);
}


/* ============================================================
   5. UI COMPONENT STYLES - FORM ELEMENTS
   ============================================================ */

input,
select,
textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1.5px solid var(--color-neutral-300);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-base);
  background: var(--color-neutral-0);
  color: var(--color-neutral-800);
  transition: all var(--transition-fast);
  margin-bottom: var(--space-3);
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--color-neutral-400);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-primary-500);
  box-shadow: 0 0 0 4px var(--color-primary-100);
}

input::placeholder,
textarea::placeholder {
  color: var(--color-neutral-500);
}

input:disabled,
select:disabled,
textarea:disabled {
  background: var(--color-neutral-100);
  color: var(--color-neutral-500);
  cursor: not-allowed;
}

label {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-neutral-700);
  margin-bottom: var(--space-2);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235C5651' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  padding-right: var(--space-12);
  cursor: pointer;
}

textarea {
  min-height: 120px;
  resize: vertical;
  line-height: var(--leading-relaxed);
}

.form-section {
  margin-bottom: var(--space-8);
}

.form-section h2 {
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  color: var(--color-neutral-800);
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-neutral-200);
}

.form-row {
  display: flex;
  gap: var(--space-4);
}

.form-row > * { flex: 1; }

.form-actions {
  display: flex;
  gap: var(--space-4);
  padding-top: var(--space-5);
}

.hint,
.section-hint {
  font-size: var(--text-sm);
  color: var(--color-neutral-600);
  margin-bottom: var(--space-3);
}


/* ============================================================
   AUTH & CONTAINERS
   ============================================================ */

.auth-container {
  max-width: 420px;
  margin: var(--space-12) auto;
}

.auth-container h1 {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  text-align: center;
  margin-bottom: var(--space-8);
}

.create-container,
.detail-container {
  max-width: 700px;
  margin: 0 auto;
}

.create-container h1,
.detail-container h1 {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  margin-bottom: var(--space-8);
}


/* ============================================================
   SOCIAL LOGIN
   ============================================================ */

.social-login {
  margin-bottom: var(--space-6);
}

.social-login p {
  text-align: center;
  color: var(--color-neutral-600);
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
}

.social-buttons {
  display: flex;
  gap: var(--space-3);
}

.btn-oauth {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-weight: var(--font-medium);
  cursor: pointer;
  font-size: var(--text-sm);
  transition: all var(--transition-base);
}

.btn-oauth.google {
  background: var(--color-neutral-0);
  border: 1.5px solid var(--color-neutral-300);
  color: var(--color-neutral-800);
}

.btn-oauth.google:hover {
  border-color: var(--color-neutral-800);
  box-shadow: var(--shadow-md);
}

.btn-oauth.facebook { background: #1877f2; color: white; border: none; }
.btn-oauth.twitter { background: #0f1419; color: white; border: none; }

.divider {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin: var(--space-6) 0;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-neutral-300);
}

.divider span {
  color: var(--color-neutral-500);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  font-weight: var(--font-medium);
}

.auth-toggle {
  text-align: center;
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-neutral-200);
}

.auth-toggle button {
  background: transparent;
  color: var(--color-primary-600);
  font-weight: var(--font-semibold);
}

.auth-toggle button:hover { color: var(--color-primary-700); }


/* ============================================================
   DASHBOARD
   ============================================================ */

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-8);
}

.dashboard-header h1 {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
}

.summons-section {
  margin-bottom: var(--space-10);
}

.summons-section h2 {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--color-neutral-700);
  margin-bottom: var(--space-5);
}

.empty-state {
  text-align: center;
  padding: var(--space-12) var(--space-6);
  background: var(--color-neutral-100);
  border-radius: var(--radius-xl);
  border: 2px dashed var(--color-neutral-300);
}

.empty-state p {
  color: var(--color-neutral-600);
  margin-bottom: var(--space-5);
}


/* ============================================================
   DETAIL PAGE
   ============================================================ */

.detail-header {
  margin-bottom: var(--space-8);
}

.header-top {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}

.detail-header h1 {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  margin-bottom: var(--space-2);
}

.host {
  color: var(--color-neutral-600);
  font-size: var(--text-sm);
}

.detail-info {
  display: grid;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

@media (min-width: 640px) {
  .detail-info { grid-template-columns: repeat(2, 1fr); }
}

.detail-info .full-width { grid-column: 1 / -1; }

.info-card h3 {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: var(--color-neutral-500);
  margin-bottom: var(--space-2);
  font-weight: var(--font-semibold);
}

.datetime {
  font-weight: var(--font-semibold);
  color: var(--color-neutral-900);
}

.time { color: var(--color-neutral-600); }

.total-cost {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--color-success-600);
}

.per-person {
  font-size: var(--text-sm);
  color: var(--color-neutral-600);
}

.detail-actions {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-neutral-200);
}

.creator-actions,
.rsvp-actions,
.confirmed-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}


/* ============================================================
   MAP
   ============================================================ */

#map,
.map-picker,
#location-map,
#detail-map,
.map-container {
  height: 280px;
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-4);
  border: 1px solid var(--color-neutral-200);
  overflow: hidden;
}

.location-text {
  font-size: var(--text-sm);
  color: var(--color-neutral-600);
}


/* ============================================================
   MODAL
   ============================================================ */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(31, 29, 27, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  padding: var(--space-4);
  animation: fadeIn var(--duration-normal) var(--ease-out);
}

.modal {
  background: var(--color-neutral-0);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow-2xl);
  animation: scaleIn var(--duration-slow) var(--ease-spring);
}

.modal h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-6);
}

.share-link {
  display: flex;
  gap: var(--space-2);
}

.share-link input {
  flex: 1;
  margin-bottom: 0;
  font-size: var(--text-sm);
}

.share-link button {
  width: auto;
  padding: var(--space-2) var(--space-4);
  margin-bottom: 0;
}

.social-share {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-top: var(--space-4);
}

.btn-social {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  text-decoration: none;
  color: white;
  font-weight: var(--font-medium);
  transition: all var(--transition-base);
}

.btn-social.whatsapp { background: #25d366; }
.btn-social.sms { background: var(--color-primary-500); }
.btn-social.email { background: var(--color-neutral-600); }

.btn-social:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}


/* ============================================================
   PARTICIPANTS & RESOURCES
   ============================================================ */

.participant,
.resource,
.resource-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-neutral-200);
}

.participant:last-child,
.resource:last-child,
.resource-item:last-child {
  border-bottom: none;
}

.resource-add {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}

.resource-add input {
  flex: 1;
  margin-bottom: 0;
}

.resource-add input[type="number"] {
  width: 100px;
  flex: none;
}

.resource-add button { margin-bottom: 0; }


/* ============================================================
   TOGGLE
   ============================================================ */

.toggle {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
}

.toggle input { display: none; }

.toggle-slider {
  width: 48px;
  height: 26px;
  background: var(--color-neutral-300);
  border-radius: 13px;
  position: relative;
  transition: background var(--transition-base);
}

.toggle-slider::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: var(--radius-full);
  top: 3px;
  left: 3px;
  transition: transform var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.toggle input:checked + .toggle-slider {
  background: var(--color-primary-500);
}

.toggle input:checked + .toggle-slider::after {
  transform: translateX(22px);
}

.toggle-label {
  font-size: var(--text-sm);
  color: var(--color-neutral-700);
}


/* ============================================================
   MESSAGES & ALERTS
   ============================================================ */

.error,
.error-message {
  color: var(--color-error-700);
  background: var(--color-error-50);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
  border-left: 4px solid var(--color-error-500);
}

.success-message {
  color: var(--color-success-700);
  background: var(--color-success-50);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
  border-left: 4px solid var(--color-success-500);
}

.cost,
.cost-share {
  font-weight: var(--font-semibold);
  color: var(--color-success-600);
}


/* ============================================================
   FLASH MESSAGES
   ============================================================ */

.flash-container {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 500px;
  width: calc(100% - 2rem);
  pointer-events: none;
}

.flash-message {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  box-shadow: var(--shadow-xl);
  pointer-events: auto;
  animation: flash-slide-in 0.4s var(--ease-spring);
}

.flash-text { flex: 1; }

.flash-close {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
  padding: 0;
  margin: 0;
  color: inherit;
  transition: opacity var(--transition-fast);
}

.flash-close:hover { opacity: 1; }

.flash-success,
.flash-message {
  background: var(--color-success-50);
  color: var(--color-success-700);
  border-left: 4px solid var(--color-success-500);
}

.flash-error,
.flash-danger {
  background: var(--color-error-50);
  color: var(--color-error-700);
  border-left: 4px solid var(--color-error-500);
}

.flash-info {
  background: var(--color-info-50);
  color: var(--color-info-700);
  border-left: 4px solid var(--color-info-500);
}

.flash-warning {
  background: var(--color-warning-50);
  color: var(--color-warning-700);
  border-left: 4px solid var(--color-warning-500);
}

@media (prefers-color-scheme: dark) {
  .flash-success { background: #064e3b; color: #6ee7b7; }
  .flash-error, .flash-danger { background: #450a0a; color: #fca5a5; }
  .flash-info { background: #1e3a5f; color: #93c5fd; }
  .flash-warning { background: #451a03; color: #fcd34d; }
}

@keyframes flash-slide-in {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}

.flash-fade-out {
  animation: flash-fade-out 0.3s var(--ease-out) forwards;
}

@keyframes flash-fade-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-16px); }
}


/* ============================================================
   AVATARS
   ============================================================ */

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-primary-400) 0%, var(--color-secondary-500) 100%);
  color: white;
  font-family: var(--font-display);
  font-weight: var(--font-semibold);
  overflow: hidden;
  flex-shrink: 0;
}

.avatar-sm { width: 2rem; height: 2rem; font-size: var(--text-xs); }
.avatar-md { width: 2.5rem; height: 2.5rem; font-size: var(--text-sm); }
.avatar-lg { width: 3rem; height: 3rem; font-size: var(--text-base); }
.avatar-xl { width: 4rem; height: 4rem; font-size: var(--text-lg); }

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-group { display: flex; }

.avatar-group .avatar {
  border: 2px solid var(--color-neutral-0);
  margin-left: -0.5rem;
}

.avatar-group .avatar:first-child { margin-left: 0; }


/* ============================================================
   PROGRESS & LOADING
   ============================================================ */

.progress {
  width: 100%;
  height: 6px;
  background: var(--color-neutral-200);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary-500), var(--color-primary-400));
  border-radius: inherit;
  transition: width 0.5s var(--ease-smooth);
}

.skeleton {
  background: linear-gradient(90deg, var(--color-neutral-200) 0%, var(--color-neutral-100) 50%, var(--color-neutral-200) 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-md);
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.spinner {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--color-neutral-200);
  border-top-color: var(--color-primary-500);
  border-radius: var(--radius-full);
  animation: spin 0.8s linear infinite;
}

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


/* ============================================================
   ANIMATIONS LIBRARY
   ============================================================ */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

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

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.animate-fade-in { animation: fadeIn var(--duration-normal) var(--ease-out); }
.animate-scale-in { animation: scaleIn var(--duration-slow) var(--ease-spring); }
.animate-slide-up { animation: slideUp var(--duration-slow) var(--ease-smooth); }
.animate-bounce { animation: bounce 0.6s var(--ease-bounce); }


/* ============================================================
   UTILITY CLASSES
   ============================================================ */

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-primary { color: var(--color-primary-600); }
.text-secondary { color: var(--color-secondary-600); }
.text-muted { color: var(--color-neutral-600); }
.text-success { color: var(--color-success-600); }
.text-error { color: var(--color-error-600); }

.mt-auto { margin-top: auto; }
.mb-auto { margin-bottom: auto; }
.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }

.w-full { width: 100%; }

.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;
}


/* ============================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================ */

@media (max-width: 640px) {
  .card,
  .summon-card,
  .info-card { padding: var(--space-5); }

  .modal {
    padding: var(--space-6);
    margin: var(--space-4);
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .social-buttons { flex-direction: column; }

  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
  }

  .dashboard-header .btn { width: 100%; }
}
