/* ────────────────────────────────────────────────────────────────────────────
   Shared Brand & Component Styles
   ──────────────────────────────────────────────────────────────────────────── */

/* ── Brand Tokens ── */
:root {
  /* Primary Colors */
  --navy: #104060;
  --navy-dark: #0b2d44;
  --navy-light: #185a80;
  --pink: #d92b96;
  --pink-hover: #c02585;

  /* Neutral Colors */
  --bg: #f7f6f4;
  --white: #ffffff;
  --grey-600: #5a6a78;
  --grey-800: #2c3e4a;

  /* Extended Greys (for flexibility) */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;

  /* Semantic Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Shadow */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* ── Typography ── */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.9375rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 600;
  line-height: 1.2;
}

p {
  margin: 0;
}

/* ────────────────────────────────────────────────────────────────────────────
   Shared Component Styles
   ──────────────────────────────────────────────────────────────────────────── */

/* ── Tab Bar ── */
.tab-bar {
  display: flex;
  gap: 2rem;
  border-bottom: 1px solid var(--gray-200);
  padding: 0;
  margin: 0;
  background: var(--white);
}

/* ── Tab Button ── */
.tab-btn {
  padding: 1rem 0;
  font-size: 0.9rem;
  font-weight: 500;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--navy);
  border-bottom-color: var(--gray-300);
}

.tab-btn.active {
  color: var(--pink);
  border-bottom-color: var(--pink);
}

/* ── Tool Header ── */
.tool-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-lg) var(--spacing-xl);
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  gap: var(--spacing-lg);
}

/* ── Tool Title ── */
.tool-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0;
}

/* ── Card ── */
.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  border-color: var(--gray-300);
  box-shadow: var(--shadow-md);
}

/* ── Badge Severity ── */
.badge-high,
.badge-medium,
.badge-low {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.badge-high {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

.badge-medium {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
}

.badge-low {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

/* ── Button Primary ── */
.btn-primary {
  padding: 0.625rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--pink);
  color: var(--white);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary:hover {
  background: var(--pink-hover);
  box-shadow: 0 4px 12px rgba(208, 32, 144, 0.3);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-primary:disabled {
  background: var(--gray-400);
  cursor: not-allowed;
  box-shadow: none;
}

/* ── Button Secondary ── */
.btn-secondary {
  padding: 0.625rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--navy);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  text-decoration: none;
}

.btn-secondary:hover {
  background: var(--navy);
  color: var(--white);
}

.btn-secondary:active {
  transform: scale(0.98);
}

.btn-secondary:disabled {
  border-color: var(--gray-300);
  color: var(--gray-400);
  cursor: not-allowed;
}

/* ── Chip ── */
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.375rem 0.875rem;
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: default;
  transition: all 0.2s ease;
}

.chip:hover {
  background: var(--gray-200);
  border-color: var(--gray-300);
}

.chip.removable {
  cursor: pointer;
}

.chip.removable:hover {
  background: var(--gray-300);
}

.chip.active {
  background: rgba(208, 32, 144, 0.1);
  color: var(--pink);
  border-color: var(--pink);
}

/* ── Empty State ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-2xl) var(--spacing-lg);
  text-align: center;
  color: var(--gray-500);
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-lg);
  flex-shrink: 0;
}

.empty-state-icon svg {
  width: 32px;
  height: 32px;
  stroke: var(--gray-400);
  fill: none;
  stroke-width: 1.5;
}

.empty-state-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
}

.empty-state-text {
  font-size: 0.9rem;
  color: var(--gray-600);
  max-width: 400px;
  margin-bottom: var(--spacing-lg);
  line-height: 1.6;
}

/* ────────────────────────────────────────────────────────────────────────────
   Utility Classes
   ──────────────────────────────────────────────────────────────────────────── */

.text-primary {
  color: var(--navy);
}

.text-secondary {
  color: var(--gray-600);
}

.text-muted {
  color: var(--gray-500);
}

.text-error {
  color: var(--error);
}

.text-success {
  color: var(--success);
}

.text-warning {
  color: var(--warning);
}

.text-small {
  font-size: 0.85rem;
}

.text-bold {
  font-weight: 600;
}

.mb-0 { margin-bottom: 0; }
.mb-xs { margin-bottom: var(--spacing-xs); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }

.mt-0 { margin-top: 0; }
.mt-xs { margin-top: var(--spacing-xs); }
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }

.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-center { align-items: center; justify-content: center; }
.flex-between { justify-content: space-between; }
.flex-end { justify-content: flex-end; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
