/* ==================================================================
   SIGNAL BEAM - DESIGN SYSTEM
   Loops.so-inspired aesthetic
   ================================================================== */

/* ============================================================
   1. CSS VARIABLES (Design Tokens)
   ============================================================ */

:root {
  /* Grays */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2933;
  --gray-900: #111827;

  /* Accent (Loops purple/blue) */
  --accent: #5f6af5;
  --accent-soft: rgba(95, 106, 245, 0.12);
  --accent-dark: #4046c5;

  /* Status colors */
  --success: #16a34a;
  --success-bg: #ecfdf3;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --error: #ef4444;
  --error-bg: #fef2f2;

  /* Cards & borders */
  --card-bg: #ffffff;
  --card-radius: 16px;
  --border-subtle: rgba(15, 23, 42, 0.06);

  /* Shadows */
  --shadow-card: 0 18px 45px rgba(15, 23, 42, 0.06);
  --shadow-button: 0 8px 22px rgba(95, 106, 245, 0.35);

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter",
    "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
}

/* ============================================================
   2. GLOBAL RESET & BASE STYLES
   ============================================================ */

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  color: var(--gray-900);
  background: radial-gradient(140% 140% at 0% 0%, #f4f2ff 0%, #ffffff 45%, #f8fbff 100%);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ============================================================
   3. TYPOGRAPHY
   ============================================================ */

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--gray-900);
}

h1 {
  font-size: 1.8rem;
}

h2 {
  font-size: 1.25rem;
}

h3 {
  font-size: 1.1rem;
}

p {
  margin: 0;
  color: var(--gray-600);
  line-height: 1.5;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--accent-dark);
}

/* Prevent underline on button-styled links */
a.btn,
a.btn:hover {
  text-decoration: none;
}

code,
.code-inline {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: #eef2ff;
  color: var(--accent-dark);
  padding: 2px 6px;
  border-radius: 4px;
}

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

.text-tertiary {
  color: var(--gray-400);
}

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

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

.text-xs {
  font-size: 0.75rem;
}

.text-base {
  font-size: 1rem;
}

.font-semibold {
  font-weight: 600;
}

/* ============================================================
   4. LAYOUT CONTAINERS
   ============================================================ */

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 24px 48px;
}

.grid-layout {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 24px;
  align-items: start;
}

/* ============================================================
   5. CARDS
   ============================================================ */

.card {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  padding: 24px;
}

.card+.card {
  margin-top: 24px;
}

/* ============================================================
   6. BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease,
    background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Primary button */
.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  border-color: transparent;
  box-shadow: var(--shadow-button);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(95, 106, 245, 0.4);
}

/* Secondary button */
.btn-secondary {
  color: var(--accent);
  background: #ffffff;
  border-color: rgba(95, 106, 245, 0.35);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--accent-soft);
}

/* Ghost button */
.btn-ghost {
  color: var(--gray-600);
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(15, 23, 42, 0.04);
}

.btn-ghost:hover:not(:disabled) {
  background: #ffffff;
}

/* Danger button */
.btn-danger {
  color: var(--error);
  background: #ffffff;
  border-color: var(--error);
}

.btn-danger:hover:not(:disabled) {
  background: var(--error);
  color: #ffffff;
}

/* Small button variant */
.btn-sm {
  padding: 0.25rem 0.7rem;
  font-size: 0.78rem;
}

.btn-primary-cyan {
  color: #ffffff;
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
  border-color: transparent;
  box-shadow: 0 8px 22px rgba(6, 182, 212, 0.35);
}

.btn-primary-cyan:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(6, 182, 212, 0.4);
}

/* Primary button with emphasis (for row-level TikTok setup CTA) */
.btn-primary-emphasis {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  border-color: transparent;
  box-shadow: var(--shadow-button);
  animation: pulse-attention 2s ease-in-out infinite;
}

.btn-primary-emphasis:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(95, 106, 245, 0.4);
  animation: none;
}

@keyframes pulse-attention {
  0%, 100% {
    box-shadow: var(--shadow-button);
  }
  50% {
    box-shadow: 0 8px 28px rgba(95, 106, 245, 0.5);
  }
}

/* ============================================================
   7. FORM INPUTS
   ============================================================ */

.input,
input[type="text"],
input[type="email"],
input[type="password"],
textarea {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--gray-300);
  font-size: 0.9rem;
  font-family: var(--font-sans);
  color: var(--gray-900);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea {
  border-radius: 12px;
  resize: vertical;
  min-height: 80px;
}

.input:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 6px;
}

/* ============================================================
   8. BADGES & STATUS PILLS
   ============================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(22, 163, 74, 0.35);
}

.badge-tracking {
  background: var(--gray-900);
  color: #ffffff;
}

.badge-muted {
  background: var(--gray-100);
  color: var(--gray-600);
  border: 1px solid var(--gray-300);
}

.badge-warning {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

/* ============================================================
   9. BANNERS
   ============================================================ */

/* Compliance Disclaimer Banner */
.compliance-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-left: 4px solid #f59e0b;
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
}

.disclaimer-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.disclaimer-content {
  font-size: 0.875rem;
  line-height: 1.6;
  color: #92400e;
}

.disclaimer-content strong {
  color: #78350f;
}

.banner {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}

.banner-success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(22, 163, 74, 0.3);
}

.banner-warning {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.banner-small {
  padding: 8px 12px;
  font-size: 0.8rem;
}

/* ============================================================
   10. DASHBOARD HEADER & NAV
   ============================================================ */

.dashboard-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.dashboard-nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-brand {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-600);
  letter-spacing: -0.01em;
}

/* Logo in header/navbar */
.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-image {
  height: 36px;
  width: auto;
  object-fit: contain;
}

/* Auth page logo */
.auth-logo-link {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.auth-logo-image {
  height: 44px;
  width: auto;
  object-fit: contain;
}

/* For smaller screens */
@media (max-width: 768px) {
  .logo-image {
    height: 30px;
  }
  
  .auth-logo-image {
    height: 36px;
  }
}

.dashboard-nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dashboard-header {
  margin-bottom: 24px;
}

.dashboard-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
}

.header-title-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.header-subtitle {
  font-size: 0.95rem;
}

/* ============================================================
   11. SECTION HEADERS
   ============================================================ */

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: 1.1rem;
}

.section-description {
  font-size: 0.9rem;
  margin-bottom: 12px;
  color: var(--gray-600);
}

/* ============================================================
   12. EMPTY STATES
   ============================================================ */

.empty-state {
  margin-top: 8px;
  border-radius: 12px;
  border: 1px dashed var(--gray-300);
  padding: 28px 16px;
  text-align: center;
  color: var(--gray-500);
}

/* ============================================================
   13. TABLES
   ============================================================ */

.table-wrapper,
.table-container {
  margin-top: 12px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: #ffffff;
}

.sites-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.sites-table thead {
  background: var(--gray-50);
}

.sites-table th,
.sites-table td {
  padding: 10px 14px;
  text-align: left;
}

.sites-table th {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-600);
  border-bottom: 1px solid rgba(148, 163, 184, 0.6);
}

.sites-table tbody tr {
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.sites-table tbody tr:last-child {
  border-bottom: none;
}

.sites-table tbody tr:hover {
  background: var(--gray-50);
}

/* Table cell specific styles */
.pixel-id-cell {
  font-family: var(--font-mono);
  color: var(--gray-700);
}

.status-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.status-subtext {
  font-size: 0.75rem;
  color: var(--gray-500);
}

.status-subtext-warning {
  color: var(--warning);
  font-weight: 500;
}

.events-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.events-main {
  font-size: 0.9rem;
  font-weight: 500;
}

.events-subtext {
  font-size: 0.72rem;
  color: var(--gray-500);
}

.loading {
  padding: 24px;
  text-align: center;
  color: var(--gray-500);
  font-size: 0.9rem;
  font-style: italic;
}

/* ============================================================
   14. MODALS
   ============================================================ */

.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.modal-header h3,
.modal-title {
  font-size: 1.25rem;
  margin: 0;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--gray-400);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.15s ease;
}

.modal-close:hover {
  color: var(--gray-600);
}

.modal-body {
  margin-bottom: 20px;
}

.instructions {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--gray-700);
  margin-bottom: 16px;
}

.instructions ol {
  padding-left: 20px;
  margin: 8px 0;
}

.instructions li {
  margin-bottom: 6px;
}

.code-block {
  background: var(--gray-900);
  color: #ffffff;
  padding: 16px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  overflow-x: auto;
  white-space: pre;
  margin-top: 12px;
}

.modal-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* Form groups in modals */
.form-group {
  margin-bottom: 16px;
}

.form-group:last-child {
  margin-bottom: 0;
}

/* ============================================================
   15. NOTIFICATIONS / ALERTS
   ============================================================ */

.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  padding: 16px 20px;
  max-width: 400px;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transform: translateX(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.notification.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.notification-success {
  border-left: 4px solid var(--success);
}

.notification-error {
  border-left: 4px solid var(--error);
}

.notification-warning {
  border-left: 4px solid var(--warning);
}

/* Error messages in forms */
.error-message {
  display: none;
  background: var(--error-bg);
  color: var(--error);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 16px;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ============================================================
   16. HELP CARD
   ============================================================ */

.help-card-title {
  margin-bottom: 6px;
}

.help-card-body p {
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.help-card-body ol {
  padding-left: 20px;
  margin: 6px 0 12px;
  font-size: 0.9rem;
  color: var(--gray-600);
}

.help-card-body li {
  margin-bottom: 4px;
}

.help-card-body a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.help-card-body a:hover {
  text-decoration: underline;
}

.help-list,
.class-ref-list,
.example-list {
  padding-left: 20px;
  margin: 8px 0 16px;
  font-size: 0.9rem;
  color: var(--gray-600);
}

.help-list li,
.example-list li {
  margin-bottom: 6px;
}

.class-ref-list {
  list-style: none;
  padding-left: 0;
}

.class-ref-list li {
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.class-ref-list strong {
  color: var(--accent-dark);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.class-ref-list span {
  font-size: 0.85rem;
  color: var(--gray-500);
}

.icon-spacing {
  font-size: 1.2rem;
}

/* ============================================================
   17. AUTH PAGES
   ============================================================ */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--card-bg);
  border-radius: var(--card-radius);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  padding: 30px 26px;
}

.auth-card-header {
  text-align: center;
  margin-bottom: 20px;
}

.auth-card-header h1 {
  font-size: 1.4rem;
  margin-bottom: 4px;
}

.auth-card-header p {
  font-size: 0.9rem;
  color: var(--gray-600);
}

.auth-header {
  text-align: center;
  margin-bottom: 24px;
}

.app-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
}

.label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

.link:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.auth-footer {
  margin-top: 18px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--gray-500);
}

.auth-footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* ============================================================
   18. UTILITY CLASSES
   ============================================================ */

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 {
  gap: 8px;
}

.gap-3 {
  gap: 12px;
}

.gap-4 {
  gap: 16px;
}

.gap-6 {
  gap: 24px;
}

.text-center {
  text-align: center;
}

.hidden {
  display: none;
}

.mb-2 {
  margin-bottom: 8px;
}

.mb-4 {
  margin-bottom: 16px;
}

.mb-6 {
  margin-bottom: 24px;
}

.mt-3 {
  margin-top: 12px;
}

.mt-4 {
  margin-top: 16px;
}

/* ============================================================
   19. RESPONSIVE
   ============================================================ */

@media (max-width: 1100px) {
  .grid-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .dashboard-header-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-nav {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 24px 16px 32px;
  }

  .card {
    padding: 20px 18px;
  }

  .modal {
    padding: 20px;
  }

  .dashboard-header-top {
    flex-direction: column;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* ============================================================
   20. EVENT ANALYTICS CHART
   ============================================================ */

.analytics-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.time-range-btn {
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--gray-300);
  background: #ffffff;
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.15s ease;
}

.time-range-btn:hover {
  background: var(--gray-50);
  border-color: var(--gray-400);
}

.time-range-btn.active {
  background: var(--accent-soft);
  border-color: rgba(95, 106, 245, 0.35);
  color: var(--accent);
  font-weight: 500;
}

#analyticsChartContainer {
  position: relative;
  min-height: 300px;
  width: 100%;
}

#analyticsChart {
  width: 100%;
  height: 300px;
  display: block;
}

#analyticsLoading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

#analyticsEmptyState {
  margin-top: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% - 48px);
}

/* ============================================================
   21. EVENT MATCH QUALITY DASHBOARD
   ============================================================ */

.match-quality-score-card {
  background: linear-gradient(135deg, #f8fbff 0%, #f4f2ff 100%);
  border-radius: var(--card-radius);
  padding: 48px;
  margin: 24px 0;
}

.score-display {
  display: flex;
  align-items: center;
  gap: 48px;
  justify-content: center;
}

.score-circle {
  position: relative;
  width: 120px;
  height: 120px;
}

.score-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.score-value span:first-child {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1;
}

.score-max {
  font-size: 1.2rem;
  color: var(--gray-500);
  margin-left: 4px;
}

.score-info h2 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.score-info p {
  font-size: 1rem;
  margin: 0;
}

/* Breakdown Metrics */
.metric-row {
  margin-bottom: 24px;
}

.metric-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--gray-700);
}

.metric-value {
  font-weight: 600;
  color: var(--gray-900);
}

.metric-bar {
  height: 8px;
  background: var(--gray-200);
  border-radius: 4px;
  overflow: hidden;
}

.metric-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease-out, background-color 0.3s;
}

.metrics-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

.summary-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.summary-label {
  font-size: 0.85rem;
  color: var(--gray-500);
}

.summary-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
}

.summary-value.success {
  color: var(--success);
}

.summary-value.error {
  color: var(--error);
}

/* Recommendations */
.recommendation-item {
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 16px;
  border-left: 4px solid;
  background: var(--gray-50);
}

.recommendation-high {
  border-left-color: var(--error);
  background: var(--error-bg);
}

.recommendation-medium {
  border-left-color: var(--warning);
  background: var(--warning-bg);
}

.recommendation-low {
  border-left-color: var(--success);
  background: var(--success-bg);
}

.recommendation-success {
  border-left-color: var(--success);
  background: var(--success-bg);
}

.recommendation-info {
  border-left-color: var(--accent);
  background: var(--accent-soft);
}

.recommendation-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.recommendation-icon {
  font-size: 1.2rem;
}

.recommendation-title {
  font-size: 1.1rem;
  margin: 0;
  color: var(--gray-900);
}

.recommendation-description {
  margin: 8px 0;
  color: var(--gray-700);
  line-height: 1.6;
}

.recommendation-action {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.9rem;
  color: var(--gray-600);
}

.recommendation-action strong {
  color: var(--gray-900);
}

/* Trends Chart Container */
#trendsChartContainer {
  position: relative;
  min-height: 300px;
}

#trendsChart {
  width: 100%;
  height: 300px;
}

@media (max-width: 640px) {
  .score-display {
    flex-direction: column;
    gap: 24px;
    text-align: center;
  }

  .match-quality-score-card {
    padding: 32px 24px;
  }

  .metrics-summary {
    grid-template-columns: 1fr;
  }
}