:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --border: #e5e9f0;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-soft: #eff6ff;
  --emerald: #059669;
  --emerald-soft: #ecfdf5;
  --amber: #d97706;
  --amber-soft: #fffbeb;
  --rose: #dc2626;
  --rose-soft: #fef2f2;
  --indigo: #4f46e5;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}
.hidden { display: none !important; }
.muted-sm { font-size: 12px; color: var(--muted); }

/* Login */
.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at top right, #1e293b, #0f172a);
  padding: 20px;
}
.login-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.login-title { font-weight: 800; font-size: 18px; }
.login-sub { font-size: 12px; color: var(--muted); }
.login-form { display: flex; flex-direction: column; gap: 14px; }
.form-error {
  background: var(--rose-soft);
  color: var(--rose);
  border: 1px solid #fecaca;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px;
}

/* Layout */
.app-shell { display: grid; grid-template-columns: 245px 1fr; min-height: 100vh; }
.sidebar {
  background: #0f172a;
  color: #e2e8f0;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 6px; }
.brand-logo {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, #3b82f6, #10b981);
  color: #fff; font-weight: 800; font-size: 15px;
  display: grid; place-items: center; flex-shrink: 0;
}
.brand-name { font-weight: 700; font-size: 15px; color: #fff; }
.brand-sub { font-size: 12px; color: #94a3b8; }

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  border: 0; background: transparent; color: #cbd5e1;
  text-align: left; padding: 10px 12px; border-radius: 9px;
  font-size: 14px; font-weight: 500; cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  transition: background 0.15s, color 0.15s;
}
.nav-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav-item.active { background: var(--primary); color: #fff; font-weight: 600; }
.nav-ico { font-size: 16px; width: 20px; text-align: center; }

.sidebar-footer { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.user-pill {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px; padding: 10px;
}
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: #2563eb; color: #fff; font-weight: 700; font-size: 12px;
  display: grid; place-items: center; flex-shrink: 0;
}
.user-name { font-weight: 600; font-size: 13px; color: #fff; }
.user-email { font-size: 11px; color: #94a3b8; word-break: break-all; }
.sidebar-actions { display: flex; flex-direction: column; gap: 6px; }
.btn-ghost-dark {
  background: transparent; border: 1px solid rgba(255,255,255,0.14);
  color: #cbd5e1; padding: 8px 10px; border-radius: 8px;
  font-size: 12px; cursor: pointer; text-align: left;
}
.btn-ghost-dark:hover { background: rgba(255,255,255,0.08); color: #fff; }

/* Main */
.main-content { padding: 24px 28px; max-width: 1600px; width: 100%; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.page-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; margin-bottom: 20px; flex-wrap: wrap;
}
.page-header h1 { margin: 0; font-size: 22px; font-weight: 800; }
.subtitle { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.header-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Controls & Buttons */
.btn {
  border: 0; border-radius: 9px; padding: 9px 14px; font-size: 13px;
  font-weight: 600; cursor: pointer; display: inline-flex; align-items: center;
  gap: 6px; transition: all 0.15s;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-sm { padding: 6px 10px; font-size: 12px; }
.btn-lg { padding: 11px 18px; font-size: 14px; }
.btn-full { width: 100%; justify-content: center; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: #1d4ed8; }
.btn-emerald { background: var(--emerald); color: #fff; }
.btn-emerald:hover { background: #047857; }
.btn-rose { background: var(--rose); color: #fff; }
.btn-rose:hover { background: #b91c1c; }
.btn-outline { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { background: #f8fafc; border-color: #cbd5e1; }
.btn-icon { background: transparent; border: 0; font-size: 18px; cursor: pointer; color: var(--muted); }

.select-ctrl, .select-mini, input, textarea {
  font-family: inherit; font-size: 13px; border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 10px; background: #fff; color: var(--text);
}
.select-mini { padding: 5px 8px; font-size: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 12px; font-weight: 600; color: #334155; }

.mode-toggle {
  display: inline-flex; background: #e2e8f0; border-radius: 9px; padding: 3px;
}
.mode-btn {
  border: 0; background: transparent; padding: 6px 12px; border-radius: 7px;
  font-size: 12px; font-weight: 600; color: #475569; cursor: pointer;
}
.mode-btn.active { background: #fff; color: var(--text); box-shadow: var(--shadow); }

.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px;
}
.panel-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 8px; margin-bottom: 12px;
}
.panel-head h2 { margin: 0; font-size: 15px; font-weight: 700; }

/* ==================== SIMULATEUR ==================== */
.sim-grid {
  display: grid;
  grid-template-columns: 290px 1fr 310px;
  gap: 16px;
  align-items: start;
}
.gen-controls { display: flex; gap: 6px; align-items: center; }
.personas-list { display: flex; flex-direction: column; gap: 8px; max-height: 74vh; overflow-y: auto; }
.persona-card {
  border: 1px solid var(--border); border-radius: 10px; padding: 11px;
  cursor: pointer; transition: all 0.15s; background: #fff;
}
.persona-card:hover { border-color: #93c5fd; background: #f8fafc; }
.persona-card.active { border-color: var(--primary); background: var(--primary-soft); }
.persona-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-bottom: 4px; }
.persona-name { font-weight: 700; font-size: 13px; }
.persona-sub { font-size: 12px; color: #334155; }
.persona-meta { font-size: 11px; color: var(--muted); margin-top: 3px; }

.badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700;
}
.badge-warm { background: var(--emerald-soft); color: var(--emerald); }
.badge-moyen { background: var(--primary-soft); color: var(--primary); }
.badge-difficile { background: var(--amber-soft); color: var(--amber); }
.badge-boss { background: var(--rose-soft); color: var(--rose); }

/* Stage */
.call-stage { display: flex; flex-direction: column; gap: 14px; min-height: 74vh; }
.prospect-banner {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  padding-bottom: 12px; border-bottom: 1px solid var(--border); flex-wrap: wrap;
}
.prospect-banner-left { display: flex; gap: 12px; align-items: flex-start; flex: 1; }
.prospect-avatar-lg {
  width: 46px; height: 46px; border-radius: 12px;
  background: linear-gradient(135deg, #1e293b, #334155);
  color: #fff; font-weight: 800; font-size: 16px;
  display: grid; place-items: center; flex-shrink: 0;
}
.stage-name-row { display: flex; align-items: center; gap: 8px; }
.stage-name-row h2 { margin: 0; font-size: 17px; }
.stage-role { font-size: 12px; color: #334155; font-weight: 500; margin-top: 2px; }
.stage-context { font-size: 12px; color: var(--muted); margin-top: 4px; }

.call-timer-box {
  display: flex; align-items: center; gap: 8px;
  background: #f8fafc; border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 12px; font-size: 12px; font-weight: 600;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; }
.status-dot.live { background: #10b981; box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2); }
.status-dot.connecting { background: #f59e0b; }
.timer { font-variant-numeric: tabular-nums; color: var(--muted); }

.call-controls-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: #0f172a; color: #fff; border-radius: 12px; padding: 14px 16px; flex-wrap: wrap;
}
.call-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.wave-box { display: flex; align-items: center; gap: 4px; height: 28px; padding: 0 6px; }
.wave-box span {
  width: 4px; height: 8px; border-radius: 99px; background: #475569;
  transition: height 0.15s, background 0.15s;
}
.wave-box.active span { background: #10b981; animation: wave 0.9s infinite ease-in-out; }
.wave-box.speaking span { background: #3b82f6; animation: wave 0.55s infinite ease-in-out; }
.wave-box span:nth-child(2) { animation-delay: 0.1s; }
.wave-box span:nth-child(3) { animation-delay: 0.2s; }
.wave-box span:nth-child(4) { animation-delay: 0.3s; }
.wave-box span:nth-child(5) { animation-delay: 0.2s; }
.wave-box span:nth-child(6) { animation-delay: 0.1s; }
@keyframes wave {
  0%, 100% { height: 7px; }
  50% { height: 26px; }
}

.transcript-box {
  flex: 1; min-height: 300px; max-height: 440px; overflow-y: auto;
  background: #f8fafc; border: 1px solid var(--border); border-radius: 10px;
  padding: 14px; display: flex; flex-direction: column; gap: 10px;
}
.transcript-empty {
  margin: auto; text-align: center; color: #475569; max-width: 380px;
  display: flex; flex-direction: column; gap: 6px; align-items: center;
}
.empty-ico { font-size: 32px; }
.msg-bubble {
  max-width: 82%; padding: 9px 13px; border-radius: 12px; font-size: 13px; line-height: 1.45;
}
.msg-bubble.user {
  align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 3px;
}
.msg-bubble.prospect {
  align-self: flex-start; background: #fff; border: 1px solid var(--border); border-bottom-left-radius: 3px;
}
.msg-bubble.system {
  align-self: center; background: #fef3c7; color: #92400e; font-size: 12px; font-weight: 600;
}
.msg-who { font-size: 10px; font-weight: 700; opacity: 0.75; margin-bottom: 2px; text-transform: uppercase; }

.text-input-bar { display: flex; gap: 8px; }
.text-input-bar input { flex: 1; }

/* Coach en temps réel */
.coach-panel { display: flex; flex-direction: column; gap: 12px; }
.mood-pill {
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  background: #f1f5f9; color: #475569;
}
.interest-meter { background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: 10px; }
.meter-label { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 6px; }
.meter-track { height: 8px; background: #e2e8f0; border-radius: 99px; overflow: hidden; }
.meter-fill { height: 100%; background: linear-gradient(90deg, #ef4444, #f59e0b, #10b981); transition: width 0.4s; }

.coach-feed { display: flex; flex-direction: column; gap: 8px; max-height: 360px; overflow-y: auto; }
.coach-placeholder { font-size: 12px; color: var(--muted); background: #f8fafc; padding: 12px; border-radius: 10px; border: 1px dashed #cbd5e1; }
.nudge-card {
  border-radius: 10px; padding: 10px 12px; border-left: 4px solid #94a3b8;
  background: #f8fafc; animation: slideIn 0.25s ease;
}
.nudge-card.warning { background: #fef2f2; border-left-color: #dc2626; }
.nudge-card.opportunity { background: #fffbeb; border-left-color: #d97706; }
.nudge-card.tip { background: #eff6ff; border-left-color: #2563eb; }
.nudge-card.good { background: #ecfdf5; border-left-color: #059669; }
.nudge-title { font-weight: 700; font-size: 12px; margin-bottom: 3px; }
.nudge-msg { font-size: 12px; color: #1e293b; }
.nudge-line {
  margin-top: 6px; font-size: 12px; font-style: italic;
  background: rgba(255,255,255,0.75); padding: 5px 8px; border-radius: 6px; color: #0f172a;
}
@keyframes slideIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

.quick-cheat { background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font-size: 12px; }
.quick-cheat summary { font-weight: 700; cursor: pointer; }
.cheat-steps { margin: 8px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; color: #334155; }

/* ==================== CANEVAS FEUILLE PAPIER STRATEGYZER ==================== */
.paper-desk {
  background: radial-gradient(circle at top left, #5c4033, #3b261d 70%, #2a1b14);
  padding: 22px;
  border-radius: 16px;
  box-shadow: inset 0 2px 16px rgba(0, 0, 0, 0.45);
  overflow-x: auto;
}

.paper-sheet {
  background: linear-gradient(180deg, #ffffff 0%, #fafaf7 100%);
  border: 1px solid #d6d3cd;
  border-radius: 4px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.18);
  padding: 20px 24px 16px;
  min-width: 1060px;
  position: relative;
}

.sheet-top {
  margin-bottom: 14px;
  border-bottom: 1.5px solid #cbd5e1;
  padding-bottom: 12px;
}
.sheet-title {
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.2px;
  color: #1e293b;
  margin-bottom: 10px;
}
.sheet-meta-row {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}
.sheet-field {
  flex: 1;
  border: 1.2px solid #94a3b8;
  background: #fff;
  padding: 5px 10px;
  font-size: 12px;
  color: #475569;
  border-radius: 2px;
}
.sheet-field.sm { flex: 0.42; }
.sheet-field strong { color: #0f172a; margin-left: 4px; }

.sheet-diagram {
  position: relative;
  min-height: 620px;
}
.sheet-svg-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.sheet-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 42.5% 12% 45.5%;
  min-height: 600px;
  padding: 36px 26px 26px 26px;
  align-items: stretch;
}

/* Carré gauche */
.sheet-square {
  display: grid;
  grid-template-columns: 38% 62%;
  gap: 10px;
  padding: 6px 10px;
}
.sheet-square-right {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

/* Pont central FIT */
.sheet-bridge {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 118px 4px 118px;
  text-align: center;
}
.bridge-arrow-label {
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  background: rgba(255, 255, 255, 0.85);
  padding: 2px 6px;
  border-radius: 4px;
}
.bridge-fit-text {
  font-size: 10.5px;
  line-height: 1.3;
  font-weight: 600;
  color: #334155;
  max-width: 104px;
  padding: 6px;
}

/* Cercle droit */
.sheet-circle {
  display: grid;
  grid-template-columns: 60% 40%;
  gap: 10px;
  padding: 16px 16px 16px 26px;
}
.sheet-circle-left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.sheet-zone {
  display: flex;
  flex-direction: column;
  min-height: 245px;
}
.zone-products, .zone-jobs {
  justify-content: center;
}
.sheet-zone-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  padding: 2px 4px;
}
.sheet-zone-bar span {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: #475569;
  text-transform: uppercase;
}
.btn-sheet-add {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid #94a3b8;
  background: rgba(255, 255, 255, 0.9);
  color: #334155;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.btn-sheet-add:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.notes-zone.sheet-notes {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
  min-height: 185px;
  padding: 6px;
  border-radius: 10px;
  transition: background 0.15s, outline 0.15s;
}
.notes-zone.drag-over {
  background: rgba(37, 99, 235, 0.1);
  outline: 2px dashed var(--primary);
}

/* Vrais Post-its carrés collés sur papier */
.sticky-note {
  width: 112px;
  min-height: 98px;
  padding: 8px 8px 6px;
  border-radius: 2px 2px 10px 2px;
  box-shadow: 2px 4px 9px rgba(15, 23, 42, 0.2), inset 0 14px 18px rgba(255, 255, 255, 0.22);
  cursor: grab;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 11.5px;
  line-height: 1.28;
  font-weight: 700;
  color: #0f172a;
  transition: transform 0.16s, box-shadow 0.16s;
  user-select: none;
  position: relative;
}
.sticky-note:nth-child(odd) { transform: rotate(-1.1deg); }
.sticky-note:nth-child(even) { transform: rotate(1deg); }
.sticky-note:nth-child(3n) { transform: rotate(-0.4deg); }
.sticky-note:hover {
  transform: translateY(-4px) scale(1.04) rotate(0deg) !important;
  box-shadow: 4px 10px 18px rgba(15, 23, 42, 0.28);
  z-index: 10;
}
.sticky-note.dragging { opacity: 0.4; cursor: grabbing; }
.sticky-note.teal { background: #64d8c3; border-bottom: 3px solid #2bb59e; }
.sticky-note.purple { background: #dda5ee; border-bottom: 3px solid #b86fd1; }
.sticky-note.pink { background: #ff8ea7; border-bottom: 3px solid #e65c7c; }
.sticky-note.yellow { background: #fef08a; border-bottom: 3px solid #eab308; }

.sheet-bottom-notes {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1.5px dashed #cbd5e1;
}
.notes-row.sheet-notes {
  min-height: 92px;
}
.notes-row .sticky-note {
  width: 195px;
  min-height: 82px;
  font-size: 12px;
}

.sticky-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
}
.sticky-hit-btn {
  border: 0;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  color: #0f172a;
}
.sticky-hit-btn:hover { background: #fff; }
.sticky-edit-hint { font-size: 10px; opacity: 0.5; }

.sheet-footer-credits {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid #e2e8f0;
  font-size: 11px;
  color: #64748b;
}

/* Color picker */
.color-picker { display: flex; gap: 10px; }
.color-dot {
  width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; cursor: pointer;
}
.color-dot.teal { background: #64d8c3; }
.color-dot.purple { background: #dda5ee; }
.color-dot.pink { background: #ff8ea7; }
.color-dot.yellow { background: #fef08a; }
.color-dot.active { border-color: #0f172a; transform: scale(1.12); }

/* ==================== PLAYBOOK ==================== */
.rules-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.rule-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow);
}
.rule-num { font-size: 12px; font-weight: 800; color: var(--primary); margin-bottom: 6px; }
.rule-card h3 { margin: 0 0 6px; font-size: 15px; }
.rule-card p { margin: 0; font-size: 13px; color: #475569; }

.playbook-section { margin-bottom: 18px; }
.playbook-section h2 { margin: 0 0 14px; font-size: 16px; }
.playbook-steps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.pb-step {
  background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: 14px;
}
.pb-step-head { font-weight: 800; color: var(--primary); font-size: 13px; margin-bottom: 6px; }
.pb-quote {
  background: #fff; border-left: 3px solid var(--emerald); padding: 10px 12px;
  border-radius: 6px; font-style: italic; color: #0f172a; margin-top: 8px;
}

.dodont-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dodont-col { border-radius: 10px; padding: 14px; }
.dodont-col.dont { background: #fef2f2; border: 1px solid #fecaca; }
.dodont-col.do { background: #ecfdf5; border: 1px solid #a7f3d0; }
.dodont-col h3 { margin: 0 0 10px; font-size: 14px; }
.dodont-col ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; }

.objections-list { display: flex; flex-direction: column; gap: 8px; }
.obj-item { background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.obj-item summary { font-weight: 700; cursor: pointer; }
.obj-item p { margin: 8px 0 0; color: #334155; }

/* ==================== HISTORIQUE ==================== */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px;
}
.stat-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.stat-card strong { font-size: 26px; font-weight: 800; }
.calls-list { display: flex; flex-direction: column; gap: 8px; }
.call-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer;
}
.call-row:hover { background: #f8fafc; border-color: #cbd5e1; }
.score-pill {
  padding: 4px 10px; border-radius: 999px; font-weight: 800; font-size: 13px;
}
.score-high { background: var(--emerald-soft); color: var(--emerald); }
.score-mid { background: var(--amber-soft); color: var(--amber); }
.score-low { background: var(--rose-soft); color: var(--rose); }

/* ==================== MODALS & DEBRIEF ==================== */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.55);
  display: grid; place-items: center; z-index: 100; padding: 18px;
}
.modal-card {
  background: #fff; border-radius: 14px; width: 100%; max-width: 500px;
  max-height: 88vh; overflow-y: auto; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}
.modal-lg { max-width: 720px; }
.modal-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 18px 20px; border-bottom: 1px solid var(--border);
}
.modal-head h2 { margin: 0; font-size: 17px; }
.modal-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 14px 20px; border-top: 1px solid var(--border);
}
.modal-foot-inline { display: flex; align-items: center; gap: 8px; margin-top: 6px; }

.debrief-top { display: flex; align-items: center; gap: 16px; background: #f8fafc; padding: 14px; border-radius: 12px; }
.debrief-score-circle {
  width: 68px; height: 68px; border-radius: 50%; background: #0f172a; color: #fff;
  display: grid; place-items: center; font-size: 22px; font-weight: 800; flex-shrink: 0;
}
.subscores-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.subscore-item { background: #f8fafc; border: 1px solid var(--border); border-radius: 9px; padding: 10px; }
.subscore-row { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; margin-bottom: 5px; }
.phrasing-box { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 10px; padding: 12px; font-size: 13px; }

.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.users-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.user-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 12px;
}
.sub-form { display: flex; flex-direction: column; gap: 10px; background: #f8fafc; padding: 12px; border-radius: 10px; }
.sub-form h4 { margin: 0; font-size: 13px; }

.toast {
  position: fixed; bottom: 20px; right: 20px; background: #0f172a; color: #fff;
  padding: 10px 16px; border-radius: 10px; font-size: 13px; font-weight: 600;
  box-shadow: 0 10px 25px rgba(0,0,0,0.25); z-index: 200;
}

@media (max-width: 1180px) {
  .sim-grid { grid-template-columns: 1fr; }
  .canvas-main-grid, .rules-grid, .stats-row, .dodont-grid, .playbook-steps, .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { height: auto; position: relative; }
}
