/* ── Reset & tokens ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* ── Araam brand kit ── */
  --color-bg:      #EAE3D2;   /* warm cream — base background */
  --color-primary: #0A2463;   /* deep navy — headings & key text */
  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-script:  'Pinyon Script', 'Segoe Script', cursive;
  --font-body:    'Montserrat', system-ui, -apple-system, sans-serif;

  /* Mapped neutral tokens (reference the brand palette) */
  --bg:          var(--color-bg);
  --surface:     #FBF8F1;                /* lifted warm cream for cards (derived) */
  --bg-mid:      #E0D7C2;                /* inset cream panels (derived) */
  --accent:      var(--color-primary);
  --accent-dark: #061A4A;                /* darker navy for hover (derived) */
  --accent-pale: #DCE0EC;                /* pale navy tint for badges/highlights (derived) */
  --primary:     var(--color-primary);
  --text:        var(--color-primary);
  --text-dark:   var(--color-primary);
  --text-mid:    #5A6480;                /* muted navy (derived) */
  --border:      rgba(10, 36, 99, 0.18); /* soft navy-tint border */
  --commission:  var(--color-primary);   /* was success-green; now navy (flagged) */
  --radius:      14px;
  --font:        var(--font-body);
}

html, body { height: 100%; background: var(--bg); font-family: var(--font);
  color: var(--text-dark); -webkit-font-smoothing: antialiased; }

/* ── Brand typography ── */
h1, h2, h3,
.header-title, .login-title, .step-content-title, .complete-title,
.rail-chooser-intro, .lb-badges-title, .wup-section-title, .pmt-empty {
  font-family: var(--font-display);
  letter-spacing: 0.005em;
}

/* ── App shell ───────────────────────────────────────────── */
.app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-width: 780px;
  margin: 0 auto;
}

/* ── Header ─────────────────────────────────────────────── */
.header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  min-height: 52px;
}

.header-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  color: var(--text-dark);
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.12s;
}
.header-back:hover { background: var(--bg); }
.header-back.hidden { visibility: hidden; pointer-events: none; }

.header-title {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-align: center;
}

/* ── Views ───────────────────────────────────────────────── */
.view { display: none; flex: 1; overflow-y: auto; flex-direction: column; }
.view--active { display: flex; }

/* ── Dashboard ───────────────────────────────────────────── */
.dashboard {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 20px 36px;
  gap: 20px;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

.greeting {
  font-size: 17px;
  color: var(--text-mid);
  text-align: center;
}
.greeting-name { color: var(--text-dark); font-weight: 700; }

/* Primary CTA */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px 20px;
  background: var(--accent);
  color: var(--color-bg);
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.btn-primary:hover  { background: var(--accent-dark); }
.btn-primary:active { transform: scale(0.98); }

.btn-new-event { margin-top: 4px; }

/* Stats card */
.stats-card {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.stat-commission {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 16px 16px;
  background: var(--accent-pale);
  border-bottom: 1px solid var(--border);
  gap: 4px;
}
.stat-commission-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--commission);
}
.stat-commission-value {
  font-size: 36px;
  font-weight: 700;
  color: var(--commission);
  line-height: 1.1;
}

.stats-row {
  display: flex;
  align-items: center;
  padding: 16px;
}
.stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.stat-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-dark);
}
.stat-label {
  font-size: 12px;
  color: var(--text-mid);
  text-align: center;
}
.stat-rule {
  width: 1px;
  height: 36px;
  background: var(--border);
}

/* Link button */
.btn-link {
  background: none;
  border: none;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  color: var(--accent-dark);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.12s;
}
.btn-link:hover { background: var(--accent-pale); }

/* ── Rail chooser ────────────────────────────────────────── */
.rail-chooser {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px 20px 40px;
  gap: 14px;
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
}

.rail-chooser-intro {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark);
  text-align: center;
  margin-bottom: 2px;
}

.rail-chooser-sub {
  font-size: 14px;
  color: var(--text-mid);
  text-align: center;
  margin-top: -4px;
  margin-bottom: 6px;
  line-height: 1.5;
}

.rail-card {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  text-align: left;
  font-family: var(--font);
  color: var(--text-dark);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}
.rail-card:hover  { border-color: var(--accent); box-shadow: 0 2px 10px rgba(0,0,0,0.07); }
.rail-card:active { transform: scale(0.99); }

.rail-card-icon {
  font-size: 34px;
  line-height: 1;
  flex-shrink: 0;
}

.rail-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rail-card-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
}

.rail-card-desc {
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.4;
}

.rail-card--locked {
  opacity: 0.42;
  cursor: not-allowed;
  pointer-events: none;
}

.rail-lock-notice {
  width: 100%;
  background: #FFF8EC;
  border: 1px solid #F5C98A;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  color: #92600A;
  line-height: 1.6;
  text-align: center;
}

/* Rail pill shown on workspace header area */
.rail-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 10px;
  border-radius: 20px;
}
.rail-pill--nfp      { background: var(--accent-pale); color: var(--commission); }
.rail-pill--forprofit { background: #FFF3BF; color: #9A5A00; }

/* ── Intake view ─────────────────────────────────────────── */
.intake-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
  max-width: 620px;
  width: 100%;
  margin: 0 auto;
}

.intake-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.intake-msg {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.5;
  word-break: break-word;
}
.intake-msg--assistant {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
  color: var(--text-dark);
}
.intake-msg--user {
  align-self: flex-end;
  background: var(--accent);
  color: var(--color-bg);
  border-bottom-right-radius: 4px;
}
.intake-msg--typing {
  color: var(--text-mid);
  font-style: italic;
}

/* Generating spinner state */
.intake-generating {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 28px 16px;
  flex-shrink: 0;
}
.generating-text {
  font-size: 14px;
  color: var(--text-mid);
  text-align: center;
}

@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  width: 30px;
  height: 30px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

/* Intake composer */
.intake-form {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.intake-input {
  flex: 1;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 22px;
  font-size: 15px;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-dark);
  outline: none;
  transition: border-color 0.15s;
}
.intake-input:focus { border-color: var(--accent); }
.intake-input:disabled { opacity: 0.5; cursor: not-allowed; }
.intake-send-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--color-bg);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}
.intake-send-btn:hover { background: var(--accent-dark); }
.intake-send-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Event Workspace ─────────────────────────────────────── */
.workspace {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

/* ── Step tracker — mobile: compact progress strip ── */
.step-tracker {
  flex-shrink: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
}

.tracker-mobile { display: flex; flex-direction: column; gap: 6px; }
.tracker-mobile-bar {
  width: 100%;
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.tracker-mobile-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.3s ease;
  min-width: 4px;
}
.tracker-mobile-label {
  font-size: 13px;
  color: var(--text-dark);
  font-weight: 500;
}
.tracker-mobile-tf { color: var(--text-mid); font-weight: 400; }

/* Desktop sidebar: hidden on mobile, rendered by JS */
.step-item {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  position: relative;
  padding: 0 16px 22px 20px;
  gap: 12px;
  cursor: pointer;
}
.step-item:last-child { padding-bottom: 0; }

/* Vertical connecting line */
.step-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 33px;
  top: 28px;
  width: 2px;
  height: calc(100% - 28px);
  background: var(--border);
}
.step-item--completed:not(:last-child)::after { background: var(--accent); }

.step-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transition: all 0.2s;
}
.step-item--completed .step-circle { background: var(--accent);  color: var(--color-bg); }
.step-item--current  .step-circle  {
  background: var(--accent); color: var(--color-bg);
  box-shadow: 0 0 0 4px var(--accent-pale), 0 0 0 5px var(--accent);
}
.step-item--upcoming .step-circle  { background: var(--border);  color: var(--text-mid); }

.step-label {
  font-size: 13px;
  font-weight: 500;
  padding-top: 5px;
  line-height: 1.3;
  flex: 1;
}
.step-item--completed .step-label { color: var(--text-mid); }
.step-item--current  .step-label  { color: var(--text-dark); font-weight: 700; }
.step-item--upcoming .step-label  { color: var(--text-mid); }

.step-sublabel {
  display: block;
  font-size: 11px;
  color: var(--text-mid);
  margin-top: 2px;
  font-weight: 400;
}

/* ── Step tracker — desktop: vertical sidebar ── */
@media (min-width: 600px) {
  .workspace { flex-direction: row; }

  .step-tracker {
    width: 210px;
    flex-shrink: 0;
    border-bottom: none;
    border-right: 1px solid var(--border);
    padding: 20px 0 20px;
    overflow-y: auto;
    /* show items vertically */
    display: flex;
    flex-direction: column;
  }

  /* Hide the mobile strip */
  .tracker-mobile { display: none; }
}

/* ── Step content meta badges ────────────────────────────── */
.step-content-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.step-timeframe {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-mid);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 10px;
}

.step-type-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 20px;
  padding: 2px 10px;
}

/* ── Step content area ───────────────────────────────────── */
.step-content {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.step-content-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px 20px;
  gap: 16px;
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
}

.step-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-dark);
  background: var(--accent-pale);
  padding: 3px 10px;
  border-radius: 20px;
  align-self: flex-start;
}

.step-content-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
}

.step-content-desc {
  font-size: 15px;
  color: var(--text-mid);
  line-height: 1.5;
}

.step-content-placeholder {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  color: var(--text-mid);
  font-size: 14px;
  line-height: 1.5;
  min-height: 160px;
}

.step-content-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
}

.btn-secondary {
  flex: 1;
  padding: 13px 16px;
  background: var(--surface);
  color: var(--text-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.12s;
}
.btn-secondary:hover { background: var(--bg); }

/* ── Google Calendar export ──────────────────────────────── */
.cal-export {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.btn-cal-export {
  width: 100%;
  padding: 12px 16px;
  background: var(--surface);
  color: var(--text-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.12s;
}
.btn-cal-export:hover:not(:disabled) { background: var(--bg); }
.btn-cal-export:disabled { opacity: 0.6; cursor: default; }
.cal-export-status {
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-mid);
}
.cal-export-status:empty { display: none; }
.cal-export-status--ok   { color: var(--accent-dark); }
.cal-export-status--warn { color: #b4541a; }
.cal-export-status a {
  color: var(--accent-dark);
  font-weight: 600;
  text-decoration: underline;
}

/* ── Dashboard rank pill ─────────────────────────────────── */
.rank-card {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--accent-pale);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
}
.rank-card-label { font-size: 13px; font-weight: 600; color: var(--text-mid); }
.rank-card-value { font-size: 18px; font-weight: 800; color: var(--accent-dark); }

/* ── Leaderboards ────────────────────────────────────────── */
.lb-page { padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.lb-loading, .lb-error, .lb-empty {
  text-align: center; color: var(--text-mid); padding: 24px; font-size: 14px;
}

.lb-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.lb-tab {
  flex: 1 1 auto;
  padding: 8px 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-mid);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.lb-tab--active { background: var(--accent); color: var(--color-bg); border-color: var(--accent); }

.lb-scope { display: flex; gap: 0; background: var(--accent-pale); border-radius: 10px; padding: 3px; }
.lb-scope-btn {
  flex: 1;
  padding: 7px 10px;
  border: none;
  background: transparent;
  color: var(--text-mid);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.lb-scope-btn--active {
  background: var(--surface);
  color: var(--text-dark);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.lb-podium { display: flex; align-items: flex-end; justify-content: center; gap: 8px; padding: 12px 0 4px; }
.lb-podium-spot {
  flex: 1;
  max-width: 110px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 6px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.lb-podium-spot--1 {
  transform: translateY(-12px);
  border-color: #E6C200;
  box-shadow: 0 4px 16px rgba(230, 194, 0, 0.25);
}
.lb-podium-spot--me { outline: 2px solid var(--accent); outline-offset: 1px; }
.lb-podium-medal  { font-size: 28px; line-height: 1; }
.lb-podium-name   { font-size: 13px; font-weight: 700; color: var(--text-dark); }
.lb-podium-metric { font-size: 11px; color: var(--text-mid); }

.lb-list { display: flex; flex-direction: column; gap: 6px; }
.lb-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.lb-row--me { border-color: var(--accent); background: var(--accent-pale); }
.lb-rank { font-size: 15px; font-weight: 700; color: var(--text-mid); text-align: center; }
.lb-id   { display: flex; flex-direction: column; min-width: 0; }
.lb-name {
  font-size: 14px; font-weight: 600; color: var(--text-dark);
  display: flex; align-items: center; gap: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lb-you {
  font-size: 10px; font-weight: 700;
  background: var(--accent); color: var(--color-bg);
  padding: 2px 6px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.lb-city   { font-size: 11px; color: var(--text-mid); }
.lb-metric { font-size: 13px; font-weight: 700; color: var(--commission); white-space: nowrap; }

.lb-badges { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px; }
.lb-badges-title { font-size: 15px; font-weight: 700; color: var(--text-dark); }
.lb-badges-sub   { font-size: 12px; color: var(--text-mid); margin: 4px 0 10px; line-height: 1.4; }
.lb-badge-list   { display: flex; flex-direction: column; gap: 6px; }
.lb-badge {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; background: var(--accent-pale); border-radius: 8px;
}
.lb-badge-icon  { font-size: 18px; }
.lb-badge-label { flex: 1; font-size: 13px; font-weight: 600; color: var(--text-dark); }
.lb-badge-count { font-size: 12px; color: var(--text-mid); }

/* ── Active events section ───────────────────────────────── */
.section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-mid);
  margin-bottom: 10px;
}

.hidden { display: none !important; }

.nudges-section {
  width: 100%;
}
.nudge-card {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid #d98e00;
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.nudge-icon { font-size: 18px; line-height: 1.3; flex-shrink: 0; }
.nudge-body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.nudge-from {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-mid);
}
.nudge-msg { font-size: 14px; color: var(--text-dark); line-height: 1.4; }
.nudge-dismiss {
  flex-shrink: 0;
  background: none;
  border: none;
  font-size: 20px;
  line-height: 1;
  color: var(--text-mid);
  cursor: pointer;
  padding: 0 2px;
}
.nudge-dismiss:hover { color: var(--text-dark); }

.active-events-section {
  width: 100%;
}

.active-event-card {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.active-event-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  border-left-color: var(--accent-dark);
}

.event-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.event-card-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-card-phase {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 20px;
  flex-shrink: 0;
}
.phase--planning  { background: #E8F0FE; color: #3B5BDB; }
.phase--running   { background: #FFF3BF; color: #E67700; }
.phase--wrap-up   { background: var(--accent-pale); color: var(--commission); }

.event-progress-wrap {
  width: 100%;
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.event-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.3s ease;
  min-width: 4px;
}

.event-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.event-card-step {
  font-size: 12px;
  color: var(--text-mid);
}
.btn-resume {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-dark);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  padding: 0;
}
.btn-resume:hover { text-decoration: underline; }

/* ── Admin link ──────────────────────────────────────────── */
.admin-link {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-bg);
  background: var(--accent);
  border-radius: 6px;
  padding: 5px 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.admin-link:hover { filter: brightness(0.95); }

/* ── Sign out ────────────────────────────────────────────── */
.signout-btn {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-mid);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 10px;
  cursor: pointer;
  flex-shrink: 0;
  font-family: var(--font);
  transition: background 0.12s, color 0.12s;
}
.signout-btn:hover { background: var(--surface); color: var(--text-dark); }
.signout-btn.hidden { display: none; }

/* ── Sign-in screen ──────────────────────────────────────── */
.login-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
}
.login-screen.hidden { display: none; }
.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 40px 30px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.06);
}
.login-mark {
  font-family: var(--font-script);
  font-size: 32px;
  font-weight: 400;
  line-height: 1.1;
  color: var(--accent);
}
.login-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-dark);
  margin: 6px 0 12px;
}
.login-sub {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-mid);
  margin: 0 0 24px;
}
.login-google-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-dark);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s, box-shadow 0.12s;
}
.login-google-btn:hover { background: var(--bg); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); }

/* ── Step board ──────────────────────────────────────────── */
.step-board { display: flex; flex-direction: column; }

.step-done-badge {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--commission);
  background: var(--accent-pale); border-radius: 20px; padding: 2px 10px;
}

/* Autosave indicator */
.step-autosave {
  font-size: 11px; color: var(--text-mid); text-align: right;
  min-height: 16px; letter-spacing: 0.02em;
}

/* Override step-content-actions for 3-button layout */
.step-content-actions .btn-secondary { flex: 0 0 auto; }
.step-content-actions .btn-primary   { flex: 1; }

/* Mark Done button */
.btn-mark-done {
  flex: 0 0 auto;
  padding: 13px 16px;
  background: var(--surface);
  color: var(--text-mid);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px; font-weight: 600; font-family: var(--font);
  cursor: pointer; white-space: nowrap;
  transition: all 0.15s;
}
.btn-mark-done:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-dark); }
.btn-mark-done--done { background: var(--accent); color: var(--color-bg); border-color: var(--accent-dark); }
.btn-mark-done:disabled { opacity: 0.38; cursor: not-allowed; }

/* ── Shared board inputs ─────────────────────────────────── */
.board-input {
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 12px; font-size: 14px; font-family: var(--font);
  color: var(--text-dark); outline: none; width: 100%;
  transition: border-color 0.15s;
}
.board-input:focus { border-color: var(--accent); }
.board-select {
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 7px 8px; font-size: 13px; font-family: var(--font);
  color: var(--text-dark); outline: none; cursor: pointer; width: 100%;
}
.board-select:focus { border-color: var(--accent); }
.board-textarea {
  width: 100%; min-height: 180px; background: var(--bg);
  border: 1px solid var(--border); border-radius: 10px;
  padding: 14px; font-size: 14px; font-family: var(--font);
  color: var(--text-dark); resize: vertical; outline: none; line-height: 1.6;
  transition: border-color 0.15s;
}
.board-textarea:focus { border-color: var(--accent); }
.board-cb { width: 17px; height: 17px; cursor: pointer; accent-color: var(--accent); flex-shrink: 0; }

.btn-add-row {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent-pale); color: var(--accent-dark);
  border: 1px dashed var(--accent); border-radius: 8px;
  padding: 8px 14px; font-size: 13px; font-weight: 600; font-family: var(--font);
  cursor: pointer; margin-top: 8px; transition: background 0.12s;
}
.btn-add-row:hover { background: #d8e6d7; }
.btn-add-small {
  background: var(--accent); color: var(--color-bg); border: none; border-radius: 8px;
  padding: 8px 14px; font-size: 13px; font-weight: 600; font-family: var(--font);
  cursor: pointer; flex-shrink: 0; transition: background 0.15s;
}
.btn-add-small:hover { background: var(--accent-dark); }
.btn-del-row, .btn-del-item {
  width: 26px; height: 26px; border: none; background: transparent;
  color: var(--text-mid); border-radius: 5px; cursor: pointer;
  font-size: 16px; line-height: 1; display: inline-flex;
  align-items: center; justify-content: center; flex-shrink: 0;
  transition: background 0.12s, color 0.12s; font-family: var(--font);
}
.btn-del-row:hover, .btn-del-item:hover { background: #fde8e8; color: #c62828; }

/* ── Outreach ────────────────────────────────────────────── */
.board-outreach { display: flex; flex-direction: column; }
.board-table-wrap {
  overflow-x: auto; border: 1px solid var(--border);
  border-radius: 10px; background: var(--surface);
}
.board-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.board-table th {
  text-align: left; padding: 9px 12px;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--text-mid);
  background: var(--bg); border-bottom: 1px solid var(--border);
}
.board-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.board-table tr:last-child td { border-bottom: none; }
.board-table .board-input  { padding: 6px 10px; border-radius: 6px; font-size: 13px; }
.board-table .board-select { padding: 5px 7px;  border-radius: 6px; font-size: 12px; }
.col-reach  { width: 88px; }
.col-status { width: 120px; }
.col-del    { width: 34px; }
.center     { text-align: center; }

/* ── Checklist ───────────────────────────────────────────── */
.board-checklist { display: flex; flex-direction: column; gap: 0; }
.checklist-list {
  list-style: none; padding: 0;
  border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden; background: var(--surface);
}
.checklist-empty {
  padding: 16px; font-size: 13px; color: var(--text-mid); text-align: center;
}
.checklist-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border-bottom: 1px solid var(--border);
}
.checklist-item:last-child { border-bottom: none; }
.checklist-label { flex: 1; font-size: 14px; color: var(--text-dark); cursor: pointer; line-height: 1.4; }
.checklist-label--done { text-decoration: line-through; color: var(--text-mid); }
.add-item-row { display: flex; gap: 8px; margin-top: 10px; align-items: center; }
.add-item-row .board-input { flex: 1; }

/* ── Info ────────────────────────────────────────────────── */
.board-info { display: flex; flex-direction: column; }

/* ── Resource ────────────────────────────────────────────── */
.board-resource { display: flex; flex-direction: column; }
.resource-empty { font-size: 13px; color: var(--text-mid); margin: 0; }
.resource-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.resource-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 8px;
}
.resource-fields { display: flex; flex-direction: column; gap: 6px; }
.resource-note { font-size: 12px; color: var(--text-mid); font-style: italic; line-height: 1.4; margin: 0; }
.resource-actions { display: flex; align-items: center; gap: 12px; margin-top: 2px; }
.resource-open {
  font-size: 13px; font-weight: 600; color: var(--accent-dark);
  text-decoration: none; padding: 4px 8px; border-radius: 6px;
  transition: background 0.12s; flex-shrink: 0;
}
.resource-open:hover { background: var(--accent-pale); }
.resource-open--disabled { opacity: 0.38; pointer-events: none; }
.res-del {
  font-size: 12px; font-weight: 500; color: var(--text-mid); background: none;
  border: none; cursor: pointer; font-family: var(--font);
  padding: 4px 6px; border-radius: 6px; transition: background 0.12s, color 0.12s;
}
.res-del:hover { background: #fde8e8; color: #c62828; }

/* ── Finance ─────────────────────────────────────────────── */
.board-finance { display: flex; flex-direction: column; gap: 12px; }
.finance-ledger { display: flex; flex-direction: column; gap: 8px; }
.finance-empty {
  font-size: 13px; color: var(--text-mid); text-align: center;
  padding: 20px; border: 1px dashed var(--border); border-radius: 10px; margin: 0;
}
.finance-row {
  background: var(--surface); border: 1px solid var(--border); border-left-width: 3px;
  border-radius: 8px; padding: 10px 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.finance-row--expense { border-left-color: #e57373; }
.finance-row--earned  { border-left-color: #66bb6a; }
.finance-row-header   { display: flex; align-items: center; justify-content: space-between; }
.finance-row-type {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
}
.finance-row--expense .finance-row-type { color: #c62828; }
.finance-row--earned  .finance-row-type { color: var(--commission); }
.finance-row-inputs { display: flex; gap: 8px; align-items: center; }
.finance-row-inputs .fin-desc { flex: 1; }
.finance-amount-wrap {
  display: flex; align-items: center; flex-shrink: 0;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden; width: 110px;
}
.finance-currency { padding: 0 4px 0 10px; font-size: 13px; color: var(--text-mid); font-weight: 600; flex-shrink: 0; }
.finance-amount-wrap .board-input {
  border: none; background: transparent; border-radius: 0;
  padding: 8px 8px 8px 2px; width: 72px; text-align: right;
}
.finance-add-btns { display: flex; gap: 10px; }
.btn-add-expense { margin-top: 0; border-color: #e57373; color: #c62828; }
.btn-add-expense:hover { background: #fde8e8; }
.btn-add-earned  { margin-top: 0; border-color: #66bb6a; color: var(--commission); }
.btn-add-earned:hover  { background: #e6f9f1; }
.finance-summary {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 4px;
}
.finance-total { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.fin-spent span, .fin-earned span { color: var(--text-mid); }
.fin-spent strong { color: #c62828; }
.fin-earned strong { color: var(--commission); }
.fin-net {
  border-top: 1px solid var(--border); margin-top: 4px;
  padding-top: 10px; font-weight: 700; font-size: 15px;
}
.finance-net--pos strong { color: var(--commission); }
.finance-net--neg strong { color: #c62828; }

/* ── Pricing section (inside finance step) ──────────────────── */
.pricing-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.pricing-hdr {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.pricing-title { font-weight: 700; font-size: 14px; color: var(--text); }
.pricing-rail-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.nfp-tag { background: #e8f5e9; color: #2e7d32; }
.fp-tag  { background: #fff3e0; color: #e65100; }

.pricing-field-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.pricing-label { font-size: 13px; color: var(--text-mid); min-width: 150px; flex-shrink: 0; }
.pricing-num   { width: 110px !important; text-align: right; }
.pricing-hint  { font-size: 12px; color: var(--text-mid); font-style: italic; margin: 4px 0 8px; }

.pricing-at-cost {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-mid);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 8px 0 4px;
}
.pricing-per-lbl { font-size: 13px; color: var(--text-mid); }
.pricing-per-val { font-size: 22px; font-weight: 800; color: var(--text); }
.pricing-calc-note { font-size: 11px; color: var(--text-mid); margin: 0 0 10px; }
.pricing-chosen {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--commission);
  margin: 6px 0;
}

.btn-save-price {
  background: var(--primary);
  color: var(--color-bg);
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin: 6px 0;
}
.btn-save-price:hover { opacity: .9; }
.btn-price-change {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 12px;
  color: var(--text-mid);
  cursor: pointer;
}
.btn-price-change:hover { background: var(--bg-mid); }

.pricing-surplus {
  background: #fff8e1;
  border: 1px solid #ffca28;
  border-radius: 10px;
  padding: 12px;
  margin-top: 12px;
}
.surplus-hdr  { font-size: 13px; margin-bottom: 6px; color: #e65100; }
.surplus-body { font-size: 12px; color: var(--text-mid); margin: 0 0 8px; }
.surplus-ideas-box {
  background: var(--surface);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--text);
  white-space: pre-line;
  margin-bottom: 8px;
}
.btn-surplus {
  background: #ffe082;
  border: none;
  border-radius: 7px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: #5d4037;
}
.btn-surplus:hover { background: #ffd54f; }
.btn-surplus--loading { opacity: .7; cursor: not-allowed; }

.btn-ai-rec {
  background: var(--primary);
  color: var(--color-bg);
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin: 6px 0 10px;
}
.btn-ai-rec:hover { opacity: .9; }
.btn-ai-rec--loading { opacity: .7; cursor: not-allowed; }

.ai-rec-box {
  background: #f0f4ff;
  border: 1px solid #c5d3ff;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
.ai-rec-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.ai-rec-label    { font-size: 12px; color: var(--text-mid); }
.ai-rec-price    { font-size: 22px; font-weight: 800; color: var(--primary); }
.ai-rec-reasoning  { font-size: 12px; color: var(--text-mid); margin: 0 0 4px; }
.ai-rec-breakeven  { font-size: 12px; color: var(--text-mid); margin: 0; }

.pricing-ticket-row { margin-top: 4px; }
.pricing-locked-badge {
  background: #e8f5e9;
  color: #1b5e20;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 700;
}
.btn-lock-price {
  background: #1b5e20;
  color: var(--color-bg);
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin: 4px 0;
}
.btn-lock-price:hover { background: #2e7d32; }
.pricing-lock-warn { font-size: 11px; color: #c62828; margin: 2px 0 10px; }

.pricing-projections {
  background: var(--bg-mid);
  border-radius: 8px;
  padding: 10px 14px;
  margin-top: 10px;
}
.pricing-proj-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 3px 0;
}
.proj-pos { color: var(--commission); }
.proj-neg { color: #c62828; }

/* ── For-profit timeline + Shopify sections ─────────────────── */
.fp-timeline-section,
.fp-shopify-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.fp-section-hdr {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-mid);
  margin-bottom: 10px;
}

/* Timeline */
.fp-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 10px;
  position: relative;
}
.fp-timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}
.fp-tl-item {
  padding: 6px 0 6px 26px;
  position: relative;
}
.fp-tl-item::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 10px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 2px var(--border);
}
.fp-tl-item--event::before {
  background: var(--primary);
  box-shadow: 0 0 0 2px var(--primary);
}
.fp-tl-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 2px;
}
.fp-tl-label {
  font-size: 12px;
  color: var(--text-mid);
  flex: 1;
}
.fp-tl-date {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}
.fp-tl-note {
  font-size: 11px;
  color: var(--text-mid);
  margin: 0;
  line-height: 1.4;
}
.fp-tl-item--event .fp-tl-label { color: var(--primary); font-weight: 600; }
.fp-tl-item--event .fp-tl-date  { color: var(--primary); }

.btn-gen-timeline {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
  border-radius: 7px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 2px;
}
.btn-gen-timeline:hover { background: #f0f7f4; }
.btn-gen-timeline--loading { opacity: .7; cursor: not-allowed; }
.btn-gen-timeline--refresh { font-size: 11px; padding: 4px 10px; }

/* Shopify handoff */
.build-sheet-text {
  width: 100%;
  box-sizing: border-box;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  line-height: 1.5;
  background: var(--bg-mid);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  resize: vertical;
  color: var(--text);
  margin: 8px 0 6px;
}
.btn-build-sheet {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-mid);
  cursor: pointer;
  margin-bottom: 4px;
}
.btn-build-sheet:hover { background: var(--bg-mid); }
.btn-copy-sheet {
  background: var(--primary);
  color: var(--color-bg);
  border: none;
  border-radius: 7px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 12px;
}
.btn-copy-sheet:hover { opacity: .9; }
.fp-shopify-url-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.fp-shopify-url-input { flex: 1; min-width: 0; }
.shopify-url-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  word-break: break-all;
}
.shopify-url-link:hover { text-decoration: underline; }

/* ── Commit-by tracker ──────────────────────────────────────── */
.fp-tracker-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.tracker-notice {
  font-size: 11px;
  color: #7a5a00;
  background: #fffbee;
  border: 1px solid #f0d080;
  border-radius: 6px;
  padding: 8px 10px;
  margin: 0 0 12px;
  line-height: 1.5;
}
.tracker-sold-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.tracker-sold-val {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.tracker-progress-block { margin-bottom: 10px; }
.tracker-bar-wrap {
  height: 10px;
  background: var(--border);
  border-radius: 5px;
  position: relative;
  margin-bottom: 5px;
  overflow: visible;
}
.tracker-bar {
  height: 100%;
  border-radius: 5px;
  background: var(--primary);
  transition: width .35s;
  min-width: 0;
}
.tracker-bar--risk { background: #e57373; }
.tracker-bar-marker {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 2px;
  border-radius: 1px;
  transform: translateX(-50%);
}
.tracker-bar-be  { background: var(--text-mid); }
.tracker-bar-tgt { background: #9575cd; }
.tracker-bar-legend {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-mid);
  margin-bottom: 6px;
}
.tracker-status {
  font-size: 12px;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: 5px;
  display: inline-block;
  line-height: 1.3;
}
.tracker-on-track  { background: #e8f5e9; color: #2e7d32; }
.tracker-at-risk   { background: #fff3e0; color: #e65100; }
.tracker-urgent    { background: #ffebee; color: #b71c1c; }
.tracker-go        { background: #e8f5e9; color: #1b5e20; }
.tracker-cancelled { background: #ffebee; color: #b71c1c; }
.tracker-decision-row {
  display: flex;
  gap: 8px;
  margin: 12px 0 4px;
  flex-wrap: wrap;
}
.btn-mark-go {
  flex: 1;
  min-width: 0;
  background: var(--primary);
  color: var(--color-bg);
  border: none;
  border-radius: 7px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.3;
}
.btn-mark-go:hover { opacity: .88; }
.btn-mark-cancel {
  flex: 1;
  min-width: 0;
  background: transparent;
  color: #c62828;
  border: 1px solid #c62828;
  border-radius: 7px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.btn-mark-cancel:hover { background: #ffebee; }
.tracker-result-block {
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 10px;
  font-size: 12px;
}
.tracker-result-go {
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
}
.tracker-result-cancelled {
  background: #ffebee;
  border: 1px solid #ef9a9a;
}
.tracker-result-hdr {
  font-weight: 700;
  margin: 0 0 6px;
  font-size: 13px;
}
.tracker-result-block ul {
  margin: 0 0 0 16px;
  padding: 0;
  line-height: 1.9;
}

/* ── Vendor section (finance step) ─────────────────────────── */
.vendor-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.vendor-sec-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.vendor-sec-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-mid);
}
.btn-add-vendor {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
  border-radius: 7px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.btn-add-vendor:hover { background: #f0f7f4; }
.vendor-empty {
  font-size: 12px;
  color: var(--text-mid);
  margin: 0 0 8px;
}
.vendor-invoice-notice {
  font-size: 11px;
  color: var(--text-mid);
  margin: 0 0 10px;
  line-height: 1.5;
}
.vendor-form {
  background: var(--bg-mid);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 12px 10px;
  margin-bottom: 12px;
}
.vendor-form-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.vendor-form-row .board-input,
.vendor-form-row .board-select { flex: 1; min-width: 0; }
.vendor-form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-cancel-vendor { font-size: 12px; color: var(--text-mid); cursor: pointer; background: none; border: none; }
.btn-cancel-vendor:hover { color: var(--text); }
.vendor-list { display: flex; flex-direction: column; gap: 8px; }
.vendor-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.vendor-row--paid { opacity: .65; }
.vendor-row-body { flex: 1; min-width: 0; }
.vendor-row-top, .vendor-row-mid, .vendor-row-bot {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: baseline;
  margin-bottom: 2px;
}
.vendor-name   { font-weight: 700; font-size: 13px; color: var(--text); }
.vendor-amount { font-weight: 700; font-size: 13px; color: var(--primary); margin-left: auto; }
.vendor-contact{ font-size: 11px; color: var(--text-mid); }
.vendor-desc   { font-size: 11px; color: var(--text-mid); }
.vendor-payby  { font-size: 11px; color: var(--text-mid); }
.vendor-type   { font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 4px; }
.vendor-type--paypal { background: #e3f2fd; color: #1565c0; }
.vendor-type--gusto  { background: #f3e5f5; color: #6a1b9a; }
.vendor-row-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}
.btn-vendor-paid {
  background: var(--primary);
  color: var(--color-bg);
  border: none;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.btn-vendor-paid:hover { opacity: .88; }
.btn-del-vendor {
  background: none;
  border: none;
  color: var(--text-mid);
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
  padding: 0 2px;
}
.btn-del-vendor:hover { color: #c62828; }
.vendor-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 5px;
  white-space: nowrap;
}
.vendor-badge--paid { background: #e8f5e9; color: #2e7d32; }
.vendor-badge--hold { background: #fff8e1; color: #e65100; }

/* ── Payments view (dashboard) ──────────────────────────────── */
.payments-page-wrap { padding: 16px; }
.pmt-loading, .pmt-error { font-size: 13px; color: var(--text-mid); padding: 20px 0; }
.pmt-empty-state { text-align: center; padding: 40px 20px; }
.pmt-empty       { font-size: 15px; color: var(--text); margin: 0 0 6px; }
.pmt-empty-sub   { font-size: 12px; color: var(--text-mid); margin: 0; }
.pmt-page        { display: flex; flex-direction: column; gap: 20px; }
.pmt-event-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-mid);
  margin: 0;
}
.pmt-invoice-notice {
  font-size: 11px;
  background: #fffbee;
  border: 1px solid #f0d080;
  border-radius: 6px;
  padding: 8px 10px;
  color: #7a5a00;
  line-height: 1.5;
  margin: 0;
}
.pmt-group-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-mid);
  margin: 0 0 8px;
}
.pmt-group--paid { opacity: .7; }
.pmt-none { font-size: 12px; color: var(--text-mid); margin: 0; }
.pmt-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
}
.pmt-card--paid { opacity: .6; }
.pmt-card-top, .pmt-card-mid, .pmt-card-bot {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: baseline;
  margin-bottom: 3px;
}
.pmt-name    { font-weight: 700; font-size: 14px; color: var(--text); flex: 1; }
.pmt-amount  { font-weight: 700; font-size: 14px; color: var(--primary); }
.pmt-contact { font-size: 11px; color: var(--text-mid); }
.pmt-desc    { font-size: 11px; color: var(--text-mid); }
.pmt-payby   { font-size: 11px; color: var(--text-mid); flex: 1; }
.pmt-type    { font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 4px; }
.pmt-type--paypal { background: #e3f2fd; color: #1565c0; }
.pmt-type--gusto  { background: #f3e5f5; color: #6a1b9a; }
.pmt-status { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 4px; }
.pmt-status--paid      { background: #e8f5e9; color: #2e7d32; }
.pmt-status--go        { background: #e8f5e9; color: #1b5e20; }
.pmt-status--cancelled { background: #ffebee; color: #b71c1c; }
.pmt-status--hold      { background: #fff8e1; color: #e65100; }

/* ── Attestation ─────────────────────────────────────────── */
.board-attestation { display: flex; flex-direction: column; gap: 14px; }
.attestation-intro {
  font-size: 13px; color: #92600a; background: #fff8ec;
  border: 1px solid #f5c98a; border-radius: 8px;
  padding: 10px 14px; margin: 0; line-height: 1.5;
}
.attestation-list {
  list-style: none; padding: 0; border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden; background: var(--surface);
}
.attestation-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.attestation-item:last-child { border-bottom: none; }
@keyframes attest-flash {
  0%, 100% { background: transparent; }
  50%       { background: #fdecea; }
}
.attestation-item--flash { animation: attest-flash 0.45s ease 2; }
.attestation-cb { margin-top: 2px; }
.attestation-label { font-size: 14px; color: var(--text-dark); line-height: 1.5; cursor: pointer; }
.attestation-all-done {
  font-size: 13px; font-weight: 700; color: var(--commission);
  text-align: center; padding: 10px; background: var(--accent-pale);
  border-radius: 8px; margin: 0;
}

/* ── Scrollbars ──────────────────────────────────────────── */
.step-content::-webkit-scrollbar,
.step-tracker::-webkit-scrollbar,
.view::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ── Wrap-Up view ────────────────────────────────────────── */
.wup-page-wrap { padding: 16px; }
.wup-page      { display: flex; flex-direction: column; gap: 0; }
.wup-section {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.wup-section:last-child { border-bottom: none; }
.wup-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 12px;
}
.wup-drive-block { margin-bottom: 12px; }
.wup-drive-text  { font-size: 12px; color: var(--text-mid); margin: 0 0 6px; }
.btn-drive {
  display: inline-block;
  background: var(--primary);
  color: var(--color-bg);
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.btn-drive:hover { opacity: .88; }
.wup-min-reqs   { margin-bottom: 14px; }
.wup-min-label  { font-size: 12px; color: var(--text-mid); margin: 0 0 6px; }
.wup-req-row    { display: flex; gap: 10px; }
.wup-req {
  font-size: 13px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--bg-mid);
  color: var(--text-mid);
}
.wup-req--met { background: #e8f5e9; color: #2e7d32; }
.wup-sched-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.wup-sched-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-mid);
}
.wup-content-form { margin-bottom: 10px; }
.wup-content-list { margin-bottom: 8px; }
.wup-content-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr auto;
  gap: 6px;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.wup-content-hdr-row {
  font-weight: 700;
  color: var(--text-mid);
  font-size: 11px;
  text-transform: uppercase;
}
.wup-cp            { color: var(--text); }
.wup-cp-platform--instagram { color: #c13584; font-weight: 600; }
.wup-cp-platform--tiktok    { color: #000; font-weight: 600; }
.wup-cp-status--posted    { color: #2e7d32; }
.wup-cp-status--scheduled { color: #e65100; }
.wup-nudge {
  font-size: 11px;
  color: var(--text-mid);
  margin: 10px 0 0;
  font-style: italic;
}
.wup-att-note  { font-size: 12px; color: var(--text-mid); margin: 0 0 8px; }
.wup-att-input { max-width: 200px; }
.wup-ledger-ok   { font-size: 13px; font-weight: 600; color: #2e7d32; margin: 0 0 8px; }
.wup-ledger-warn {
  font-size: 12px;
  background: #fff8e1;
  border: 1px solid #f0d080;
  border-radius: 6px;
  padding: 8px 10px;
  color: #7a5a00;
  margin: 0;
}
.wup-ledger-summary {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.wup-ledger-item {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  color: var(--text-mid);
}
.wup-ledger-item strong { font-size: 14px; color: var(--text); }
.wup-pos { color: #2e7d32; }
.wup-neg { color: #c62828; }
.wup-submit-section { border-bottom: none !important; padding-top: 8px !important; }
.wup-gate {
  font-size: 12px;
  color: #c62828;
  margin: 0 0 6px;
}
.wup-error {
  font-size: 12px;
  color: #c62828;
  background: #ffebee;
  border-radius: 6px;
  padding: 8px 10px;
  margin: 0 0 10px;
}
.wup-submit-btn { width: 100%; margin-top: 8px; }
.wup-submit-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

/* ── Completion screen ───────────────────────────────────── */
.complete-page {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: 32px 20px;
}
.complete-inner {
  text-align: center;
  max-width: 340px;
  width: 100%;
}
.complete-icon  { font-size: 56px; margin-bottom: 12px; }
.complete-title { font-size: 24px; font-weight: 800; color: var(--text); margin: 0 0 16px; }
.complete-sub   { font-size: 14px; color: var(--text-mid); margin: 0 0 20px; line-height: 1.5; }
.complete-commission {
  background: var(--primary);
  color: var(--color-bg);
  border-radius: 14px;
  padding: 16px 24px;
  margin: 0 0 10px;
}
.complete-commission-label { display: block; font-size: 11px; font-weight: 600; opacity: .85; text-transform: uppercase; letter-spacing: .06em; }
.complete-commission-value { display: block; font-size: 36px; font-weight: 800; }
.complete-total { font-size: 13px; color: var(--text-mid); margin: 0 0 20px; }
.complete-stats {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 20px;
}
.complete-stat {
  background: var(--bg-mid);
  border-radius: 10px;
  padding: 12px 20px;
  flex: 1;
}
.complete-stat-value { display: block; font-size: 22px; font-weight: 800; color: var(--primary); }
.complete-stat-label { display: block; font-size: 11px; color: var(--text-mid); margin-top: 2px; }
.complete-review-note {
  font-size: 12px;
  color: var(--text-mid);
  margin: 0 0 24px;
}
.complete-back-btn { width: 100%; }

/* ── Confetti ────────────────────────────────────────────── */
.confetti-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.confetti-piece {
  position: absolute;
  top: -20px;
  animation: confetti-fall linear forwards;
}
@keyframes confetti-fall {
  0%   { transform: translateY(0)         rotate(0deg);   opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: translateY(110vh)      rotate(720deg); opacity: 0; }
}

/* ── Cost hints ("Add to budget" on cost steps) ───────────────── */
.step-costhints:empty { display: none; }
.costhints {
  margin-top: 16px;
  border: 1px solid #E6E2D8;
  border-radius: 12px;
  background: #FBFAF6;
  padding: 14px 16px;
}
.costhints-hdr {
  font-weight: 600;
  font-size: 14px;
  color: #3A3A3A;
  margin-bottom: 10px;
}
.costhint-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid #EFEBE0;
}
.costhint-row:last-of-type { border-bottom: none; }
.costhint-label { flex: 1; font-size: 14px; color: #3A3A3A; }
.costhint-amt { font-size: 13px; color: #7A7A7A; font-variant-numeric: tabular-nums; }
.costhint-added { font-size: 13px; color: #2E7D5B; font-weight: 600; }
.costhint-manual {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.costhint-manual .costhint-m-label { flex: 1; }
.costhint-manual .finance-amount-wrap { width: 110px; }
.costhint-note {
  margin: 10px 0 0;
  font-size: 12px;
  color: #9A958A;
}

/* ══════════════════════════════════════════════════════════════════
   Phase 1 — Forms + webhook UI (mobile-first)
   ══════════════════════════════════════════════════════════════════ */

/* Full-width buttons on the dashboard */
.btn-block {
  width: 100%;
  flex: none;
  position: relative;
}
.btn-secondary.btn-block { justify-content: center; gap: 8px; }

.soon-tag {
  margin-left: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--accent-pale);
  color: var(--accent-dark);
  border-radius: 999px;
  padding: 2px 7px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

/* ── My Events list ─────────────────────────────────────────── */
.my-events-section { width: 100%; }

.empty-note {
  font-size: 13px;
  color: var(--text-mid);
  text-align: center;
  padding: 16px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.event-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
}
.event-card-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.event-card-name { font-weight: 700; font-size: 14px; color: var(--text-dark); }
.event-card-meta { font-size: 12px; color: var(--text-mid); }
.event-card-warn { font-size: 11px; color: #9a5b00; font-weight: 600; }
.event-card-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }

.pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}
.pill--ok   { background: #dcefe1; color: #1c6b3c; }
.pill--warn { background: #f6e2c8; color: #9a5b00; }
.pill--mid  { background: var(--accent-pale); color: var(--accent-dark); }

.btn-mini {
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  transition: background 0.12s;
}
.btn-mini:hover { background: var(--accent-pale); }

/* ── Form pages ─────────────────────────────────────────────── */
.form-page {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 22px 20px 40px;
}
.form-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-dark);
}
.form-sub {
  font-size: 13px;
  color: var(--text-mid);
  margin: 4px 0 20px;
}

.af-form { display: flex; flex-direction: column; gap: 16px; }

.af-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
}

.af-input {
  font-family: var(--font);
  font-size: 15px;
  color: var(--text-dark);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  width: 100%;
  font-weight: 400;
}
.af-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-pale);
}
.af-textarea { resize: vertical; min-height: 84px; }

.af-row { display: flex; gap: 12px; }
.af-grow { flex: 1; min-width: 0; }
.af-row .af-label:not(.af-grow) { width: 40%; }

.af-file {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 400;
  color: var(--text-mid);
}
.af-hint { font-size: 12px; font-weight: 400; color: var(--text-mid); }

/* Event-type toggle */
.type-toggle {
  display: flex;
  gap: 8px;
  margin-top: 2px;
}
.type-toggle--wrap { flex-wrap: wrap; }
.type-opt {
  flex: 1;
  min-width: 90px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 10px;
  cursor: pointer;
  transition: all 0.12s;
}
.type-opt--active {
  background: var(--accent);
  color: var(--color-bg);
  border-color: var(--accent);
}
.type-opt--locked,
.type-opt:disabled { opacity: 0.5; cursor: not-allowed; }

.lock-note {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-mid);
  margin-top: 6px;
}
.lock-note strong { color: var(--accent-dark); }

/* ── Recap draft ────────────────────────────────────────────── */
.draft-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: var(--accent-pale);
  border-radius: var(--radius);
  margin-top: 6px;
}
.draft-text { background: var(--surface); font-size: 14px; line-height: 1.5; }

/* ── Placeholder (Phase 2) ──────────────────────────────────── */
.placeholder-page {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 60px 24px;
}
.placeholder-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 24px;
}
.placeholder-icon { font-size: 40px; }
.placeholder-card .form-sub { margin: 0 0 8px; }
.placeholder-card .btn-block { max-width: 240px; }

/* ── Leaderboards tabs / rows (Phase-1 override) ────────────── */
.lb-tabs {
  display: flex;
  gap: 8px;
  background: var(--bg-mid);
  padding: 4px;
  border-radius: 12px;
}
.lb-tab {
  flex: 1;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-mid);
  background: transparent;
  border: none;
  border-radius: 9px;
  padding: 10px;
  cursor: pointer;
  transition: all 0.12s;
}
.lb-tab--active { background: var(--surface); color: var(--text-dark); box-shadow: 0 1px 3px rgba(10,36,99,0.1); }

.lb-list { display: flex; flex-direction: column; gap: 8px; }
.lb-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.lb-row--me { border-color: var(--accent); background: var(--accent-pale); }
.lb-rank { font-weight: 800; color: var(--accent-dark); width: 34px; flex-shrink: 0; }
.lb-name { flex: 1; font-weight: 600; font-size: 14px; color: var(--text-dark); min-width: 0; }
.lb-name em { font-weight: 400; color: var(--text-mid); font-style: normal; }
.lb-val { font-weight: 700; color: var(--text-dark); white-space: nowrap; }
.lb-val small { font-weight: 400; color: var(--text-mid); font-size: 11px; }

/* ── Toast ──────────────────────────────────────────────────── */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  max-width: 90%;
  z-index: 200;
  background: var(--accent-dark);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  padding: 12px 18px;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(10,36,99,0.28);
}
.toast--success { background: #1c6b3c; }
.toast--error { background: #9a2b2b; }

/* ── Phase 2 chat (Event Coach + Flyer Check) ─────────────── */
.chat-page { flex: 1; display: flex; min-height: 0; }
.chat-wrap {
  flex: 1; display: flex; flex-direction: column; min-height: 0;
  width: 100%; max-width: 720px; margin: 0 auto;
}
.chat-list {
  flex: 1; overflow-y: auto; min-height: 0;
  padding: 18px 16px 12px;
  display: flex; flex-direction: column; gap: 12px;
}
.chat-msg { display: flex; }
.chat-msg--me  { justify-content: flex-end; }
.chat-msg--bot { justify-content: flex-start; }
.chat-bubble {
  max-width: 82%;
  padding: 11px 14px;
  border-radius: 16px;
  font-size: 0.95rem;
  line-height: 1.5;
  white-space: normal;
  word-wrap: break-word;
  box-shadow: 0 1px 4px rgba(10, 36, 99, 0.06);
}
.chat-msg--bot .chat-bubble {
  background: var(--surface);
  color: var(--text-dark);
  border: 1px solid var(--border);
  border-bottom-left-radius: 5px;
}
.chat-msg--me .chat-bubble {
  background: var(--accent);
  color: var(--color-bg);
  border-bottom-right-radius: 5px;
}
.chat-bubble strong { font-weight: 700; }

/* Typing indicator */
.chat-typing { display: inline-flex; gap: 5px; align-items: center; padding: 14px 16px; }
.chat-typing span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--text-mid); opacity: 0.5;
  animation: chatBlink 1.2s infinite ease-in-out;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes chatBlink { 0%, 60%, 100% { opacity: 0.25; } 30% { opacity: 0.9; } }

/* Coach "Submit this event" action row */
.chat-actions { padding: 0 16px 4px; }
.chat-actions .btn-secondary { margin: 0; }

/* Composer */
.chat-composer {
  display: flex; align-items: flex-end; gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.chat-composer--flyer { display: block; }
.chat-input {
  flex: 1; resize: none;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  color: var(--text-dark);
  font-family: var(--font); font-size: 0.95rem; line-height: 1.4;
  max-height: 120px;
}
.chat-input:focus { outline: none; border-color: var(--accent); }
.chat-send {
  flex: 0 0 auto;
  width: 42px; height: 42px; border-radius: 50%;
  border: none; cursor: pointer;
  background: var(--accent); color: var(--color-bg);
  font-size: 1.05rem;
  display: inline-flex; align-items: center; justify-content: center;
}
.chat-send:hover { background: var(--accent-dark); }
.chat-send:disabled { opacity: 0.5; cursor: default; }
