/* Each block mirrors the class string of the React component named above it, so a mock-up built from these classes renders like the product. */

.ds-root {
  font-family: var(--font-sans);
  font-weight: var(--weight-body);
  font-variation-settings: 'opsz' 16;
  font-optical-sizing: auto;
  font-feature-settings: var(--font-features);
  letter-spacing: var(--tracking-body);
  color: var(--foreground);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
}
.ds-root *,
.ds-root *::before,
.ds-root *::after {
  box-sizing: border-box;
  border-color: var(--border);
}
.ds-root h1,
.ds-root h2,
.ds-root h3 {
  font-weight: var(--weight-heading);
  letter-spacing: var(--tracking-heading);
  font-variation-settings: 'opsz' 32;
  margin: 0;
}
.ds-root h4,
.ds-root h5,
.ds-root h6 {
  font-weight: var(--weight-subheading);
  letter-spacing: var(--tracking-subheading);
  font-variation-settings: 'opsz' 24;
  margin: 0;
}
.ds-root p {
  margin: 0;
}

.ds-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Button (ui/button.tsx) */
.ds-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  border: 0;
  border-radius: var(--radius-md);
  height: var(--control-height);
  padding: 0.5rem 1rem;
  font: inherit;
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
  font-weight: var(--weight-medium);
  letter-spacing: inherit;
  cursor: pointer;
  text-decoration: none;
  transition-property: color, background-color, border-color;
  transition-duration: var(--motion-fast);
  transition-timing-function: var(--motion-ease);
}
.ds-btn:focus-visible,
.ds-btn.is-focus {
  outline: none;
  box-shadow: 0 0 0 1px var(--ring);
}
.ds-btn:disabled,
.ds-btn.is-disabled {
  pointer-events: none;
  opacity: 0.5;
}
.ds-btn--default {
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: var(--shadow-sm);
}
.ds-btn--default:hover,
.ds-btn--default.is-hover {
  background: color-mix(in oklab, var(--primary) 90%, transparent);
}
.ds-btn--destructive {
  background: var(--destructive);
  color: var(--destructive-foreground);
  box-shadow: var(--shadow-sm);
}
.ds-btn--destructive:hover,
.ds-btn--destructive.is-hover {
  background: color-mix(in oklab, var(--destructive) 90%, transparent);
}
.ds-btn--outline {
  background: var(--background);
  color: var(--foreground);
  border: 1px solid var(--input);
  box-shadow: var(--shadow-sm);
}
.ds-btn--secondary {
  background: var(--secondary);
  color: var(--secondary-foreground);
  box-shadow: var(--shadow-sm);
}
.ds-btn--secondary:hover,
.ds-btn--secondary.is-hover {
  background: color-mix(in oklab, var(--secondary) 80%, transparent);
}
.ds-btn--ghost {
  background: transparent;
  color: var(--foreground);
}
.ds-btn--outline:hover,
.ds-btn--outline.is-hover,
.ds-btn--ghost:hover,
.ds-btn--ghost.is-hover {
  background: color-mix(in oklab, var(--accent) 50%, transparent);
  color: var(--foreground);
}
.ds-btn--link {
  background: transparent;
  color: var(--primary);
  text-underline-offset: 4px;
}
.ds-btn--link:hover,
.ds-btn--link.is-hover {
  text-decoration: underline;
}
.ds-btn--sm {
  height: var(--control-height-sm);
  padding: 0 0.75rem;
  font-size: var(--text-xs);
  line-height: var(--text-xs--line-height);
}
.ds-btn--lg {
  height: var(--control-height-lg);
  padding: 0 2rem;
}
.ds-btn--icon {
  width: var(--control-height);
  padding: 0;
}

/* Badge (ui/badge.tsx) and StatusBadge (config/status-config.ts) */
.ds-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 0.125rem 0.625rem;
  font-size: var(--text-xs);
  line-height: var(--text-xs--line-height);
  font-weight: var(--weight-semibold);
  white-space: nowrap;
}
.ds-badge--default {
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: var(--shadow-sm);
}
.ds-badge--secondary {
  background: var(--secondary);
  color: var(--secondary-foreground);
}
.ds-badge--destructive {
  background: var(--destructive);
  color: var(--destructive-foreground);
  box-shadow: var(--shadow-sm);
}
.ds-badge--success {
  background: var(--success-strong);
  color: var(--primary-foreground);
  box-shadow: var(--shadow-sm);
}
.ds-badge--outline {
  border-color: var(--border);
  color: var(--foreground);
}
.ds-status--neutral {
  background: var(--neutral-muted);
  color: var(--neutral-strong);
  border-color: var(--neutral-line);
}
.ds-status--info {
  background: var(--info-muted);
  color: var(--info-strong);
  border-color: var(--info-line);
}
.ds-status--warning {
  background: var(--warning-muted);
  color: var(--warning-strong);
  border-color: var(--warning-line);
}
.ds-status--success {
  background: var(--success-muted);
  color: var(--success-strong);
  border-color: var(--success-line);
}
.ds-status--danger {
  background: var(--danger-muted);
  color: var(--danger-strong);
  border-color: var(--danger-line);
}
.ds-status--brand {
  background: color-mix(in oklab, var(--primary) 10%, transparent);
  color: var(--primary);
  border-color: color-mix(in oklab, var(--primary) 20%, transparent);
}

/* Form controls (ui/input, select, textarea, checkbox, radio-group, switch, label, field-error) */
.ds-label {
  display: block;
  font-size: var(--text-sm);
  line-height: 1;
  font-weight: var(--weight-medium);
}
.ds-field {
  display: grid;
  gap: 0.5rem;
  align-content: start;
}
.ds-input,
.ds-select {
  display: flex;
  align-items: center;
  width: 100%;
  height: var(--control-height);
  border: 1px solid var(--input);
  border-radius: var(--radius-md);
  background: transparent;
  padding: 0.25rem 0.75rem;
  font: inherit;
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
  color: var(--foreground);
  box-shadow: var(--shadow-xs);
  transition: border-color var(--motion-fast) var(--motion-ease);
}
.ds-input::placeholder {
  color: var(--muted-foreground);
}
.ds-input:focus-visible,
.ds-input.is-focus,
.ds-select.is-focus {
  outline: none;
  box-shadow: 0 0 0 1px var(--ring);
}
.ds-input:disabled,
.ds-input.is-disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
.ds-input.is-invalid {
  outline: 2px solid var(--destructive);
  outline-offset: 2px;
}
.ds-select {
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
}
.ds-select .is-placeholder {
  color: var(--muted-foreground);
}
.ds-select .ds-icon {
  opacity: 0.5;
}
.ds-textarea {
  display: block;
  width: 100%;
  min-height: 80px;
  border: 1px solid var(--input);
  border-radius: var(--radius-md);
  background: var(--background);
  padding: 0.5rem 0.75rem;
  font: inherit;
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
  color: var(--foreground);
  box-shadow: var(--shadow-xs);
  resize: vertical;
}
.ds-textarea::placeholder {
  color: var(--muted-foreground);
}
.ds-menu {
  min-width: 8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--popover);
  color: var(--popover-foreground);
  box-shadow: var(--shadow-md);
  padding: 0.25rem;
}
.ds-menu__item {
  position: relative;
  display: flex;
  align-items: center;
  border-radius: var(--radius-sm);
  padding: 0.375rem 2rem 0.375rem 0.5rem;
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
}
.ds-menu__item.is-focus {
  background: color-mix(in oklab, var(--accent) 50%, transparent);
  color: var(--foreground);
}
.ds-menu__item .ds-icon {
  position: absolute;
  right: 0.5rem;
}
.ds-checkbox {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--primary-foreground);
}
.ds-checkbox.is-checked {
  background: var(--primary);
}
.ds-checkbox .ds-icon {
  width: 0.75rem;
  height: 0.75rem;
  stroke-width: 3;
}
.ds-radio {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  border: 1px solid var(--primary);
  border-radius: 9999px;
}
.ds-radio.is-checked::after {
  content: '';
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: var(--primary);
}
.ds-switch {
  display: inline-flex;
  align-items: center;
  width: 2.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  border: 2px solid transparent;
  border-radius: 9999px;
  background: var(--input);
  box-shadow: var(--shadow-xs);
  transition: background-color var(--motion-fast) var(--motion-ease);
}
.ds-switch::after {
  content: '';
  width: 1rem;
  height: 1rem;
  border-radius: 9999px;
  background: var(--background);
  box-shadow: var(--shadow-lg);
  transition: transform var(--motion-fast) var(--motion-ease);
}
.ds-switch.is-checked {
  background: var(--primary);
}
.ds-switch.is-checked::after {
  transform: translateX(1rem);
}
.ds-field-error {
  margin-top: 0.25rem;
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
  font-weight: var(--weight-medium);
  color: var(--destructive);
}
.ds-hint {
  font-size: var(--text-xs);
  line-height: var(--text-xs--line-height);
  color: var(--muted-foreground);
}

/* Alert (ui/alert.tsx), ErrorAlert, Toast (ui/toast.tsx) */
.ds-alert {
  position: relative;
  display: flex;
  gap: 0.75rem;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.75rem 1rem;
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
  background: var(--background);
  color: var(--foreground);
  box-shadow: var(--shadow-sm);
}
.ds-alert .ds-icon {
  margin-top: 0.125rem;
}
.ds-alert__title {
  margin-bottom: 0.25rem;
  font-weight: var(--weight-semibold);
  line-height: 1;
  letter-spacing: var(--tracking-tight);
}
.ds-alert__body {
  color: var(--muted-foreground);
}
.ds-alert--info {
  border-color: color-mix(in oklab, var(--primary) 40%, transparent);
  background: color-mix(in oklab, var(--primary) 10%, var(--background));
  color: var(--primary);
}
.ds-alert--warning {
  border-color: var(--warning);
  background: var(--warning-subtle);
  color: var(--warning-strong);
}
.ds-alert--destructive {
  border-color: color-mix(in oklab, var(--destructive) 50%, transparent);
  background: color-mix(in oklab, var(--destructive) 10%, var(--background));
  color: var(--destructive);
}
.ds-error-alert {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid color-mix(in oklab, var(--destructive) 20%, transparent);
  border-radius: var(--radius-lg);
  background: color-mix(in oklab, var(--destructive) 10%, var(--background));
  padding: 0.75rem;
  font-size: var(--text-sm);
  color: var(--destructive);
}
.ds-panel {
  border: 1px solid;
  border-radius: var(--radius-lg);
  padding: 0.75rem 1rem;
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
}
.ds-panel--success {
  background: var(--success-subtle);
  border-color: var(--success-line);
  color: var(--success-strong);
}
.ds-panel--warning {
  background: var(--warning-subtle);
  border-color: var(--warning-line);
  color: var(--warning-strong);
}
.ds-panel--danger {
  background: var(--danger-subtle);
  border-color: var(--danger-line);
  color: var(--danger-strong);
}
.ds-panel--info {
  background: var(--info-subtle);
  border-color: var(--info-line);
  color: var(--info-strong);
}
.ds-toast {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem 1rem 1rem;
  background: var(--background);
  color: var(--foreground);
  box-shadow: var(--shadow-lg);
}
.ds-toast--destructive {
  border-color: var(--destructive);
  background: var(--destructive);
  color: var(--destructive-foreground);
}
.ds-toast__title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
}
.ds-toast__body {
  font-size: var(--text-xs);
  opacity: 0.9;
}

/* Card (ui/card.tsx) and PageHeader (ui/page-header.tsx) */
.ds-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--card);
  color: var(--card-foreground);
  box-shadow: var(--shadow-sm);
}
.ds-card__header {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: var(--content-padding);
}
.ds-card__title {
  font-weight: var(--weight-semibold);
  line-height: 1;
  letter-spacing: var(--tracking-tight);
}
.ds-card__description {
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
  color: var(--muted-foreground);
}
.ds-card__content {
  padding: 0 var(--content-padding) var(--content-padding);
}
.ds-card__footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 var(--content-padding) var(--content-padding);
}
.ds-page-header {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(
    to bottom right,
    var(--background),
    color-mix(in oklab, var(--info-subtle) 50%, transparent)
  );
  padding: var(--content-padding);
  box-shadow: var(--shadow-sm);
}
.ds-page-header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    color-mix(in oklab, var(--primary) 10%, transparent),
    transparent
  );
}
.ds-page-header__row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.ds-page-header__title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: var(--text-xl);
  line-height: var(--text-xl--line-height);
  font-weight: var(--weight-bold) !important;
  letter-spacing: var(--tracking-tight) !important;
}
.ds-page-header__description {
  margin-top: 0.25rem;
  max-width: 42rem;
  font-size: var(--text-xs);
  line-height: var(--text-xs--line-height);
  color: var(--muted-foreground);
}
.ds-page-header__watermark {
  position: absolute;
  top: -2rem;
  right: -2rem;
  opacity: 0.04;
  pointer-events: none;
}
.ds-page-header__watermark .ds-icon {
  width: 10rem;
  height: 10rem;
  transform: rotate(12deg);
}

/* Dialog (ui/dialog.tsx) */
.ds-overlay {
  background: color-mix(in oklab, var(--foreground) 80%, transparent);
}
.ds-dialog {
  position: relative;
  display: grid;
  gap: 1rem;
  width: 100%;
  max-width: 32rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--background);
  padding: var(--content-padding);
  box-shadow: var(--shadow-lg);
}
.ds-dialog__title {
  font-size: var(--text-lg);
  line-height: 1;
  font-weight: var(--weight-semibold) !important;
  letter-spacing: var(--tracking-tight) !important;
}
.ds-dialog__description {
  margin-top: 0.375rem;
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
  color: var(--muted-foreground);
}
.ds-dialog__footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}
.ds-dialog__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  opacity: 0.7;
}

/* Tabs (ui/tabs.tsx) */
.ds-tabs {
  display: inline-flex;
  align-items: center;
  height: var(--control-height);
  border-radius: var(--radius-lg);
  background: var(--muted);
  padding: 0.25rem;
  color: var(--muted-foreground);
}
.ds-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border-radius: var(--radius-md);
  padding: 0.25rem 0.75rem;
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
  font-weight: var(--weight-medium);
}
.ds-tab.is-active {
  background: var(--background);
  color: var(--foreground);
  box-shadow: var(--shadow-sm);
}

/* Table (ui/table.tsx) */
.ds-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
}
.ds-table th {
  height: 2.5rem;
  padding: 0 0.5rem;
  text-align: left;
  vertical-align: middle;
  font-weight: var(--weight-medium);
  color: var(--muted-foreground);
  border-bottom: 1px solid var(--border);
}
.ds-table td {
  padding: 0.5rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
}
.ds-table tr:last-child td {
  border-bottom: 0;
}
.ds-table tr.is-hover td {
  background: color-mix(in oklab, var(--muted) 50%, transparent);
}
.ds-table tr.is-selected td {
  background: var(--muted);
}
.ds-num,
.ds-table .ds-num {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* Progress and Skeleton (ui/progress.tsx, ui/skeleton.tsx) */
.ds-progress {
  position: relative;
  height: 0.5rem;
  width: 100%;
  overflow: hidden;
  border-radius: 9999px;
  background: color-mix(in oklab, var(--primary) 20%, transparent);
}
.ds-progress > span {
  display: block;
  height: 100%;
  background: var(--primary);
  transition: width var(--motion-base) var(--motion-ease);
}
.ds-skeleton {
  border-radius: var(--radius-md);
  background: var(--muted);
  animation: ds-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes ds-pulse {
  50% {
    opacity: 0.5;
  }
}

/* App shell (layouts/Header, Sidebar, NavItemLink, AuthLayout) */
.ds-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  padding: 0 1rem;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--background) 95%, transparent);
}
.ds-sidebar {
  width: var(--sidebar-width);
  border-right: 1px solid var(--border);
  background: var(--card);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.ds-sidebar.is-collapsed {
  width: var(--sidebar-width-collapsed);
}
.ds-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: var(--radius-lg);
  padding: 0.625rem 0.75rem;
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
  font-weight: var(--weight-medium);
  color: var(--muted-foreground);
}
.ds-nav-item.is-hover {
  background: color-mix(in oklab, var(--secondary) 20%, transparent);
  color: var(--secondary);
}
.ds-nav-item.is-active {
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: var(--shadow-sm);
}
.ds-nav-item.is-disabled {
  opacity: 0.5;
}
.ds-nav-item .ds-badge {
  margin-left: auto;
  min-width: 1.25rem;
  height: 1.25rem;
  justify-content: center;
  padding: 0 0.375rem;
}
.ds-auth-bg {
  background: linear-gradient(
    to bottom right,
    color-mix(in oklab, var(--primary) 5%, transparent),
    var(--background),
    color-mix(in oklab, var(--accent) 5%, transparent)
  );
}
.ds-auth-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--card);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
}

@media (prefers-reduced-motion: reduce) {
  .ds-root *,
  .ds-root *::before,
  .ds-root *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
