/**
 * Bakery ERP Suite — Shared Design System Tokens & Base Styles
 * Handle: bakery-design-system
 * Version: 1.0.0
 */

:root {
  /* Brand Palette (Warm Artisanal Bakery) */
  --bakery-primary: #78350f;
  --bakery-secondary: #d97706;
  --bakery-accent: #b45309;
  --bakery-bg: #fefbf6;
  --bakery-text: #292524;

  /* Additional Foundation Tokens */
  --bakery-surface: #ffffff;
  --bakery-border: #e7e5e4;
  --bakery-muted: #78716c;
  --bakery-subtle: #f5f5f4;
  --bakery-success: #15803d;
  --bakery-warning: #b45309;
  --bakery-danger: #b91c1c;
  --bakery-info: #0369a1;

  /* Typography */
  --bakery-font-heading: 'Playfair Display', Georgia, serif;
  --bakery-font-body: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Shapes & Shadows */
  --bakery-radius: 8px;
  --bakery-radius-sm: 4px;
  --bakery-radius-lg: 12px;
  --bakery-radius-full: 9999px;
  --bakery-shadow-sm: 0 1px 2px 0 rgba(41, 37, 36, 0.05);
  --bakery-shadow: 0 4px 6px -1px rgba(41, 37, 36, 0.08), 0 2px 4px -2px rgba(41, 37, 36, 0.06);
  --bakery-shadow-lg: 0 10px 15px -3px rgba(41, 37, 36, 0.08), 0 4px 6px -4px rgba(41, 37, 36, 0.04);
}

/* Base resets & typography when wrapped in .bakery-scope */
.bakery-scope {
  font-family: var(--bakery-font-body);
  color: var(--bakery-text);
  background-color: var(--bakery-bg);
}

.bakery-scope h1,
.bakery-scope h2,
.bakery-scope h3,
.bakery-scope h4,
.bakery-scope h5,
.bakery-scope h6,
.bakery-heading {
  font-family: var(--bakery-font-heading);
  color: var(--bakery-primary);
  font-weight: 700;
  line-height: 1.25;
}

/* Standard Bakery Buttons */
.bakery-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--bakery-font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.25;
  padding: 0.625rem 1.25rem;
  border-radius: var(--bakery-radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  text-decoration: none;
  white-space: nowrap;
}

.bakery-btn-primary {
  background-color: var(--bakery-primary);
  color: #ffffff;
  border-color: var(--bakery-primary);
}

.bakery-btn-primary:hover {
  background-color: #59250a;
  border-color: #59250a;
  color: #ffffff;
}

.bakery-btn-secondary {
  background-color: var(--bakery-secondary);
  color: #ffffff;
  border-color: var(--bakery-secondary);
}

.bakery-btn-secondary:hover {
  background-color: #b45309;
  border-color: #b45309;
  color: #ffffff;
}

.bakery-btn-outline {
  background-color: transparent;
  color: var(--bakery-primary);
  border-color: var(--bakery-primary);
}

.bakery-btn-outline:hover {
  background-color: rgba(120, 53, 15, 0.06);
}

/* Standard Bakery Cards */
.bakery-card {
  background-color: var(--bakery-surface);
  border: 1px solid var(--bakery-border);
  border-radius: var(--bakery-radius);
  padding: 1.25rem;
  box-shadow: var(--bakery-shadow-sm);
}

/* Badges & Status Pills */
.bakery-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--bakery-radius-full);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.bakery-badge-pending {
  background-color: #fef3c7;
  color: #92400e;
}

.bakery-badge-confirmed {
  background-color: #e0f2fe;
  color: #0369a1;
}

.bakery-badge-in_progress {
  background-color: #ede9fe;
  color: #6d28d9;
}

.bakery-badge-ready {
  background-color: #dcfce7;
  color: #15803d;
}

.bakery-badge-delivered {
  background-color: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.bakery-badge-cancelled {
  background-color: #fee2e2;
  color: #991b1b;
}

/* Form Controls */
.bakery-input,
.bakery-select,
.bakery-textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-family: var(--bakery-font-body);
  font-size: 0.9375rem;
  color: var(--bakery-text);
  background-color: var(--bakery-surface);
  border: 1px solid var(--bakery-border);
  border-radius: var(--bakery-radius);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.bakery-input:focus,
.bakery-select:focus,
.bakery-textarea:focus {
  outline: none;
  border-color: var(--bakery-secondary);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}
