/* ========================================
   Design System — Astrana Health
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@500;600;700&display=swap');

:root {
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;

  --plum: #6C0C46;
  --plum-light: #8a1a5e;
  --plum-soft: rgba(108, 12, 70, 0.08);

  --cream: #F7F5EF;
  --white: #FFFFFF;
  --black: #1a1a1a;

  --accent-green: #b8d8c7;
  --accent-pink: #f2d4e0;
  --accent-blue: #c9ddf0;
  --accent-yellow: #f5eacc;

  --text-primary: #2d2d2d;
  --text-secondary: #5c5c5c;
  --text-muted: #8e8e8e;

  --border: #e5e0d8;
  --border-focus: rgba(108, 12, 70, 0.35);
  --bg-input: #FFFFFF;
  --bg-sidebar: #FDFCF9;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.08);

  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;

  --sidebar-width: 228px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

/* ========================================
   Layout
   ======================================== */
.app {
  display: flex;
  min-height: 100vh;
}

/* ========================================
   Sidebar (desktop)
   ======================================== */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 24px 14px;
  position: fixed;
  height: 100vh;
  z-index: 10;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  margin-bottom: 32px;
}

.brand-icon {
  width: 34px;
  height: 34px;
  background: var(--plum);
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  color: #fff;
  flex-shrink: 0;
}

.brand-text {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--plum);
  letter-spacing: -0.01em;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.15s ease;
}

.nav-item:hover { background: var(--plum-soft); color: var(--plum); }
.nav-item.active { background: var(--plum-soft); color: var(--plum); font-weight: 600; }

.sidebar-footer {
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.app-version { display: block; font-size: 0.7rem; color: var(--text-muted); opacity: 0.45; margin-top: 12px; letter-spacing: 0.02em; }

.lang-picker-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
}

.lang-picker-inline select {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  outline: none;
  flex: 1;
  cursor: pointer;
}
.lang-picker-inline select:focus { border-color: var(--border-focus); }

.user-profile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}
.user-profile:hover { border-color: var(--plum); box-shadow: var(--shadow-sm); }

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--plum-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.user-avatar svg { color: var(--plum); }

.user-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logout-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.logout-btn:hover { background: var(--plum-soft); color: var(--plum); }
.logout-btn:active { transform: scale(0.95); }

/* ========================================
   Main Content — fills available space
   ======================================== */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 32px 40px 40px;
  min-height: 100vh;
  max-width: 920px;
  display: flex;
  flex-direction: column;
}

/* ========================================
   Panels
   ======================================== */
.panel {
  display: none;
  animation: fadeIn 0.25s ease;
  flex: 1;
  flex-direction: column;
}

.panel.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  flex-shrink: 0;
}

.panel-header h1 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--black);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.panel-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ========================================
   Form — Tabbed Card (fills panel)
   ======================================== */
.call-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

/* In single-column mode the side wrapper disappears so its children
   (call button, status, live transcript) participate in the call-form's
   flex column directly. The 2-column layout below makes it a real grid
   cell. */
.call-form-side { display: contents; }

/* Pilot mode — 2-column layout: form on the left, call button + status +
   live transcript on the right. Pilot mode hides the Prompt tab and the
   Profiles button so the narrow toolbar fits even at intermediate widths;
   below 1024px we collapse back to single column. */
.call-form.pilot-mode {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  gap: 18px;
  align-items: start;
  flex: none;
}
.call-form.pilot-mode > .form-card {
  flex: none;
  min-height: 0;
}
.call-form.pilot-mode .call-form-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 16px;
  align-self: start;
}
.call-form.pilot-mode .form-actions { margin-top: 0; }
.call-form.pilot-mode .live-transcript-panel { margin-top: 0; }
.call-form.pilot-mode .status-bar { margin-top: 0; }

@media (max-width: 1024px) {
  .call-form.pilot-mode {
    display: flex;
    flex-direction: column;
    flex: 1;
  }
  .call-form.pilot-mode .call-form-side {
    position: static;
  }
}

/* Wide viewports — apply the same 2-column layout to the default New Call
   form. Gated on min-width 1280px because the full toolbar (4 tabs +
   Profiles button) needs ~770px on its own; narrower screens stay in
   single-column so nothing gets clipped. main-content max-width is bumped
   in the same query so the form-card cell has room to breathe. */
@media (min-width: 1280px) {
  .main-content { max-width: 1320px; }

  .call-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 340px);
    gap: 18px;
    align-items: start;
    flex: 1;
    min-height: 0;
  }
  .call-form > .form-card {
    flex: none;
    min-height: 0;
  }
  .call-form-side {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: sticky;
    top: 16px;
    align-self: start;
  }
  .call-form .form-actions,
  .call-form .live-transcript-panel,
  .call-form .status-bar { margin-top: 0; }
}

.form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.form-card:hover { box-shadow: var(--shadow-md); }

/* Toolbar */
.form-card-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  background: var(--cream);
  flex-shrink: 0;
}

.form-card-toolbar .btn-load-profile {
  margin-left: auto;
  flex-shrink: 0;
}

/* Tab bar */
.form-tab-bar {
  display: flex;
  gap: 0;
}

.form-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 14px 22px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-bottom: 2.5px solid transparent;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  white-space: nowrap;
  margin-bottom: -1px;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  user-select: none;
  z-index: 1;
}
.form-tab:hover { color: var(--plum); background: rgba(108, 12, 70, 0.04); }
.form-tab.active { color: var(--plum); font-weight: 600; border-bottom-color: var(--plum); background: var(--white); }
.form-tab svg { flex-shrink: 0; opacity: 0.5; transition: opacity 0.15s; pointer-events: none; }
.form-tab:hover svg, .form-tab.active svg { opacity: 0.9; }

/* Tab body */
.form-tab-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
}

/* Panels */
.form-tab-panel {
  display: none;
  animation: tabFadeIn 0.2s ease;
}
.form-tab-panel.active {
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 1;
}

@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Fill-height textarea. min-height covers the wide-viewport 2-column
   layout where the form-card no longer stretches via its flex parent;
   in single-column mode `flex: 1` lets the textarea grow past it. */
.form-group-fill { flex: 1; display: flex; flex-direction: column; }
.form-group-fill textarea { flex: 1; min-height: 320px; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.input-wrapper { position: relative; }
.input-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.input-wrapper input { padding-left: 38px; }

input, textarea, select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(108, 12, 70, 0.08);
}
input:disabled, textarea:disabled, select:disabled {
  opacity: 0.55;
  background: var(--cream);
  cursor: not-allowed;
}
input::placeholder, textarea::placeholder { color: var(--text-muted); }

textarea { resize: vertical; min-height: 100px; line-height: 1.55; }

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%238e8e8e' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.hint { font-size: 0.8rem; color: var(--text-muted); line-height: 1.4; }

/* Load Profile pill */
.btn-load-profile {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--plum);
  background: transparent;
  border: 1px solid rgba(108, 12, 70, 0.2);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  text-transform: none;
  letter-spacing: 0;
}
.btn-load-profile:hover { background: var(--plum); color: #fff; border-color: var(--plum); }
.btn-load-profile:active { transform: scale(0.97); }

/* ========================================
   Form Actions
   ======================================== */
.form-actions {
  margin-top: 12px;
  flex-shrink: 0;
}

.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  background: var(--plum);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(108, 12, 70, 0.15);
}
.btn-primary:hover { background: var(--plum-light); box-shadow: 0 4px 16px rgba(108, 12, 70, 0.2); }
.btn-primary:active { transform: scale(0.99); }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }

/* ========================================
   Call In-Progress & End Call
   ======================================== */
@keyframes pulse-ring {
  0%   { transform: scale(0.8); opacity: 0.8; }
  70%  { transform: scale(1.6); opacity: 0; }
  100% { transform: scale(1.6); opacity: 0; }
}
@keyframes pulse-dot {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.15); }
}

.call-in-progress-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, #1a7a4a 0%, #22915a 100%);
  color: #fff;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  position: relative;
  box-shadow: 0 2px 8px rgba(26, 122, 74, 0.2);
}

.call-pulse-ring {
  position: absolute;
  left: 20px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  animation: pulse-ring 1.4s ease-out infinite;
}

.call-pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  flex-shrink: 0;
  animation: pulse-dot 1.4s ease-in-out infinite;
}

.btn-end-call {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 10px;
  padding: 12px 20px;
  background: transparent;
  color: #c0392b;
  border: 1.5px solid #e8c4c4;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-end-call:hover:not(:disabled) { background: #c0392b; color: #fff; border-color: #c0392b; }
.btn-end-call:disabled { opacity: 0.5; cursor: not-allowed; }

/* ========================================
   Status Bar
   ======================================== */
.status-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}
.status-bar.active .status-dot { background: #4caf50; animation: pulse 2s infinite; }
.status-bar.error { border-color: #e8c4c4; background: #fdf6f6; }
.status-bar.error .status-dot { background: #c0392b; }

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

/* ========================================
   Call History
   ======================================== */
.history-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.history-search { position: relative; }
.history-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.history-search-input {
  width: 100%;
  padding: 11px 14px 11px 40px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.history-search-input:focus {
  outline: none;
  border-color: var(--plum);
  box-shadow: 0 0 0 3px rgba(108, 12, 70, 0.06);
}

.history-paging {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 0;
}
.history-paging:empty { display: none; }

.paging-info { font-size: 0.82rem; color: var(--text-muted); font-weight: 500; }
.paging-buttons { display: flex; gap: 6px; }

.paging-btn {
  padding: 6px 14px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--plum);
  background: var(--plum-soft);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}
.paging-btn:hover:not(:disabled) { background: var(--plum); color: #fff; }
.paging-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.call-card-caller {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 2px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 64px 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.call-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}
.call-card:hover { box-shadow: var(--shadow-md); }

.call-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.call-card-header strong { font-size: 0.95rem; font-weight: 600; color: var(--black); }

.call-card-status {
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.call-card-status.completed { background: #e8f5e9; color: #2e7d32; }
.call-card-status.transcribed, .call-card-status.summarized { background: var(--plum-soft); color: var(--plum); }
.call-card-status.in-progress { background: #fff8e1; color: #e65100; }

.call-card-meta { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }

.meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--accent-blue);
  color: #1565c0;
}

.flags-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }

.flag-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: capitalize;
}
.flag-badge.sentiment-happy    { background: #e8f5e9; color: #2e7d32; }
.flag-badge.sentiment-neutral  { background: #f5f5f5; color: #616161; }
.flag-badge.sentiment-frustrated { background: #fff3e0; color: #e65100; }
.flag-badge.sentiment-angry    { background: #fbe9e7; color: #c62828; }
.flag-badge.sentiment-anxious  { background: #fce4ec; color: #ad1457; }
.flag-badge.medical-routine    { background: #e3f2fd; color: #1565c0; }
.flag-badge.medical-urgent     { background: #fff3e0; color: #e65100; }
.flag-badge.medical-emergency  { background: #fbe9e7; color: #c62828; }
.flag-badge.review-needed      { background: var(--plum-soft); color: var(--plum); }

.sentiment-note, .medical-note, .review-note {
  font-size: 0.88rem;
  line-height: 1.5;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}
.sentiment-note { background: #fafafa; }
.medical-note.medical-routine  { background: #e3f2fd; }
.medical-note.medical-urgent   { background: #fff3e0; }
.medical-note.medical-emergency { background: #fbe9e7; color: #c62828; font-weight: 600; }
.review-note { background: var(--plum-soft); }

.call-card-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }

.btn-call-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-call-action:hover:not(:disabled) { background: var(--plum-soft); color: var(--plum); border-color: var(--plum); }
.btn-call-action:disabled { opacity: 0.5; cursor: not-allowed; }

.meta-badge.call-id { font-family: var(--font-mono, monospace); background: #f0f0f0; color: var(--text-secondary); cursor: default; }

.summary-box {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
}
.summary-box h4 { font-family: var(--font-body); font-size: 0.78rem; font-weight: 600; color: var(--plum); letter-spacing: 0.03em; margin-bottom: 8px; text-transform: uppercase; }
.summary-box p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 12px; }
.summary-box ul { padding-left: 18px; font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; }
.summary-box ul li { margin-bottom: 4px; }
.summary-box pre.extracted-data { font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace); font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; background: rgba(0,0,0,0.04); padding: 10px 12px; border-radius: 6px; white-space: pre-wrap; word-break: break-word; max-height: 360px; overflow: auto; margin: 0; }

.call-card details { margin-top: 4px; }
.call-card summary { cursor: pointer; font-weight: 600; font-size: 0.82rem; color: var(--text-muted); letter-spacing: 0.02em; padding: 8px 0; transition: color 0.15s; }
.call-card summary:hover { color: var(--plum); }

.transcript-line { padding: 6px 0; font-size: 0.88rem; line-height: 1.5; color: var(--text-secondary); border-bottom: 1px solid rgba(0, 0, 0, 0.04); }
.transcript-line:last-child { border-bottom: none; }
.transcript-line .role { font-weight: 600; font-size: 0.8rem; }
.transcript-line .role.agent { color: var(--plum); }
.transcript-line .role.user  { color: #2e7d32; }

/* ========================================
   Secondary Button
   ======================================== */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--plum);
  background: var(--plum-soft);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.btn-secondary:hover { background: var(--plum); color: #fff; }
.btn-secondary:active { transform: scale(0.97); }

/* ========================================
   Profile Modal
   ======================================== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 200;
  justify-content: center;
  align-items: center;
}
.modal-overlay.visible { display: flex; }

.modal-panel {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 0;
  width: 100%;
  max-width: 720px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0,0,0,0.04);
  animation: modalSlideIn 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}
@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px 0; }
.modal-header h2 { font-family: var(--font-heading); font-size: 1.2rem; font-weight: 600; color: var(--black); }
.modal-close { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: none; background: transparent; color: var(--text-muted); border-radius: 50%; cursor: pointer; transition: all 0.15s; }
.modal-close:hover { background: var(--cream); color: var(--black); }

.modal-subtitle { font-size: 0.84rem; color: var(--text-muted); padding: 4px 24px 16px; line-height: 1.4; }

.modal-profile-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; min-height: 60px; max-height: 340px; padding: 0 16px; }

.modal-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 36px 16px; color: var(--text-muted); font-size: 0.88rem; }
.modal-empty-icon { width: 52px; height: 52px; border-radius: 50%; background: var(--cream); display: flex; align-items: center; justify-content: center; }

.modal-profile-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid transparent; border-radius: var(--radius-md); transition: all 0.15s; cursor: pointer; }
.modal-profile-row:hover { background: var(--cream); border-color: var(--border); }

.modal-profile-info { flex: 1; cursor: pointer; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.modal-profile-info strong { font-size: 0.9rem; font-weight: 600; color: var(--black); }
.modal-profile-preview { font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.modal-profile-delete { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex-shrink: 0; border: none; background: transparent; color: var(--text-muted); border-radius: var(--radius-sm); cursor: pointer; transition: all 0.15s; opacity: 0; }
.modal-profile-row:hover .modal-profile-delete { opacity: 1; }
.modal-profile-delete:hover { background: #fdf6f6; color: #c0392b; }

.modal-header-left { display: flex; align-items: center; gap: 6px; }
.modal-back { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: none; background: transparent; color: var(--text-muted); border-radius: 50%; cursor: pointer; transition: all 0.15s; }
.modal-back:hover { background: var(--cream); color: var(--black); }

.modal-show-hidden { display: flex; align-items: center; gap: 6px; padding: 0 16px 8px; font-size: 0.78rem; color: var(--text-muted); cursor: pointer; user-select: none; }
.modal-show-hidden input { cursor: pointer; }

.modal-profile-row.is-hidden .modal-profile-info strong,
.modal-profile-row.is-hidden .modal-profile-preview { opacity: 0.55; }
.modal-profile-row .modal-profile-hidden-badge { display: inline-block; margin-left: 8px; padding: 1px 7px; font-size: 0.7rem; font-weight: 600; color: var(--text-muted); background: var(--cream); border: 1px solid var(--border); border-radius: 999px; vertical-align: middle; }

.modal-search { position: relative; padding: 0 16px; margin-bottom: 8px; }
.modal-search-icon { position: absolute; left: 28px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.modal-search input { width: 100%; padding: 10px 12px 10px 36px; font-family: var(--font-body); font-size: 0.88rem; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--cream); transition: border-color 0.15s, background 0.15s; }
.modal-search input:focus { outline: none; border-color: var(--plum); background: var(--white); box-shadow: 0 0 0 3px rgba(108, 12, 70, 0.06); }

.modal-footer { padding: 12px 16px 16px; border-top: 1px solid var(--border); margin-top: 8px; flex-shrink: 0; }

.btn-new-profile { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 11px 18px; font-family: var(--font-body); font-size: 0.88rem; font-weight: 600; color: var(--plum); background: var(--plum-soft); border: 1px dashed rgba(108, 12, 70, 0.25); border-radius: var(--radius-md); cursor: pointer; transition: all 0.15s ease; }
.btn-new-profile:hover { background: var(--plum); color: #fff; border-style: solid; border-color: var(--plum); }
.btn-new-profile:active { transform: scale(0.98); }

#modalListView, #modalEditView { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; }
.modal-edit-form { display: flex; flex-direction: column; gap: 14px; margin-top: 4px; flex: 1; min-height: 0; overflow-y: auto; padding: 0 24px 4px; }
.modal-edit-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 24px 20px; border-top: 1px solid var(--border); margin-top: 8px; flex-shrink: 0; }
.btn-modal-action { padding: 10px 18px; font-size: 0.88rem; font-weight: 600; border-radius: var(--radius-md); cursor: pointer; transition: all 0.15s; }

.btn-danger-ghost { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; background: transparent; color: var(--text-muted); border: 1px solid transparent; font-family: var(--font-body); }
.btn-danger-ghost:hover { color: #c0392b; background: #fdf6f6; border-color: #e8c4c4; }
.btn-danger-ghost.confirming { background: #c0392b; color: #fff; border-color: #c0392b; }

/* ========================================
   Settings Modal
   ======================================== */
.settings-toggle-label { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; cursor: pointer; user-select: none; }
.settings-toggle-label input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }
.settings-voices-toolbar { display: flex; gap: 6px; margin-bottom: 8px; }
.btn-voice-toggle { padding: 5px 10px; font-family: var(--font-body); font-size: 0.78rem; font-weight: 500; color: var(--text-muted); background: transparent; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; transition: all 0.15s; }
.btn-voice-toggle:hover { border-color: var(--plum); color: var(--plum); background: #fdf7fa; }
.settings-voices-table { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px; max-height: 320px; overflow-y: auto; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--white); margin-bottom: 8px; }
.settings-voice-option { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 8px; padding: 6px 8px; border-radius: var(--radius-sm); cursor: pointer; transition: background 0.1s; }
.settings-voice-option:hover { background: #fdf7fa; }
.settings-voice-option input[type="checkbox"] { margin: 0; cursor: pointer; }
.settings-voice-name { font-family: var(--font-body); font-size: 0.85rem; font-weight: 500; color: var(--text); }
.settings-voice-descriptor { font-family: var(--font-body); font-size: 0.78rem; color: var(--text-muted); }

/* ========================================
   Live Transcript Panel (Gemini calls)
   ======================================== */
.live-transcript-panel { margin-top: 16px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--white); overflow: hidden; }
.live-transcript-header { display: flex; align-items: center; gap: 8px; padding: 10px 14px; font-family: var(--font-body); font-size: 0.82rem; font-weight: 600; color: var(--text); background: #fdf7fa; border-bottom: 1px solid var(--border); }
.live-transcript-header .live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--plum); animation: live-pulse 1.4s ease-in-out infinite; }
@keyframes live-pulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
.live-transcript-status { margin-left: auto; font-size: 0.75rem; font-weight: 500; color: var(--text-muted); }
.live-transcript-body { max-height: 360px; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; font-family: var(--font-body); font-size: 0.88rem; line-height: 1.5; }
.live-transcript-empty { color: var(--text-muted); font-style: italic; text-align: center; padding: 24px 0; }
.live-transcript-turn { display: flex; flex-direction: column; gap: 3px; padding: 8px 10px; border-radius: var(--radius-sm); background: #fafafa; border-left: 3px solid var(--border); }
.live-transcript-turn.role-agent { border-left-color: var(--plum); background: #fdf7fa; }
.live-transcript-turn.role-user { border-left-color: #2e7dc2; background: #f5f9fd; }
.live-transcript-turn.role-system { border-left-color: #b58900; background: #fdf9ee; font-size: 0.78rem; color: var(--text-muted); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.live-transcript-role { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; color: var(--text-muted); }
.live-transcript-text { white-space: pre-wrap; color: var(--text); }
.live-transcript-turn.role-system .live-transcript-text { color: var(--text-muted); }

/* ========================================
   Toast Notifications
   ======================================== */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 300; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { padding: 12px 20px; font-family: var(--font-body); font-size: 0.88rem; font-weight: 500; border-radius: var(--radius-md); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); opacity: 0; transform: translateY(8px); transition: opacity 0.3s ease, transform 0.3s ease; pointer-events: auto; }
.toast.visible { opacity: 1; transform: translateY(0); }
.toast-error { background: #c0392b; color: #fff; }
.toast-success { background: var(--plum); color: #fff; }
.toast-warning { background: #e67e22; color: #fff; }

.hidden { display: none !important; }

/* ========================================
   Responsive — tablet
   ======================================== */
@media (max-width: 1024px) {
  .main-content { padding: 24px 24px 32px; }
}

/* ========================================
   Responsive — mobile
   ======================================== */
@media (max-width: 768px) {
  .app { flex-direction: column; }

  /* Sidebar → bottom nav bar */
  .sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    width: 100%;
    height: auto;
    flex-direction: row;
    align-items: center;
    padding: 0;
    border-right: none;
    border-top: 1px solid var(--border);
    z-index: 50;
    background: var(--white);
  }

  .sidebar-brand { display: none; }
  .sidebar-footer { display: none; }

  .sidebar-nav {
    flex-direction: row;
    flex: 1;
    justify-content: space-around;
    gap: 0;
    padding: 8px 0;
  }

  .nav-item {
    flex-direction: column;
    gap: 3px;
    padding: 6px 16px;
    font-size: 0.72rem;
    text-align: center;
  }
  .nav-item span { display: block; }

  /* Main content fills viewport minus bottom nav */
  .main-content {
    margin-left: 0;
    padding: 16px 16px 80px;
    min-height: calc(100vh - 60px);
  }

  .panel-header { margin-bottom: 16px; }
  .panel-header h1 { font-size: 1.3rem; }

  .form-grid { grid-template-columns: 1fr; }

  .form-tab-bar { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .form-tab { padding: 12px 16px; font-size: 0.8rem; }
  .form-tab svg { display: none; }

  .form-tab-body { padding: 16px; }
  .form-group-fill textarea { min-height: 180px; }

  .form-card-toolbar { padding: 0 8px; gap: 6px; }
  .btn-load-profile { font-size: 0.72rem; padding: 5px 10px; }

  .modal-panel { max-width: calc(100vw - 24px); max-height: 85vh; border-radius: var(--radius-lg); }

  .toast-container { bottom: 72px; right: 16px; left: 16px; }
  .toast { text-align: center; }
}

/* ========================================
   Responsive — small mobile
   ======================================== */
@media (max-width: 400px) {
  .main-content { padding: 12px 12px 80px; }
  .form-tab { padding: 10px 12px; font-size: 0.75rem; }
  .form-tab-body { padding: 12px; }
}

/* ========================================
   Pilot mode banner — sits atop the New Call form when launched from a pilot
   ======================================== */
.pilot-mode-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--plum-soft);
  border: 1px solid var(--border);
  border-left: 4px solid var(--plum);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.pilot-mode-banner-info { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pilot-mode-banner-tag {
  background: var(--plum);
  color: var(--white);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 600;
}
.pilot-mode-banner-meta { color: var(--text-muted); font-size: 0.85rem; }
.pilot-mode-banner-sep { color: var(--text-muted); }
.pilot-mode-banner-actions { display: flex; gap: 8px; }

/* ========================================
   Pilot Calls
   ======================================== */
.panel-header-left { display: flex; align-items: center; gap: 12px; }
.panel-header-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* Owner picker — sits in panel headers on Call History + Pilot Calls. */
.owner-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
}
.owner-picker select {
  width: auto;
  min-width: 180px;
  padding: 8px 32px 8px 12px;
  font-size: 0.85rem;
}

/* When viewing another user's data, hide mutation controls (data-owner-only) */
.viewing-others [data-owner-only="true"] { display: none !important; }
.viewing-others [data-owner-only="true"][data-owner-only-mode="disable"] {
  display: inline-flex !important;
  opacity: 0.45;
  pointer-events: none;
}

/* Read-only operator notes block in pilot detail. */
.pilot-notes-readonly {
  white-space: pre-wrap;
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--text-primary);
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin: 0;
}

/* Subtle pill that owner cards/labels in lists wear when not "self" */
.owner-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--cream);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 6px;
  letter-spacing: 0;
  text-transform: none;
}

.pilots-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.pilot-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: box-shadow 120ms ease, border-color 120ms ease;
}
.pilot-card:hover { box-shadow: var(--shadow-md); border-color: var(--plum); }
.pilot-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.pilot-card-name { font-weight: 600; color: var(--text-primary); min-width: 0; word-break: break-word; }
.pilot-card-name .owner-pill { display: block; margin-left: 0; margin-top: 4px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pilot-card-type { flex-shrink: 0; }
.pilot-card-type {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--plum-soft);
  color: var(--plum);
  padding: 3px 8px;
  border-radius: 999px;
}
.pilot-card-meta { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 12px; }
.pilot-progress { background: var(--cream); border-radius: 999px; height: 8px; overflow: hidden; }
.pilot-progress-bar {
  background: linear-gradient(90deg, var(--plum), var(--plum-light));
  height: 100%;
  border-radius: 999px;
  transition: width 200ms ease;
}
.pilot-progress-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.pilot-detail-actions { display: flex; gap: 8px; }
.btn-secondary {
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: border-color 120ms ease, background 120ms ease;
}
.btn-secondary:hover { border-color: var(--plum); }
.btn-secondary:disabled { opacity: 0.5; cursor: not-allowed; }

.pilot-detail-body {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  align-items: start;
}
.pilot-roster {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 220px);
}
.pilot-roster-toolbar {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 8px;
  align-items: center;
}
.pilot-roster-toolbar input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}
.pilot-roster-toolbar input:focus { outline: none; border-color: var(--border-focus); }
.pilot-roster-counter { font-size: 0.75rem; color: var(--text-muted); }
.pilot-roster-list { overflow-y: auto; flex: 1; }
.pilot-roster-row {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: background 100ms ease;
}
.pilot-roster-row:hover { background: var(--cream); }
.pilot-roster-row.active { background: var(--plum-soft); border-left: 3px solid var(--plum); padding-left: 11px; }
.pilot-roster-row-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pilot-roster-row-name { font-weight: 500; color: var(--text-primary); font-size: 0.9rem; }
.pilot-roster-row-meta { font-size: 0.75rem; color: var(--text-muted); }
.pilot-roster-empty { padding: 24px; text-align: center; color: var(--text-muted); font-size: 0.85rem; }

.pilot-status {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
  display: inline-block;
  font-weight: 500;
}
.pilot-status-pending { background: #f0f0f0; color: #666; }
.pilot-status-queued { background: var(--accent-yellow); color: #8a6d2c; }
.pilot-status-in-progress { background: var(--accent-blue); color: #2c5980; }
.pilot-status-completed { background: var(--accent-green); color: #2f7456; }
.pilot-status-skipped { background: #f0f0f0; color: #999; }
.pilot-status-failed, .pilot-status-no-answer { background: var(--accent-pink); color: #8a3a5c; }

.pilot-active {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  min-height: 320px;
}
.pilot-active-pane { display: flex; flex-direction: column; gap: 16px; }
.pilot-active-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.pilot-active-name { font-size: 1.4rem; font-weight: 600; font-family: var(--font-heading); }
.pilot-active-meta { font-size: 0.85rem; color: var(--text-muted); margin-top: 2px; }
.pilot-active-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.pilot-section { border-top: 1px solid var(--border); padding-top: 16px; margin-top: 4px; }
.pilot-section-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 600;
}
.pilot-section pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--cream);
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-family: var(--font-body);
  color: var(--text-primary);
  max-height: 320px;
  overflow-y: auto;
}
.pilot-section .summary-grid {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 6px 12px;
  font-size: 0.85rem;
}
.pilot-section .summary-grid dt { color: var(--text-muted); font-weight: 500; }
.pilot-section .summary-grid dd { color: var(--text-primary); }
.pilot-note-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pilot-section-hint { font-size: 0.8rem; color: var(--text-muted); margin: 0 0 8px; }
.pilot-extract-input {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  resize: vertical;
  min-height: 80px;
  margin-bottom: 8px;
}
.pilot-extract-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pilot-transcript-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.pilot-transcript-summary {
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  padding: 4px 0;
  user-select: none;
}
.pilot-transcript-summary:hover { color: var(--accent, #1d6d63); }
.pilot-transcript-body {
  max-height: 480px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: var(--cream);
}
.pilot-transcript-body .transcript-line { font-size: 0.9rem; line-height: 1.45; padding: 4px 0; }
.pilot-transcript-body .role { font-weight: 600; margin-right: 6px; }
.pilot-transcript-error { color: var(--danger, #b22424); }
.pilot-notes-input {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.85rem;
  resize: vertical;
  min-height: 60px;
}

.pilot-import-preview {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  max-height: 220px;
  overflow-y: auto;
}
.pilot-import-preview ul { padding-left: 18px; margin-top: 6px; }
.pilot-import-preview .warn { color: #8a3a5c; }

@media (max-width: 900px) {
  .pilot-detail-body { grid-template-columns: 1fr; }
  .pilot-roster { max-height: 300px; }
}
