/* ============================================================
   JellyCat Design System — Components
   ============================================================ */

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text-primary);
  background: var(--color-bg);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ── */
.heading-1 {
  font-family: var(--font-heading);
  font-weight: var(--font-weight-bold);
  font-size: var(--text-3xl);
  line-height: var(--leading-tight);
  color: var(--color-text-primary);
}
.heading-2 {
  font-family: var(--font-heading);
  font-weight: var(--font-weight-bold);
  font-size: var(--text-2xl);
  line-height: var(--leading-tight);
  color: var(--color-text-primary);
}
.heading-3 {
  font-family: var(--font-heading);
  font-weight: var(--font-weight-bold);
  font-size: var(--text-xl);
  line-height: var(--leading-tight);
  color: var(--color-text-primary);
}
.heading-4 {
  font-family: var(--font-heading);
  font-weight: var(--font-weight-medium);
  font-size: var(--text-lg);
  line-height: var(--leading-tight);
  color: var(--color-text-primary);
}
.body-lg {
  font-family: var(--font-body);
  font-weight: var(--font-weight-regular);
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: var(--color-text-primary);
}
.body {
  font-family: var(--font-body);
  font-weight: var(--font-weight-regular);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-text-primary);
}
.body-sm {
  font-family: var(--font-body);
  font-weight: var(--font-weight-regular);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
}
.label {
  font-family: var(--font-body);
  font-weight: var(--font-weight-medium);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text-primary);
}
.caption {
  font-family: var(--font-body);
  font-weight: var(--font-weight-regular);
  font-size: var(--text-xs);
  line-height: var(--leading-normal);
  color: var(--color-text-secondary);
}

/* ── Button ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-8);
  border: none;
  border-radius: var(--radius-btn);
  font-family: var(--font-body);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition-normal), color var(--transition-normal),
              border-color var(--transition-normal), opacity var(--transition-normal);
  text-decoration: none;
  outline: none;
  position: relative;
  overflow: hidden;
}
.btn:focus-visible {
  outline: 2px solid var(--color-interactive-default);
  outline-offset: 2px;
}

/* Sizes */
.btn-sm {
  font-size: var(--text-base);
  line-height: 20px;
  padding: var(--spacing-4) var(--spacing-12);
}
.btn-md {
  font-size: var(--text-md);
  line-height: 24px;
  padding: var(--spacing-8) var(--spacing-20);
}
.btn-lg {
  font-size: var(--text-lg);
  line-height: 26px;
  padding: var(--spacing-8) var(--spacing-24);
  min-width: 120px;
}

/* Primary */
.btn-primary {
  background: var(--color-interactive-default);
  color: var(--color-interactive-text);
  box-shadow: 0 4px 30px 0 rgba(94, 58, 95, 0.50); /* Figma: DROP_SHADOW #5e3a5f 50% y:4 blur:30 */
}
.btn-primary:hover {
  background: var(--color-interactive-hover);
  box-shadow: 0 4px 30px 0 rgba(94, 58, 95, 0.50);
}
.btn-primary:active {
  background: var(--color-interactive-pressed);
  box-shadow: 0 2px 4px 0 rgba(94, 58, 95, 0.50); /* Figma: pressed — tighter shadow y:2 blur:4 */
}
.btn-primary:disabled,
.btn-primary.disabled {
  background: var(--color-disabled-fill); /* #e8e8e8 */
  color: var(--color-disabled-text);      /* #ababab */
  box-shadow: none;
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.6;
}

/* Secondary */
.btn-secondary {
  background: transparent;
  border: 1.5px solid var(--color-primary-500);
  color: var(--color-primary-600);
}
.btn-secondary:hover  { border-color: var(--color-interactive-hover); color: var(--color-primary-700); }
.btn-secondary:active { border-color: var(--color-interactive-pressed); color: var(--color-primary-800); }
.btn-secondary:disabled,
.btn-secondary.disabled {
  border-color: var(--color-border-strong); /* #d4d4d4 — tokens-border-strong */
  color: var(--color-disabled-text);        /* #ababab */
  cursor: not-allowed;
  opacity: 0.6;
}

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--color-interactive-default);
  text-decoration: underline;
}
.btn-ghost:hover  { color: var(--color-interactive-hover); }
.btn-ghost:active { color: var(--color-interactive-pressed); }
.btn-ghost:disabled,
.btn-ghost.disabled {
  color: var(--color-disabled-text);
  cursor: not-allowed;
  opacity: 0.6; /* Figma opacity:60 for ghost disabled */
}

/* Danger */
.btn-danger {
  background: var(--color-error-text);
  color: var(--color-interactive-text);
}
.btn-danger:hover  { background: #e86a5f; }
.btn-danger:active { background: #cc5146; }
.btn-danger:disabled,
.btn-danger.disabled {
  background: var(--color-disabled-fill); /* #e8e8e8 */
  color: var(--color-disabled-text);      /* #ababab */
  cursor: not-allowed;
  opacity: 0.6;
}

/* ── Badge ── */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-badge);
  font-family: var(--font-body);
  font-weight: var(--font-weight-medium);
  white-space: nowrap;
}
.badge-sm { font-size: var(--text-xs); padding: var(--spacing-2) var(--spacing-6); }
.badge-md { font-size: var(--text-sm); padding: var(--spacing-4) var(--spacing-8); }

.badge-neutral  { background: var(--color-gray-200); color: var(--color-gray-800); }
.badge-success  { background: var(--color-success-surface); color: var(--color-success-text); }
.badge-warning  { background: var(--color-warning-surface); color: var(--color-warning-text); }
.badge-error    { background: var(--color-error-surface);   color: var(--color-error-text); }
.badge-info     { background: var(--color-info-surface);    color: var(--color-info-text); }

/* ── Chip ── */
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-chip);
  font-family: var(--font-body);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition-fast), border-color var(--transition-fast);
  padding: var(--spacing-4) var(--spacing-12);
}
.chip-sm { font-size: var(--text-sm); }
.chip-md { font-size: var(--text-base); padding: var(--spacing-4) var(--spacing-16); }

.chip-default  { background: var(--color-interactive-default); color: var(--color-primary-50); }
.chip-selected { background: var(--color-interactive-pressed); color: var(--color-interactive-text); }
.chip-outlined {
  background: transparent;
  border: 1.5px solid var(--color-border-default);
  color: var(--color-text-secondary);
}
.chip-default:hover  { background: var(--color-interactive-hover); }
.chip-selected:hover { background: var(--color-interactive-pressed); opacity: 0.9; }
.chip-outlined:hover { background: var(--color-primary-50); }

/* ── Card ── */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-card);
  padding: var(--spacing-24);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-40);
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition-normal), background var(--transition-normal);
  position: relative;
}
.card:hover {
  box-shadow: var(--shadow-hover);
  border: 1.5px solid var(--color-gray-200);
}
.card-bordered {
  border: 1.5px solid var(--color-gray-200);
}
.card-body {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-8);
}
.card-title {
  font-family: var(--font-heading);
  font-weight: var(--font-weight-bold);
  font-size: var(--text-xl);
  color: var(--color-text-primary);
}
.card-description {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
}
.card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--spacing-8);
}
.card-empty {
  background: var(--color-surface);
  border: 1.5px solid var(--color-gray-200);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  min-height: 162px;
}

/* ── Card: Mobile ── */
/* Figma: 402px wide, top-only 32px radius, upward shadow, overflow-clip */
.card-mobile {
  width: 402px;
  background: rgba(255, 255, 255, 0.98);
  border: 1.5px solid #e8e8e8;
  border-radius: 32px 32px 0 0; /* Figma: top corners only at 32px */
  box-shadow: 0 -2px 10px 0 rgba(91, 9, 9, 0.20), 0 -8px 30px 5px rgba(91, 9, 9, 0.20);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-16);
  padding: var(--spacing-48) var(--spacing-32) 80px;
  overflow: hidden;
}
.card-mobile-header {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-8);
  width: 100%;
}
.card-mobile-title {
  font-family: var(--font-heading);
  font-weight: var(--font-weight-bold);
  font-size: var(--text-xl);
  color: var(--color-text-primary);
  line-height: 1.2;
}
.card-mobile-desc {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
}
/* Figma: 400×400 doll image, centered, with layered drop-shadow */
.card-mobile-image {
  position: relative;
  width: 400px;
  height: 400px;
  flex-shrink: 0;
  align-self: center;
  filter:
    drop-shadow(5px 8px 11px rgba(0, 0, 0, 0.10))
    drop-shadow(22px 34px 20px rgba(0, 0, 0, 0.09))
    drop-shadow(49px 76px 27px rgba(0, 0, 0, 0.05))
    drop-shadow(87px 136px 32px rgba(0, 0, 0, 0.01));
}
.card-mobile-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
  display: block;
  pointer-events: none;
}
.card-mobile-actions {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-16);
  width: 100%;
}
.card-mobile-actions .btn {
  width: 100%;
  justify-content: center;
}

/* ── Card: Visual Design ── */

/* Outer wrapper — overflow visible so deco images can bleed outside the card */
.card-visual-wrap {
  position: relative;
  width: 320px;
  height: 435px;
  flex-shrink: 0;
}

.card-visual {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 32px;
  border: 1.5px solid rgba(255, 255, 255, 0.20);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-16);
  padding: var(--spacing-48) var(--spacing-32) 80px;
  overflow: hidden;
}

/* Decorative float elements — positioned absolutely within .card-visual-wrap */
.card-deco {
  position: absolute;
  pointer-events: none;
  z-index: 10;
  object-fit: contain;
  display: block;
}
/* Blobs live INSIDE the card so overflow:hidden clips them to card shape */
.card-visual-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}
.card-visual-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-8);
}
.card-visual-title {
  font-family: var(--font-heading);
  font-weight: var(--font-weight-bold);
  font-size: var(--text-xl);
  color: #ffffff;
  line-height: 1.2;
}
.card-visual-desc {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: rgba(255, 255, 255, 0.85);
  line-height: var(--leading-relaxed);
}

/* V1: Purple */
.card-visual.v1 {
  background: radial-gradient(ellipse at center, rgba(161, 37, 173, 0.55) 0%, rgba(98, 57, 139, 0.92) 100%);
  box-shadow: 0 0 10px 0 rgba(91, 9, 9, 0.20), 0 8px 30px 0 rgba(91, 9, 9, 0.20);
}
.card-visual.v1 .card-visual-blob:nth-child(1) {
  width: 234px; height: 327px;
  background: rgba(220, 80, 200, 0.50);
  top: 40px; left: -60px;
}
.card-visual.v1 .card-visual-blob:nth-child(2) {
  width: 297px; height: 366px;
  background: linear-gradient(135deg, rgba(41, 119, 253, 0.50), rgba(0, 212, 212, 0.40));
  top: 80px; right: -80px;
}

/* V2: Amber */
.card-visual.v2 {
  background: radial-gradient(ellipse at center, rgba(253, 212, 109, 0.55) 0%, rgba(254, 160, 62, 0.75) 50%, rgba(255, 107, 16, 0.95) 100%);
  box-shadow: 0 0 10px 0 rgba(91, 62, 9, 0.20), 0 8px 30px 0 rgba(124, 65, 6, 0.20);
}
.card-visual.v2 .card-visual-blob:nth-child(1) {
  width: 239px; height: 357px;
  background: rgba(235, 100, 180, 0.45);
  top: 20px; right: -50px;
}
.card-visual.v2 .card-visual-blob:nth-child(2) {
  width: 247px; height: 445px;
  background: linear-gradient(135deg, rgba(253, 212, 109, 0.50), rgba(41, 119, 253, 0.35));
  bottom: -100px; left: -60px;
}

/* V3: Teal */
.card-visual.v3 {
  background: radial-gradient(ellipse at center, rgba(41, 166, 95, 0.55) 0%, rgba(20, 156, 139, 0.75) 50%, rgba(0, 147, 184, 0.95) 100%);
  box-shadow: 0 0 10px 0 rgba(0, 80, 100, 0.20), 0 8px 30px 0 rgba(0, 80, 100, 0.20);
}
.card-visual.v3 .card-visual-blob:nth-child(1) {
  width: 278px; height: 390px;
  background: rgba(41, 119, 253, 0.40);
  top: 20px; right: -70px;
}
.card-visual.v3 .card-visual-blob:nth-child(2) {
  width: 271px; height: 350px;
  background: linear-gradient(135deg, rgba(41, 200, 95, 0.50), rgba(130, 60, 220, 0.38));
  bottom: -80px; left: -50px;
}

/* Product image placeholder — 400×400, absolutely positioned in .card-visual-wrap so it
   escapes the card's overflow:hidden and can "run out the frame" at the bottom */
.card-visual-product {
  position: absolute;
  width: 400px;
  height: 400px;
  top: 135px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  pointer-events: none;
  filter:
    drop-shadow(1px 3px 3.5px rgba(0, 0, 0, 0.10))
    drop-shadow(4px 13px 6.5px rgba(0, 0, 0, 0.09))
    drop-shadow(10px 28px 9px rgba(0, 0, 0, 0.05))
    drop-shadow(17px 50px 10.5px rgba(0, 0, 0, 0.01));
}
.card-visual-product img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
  display: block;
  pointer-events: none;
}

/* ── Input ── */
.input-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-4);
}
/* Optional fixed-width wrappers matching Figma sizes */
.input-wrapper-sm { width: 100%; max-width: 240px; }
.input-wrapper-md { width: 100%; max-width: 280px; }
.input-wrapper-lg { width: 100%; max-width: 320px; }

.input-label {
  font-family: var(--font-body);
  font-weight: var(--font-weight-medium);
  font-size: 14px;           /* Lato Medium 14px — Figma: tokens-text-primary */
  line-height: normal;
  color: var(--color-text-primary);
}
.input {
  background: var(--color-surface);
  border: 1.5px solid var(--color-border-default); /* #9a729c */
  border-radius: 8px;                               /* radius-semantic-input */
  font-family: var(--font-body);
  font-weight: var(--font-weight-regular);
  color: var(--color-text-primary);
  width: 100%;
  outline: none;
  overflow: hidden;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.input::placeholder { color: var(--color-text-secondary); } /* #6b496d */

/* — Sizes (exact Figma padding + font) — */
.input-sm { font-size: 14px; padding: 6px  12px; line-height: normal; }
.input-md { font-size: 16px; padding: 8px  16px; line-height: normal; }
.input-lg { font-size: 18px; padding: 12px 20px; line-height: normal; }

/* Focus ring — Figma: Focus_input effect
   DROP_SHADOW spread=3 rgba(154,114,156,0.25)
   DROP_SHADOW radius=6 spread=1 rgba(154,114,156,0.12) */
.input:focus {
  border-color: var(--color-interactive-default); /* #9a729c */
  box-shadow:
    0px 0px 0px 3px rgba(154, 114, 156, 0.25),
    0px 0px 6px 1px rgba(154, 114, 156, 0.12);
}

/* Error state */
.input-error, .input.error {
  border-color: var(--color-error-text); /* #ff8175 */
}
.input-error:focus, .input.error:focus {
  border-color: var(--color-error-text);
  box-shadow: 0 0 0 3px rgba(255, 129, 117, 0.20);
}

/* Disabled — Figma: bg #e8e8e8, border #d4d4d4, text #ababab (no opacity) */
.input:disabled, .input.disabled {
  background: var(--color-disabled-fill); /* #e8e8e8 */
  border-color: var(--color-border-strong); /* #d4d4d4 */
  color: var(--color-disabled-text);       /* #ababab */
  cursor: not-allowed;
}
.input:disabled::placeholder, .input.disabled::placeholder {
  color: var(--color-disabled-text);
}

.input-hint {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-top: var(--spacing-2);
}
.input-hint-error {
  color: var(--color-error-text);
}

/* Textarea */
textarea.input {
  resize: vertical;
  min-height: 100px;
}
textarea.input-sm { min-height: 100px; }
textarea.input-md { min-height: 120px; }
textarea.input-lg { min-height: 140px; }

/* ── Select ──
   Figma: same border/bg/radius as Input but DIFFERENT padding per size:
   sm: py=4  px=12  (Input sm: py=6  px=12)
   md: py=6  px=16  (Input md: py=8  px=16)
   lg: py=8  px=20  (Input lg: py=12 px=20) */
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239a729c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px; /* room for the icon */
}
/* Override input size padding for select */
.select.input-sm { padding-top: 4px;  padding-bottom: 4px;  padding-left: 12px; }
.select.input-md { padding-top: 6px;  padding-bottom: 6px;  padding-left: 16px; font-size: 16px; }
.select.input-lg { padding-top: 8px;  padding-bottom: 8px;  padding-left: 20px; font-size: 18px; }

/* ── Checkbox ── */
.checkbox-wrapper {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-8);
  cursor: pointer;
}
.checkbox-wrapper input[type="checkbox"] { display: none; }
.checkbox-box {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-4);
  border: 1.5px solid var(--color-gray-600);
  background: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition-fast), border-color var(--transition-fast);
  font-size: var(--text-sm);
  color: white;
  font-weight: var(--font-weight-bold);
}
.checkbox-wrapper:has(input:checked) .checkbox-box {
  background: var(--color-interactive-default);
  border-color: var(--color-interactive-default);
}
.checkbox-wrapper:has(input:disabled) .checkbox-box {
  background: var(--color-disabled-fill);
  border-color: var(--color-border-strong);
  cursor: not-allowed;
}
.checkbox-label {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text-primary);
  user-select: none;
}
.checkbox-wrapper:has(input:disabled) .checkbox-label {
  color: var(--color-disabled-text);
}

/* ── Radio ──
   Figma: unchecked border #808080 1.5px; checked border #9a729c + inner #9a729c dot;
   disabled bg #e8e8e8, border #d4d4d4 */
.radio-wrapper {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-8);
  cursor: pointer;
}
.radio-wrapper input[type="radio"] { display: none; }
.radio-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--color-gray-600); /* #808080 */
  background: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color var(--transition-fast);
}
/* Inner filled dot — 10px to match Figma proportions */
.radio-circle::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-interactive-default); /* #9a729c */
  transform: scale(0);
  transition: transform var(--transition-fast);
}
.radio-wrapper:has(input:checked) .radio-circle {
  border-color: var(--color-interactive-default); /* #9a729c */
}
.radio-wrapper:has(input:checked) .radio-circle::after {
  transform: scale(1);
}
.radio-wrapper:has(input:disabled) .radio-circle {
  background: var(--color-disabled-fill); /* #e8e8e8 */
  border-color: var(--color-border-strong); /* #d4d4d4 */
  cursor: not-allowed;
}
.radio-wrapper:has(input:disabled) .radio-circle::after {
  display: none;
}

/* ── Switch ──
   Figma: track 40×24px (not 44px), off=gray-400, on=#9a729c, disabled=gray-300 */
.switch-wrapper {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-8);
  cursor: pointer;
}
.switch-wrapper input[type="checkbox"] { display: none; }
.switch-track {
  width: 40px;   /* Figma: 40px not 44px */
  height: 24px;
  border-radius: var(--radius-pill);
  background: var(--color-gray-400); /* off state */
  position: relative;
  transition: background var(--transition-normal);
  flex-shrink: 0;
}
.switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform var(--transition-normal);
}
.switch-wrapper:has(input:checked) .switch-track {
  background: var(--color-interactive-default); /* #9a729c */
}
.switch-wrapper:has(input:checked) .switch-thumb {
  transform: translateX(16px); /* 40 - 3 - 18 - 3 = 16 */
}
.switch-wrapper:has(input:disabled) .switch-track {
  background: var(--color-gray-200); /* lighter when disabled */
  cursor: not-allowed;
}
.switch-wrapper:has(input:disabled) .switch-thumb {
  background: var(--color-gray-400);
}
.switch-wrapper:has(input:disabled) { cursor: not-allowed; }

/* ── Alert / Toast ── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-12);
  padding: var(--spacing-16) var(--spacing-20);
  border-radius: var(--radius-modal);
  border: 1.5px solid;
  box-shadow: var(--shadow-hover);
}
.alert-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}
.alert-body { display: flex; flex-direction: column; gap: var(--spacing-4); flex: 1; }
.alert-title { font-family: var(--font-body); font-weight: var(--font-weight-medium); font-size: var(--text-base); }
.alert-message { font-family: var(--font-body); font-weight: var(--font-weight-regular); font-size: var(--text-base); }

.alert-info    { background: var(--color-info-bg);    border-color: var(--color-info-surface);    color: var(--color-info-text); }
.alert-success { background: var(--color-success-bg); border-color: var(--color-success-border);  color: var(--color-success-text); }
.alert-warning { background: var(--color-warning-bg); border-color: var(--color-warning-border);  color: var(--color-warning-text); }
.alert-error   { background: var(--color-error-bg);   border-color: var(--color-error-surface);   color: var(--color-error-text); }

/* ── Tabs ── */
.tabs { display: flex; align-items: center; }

/* Default tabs */
.tabs-default { background: var(--color-bg-secondary); border-radius: var(--radius-4) var(--radius-4) 0 0; }
.tabs-default .tab {
  padding: var(--spacing-8) var(--spacing-16);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  background: var(--color-bg-secondary);
  border: none;
  cursor: pointer;
  border-radius: var(--radius-4) var(--radius-4) 0 0;
  transition: background var(--transition-fast), color var(--transition-fast);
  white-space: nowrap;
}
.tabs-default .tab.active {
  background: var(--color-surface);
  color: var(--color-text-primary);
  font-weight: var(--font-weight-medium);
}
.tabs-default .tab:hover:not(.active) { background: var(--color-gray-200); }

/* Pill tabs */
.tabs-pill .tab {
  padding: var(--spacing-8) var(--spacing-16);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-pill);
  transition: background var(--transition-fast), color var(--transition-fast);
  white-space: nowrap;
}
.tabs-pill .tab.active {
  background: var(--color-interactive-default);
  color: var(--color-interactive-text);
  font-weight: var(--font-weight-medium);
}
.tabs-pill .tab:hover:not(.active) { background: var(--color-primary-50); color: var(--color-primary-600); }

/* Underline tabs */
.tabs-underline .tab {
  padding: var(--spacing-8) var(--spacing-16);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast);
  white-space: nowrap;
}
.tabs-underline .tab.active {
  border-bottom-color: var(--color-interactive-default);
  color: var(--color-text-primary);
  font-weight: var(--font-weight-medium);
}
.tabs-underline .tab:hover:not(.active) { color: var(--color-primary-600); }

/* ── Divider ──
   Figma: line color = #caaece (brand/primary/300), label text = #caaece 12px Lato Regular */
.divider {
  border: none;
  border-top: 1px solid var(--color-primary-300); /* #caaece */
  margin: 0;
}
.divider-labeled {
  display: flex;
  align-items: center;
  gap: var(--spacing-12);
  color: var(--color-primary-300); /* #caaece */
  font-family: var(--font-body);
  font-weight: var(--font-weight-regular);
  font-size: 12px;
  line-height: normal;
}
.divider-labeled::before,
.divider-labeled::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-primary-300); /* #caaece */
}

/* ── Avatar ── */
/* Figma: bg=#d5aed9 (ui/primary/200), text=#432842 (ui/primary/800) */
.avatar {
  border-radius: 50%;
  background: var(--color-primary-200); /* #d5aed9 */
  color: var(--color-primary-800-avatar); /* #432842 */
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: var(--font-weight-medium);
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
/* type=initials sizes — font sizes from Figma: sm=10, md=12, lg=18, xl=24 */
.avatar-sm { width: 24px; height: 24px; font-size: 10px; }
.avatar-md { width: 32px; height: 32px; font-size: 12px; }
.avatar-lg { width: 48px; height: 48px; font-size: 18px; }
.avatar-xl { width: 64px; height: 64px; font-size: 24px; }
/* type=icon: border instead of filled bg */
.avatar-icon {
  background: transparent;
  border: 1px solid var(--color-border-default); /* Figma: 1px not 1.5px */
}

/* ── Navbar ── */
.navbar {
  background: var(--color-primary-50);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 var(--spacing-32);
  width: 100%;
}
.navbar-brand {
  font-family: var(--font-heading);
  font-weight: var(--font-weight-medium);
  font-size: var(--text-xl);
  color: var(--color-text-primary);
  text-decoration: none;
}
.navbar-links {
  display: flex;
  align-items: center;
  gap: var(--spacing-24);
  list-style: none;
}
.navbar-links a {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.navbar-links a:hover { color: var(--color-interactive-default); }

/* ── Pagination ──
   Figma: border=1.5px #9a729c, border-radius=6px, size=32px, text=14px #6b496d
   Active: bg #9a729c, text #fafafa. Arrow buttons use same border style. */
.pagination {
  display: flex;
  align-items: center;
  gap: 4px; /* Figma: gap=4px */
}
.pagination-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;                               /* Figma: 6px not 4px */
  border: 1.5px solid var(--color-border-default);  /* #9a729c not gray */
  background: var(--color-surface);
  color: var(--color-text-secondary);               /* #6b496d not #1a1a1a */
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: var(--font-weight-regular);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: normal;
  transition: background var(--transition-fast), border-color var(--transition-fast);
  flex-shrink: 0;
}
.pagination-btn:hover:not(:disabled):not(.active) {
  background: var(--color-primary-50);
}
.pagination-btn.active {
  background: var(--color-interactive-default); /* #9a729c */
  border-color: var(--color-interactive-default);
  color: var(--color-interactive-text);         /* #fafafa */
  font-weight: var(--font-weight-medium);
}
.pagination-ellipsis {
  width: auto;
  padding: 0 10px;
  height: 32px;
  border: none;
  background: var(--color-surface);
  color: var(--color-text-primary);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-family: var(--font-body);
}
.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Skeleton ──
   Figma: bg=#e6e6e6, text-line height=12px, border-radius=6px
   Card: top 140px image area with rounded-top-8px, lines at 12px height
   Avatar: 40px circle + two 10px lines */
@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.skeleton {
  background: #e6e6e6; /* Figma exact: #e6e6e6 not #e8e8e8 */
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}
/* Text variant: stacked lines */
.skeleton-text-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.skeleton-line {
  height: 12px;          /* Figma: 12px */
  border-radius: 6px;    /* Figma: 6px */
  background: #e6e6e6;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}
/* Avatar variant: circle + lines */
.skeleton-avatar-block {
  display: flex;
  align-items: center;
  gap: 12px;
}
.skeleton-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e6e6e6;
  flex-shrink: 0;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}
.skeleton-avatar-lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.skeleton-avatar-line {
  height: 10px;
  border-radius: 5px;
  background: #e6e6e6;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}
/* Card variant: image placeholder + lines */
.skeleton-card-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 280px;
}
.skeleton-card-image {
  height: 140px;
  border-radius: 8px 8px 0 0; /* Figma: rounded top only */
  background: #e6e6e6;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}
/* Legacy helpers kept for backward compat */
.skeleton-text  { height: 12px; border-radius: 6px; background: #e6e6e6; }
.skeleton-title { height: 20px; border-radius: 6px; background: #e6e6e6; }
.skeleton-avatar { border-radius: 50%; background: #e6e6e6; }

/* ── Modal ──
   Figma structure:
   ┌─────────────────────────────────┐  ← bg #f7f2f8 (primary-50), rounded-top-16
   │  Modal Title              [✕]  │    Title: Cormorant Garamond Medium 24px, #6b496d
   ├─────────────────────────────────┤
   │  Content area (white)           │    Lato Regular 16px, #1a1a1a
   ├─────────────────────────────────┤
   │              [Cancel] [Confirm] │    gap: 12px
   └─────────────────────────────────┘
   Overall: 1px border #ede3ef, shadow 0 8px 32px rgba(0,0,0,0.20)             */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: var(--spacing-16);
}
.modal {
  background: var(--color-surface);
  border-radius: 16px;
  border: 1px solid var(--color-primary-100); /* #ede3ef */
  box-shadow: var(--shadow-modal); /* 0 8px 32px 0 rgba(0,0,0,0.20) — Figma DROP_SHADOW */
  display: flex;
  flex-direction: column;
  overflow: hidden; /* clip header bg to rounded corners */
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-sm { width: 360px; }
.modal-md { width: 480px; }
.modal-lg { width: 640px; }

/* ── Header — primary-50 background ── */
.modal-header {
  background: var(--color-primary-50); /* #f7f2f8 */
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--spacing-16);
  padding: var(--spacing-16) var(--spacing-24) var(--spacing-8);
  flex-shrink: 0;
}
.modal-lg .modal-header {
  padding: var(--spacing-24) var(--spacing-24) var(--spacing-16) var(--spacing-32);
}
.modal-title {
  font-family: var(--font-heading);
  font-weight: var(--font-weight-medium); /* Figma: Medium not Bold */
  font-size: 24px;                         /* Figma: Cormorant Garamond Medium 24px */
  color: var(--color-text-secondary);      /* Figma: #6b496d NOT #1a1a1a */
  line-height: normal;
  white-space: nowrap;
}
.modal-lg .modal-title {
  font-weight: 600; /* Figma lg: SemiBold */
  font-size: 32px;
}
.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-secondary);
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-4);
  flex-shrink: 0;
  transition: color var(--transition-fast);
}
.modal-close:hover { color: var(--color-text-primary); }

/* ── Body ── */
.modal-body {
  font-family: var(--font-body);
  font-weight: var(--font-weight-regular);
  font-size: 16px;  /* Figma: Body/base/16/Regular */
  color: var(--color-text-primary);
  line-height: var(--leading-relaxed);
  padding: var(--spacing-16) var(--spacing-24);
  flex: 1;
}
.modal-lg .modal-body {
  padding: var(--spacing-16) var(--spacing-32);
}

/* ── Footer ── */
.modal-footer {
  display: flex;
  gap: 12px; /* Figma: 12px not 8px */
  justify-content: flex-end;
  padding: var(--spacing-8) var(--spacing-16) var(--spacing-16);
  flex-shrink: 0;
}
.modal-lg .modal-footer {
  padding: var(--spacing-16) var(--spacing-24) var(--spacing-16) var(--spacing-32);
}

/* ── Breadcrumb ──
   Figma: all items (links + separator /) = Lato Regular, #6b496d
   Current page = Lato Medium, #1a1a1a — no hover states shown in Figma */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 4px; /* Figma: gap=4px */
  flex-wrap: wrap;
}
.breadcrumb-item {
  font-family: var(--font-body);
  font-weight: var(--font-weight-regular);
  font-size: 14px; /* default md size */
  color: var(--color-text-secondary); /* #6b496d */
  text-decoration: none;
  line-height: normal;
}
.breadcrumb-item.current {
  color: var(--color-text-primary);    /* #1a1a1a */
  font-weight: var(--font-weight-medium);
}
/* Separator slash inherits same color as items */
.breadcrumb-separator {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--color-text-secondary); /* #6b496d — same as items */
  line-height: normal;
  user-select: none;
}
/* Size variants */
.breadcrumb-sm .breadcrumb-item,
.breadcrumb-sm .breadcrumb-separator { font-size: 12px; }
.breadcrumb-lg .breadcrumb-item,
.breadcrumb-lg .breadcrumb-separator { font-size: 16px; }

/* ── Utility helpers ── */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
