/* AIOS Design System — Quiet Luxury (designguide.md)
   Cream · champagne gold · evergreen. One theme for all businesses. */
:root {
  /* Cream atmosphere */
  --cream-50: #fbf8f2;
  --cream-100: #f5efe2;
  --cream-200: #ece2ce;

  /* Champagne gold */
  --gold-50: #fdfaf1;
  --gold-100: #f7ecc9;
  --gold-200: #eed99a;
  --gold-300: #e2c274;
  --gold-400: #d4a94f;
  --gold-500: #b98a37;
  --gold-600: #986f2a;
  --gold-700: #775622;
  --gold-800: #775622;

  /* Brand = evergreen (structural / CTAs) */
  --brand-950: #0a1814;
  --brand-900: #0a1814;
  --brand-800: #132821;
  --brand-700: #1e3630;
  --brand-600: #2c4a3f;
  --brand-500: #4a7663;
  --brand-400: #8fb4a2;
  --brand-200: #dfe9e3;
  --brand-100: #e8efe9;
  --brand-50: #f2f6f3;

  /* Evergreen aliases (deck / designguide) */
  --green-950: #0a1814;
  --green-900: #132821;
  --green-300: #8fb4a2;
  --green-500: #4a7663;

  /* Warm cream neutrals */
  --gray-50: #fbf8f2;
  --gray-100: #f5efe2;
  --gray-200: #e5ddc9;
  --gray-300: #d4cbb4;
  --gray-400: #a8a49a;
  --gray-500: #7a807a;
  --gray-600: #5c635c;
  --gray-700: #2c4a3f;
  --gray-800: #1e3630;
  --gray-900: #0a1814;

  /* Semantic success (bright — distinct from brand evergreen) */
  --green-50: #eef6f0;
  --green-100: #d8ebe0;
  --green-600: #3d8f6a;
  --green-700: #2f7355;
  --green-800: #245a43;

  /* Semantic destructive */
  --red-50: #fef2f2;
  --red-100: #fee2e2;
  --red-600: #dc2626;
  --red-700: #b91c1c;
  --red-800: #991b1b;

  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-200: #fde68a;
  --amber-800: #92400e;
  --amber-900: #78350f;

  --orange-100: #ffedd5;
  --orange-800: #9a3412;

  --ink: #0a1814;
  --muted: #7a807a;
  --divider: #e5ddc9;
  --focus-ring: #b98a37;
  --sage-500: #7ba58e;
  --rose-500: #c85a6a;

  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'Outfit', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font: var(--font-body);

  --sidebar-w: 256px;
  --sidebar-collapsed: 80px;
  --header-h: 64px;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-2xl: 28px;

  --shadow-sm:
    0 1px 2px hsl(165 20% 20% / 0.04),
    0 4px 12px -6px hsl(165 30% 12% / 0.08);
  --shadow-md:
    0 1px 2px hsl(165 20% 20% / 0.05),
    0 8px 24px -12px hsl(165 30% 12% / 0.12);
  --shadow-lg:
    0 1px 2px hsl(165 20% 20% / 0.05),
    0 12px 40px -18px hsl(165 30% 12% / 0.14);
  --shadow-2xl:
    0 4px 16px -4px hsl(165 30% 12% / 0.08),
    0 24px 60px -20px hsl(165 40% 10% / 0.28);
  --shadow-soft:
    0 1px 2px hsl(165 20% 20% / 0.04),
    0 8px 24px -12px hsl(165 30% 12% / 0.10);
  --shadow-card:
    0 1px 2px hsl(165 20% 20% / 0.05),
    0 12px 40px -18px hsl(165 30% 12% / 0.14);
  --shadow-lift:
    0 4px 16px -4px hsl(165 30% 12% / 0.08),
    0 24px 60px -20px hsl(165 40% 10% / 0.28);

  --ease-lux: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream-50);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* Typography */
.h1 {
  font-family: var(--font-display);
  font-size: 1.875rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.h2 { font-size: 1.25rem; font-weight: 600; color: var(--ink); }
.h3 { font-size: 1rem; font-weight: 600; color: var(--ink); }
.subtitle { color: var(--muted); margin-top: 0.25rem; }
.label { font-size: 0.875rem; font-weight: 500; color: var(--muted); }
.body-sm { font-size: 0.875rem; color: var(--gray-700); }
.helper { font-size: 0.75rem; color: var(--gray-500); }
.stats-label {
  font-size: 0.75rem;
  color: var(--gold-600);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 500;
}
.stats-value {
  font-size: 1.875rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: var(--font-body);
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all 0.25s var(--ease-lux);
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-primary {
  background: var(--brand-700);
  color: var(--cream-50);
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover:not(:disabled) { background: var(--brand-800); }
.btn-secondary {
  background: #ffffff;
  color: var(--brand-800);
  border: 1px solid var(--divider);
}
.btn-secondary:hover:not(:disabled) { background: var(--cream-100); }
.btn-ghost {
  background: transparent;
  color: var(--gray-600);
}
.btn-ghost:hover:not(:disabled) { background: var(--cream-100); color: var(--ink); }
.btn-danger {
  background: #ffffff;
  color: var(--red-700);
  border: 1px solid var(--divider);
}
.btn-danger:hover:not(:disabled) { background: var(--red-50); }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }
.btn-gold {
  background: linear-gradient(135deg, var(--gold-300), var(--gold-400));
  color: var(--brand-950);
  font-weight: 600;
  box-shadow:
    0 1px 2px hsl(42 50% 30% / 0.15),
    0 8px 24px -8px hsl(42 62% 40% / 0.45);
  border: 1px solid hsl(42 55% 55% / 0.3);
}
.btn-gold:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--gold-200), var(--gold-300));
}

/* Inputs */
.input, .textarea, .select {
  width: 100%;
  padding: 0.625rem 1rem;
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  font-size: 0.875rem;
  background: #ffffff;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--gold-500);
  box-shadow: 0 0 0 2px hsl(42 62% 47% / 0.25);
}
.textarea { resize: vertical; min-height: 80px; }
.form-group { display: flex; flex-direction: column; gap: 0.375rem; }
.form-group label { font-size: 0.875rem; font-weight: 500; color: var(--muted); }

/* Cards */
.card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  border: 1px solid hsl(42 30% 86% / 0.7);
  box-shadow: var(--shadow-card);
  padding: 1rem 1.5rem;
}
.card-hover { transition: box-shadow 0.25s var(--ease-lux), transform 0.25s var(--ease-lux); }
.card-hover:hover {
  box-shadow: var(--shadow-lift);
  transform: translateY(-2px);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
}
.badge-pending { background: var(--gold-100); color: var(--gold-700); }
.badge-success, .badge-approved { background: var(--green-100); color: var(--green-800); }
.badge-brand, .badge-on-hire { background: var(--brand-100); color: var(--brand-800); }
.badge-danger, .badge-cancelled { background: var(--red-100); color: var(--red-800); }
.badge-gray { background: var(--cream-100); color: var(--gray-800); }
.badge-warning { background: var(--amber-100); color: var(--amber-800); }
.badge-orange { background: var(--orange-100); color: var(--orange-800); }

/* Callouts */
.callout {
  border-radius: var(--radius);
  padding: 1rem;
  font-size: 0.875rem;
}
.callout-info { background: var(--brand-50); border: 1px solid var(--brand-200); color: var(--brand-900); }
.callout-warning { background: var(--amber-50); border: 1px solid var(--amber-200); color: var(--amber-900); }
.callout-error { background: var(--red-50); border: 1px solid var(--red-100); color: var(--red-700); }
.callout-success { background: var(--green-50); border: 1px solid var(--green-100); color: var(--green-800); }

/* Icons */
.icon { width: 1.25rem; height: 1.25rem; flex-shrink: 0; stroke-width: 1.75; }
.icon-sm { width: 1rem; height: 1rem; }
.icon-lg { width: 1.5rem; height: 1.5rem; }
.icon-xl { width: 2rem; height: 2rem; }

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes countUp {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

.animate-fade-in { animation: fadeIn 0.4s var(--ease-lux) forwards; }
.animate-spin { animation: spin 1s linear infinite; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }
.animate-slide-up { animation: slideUp 0.4s var(--ease-lux) forwards; }

/* Utilities */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.hidden { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabular-nums { font-variant-numeric: tabular-nums; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.text-brand { color: var(--brand-700); }
.text-gold { color: var(--gold-600); }
.text-green { color: var(--green-600); }
.text-red { color: var(--red-600); }
.bg-brand-50 { background: var(--brand-50); }
.bg-gold-50 { background: var(--gold-50); }

/* Grid helpers */
.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-stats { grid-template-columns: repeat(1, 1fr); gap: 1rem; }
@media (min-width: 768px) {
  .grid-stats { grid-template-columns: repeat(2, 1fr); }
  .md\:grid-2 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid-stats { grid-template-columns: repeat(4, 1fr); }
  .lg\:grid-3 { grid-template-columns: repeat(3, 1fr); }
}
