/* html/style.css - VEX Intelligence Styles */

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* CSS Variables */
:root {
  --vex-red: #E11D48;
  --vex-navy: #0F172A;
  --vex-dark: #1E293B;
  --vex-silver: #CBD5E1;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #DC2626;
  --gray-50: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-700: #334155;
  --gray-900: #0F172A;
}

/* Base */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--gray-50);
  color: var(--vex-navy);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Auth Screen */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--vex-red) 0%, var(--vex-navy) 100%);
}

.auth-card {
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 400px;
  width: 100%;
  text-align: center;
}

.auth-card h1 {
  font-size: 32px;
  margin-bottom: 8px;
  color: var(--vex-navy);
  font-weight: 800;
  letter-spacing: -0.5px;
}

.auth-card h1::before {
  content: "⚡ ";
}

.auth-card p {
  color: var(--gray-700);
  margin-bottom: 24px;
}

.auth-card .tagline {
  font-size: 14px;
  color: #64748B;
  font-style: italic;
  margin-bottom: 32px;
}

.input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  font-size: 16px;
  margin-bottom: 12px;
}

.input:focus {
  outline: none;
  border-color: var(--vex-red);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.1);
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-primary {
  background: var(--vex-red);
  color: white;
  width: 100%;
}

.btn-primary:hover {
  background: #BE123C;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(225, 29, 72, 0.4);
}

.success-message {
  padding: 16px;
  background: var(--success);
  color: white;
  border-radius: 6px;
  font-weight: 500;
}

.error-message {
  padding: 16px;
  background: var(--danger);
  color: white;
  border-radius: 6px;
  font-weight: 500;
  margin-top: 12px;
}

.info-message {
  padding: 12px; 
  color: #929292; 
  font-size: 12px;
  margin-bottom: 12px; 
}

/* Header */
.header {
  background: var(--vex-navy);
  border-bottom: 3px solid var(--vex-red);
  padding: 24px 0;
  margin-bottom: 32px;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header h1 {
  font-size: 28px;
  color: white;
  font-weight: 800;
  letter-spacing: 2px;
}

.header h1::before {
  content: "⚡ ";
  color: var(--vex-red);
}

.stats {
  display: flex;
  gap: 32px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--vex-red);
}

.stat-label {
  font-size: 11px;
  color: var(--vex-silver);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 1px;
}

/* Sections */
.section {
  background: white;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.section h2 {
  font-size: 20px;
  margin-bottom: 16px;
  color: var(--vex-navy);
  font-weight: 700;
}

.textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  font-family: monospace;
  font-size: 14px;
  margin-bottom: 12px;
  resize: vertical;
}

/* Companies Grid */
.companies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.company-card {
  background: white;
  border: 2px solid var(--gray-200);
  border-radius: 8px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.company-card:hover {
  box-shadow: 0 8px 24px rgba(225, 29, 72, 0.2);
  transform: translateY(-4px);
  border-color: var(--vex-red);
}

.company-card.status-completed {
  border-left: 6px solid var(--success);
}

.company-card.status-processing {
  border-left: 6px solid var(--warning);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.company-card.status-pending {
  border-left: 6px solid var(--gray-200);
}

.company-card.status-failed {
  border-left: 6px solid var(--danger);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 12px;
}

.card-header h3 {
  font-size: 18px;
  color: var(--vex-navy);
  font-weight: 700;
}

.badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-completed {
  background: var(--success);
  color: white;
}

.badge-processing {
  background: var(--warning);
  color: white;
}

.badge-pending {
  background: var(--gray-200);
  color: var(--gray-700);
}

.badge-failed {
  background: var(--danger);
  color: white;
}

.card-body {
  font-size: 14px;
  color: var(--gray-700);
}

.domain {
  color: var(--vex-red);
  font-weight: 500;
}

.industry {
  color: var(--gray-700);
  margin-bottom: 8px;
}

.health-score {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--gray-200);
}

.score-value {
  font-size: 18px;
  font-weight: 800;
  margin-left: 8px;
}

.health-good {
  color: var(--success);
}

.health-medium {
  color: var(--warning);
}

.health-poor {
  color: var(--danger);
}

.urgent-alert {
  margin-top: 12px;
  padding: 10px;
  background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
  border-left: 4px solid var(--vex-red);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  color: #92400E;
}

.urgent-alert::before {
  content: "⚡ ";
}

/* Processing Log */
.processing-log {
  background: #0F172A;
  border-radius: 8px;
  padding: 20px;
  max-height: 400px;
  overflow-y: auto;
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 13px;
}

.log-entry {
  padding: 8px 12px;
  margin-bottom: 4px;
  border-radius: 4px;
  display: flex;
  gap: 12px;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.log-time {
  color: #64748B;
  font-weight: 600;
  flex-shrink: 0;
}

.log-message {
  color: #CBD5E1;
}

.log-info {
  background: rgba(59, 130, 246, 0.1);
  border-left: 3px solid #3B82F6;
}

.log-success {
  background: rgba(16, 185, 129, 0.1);
  border-left: 3px solid #10B981;
}

.log-success .log-message {
  color: #10B981;
}

.log-warning {
  background: rgba(245, 158, 11, 0.1);
  border-left: 3px solid #F59E0B;
}

.log-warning .log-message {
  color: #F59E0B;
}

.log-error {
  background: rgba(220, 38, 38, 0.1);
  border-left: 3px solid #DC2626;
}

.log-error .log-message {
  color: #DC2626;
  font-weight: 600;
}

.log-empty {
  color: #64748B;
  text-align: center;
  padding: 40px;
  font-style: italic;
}

.processing-log::-webkit-scrollbar {
  width: 8px;
}

.processing-log::-webkit-scrollbar-track {
  background: #1E293B;
  border-radius: 4px;
}

.processing-log::-webkit-scrollbar-thumb {
  background: #E11D48;
  border-radius: 4px;
}

.processing-log::-webkit-scrollbar-thumb:hover {
  background: #BE123C;
}

.header button:hover {
  background: var(--vex-red) !important;
  border-color: var(--vex-red) !important;
  color: white !important;
}

/* Card Actions */
.card-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--gray-200);
}

.btn-card {
  flex: 1;
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-view {
  background: var(--vex-red);
  color: white;
}

.btn-view:hover {
  background: #BE123C;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.3);
}

.btn-reprocess {
  background: var(--gray-200);
  color: var(--vex-navy);
}

.btn-reprocess:hover {
  background: var(--warning);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-reprocess:disabled {
  background: var(--gray-100);
  color: var(--gray-700);
  cursor: not-allowed;
  opacity: 0.5;
}

.btn-reprocess:disabled:hover {
  transform: none;
  box-shadow: none;
}

/* Update company card hover to not trigger on button clicks */
.company-card {
  background: white;
  border: 2px solid var(--gray-200);
  border-radius: 8px;
  padding: 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.company-card:hover {
  box-shadow: 0 8px 24px rgba(225, 29, 72, 0.2);
  transform: translateY(-4px);
  border-color: var(--vex-red);
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  border-radius: 16px;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 40px;
  position: relative;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.4);
  border: 3px solid var(--vex-red);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 32px;
  cursor: pointer;
  color: var(--gray-700);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.modal-close:hover {
  background: var(--gray-100);
}

.modal-content h2 {
  font-size: 32px;
  font-weight: 800;
  color: var(--vex-navy);
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.modal-content h2::before {
  content: "🎯 ";
}

/* Dossier Sections */
.dossier-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-200);
}

.dossier-section h3 {
  font-size: 20px;
  margin-bottom: 16px;
  color: var(--vex-navy);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 2px solid var(--vex-red);
  padding-bottom: 8px;
}

.health-display {
  display: flex;
  align-items: center;
  gap: 24px;
}

.health-gauge {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gauge-value {
  font-size: 56px;
  font-weight: 900;
}

.gauge-label {
  font-size: 14px;
  text-transform: uppercase;
  color: var(--gray-700);
  font-weight: 600;
}

.leaders-list,
.timing-list,
.pain-list,
.talking-points {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.leader-card,
.timing-card,
.talking-point {
  padding: 12px;
  background: var(--gray-50);
  border-radius: 6px;
  border-left: 3px solid var(--vex-red);
}

.leader-card strong {
  font-weight: 700;
  color: var(--vex-navy);
}

.vulnerability-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 4px 10px;
  background: var(--vex-red);
  color: white;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.timing-card.priority-critical {
  border-left: 5px solid var(--danger);
  background: linear-gradient(135deg, #FEF2F2 0%, #FEE2E2 100%);
  font-weight: 600;
}

.timing-card.priority-high {
  border-left: 5px solid var(--warning);
  background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
  font-weight: 600;
}

.timing-card.priority-critical::before {
  content: "🔥 ";
}

.timing-card.priority-high::before {
  content: "⚡ ";
}

.timing-meta {
  font-size: 12px;
  color: var(--gray-700);
  margin-top: 8px;
}

.pain-list li {
  padding: 8px;
  background: var(--gray-50);
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.severity {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.severity-high {
  background: var(--danger);
  color: white;
}

.severity-medium {
  background: var(--warning);
  color: white;
}

.severity-low {
  background: var(--gray-200);
  color: var(--gray-700);
}

.strategy {
  padding: 20px;
  background: linear-gradient(135deg, var(--vex-navy) 0%, var(--vex-dark) 100%);
  border-radius: 8px;
  color: white;
  line-height: 1.8;
  border: 3px solid var(--vex-red);
}

.strategy strong {
  color: var(--vex-red);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.talking-point strong {
  color: var(--vex-red);
  font-weight: 700;
}

.loading {
  text-align: center;
  padding: 60px;
  color: var(--vex-navy);
  font-size: 18px;
  font-weight: 600;
}

.loading::before {
  content: "⚡ ";
  animation: spin 1s linear infinite;
  display: inline-block;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.confidence {
  font-size: 14px;
  color: var(--gray-700);
}