/* ============================================
   NUPTIA — Design System
   Wedding Planning App
   ============================================ */

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

/* ============================================
   CSS CUSTOM PROPERTIES — DARK THEME (default)
   ============================================ */
:root {
  /* --- Background --- */
  --bg-deep: #0f0f17;
  --bg-surface: #16161f;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --bg-card-solid: #1c1c28;
  --bg-input: rgba(255, 255, 255, 0.06);
  --bg-input-focus: rgba(255, 255, 255, 0.09);
  --bg-overlay: rgba(0, 0, 0, 0.6);
  --bg-sidebar: #12121a;

  /* --- Accent Colors --- */
  --accent-rose: #ff7fa6;
  --accent-rose-light: #ffb3cb;
  --accent-rose-dark: #d4547d;
  --accent-rose-glow: rgba(255, 127, 166, 0.2);
  --accent-champagne: #f5e6d3;
  --accent-champagne-light: #fcf6ef;
  --accent-blush: #ffe8ec;
  --accent-lavender: #d4c4fb;
  --accent-sage: #c1d4bd;

  /* --- Text --- */
  --text-primary: #f5f0eb;
  --text-secondary: #8a8694;
  --text-tertiary: #5a5666;
  --text-inverse: #1a1a2e;
  --text-accent: var(--accent-champagne);

  /* --- Semantic Colors --- */
  --success: #6bcb77;
  --success-bg: rgba(107, 203, 119, 0.12);
  --warning: #ffd93d;
  --warning-bg: rgba(255, 217, 61, 0.12);
  --danger: #ff6b6b;
  --danger-bg: rgba(255, 107, 107, 0.12);
  --info: #74b9ff;
  --info-bg: rgba(116, 185, 255, 0.12);

  /* --- Borders --- */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-default: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.15);
  --border-accent: rgba(196, 120, 138, 0.3);

  /* --- Shadows --- */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(196, 120, 138, 0.15);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.04);

  /* --- Glass --- */
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: 20px;

  /* --- Typography --- */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-base: 0.9375rem;
  --text-lg: 1.125rem;
  --text-xl: 1.3125rem;
  --text-2xl: 1.625rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;
  --text-5xl: 3.25rem;

  --leading-tight: 1.2;
  --leading-normal: 1.5;
  --leading-relaxed: 1.7;

  --tracking-tight: -0.02em;
  --tracking-normal: 0;
  --tracking-wide: 0.02em;
  --tracking-wider: 0.05em;

  /* --- Spacing --- */
  --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;

  /* --- Radius --- */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-2xl: 32px;
  --radius-full: 9999px;

  /* --- Transitions --- */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* --- Z-index --- */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-toast: 500;

  /* --- Sidebar --- */
  --sidebar-width: 260px;
  --sidebar-collapsed: 72px;
}

/* ============================================
   LIGHT THEME
   ============================================ */
[data-theme="light"] {
  --bg-deep: #f8f6f3;
  --bg-surface: #ffffff;
  --bg-card: rgba(0, 0, 0, 0.02);
  --bg-card-hover: rgba(0, 0, 0, 0.04);
  --bg-card-solid: #ffffff;
  --bg-input: rgba(0, 0, 0, 0.04);
  --bg-input-focus: rgba(0, 0, 0, 0.06);
  --bg-overlay: rgba(0, 0, 0, 0.4);
  --bg-sidebar: #ffffff;

  --accent-rose: #ff6b95;
  --accent-rose-light: #ff9eba;
  --accent-rose-dark: #d1456d;
  --accent-rose-glow: rgba(255, 107, 149, 0.15);
  --accent-champagne: #e0c8a6;
  --accent-champagne-light: #f2ebd9;

  --text-primary: #1a1a2e;
  --text-secondary: #6b6780;
  --text-tertiary: #9b97a8;
  --text-inverse: #f5f0eb;
  --text-accent: var(--accent-rose);

  --success: #2d8a3e;
  --success-bg: rgba(45, 138, 62, 0.1);
  --warning: #c49a1a;
  --warning-bg: rgba(196, 154, 26, 0.1);
  --danger: #d63031;
  --danger-bg: rgba(214, 48, 49, 0.1);
  --info: #2e86de;
  --info-bg: rgba(46, 134, 222, 0.1);

  --border-subtle: rgba(0, 0, 0, 0.06);
  --border-default: rgba(0, 0, 0, 0.1);
  --border-strong: rgba(0, 0, 0, 0.15);
  --border-accent: rgba(181, 103, 122, 0.25);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 20px rgba(181, 103, 122, 0.1);
  --shadow-card: 0 1px 4px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.04);

  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(0, 0, 0, 0.08);
}

/* ============================================
   CSS RESET
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

img, canvas, video {
  max-width: 100%;
  height: auto;
}

html {
  font-size: 16px;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: 'Outfit', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background: var(--bg-deep);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background var(--transition-slow), color var(--transition-slow);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
}

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-default);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-strong);
}

/* ============================================
   KEYFRAME ANIMATIONS
   ============================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

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

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

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

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

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

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

@keyframes borderGlow {
  0%, 100% { border-color: var(--accent-rose); box-shadow: 0 0 8px var(--accent-rose-glow); }
  50% { border-color: var(--accent-champagne); box-shadow: 0 0 14px var(--accent-rose-glow); }
}

@keyframes progressFill {
  from { width: 0; }
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.92) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(100%); }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.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;
}

.text-accent { color: var(--text-accent); }
.text-secondary { color: var(--text-secondary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-info { color: var(--info); }

.font-heading { font-family: var(--font-heading); }

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.animate-in {
  animation: fadeInUp var(--transition-base) ease both;
}

.stagger-1 { animation-delay: 50ms; }
.stagger-2 { animation-delay: 100ms; }
.stagger-3 { animation-delay: 150ms; }
.stagger-4 { animation-delay: 200ms; }
.stagger-5 { animation-delay: 250ms; }
.stagger-6 { animation-delay: 300ms; }

/* Selection */
::selection {
  background: var(--accent-rose);
  color: var(--text-inverse);
}

/* Utility Text Formatting */
.text-center { text-align: center; }
.text-right { text-align: right; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
