/* ==============================================================================
   BOOKLEAF PUBLISHING - DESIGN SYSTEM & TYPOGRAPHY TOKENS
   ============================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Editorial Palette */
  --primary: #1b4931;             /* Deep Forest Green */
  --primary-hover: #143825;
  --primary-light: #eaf5ea;       /* Sage Green */
  --primary-border: #cde5cd;

  /* Surfaces & Canvas */
  --bg-body: #fafaf9;             /* Warm Editorial Canvas */
  --bg-card: #ffffff;
  --bg-muted: #f5f5f4;
  --border-main: #e7e5e4;
  --border-light: #f5f5f4;

  /* Typography */
  --text-main: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Status Colors */
  --status-open-bg: #fee2e2;
  --status-open: #dc2626;
  --status-progress-bg: #e0f2fe;
  --status-progress: #0284c7;
  --status-resolved-bg: #dcfce7;
  --status-resolved: #15803d;
  --status-closed-bg: #f1f5f9;
  --status-closed: #64748b;
  --status-production-bg: #fef3c7;
  --status-production: #b45309;

  /* Priority Tokens */
  --priority-critical-bg: #fee2e2;
  --priority-critical: #b91c1c;
  --priority-high-bg: #ffedd5;
  --priority-high: #c2410c;
  --priority-medium-bg: #fef9c3;
  --priority-medium: #854d0e;
  --priority-low-bg: #dcfce7;
  --priority-low: #15803d;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.5;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  letter-spacing: -0.025em;
  font-weight: 700;
  color: #0f172a;
}

input, select, textarea, button {
  font-family: var(--font-sans);
}

/* Primary Button */
.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  font-weight: 600;
  border-radius: 12px;
  padding: 10px 18px;
  font-size: 13px;
  transition: all 0.15s ease-in-out;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(27, 73, 49, 0.15);
}

/* Card Container */
.bookleaf-card {
  background: #ffffff;
  border: 1px solid var(--border-main);
  border-radius: 16px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.02), 0 1px 2px -1px rgba(0, 0, 0, 0.02);
}

/* Navigation Links */
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 500;
  color: #475569;
  text-decoration: none;
  transition: all 0.15s ease;
}

.nav-link:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}

.nav-link.active {
  background-color: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.badge-open {
  background-color: var(--status-open-bg);
  color: var(--status-open);
}

.badge-progress {
  background-color: var(--status-progress-bg);
  color: var(--status-progress);
}

.badge-resolved {
  background-color: var(--status-resolved-bg);
  color: var(--status-resolved);
}

.badge-closed {
  background-color: var(--status-closed-bg);
  color: var(--status-closed);
}

.badge-production {
  background-color: var(--status-production-bg);
  color: var(--status-production);
}

.badge-critical {
  background-color: var(--priority-critical-bg);
  color: var(--priority-critical);
}

.badge-high {
  background-color: var(--priority-high-bg);
  color: var(--priority-high);
}

.badge-medium {
  background-color: var(--priority-medium-bg);
  color: var(--priority-medium);
}

.badge-low {
  background-color: var(--priority-low-bg);
  color: var(--priority-low);
}

.badge-confidence {
  background-color: #eaf5ea;
  color: #1b4931;
}

/* Toast Container */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 9999;
}

.toast-item {
  background: #ffffff;
  border: 1px solid var(--border-main);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  border-radius: 14px;
  padding: 14px 16px;
  animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
