:root {
  --bg: #f3eee6;
  --ink: #1c1915;
  --muted: #6a6258;
  --card: #fffcf8;
  --line: #e4d9c8;
  --blue: #c4622d;
  --blue-ink: #fff8f3;
  --blue-soft: #f8e7da;
  --green: #1f6b4a;
  --amber: #8a5a12;
  --amber-bg: #f8ebd4;
  --nav: #1c2420;
  --nav-ink: #f6f1e8;
  --shadow: 0 14px 34px rgba(28, 25, 21, 0.08);
  color: var(--ink);
  background: var(--bg);
  font-family: "Segoe UI Variable", "Segoe UI", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; font-weight: 680; margin: 0; }
a { color: var(--blue); }

button, .primary {
  border: 1px solid var(--line);
  background: white;
  border-radius: 12px;
  padding: 9px 12px;
}
.primary {
  background: var(--blue);
  color: var(--blue-ink);
  border-color: var(--blue);
}
.primary:disabled, button:disabled { opacity: 0.55; cursor: wait; }
.wide { width: 100%; }
.hidden { display: none !important; }
.fine { color: var(--muted); font-size: 0.92rem; line-height: 1.45; margin: 0; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; font-size: 0.92rem; color: var(--muted); }
.field input, .field textarea, .field select,
.manual input, .composer, .notes, .toolbar input, .adder input, .adder select {
  width: 100%;
  border: 1px solid var(--line);
  background: white;
  border-radius: 12px;
  padding: 10px 12px;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 0;
  background: var(--blue-soft);
  color: var(--blue);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.82rem;
  cursor: pointer;
}
.chip.active {
  background: var(--ink, #1a1a1a);
  color: #fff;
}
.exp-level { margin-top: 2px; }
.msg-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.msg-from-resume {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #3d6b4f;
  background: #e7f3eb;
  border-radius: 999px;
  padding: 5px 10px;
  white-space: nowrap;
}
#rolesMessagePanel.msg-flash {
  animation: msgFlash 1.1s ease;
}
@keyframes msgFlash {
  0% { box-shadow: 0 0 0 0 rgba(61, 107, 79, 0); }
  35% { box-shadow: 0 0 0 3px rgba(61, 107, 79, 0.28); }
  100% { box-shadow: 0 0 0 0 rgba(61, 107, 79, 0); }
}
.toast {
  position: fixed; bottom: 16px; right: 16px; background: var(--ink); color: white;
  padding: 10px 14px; border-radius: 999px; opacity: 0; transform: translateY(8px);
  transition: 0.2s ease; pointer-events: none; z-index: 40;
}
.toast.show { opacity: 1; transform: none; }

/* Auth */
.auth-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(196, 98, 45, 0.16), transparent 36%),
    linear-gradient(180deg, #faf6f0 0%, #f3eee6 100%);
}
.auth-shell {
  max-width: 1040px;
  margin: 0 auto;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: center;
  padding: 36px 20px;
}
.auth-copy h1 {
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin: 12px 0 14px;
}
.auth-copy p { color: var(--muted); font-size: 1.08rem; line-height: 1.55; max-width: 34rem; }
.brand-lockup { display: flex; align-items: center; gap: 12px; }
.brand-lockup img { width: 52px; height: 52px; border-radius: 14px; object-fit: cover; border: 1px solid var(--line); }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--blue);
}
.auth-points { display: grid; gap: 10px; margin-top: 22px; }
.auth-points div {
  background: rgba(255,255,255,0.8);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
}
.auth-points strong { display: block; margin-bottom: 2px; }
.auth-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.auth-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.auth-tabs button { flex: 1; border-radius: 999px; }
.auth-tabs button.active { background: var(--ink); color: white; border-color: var(--ink); }
.auth-error { color: #b42318; min-height: 1.2em; margin: 10px 0 0; }

/* App shell — left sidebar always */
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 230px 1fr;
  transition: grid-template-columns 0.2s ease;
  position: relative;
}
.app-shell.nav-collapsed { grid-template-columns: 72px 1fr; }
.main-wrap { min-width: 0; }
.side-nav {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  width: 100%;
  background: var(--nav);
  color: var(--nav-ink);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  z-index: 25;
}
.side-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 4px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 8px;
  flex-shrink: 0;
}
.side-brand img { width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0; }
.side-brand-text { min-width: 0; flex: 1; }
.side-brand strong { display: block; font-family: Literata, Georgia, serif; }
.side-brand span { color: rgba(246,241,232,0.62); font-size: 0.82rem; }
.nav-collapse-btn, .nav-open-btn {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.08);
  color: white;
  padding: 0;
  line-height: 1;
}
.nav-open-btn {
  display: none;
  border-color: var(--line);
  background: white;
  color: var(--ink);
  margin-right: 4px;
}
.nav-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 8px;
}
.nav-btn {
  text-align: left;
  background: transparent;
  border: 0;
  color: rgba(246,241,232,0.82);
  border-radius: 12px;
  padding: 11px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-btn .nav-label { min-width: 0; }
.nav-btn.active, .nav-btn:hover { background: rgba(246,241,232,0.12); color: var(--nav-ink); }
.app-shell.nav-collapsed .side-brand-text,
.app-shell.nav-collapsed .scan-meta,
.app-shell.nav-collapsed #logoutBtn { display: none; }
.app-shell.nav-collapsed .side-nav { padding: 14px 8px; }
.app-shell.nav-collapsed .nav-btn {
  justify-content: center;
  padding: 10px 6px;
  font-size: 0.72rem;
  line-height: 1.2;
  text-align: center;
}
.app-shell.nav-collapsed .nav-label {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.app-shell.nav-collapsed .nav-count { display: none; }
.app-shell.nav-collapsed .nav-foot { grid-template-columns: 1fr; }
.app-shell.nav-collapsed .scan-btn { padding: 12px 8px; font-size: 0.85rem; }
.app-shell.nav-collapsed .nav-collapse-btn { margin-left: auto; margin-right: auto; }
.roles-resume-hero {
  margin-bottom: 16px;
  max-width: none;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(196, 98, 45, 0.08), transparent 42%),
    var(--card);
}
.roles-resume-hero h2 { font-size: 1.35rem; }
.desk-section-title {
  margin: 8px 0 4px;
  font-size: 1.2rem;
}
.pro-scan-teaser {
  margin-bottom: 18px;
  max-width: none;
  border: 1px solid #e7cbb8;
  background:
    linear-gradient(135deg, rgba(196, 98, 45, 0.12), transparent 50%),
    var(--card);
}
.pro-scan-teaser .pro-teaser-list {
  margin: 0 0 14px;
  padding-left: 18px;
  color: var(--ink);
  line-height: 1.45;
}
.pro-scan-teaser .pro-teaser-list li { margin-bottom: 6px; }
.pro-scan-teaser.hidden,
#proScanDesk.hidden,
#freeRolesHeading.hidden,
#freeRolesSub.hidden,
#freeProTeaser.hidden { display: none !important; }
.file-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  cursor: pointer;
}
.file-picker-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.file-picker-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 700;
  font-size: 0.95rem;
}
.file-picker:hover .file-picker-btn { background: #f3d7c4; }
.file-picker-name {
  color: var(--muted);
  font-size: 0.92rem;
}
.guide-panel {
  margin-bottom: 14px;
  max-width: none;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0;
  box-shadow: none;
}
.guide-panel summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 14px;
  font-family: Literata, Georgia, serif;
  font-weight: 700;
  color: var(--ink);
}
.guide-panel summary::-webkit-details-marker { display: none; }
.guide-panel summary::after {
  content: '+';
  float: right;
  color: var(--muted);
  font-weight: 600;
  font-family: "Source Sans 3", sans-serif;
}
.guide-panel[open] summary::after { content: '−'; }
.guide-panel #howLine {
  padding: 0 14px 14px;
  margin: 0;
}
.nav-count {
  display: inline-block;
  min-width: 1.4em;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
}
.nav-count:empty { display: none; }
.top-actions #topScanBtn {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  font-weight: 700;
}
.top-actions #topScanBtn:disabled { opacity: 0.55; cursor: not-allowed; }
.top-actions #topScanBtn.hidden,
.top-actions #findEmailsBtn.hidden,
.nav-foot #scanBtn.hidden { display: none !important; }
.sent-prompt {
  margin-top: 10px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--blue-soft);
  display: grid;
  gap: 8px;
}
.sent-prompt strong { font-family: Literata, Georgia, serif; }
.sent-prompt .actions { margin-top: 0; }
.status-pill { text-transform: capitalize; }
.remind-banner {
  margin: 0 20px 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #efd7a4;
  background: var(--amber-bg);
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.remind-banner.show { display: flex; }
.scan-banner {
  margin: 0 20px 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #d7e6dc;
  background: #eef6f0;
  color: #1c2420;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.scan-banner.show { display: flex; }
.scan-banner.scan-banner-limit {
  border-color: #efd7a4;
  background: var(--amber-bg);
}
.scan-suggest {
  margin-bottom: 14px;
  max-width: none;
  border-color: #d7e6dc;
  background: #f4faf6;
}
.scan-suggest.hidden { display: none; }
.scan-suggest-list {
  margin: 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 6px;
}
.scan-suggest-list li {
  line-height: 1.35;
  color: var(--ink);
}
.nav-foot {
  margin-top: auto;
  flex-shrink: 0;
  display: grid;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(246,241,232,0.12);
  background: var(--nav);
}
.scan-meta {
  margin: 0;
  font-size: 0.78rem;
  color: rgba(246,241,232,0.62);
  letter-spacing: 0.01em;
}
.nav-foot button {
  background: rgba(246,241,232,0.06);
  border: 1px solid rgba(246,241,232,0.1);
  color: var(--nav-ink);
}
.nav-foot .scan-btn {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  font-weight: 700;
  padding: 12px 14px;
}
.nav-foot .scan-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.match-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: white;
}
.match-card strong { font-family: Literata, Georgia, serif; }
.match-score {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e7f3ec;
  color: var(--green);
  font-size: 0.78rem;
}
.resume-maker-shell { max-width: none; }
.resume-maker-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.resume-maker-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.resume-maker-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(300px, 1.05fr);
  gap: 16px;
  align-items: start;
}
.resume-maker-editor {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: var(--card);
}
.resume-maker-editor textarea { min-height: 96px; resize: vertical; }
.resume-maker-side {
  position: sticky;
  top: 72px;
  display: grid;
  gap: 12px;
}
.resume-live-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.resume-live {
  padding: 22px 22px 26px;
  min-height: 420px;
  color: var(--ink);
}
.resume-live-placeholder { color: var(--muted); margin: 0; }
.resume-live .rm-name {
  font-family: Literata, Georgia, serif;
  font-size: 1.55rem;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}
.resume-live .rm-headline { margin: 0 0 8px; color: var(--muted); font-weight: 600; }
.resume-live .rm-contact { margin: 0 0 16px; color: var(--muted); font-size: 0.9rem; }
.resume-live .rm-section { margin: 0 0 6px; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--green); font-weight: 700; }
.resume-live .rm-body { margin: 0 0 14px; white-space: pre-wrap; line-height: 1.45; font-size: 0.95rem; }
.resume-live .rm-skills { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.resume-live .rm-chip {
  background: #e7f3ec;
  color: var(--green);
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.8rem;
}
.resume-recs {
  border: 1px solid var(--line);
  background: var(--blue-soft);
  border-radius: 16px;
  padding: 14px;
}
.resume-recs strong { display: block; margin-bottom: 8px; font-family: Literata, Georgia, serif; color: var(--ink); }
.resume-recs ul { margin: 0; padding-left: 18px; color: var(--muted); }
.resume-recs li { margin-bottom: 6px; line-height: 1.4; }
.rm-role-recs { margin-top: 12px; display: grid; gap: 8px; }
.rm-role-rec {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}
.rm-role-rec span { color: var(--muted); font-size: 0.86rem; }
@media (max-width: 980px) {
  .resume-maker-grid { grid-template-columns: 1fr; }
  .resume-maker-side { position: relative; top: 0; }
  .resume-live { min-height: 280px; }
}
@media print {
  body * { visibility: hidden; }
  .resume-live-card, .resume-live-card * { visibility: visible; }
  .resume-live-card {
    position: absolute; left: 0; top: 0; width: 100%;
    border: 0; box-shadow: none; border-radius: 0;
  }
  .resume-recs, .resume-maker-editor, .resume-maker-head, .side-nav, .topbar, .billing-banner, .remind-banner, .scan-banner { display: none !important; }
}
.roles-lock {
  margin-top: 16px;
  padding: 22px 18px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(15, 40, 80, 0.04), rgba(15, 40, 80, 0.08));
  text-align: center;
  max-width: 520px;
}
.roles-lock.hidden { display: none; }
.roles-lock-mark {
  display: inline-block;
  width: 28px;
  height: 28px;
  margin-bottom: 8px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  position: relative;
}
.roles-lock-mark::before {
  content: '';
  position: absolute;
  left: 5px;
  right: 5px;
  top: -10px;
  height: 12px;
  border: 2px solid var(--ink);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
}
.roles-lock strong { display: block; margin-bottom: 6px; font-family: Literata, Georgia, serif; }
.roles-lock .fine { margin: 0 0 14px; }
.roles-lock .primary { min-width: 160px; }

.main-wrap { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(243,238,230,0.92);
  backdrop-filter: blur(8px);
}
.topbar h1 { font-size: 1.35rem; }
.top-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.workspace { display: none; padding: 18px 20px 32px; }
.workspace.active { display: block; }

.stats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.stat {
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--muted);
}
.stat strong { color: var(--ink); margin-right: 4px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filters button.active { background: var(--ink); color: white; border-color: var(--ink); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.card.due { background: var(--amber-bg); border-color: #efd7a4; }
.card.selected { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(11, 95, 255, 0.12); }
.card-top, .actions, .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.card-top { justify-content: space-between; }
.company { font-size: 1.12rem; }
.role { margin: 2px 0 8px; color: var(--muted); }
.pill, .band {
  border-radius: 999px; padding: 3px 8px; font-size: 0.78rem; background: var(--blue-soft); color: var(--ink);
}
.band.strong { background: #e7f3ec; color: var(--green); }
.band.good { background: var(--blue-soft); color: var(--blue); }
.due-flag { background: #f8e2b8; color: var(--amber); }
.intern-flag { background: #f8e7da; color: #8c3e16; }
.composer { min-height: 160px; resize: vertical; line-height: 1.45; margin-top: 10px; }
.notes { margin-top: 8px; }
.actions { margin-top: 10px; }
.reply-box { margin-top: 10px; background: #f7f1e8; border-radius: 12px; padding: 10px; white-space: pre-wrap; }
.empty { padding: 40px 10px; color: var(--muted); }
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow);
  max-width: 720px;
}
.billing-banner {
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--blue-soft);
  border-radius: 12px;
  display: none;
}
.billing-banner.show { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.resume-result { margin-top: 10px; font-size: 0.92rem; line-height: 1.4; }
.resume-result .ok { color: var(--green); }
.resume-result .bad { color: #b42318; }
.lock-tag {
  display: inline-block; margin-left: 6px; border-radius: 999px; padding: 2px 8px;
  background: var(--blue-soft); color: var(--blue); font-size: 0.72rem; vertical-align: middle;
}
.track {
  border: 1px solid var(--line); background: white; border-radius: 14px;
  padding: 10px; margin-top: 10px;
}
.track header { display: flex; justify-content: space-between; align-items: center; padding: 0 0 8px; background: transparent; border: 0; }
.swatch { width: 9px; height: 9px; border-radius: 99px; display: inline-block; margin-right: 6px; }
.manual { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.checks { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.send-from { display: flex; align-items: center; gap: 8px; color: var(--muted); white-space: nowrap; }
.send-from select { width: 220px; border: 1px solid var(--line); background: white; border-radius: 12px; padding: 9px 11px; }

.faq-item {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}
.faq-item button {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 0;
  font-weight: 700;
  color: var(--ink);
}
.faq-item p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
  display: none;
}
.faq-item.open p { display: block; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 27, 51, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 20px;
}
.modal-card {
  background: white;
  border-radius: 18px;
  border: 1px solid var(--line);
  padding: 22px;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow);
}
.modal-card-wide {
  max-width: 560px;
  max-height: min(86vh, 720px);
  display: flex;
  flex-direction: column;
}
.role-pick-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.role-pick-x {
  border: 0;
  background: transparent;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 2px 6px;
}
.role-pick-list {
  overflow: auto;
  display: grid;
  gap: 8px;
  min-height: 180px;
  max-height: 46vh;
  padding-right: 2px;
}
.role-pick-item {
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.role-pick-item:hover,
.role-pick-item:focus-visible {
  border-color: var(--ink, #1a1a1a);
  background: #faf7f2;
  outline: none;
}
.role-pick-item strong {
  display: block;
  font-size: 0.95rem;
}
.role-pick-item .role {
  margin-top: 2px;
  color: var(--ink, #1a1a1a);
  font-size: 0.9rem;
}
.role-pick-item .meta {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
}
.role-pick-item .tag {
  border-radius: 999px;
  padding: 2px 8px;
  background: var(--blue-soft, #eef3ff);
  color: var(--blue, #0b5fff);
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
    padding-bottom: 0;
  }
  .app-shell.nav-collapsed { grid-template-columns: 1fr; }
  .side-nav {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(260px, 84vw);
    height: 100vh;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    box-shadow: 12px 0 28px rgba(0,0,0,0.25);
    z-index: 40;
  }
  .app-shell.nav-open .side-nav { transform: translateX(0); }
  .app-shell.nav-open::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(15, 27, 51, 0.4);
    z-index: 35;
    pointer-events: auto;
  }
  .nav-open-btn { display: inline-flex; align-items: center; justify-content: center; }
  .app-shell.nav-collapsed .side-brand-text,
  .app-shell.nav-collapsed .nav-label,
  .app-shell.nav-collapsed .scan-meta,
  .app-shell.nav-collapsed #logoutBtn { display: block; }
  .app-shell.nav-collapsed .nav-btn { justify-content: flex-start; padding: 11px 12px; }
  .topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 12px 14px;
    flex-wrap: wrap;
    align-items: center;
  }
  .topbar h1 { font-size: 1.15rem; }
  .top-actions { width: 100%; }
  .top-actions #topScanBtn { flex: 1; }
  .workspace { padding: 14px 14px 24px; }
  .remind-banner,
  .scan-banner { margin: 0 14px 10px; }
  .split { grid-template-columns: 1fr; }
  .send-from { width: 100%; white-space: normal; }
  .send-from select { width: 100%; }
  .auth-shell { grid-template-columns: 1fr; padding: 24px 16px; }
  .card { padding: 12px; }
  .composer { min-height: 120px; }
  .toast { left: 12px; right: 12px; bottom: 16px; text-align: center; }
}

.known-pill { background: #e7f3ec; color: #1f6b4a; }
.startup-pill { background: #f8e7da; color: #8c3e16; }
.coach-shell { max-width: 560px; }
#ws-coach.active {
  display: flex;
  flex-direction: column;
  padding: 0;
  min-height: calc(100vh - 88px);
}
.vox-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 88px);
  background: linear-gradient(180deg, #f3eee6 0%, #ebe4d8 100%);
}
.vox-page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: #1c2420;
  color: #f6f1e8;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.vox-page-brand { display: flex; gap: 12px; align-items: center; }
.vox-page-brand strong { display: block; font-family: Literata, Georgia, serif; font-size: 1.25rem; }
.vox-page-brand .fine { color: #c9c0b4; margin: 2px 0 0; }
.vox-quota { margin: 0; color: #c9c0b4; white-space: nowrap; }
.vox-page-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.vox-new-chat {
  border: 1px solid rgba(255,255,255,0.18);
  background: transparent;
  color: #f6f1e8;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.82rem;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
}
.vox-new-chat:hover { background: rgba(255,255,255,0.08); }
.vox-page-log {
  flex: 1;
  max-height: none;
  margin: 0;
  padding: 18px 20px 10px;
  overflow: auto;
  background: transparent;
}
.vox-page-log .chat-msg { max-width: 720px; }
.vox-page-log .chat-msg.user { margin-left: auto; margin-right: 0; max-width: 560px; }
.chat-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 20px 0;
  background: #fffcf8;
  border-top: 1px solid var(--line);
  min-height: 48px;
}
.chat-quick:empty { display: none; }
.chat-quick .vox-choice {
  background: #f7f1e8;
  border-color: #e2d7c8;
}
.vox-page-form {
  padding: 12px 20px 18px;
  border-top: 0;
  background: #fffcf8;
  position: sticky;
  bottom: 0;
}
.vox-page-form input[type="text"] { min-width: 0; }
.main-wrap:has(#ws-coach.active) .topbar .top-actions { opacity: 0.35; pointer-events: none; }
.main-wrap:has(#ws-coach.active) #remindBanner,
.main-wrap:has(#ws-coach.active) #billingBanner,
.main-wrap:has(#ws-coach.active) #scanBanner { display: none !important; }
body.vox-open .coach-widget { display: none; }
.coach-widget {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
}
.coach-widget > * { pointer-events: auto; }
.vox-face {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: linear-gradient(145deg, #c4622d, #8a5a12);
  color: #fff8f3;
  display: grid;
  place-items: center;
  font-family: Literata, Georgia, serif;
  font-weight: 700;
  font-size: 1.25rem;
  flex: 0 0 auto;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,0.12);
}
.vox-face-sm { width: 36px; height: 36px; border-radius: 12px; font-size: 1.05rem; }
.vox-face-fab {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  font-size: 1.15rem;
  background: linear-gradient(145deg, #f0c4a0, #fff8f3);
  color: #8c3e16;
  box-shadow: none;
}
.coach-fab {
  border: 0;
  border-radius: 999px;
  background: #1c2420;
  color: #f6f1e8;
  font-weight: 700;
  padding: 8px 16px 8px 8px;
  box-shadow: 0 12px 32px rgba(28, 25, 21, 0.28);
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.coach-fab:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(28, 25, 21, 0.32); }
.coach-fab-copy { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; text-align: left; }
.coach-fab-copy strong { font-family: Literata, Georgia, serif; font-size: 1.05rem; }
.coach-fab-copy small { font-weight: 600; opacity: 0.75; font-size: 0.72rem; letter-spacing: 0.02em; }
.coach-fab-dot {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #3dba7a;
  box-shadow: 0 0 0 2px #1c2420;
  animation: voxPulse 1.6s ease infinite;
}
.coach-fab-dot.off { display: none; animation: none; }
@keyframes voxPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.7; }
}
.coach-hello {
  width: min(320px, calc(100vw - 36px));
  background: #fffcf8;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px 14px 12px;
  box-shadow: 0 14px 36px rgba(28, 25, 21, 0.16);
  position: relative;
  animation: coachPop 0.35s ease;
}
.coach-hello.hidden { display: none; }
.coach-hello-row { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; padding-right: 18px; }
.vox-tag { margin: 0 0 2px; font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase; color: #c4622d; font-weight: 700; }
.coach-hello strong { display: block; font-family: Literata, Georgia, serif; font-size: 1.12rem; margin-bottom: 4px; }
.coach-hello p { margin: 0; color: var(--muted); font-size: 0.92rem; line-height: 1.35; }
.coach-hello > .primary { width: 100%; margin-top: 10px; }
.vox-choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 2px 0 0;
}
.vox-choice {
  border: 1px solid var(--line);
  background: #fff;
  color: #1c2420;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.82rem;
  font-weight: 650;
  cursor: pointer;
  line-height: 1.2;
}
.vox-choice:hover { border-color: #c4622d; color: #8c3e16; background: #fff8f3; }
.chat-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.chat-options .vox-choice {
  background: #f7f1e8;
  border-color: #e2d7c8;
}
.chat-msg.bot .chat-options .vox-choice.used {
  opacity: 0.55;
  pointer-events: none;
}
.coach-hello-close {
  position: absolute;
  top: 6px;
  right: 8px;
  border: 0;
  background: transparent;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}
@keyframes coachPop {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
@media (max-width: 720px) {
  .coach-widget { right: 12px; bottom: 12px; }
  #ws-coach.active { min-height: calc(100vh - 64px); }
  .vox-page { min-height: calc(100vh - 64px); }
  .vox-page-head { padding: 12px 14px; flex-wrap: wrap; }
  .vox-page-log { padding: 14px; }
  .chat-quick { padding: 8px 14px 0; }
  .vox-page-form { padding: 12px 14px 14px; }
}
.chat-log {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 520px;
  overflow: auto;
  margin-bottom: 12px;
  padding-right: 4px;
}
.chat-msg {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  background: white;
}
.chat-msg.user { background: #f6efe4; margin-left: 28px; }
.chat-msg.bot { margin-right: 12px; }
.chat-msg p { margin: 0 0 8px; }
.chat-msg p:last-child { margin-bottom: 0; }
.chat-points {
  margin: 8px 0 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 6px;
}
.chat-points li {
  margin: 0;
  line-height: 1.35;
}
.chat-role {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 10px;
  background: #fff;
}
.chat-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chat-form input[type="text"] {
  flex: 1;
  min-width: 120px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}


/* Manual Pro checkout */
.pro-body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(196, 98, 45, 0.12), transparent 55%),
    linear-gradient(180deg, #f3eee6 0%, #ebe4d8 100%);
  color: #1c1915;
}
.pro-shell {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 20px 64px;
}
.pro-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}
.pro-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #1c2420;
  font-family: Literata, Georgia, serif;
  font-weight: 700;
  font-size: 1.15rem;
}
.pro-brand img { border-radius: 10px; }
.pro-hero h1 {
  font-family: Literata, Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}
.pro-eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 700;
  color: #c4622d;
}
.pro-lead { margin: 0 0 14px; color: #5c554c; max-width: 36rem; line-height: 1.45; }
.pro-price {
  font-family: Literata, Georgia, serif;
  font-size: 2rem;
  margin: 0 0 22px;
  font-weight: 700;
}
.pro-price small { font-size: 0.95rem; font-weight: 600; color: #5c554c; }
.pro-steps {
  list-style: none;
  display: flex;
  gap: 10px;
  padding: 0;
  margin: 0 0 22px;
  flex-wrap: wrap;
}
.pro-steps li {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #e2d7c8;
  background: #fffcf8;
  font-size: 0.85rem;
  font-weight: 650;
  color: #5c554c;
}
.pro-steps li.active { background: #1c2420; color: #f6f1e8; border-color: #1c2420; }
.pro-steps li.done { border-color: #c4622d; color: #8c3e16; }
.pro-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.8fr);
  gap: 18px;
  align-items: start;
}
.pro-card, .pro-aside {
  background: #fffcf8;
  border: 1px solid #e2d7c8;
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 10px 30px rgba(28, 25, 21, 0.06);
}
.pro-card h2, .pro-aside h3 {
  font-family: Literata, Georgia, serif;
  margin: 0 0 8px;
}
.pro-form { display: grid; gap: 12px; margin-top: 14px; }
.pro-form .field input {
  width: 100%;
  border: 1px solid #e2d7c8;
  border-radius: 12px;
  padding: 11px 12px;
  margin-top: 6px;
  background: #fff;
}
.pro-pay-box {
  margin: 14px 0;
  padding: 16px;
  border-radius: 16px;
  background: #f4f1ea;
  border: 1px solid #e2d7c8;
  text-align: center;
}
.pro-pay-amount {
  font-family: Literata, Georgia, serif;
  font-size: 2rem;
  margin: 0 0 10px;
  font-weight: 700;
}
.pro-upi-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.pro-upi-row code {
  background: #fff;
  border: 1px solid #e2d7c8;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.95rem;
}
.pro-qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.pro-qr-wrap img {
  width: min(220px, 70vw);
  height: min(220px, 70vw);
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid #e2d7c8;
  background: #fff;
  padding: 10px;
  box-sizing: border-box;
}
.pro-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.pro-perks {
  margin: 10px 0 14px;
  padding-left: 1.1rem;
  display: grid;
  gap: 8px;
  line-height: 1.35;
}
.pro-card.hidden { display: none; }
@media (max-width: 820px) {
  .pro-layout { grid-template-columns: 1fr; }
  .pro-aside { order: -1; }
}

/* Admin payment review */
.pay-review {
  margin-bottom: 18px;
  max-width: none;
}
.pay-review table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.pay-review th, .pay-review td { padding: 10px 6px; text-align: left; vertical-align: top; }
.pay-review tr { border-top: 1px solid var(--line); }
.pay-actions { display: flex; gap: 6px; flex-wrap: wrap; }
