/* =============================================================================
   DAZZLE Semantic Layer
   Thin aliases on top of DaisyUI (loaded via CDN) + Tailwind
   DO NOT EDIT - regenerate using dazzle init or dazzle serve
   ============================================================================= */

/* --- dazzle-layer.css --- */
/* =============================================================================
   DAZZLE Semantic Layer

   Thin semantic aliases on top of DaisyUI + Tailwind.
   This layer provides:
   1. App shell structure (.dz-app, .dz-app__main)
   2. Semantic workspace/panel classes
   3. Custom semantic attributes for LLM-readability

   DaisyUI provides: btn, input, select, table, card, alert, badge, loading, etc.
   Tailwind provides: flex, grid, gap-*, p-*, m-*, text-*, bg-base-*, etc.
   ============================================================================= */

/* =============================================================================
   App Shell - Root layout structure
   ============================================================================= */

#app,
.dz-app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.dz-app__header {
  /* Use DaisyUI navbar inside this */
}

.dz-app__main {
  flex: 1;
  padding: 1.5rem;
  max-width: 80rem;
  margin: 0 auto;
  width: 100%;
}

@media (min-width: 640px) {
  .dz-app__main {
    padding: 2rem;
  }
}

@media (min-width: 1024px) {
  .dz-app__main {
    padding: 2.5rem 3rem;
  }
}

.dz-app__sidebar {
  /* Use DaisyUI drawer inside this */
}

.dz-app__footer {
  /* Use DaisyUI footer inside this */
}

/* =============================================================================
   Workspace Semantic Classes

   These provide semantic meaning for LLM operations while
   leveraging DaisyUI/Tailwind for actual styling.
   ============================================================================= */

/* Workspace container - a logical grouping of related UI */
.dz-workspace {
  /* Typically a DaisyUI card or just a container */
}

/* Metric card - for displaying KPIs/stats */
.dz-metric-card {
  /* Use DaisyUI stats component */
}

/* List panel - for entity listings */
.dz-list-panel {
  /* Use DaisyUI card + table */
}

/* Detail panel - for entity detail views */
.dz-detail-panel {
  /* Use DaisyUI card */
}

/* Form panel - for create/edit forms */
.dz-form-panel {
  /* Use DaisyUI card + form elements */
}

/* =============================================================================
   Semantic Label Component

   For form labels - extends DaisyUI's label
   ============================================================================= */

.dz-field-label {
  font-weight: 500;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
  display: block;
}

.dz-field-label--required::after {
  content: " *";
  color: oklch(var(--er));
}

/* =============================================================================
   Text Utilities (semantic variants)
   ============================================================================= */

.dz-text-muted {
  opacity: 0.7;
}

.dz-text-label {
  font-weight: 500;
  font-size: 0.875rem;
}

/* =============================================================================
   Semantic Data Attributes

   These are used by the DNR system for semantic DOM identification.
   They don't provide styling but enable LLM/automation to understand the UI.

   [data-dazzle-entity]    - Entity name (e.g., "Task")
   [data-dazzle-field]     - Field identifier (e.g., "Task.title")
   [data-dazzle-action]    - Action identifier (e.g., "Task.create")
   [data-dazzle-view]      - View name (e.g., "task_list")
   [data-dazzle-form]      - Form entity
   [data-dazzle-table]     - Table entity
   ============================================================================= */

/* Optional: subtle visual indicators for dev mode */
[data-dazzle-entity]:hover {
  /* outline: 1px dashed oklch(var(--p) / 0.3); */
}

/* =============================================================================
   Additional Utility Classes (Design System v0.22.0)
   ============================================================================= */

/* Ghost button variant with muted text */
.dz-btn-ghost {
  background: transparent;
  border: none;
  box-shadow: none;
  color: hsl(var(--muted-foreground, 240 3.8% 46.1%));
}

.dz-btn-ghost:hover {
  background: hsl(var(--accent, 240 4.8% 95.9%));
  color: hsl(var(--accent-foreground, 240 5.9% 10%));
}

/* Link-style button */
.dz-btn-link {
  background: transparent;
  border: none;
  box-shadow: none;
  color: hsl(var(--primary, 240 5.9% 10%));
  text-decoration: underline;
  text-underline-offset: 4px;
}

.dz-btn-link:hover {
  text-decoration-thickness: 2px;
}

/* Form field label matching spec */
.dz-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--foreground, 240 10% 3.9%));
  margin-bottom: 0.375rem;
  display: block;
}

/* Improved empty state */
.dz-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 12rem;
}

.dz-empty-state h3 {
  font-weight: 600;
  color: hsl(var(--foreground, 240 10% 3.9%));
  margin-bottom: 0.25rem;
}

.dz-empty-state p {
  color: hsl(var(--muted-foreground, 240 3.8% 46.1%));
  font-size: 0.875rem;
}


/* --- site-sections.css --- */
/* =============================================================================
   DAZZLE Site Sections

   Styles for SiteSpec page sections (hero, features, pricing, FAQ, etc.)
   Uses CSS custom properties from the theme system.
   ============================================================================= */

/* =============================================================================
   Hero Section
   ============================================================================= */

.dz-section-hero {
  background: linear-gradient(135deg, var(--dz-hero-bg-from) 0%, var(--dz-hero-bg-to) 100%);
  color: white;
  padding: var(--dz-spacing-hero-y, 6rem) 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.dz-section-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 70%, oklch(1 0 0 / 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.dz-section-hero__content {
  max-width: 48rem;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.dz-section-hero__headline {
  font-size: var(--dz-font-size-hero-headline, 3.5rem);
  font-weight: var(--dz-font-weight-hero-headline, 800);
  line-height: var(--dz-line-height-hero-headline, 1.1);
  letter-spacing: var(--dz-letter-spacing-hero-headline, -0.02em);
  margin: 0 0 1.5rem;
}

.dz-section-hero__subhead {
  font-size: var(--dz-font-size-subhead, 1.25rem);
  line-height: var(--dz-line-height-subhead, 1.5);
  opacity: 0.9;
  margin: 0 0 2rem;
}

.dz-section-hero__cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.dz-section-hero__cta .btn-primary {
  background: white;
  color: var(--dz-hero-bg-from);
  border: none;
  font-weight: 600;
  padding: 0.875rem 2rem;
  border-radius: var(--dz-radius-button, 0.5rem);
  box-shadow: var(--dz-shadow-hero);
  transition: transform var(--dz-transition-fast, 150ms), box-shadow var(--dz-transition-fast, 150ms);
}

.dz-section-hero__cta .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 30px 60px -12px oklch(0 0 0 / 0.3);
}

.dz-section-hero__cta .btn-secondary {
  background: transparent;
  color: white;
  border: 2px solid oklch(1 0 0 / 0.4);
  padding: 0.875rem 2rem;
  border-radius: var(--dz-radius-button, 0.5rem);
}

.dz-section-hero__cta .btn-secondary:hover {
  background: oklch(1 0 0 / 0.1);
  border-color: oklch(1 0 0 / 0.6);
}

/* Hero with Media Image */
.dz-hero-with-media .dz-section-content {
  display: flex;
  align-items: center;
  gap: 3rem;
  text-align: left;
}

.dz-hero-text {
  flex: 1;
}

.dz-hero-with-media .dz-cta-group {
  justify-content: flex-start;
}

.dz-hero-media {
  flex: 1;
  max-width: 50%;
}

.dz-hero-image {
  width: 100%;
  height: auto;
  border-radius: var(--dz-radius-lg, 1rem);
  box-shadow: var(--dz-shadow-xl, 0 20px 50px -12px oklch(0 0 0 / 0.3));
}

@media (max-width: 768px) {
  .dz-hero-with-media .dz-section-content {
    flex-direction: column;
    text-align: center;
  }

  .dz-hero-with-media .dz-cta-group {
    justify-content: center;
  }

  .dz-hero-media {
    max-width: 100%;
    order: -1;
  }
}

/* =============================================================================
   Features Section
   ============================================================================= */

.dz-section-features {
  padding: var(--dz-spacing-section-y, 5rem) 1.5rem;
  background: var(--p, oklch(0.99 0 0));
}

.dz-section-features__header {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 3rem;
}

.dz-section-features__headline {
  font-size: var(--dz-font-size-section-headline, 2.25rem);
  font-weight: var(--dz-font-weight-section-headline, 700);
  line-height: var(--dz-line-height-section-headline, 1.2);
  letter-spacing: var(--dz-letter-spacing-section-headline, -0.01em);
  margin: 0 0 1rem;
}

.dz-section-features__subhead {
  font-size: var(--dz-font-size-body, 1rem);
  line-height: var(--dz-line-height-body, 1.6);
  color: oklch(0.5 0 0);
}

.dz-section-features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--dz-spacing-feature-gap, 2rem);
  max-width: 72rem;
  margin: 0 auto;
}

.dz-feature-card {
  padding: var(--dz-spacing-card-padding, 1.5rem);
  background: white;
  border-radius: var(--dz-radius-card, 0.75rem);
  box-shadow: var(--dz-shadow-card);
  transition: transform var(--dz-transition-fast, 150ms), box-shadow var(--dz-transition-fast, 150ms);
}

.dz-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--dz-shadow-lg);
}

.dz-feature-card__icon {
  width: 3rem;
  height: 3rem;
  background: var(--dz-feature-icon-bg, oklch(0.92 0.03 260));
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--dz-hero-bg-from);
}

.dz-feature-card__title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.dz-feature-card__body {
  font-size: var(--dz-font-size-body, 1rem);
  line-height: var(--dz-line-height-body, 1.6);
  color: oklch(0.45 0 0);
  margin: 0;
}

/* =============================================================================
   Pricing Section
   ============================================================================= */

.dz-section-pricing {
  padding: var(--dz-spacing-section-y, 5rem) 1.5rem;
  background: var(--dz-section-alt-bg, oklch(0.97 0.01 260));
}

.dz-section-pricing__header {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 3rem;
}

.dz-section-pricing__headline {
  font-size: var(--dz-font-size-section-headline, 2.25rem);
  font-weight: var(--dz-font-weight-section-headline, 700);
  margin: 0 0 1rem;
}

.dz-section-pricing__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 64rem;
  margin: 0 auto;
}

.dz-pricing-card {
  background: white;
  border-radius: var(--dz-radius-card, 0.75rem);
  padding: 2rem;
  box-shadow: var(--dz-shadow-card);
  display: flex;
  flex-direction: column;
  transition: transform var(--dz-transition-fast, 150ms);
}

.dz-pricing-card--highlighted {
  background: var(--dz-pricing-highlight-bg, oklch(0.45 0.18 270));
  color: white;
  transform: scale(1.05);
  box-shadow: var(--dz-shadow-lg);
}

.dz-pricing-card:hover:not(.dz-pricing-card--highlighted) {
  transform: translateY(-4px);
}

.dz-pricing-card__name {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.dz-pricing-card__price {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
}

.dz-pricing-card__period {
  font-size: 0.875rem;
  opacity: 0.7;
  margin: 0 0 1.5rem;
}

.dz-pricing-card__features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  flex: 1;
}

.dz-pricing-card__features li {
  padding: 0.5rem 0;
  border-bottom: 1px solid oklch(0 0 0 / 0.1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dz-pricing-card--highlighted .dz-pricing-card__features li {
  border-color: oklch(1 0 0 / 0.2);
}

.dz-pricing-card__features li::before {
  content: '✓';
  font-weight: 600;
  color: oklch(0.55 0.18 150);
}

.dz-pricing-card--highlighted .dz-pricing-card__features li::before {
  color: oklch(0.85 0.15 150);
}

.dz-pricing-card__cta {
  margin-top: auto;
}

/* =============================================================================
   FAQ Section
   ============================================================================= */

.dz-section-faq {
  padding: var(--dz-spacing-section-y, 5rem) 1.5rem;
}

.dz-section-faq__header {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 3rem;
}

.dz-section-faq__headline {
  font-size: var(--dz-font-size-section-headline, 2.25rem);
  font-weight: var(--dz-font-weight-section-headline, 700);
  margin: 0 0 1rem;
}

.dz-section-faq__list {
  max-width: 48rem;
  margin: 0 auto;
}

.dz-faq-item {
  border-bottom: 1px solid oklch(0 0 0 / 0.1);
}

.dz-faq-item__question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
  cursor: pointer;
  font-weight: 500;
  font-size: 1.125rem;
}

.dz-faq-item__question::after {
  content: '+';
  font-size: 1.5rem;
  color: oklch(0.5 0 0);
  transition: transform var(--dz-transition-fast, 150ms);
}

.dz-faq-item--open .dz-faq-item__question::after {
  transform: rotate(45deg);
}

.dz-faq-item__answer {
  padding: 0 0 1.25rem;
  color: oklch(0.4 0 0);
  line-height: var(--dz-line-height-body, 1.6);
  display: none;
}

.dz-faq-item--open .dz-faq-item__answer {
  display: block;
}

/* =============================================================================
   Testimonials Section
   ============================================================================= */

.dz-section-testimonials {
  padding: var(--dz-spacing-section-y, 5rem) 1.5rem;
  background: var(--dz-section-alt-bg, oklch(0.97 0.01 260));
}

.dz-section-testimonials__header {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 3rem;
}

.dz-section-testimonials__headline {
  font-size: var(--dz-font-size-section-headline, 2.25rem);
  font-weight: var(--dz-font-weight-section-headline, 700);
  margin: 0 0 1rem;
}

.dz-section-testimonials__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  max-width: 64rem;
  margin: 0 auto;
}

.dz-testimonial-card {
  background: white;
  border-radius: var(--dz-radius-card, 0.75rem);
  padding: 1.5rem;
  box-shadow: var(--dz-shadow-card);
}

.dz-testimonial-card__quote {
  font-size: 1rem;
  line-height: var(--dz-line-height-body, 1.6);
  color: oklch(0.35 0 0);
  margin: 0 0 1rem;
  font-style: italic;
}

.dz-testimonial-card__author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dz-testimonial-card__avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--dz-feature-icon-bg, oklch(0.92 0.03 260));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--dz-hero-bg-from);
}

.dz-testimonial-card__name {
  font-weight: 600;
  font-size: 0.875rem;
}

.dz-testimonial-card__role {
  font-size: 0.75rem;
  color: oklch(0.5 0 0);
}

/* =============================================================================
   Stats Section
   ============================================================================= */

.dz-section-stats {
  padding: var(--dz-spacing-section-y, 5rem) 1.5rem;
  background: linear-gradient(135deg, var(--dz-hero-bg-from) 0%, var(--dz-hero-bg-to) 100%);
  color: white;
}

.dz-section-stats__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2rem;
  max-width: 64rem;
  margin: 0 auto;
  text-align: center;
}

.dz-stat {
  padding: 1rem;
}

.dz-stat__value {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  margin: 0 0 0.5rem;
}

.dz-stat__label {
  font-size: 1rem;
  opacity: 0.8;
}

/* =============================================================================
   CTA Section
   ============================================================================= */

.dz-section-cta {
  padding: var(--dz-spacing-section-y, 5rem) 1.5rem;
  background: var(--dz-section-alt-bg, oklch(0.97 0.01 260));
  text-align: center;
}

.dz-section-cta__content {
  max-width: 40rem;
  margin: 0 auto;
}

.dz-section-cta__headline {
  font-size: var(--dz-font-size-section-headline, 2.25rem);
  font-weight: var(--dz-font-weight-section-headline, 700);
  margin: 0 0 1rem;
}

.dz-section-cta__subhead {
  font-size: var(--dz-font-size-body, 1rem);
  line-height: var(--dz-line-height-body, 1.6);
  color: oklch(0.45 0 0);
  margin: 0 0 2rem;
}

/* =============================================================================
   Steps Section
   ============================================================================= */

.dz-section-steps {
  padding: var(--dz-spacing-section-y, 5rem) 1.5rem;
}

.dz-section-steps__header {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 3rem;
}

.dz-section-steps__headline {
  font-size: var(--dz-font-size-section-headline, 2.25rem);
  font-weight: var(--dz-font-weight-section-headline, 700);
  margin: 0 0 1rem;
}

.dz-section-steps__list {
  max-width: 48rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.dz-step {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.dz-step__number {
  width: 3rem;
  height: 3rem;
  background: var(--dz-hero-bg-from);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.dz-step__content {
  flex: 1;
}

.dz-step__title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.dz-step__body {
  font-size: var(--dz-font-size-body, 1rem);
  line-height: var(--dz-line-height-body, 1.6);
  color: oklch(0.45 0 0);
  margin: 0;
}

/* =============================================================================
   Logo Cloud Section
   ============================================================================= */

.dz-section-logo-cloud {
  padding: var(--dz-spacing-section-y, 5rem) 1.5rem;
  background: var(--dz-section-alt-bg, oklch(0.97 0.01 260));
  text-align: center;
}

.dz-section-logo-cloud__headline {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: oklch(0.5 0 0);
  margin: 0 0 2rem;
}

.dz-section-logo-cloud__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 3rem;
  max-width: 64rem;
  margin: 0 auto;
}

.dz-section-logo-cloud__logo {
  height: 2rem;
  opacity: 0.6;
  filter: grayscale(100%);
  transition: opacity var(--dz-transition-fast, 150ms), filter var(--dz-transition-fast, 150ms);
}

.dz-section-logo-cloud__logo:hover {
  opacity: 1;
  filter: grayscale(0%);
}

/* =============================================================================
   Dark Mode Adjustments
   ============================================================================= */

/* Site Header */
[data-theme="dark"] .dz-site-header {
  background: oklch(0.15 0.01 260 / 0.95);
  border-color: oklch(1 0 0 / 0.1);
}

[data-theme="dark"] .dz-site-logo {
  color: oklch(0.95 0 0);
}

[data-theme="dark"] .dz-nav-link {
  color: oklch(0.7 0 0);
}

[data-theme="dark"] .dz-nav-link:hover {
  color: oklch(0.95 0 0);
}

/* Theme Toggle Button */
.dz-theme-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.375rem;
  color: oklch(0.4 0 0);
  transition: color var(--dz-transition-fast, 150ms), background var(--dz-transition-fast, 150ms);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dz-theme-toggle:hover {
  color: oklch(0.15 0 0);
  background: oklch(0 0 0 / 0.05);
}

[data-theme="dark"] .dz-theme-toggle {
  color: oklch(0.7 0 0);
}

[data-theme="dark"] .dz-theme-toggle:hover {
  color: oklch(0.95 0 0);
  background: oklch(1 0 0 / 0.1);
}

.dz-theme-toggle__icon {
  width: 1.25rem;
  height: 1.25rem;
}

/* Show sun icon by default (for dark mode), hide moon */
.dz-theme-toggle__sun { display: none; }
.dz-theme-toggle__moon { display: block; }

/* In dark mode, show sun, hide moon */
[data-theme="dark"] .dz-theme-toggle__sun { display: block; }
[data-theme="dark"] .dz-theme-toggle__moon { display: none; }

/* Section backgrounds */
[data-theme="dark"] .dz-section-features,
[data-theme="dark"] .dz-section-faq,
[data-theme="dark"] .dz-section-steps {
  background: oklch(0.12 0.01 260);
}

[data-theme="dark"] .dz-section-pricing,
[data-theme="dark"] .dz-section-testimonials,
[data-theme="dark"] .dz-section-logo-cloud,
[data-theme="dark"] .dz-section-cta {
  background: oklch(0.08 0.01 260);
}

/* Cards and items */
[data-theme="dark"] .dz-feature-card,
[data-theme="dark"] .dz-pricing-card:not(.dz-pricing-card--highlighted),
[data-theme="dark"] .dz-testimonial-card,
[data-theme="dark"] .dz-feature-item,
[data-theme="dark"] .dz-testimonial-item,
[data-theme="dark"] .dz-pricing-tier:not(.dz-pricing-highlighted) {
  background: oklch(0.18 0.01 260);
}

/* Text colors */
[data-theme="dark"] .dz-section-features__headline,
[data-theme="dark"] .dz-section-pricing__headline,
[data-theme="dark"] .dz-section-faq__headline,
[data-theme="dark"] .dz-section-testimonials__headline,
[data-theme="dark"] .dz-section-cta__headline,
[data-theme="dark"] .dz-section-steps__headline,
[data-theme="dark"] .dz-section h2,
[data-theme="dark"] .dz-feature-card__title,
[data-theme="dark"] .dz-feature-item h3,
[data-theme="dark"] .dz-step__title,
[data-theme="dark"] .dz-step-item h3,
[data-theme="dark"] .dz-faq-item__question,
[data-theme="dark"] .dz-faq-item summary,
[data-theme="dark"] .dz-pricing-card__name,
[data-theme="dark"] .dz-pricing-tier h3 {
  color: oklch(0.95 0 0);
}

[data-theme="dark"] .dz-section-features__subhead,
[data-theme="dark"] .dz-feature-card__body,
[data-theme="dark"] .dz-feature-item p,
[data-theme="dark"] .dz-section-cta__subhead,
[data-theme="dark"] .dz-step__body,
[data-theme="dark"] .dz-step-item p,
[data-theme="dark"] .dz-testimonial-card__quote,
[data-theme="dark"] .dz-testimonial-item blockquote,
[data-theme="dark"] .dz-faq-item p {
  color: oklch(0.65 0 0);
}

/* FAQ borders */
[data-theme="dark"] .dz-faq-item {
  border-color: oklch(1 0 0 / 0.1);
}

[data-theme="dark"] .dz-faq-item__answer {
  color: oklch(0.65 0 0);
}

/* Auth pages - works with both DaisyUI card and legacy dz-auth-card */
[data-theme="dark"] .dz-auth-card {
  background: oklch(0.18 0.01 260);
}

[data-theme="dark"] .dz-auth-card h1,
[data-theme="dark"] .dz-auth-card .card-title,
[data-theme="dark"] .dz-auth-field label,
[data-theme="dark"] .dz-auth-card .label-text {
  color: oklch(0.9 0 0);
}

[data-theme="dark"] .dz-auth-field input,
[data-theme="dark"] .dz-auth-card .input {
  background: oklch(0.12 0.01 260);
  border-color: oklch(1 0 0 / 0.15);
  color: oklch(0.95 0 0);
}

[data-theme="dark"] .dz-auth-switch {
  color: oklch(0.6 0 0);
}

/* Prose/markdown content */
[data-theme="dark"] .dz-prose {
  color: oklch(0.85 0 0);
}

[data-theme="dark"] .dz-prose h1,
[data-theme="dark"] .dz-prose h2,
[data-theme="dark"] .dz-prose h3 {
  color: oklch(0.95 0 0);
}

/* Logo cloud */
[data-theme="dark"] .dz-section-logo-cloud__headline {
  color: oklch(0.6 0 0);
}

[data-theme="dark"] .dz-section-logo-cloud__logo,
[data-theme="dark"] .dz-logo-item img {
  filter: grayscale(100%) invert(1);
  opacity: 0.5;
}

[data-theme="dark"] .dz-section-logo-cloud__logo:hover,
[data-theme="dark"] .dz-logo-item:hover img {
  filter: grayscale(0%) invert(1);
  opacity: 0.8;
}

/* Buttons - works with both DaisyUI btn and legacy dz-btn classes */
[data-theme="dark"] .dz-btn-secondary,
[data-theme="dark"] .btn-outline {
  color: oklch(0.85 0 0);
  border-color: oklch(0.85 0 0);
}

[data-theme="dark"] .dz-btn-secondary:hover,
[data-theme="dark"] .btn-outline:hover {
  background: oklch(1 0 0 / 0.1);
}

/* =============================================================================
   Responsive Adjustments
   ============================================================================= */

@media (max-width: 768px) {
  .dz-section-hero__headline {
    font-size: 2.5rem;
  }

  .dz-section-hero__cta {
    flex-direction: column;
    align-items: center;
  }

  .dz-section-features__headline,
  .dz-section-pricing__headline,
  .dz-section-faq__headline,
  .dz-section-testimonials__headline,
  .dz-section-cta__headline,
  .dz-section-steps__headline {
    font-size: 1.75rem;
  }

  .dz-pricing-card--highlighted {
    transform: none;
  }

  .dz-stat__value {
    font-size: 2.25rem;
  }
}

/* =============================================================================
   Site Layout - Header, Footer, Nav
   ============================================================================= */

.dz-site {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.dz-site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: oklch(1 0 0 / 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid oklch(0 0 0 / 0.08);
}

.dz-site-nav {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.dz-site-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: oklch(0.25 0.02 260);
  text-decoration: none;
}

.dz-nav-items {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.dz-nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: oklch(0.4 0 0);
  text-decoration: none;
  transition: color var(--dz-transition-fast, 150ms);
}

.dz-nav-link:hover {
  color: oklch(0.15 0 0);
}

.dz-nav-cta {
  font-size: 0.875rem;
  font-weight: 600;
  color: white;
  background: var(--dz-hero-bg-from, oklch(0.50 0.18 270));
  padding: 0.5rem 1rem;
  border-radius: var(--dz-radius-button, 0.375rem);
  text-decoration: none;
  transition: background var(--dz-transition-fast, 150ms);
}

.dz-nav-cta:hover {
  background: var(--dz-hero-bg-to, oklch(0.45 0.18 270));
}

.dz-site-footer {
  margin-top: auto;
  background: oklch(0.15 0.01 260);
  color: oklch(0.7 0 0);
  padding: 3rem 1.5rem 1.5rem;
}

.dz-footer-content {
  max-width: 72rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.dz-footer-col h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: white;
  margin: 0 0 1rem;
}

.dz-footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dz-footer-col li {
  margin-bottom: 0.5rem;
}

.dz-footer-col a {
  font-size: 0.875rem;
  color: oklch(0.6 0 0);
  text-decoration: none;
  transition: color var(--dz-transition-fast, 150ms);
}

.dz-footer-col a:hover {
  color: white;
}

.dz-footer-bottom {
  max-width: 72rem;
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid oklch(1 0 0 / 0.1);
  text-align: center;
}

.dz-footer-bottom p {
  font-size: 0.75rem;
  margin: 0;
}

/* =============================================================================
   Auth Pages (Login/Signup)
   ============================================================================= */

.dz-auth-page {
  background: linear-gradient(135deg, var(--dz-hero-bg-from, oklch(0.50 0.18 270)) 0%, var(--dz-hero-bg-to, oklch(0.45 0.18 270)) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1rem;
}

.dz-auth-container {
  width: 100%;
  max-width: 24rem;
}

.dz-auth-card {
  background: white;
  border-radius: var(--dz-radius-lg, 0.75rem);
  padding: 2rem;
  box-shadow: var(--dz-shadow-xl, 0 20px 50px -12px oklch(0 0 0 / 0.25));
  text-align: center;
}

.dz-auth-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dz-hero-bg-from, oklch(0.50 0.18 270));
  text-decoration: none;
  display: inline-block;
  margin-bottom: 1.5rem;
}

.dz-auth-card h1 {
  font-size: 1.5rem;
  font-weight: 600;
  color: oklch(0.15 0 0);
  margin: 0 0 1.5rem;
}

.dz-auth-error {
  background: oklch(0.95 0.03 25);
  color: oklch(0.45 0.15 25);
  padding: 0.75rem 1rem;
  border-radius: var(--dz-radius-sm, 0.375rem);
  font-size: 0.875rem;
  margin-bottom: 1rem;
  text-align: left;
}

.dz-auth-error.hidden {
  display: none;
}

#dz-auth-form {
  text-align: left;
}

.dz-auth-field {
  margin-bottom: 1rem;
}

.dz-auth-field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: oklch(0.35 0 0);
  margin-bottom: 0.375rem;
}

/* NOTE: Auth form fields now use DaisyUI input input-bordered classes */
/* These styles kept for backwards compatibility */
.dz-auth-field input {
  width: 100%;
  padding: 0.625rem 0.75rem;
  font-size: 1rem;
  border: 1px solid oklch(0 0 0 / 0.15);
  border-radius: var(--dz-radius-sm, 0.375rem);
  transition: border-color var(--dz-transition-fast, 150ms), box-shadow var(--dz-transition-fast, 150ms);
  box-sizing: border-box;
}

.dz-auth-field input:focus {
  outline: none;
  border-color: var(--dz-hero-bg-from, oklch(0.50 0.18 270));
  box-shadow: 0 0 0 3px oklch(0.50 0.18 270 / 0.15);
}

/* NOTE: .dz-btn-full replaced by Tailwind w-full class */

/* Auth page primary button - ensure visibility with DaisyUI + Tailwind Browser */
.dz-auth-card .btn-primary,
.dz-auth-card .btn.btn-primary {
  background: var(--dz-hero-bg-from, oklch(0.50 0.18 270));
  color: white;
  border: none;
}

.dz-auth-card .btn-primary:hover,
.dz-auth-card .btn.btn-primary:hover {
  background: var(--dz-hero-bg-to, oklch(0.45 0.18 270));
}

.dz-auth-switch {
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: oklch(0.5 0 0);
}

.dz-auth-switch a {
  color: var(--dz-hero-bg-from, oklch(0.50 0.18 270));
  text-decoration: none;
  font-weight: 500;
}

.dz-auth-switch a:hover {
  text-decoration: underline;
}

/* =============================================================================
   Button Styles for Site Pages

   NOTE: Most button styling is now handled by DaisyUI btn classes (btn, btn-primary, etc.)
   These are kept for backwards compatibility and site-specific overrides.
   ============================================================================= */

/* Hero section CTA buttons need special styling to stand out on gradient background */
.dz-section-hero .btn-primary {
  background: white;
  color: var(--dz-hero-bg-from, oklch(0.50 0.18 270));
  border: none;
}

.dz-section-hero .btn-primary:hover {
  background: oklch(0.98 0 0);
  transform: translateY(-2px);
}

.dz-section-hero .btn-secondary,
.dz-section-hero .btn-outline {
  background: transparent;
  color: white;
  border-color: oklch(1 0 0 / 0.5);
}

.dz-section-hero .btn-secondary:hover,
.dz-section-hero .btn-outline:hover {
  background: oklch(1 0 0 / 0.1);
  border-color: oklch(1 0 0 / 0.7);
}

/* =============================================================================
   Site Page Sections (JS-rendered)
   ============================================================================= */

.dz-section {
  width: 100%;
}

.dz-section-content {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.dz-section h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 1.5rem;
}

.dz-section h2 {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 2rem;
  text-align: center;
}

.dz-subhead {
  font-size: 1.25rem;
  line-height: 1.6;
  opacity: 0.9;
  margin: 0 0 2rem;
}

.dz-cta-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.dz-features-grid,
.dz-pricing-grid,
.dz-testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.dz-feature-item,
.dz-testimonial-item {
  background: white;
  padding: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px oklch(0 0 0 / 0.1);
}

.dz-feature-item h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0.5rem 0;
}

.dz-feature-item p {
  color: oklch(0.45 0 0);
  margin: 0;
  line-height: 1.6;
}

.dz-feature-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.dz-faq-list {
  max-width: 48rem;
  margin: 0 auto;
}

.dz-faq-item {
  border-bottom: 1px solid oklch(0 0 0 / 0.1);
  padding: 1rem 0;
}

.dz-faq-item summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.dz-faq-item summary::-webkit-details-marker {
  display: none;
}

.dz-faq-item p {
  margin: 0.75rem 0 0;
  color: oklch(0.45 0 0);
  line-height: 1.6;
}

.dz-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 2rem;
  text-align: center;
}

.dz-stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  display: block;
}

.dz-stat-label {
  font-size: 0.875rem;
  opacity: 0.8;
}

.dz-steps-list {
  max-width: 48rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.dz-step-item {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.dz-step-number {
  width: 3rem;
  height: 3rem;
  background: var(--dz-hero-bg-from);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.dz-step-item h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.dz-step-item p {
  color: oklch(0.45 0 0);
  margin: 0;
  line-height: 1.6;
}

.dz-logos-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3rem;
  align-items: center;
}

.dz-logo-item img {
  height: 2rem;
  opacity: 0.6;
  filter: grayscale(100%);
  transition: all 150ms;
}

.dz-logo-item:hover img {
  opacity: 1;
  filter: grayscale(0%);
}

.dz-pricing-tier {
  background: white;
  padding: 2rem;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px oklch(0 0 0 / 0.1);
  display: flex;
  flex-direction: column;
}

.dz-pricing-tier h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.dz-pricing-price {
  margin: 0 0 1.5rem;
}

.dz-price {
  font-size: 2.5rem;
  font-weight: 700;
}

.dz-period {
  font-size: 0.875rem;
  color: oklch(0.5 0 0);
}

.dz-pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  flex: 1;
}

.dz-pricing-features li {
  padding: 0.5rem 0;
  border-bottom: 1px solid oklch(0 0 0 / 0.08);
}

.dz-pricing-highlighted {
  background: var(--dz-hero-bg-from);
  color: white;
  transform: scale(1.05);
}

.dz-pricing-highlighted .dz-period,
.dz-pricing-highlighted li {
  color: oklch(1 0 0 / 0.8);
  border-color: oklch(1 0 0 / 0.15);
}

.dz-testimonial-item blockquote {
  font-style: italic;
  color: oklch(0.35 0 0);
  margin: 0 0 1rem;
  line-height: 1.6;
}

.dz-testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dz-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
}

.dz-testimonial-author strong {
  display: block;
  font-size: 0.875rem;
}

.dz-testimonial-author span {
  display: block;
  font-size: 0.75rem;
  color: oklch(0.5 0 0);
}

.dz-prose {
  max-width: 48rem;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.dz-prose h1, .dz-prose h2, .dz-prose h3 {
  text-align: left;
}

.dz-loading {
  text-align: center;
  padding: 4rem;
  color: oklch(0.5 0 0);
}

.dz-error {
  text-align: center;
  padding: 2rem;
  color: oklch(0.5 0.15 25);
}


/* --- design-system.css --- */
/* =============================================================================
   DAZZLE Design System

   Shadcn/ui-inspired design tokens and component overrides for DaisyUI.
   Achieves visual parity with shadcn/ui while keeping DaisyUI's component classes.

   Sections:
   1. Design Tokens (CSS custom properties)
   2. DaisyUI Theme Bridge
   3. Typography
   4. Global Refinements
   5. Component Overrides
   6. Loading States & Animations
   7. Responsive Refinements

   Note: CSS custom properties (--dz-*) are generated from ThemeSpec
   by the theme system (v0.16.0). See src/dazzle_dnr_ui/themes/presets.py
   ============================================================================= */

/* =============================================================================
   1. Design Tokens — Light Mode (default)

   HSL-based colour palette inspired by shadcn/ui zinc theme.
   ============================================================================= */

:root {
  /* --- Colour tokens (HSL values) --- */
  --background: 0 0% 100%;
  --foreground: 240 10% 3.9%;

  --card: 0 0% 100%;
  --card-foreground: 240 10% 3.9%;

  --popover: 0 0% 100%;
  --popover-foreground: 240 10% 3.9%;

  --primary: 240 5.9% 10%;
  --primary-foreground: 0 0% 98%;

  --secondary: 240 4.8% 95.9%;
  --secondary-foreground: 240 5.9% 10%;

  --muted: 240 4.8% 95.9%;
  --muted-foreground: 240 3.8% 46.1%;

  --accent: 240 4.8% 95.9%;
  --accent-foreground: 240 5.9% 10%;

  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 0 0% 98%;

  --border: 240 5.9% 90%;
  --input: 240 5.9% 90%;
  --ring: 240 5.9% 10%;

  --success: 142 76% 36%;
  --success-foreground: 0 0% 98%;

  --warning: 38 92% 50%;
  --warning-foreground: 0 0% 98%;

  --info: 217 91% 60%;
  --info-foreground: 0 0% 98%;

  /* --- Typography --- */
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, 'Cascadia Code', monospace;

  /* --- Spacing scale --- */
  --space-0: 0;
  --space-0-5: 0.125rem;
  --space-1: 0.25rem;
  --space-1-5: 0.375rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;

  /* --- Border radius --- */
  --radius-sm: 0.25rem;
  --radius: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.625rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-full: 9999px;

  /* --- Shadows (zinc-tinted) --- */
  --shadow-xs: 0 1px 2px 0 hsl(240 5.9% 10% / 0.03);
  --shadow-sm: 0 1px 3px 0 hsl(240 5.9% 10% / 0.06), 0 1px 2px -1px hsl(240 5.9% 10% / 0.06);
  --shadow-md: 0 4px 6px -1px hsl(240 5.9% 10% / 0.07), 0 2px 4px -2px hsl(240 5.9% 10% / 0.05);
  --shadow-lg: 0 10px 15px -3px hsl(240 5.9% 10% / 0.07), 0 4px 6px -4px hsl(240 5.9% 10% / 0.05);
  --shadow-xl: 0 20px 25px -5px hsl(240 5.9% 10% / 0.08), 0 8px 10px -6px hsl(240 5.9% 10% / 0.05);

  /* --- Transitions --- */
  --duration-fast: 150ms;
  --duration-normal: 200ms;
  --duration-slow: 300ms;
  --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);

  /* --- Legacy --dz-* tokens (backward compat) --- */
  --dz-shadow-sm: var(--shadow-sm);
  --dz-shadow-card: var(--shadow-sm);
  --dz-shadow-md: var(--shadow-md);
  --dz-shadow-lg: var(--shadow-lg);
  --dz-transition-fast: var(--duration-fast);
  --dz-transition-normal: var(--duration-normal);
  --dz-accent-glow: hsl(var(--ring) / 0.15);
}

/* =============================================================================
   1b. Dark Mode Tokens
   ============================================================================= */

.dark,
[data-theme="dark"] {
  --background: 240 10% 3.9%;
  --foreground: 0 0% 98%;

  --card: 240 10% 3.9%;
  --card-foreground: 0 0% 98%;

  --popover: 240 10% 3.9%;
  --popover-foreground: 0 0% 98%;

  --primary: 0 0% 98%;
  --primary-foreground: 240 5.9% 10%;

  --secondary: 240 3.7% 15.9%;
  --secondary-foreground: 0 0% 98%;

  --muted: 240 3.7% 15.9%;
  --muted-foreground: 240 5% 64.9%;

  --accent: 240 3.7% 15.9%;
  --accent-foreground: 0 0% 98%;

  --destructive: 0 62.8% 30.6%;
  --destructive-foreground: 0 0% 98%;

  --border: 240 3.7% 15.9%;
  --input: 240 3.7% 15.9%;
  --ring: 240 4.9% 83.9%;

  --success: 142 76% 36%;
  --success-foreground: 0 0% 98%;

  --warning: 38 92% 50%;
  --warning-foreground: 0 0% 98%;

  --info: 217 91% 60%;
  --info-foreground: 0 0% 98%;

  --shadow-xs: 0 1px 2px 0 hsl(0 0% 0% / 0.1);
  --shadow-sm: 0 1px 3px 0 hsl(0 0% 0% / 0.2), 0 1px 2px -1px hsl(0 0% 0% / 0.15);
  --shadow-md: 0 4px 6px -1px hsl(0 0% 0% / 0.2), 0 2px 4px -2px hsl(0 0% 0% / 0.15);
  --shadow-lg: 0 10px 15px -3px hsl(0 0% 0% / 0.25), 0 4px 6px -4px hsl(0 0% 0% / 0.15);
  --shadow-xl: 0 20px 25px -5px hsl(0 0% 0% / 0.3), 0 8px 10px -6px hsl(0 0% 0% / 0.2);

  --dz-sidebar-from: hsl(240 10% 5%);
  --dz-sidebar-to: hsl(240 10% 8%);
  --dz-accent-glow: hsl(var(--ring) / 0.2);
}

/* =============================================================================
   2. DaisyUI Theme Bridge

   Maps our design tokens to DaisyUI's internal CSS variables so existing
   templates using DaisyUI classes (btn, card, badge, etc.) pick up the
   new colour palette automatically.
   ============================================================================= */

:root,
[data-theme="light"] {
  /* DaisyUI base colours → zinc neutrals */
  --b1: 0 0% 100%;         /* base-100: white */
  --b2: 240 4.8% 95.9%;    /* base-200: zinc-100 */
  --b3: 240 5.9% 90%;      /* base-300: zinc-200 */
  --bc: 240 10% 3.9%;      /* base-content: zinc-950 */

  /* DaisyUI semantic colours */
  --p: 240 5.9% 10%;       /* primary: zinc-900 */
  --pf: 240 5.2% 16%;      /* primary-focus: zinc-800 */
  --pc: 0 0% 98%;           /* primary-content */

  --s: 240 4.8% 95.9%;     /* secondary: zinc-100 */
  --sf: 240 5.9% 90%;      /* secondary-focus: zinc-200 */
  --sc: 240 5.9% 10%;      /* secondary-content */

  --a: 240 4.8% 95.9%;     /* accent */
  --af: 240 5.9% 90%;
  --ac: 240 5.9% 10%;

  --n: 240 5.9% 10%;       /* neutral: zinc-900 */
  --nf: 240 3.7% 15.9%;
  --nc: 0 0% 98%;

  /* State colours */
  --su: 142 76% 36%;       /* success: green */
  --in: 217 91% 60%;       /* info: blue */
  --wa: 38 92% 50%;        /* warning: amber */
  --er: 0 84.2% 60.2%;     /* error: red */

  /* DaisyUI rounded */
  --rounded-box: var(--radius-lg);
  --rounded-btn: var(--radius-md);
  --rounded-badge: var(--radius-full);

  /* DaisyUI animation */
  --animation-btn: var(--duration-fast);
  --animation-input: var(--duration-fast);
  --btn-focus-scale: 0.98;
}

[data-theme="dark"] {
  --b1: 240 10% 3.9%;
  --b2: 240 3.7% 10%;
  --b3: 240 3.7% 15.9%;
  --bc: 0 0% 98%;

  --p: 0 0% 98%;
  --pf: 0 0% 90%;
  --pc: 240 5.9% 10%;

  --s: 240 3.7% 15.9%;
  --sf: 240 3.7% 20%;
  --sc: 0 0% 98%;

  --a: 240 3.7% 15.9%;
  --af: 240 3.7% 20%;
  --ac: 0 0% 98%;

  --n: 0 0% 98%;
  --nf: 0 0% 90%;
  --nc: 240 5.9% 10%;

  --su: 142 76% 36%;
  --in: 217 91% 60%;
  --wa: 38 92% 50%;
  --er: 0 62.8% 30.6%;
}

/* =============================================================================
   3. Typography
   ============================================================================= */

body {
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: hsl(var(--foreground));
  background-color: hsl(var(--background));
}

code, pre, kbd, samp {
  font-family: var(--font-mono);
}

/* =============================================================================
   4. Global Refinements
   ============================================================================= */

/* Smooth transitions on interactive elements */
a, button, .btn, input, select, textarea, .card, .menu li a {
  transition: all var(--duration-fast) var(--ease-default);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* =============================================================================
   5. Component Overrides
   ============================================================================= */

/* --- Sidebar --- */

.drawer-side aside,
.drawer-side > aside.bg-base-200,
.drawer-side > aside.bg-base-100 {
  background: hsl(var(--card));
  border-right: 1px solid hsl(var(--border));
}

.drawer-side aside > div:first-child {
  border-bottom-color: hsl(var(--border));
}

.drawer-side aside > div:first-child a {
  color: hsl(var(--foreground));
  letter-spacing: -0.01em;
}

.drawer-side .menu a {
  color: hsl(var(--muted-foreground));
  border-radius: var(--radius-md);
  margin-bottom: 0.125rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.drawer-side .menu a:hover {
  background: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

.drawer-side .menu a.active {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  font-weight: 500;
  box-shadow: none;
}

.drawer-side aside > div:last-child {
  border-top-color: hsl(var(--border));
}

/* --- Navbar --- */

.navbar {
  backdrop-filter: blur(8px);
  background: hsl(var(--background) / 0.85);
  border-bottom: 1px solid hsl(var(--border));
}

.navbar .text-xl {
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* --- Cards --- */

.card {
  box-shadow: var(--shadow-sm);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg);
  background: hsl(var(--card));
  color: hsl(var(--card-foreground));
  transition: box-shadow var(--duration-normal) var(--ease-default),
              transform var(--duration-normal) var(--ease-default);
}

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

.card[onclick]:hover,
.card a:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.card-title {
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card-body {
  gap: 0.75rem;
}

/* --- Buttons --- */

.btn {
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  transition: all var(--duration-fast) var(--ease-default);
}

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

.btn:active {
  transform: scale(var(--btn-focus-scale));
}

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

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

.btn-primary:hover {
  background: hsl(var(--primary) / 0.9);
  border-color: hsl(var(--primary) / 0.9);
}

.btn-ghost {
  box-shadow: none;
  background: transparent;
}

.btn-ghost:hover {
  box-shadow: none;
  background: hsl(var(--accent));
}

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

.btn-outline:hover {
  background: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
  border-color: hsl(var(--border));
}

/* Destructive button */
.btn-error {
  background: hsl(var(--destructive));
  color: hsl(var(--destructive-foreground));
  border-color: hsl(var(--destructive));
}

.btn-error:hover {
  background: hsl(var(--destructive) / 0.9);
}

/* --- Form Inputs --- */

.input,
.select,
.textarea {
  border: 1px solid hsl(var(--input));
  border-radius: var(--radius-md);
  background: transparent;
  transition: border-color var(--duration-fast) var(--ease-default),
              box-shadow var(--duration-fast) var(--ease-default);
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 2px hsl(var(--ring) / 0.15);
  outline: none;
}

.input:hover:not(:focus),
.select:hover:not(:focus),
.textarea:hover:not(:focus) {
  border-color: hsl(var(--foreground) / 0.2);
}

.label-text {
  font-weight: 500;
  font-size: 0.875rem;
  color: hsl(var(--foreground));
  letter-spacing: 0.01em;
}

.input::placeholder,
.textarea::placeholder {
  color: hsl(var(--muted-foreground));
}

/* --- Tables --- */

.table {
  border-collapse: separate;
  border-spacing: 0;
}

.table thead th {
  background: hsl(var(--muted));
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: hsl(var(--muted-foreground));
  border-bottom: 1px solid hsl(var(--border));
  padding: 0.75rem 1rem;
}

.table tbody tr {
  transition: background var(--duration-fast) var(--ease-default);
}

.table tbody tr:hover {
  background: hsl(var(--muted) / 0.5);
}

.table tbody td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid hsl(var(--border) / 0.5);
  vertical-align: middle;
}

.table tbody tr:last-child td {
  border-bottom: none;
}

/* --- Badges --- */

.badge {
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-full);
  border: none;
}

.badge-primary {
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
}

.badge-success {
  background: hsl(var(--success) / 0.1);
  color: hsl(var(--success));
}

.badge-warning {
  background: hsl(var(--warning) / 0.1);
  color: hsl(var(--warning));
}

.badge-error {
  background: hsl(var(--er) / 0.1);
  color: hsl(var(--er));
}

.badge-info {
  background: hsl(var(--info) / 0.1);
  color: hsl(var(--info));
}

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

/* --- Stats/Metrics --- */

.stats {
  box-shadow: var(--shadow-sm);
  border: 1px solid hsl(var(--border));
}

.stat {
  padding: 1.25rem 1.5rem;
}

.stat-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: hsl(var(--muted-foreground));
  font-weight: 500;
}

.stat-value {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.stat-desc {
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
}

/* --- Alerts --- */

.alert {
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
}

.alert-info {
  background: hsl(var(--info) / 0.08);
  border-color: hsl(var(--info) / 0.2);
  color: hsl(var(--info));
}

.alert-success {
  background: hsl(var(--success) / 0.08);
  border-color: hsl(var(--success) / 0.2);
  color: hsl(var(--success));
}

.alert-warning {
  background: hsl(var(--warning) / 0.08);
  border-color: hsl(var(--warning) / 0.2);
  color: hsl(var(--warning));
}

.alert-error {
  background: hsl(var(--er) / 0.08);
  border-color: hsl(var(--er) / 0.2);
  color: hsl(var(--er));
}

/* --- Modal/Dialog --- */

.modal-box {
  box-shadow: var(--shadow-xl);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg);
  background: hsl(var(--card));
}

.modal-backdrop {
  background: hsl(var(--foreground) / 0.5);
  backdrop-filter: blur(4px);
}

/* --- Page Header --- */

.dz-page-header {
  margin-bottom: 1.5rem;
}

.dz-page-header h1,
.dz-page-header .text-2xl {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: hsl(var(--foreground));
}

.dz-page-header .text-sm {
  color: hsl(var(--muted-foreground));
}

/* --- Empty State --- */

.dz-empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: hsl(var(--muted-foreground));
}

.dz-empty-state svg {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1rem;
  opacity: 0.4;
}

/* --- Action Bar --- */

.dz-action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  gap: 1rem;
}

.dz-action-bar .btn {
  gap: 0.5rem;
}

/* --- Dropdown menus --- */

.menu.shadow {
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  background: hsl(var(--popover));
  color: hsl(var(--popover-foreground));
}

/* =============================================================================
   6. Loading States & Animations
   ============================================================================= */

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

/* Skeleton shimmer */
.skeleton,
.dz-skeleton {
  background: linear-gradient(
    90deg,
    hsl(var(--muted)) 25%,
    hsl(var(--muted) / 0.6) 50%,
    hsl(var(--muted)) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius);
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Spinner for HTMX loading */
.dz-spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid hsl(var(--muted));
  border-top-color: hsl(var(--primary));
  border-radius: 50%;
  animation: dz-spin 0.6s linear infinite;
}

.dz-spinner--sm {
  width: 0.75rem;
  height: 0.75rem;
  border-width: 1.5px;
}

@keyframes dz-spin {
  to { transform: rotate(360deg); }
}

/* HTMX indicator pattern */
.htmx-indicator {
  display: none;
}
.htmx-request .htmx-indicator {
  display: inline-block;
}
.htmx-request .htmx-hide-on-request {
  display: none;
}

/* Toast slide-in */
.toast .alert {
  animation: dz-toast-in var(--duration-slow) var(--ease-out);
}

@keyframes dz-toast-in {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* =============================================================================
   7. Responsive Refinements
   ============================================================================= */

@media (max-width: 768px) {
  .card-body {
    padding: 1rem;
  }

  .table thead th,
  .table tbody td {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }

  .stat {
    padding: 1rem;
  }
}

