/* ============================================================
   ReCharge Psych Notes v2 — Stylesheet
   ============================================================ */

:root {
  --primary: #4F46E5;
  --primary-hover: #4338CA;
  --danger: #DC2626;
  --danger-hover: #B91C1C;
  --success: #16A34A;
  --warning: #F59E0B;
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --text: #1E293B;
  --text-muted: #64748B;
  --border: #E2E8F0;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

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

.app.with-sensei .main-content {
  margin-left: 280px;
}

.main-content {
  flex: 1;
  max-width: 800px;
  margin: 0 auto;
  padding: 24px 16px;
}

/* ---- Header ---- */
.app-header {
  text-align: center;
  margin-bottom: 24px;
}

.app-header h1 {
  font-size: 1.5rem;
  color: var(--primary);
  font-weight: 700;
}

.tagline {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ---- Controls Row ---- */
.controls-row {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.control-group label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.recording-controls {
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.timer {
  font-family: "SF Mono", "Cascadia Code", monospace;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 56px;
}

/* ---- Status ---- */
.status {
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: 0.8rem;
  margin-bottom: 16px;
  font-weight: 500;
}

.status.info { background: #EEF2FF; color: var(--primary); }
.status.recording { background: #FEE2E2; color: var(--danger); animation: pulse 2s infinite; }
.status.error { background: #FEF3C7; color: #92400E; }

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

/* ---- Text Sections ---- */
.text-section {
  margin-bottom: 16px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.section-header label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

textarea {
  width: 100%;
  min-height: 180px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-family: inherit;
  line-height: 1.6;
  resize: vertical;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

textarea[readonly] {
  background: #F8FAFC;
}

/* ---- Buttons ---- */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-record {
  background: var(--primary);
  color: white;
}
.btn-record:hover { background: var(--primary-hover); }
.btn-record.recording {
  background: var(--danger);
  animation: pulse 2s infinite;
}
.btn-record.recording:hover { background: var(--danger-hover); }

.btn-generate {
  background: var(--success);
  color: white;
}
.btn-generate:hover { background: #15803D; }

.btn-avs {
  background: #8B5CF6;
  color: white;
}
.btn-avs:hover { background: #7C3AED; }

.btn-clear {
  background: var(--border);
  color: var(--text);
}
.btn-clear:hover { background: #CBD5E1; }

.btn-small {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.75rem;
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
}
.btn-small:hover { background: #F1F5F9; }

.action-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---- Docu-Sensei Sidebar ---- */
.sensei-panel {
  position: fixed;
  left: 0;
  top: 0;
  width: 280px;
  height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  overflow-y: auto;
  box-shadow: 2px 0 8px rgba(0,0,0,0.04);
}

.sensei-panel.hidden {
  display: none;
}

.sensei-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.sensei-header h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.sensei-badge {
  padding: 2px 8px;
  background: var(--primary);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 12px;
}

.sensei-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

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

.sensei-list li {
  padding: 8px 10px;
  margin-bottom: 4px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.sensei-list li.met {
  background: #F0FDF4;
  color: var(--success);
  font-weight: 600;
}

.sensei-icon {
  font-size: 0.9rem;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

/* ---- Header with user info ---- */
.app-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-name {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ---- Auth Pages ---- */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 16px;
}

.auth-card {
  background: var(--surface);
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  padding: 40px 32px;
  width: 100%;
  max-width: 400px;
}

.auth-card.wide {
  max-width: 480px;
}

.auth-title {
  font-size: 1.5rem;
  color: var(--primary);
  font-weight: 700;
  text-align: center;
  margin-bottom: 4px;
}

.auth-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
  margin-bottom: 24px;
}

.auth-field {
  margin-bottom: 16px;
}

.auth-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.auth-field input,
.auth-field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  background: var(--surface);
  color: var(--text);
}

.auth-field input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.auth-field input:disabled {
  background: #F1F5F9;
  color: var(--text-muted);
}

.auth-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
  display: block;
}

.auth-error {
  background: #FEF2F2;
  color: var(--danger);
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: 0.8rem;
  margin-bottom: 12px;
}

.auth-info {
  background: #EEF2FF;
  color: var(--primary);
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: 0.8rem;
  margin-bottom: 12px;
}

.btn-primary-full {
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 8px;
}
.btn-primary-full:hover { background: var(--primary-hover); }
.btn-primary-full:disabled { opacity: 0.5; cursor: not-allowed; }

.auth-forgot {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 16px;
}

.hidden { display: none !important; }

/* MFA Setup */
.mfa-setup {
  text-align: center;
}

.mfa-setup h2 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.mfa-setup p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.qr-container {
  display: inline-block;
  padding: 16px;
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}

.mfa-setup code {
  background: #F1F5F9;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  word-break: break-all;
}

/* ---- Admin Page ---- */
.admin-page {
  min-height: 100vh;
  background: var(--bg);
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.admin-header h1 {
  font-size: 1.2rem;
  color: var(--primary);
}

.admin-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px 16px;
}

.admin-section {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 20px;
}

.admin-section h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.invite-form {
  margin-bottom: 12px;
}

.invite-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.invite-row .auth-field {
  flex: 1;
  min-width: 140px;
  margin-bottom: 0;
}

.invite-link-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.invite-link-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.8rem;
  background: #F1F5F9;
}

/* User cards */
.user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.user-card:last-child { border-bottom: none; }

.user-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-info strong { font-size: 0.9rem; }

.user-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.badge {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
}
.badge-ok { background: #DCFCE7; color: #166534; }
.badge-warn { background: #FEF3C7; color: #92400E; }
.badge-off { background: #F1F5F9; color: var(--text-muted); }
.badge-info { background: #DBEAFE; color: #1E40AF; }
.badge-role { background: #EDE9FE; color: #5B21B6; }

.btn-danger-small {
  padding: 4px 10px;
  border: 1px solid var(--danger);
  border-radius: var(--radius);
  font-size: 0.75rem;
  background: white;
  color: var(--danger);
  cursor: pointer;
}
.btn-danger-small:hover { background: #FEF2F2; }

/* Audit log */
.audit-table {
  font-size: 0.8rem;
  max-height: 300px;
  overflow-y: auto;
}

.audit-row {
  display: flex;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

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

.audit-time {
  color: var(--text-muted);
  min-width: 140px;
  flex-shrink: 0;
}

.audit-action {
  font-weight: 600;
  min-width: 120px;
}

.audit-detail {
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---- Patient ID Input ---- */
.patient-id-input {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  background: var(--surface);
  color: var(--text);
  width: 140px;
}

.patient-id-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* ---- Sign Button ---- */
.btn-sign {
  background: #0891B2;
  color: white;
}
.btn-sign:hover { background: #0E7490; }

/* ---- Note Status ---- */
.note-status {
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 500;
  margin-top: 12px;
}
.note-status.draft { background: #FEF3C7; color: #92400E; }
.note-status.signed { background: #DCFCE7; color: #166534; }

/* ---- Admin Tabs ---- */
.admin-tabs {
  display: flex;
  gap: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}

.admin-tab {
  padding: 12px 24px;
  border: none;
  background: none;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
}

.admin-tab:hover { color: var(--text); }
.admin-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ---- Cost Cards ---- */
.cost-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.cost-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  text-align: center;
}

.cost-card-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.cost-card-value {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

/* ---- Budget ---- */
.budget-warning {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 16px;
}
.budget-warning.warn { background: #FEF3C7; color: #92400E; }
.budget-warning.over { background: #FEE2E2; color: #991B1B; }

.budget-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.budget-bar-container {
  flex: 1;
  height: 20px;
  background: #F1F5F9;
  border-radius: 10px;
  overflow: hidden;
}

.budget-bar {
  height: 100%;
  background: var(--success);
  border-radius: 10px;
  transition: width 0.3s;
}
.budget-bar.warning { background: var(--warning); }
.budget-bar.over { background: var(--danger); }

.budget-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  min-width: 100px;
  text-align: right;
}

.budget-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.budget-input {
  width: 80px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
}

/* ---- Cost Split ---- */
.cost-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.cost-split-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.cost-split-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.cost-split-value {
  font-size: 0.85rem;
  font-weight: 600;
}

/* ---- Daily Chart ---- */
.daily-chart {
  height: 160px;
  overflow-x: auto;
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  height: 140px;
  gap: 4px;
  padding-bottom: 20px;
  min-width: max-content;
}

.chart-bar-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 24px;
  height: 100%;
  justify-content: flex-end;
}

.chart-bar {
  width: 100%;
  background: var(--primary);
  border-radius: 3px 3px 0 0;
  min-height: 2px;
  transition: height 0.3s;
}

.chart-bar-group:hover .chart-bar {
  background: var(--primary-hover);
}

.chart-label {
  font-size: 0.6rem;
  color: var(--text-muted);
  margin-top: 4px;
  white-space: nowrap;
}

/* ---- Cost Table ---- */
.cost-table-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.cost-month-input {
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
}

.cost-table-wrap {
  overflow-x: auto;
}

.cost-notes-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
}

.cost-notes-table th {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 2px solid var(--border);
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  white-space: nowrap;
}

.cost-notes-table td {
  padding: 6px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.cost-notes-table tr:hover {
  background: #F8FAFC;
  cursor: pointer;
}

.cost-notes-table tr.flagged td:first-child {
  border-left: 3px solid var(--warning);
}

/* ---- What-If ---- */
.whatif-panel {
  padding: 0;
}

.whatif-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.whatif-input {
  width: 60px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
}

.whatif-result {
  font-size: 0.85rem;
}

.whatif-result p {
  margin-bottom: 4px;
}

/* ---- Pricing Editor ---- */
.pricing-editor {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pricing-group h3 {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.pricing-group label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.pricing-input {
  width: 100px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
}

/* ---- Generate Both Button ---- */
.btn-both {
  background: #0D9488;
  color: white;
}
.btn-both:hover { background: #0F766E; }

/* ---- Output Sections ---- */
.output-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}

.output-content {
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text);
  max-height: 300px;
  overflow-y: auto;
  padding: 8px 0;
}

.section-actions {
  display: flex;
  gap: 6px;
}

/* ---- Review Flags Panel ---- */
.review-flags-panel {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

.review-flags-header {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #92400E;
  margin-bottom: 12px;
}

.review-flags-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #B45309;
  margin-bottom: 4px;
}

.review-flags-content {
  white-space: pre-wrap;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #78350F;
  margin-bottom: 12px;
}

.review-flags-content:last-child {
  margin-bottom: 0;
}

/* ---- Billing Panel ---- */
.billing-panel {
  margin-top: 12px;
  padding: 12px;
  background: #EEF2FF;
  border-radius: var(--radius);
  border: 1px solid #C7D2FE;
}

.billing-header {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  margin-bottom: 6px;
}

.billing-content {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text);
  white-space: pre-wrap;
}

/* ---- Provider Settings ---- */
.provider-settings-panel {
  margin-top: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
}

.provider-settings-panel summary {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}

.provider-settings-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.wide-input {
  width: 100%;
  max-width: 320px;
}

/* ---- Modal Overlay ---- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}

.modal-container {
  background: var(--surface);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-container.side-by-side {
  max-width: 1400px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
  padding: 0 4px;
}

.modal-close:hover { color: var(--text); }

.modal-body {
  padding: 20px;
  overflow-y: auto;
  white-space: pre-wrap;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text);
}

.modal-body-split {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.modal-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-pane:first-child {
  border-right: 1px solid var(--border);
}

.modal-pane-header {
  padding: 10px 16px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: #F8FAFC;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-pane-content {
  padding: 16px;
  overflow-y: auto;
  white-space: pre-wrap;
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .app.with-sensei .main-content {
    margin-left: 0;
  }

  .sensei-panel {
    position: static;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    box-shadow: none;
  }

  .app {
    flex-direction: column;
  }

  .controls-row {
    flex-direction: column;
    align-items: stretch;
  }

  .recording-controls {
    flex-direction: row;
  }

  .action-buttons {
    flex-direction: column;
  }

  .action-buttons .btn {
    width: 100%;
  }

  .modal-container.side-by-side {
    max-width: 100%;
  }

  .modal-body-split {
    flex-direction: column;
  }

  .modal-pane:first-child {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
}
