/* Sales Intel Styles - Modern SaaS Design */

:root {
  /* Primary palette - refined blue */
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  
  /* Status colors */
  --success: #10b981;
  --success-light: #d1fae5;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  
  /* Neutral palette - warmer grays */
  --gray-25: #fcfcfd;
  --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: #1f2937;
  --gray-900: #111827;
  --gray-950: #030712;
  
  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Border radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(180deg, var(--gray-50) 0%, var(--gray-100) 100%);
  min-height: 100vh;
  color: var(--gray-900);
  line-height: 1.6;
  font-size: 0.9375rem;
}

/* ===== NAVBAR ===== */
.navbar {
  background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 100%);
  backdrop-filter: blur(10px);
  color: white;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.nav-brand a {
  color: white;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.025em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: opacity var(--transition-fast);
}

.nav-brand a:hover {
  opacity: 0.9;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-links a {
  color: var(--gray-300);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.nav-links a:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

/* ===== MAIN CONTAINER ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  min-height: calc(100vh - 64px - 80px);
}

/* ===== PAGE HEADER ===== */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--gray-200);
}

.page-header h1 {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -0.025em;
  margin-top: 0.25rem;
}

.back-link {
  color: var(--gray-500);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: color var(--transition-fast);
}

.back-link:hover {
  color: var(--primary);
}

.header-actions {
  display: flex;
  gap: 0.75rem;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  background: white;
  color: var(--gray-700);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-xs);
}

.btn:hover {
  background: var(--gray-50);
  border-color: var(--gray-400);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-color: var(--primary-dark);
  color: white;
  box-shadow: var(--shadow-sm), 0 0 0 0 rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  border-color: var(--primary);
  box-shadow: var(--shadow-md), 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
  border-color: #dc2626;
  color: white;
}

.btn-danger:hover {
  background: linear-gradient(135deg, #f87171 0%, var(--danger) 100%);
}

/* ===== CARDS ===== */
.card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-warning {
  border-color: var(--warning);
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

/* ===== BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
  letter-spacing: 0.025em;
}

.badge-prospect {
  background: linear-gradient(135deg, var(--primary-100) 0%, var(--primary-50) 100%);
  color: var(--primary-dark);
  border: 1px solid var(--primary-100);
}

.badge-existing {
  background: linear-gradient(135deg, var(--success-light) 0%, #ecfdf5 100%);
  color: #047857;
  border: 1px solid var(--success-light);
}

/* ===== CUSTOMER GRID ===== */
.customer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.customer-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.customer-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.customer-card:hover {
  border-color: var(--primary-100);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.customer-card:hover::before {
  opacity: 1;
}

.customer-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.customer-header h3 {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.customer-header a {
  color: var(--gray-900);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.customer-header a:hover {
  color: var(--primary);
}

.customer-meta {
  font-size: 0.8125rem;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--gray-100);
}

.action-badge {
  color: var(--warning);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.action-badge::before {
  content: '⚡';
  font-size: 0.75rem;
}

/* ===== BANT+C INDICATORS ===== */
.bantc-indicators {
  display: flex;
  gap: 0.375rem;
  margin-bottom: 0.5rem;
}

.bantc-item {
  min-width: 2rem;
  height: 1.75rem;
  padding: 0 0.5rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all var(--transition-fast);
  cursor: default;
}

.bantc-item.unknown {
  background: var(--gray-100);
  color: var(--gray-500);
  border: 1px solid var(--gray-200);
}

.bantc-item.partial {
  background: linear-gradient(135deg, var(--warning-light) 0%, #fef9c3 100%);
  color: #b45309;
  border: 1px solid #fcd34d;
  box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.2);
}

.bantc-item.confirmed {
  background: linear-gradient(135deg, var(--success-light) 0%, #dcfce7 100%);
  color: #047857;
  border: 1px solid #6ee7b7;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.2);
}

.bantc-item:hover {
  transform: scale(1.05);
}

/* ===== BANT+C GRID (Detail View) ===== */
.bantc-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.bantc-row {
  display: grid;
  grid-template-columns: 110px 100px 1fr;
  gap: 1rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--gray-100);
  align-items: center;
  transition: background var(--transition-fast);
}

.bantc-row:last-child {
  border-bottom: none;
}

.bantc-row:hover {
  background: var(--gray-25);
  margin: 0 -1rem;
  padding-left: 1rem;
  padding-right: 1rem;
  border-radius: var(--radius-sm);
}

.bantc-label {
  font-weight: 600;
  color: var(--gray-700);
  font-size: 0.875rem;
}

.bantc-status {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  text-transform: capitalize;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-full);
  width: fit-content;
}

.bantc-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.bantc-status.unknown {
  color: var(--gray-500);
  background: var(--gray-100);
}
.bantc-status.unknown::before { background: var(--gray-400); }

.bantc-status.partial {
  color: #b45309;
  background: var(--warning-light);
}
.bantc-status.partial::before { background: var(--warning); }

.bantc-status.confirmed {
  color: #047857;
  background: var(--success-light);
}
.bantc-status.confirmed::before { background: var(--success); }

.bantc-notes {
  color: var(--gray-500);
  font-size: 0.8125rem;
  line-height: 1.5;
}

/* ===== FORMS ===== */
.form {
  max-width: 640px;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.375rem;
  color: var(--gray-700);
  font-size: 0.875rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-family: inherit;
  transition: all var(--transition-fast);
  background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group small {
  color: var(--gray-500);
  font-size: 0.8125rem;
  margin-top: 0.375rem;
  display: block;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-200);
}

/* ===== ALERTS ===== */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.alert-error {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border: 1px solid #fecaca;
  color: #991b1b;
}

.alert-error::before {
  content: '⚠️';
}

/* ===== LISTS ===== */
.action-list {
  list-style: none;
}

.action-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--gray-100);
  transition: background var(--transition-fast);
}

.action-item:hover {
  background: var(--gray-25);
  margin: 0 -1rem;
  padding-left: 1rem;
  padding-right: 1rem;
  border-radius: var(--radius-sm);
}

.action-item:last-child {
  border-bottom: none;
}

.action-owner {
  background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-50) 100%);
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-600);
  border: 1px solid var(--gray-200);
}

.action-text.completed {
  text-decoration: line-through;
  color: var(--gray-400);
}

.checkbox {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: transform var(--transition-fast);
}

.checkbox:hover {
  transform: scale(1.1);
}

.inline-form {
  display: inline;
}

/* ===== FACTS ===== */
.fact-category {
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--gray-100);
}

.fact-category:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.fact-category h3 {
  font-size: 0.75rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.fact-list {
  list-style: none;
}

.fact-list li {
  padding: 0.375rem 0;
  font-size: 0.875rem;
  color: var(--gray-700);
}

.fact-list li strong {
  color: var(--gray-900);
}

.confidence {
  color: var(--gray-400);
  font-size: 0.6875rem;
  font-weight: 500;
  margin-left: 0.375rem;
}

/* ===== INTERACTIONS ===== */
.interaction-list {
  list-style: none;
}

.interaction-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--gray-100);
  transition: background var(--transition-fast);
}

.interaction-item:hover {
  background: var(--gray-25);
  margin: 0 -1rem;
  padding-left: 1rem;
  padding-right: 1rem;
  border-radius: var(--radius-sm);
}

.interaction-item:last-child {
  border-bottom: none;
}

.interaction-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-bottom: 0.375rem;
}

.interaction-type {
  background: var(--gray-100);
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  text-transform: capitalize;
}

.interaction-title {
  font-weight: 600;
  color: var(--gray-900);
  font-size: 0.9375rem;
}

.interaction-summary {
  font-size: 0.8125rem;
  color: var(--gray-500);
  margin-top: 0.375rem;
  line-height: 1.5;
}

/* ===== TABLES ===== */
.facts-table {
  width: 100%;
  border-collapse: collapse;
}

.facts-table th,
.facts-table td {
  padding: 0.75rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--gray-100);
}

.facts-table th {
  font-size: 0.6875rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.facts-table tr:hover td {
  background: var(--gray-25);
}

/* ===== EMPTY STATE ===== */
.empty-state,
.empty {
  color: var(--gray-500);
  text-align: center;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, var(--gray-50) 0%, white 100%);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--gray-300);
}

.empty-state a,
.empty a {
  color: var(--primary);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.empty-state a:hover,
.empty a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* ===== BANTC RESULTS ===== */
.bantc-results {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bantc-result-row {
  display: grid;
  grid-template-columns: 100px 100px 1fr;
  gap: 1rem;
  padding: 0.5rem 0;
}

/* ===== ERROR PAGE ===== */
.error-page {
  text-align: center;
  padding: 6rem 2rem;
}

.error-page h1 {
  color: var(--danger);
  margin-bottom: 1rem;
  font-size: 4rem;
  font-weight: 700;
}

.error-page p {
  color: var(--gray-600);
  font-size: 1.125rem;
}

/* ===== GAP COACH ===== */
.card-coach {
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--primary-50) 0%, white 100%);
  border-left: 4px solid var(--primary);
}

.card-success {
  border-color: var(--success);
  background: linear-gradient(135deg, #ecfdf5 0%, white 100%);
  border-left: 4px solid var(--success);
}

.coach-summary {
  font-weight: 500;
  margin-bottom: 1.25rem;
  color: var(--gray-700);
  font-size: 0.9375rem;
}

.gap-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.gap-item {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.gap-item:hover {
  box-shadow: var(--shadow-md);
}

.gap-item.priority-critical {
  border-left: 4px solid var(--danger);
}

.gap-item.priority-high {
  border-left: 4px solid var(--warning);
}

.gap-item.priority-medium {
  border-left: 4px solid var(--primary);
}

.gap-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.625rem;
  flex-wrap: wrap;
}

.gap-label {
  font-weight: 700;
  color: var(--gray-900);
  font-size: 0.9375rem;
}

.gap-status {
  font-size: 0.6875rem;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.025em;
}

.gap-status.unknown {
  background: var(--gray-200);
  color: var(--gray-700);
}

.gap-status.partial {
  background: var(--warning-light);
  color: #92400e;
}

.priority-badge {
  font-size: 0.625rem;
  text-transform: uppercase;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
  color: white;
  font-weight: 700;
  letter-spacing: 0.05em;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.gap-message {
  color: var(--gray-700);
  margin-bottom: 0.625rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

.gap-notes {
  font-size: 0.8125rem;
  color: var(--gray-500);
  font-style: italic;
  margin-bottom: 0.75rem;
  padding: 0.625rem;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
}

.suggested-questions {
  font-size: 0.8125rem;
}

.suggested-questions strong {
  color: var(--primary);
  font-weight: 600;
}

.suggested-questions ul {
  margin-top: 0.375rem;
  margin-left: 1.25rem;
  color: var(--gray-700);
}

.suggested-questions li {
  margin-bottom: 0.375rem;
  line-height: 1.5;
}

.completion-badge {
  background: linear-gradient(135deg, var(--gray-100) 0%, white 100%);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gray-600);
  border: 1px solid var(--gray-200);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--gray-900);
  color: var(--gray-400);
  padding: 1.5rem 2rem;
  text-align: center;
  font-size: 0.8125rem;
  margin-top: auto;
}

.footer a {
  color: var(--gray-300);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer a:hover {
  color: white;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .navbar {
    padding: 0 1rem;
    height: 56px;
  }
  
  .container {
    padding: 1.25rem;
  }

  .page-header {
    flex-direction: column;
    gap: 1rem;
  }
  
  .page-header h1 {
    font-size: 1.5rem;
  }

  .bantc-row,
  .bantc-result-row {
    grid-template-columns: 1fr;
    gap: 0.375rem;
  }
  
  .customer-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 1rem;
  }
}

/* ===== UTILITY CLASSES ===== */
.text-muted { color: var(--gray-500); }
.text-small { font-size: 0.8125rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
