﻿@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --background: 210 20% 98%;
  --foreground: 220 20% 10%;

  --card: 0 0% 100%;
  --card-foreground: 220 20% 10%;

  --popover: 0 0% 100%;
  --popover-foreground: 220 20% 10%;

  --primary: 215 80% 48%;
  --primary-foreground: 0 0% 100%;

  --secondary: 160 50% 42%;
  --secondary-foreground: 0 0% 100%;

  --muted: 210 15% 93%;
  --muted-foreground: 220 10% 46%;

  --accent: 38 92% 50%;
  --accent-foreground: 0 0% 100%;

  --destructive: 0 72% 51%;
  --destructive-foreground: 0 0% 100%;

  --border: 214 20% 88%;
  --input: 214 20% 88%;
  --ring: 215 80% 48%;

  --radius: 0.625rem;

  --sidebar-background: 215 80% 22%;
  --sidebar-foreground: 210 20% 95%;
  --sidebar-primary: 215 80% 48%;
  --sidebar-primary-foreground: 0 0% 100%;
  --sidebar-accent: 215 70% 30%;
  --sidebar-accent-foreground: 210 20% 95%;
  --sidebar-border: 215 60% 28%;
  --sidebar-ring: 215 80% 48%;

  --success: 160 50% 42%;
  --success-foreground: 0 0% 100%;
  --warning: 38 92% 50%;
  --warning-foreground: 0 0% 100%;
  --info: 200 80% 50%;
  --info-foreground: 0 0% 100%;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'DM Sans', sans-serif;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
}

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

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

/* Utility classes (Tailwind subset) */
.bg-background { background-color: hsl(var(--background)); }
.bg-card { background-color: hsl(var(--card)); }
.bg-primary { background-color: hsl(var(--primary)); }
.bg-secondary { background-color: hsl(var(--secondary)); }
.bg-muted { background-color: hsl(var(--muted)); }
.bg-sidebar { background-color: hsl(var(--sidebar-background)); }
.bg-sidebar-accent { background-color: hsl(var(--sidebar-accent)); }
.bg-transparent { background-color: transparent; }
.bg-destructive { background-color: hsl(var(--destructive)); }
.bg-primary\/10 { background-color: hsl(var(--primary) / 0.1); }
.bg-secondary\/10 { background-color: hsl(var(--secondary) / 0.1); }
.bg-muted\/50 { background-color: hsl(var(--muted) / 0.5); }
.bg-muted\/30 { background-color: hsl(var(--muted) / 0.3); }
.bg-info\/10 { background-color: hsl(var(--info) / 0.1); }

.text-foreground { color: hsl(var(--foreground)); }
.text-primary { color: hsl(var(--primary)); }
.text-secondary { color: hsl(var(--secondary)); }
.text-muted-foreground { color: hsl(var(--muted-foreground)); }
.text-primary-foreground { color: hsl(var(--primary-foreground)); }
.text-secondary-foreground { color: hsl(var(--secondary-foreground)); }
.text-sidebar-foreground { color: hsl(var(--sidebar-foreground)); }
.text-sidebar-primary-foreground { color: hsl(var(--sidebar-primary-foreground)); }
.text-sidebar-accent-foreground { color: hsl(var(--sidebar-accent-foreground)); }
.text-sidebar-foreground\/60 { color: hsl(var(--sidebar-foreground) / 0.6); }
.text-sidebar-foreground\/70 { color: hsl(var(--sidebar-foreground) / 0.7); }
.text-info { color: hsl(var(--info)); }
.text-destructive { color: hsl(var(--destructive)); }

.border { border-width: 1px; border-style: solid; }
.border-2 { border-width: 2px; border-style: solid; }
.border-b { border-bottom-width: 1px; border-style: solid; }
.border-t { border-top-width: 1px; border-style: solid; }
.border-border { border-color: hsl(var(--border)); }
.border-input { border-color: hsl(var(--input)); }
.border-sidebar-border { border-color: hsl(var(--sidebar-border)); }
.border-none { border: none; }

.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

.shadow-md { box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08); }
.shadow-lg { box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12); }

.hover\:shadow-md:hover { box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08); }
.hover\:shadow-lg:hover { box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12); }
.hover\:bg-muted:hover { background-color: hsl(var(--muted)); }
.hover\:bg-muted\/30:hover { background-color: hsl(var(--muted) / 0.3); }
.hover\:bg-primary\/90:hover { background-color: hsl(var(--primary) / 0.9); }
.hover\:bg-secondary\/90:hover { background-color: hsl(var(--secondary) / 0.9); }
.hover\:bg-sidebar-accent\/50:hover { background-color: hsl(var(--sidebar-accent) / 0.5); }
.hover\:bg-destructive\/20:hover { background-color: hsl(var(--destructive) / 0.2); }
.hover\:text-foreground:hover { color: hsl(var(--foreground)); }
.hover\:text-destructive:hover { color: hsl(var(--destructive)); }
.hover\:underline:hover { text-decoration: underline; }
.hover\:border-primary:hover { border-color: hsl(var(--primary)); }
.hover\:border-secondary:hover { border-color: hsl(var(--secondary)); }

.transition-all { transition: all 0.2s ease; }
.transition-colors { transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease; }
.transition-shadow { transition: box-shadow 0.2s ease; }
.duration-300 { transition-duration: 0.3s; }

.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.block { display: block; }
.hidden { display: none; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.flex-shrink-0 { flex-shrink: 0; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

.p-2 { padding: 0.5rem; }
.p-2\.5 { padding: 0.625rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }

.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-2\.5 { padding-left: 0.625rem; padding-right: 0.625rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }

.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }

.pt-4 { padding-top: 1rem; }
.mb-1\.5 { margin-bottom: 0.375rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-12 { margin-bottom: 3rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.mx-2 { margin-left: 0.5rem; margin-right: 0.5rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

.w-2 { width: 0.5rem; }
.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-8 { width: 2rem; }
.w-12 { width: 3rem; }
.w-14 { width: 3.5rem; }
.w-16 { width: 4rem; }
.w-48 { width: 12rem; }
.w-64 { width: 16rem; }
.w-full { width: 100%; }

.h-2 { height: 0.5rem; }
.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-8 { height: 2rem; }
.h-12 { height: 3rem; }
.h-14 { height: 3.5rem; }
.h-16 { height: 4rem; }
.h-screen { height: 100vh; }
.min-h-screen { min-height: 100vh; }

.max-w-md { max-width: 28rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-5xl { max-width: 64rem; }

.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-4xl { font-size: 2.25rem; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-sans { font-family: 'DM Sans', sans-serif; }
.font-display { font-family: 'Space Grotesk', sans-serif; }

.uppercase { text-transform: uppercase; }
.tracking-wider { letter-spacing: 0.08em; }

.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }

.divide-y > * + * { border-top-width: 1px; }
.divide-border > * + * { border-color: hsl(var(--border)); }

.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

.outline-none { outline: none; }

.focus\:outline-none:focus { outline: none; }
.focus\:ring-2:focus { box-shadow: 0 0 0 2px hsl(var(--ring)); }
.focus\:ring-ring:focus { box-shadow: 0 0 0 2px hsl(var(--ring)); }

.relative { position: relative; }
.absolute { position: absolute; }
.top-1 { top: 0.25rem; }
.right-1 { right: 0.25rem; }

.text-left { text-align: left; }
.text-center { text-align: center; }

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
  .md\:p-6 { padding: 1.5rem; }
  .md\:block { display: block; }
  .md\:flex { display: flex; }
}

@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Custom minor helpers */
.nav-item { text-decoration: none; }

.subject-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  background: hsl(var(--background));
  min-height: 120px;
}

.subject-item {
  display: inline-flex;
  align-items: center;
  position: relative;
  cursor: pointer;
}

.subject-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.subject-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--muted));
  color: hsl(var(--foreground));
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all 0.2s ease;
  width: 100%;
  text-align: center;
}

.subject-item:hover .subject-pill {
  transform: translateY(-1px);
  border-color: hsl(var(--primary) / 0.4);
}

.subject-input:checked + .subject-pill {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-color: hsl(var(--primary));
  box-shadow: 0 8px 20px hsl(var(--primary) / 0.25);
}
