/* Praxis Meet — кастомные стили поверх Tailwind */

:root {
  --color-primary: #2563EB;
  --color-primary-dark: #1D4ED8;
  --color-primary-light: #DBEAFE;
  --color-success: #16A34A;
  --color-success-light: #DCFCE7;
  --color-warning: #D97706;
  --color-warning-light: #FEF3C7;
  --color-danger: #DC2626;
  --color-danger-light: #FEE2E2;
}

/* ---- Шрифты ---- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400&display=swap');

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: #F8FAFC;
  color: #0F172A;
}

code, .font-mono {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
}

/* ---- Upload zone ---- */
.upload-zone {
  border: 2px dashed #CBD5E1;
  transition: border-color 0.15s, background-color 0.15s;
}
.upload-zone:hover {
  border-color: var(--color-primary);
  background-color: #F0F6FF;
}
.upload-zone.drag-over {
  border-color: var(--color-primary);
  background-color: #DBEAFE;
}
.upload-zone.has-file {
  border-color: var(--color-success);
  background-color: #F0FDF4;
  border-style: solid;
}

/* ---- Stepper ---- */
.stepper-step { transition: all 0.2s; }
.stepper-step.active .step-dot {
  background: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}
.stepper-step.done .step-dot {
  background: var(--color-success);
}
.stepper-step.pending .step-dot {
  background: #CBD5E1;
}
.step-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  transition: all 0.2s;
  flex-shrink: 0;
}
.stepper-line {
  flex: 1;
  height: 2px;
  background: #E2E8F0;
  transition: background 0.3s;
}
.stepper-line.done { background: var(--color-success); }
.stepper-line.active { background: var(--color-primary); }

/* ---- Spinner ---- */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid #E2E8F0;
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Маркеры неопределённости ---- */
.marker-unknown {
  background: #FEF3C7;
  color: #92400E;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid #FDE68A;
  transition: background 0.15s;
}
.marker-unknown:hover { background: #FDE68A; }

.marker-clarify {
  background: #DBEAFE;
  color: #1E40AF;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid #BFDBFE;
}
.marker-clarify:hover { background: #BFDBFE; }

/* ---- Confidence bar ---- */
.confidence-bar-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.6s ease;
}

/* ---- Transcript segments ---- */
.transcript-segment {
  border-left: 3px solid transparent;
  transition: border-color 0.15s, background 0.15s;
}
.transcript-segment:hover {
  background: #F8FAFC;
}
.speaker-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 20px;
  white-space: nowrap;
}

/* Speaker colors */
.speaker-1 { background: #DBEAFE; color: #1E40AF; border-left-color: #3B82F6; }
.speaker-2 { background: #D1FAE5; color: #065F46; border-left-color: #10B981; }
.speaker-3 { background: #FEF3C7; color: #92400E; border-left-color: #F59E0B; }
.speaker-4 { background: #FCE7F3; color: #9D174D; border-left-color: #EC4899; }
.speaker-5 { background: #EDE9FE; color: #5B21B6; border-left-color: #8B5CF6; }

/* ---- Action items table ---- */
.action-table th {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748B;
}

/* ---- Priority badges ---- */
.badge-high { background: #FEE2E2; color: #991B1B; }
.badge-medium { background: #FEF3C7; color: #92400E; }
.badge-low { background: #DCFCE7; color: #166534; }

/* ---- Toast ---- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  animation: slideIn 0.2s ease;
  max-width: 360px;
}
.toast-success { background: #F0FDF4; color: #166534; border: 1px solid #BBF7D0; }
.toast-error   { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.toast-info    { background: #EFF6FF; color: #1E40AF; border: 1px solid #BFDBFE; }
@keyframes slideIn {
  from { transform: translateX(100px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ---- Card hover ---- */
.card-hover { transition: box-shadow 0.15s; }
.card-hover:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.10); }

/* ---- HITL footer ---- */
.hitl-footer {
  position: sticky;
  bottom: 0;
  background: white;
  border-top: 1px solid #E2E8F0;
  z-index: 40;
}

/* ---- Editable field ---- */
[contenteditable="true"] {
  outline: none;
  border-bottom: 2px solid var(--color-primary);
  border-radius: 2px;
  padding: 0 2px;
  background: #EFF6FF;
}

/* ---- Modal overlay ---- */
.modal-overlay {
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(2px);
}

/* ---- Tabs ---- */
.tab-btn {
  padding: 8px 16px;
  border-bottom: 2px solid transparent;
  font-weight: 500;
  color: #64748B;
  cursor: pointer;
  transition: all 0.15s;
}
.tab-btn.active {
  border-bottom-color: var(--color-primary);
  color: var(--color-primary);
}
.tab-btn:hover:not(.active) {
  color: #334155;
  border-bottom-color: #CBD5E1;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94A3B8; }

/* ---- Empty state ---- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #94A3B8;
  text-align: center;
}

/* ---- Mobile adjustments ---- */
@media (max-width: 768px) {
  .upload-zone { min-height: 140px; }
  .toast-container { right: 12px; left: 12px; bottom: 12px; }
  .toast { max-width: 100%; }
  .hitl-footer { padding: 12px; }
}
