:root {
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --background: 220 33% 98%;
  --foreground: 222 47% 11%;
  --card: 0 0% 100%;
  --card-foreground: 222 47% 11%;
  --popover: 0 0% 100%;
  --popover-foreground: 222 47% 11%;
  --primary: 257 83% 56%;
  --primary-foreground: 0 0% 100%;
  --secondary: 220 20% 92%;
  --secondary-foreground: 222 47% 11%;
  --muted: 220 18% 92%;
  --muted-foreground: 222 15% 42%;
  --accent: 186 91% 38%;
  --accent-foreground: 0 0% 100%;
  --destructive: 0 72% 51%;
  --destructive-foreground: 0 0% 100%;
  --success: 142 71% 36%;
  --success-foreground: 0 0% 100%;
  --warning: 38 92% 45%;
  --warning-foreground: 222 47% 11%;
  --info: 217 91% 55%;
  --info-foreground: 0 0% 100%;
  --border: 220 18% 84%;
  --input: 220 18% 84%;
  --ring: 257 83% 56%;
  --radius: 0.625rem;
  --shadow-sm: 0 1px 2px hsl(var(--foreground) / 0.05);
  --shadow-md: 0 4px 12px hsl(var(--foreground) / 0.08);
  --shadow-lg: 0 12px 32px hsl(var(--foreground) / 0.12);
  --shadow-elegant: 0 20px 48px hsl(var(--primary) / 0.24);
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.dark {
  --background: 224 36% 9%;
  --foreground: 210 40% 96%;
  --card: 224 32% 13%;
  --card-foreground: 210 40% 96%;
  --popover: 224 32% 13%;
  --popover-foreground: 210 40% 96%;
  --primary: 263 92% 68%;
  --primary-foreground: 224 36% 9%;
  --secondary: 224 20% 20%;
  --secondary-foreground: 210 40% 96%;
  --muted: 224 20% 20%;
  --muted-foreground: 215 20% 72%;
  --accent: 187 85% 48%;
  --accent-foreground: 224 36% 9%;
  --destructive: 0 72% 58%;
  --destructive-foreground: 0 0% 100%;
  --success: 142 70% 45%;
  --success-foreground: 224 36% 9%;
  --warning: 38 92% 55%;
  --warning-foreground: 224 36% 9%;
  --info: 217 91% 65%;
  --info-foreground: 224 36% 9%;
  --border: 224 18% 26%;
  --input: 224 18% 26%;
  --ring: 263 92% 68%;
}

* {
  box-sizing: border-box;
}

html {
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: var(--font-sans);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, hsl(var(--primary) / 0.12), transparent 32rem),
    radial-gradient(circle at top right, hsl(var(--accent) / 0.10), transparent 28rem),
    hsl(var(--background));
}

button, input, textarea, select {
  font: inherit;
}

input, textarea, select {
  font-size: max(16px, 1rem);
}

.app-shell {
  min-height: 100vh;
  padding-bottom: calc(5rem + env(safe-area-inset-bottom));
}

.bottom-safe {
  padding-bottom: env(safe-area-inset-bottom);
}

.btn-motion {
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast);
}

.btn-motion:hover:not(:disabled) {
  transform: translateY(-0.125rem);
  box-shadow: var(--shadow-md);
}

.btn-motion:active:not(:disabled) {
  transform: translateY(0);
}

.card-shadow {
  box-shadow: var(--shadow-sm);
}

.elegant-shadow {
  box-shadow: var(--shadow-elegant);
}

.focus-ring:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px hsl(var(--background)), 0 0 0 4px hsl(var(--ring));
}

.file-input::file-selector-button {
  min-height: 2.75rem;
  border: 0;
  border-radius: calc(var(--radius) - 2px);
  background: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  padding: 0 1rem;
  margin-right: 1rem;
  font-weight: 500;
}

@keyframes soft-pulse {
  0%, 100% { opacity: 0.66; }
  50% { opacity: 1; }
}

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