/* Public UI Redesign - Modern Design System */
/* ! -------------------------------------------- ! */
/* !  Color Variables (adjust to match your brand)  ! */
/* ! -------------------------------------------- ! */

:root {
  --primary: 220 95% 55%;     /* Primary action color */
  --primary-foreground: 0 0% 100%; /* Text on primary */
  --secondary: 210 40% 97%;   /* Secondary backgrounds */
  --secondary-foreground: 222 47% 11%; /* Text on secondary */
  --muted: 210 30% 90%;       /* Muted/secondary text */
  --muted-foreground: 215 20% 45%; /* Secondary text */
  --accent: 30 80% 60%;       /* Accent color */
  --background: 0 0% 100%;    /* Page background */
  --foreground: 222 47% 11%; /* Main text */
  --border: 214 32% 91%;      /* Form borders */
  --input: 215 28% 95%;       /* Input backgrounds */
  --card: 0 0% 100%;          /* Card backgrounds */
  --card-foreground: 222 47% 11%; /* Card text */
  --popover: 0 0% 100%;       /* Popover/modal */
  --popover-foreground: 222 47% 11%; /* Popover text */
  --ring: 220 85% 55%;        /* Focus rings */
  --radius: 0.5rem;           /* Border radius default */
  --radius-sm: 0.375rem;     /* Small radius */
  --radius-lg: 0.75rem;      /* Large radius */
}

/* ! -------------------------------------------- ! */
/* !  Base Reset & Typography                     ! */
/* ! -------------------------------------------- ! */

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  color: hsl(var(--foreground));
  font-weight: 600;
  line-height: 1.3;
}

p, ul, ol, dl {
  line-height: 1.6;
}

/* ! -------------------------------------------- ! */
/* !  Link Styles                                 ! */
/* ! -------------------------------------------- ! */

a {
  color: hsl(var(--primary));
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: hsl(var(--accent));
}

/* ! -------------------------------------------- ! */
/* !  Button Styles                               ! */
/* ! -------------------------------------------- ! */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  outline: none;
}

.btn:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

.btn-primary {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.btn-primary:hover {
  background-color: color-mix(in srgb, hsl(var(--primary)) 80%, black);
}

.btn-secondary {
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  border: 1px solid hsl(var(--border));
}

.btn-secondary:hover {
  background-color: color-mix(in srgb, hsl(var(--secondary)) 80%, black);
}

.btn-ghost {
  background: transparent;
  color: hsl(var(--muted-foreground));
}

.btn-ghost:hover {
  color: hsl(var(--foreground));
  background-color: hsl(var(--muted));
}

/* ! -------------------------------------------- ! */
/* !  Card Styles                                 ! */
/* ! -------------------------------------------- ! */

.card {
  background-color: hsl(var(--card));
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  overflow: hidden;
}

.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid hsl(var(--border));
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
}

.card-body {
  padding: 1.25rem;
}

.card-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid hsl(var(--border));
  background-color: hsl(var(--muted));
}

/* ! -------------------------------------------- ! */
/* !  Input & Form Styles                         ! */
/* ! -------------------------------------------- ! */

.input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: hsl(var(--foreground));
  background-color: hsl(var(--input));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input:focus {
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 3px color-mix(in srgb, hsl(var(--primary)) 15%, transparent);
  outline: none;
}

.input-sm {
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
}

.input-lg {
  padding: 1rem;
  font-size: 1rem;
}

.label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: hsl(var(--muted-foreground));
}

/* ! -------------------------------------------- ! */
/* !  Badge & Tag Styles                          ! */
/* ! -------------------------------------------- ! */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  background-color: color-mix(in srgb, hsl(var(--primary)) 10%, transparent);
  color: hsl(var(--primary));
}

.badge-secondary {
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
}

/* ! -------------------------------------------- ! */
/* !  Nav & Link Utilities                        ! */
/* ! -------------------------------------------- ! */

.nav-link {
  position: relative;
  color: hsl(var(--muted-foreground));
  transition: color 0.2s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: hsl(var(--primary));
  transition: width 0.2s ease;
}

.nav-link:hover {
  color: hsl(var(--foreground));
}

.nav-link:hover::after {
  width: 100%;
}

/* ! -------------------------------------------- ! */
/* !  Utility Helpers                             ! */
/* ! -------------------------------------------- ! */

.bg-primary {
  background-color: hsl(var(--primary));
}

.bg-secondary {
  background-color: hsl(var(--secondary));
}

.bg-muted {
  background-color: hsl(var(--muted));
}

.text-primary {
  color: hsl(var(--primary));
}

.text-secondary {
  color: hsl(var(--secondary));
}

.text-muted {
  color: hsl(var(--muted));
}

.text-muted-foreground {
  color: hsl(var(--muted-foreground));
}

.text-foreground {
  color: hsl(var(--foreground));
}

.border-primary {
  border-color: hsl(var(--primary));
}

.border-secondary {
  border-color: hsl(var(--secondary));
}

.border-muted {
  border-color: hsl(var(--muted));
}

.rounded {
  border-radius: var(--radius);
}

.rounded-sm {
  border-radius: var(--radius-sm);
}

.rounded-lg {
  border-radius: var(--radius-lg);
}

.shadow-sm {
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.shadow {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.shadow-lg {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* ! -------------------------------------------- ! */
/* !  Responsive Utilities                        ! */
/* ! -------------------------------------------- ! */

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

@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
}

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

/* ! -------------------------------------------- ! */
/* !  Focus States                                ! */
/* ! -------------------------------------------- ! */

*:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

/* ! -------------------------------------------- ! */
/* !  Reduced Motion                              ! */
/* ! -------------------------------------------- ! */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0s !important;
    transition-duration: 0s !important;
  }
}