/* ════════════════════════════════════════════════
   Highr.AI — Cause ID CS Module Styles
   Primary: #e03d6f (rose/coral — Cause ID brand)
   ════════════════════════════════════════════════ */

/* ── Dashboard card ── */
.dash-module-card.cause { border-color: rgba(224,61,111,.25); }
.dash-module-card.cause .dmc-icon-wrap { background: rgba(224,61,111,.12); }
.dash-module-card.cause .dmc-code { color: #e03d6f; }
.dash-module-card.cause:hover { border-color: rgba(224,61,111,.5); box-shadow: 0 0 0 1px rgba(224,61,111,.2); }

/* ── Home screen role card ── */
.role-card.cause { border-color: rgba(224,61,111,.2); }
.role-card.cause .rc-label { color: #e03d6f; }
.role-card.cause:hover { border-color: rgba(224,61,111,.45); background: rgba(224,61,111,.04); }
.role-card.cause .rc-arrow { color: #e03d6f; }

/* ════════════════════════════════════════════════
   CAUSE LANDING SCREEN
   ════════════════════════════════════════════════ */
.cause-landing-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1080px; margin: 0 auto; padding: 60px 40px;
  min-height: 100vh; gap: 48px;
}
.cause-landing-hero { flex: 1; min-width: 0; }
.cause-landing-side { flex: 0 0 420px; }

.cause-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'IBM Plex Mono', monospace; font-size: 10px;
  letter-spacing: .12em; text-transform: uppercase; color: #e03d6f;
  border: 1px solid rgba(224,61,111,.3); border-radius: 20px;
  padding: 5px 12px; margin-bottom: 24px;
}
.cause-badge-dot {
  width: 6px; height: 6px; border-radius: 50%; background: #e03d6f;
  animation: pulse-cause 2s infinite;
}
@keyframes pulse-cause {
  0%,100% { opacity:1; } 50% { opacity:.4; }
}

.cause-h1 {
  font-family: 'Bebas Neue', sans-serif; font-size: 62px; line-height: 1.05;
  color: var(--text, #f0f0f5); margin: 0 0 16px; letter-spacing: .02em;
}
.cause-h1 span { color: #e03d6f; }
.cause-h1 em { font-style: normal; color: var(--text-dim, #a0a0b5); }

.cause-tagline {
  color: var(--text-dim, #a0a0b5); font-size: 15px; line-height: 1.65;
  margin: 0 0 32px;
}

.cause-back-btn {
  background: none; border: 1px solid rgba(255,255,255,.12);
  color: var(--text-dim, #a0a0b5); border-radius: 8px;
  padding: 9px 18px; font-size: 13px; cursor: pointer;
  font-family: 'DM Sans', sans-serif; transition: all .2s;
}
.cause-back-btn:hover { border-color: rgba(224,61,111,.4); color: #e03d6f; }

/* Picker card */
.cause-picker {
  background: var(--card-bg, rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.08); border-radius: 16px;
  padding: 24px; margin-bottom: 16px;
}
.cause-picker-lbl {
  font-size: 11px; font-family: 'IBM Plex Mono', monospace;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-dim, #a0a0b5); margin-bottom: 12px;
}

/* Scenario tiles */
.cause-sc-grid { display: flex; flex-direction: column; gap: 8px; }
.cause-sc-tile {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid rgba(255,255,255,.08); border-radius: 10px;
  padding: 12px 14px; cursor: pointer;
  background: transparent; transition: all .2s;
}
.cause-sc-tile:hover { border-color: rgba(224,61,111,.3); background: rgba(224,61,111,.04); }
.cause-sc-tile.sel { border-color: #e03d6f; background: rgba(224,61,111,.08); }
.cause-sc-icon { font-size: 22px; flex-shrink: 0; }
.cause-sc-title { font-size: 13px; font-weight: 600; color: var(--text, #f0f0f5); line-height: 1.3; }
.cause-sc-desc { font-size: 11px; color: var(--text-dim, #a0a0b5); margin-top: 2px; line-height: 1.4; }

/* Difficulty chips */
.cause-diff-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.cause-diff-chip {
  border: 1px solid rgba(255,255,255,.1); border-radius: 20px;
  padding: 6px 14px; font-size: 12px; cursor: pointer;
  background: none; color: var(--text-dim, #a0a0b5);
  font-family: 'DM Sans', sans-serif; transition: all .18s;
}
.cause-diff-chip:hover { border-color: rgba(224,61,111,.35); color: #e03d6f; }
.cause-diff-chip.sel { border-color: #e03d6f; color: #e03d6f; background: rgba(224,61,111,.08); }

/* Start button */
.cause-start-btn {
  width: 100%; padding: 14px; border-radius: 10px;
  background: #e03d6f; border: none; color: #fff;
  font-size: 15px; font-weight: 600; cursor: pointer;
  font-family: 'DM Sans', sans-serif; transition: all .2s;
  box-shadow: 0 0 24px rgba(224,61,111,.3);
}
.cause-start-btn:hover { background: #c72d5d; box-shadow: 0 0 32px rgba(224,61,111,.45); }

/* Responsive landing */
@media (max-width: 820px) {
  .cause-landing-inner { flex-direction: column; padding: 32px 20px; }
  .cause-landing-side { flex: none; width: 100%; }
  .cause-h1 { font-size: 44px; }
}

/* ════════════════════════════════════════════════
   CAUSE SIMULATOR SCREEN
   ════════════════════════════════════════════════ */

/* Header tag colour override */
#cause-tag { color: #e03d6f !important; }

/* Sim body */
.cause-sim-body { display: flex; height: calc(100vh - 56px); overflow: hidden; }

/* Chat panel */
.cause-chat-panel { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; border-right: 1px solid rgba(255,255,255,.07); }

/* Context bar */
.cause-ctx-bar { padding: 10px 20px; border-bottom: 1px solid rgba(255,255,255,.06); background: rgba(224,61,111,.04); }
.cause-ctx-lbl { font-size: 10px; font-family: 'IBM Plex Mono', monospace; letter-spacing: .1em; text-transform: uppercase; color: #e03d6f; margin-bottom: 2px; }
.cause-ctx-text { font-size: 12px; color: var(--text-dim, #a0a0b5); }

/* Chat messages */
.cause-msg { display: flex; align-items: flex-start; gap: 10px; padding: 10px 16px; }
.cause-msg.agent { flex-direction: row-reverse; }
.cause-msg-av { width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.cause-msg.agent .cause-msg-av { background: rgba(224,61,111,.2); }
.cause-msg-body { max-width: 72%; }
.cause-msg-name { font-size: 10px; color: var(--text-dim, #a0a0b5); margin-bottom: 4px; font-family: 'IBM Plex Mono', monospace; }
.cause-msg.agent .cause-msg-name { text-align: right; }
.cause-bubble {
  padding: 10px 14px; border-radius: 12px; font-size: 13.5px; line-height: 1.55;
  background: rgba(255,255,255,.06); color: var(--text, #f0f0f5);
  word-break: break-word;
}
.cause-msg.agent .cause-bubble { background: rgba(224,61,111,.15); border: 1px solid rgba(224,61,111,.25); }

/* Typing indicator */
.cause-typing { display: flex; gap: 4px; align-items: center; padding: 10px 14px; }

/* Resolution banner */
#cause-res-banner { background: rgba(16,185,129,.1); border-top: 1px solid rgba(16,185,129,.2); }

/* Input area */
.cause-input-area { padding: 12px 16px; border-top: 1px solid rgba(255,255,255,.07); }
.cause-hint-bubble {
  background: rgba(224,61,111,.09) !important;
  border: 1px solid rgba(224,61,111,.28) !important;
  border-left: 3px solid #e03d6f !important;
  border-radius: 10px; padding: 10px 14px; margin-bottom: 8px;
  cursor: pointer; display: none;
  color: #fda4af !important;
}
.cause-hint-bubble.visible { display: block; }
.cause-hint-bubble .hint-bubble-lbl { color: #e03d6f !important; }
.cause-ta { border-color: rgba(224,61,111,.2) !important; }
.cause-ta:focus { border-color: rgba(224,61,111,.5) !important; box-shadow: 0 0 0 2px rgba(224,61,111,.12) !important; }
.cause-send { background: #e03d6f !important; }
.cause-send:hover:not(:disabled) { background: #c72d5d !important; }
.cause-hint-btn { color: #e03d6f !important; border-color: rgba(224,61,111,.3) !important; }
.cause-hint-btn:hover:not(:disabled) { background: rgba(224,61,111,.08) !important; border-color: #e03d6f !important; }
.hq-pip.cause-pip.hq-active { background: #e03d6f !important; }
.hq-label.cause { color: #e03d6f !important; }

/* ── Coach panel ── */
.cause-coach-panel {
  flex: 0 0 300px; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 16px;
  border-left: 1px solid rgba(255,255,255,.07);
}
.cause-coach-sec { }
.cause-sec-title { font-size: 10px; font-family: 'IBM Plex Mono', monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim, #a0a0b5); margin-bottom: 10px; }

/* Score circle */
.cause-score-circle {
  width: 72px; height: 72px; border-radius: 50%; flex-shrink: 0;
  background: conic-gradient(#e03d6f calc(var(--score-pct, 0%)), rgba(255,255,255,.08) calc(var(--score-pct, 0%)));
  display: flex; align-items: center; justify-content: center;
  --score-pct: 0%;
}
.cause-score-inner { width: 56px; height: 56px; border-radius: 50%; background: var(--bg, #0d0d14); display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 700; color: var(--text, #f0f0f5); }
.cause-score-row { display: flex; align-items: center; gap: 12px; }
.cause-score-bars { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.cause-bar-row { display: flex; align-items: center; gap: 6px; }
.cause-bar-lbl { font-size: 10px; color: var(--text-dim, #a0a0b5); width: 66px; flex-shrink: 0; }
.cause-bar-track { flex: 1; height: 4px; background: rgba(255,255,255,.08); border-radius: 2px; overflow: hidden; }
.cause-bar-fill { height: 100%; background: #e03d6f; border-radius: 2px; transition: width .4s; width: 0%; }
.cause-bar-val { font-size: 10px; color: var(--text-dim, #a0a0b5); width: 24px; text-align: right; flex-shrink: 0; }

/* Coaching feed */
.cause-coach-feed { display: flex; flex-direction: column; gap: 8px; }
.cause-coach-empty { font-size: 12px; color: var(--text-dim, #a0a0b5); font-style: italic; padding: 8px 0; }
.cause-coach-card { border-radius: 8px; padding: 10px 12px; font-size: 12px; line-height: 1.5; color: var(--text, #f0f0f5); }
.cause-coach-card.good { background: rgba(16,185,129,.08); border: 1px solid rgba(16,185,129,.2); }
.cause-coach-card.tip  { background: rgba(224,61,111,.08);  border: 1px solid rgba(224,61,111,.2); }
.cause-coach-card.warn { background: rgba(245,158,11,.08);  border: 1px solid rgba(245,158,11,.2); }
.cause-coach-type { font-size: 9px; font-family: 'IBM Plex Mono', monospace; letter-spacing: .1em; margin-bottom: 4px; }
.cause-coach-card.good .cause-coach-type { color: #10b981; }
.cause-coach-card.tip  .cause-coach-type { color: #e03d6f; }
.cause-coach-card.warn .cause-coach-type { color: #f59e0b; }

/* Checklist */
.cause-checklist { display: flex; flex-direction: column; gap: 6px; }
.cause-chk { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-dim, #a0a0b5); transition: color .2s; }
.cause-chk-box { width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid rgba(255,255,255,.15); display: flex; align-items: center; justify-content: center; font-size: 9px; color: transparent; flex-shrink: 0; transition: all .25s; }
.cause-chk.done { color: var(--text, #f0f0f5); }
.cause-chk.done .cause-chk-box { background: #e03d6f; border-color: #e03d6f; color: #fff; }

/* Mobile coach toggle */
@media (max-width: 768px) {
  .cause-coach-panel {
    position: fixed; top: 0; right: -100%; bottom: 0;
    width: min(320px, 90vw); z-index: 300;
    background: var(--bg, #0d0d14); border-left: 1px solid rgba(255,255,255,.1);
    transition: right .3s ease; padding-top: 60px;
  }
  .cause-coach-panel.mobile-open { right: 0; }
  .cause-chat-panel { border-right: none; }
}

/* ════════════════════════════════════════════════
   CAUSE RESULTS SCREEN
   ════════════════════════════════════════════════ */
.cause-results-inner { max-width: 560px; margin: 0 auto; padding: 40px 24px; }
.cause-r-header { text-align: center; margin-bottom: 28px; }
.cause-r-trophy { font-size: 52px; margin-bottom: 8px; }
.cause-r-title { font-size: 22px; font-weight: 700; color: var(--text, #f0f0f5); margin-bottom: 4px; }
.cause-r-score {
  font-family: 'Bebas Neue', sans-serif; font-size: 72px; color: #e03d6f;
  line-height: 1; margin: 4px 0;
}
.cause-r-sub { font-size: 13px; color: var(--text-dim, #a0a0b5); }
.cause-r-card {
  background: var(--card-bg, rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.08); border-radius: 12px;
  padding: 18px 20px; margin-bottom: 14px;
}
.cause-r-card-title { font-size: 10px; font-family: 'IBM Plex Mono', monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim, #a0a0b5); margin-bottom: 10px; }
.cause-r-badge { font-size: 16px; font-weight: 600; color: var(--text, #f0f0f5); }
.cause-dl-btn {
  display: block; width: 100%; padding: 13px; text-align: center;
  background: rgba(224,61,111,.1); border: 1px solid rgba(224,61,111,.3);
  border-radius: 10px; color: #e03d6f; font-size: 14px; font-weight: 600;
  cursor: pointer; font-family: 'DM Sans', sans-serif; margin-bottom: 10px; transition: all .2s;
}
.cause-dl-btn:hover { background: rgba(224,61,111,.18); }
.cause-retry-btn {
  display: block; width: 100%; padding: 13px; text-align: center;
  background: none; border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px; color: var(--text-dim, #a0a0b5); font-size: 14px;
  cursor: pointer; font-family: 'DM Sans', sans-serif; transition: all .2s;
}
.cause-retry-btn:hover { border-color: rgba(224,61,111,.3); color: #e03d6f; }

/* ════════════════════════════════════════════════
   CAUSE SOP MODAL
   ════════════════════════════════════════════════ */
.cause-sop-btn {
  background: none; border: 1px solid rgba(224,61,111,.3);
  border-radius: 8px; color: rgba(224,61,111,.8); font-size: 13px;
  font-family: 'DM Sans', sans-serif; padding: 7px 16px;
  cursor: pointer; transition: all .2s;
}
.cause-sop-btn:hover { background: rgba(224,61,111,.08); border-color: rgba(224,61,111,.6); color: #e03d6f; }

.cause-sop-overlay {
  display: none; position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,.72); backdrop-filter: blur(4px);
  align-items: center; justify-content: center; padding: 20px;
}
.cause-sop-overlay.open { display: flex; }

.cause-sop-card {
  background: var(--bg-card, #13131f); border: 1px solid rgba(224,61,111,.2);
  border-radius: 16px; width: 100%; max-width: 600px;
  max-height: 90vh; display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}

.cause-sop-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 20px 24px 16px; border-bottom: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0;
}
.cause-sop-eyebrow {
  font-size: 10px; font-family: 'IBM Plex Mono', monospace; letter-spacing: .12em;
  text-transform: uppercase; color: #e03d6f; margin-bottom: 3px;
}
.cause-sop-title { font-size: 18px; font-weight: 700; color: var(--text, #f0f0f5); }
.cause-sop-close {
  background: none; border: none; color: var(--text-dim, #a0a0b5);
  font-size: 18px; cursor: pointer; padding: 2px 6px; line-height: 1;
  border-radius: 4px; transition: color .15s;
}
.cause-sop-close:hover { color: var(--text, #f0f0f5); }

.cause-sop-body {
  overflow-y: auto; padding: 20px 24px; display: flex; flex-direction: column; gap: 16px;
  flex: 1;
}
.cause-sop-body::-webkit-scrollbar { width: 4px; }
.cause-sop-body::-webkit-scrollbar-thumb { background: rgba(224,61,111,.3); border-radius: 2px; }

.cause-sop-section { display: flex; flex-direction: column; gap: 6px; }

.cause-sop-step-label {
  font-size: 10px; font-family: 'IBM Plex Mono', monospace; letter-spacing: .1em;
  color: #e03d6f; font-weight: 600;
}
.cause-sop-step-desc { font-size: 13px; color: var(--text-dim, #a0a0b5); line-height: 1.5; }
.cause-sop-example {
  background: rgba(224,61,111,.07); border-left: 3px solid #e03d6f;
  border-radius: 0 8px 8px 0; padding: 9px 12px;
  font-size: 13px; color: var(--text, #f0f0f5); font-style: italic; line-height: 1.5;
}

.cause-sop-track {
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.07);
  border-radius: 10px; padding: 12px 14px; margin-top: 4px;
}
.cause-sop-track-title {
  font-size: 12px; font-weight: 600; color: var(--text, #f0f0f5); margin-bottom: 8px;
}
.cause-sop-list {
  margin: 0; padding-left: 18px;
  font-size: 12.5px; color: var(--text-dim, #a0a0b5); line-height: 1.9;
}
.cause-sop-list li strong { color: var(--text, #f0f0f5); }

.cause-sop-note {
  background: rgba(245,158,11,.06); border: 1px solid rgba(245,158,11,.15);
  border-radius: 8px; padding: 11px 14px;
  font-size: 12.5px; color: #d4a82a; line-height: 1.6;
}
.cause-sop-note strong { color: #f59e0b; }
.cause-sop-note em { font-style: normal; font-weight: 600; }

.cause-sop-cta {
  margin: 0 24px 20px; padding: 13px; flex-shrink: 0;
  background: #e03d6f; border: none; border-radius: 10px;
  color: #fff; font-size: 14px; font-weight: 700;
  font-family: 'DM Sans', sans-serif; cursor: pointer; transition: background .2s;
}
.cause-sop-cta:hover { background: #c8305d; }
