/* Default theme: light purple/white, matching the reference SetLab look —
   clean white surfaces, soft lavender fills, a solid purple accent. Dark mode
   (below) is a direct white->black substitution: same structure, same accent,
   just inverted surfaces — anywhere white is needed for legibility (button
   text, badge text, etc.) it's hardcoded already and doesn't use these vars,
   so it stays white in both themes. */
:root, :root[data-theme="light"] {
  --bg: #f6f5fb;
  --surface: #ffffff;
  --surface-2: #f1effa;
  --border: #e4e1f3;
  --text: #201f33;
  --text-dim: #6b6d84;
  --accent: #6c5dd3;
  --accent-dim: #ece9fb;
  --good: #1fa06b;
  --warn: #c8860d;
  --bad: #e5484d;
  --radius: 10px;
}

:root[data-theme="dark"] {
  --bg: #0b0d12;
  --surface: #12151c;
  --surface-2: #1a1e28;
  --border: #262b38;
  --text: #e8eaef;
  --text-dim: #9aa1b1;
  --accent: #7c6cf0;
  --accent-dim: #2c2653;
  --good: #34c281;
  --warn: #f0b429;
  --bad: #ef5350;
  --radius: 10px;
}

* { box-sizing: border-box; }

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.brand { font-weight: 700; font-size: 1.1rem; letter-spacing: 0.02em; }
.nav-links { display: flex; gap: 20px; }
.nav-links a { color: var(--text-dim); font-weight: 500; }
.nav-links a.active, .nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-user { display: flex; align-items: center; gap: 14px; color: var(--text-dim); font-size: 0.9rem; }
.role-badge {
  background: var(--accent-dim);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-left: 6px;
}

.page { max-width: 960px; margin: 0 auto; padding: 32px 24px 80px; }
.page.wide { max-width: 1200px; }

.link-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0;
}
.link-btn:hover { color: var(--text); text-decoration: underline; }

h1 { font-size: 1.7rem; margin-bottom: 4px; }
h2 { font-size: 1.25rem; margin-top: 0; }
.subtitle { color: var(--text-dim); margin-top: 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 18px;
}

.grid { display: grid; gap: 16px; }
.grid.cols-5 { grid-template-columns: repeat(5, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 800px) { .grid.cols-5, .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; } }

.portal-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  transition: border-color 0.15s, transform 0.15s;
  color: var(--text);
}
.portal-card:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-2px); }
.portal-card .portal-icon {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--accent-dim); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin: 0 auto 14px;
}
.portal-card .portal-title { font-weight: 700; font-size: 1.05rem; margin-bottom: 6px; }
.portal-card .portal-desc { color: var(--text-dim); font-size: 0.88rem; }
.portal-card.disabled { opacity: 0.55; pointer-events: none; }

/* Shared in-app document viewer (see documentViewer() in src/views/layout.js)
   — a PDF <iframe> or a docx-converted-to-HTML container. Both used on the
   Resources tab and on "File" training content blocks. */
.doc-viewer {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 4px;
}
.doc-viewer-frame {
  width: 100%;
  height: 78vh;
  border: none;
  display: block;
  background: #fff;
}
.docx-viewer {
  background: #fff;
  color: #1a1a1a;
  padding: 32px;
  max-height: 78vh;
  overflow-y: auto;
  line-height: 1.6;
}
.docx-viewer img { max-width: 100%; height: auto; }
.docx-viewer table { border-collapse: collapse; margin: 12px 0; }
.docx-viewer table td, .docx-viewer table th { border: 1px solid #ccc; padding: 4px 10px; }
.docx-viewer p { margin: 0 0 12px; }

.day-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: border-color 0.15s;
}
.day-card:hover { border-color: var(--accent); text-decoration: none; }
.day-card.locked { opacity: 0.5; pointer-events: none; }
.day-card.complete { border-color: var(--good); }
.day-label { font-size: 0.75rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; }
.day-title { font-weight: 600; margin: 4px 0 8px; }
.day-status { font-size: 0.8rem; color: var(--text-dim); }
.day-status.complete { color: var(--good); }

.progress-bar-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
  margin: 8px 0;
}
.progress-bar-fill { height: 100%; background: var(--accent); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
th { color: var(--text-dim); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }
tr:hover td { background: var(--surface-2); }

.status-pill {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}
.status-pill.training { background: rgba(240,180,41,0.15); color: var(--warn); }
.status-pill.certified { background: rgba(52,194,129,0.15); color: var(--good); }
.status-pill.not-started { background: rgba(154,161,177,0.15); color: var(--text-dim); }

form.stacked { display: flex; flex-direction: column; gap: 14px; max-width: 420px; }
.q-option-row { display: flex; align-items: center; gap: 10px; }
.q-option-row input[type="radio"] { width: auto; flex-shrink: 0; }
.q-option-row label { margin: 0; white-space: nowrap; flex-shrink: 0; width: 110px; }
.q-option-row input[type="text"] { flex: 1; }
label { font-size: 0.85rem; color: var(--text-dim); margin-bottom: 4px; display: block; }
input[type=text], input[type=email], input[type=password], input[type=number], textarea, select {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
}
textarea { resize: vertical; min-height: 90px; }

button, .btn {
  background: var(--accent);
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-block;
}
button:hover, .btn:hover { opacity: 0.9; text-decoration: none; }
button.secondary, .btn.secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
button.danger { background: var(--bad); }

.error-box {
  background: rgba(239,83,80,0.12);
  border: 1px solid rgba(239,83,80,0.4);
  color: #ff8a85;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}
.success-box {
  background: rgba(52,194,129,0.12);
  border: 1px solid rgba(52,194,129,0.4);
  color: var(--good);
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.centered-auth {
  max-width: 380px;
  margin: 60px auto;
}

.quiz-question { margin-bottom: 22px; }
.quiz-option { display: flex; align-items: center; gap: 8px; padding: 6px 0; }

.quiz-gate .helptext { max-width: 420px; margin: 10px auto 20px; }

.quiz-review-row { padding: 14px 0; border-bottom: 1px solid var(--border); }
.quiz-review-row:last-of-type { border-bottom: none; }
.quiz-review-selected { margin-top: 6px; font-size: 0.92rem; }
.quiz-review-row.correct .quiz-review-selected { color: var(--good); }
.quiz-review-row.incorrect .quiz-review-selected { color: var(--bad); }
.quiz-review-correct-answer { margin-top: 4px; font-size: 0.92rem; color: var(--good); }
.quiz-explanation { margin-top: 6px; font-size: 0.88rem; color: var(--text-dim); background: var(--surface-2); border-radius: 8px; padding: 10px 12px; }
.quiz-source { font-style: italic; }

.score-hero {
  text-align: center;
  padding: 30px 0;
}
.score-number { font-size: 3.2rem; font-weight: 800; }
.score-number.pass { color: var(--good); }
.score-number.fail { color: var(--bad); }

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tag { background: var(--surface-2); border: 1px solid var(--border); padding: 4px 10px; border-radius: 999px; font-size: 0.8rem; }

.cat-chart-grid { display: grid; gap: 16px; margin-top: 10px; }
.cat-chart-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; font-size: 0.88rem; }
.cat-chart-label { color: var(--text); font-weight: 500; }
.cat-chart-value { color: var(--text-dim); font-variant-numeric: tabular-nums; }
.cat-chart-svg { width: 100%; height: 16px; display: block; }

.cat-pct-list { margin-top: 8px; }
.cat-pct-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
.cat-pct-row:last-child { border-bottom: none; }
.cat-pct-row span:last-child { font-variant-numeric: tabular-nums; color: var(--text-dim); }
.cat-pct-total { margin-top: 4px; padding-top: 12px; border-top: 2px solid var(--border); font-weight: 700; }
.cat-pct-total span:last-child { color: var(--text); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }

.call-transcript { white-space: pre-wrap; font-size: 0.92rem; background: var(--surface-2); padding: 16px; border-radius: 8px; max-height: 420px; overflow-y: auto; }

.audio-with-speed { margin: 2px 0; }
.audio-speed-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.audio-speed-row label { margin: 0; flex-shrink: 0; }
.audio-speed-row select { width: auto; padding: 4px 8px; font-size: 0.82rem; }

.badge-outcome { font-size: 0.75rem; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text-dim); margin-left: 8px; }

.roleplay-stage {
  text-align: center;
  padding: 60px 20px;
}
.mic-orb {
  width: 140px; height: 140px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--accent), var(--accent-dim));
  margin: 0 auto 24px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
}
.mic-orb.live { animation: pulse 1.6s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(91,140,255,0.5); }
  70% { box-shadow: 0 0 0 24px rgba(91,140,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(91,140,255,0); }
}
.call-status { color: var(--text-dim); margin-bottom: 24px; }
.transcript-live { text-align: left; max-width: 600px; margin: 24px auto 0; font-size: 0.9rem; color: var(--text-dim); max-height: 200px; overflow-y: auto; }

.helptext { font-size: 0.82rem; color: var(--text-dim); margin-top: 6px; }

/* The Setting Gym: bouncing captions + dice roll — deliberately hardcoded
   purple (not var(--accent)) so the die reads the same in light or dark mode. */
.bounce-caption { display: inline-block; }
.bounce-caption .letter { display: inline-block; animation: bounce-letter 0.75s ease-in-out infinite; }
@keyframes bounce-letter {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.setting-gym-picker { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; margin-top: 40px; }
.gym-option {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 36px;
  text-align: center;
  width: 260px;
  transition: border-color 0.15s, transform 0.15s;
  color: var(--text);
}
.gym-option:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-3px); }
.gym-option .gym-emoji { font-size: 2.8rem; margin-bottom: 10px; }
.gym-option .gym-title { font-weight: 700; font-size: 1.2rem; margin-bottom: 8px; }

.dice-stage { text-align: center; padding: 60px 20px; }
.die {
  width: 96px; height: 96px;
  margin: 0 auto 24px;
  background: #6c5dd3;
  border-radius: 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  padding: 14px;
  box-shadow: 0 8px 24px rgba(108, 93, 211, 0.35);
  animation: die-roll 0.5s linear infinite;
}
.die .pip { width: 14px; height: 14px; border-radius: 50%; background: #c9bff2; margin: auto; }
@keyframes die-roll {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(0.92); }
  100% { transform: rotate(360deg) scale(1); }
}

.setup-notice {
  background: rgba(91,140,255,0.08);
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 20px;
  font-size: 0.9rem;
}

/* ---------- Simulated CRM (Day 4/5 live call training) ----------
   Deliberately hardcoded light colors — not var(--text)/var(--bg) — so this
   always looks like the real Close CRM / Calendly, regardless of the
   trainee's SetLab theme preference. Per Kenneth: only the "Note" button in
   the action bar is functional; everything else in the Close CRM tab is set
   dressing. The tabs, note toggle, calendar day/slot picks, and Schedule
   Event are wired up in public/crm-sim.js. */
.crmsim-wrap { max-width: 1100px; margin: 24px auto 0; }
.crmsim-browser { background: #e9eaee; border-radius: 12px; box-shadow: 0 20px 50px rgba(20,20,30,0.28); overflow: hidden; }
.crmsim-chrome { display: flex; align-items: flex-end; gap: 6px; padding: 10px 14px 0; background: #dcdde3; }
.crmsim-dots { display: flex; gap: 6px; padding-bottom: 10px; margin-right: 10px; }
.crmsim-dot { width: 11px; height: 11px; border-radius: 50%; }
.crmsim-dot.red { background: #ff5f57; }
.crmsim-dot.yellow { background: #febc2e; }
.crmsim-dot.green { background: #28c840; }
.crmsim-tab { padding: 9px 18px; font-size: 0.82rem; color: #6b6d7a; background: #cfd0d8; border-radius: 8px 8px 0 0; cursor: pointer; font-weight: 600; border: none; }
.crmsim-tab.active { background: #fff; color: #14151a; }
.crmsim-body { background: #fff; min-height: 560px; }
.crmsim-panel-view { display: none; }
.crmsim-panel-view.active { display: block; }

.crmsim-callbar { display: flex; align-items: center; justify-content: space-between; padding: 10px 20px; background: #fff; border-bottom: 3px solid #28c840; }
.crmsim-callbar.ended { border-bottom-color: #c9cad0; }
.crmsim-callbar .cb-left { display: flex; align-items: center; gap: 14px; }
.crmsim-callbar .out { color: #28c840; font-size: 0.66rem; font-weight: 700; text-align: center; line-height: 1.2; }
.crmsim-callbar .lead-info .name { font-weight: 700; color: #14151a; font-size: 0.92rem; }
.crmsim-callbar .lead-info .sub { color: #9698a3; font-size: 0.78rem; }
.crmsim-callbar .cb-right { display: flex; align-items: center; gap: 16px; color: #40424c; font-size: 1rem; }
.crmsim-callbar .rec-pill { display: flex; align-items: center; gap: 6px; background: #fdeceb; color: #e5484d; font-size: 0.76rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.crmsim-callbar .rec-dot { width: 7px; height: 7px; border-radius: 50%; background: #e5484d; flex-shrink: 0; }
.crmsim-callbar .timer { font-variant-numeric: tabular-nums; font-size: 0.9rem; color: #14151a; min-width: 34px; }
.crmsim-hangup { width: 32px; height: 32px; border-radius: 50%; background: #e5484d; border: none; color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 0.95rem; transform: rotate(135deg); }
.crmsim-hangup:hover { background: #cf3d41; }
.crmsim-hangup:disabled { background: #c9cad0; cursor: default; }

.crmsim-topbar { display: flex; align-items: center; gap: 16px; padding: 12px 20px; border-bottom: 1px solid #ececef; }
.crmsim-topbar .co-name { font-weight: 700; font-size: 0.9rem; color: #14151a; white-space: nowrap; }
.crmsim-search { flex: 1; max-width: 420px; background: #f4f4f6; border: 1px solid #ececef; border-radius: 8px; padding: 7px 12px; color: #9698a3; font-size: 0.85rem; }
.crmsim-avatar { width: 30px; height: 30px; border-radius: 50%; background: #5b8cff; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700; margin-left: auto; flex-shrink: 0; }

.crmsim-main { display: flex; align-items: flex-start; }
.crmsim-side { width: 300px; border-right: 1px solid #ececef; padding: 18px 16px; flex-shrink: 0; }
.crmsim-content { flex: 1; padding: 18px 24px; min-width: 0; }

.crmsim-lead-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.crmsim-lead-avatar { width: 44px; height: 44px; border-radius: 50%; background: #eef0f4; color: #7d808d; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; font-weight: 700; flex-shrink: 0; }
.crmsim-lead-name { font-size: 1.15rem; font-weight: 700; color: #14151a; }
.crmsim-lead-pill { display: inline-block; background: #eef0f4; color: #6b6d7a; font-size: 0.7rem; font-weight: 700; padding: 2px 9px; border-radius: 6px; margin-top: 3px; }

.crmsim-collapsed { background: #f7f7f9; border: 1px solid #ececef; border-radius: 8px; padding: 9px 12px; margin-bottom: 10px; font-size: 0.76rem; font-weight: 700; letter-spacing: 0.02em; color: #6b6d7a; display: flex; justify-content: space-between; }

.crmsim-panel { border: 1px solid #ececef; border-radius: 8px; margin-bottom: 14px; overflow: hidden; }
.crmsim-panel-head { display: flex; align-items: center; gap: 8px; background: #f7f7f9; padding: 9px 12px; font-size: 0.76rem; font-weight: 700; letter-spacing: 0.02em; color: #40424c; text-transform: uppercase; }
.crmsim-panel-head .count { background: #e4e5ea; color: #6b6d7a; border-radius: 999px; padding: 0 7px; font-size: 0.72rem; text-transform: none; font-weight: 600; }
.crmsim-panel-body { padding: 12px; }

.crmsim-contact-name { font-weight: 700; color: #14151a; font-size: 0.92rem; }
.crmsim-contact-sub { color: #9698a3; font-size: 0.82rem; margin-top: 1px; }
.crmsim-contact-icons { display: flex; gap: 10px; margin-top: 10px; color: #9698a3; }

.crmsim-field-row { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid #f2f2f4; font-size: 0.84rem; }
.crmsim-field-row:last-child { border-bottom: none; }
.crmsim-field-label { color: #9698a3; flex: 0 0 42%; }
.crmsim-field-value { color: #14151a; text-align: right; flex: 1; white-space: pre-line; }
.crmsim-field-value.link { color: #3172f6; }
.crmsim-person-chip { display: inline-flex; align-items: center; gap: 6px; }
.crmsim-person-avatar { width: 18px; height: 18px; border-radius: 50%; background: #7d5cff; color: #fff; font-size: 0.58rem; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.crmsim-phone-pill { display: inline-block; border: 1px solid #ececef; border-radius: 999px; padding: 3px 12px; font-size: 0.82rem; color: #14151a; }

.crmsim-actionbar { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.crmsim-actionbtn { background: #f4f4f6; border: 1px solid #ececef; color: #40424c; font-size: 0.82rem; font-weight: 600; padding: 8px 14px; border-radius: 8px; cursor: default; }
.crmsim-actionbtn.functional { cursor: pointer; }
.crmsim-actionbtn.functional:hover { background: #ececf0; }

.crmsim-feedtabs { display: flex; gap: 18px; border-bottom: 1px solid #ececef; margin-bottom: 16px; font-size: 0.85rem; color: #9698a3; }
.crmsim-feedtabs span:first-child { color: #14151a; font-weight: 600; border-bottom: 2px solid #14151a; padding-bottom: 9px; }
.crmsim-feedtabs span { padding-bottom: 9px; }

.crmsim-note-editor { border: 1px solid #ececef; border-radius: 8px; padding: 14px; margin-bottom: 18px; display: none; }
.crmsim-note-editor.open { display: block; }
.crmsim-note-editor .who { font-size: 0.85rem; color: #9698a3; margin-bottom: 10px; }
.crmsim-note-editor .who strong { color: #14151a; }
.crmsim-note-body { min-height: 60px; color: #14151a; font-size: 0.85rem; border-bottom: 1px solid #f2f2f4; padding-bottom: 14px; margin-bottom: 10px; outline: none; white-space: pre-wrap; }
.crmsim-note-body:empty::before { content: attr(data-placeholder); color: #c3c4cc; }
.crmsim-note-toolbar { display: flex; gap: 14px; color: #c3c4cc; font-size: 0.9rem; margin-bottom: 12px; }
.crmsim-note-done { background: #3172f6; color: #fff; border: none; border-radius: 7px; padding: 8px 16px; font-size: 0.85rem; font-weight: 600; cursor: pointer; }

.crmsim-note-posted { border: 1px solid #ececef; border-radius: 8px; padding: 14px 16px; margin-bottom: 14px; }
.crmsim-note-posted .who { font-weight: 700; color: #14151a; font-size: 0.85rem; margin-bottom: 8px; }
.crmsim-note-posted .body { font-size: 0.88rem; color: #33343c; white-space: pre-wrap; line-height: 1.5; cursor: text; border-radius: 4px; padding: 2px 4px; margin: -2px -4px; }
.crmsim-note-posted .body:hover { background: #f7f7f9; }
.crmsim-note-posted .body:focus { outline: 2px solid #3172f6; outline-offset: 1px; background: #fff; }

.crmsim-sms { border: 1px solid #ececef; border-radius: 8px; padding: 14px 16px; margin-bottom: 14px; }
.crmsim-sms-head { display: flex; justify-content: space-between; font-weight: 700; font-size: 0.9rem; color: #14151a; margin-bottom: 12px; }
.crmsim-sms-date { color: #9698a3; font-weight: 400; font-size: 0.8rem; }
.crmsim-sms-from { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.85rem; color: #14151a; margin-bottom: 8px; }
.crmsim-sms-avatar { width: 22px; height: 22px; border-radius: 50%; background: #7d5cff; color: #fff; font-size: 0.65rem; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.crmsim-sms-text { font-size: 0.88rem; color: #33343c; line-height: 1.5; }

.crmsim-imported { display: flex; align-items: center; gap: 8px; color: #9698a3; font-size: 0.8rem; }

.crmsim-cal { display: flex; min-height: 560px; }
.crmsim-cal-info { width: 280px; padding: 28px 26px; border-right: 1px solid #ececef; flex-shrink: 0; }
.crmsim-cal-info h3 { font-size: 1.25rem; color: #14151a; margin: 0 0 14px; }
.crmsim-cal-info .meta { display: flex; align-items: center; gap: 8px; color: #40424c; font-size: 0.88rem; margin-bottom: 16px; }
.crmsim-cal-info p { font-size: 0.85rem; color: #40424c; line-height: 1.55; }
.crmsim-cal-main { flex: 1; padding: 26px 30px; }
.crmsim-cal-slots { width: 230px; padding: 26px 20px; border-left: 1px solid #ececef; }
.crmsim-cal-month { display: flex; align-items: center; justify-content: space-between; font-weight: 700; color: #14151a; margin-bottom: 14px; font-size: 0.95rem; }
.crmsim-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; font-size: 0.82rem; }
.crmsim-cal-grid .dow { color: #9698a3; font-weight: 600; padding-bottom: 6px; }
.crmsim-cal-day { padding: 9px 0; border-radius: 50%; color: #d5d6db; position: relative; }
.crmsim-cal-day.enabled { color: #14151a; cursor: pointer; background: none; border: none; font: inherit; }
.crmsim-cal-day.enabled:hover { background: #f4f4f6; }
.crmsim-cal-day.selected { background: #3172f6; color: #fff; }
.crmsim-slot-label { font-size: 0.78rem; color: #9698a3; margin-bottom: 10px; }
.crmsim-slot { display: block; width: 100%; text-align: center; background: #fff; border: 1px solid #3172f6; color: #3172f6; font-weight: 700; border-radius: 8px; padding: 11px 0; margin-bottom: 10px; cursor: pointer; font-size: 0.88rem; }
.crmsim-slot:hover { background: #eef3ff; }
.crmsim-tz { margin-top: 14px; font-size: 0.78rem; color: #40424c; }

.crmsim-details { padding: 30px 40px; max-width: 520px; display: none; }
.crmsim-details.active { display: block; }
.crmsim-details .back { cursor: pointer; width: 34px; height: 34px; border-radius: 50%; border: 1px solid #ececef; display: flex; align-items: center; justify-content: center; margin-bottom: 20px; color: #40424c; background: #fff; }
.crmsim-details h3 { font-size: 1.25rem; color: #14151a; margin: 0 0 14px; }
.crmsim-details .meta { color: #40424c; font-size: 0.88rem; margin-bottom: 6px; display: flex; gap: 8px; align-items: center; }
.crmsim-details label { display: block; font-size: 0.85rem; color: #14151a; font-weight: 600; margin: 16px 0 6px; }
.crmsim-details input { width: 100%; border: 1px solid #d7d8dd; border-radius: 8px; padding: 10px 12px; font-size: 0.9rem; }
.crmsim-schedule-btn { margin-top: 22px; background: #3172f6; color: #fff; border: none; border-radius: 999px; padding: 12px 20px; font-weight: 700; font-size: 0.9rem; cursor: pointer; width: 100%; }

.crmsim-script { padding: 30px 40px; max-width: 640px; margin: 0 auto; max-height: 560px; overflow-y: auto; }
.crmsim-script p { font-size: 0.9rem; color: #14151a; line-height: 1.6; margin: 0 0 14px; }
.crmsim-script h4 { font-size: 0.95rem; color: #14151a; margin: 22px 0 6px; }
.crmsim-script ol, .crmsim-script ul { margin: 0 0 14px; padding-left: 22px; font-size: 0.9rem; color: #14151a; line-height: 1.6; }
.crmsim-script li { margin-bottom: 6px; }
.crmsim-script-note { color: #6b6d7a !important; font-size: 0.85rem !important; }
.crmsim-script-callout { background: #f7f7f9; border-radius: 8px; padding: 16px 18px; margin: 0 0 18px; }
.crmsim-script-callout-title { font-weight: 700; font-size: 0.85rem; color: #14151a; margin-bottom: 10px; }
.crmsim-script-callout p { margin: 0 0 6px; }
.crmsim-script-callout ul { margin: 6px 0 10px; padding-left: 20px; }
.crmsim-script-warn { color: #d97a2b !important; }

.crmsim-cal-main.active, .crmsim-cal-main { }
.crmsim-cal-picker.hidden { display: none; }

.crmsim-grading { text-align: center; padding: 90px 30px; }
.crmsim-grading h3 { color: #14151a; margin-bottom: 6px; }
.crmsim-grading p { color: #9698a3; font-size: 0.85rem; }
.crmsim-grading .bar-track { max-width: 360px; margin: 22px auto 0; height: 8px; border-radius: 999px; background: #ececef; overflow: hidden; }
.crmsim-grading .bar-fill { height: 100%; width: 0%; background: #3172f6; transition: width 0.35s ease; }
