/**
 * LOOKME — shadcn/ui design tokens & primitives (vanilla CSS, no build step).
 * Violet dark theme — matches shadcn/ui defaults.
 */
.dark,
:root {
  --background: 224 71.4% 4.1%;
  --foreground: 210 20% 98%;
  --card: 224 71.4% 6.5%;
  --card-foreground: 210 20% 98%;
  --popover: 224 71.4% 6.5%;
  --popover-foreground: 210 20% 98%;
  --primary: 263.4 70% 50.4%;
  --primary-foreground: 210 20% 98%;
  --secondary: 215 27.9% 16.9%;
  --secondary-foreground: 210 20% 98%;
  --muted: 215 27.9% 16.9%;
  --muted-foreground: 217.9 10.6% 64.9%;
  --accent: 215 27.9% 16.9%;
  --accent-foreground: 210 20% 98%;
  --destructive: 0 62.8% 50%;
  --destructive-foreground: 210 20% 98%;
  --border: 215 27.9% 16.9%;
  --input: 215 27.9% 16.9%;
  --ring: 263.4 70% 50.4%;
  --radius: 0.5rem;
  --chart-1: 220 70% 50%;
  --chart-2: 160 60% 45%;
  --chart-3: 30 80% 55%;
  --chart-4: 280 65% 60%;
  --chart-5: 340 75% 55%;
  --success: 142 71% 45%;
  --warning: 38 92% 50%;
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-feature-settings: "rlig" 1, "calt" 1;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-size: 0.875rem;
  line-height: 1.5;
}

/* ── Typography ── */
.text-muted { color: hsl(var(--muted-foreground)); }
.text-sm { font-size: 0.8125rem; }
.text-xs { font-size: 0.75rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.leading-none { line-height: 1; }
.tracking-tight { letter-spacing: -0.025em; }

/* ── Button (shadcn) ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  white-space: nowrap;
  border-radius: calc(var(--radius) - 2px);
  font-size: 0.8125rem;
  font-weight: 500;
  font-family: inherit;
  line-height: 1;
  height: 2.25rem;
  padding: 0 0.875rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s, opacity 0.15s;
  text-decoration: none;
}
.btn:disabled { pointer-events: none; opacity: 0.5; }
.btn:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px hsl(var(--background)), 0 0 0 4px hsl(var(--ring));
}
.btn-primary {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}
.btn-primary:hover { background-color: hsl(var(--primary) / 0.9); }
.btn-secondary {
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
}
.btn-secondary:hover { background-color: hsl(var(--secondary) / 0.8); }
.btn-outline {
  border-color: hsl(var(--border));
  background-color: transparent;
  color: hsl(var(--foreground));
}
.btn-outline:hover {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}
.btn-ghost {
  background-color: transparent;
  color: hsl(var(--foreground));
}
.btn-ghost:hover {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}
.btn-destructive {
  background-color: hsl(var(--destructive));
  color: hsl(var(--destructive-foreground));
}
.btn-destructive:hover { background-color: hsl(var(--destructive) / 0.9); }
.btn-sm { height: 2rem; padding: 0 0.75rem; font-size: 0.75rem; }
.btn-lg { height: 2.75rem; padding: 0 1.25rem; font-size: 0.875rem; }
.btn-icon {
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
}

/* ── Input (shadcn) ── */
.input {
  display: flex;
  width: 100%;
  height: 2.5rem;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid hsl(var(--input));
  background-color: hsl(var(--background));
  padding: 0 0.75rem;
  font-size: 0.875rem;
  font-family: inherit;
  color: hsl(var(--foreground));
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input::placeholder { color: hsl(var(--muted-foreground)); }
.input:focus-visible {
  outline: none;
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 3px hsl(var(--ring) / 0.25);
}
.input:disabled { cursor: not-allowed; opacity: 0.5; }

/* ── Label ── */
.label {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  color: hsl(var(--foreground));
}

/* ── Card (shadcn) ── */
.card {
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  background-color: hsl(var(--card));
  color: hsl(var(--card-foreground));
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}
.card-header {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 1.5rem 1.5rem 0;
}
.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.025em;
  margin: 0;
}
.card-description {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  margin: 0;
}
.card-content { padding: 1.5rem; }
.card-footer {
  display: flex;
  align-items: center;
  padding: 0 1.5rem 1.5rem;
}

/* ── Badge (shadcn) ── */
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  border: 1px solid transparent;
  padding: 0.125rem 0.625rem;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: background-color 0.15s;
}
.badge-default {
  border-color: transparent;
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}
.badge-secondary {
  border-color: transparent;
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
}
.badge-outline {
  border-color: hsl(var(--border));
  color: hsl(var(--foreground));
  background: transparent;
}
.badge-destructive {
  border-color: transparent;
  background-color: hsl(var(--destructive) / 0.15);
  color: hsl(var(--destructive));
}
.badge-success {
  border-color: transparent;
  background-color: hsl(var(--success) / 0.15);
  color: hsl(var(--success));
}
.badge-warning {
  border-color: transparent;
  background-color: hsl(var(--warning) / 0.15);
  color: hsl(var(--warning));
}

/* ── Alert (shadcn) ── */
.alert {
  position: relative;
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  display: flex;
  gap: 0.625rem;
  align-items: flex-start;
}
.alert-destructive {
  border-color: hsl(var(--destructive) / 0.5);
  color: hsl(var(--destructive));
  background-color: hsl(var(--destructive) / 0.1);
}

/* ── Separator ── */
.separator {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: hsl(var(--muted-foreground));
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 1rem 0;
}
.separator::before,
.separator::after {
  content: "";
  flex: 1;
  height: 1px;
  background-color: hsl(var(--border));
}

/* ── Dialog overlay (modals) ── */
.dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background-color: rgb(0 0 0 / 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.dialog-overlay.show { display: flex; }
.dialog-content {
  z-index: 50;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: 92vh;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  background-color: hsl(var(--background));
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.5);
}
.dialog-header {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid hsl(var(--border));
}
.dialog-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  padding: 1rem 1.5rem;
  border-top: 1px solid hsl(var(--border));
}

/* ── Skeleton pulse ── */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.animate-spin { animation: spin 1s linear infinite; }
