/* PRAXIS Meet — Design System */

:root {
  --navy: #1A1F3A;
  --e-blue: #2B4B9A;
  --e-blue-dark: #1E3A7A;
  --i-blue: #E8EDF8;
  --amber: #F9A825;
  --amber-h: #F59E0B;
  --lgray: #F4F4F4;
  --border: #E2E8F0;
  --slate: #546E7A;
  --text: #374151;
  /* legacy compat */
  --color-primary: #2B4B9A;
  --color-primary-dark: #1E3A7A;
  --color-primary-light: #E8EDF8;
  --color-success: #16A34A;
  --color-success-light: #DCFCE7;
  --color-warning: #D97706;
  --color-warning-light: #FEF3C7;
  --color-danger: #DC2626;
  --color-danger-light: #FEE2E2;
}

/* ---- Font ---- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--lgray);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

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

/* ---- Navigation ---- */
.praxis-nav {
  background: rgba(26, 31, 58, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  box-shadow: 0 1px 20px rgba(0,0,0,0.18);
}
.praxis-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #fff;
  text-decoration: none;
}
.praxis-logo svg { color: var(--amber); }
.nav-link-light {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.65);
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.15s;
  text-decoration: none;
}
.nav-link-light:hover { color: #fff; background: rgba(255,255,255,0.08); }
.nav-badge-light {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.45);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 3px 10px;
  text-decoration: none;
  transition: all 0.15s;
}
.nav-badge-light:hover { color: #fff; border-color: rgba(255,255,255,0.35); }

/* ---- Buttons ---- */
.btn-amber, .btn-navy, .btn-ghost-navy, .btn-muted {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  font-family: inherit;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-amber {
  background: var(--amber);
  color: var(--navy);
  font-weight: 700;
  border-radius: 6px;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}
.btn-amber:hover:not(:disabled) {
  background: var(--amber-h);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(249,168,37,0.35);
}
.btn-amber:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn-navy {
  background: var(--e-blue);
  color: #fff;
  font-weight: 600;
  border-radius: 6px;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}
.btn-navy:hover:not(:disabled) {
  background: var(--e-blue-dark);
  transform: translateY(-1px);
}
.btn-navy:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-ghost-navy {
  background: transparent;
  color: var(--e-blue);
  border: 1.5px solid var(--e-blue);
  font-weight: 600;
  border-radius: 6px;
  transition: all 0.2s;
  cursor: pointer;
}
.btn-ghost-navy:hover { background: var(--e-blue); color: #fff; }

.btn-muted {
  background: #fff;
  color: var(--slate);
  border: 1px solid var(--border);
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.15s;
  cursor: pointer;
}
.btn-muted:hover { background: var(--lgray); color: var(--navy); }

/* ---- Cards ---- */
.praxis-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* ---- Upload zone ---- */
.upload-zone {
  border: 2px dashed #CBD5E1;
  transition: border-color 0.15s, background-color 0.15s;
  border-radius: 12px;
}
.upload-zone:hover {
  border-color: var(--e-blue);
  background-color: var(--i-blue);
}
.upload-zone.drag-over {
  border-color: var(--amber);
  background-color: rgba(249,168,37,0.06);
}
.upload-zone.has-file {
  border-color: var(--color-success);
  background-color: #F0FDF4;
  border-style: solid;
}

/* ---- Form inputs ---- */
.praxis-input {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 14px;
  color: var(--navy);
  background: #fff;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.praxis-input:focus {
  border-color: var(--e-blue);
  box-shadow: 0 0 0 3px rgba(43,75,154,0.1);
}
.praxis-select {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 14px;
  color: var(--navy);
  background: #fff;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23546E7A' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}
.praxis-select:focus {
  border-color: var(--e-blue);
  box-shadow: 0 0 0 3px rgba(43,75,154,0.1);
}

/* ---- Tabs ---- */
.tab-btn {
  padding: 8px 16px;
  border-bottom: 2px solid transparent;
  font-weight: 500;
  color: var(--slate);
  cursor: pointer;
  transition: all 0.15s;
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  font-family: inherit;
  font-size: 14px;
}
.tab-btn.active {
  border-bottom-color: var(--e-blue);
  color: var(--e-blue);
  font-weight: 600;
}
.tab-btn:hover:not(.active) {
  color: var(--navy);
  border-bottom-color: var(--border);
}

/* ---- Stepper ---- */
.step-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  transition: all 0.2s;
  flex-shrink: 0;
}
.step-dot.active {
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(249,168,37,0.25);
}
.step-dot.done { background: var(--color-success); }
.step-dot.pending { background: #CBD5E1; }

.stepper-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  transition: background 0.3s;
}
.stepper-line.done { background: var(--color-success); }
.stepper-line.active { background: var(--amber); }

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

/* ---- Uncertainty markers ---- */
.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: var(--i-blue);
  color: var(--e-blue-dark);
  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-1 { background: var(--i-blue); color: var(--e-blue-dark); border-left-color: var(--e-blue); }
.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; }

/* ---- 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 16px 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: var(--i-blue); color: var(--e-blue-dark); 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, transform 0.15s; }
.card-hover:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.10);
  transform: translateY(-1px);
}

/* ---- HITL footer ---- */
.hitl-footer {
  position: sticky;
  bottom: 0;
  background: rgba(26,31,58,0.97);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255,255,255,0.1);
  z-index: 40;
}

/* ---- Editable field ---- */
[contenteditable="true"] {
  outline: none;
  border-bottom: 2px solid var(--amber);
  border-radius: 2px;
  padding: 0 2px;
  background: rgba(249,168,37,0.06);
}

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

/* ---- Provider radio cards ---- */
.provider-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
  background: #fff;
}
.provider-card:hover { border-color: var(--e-blue); background: var(--i-blue); }
.provider-card.selected { border-color: var(--e-blue); background: var(--i-blue); }

/* ---- Section header ---- */
.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 8px;
}

/* ---- 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;
}

/* ---- How it works steps ---- */
.how-step-icon {
  width: 44px; height: 44px;
  background: var(--i-blue);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}
.how-step-icon svg { color: var(--e-blue); }

/* ---- Status badge in processing ---- */
.status-processing {
  background: var(--i-blue);
  border: 1px solid rgba(43,75,154,0.2);
  border-radius: 10px;
  padding: 12px 16px;
}
.status-done { background: #F0FDF4; border-color: #BBF7D0; }
.status-error { background: #FEF2F2; border-color: #FECACA; }

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