:root {
  --background: 210 40% 98%;
  --foreground: 222 47% 11%;
  --primary: 224 76% 48%;
  --primary-foreground: 0 0% 100%;
  --secondary: 173 80% 38%;
  --secondary-foreground: 0 0% 100%;
  --muted: 215 25% 92%;
  --muted-foreground: 215 16% 42%;
  --destructive: 0 76% 55%;
  --destructive-foreground: 0 0% 100%;
  --border: 214 24% 86%;
  --card: 0 0% 100%;
  --card-foreground: 222 47% 11%;
  --accent: 262 83% 58%;
  --warning: 35 92% 50%;
  --success: 145 65% 38%;
  --radius-sm: 0.55rem;
  --radius-md: 0.9rem;
  --radius-lg: 1.35rem;
  --shadow-sm: 0 8px 24px hsl(224 76% 48% / 0.08);
  --shadow-md: 0 18px 45px hsl(224 76% 48% / 0.12);
  --shadow-lg: 0 28px 80px hsl(224 76% 48% / 0.18);
  --transition-fast: 150ms ease;
  --transition-smooth: 280ms cubic-bezier(.2,.8,.2,1);
}
.dark {
  --background: 222 47% 7%;
  --foreground: 214 32% 94%;
  --primary: 217 91% 62%;
  --primary-foreground: 222 47% 7%;
  --secondary: 173 72% 45%;
  --secondary-foreground: 222 47% 7%;
  --muted: 222 32% 15%;
  --muted-foreground: 215 20% 72%;
  --destructive: 0 72% 60%;
  --destructive-foreground: 0 0% 100%;
  --border: 222 28% 20%;
  --card: 222 37% 11%;
  --card-foreground: 214 32% 94%;
  --accent: 262 90% 70%;
  --warning: 38 92% 58%;
  --success: 145 64% 48%;
  --shadow-sm: 0 8px 24px hsl(0 0% 0% / 0.22);
  --shadow-md: 0 18px 45px hsl(0 0% 0% / 0.28);
  --shadow-lg: 0 28px 80px hsl(0 0% 0% / 0.38);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, hsl(var(--primary) / 0.16), transparent 32rem),
    radial-gradient(circle at top right, hsl(var(--secondary) / 0.13), transparent 28rem),
    hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input, select, textarea { font: inherit; }
button { transition: transform var(--transition-fast), background var(--transition-fast), border var(--transition-fast), opacity var(--transition-fast); }
button:hover { transform: translateY(-1px); }
button:active { transform: translateY(0); }
.card {
  background: hsl(var(--card) / 0.88);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
}
.field {
  width: 100%;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background) / 0.72);
  color: hsl(var(--foreground));
  border-radius: var(--radius-sm);
  padding: 0.62rem 0.75rem;
  outline: none;
  transition: border var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}
.field:focus { border-color: hsl(var(--primary)); box-shadow: 0 0 0 4px hsl(var(--primary) / 0.14); }
.table-input {
  min-width: 9rem;
  border: 1px solid transparent;
  background: transparent;
  color: hsl(var(--foreground));
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  outline: none;
}
.table-input:focus { border-color: hsl(var(--primary)); background: hsl(var(--background)); box-shadow: 0 0 0 3px hsl(var(--primary) / 0.12); }
.toast-enter { animation: toastIn .25s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.fade-up { animation: fadeUp .38s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.skeleton { position: relative; overflow: hidden; background: hsl(var(--muted)); border-radius: var(--radius-md); }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, hsl(var(--foreground) / 0.08), transparent); animation: shimmer 1.35s infinite; }
@keyframes shimmer { 100% { transform: translateX(100%); } }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: hsl(var(--muted-foreground) / 0.35); border-radius: 999px; }
::-webkit-scrollbar-track { background: transparent; }