/* Futurise Growth Partners — Financial Diagnostic
   Shares the FGP dashboard design language: navy + gold, Inter, soft cards. */
:root {
  --navy: #0e2340;
  --navy-deep: #0a1a30;
  --navy-soft: #1b3357;
  --navy-line: #24406b;
  --gold: #c6a15b;
  --gold-soft: #e4cf9d;
  --paper: #f6f7f9;
  --card: #ffffff;
  --ink: #14243d;
  --muted: #64748b;
  --danger: #c0392b;
  --danger-bg: #fbe9e7;
  --danger-soft: #f5c9c2;
  --amber: #c98a1b;
  --amber-bg: #fdf3e2;
  --amber-soft: #f0dcb4;
  --good: #2f8f5b;
  --good-bg: #eaf6ef;
  --good-soft: #bfe3cd;
  --border: #e6e9ee;
  --shadow: 0 1px 2px rgba(14,35,64,.06), 0 8px 24px rgba(14,35,64,.06);
  --radius: 14px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

/* ---------- Top bar ---------- */
.topbar {
  background: var(--navy);
  color: #fff;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 8px;
  background: linear-gradient(135deg, var(--gold), var(--gold-soft));
  display: flex; align-items: center; justify-content: center;
  color: var(--navy); font-weight: 800; font-size: 16px; flex: none;
}
.brand-chip {
  background: #fff; border-radius: 10px; padding: 6px 12px; flex: none;
  display: flex; align-items: center; box-shadow: 0 1px 3px rgba(0,0,0,.18);
}
.brand-logo { height: 34px; width: auto; display: block; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-size: 14px; font-weight: 700; letter-spacing: .2px; white-space: nowrap; }
.brand-sub { font-size: 11px; color: var(--gold-soft); white-space: nowrap; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.who { font-size: 13px; color: #cdd8ea; white-space: nowrap; max-width: 30vw; overflow: hidden; text-overflow: ellipsis; }
.btn-ghost {
  background: transparent; color: #cdd8ea; border: 1px solid var(--navy-line);
  padding: 7px 12px; border-radius: 8px; font-size: 13px; cursor: pointer; font-family: inherit;
}
.btn-ghost:hover { background: rgba(255,255,255,.06); color: #fff; }

/* Site shell embeds the SPA in an iframe — hide duplicate chrome. */
html.embed .topbar { display: none; }

/* ---------- Page ---------- */
.wrap { max-width: 1080px; margin: 0 auto; padding: 22px 18px 60px; }
.wrap.narrow { max-width: 680px; }

.page-head { margin-bottom: 18px; }
.page-title { font-size: 22px; font-weight: 750; letter-spacing: -.2px; }
.page-meta { color: var(--muted); font-size: 13.5px; margin-top: 3px; }

/* ---------- Cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px; margin-bottom: 18px;
}

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--navy); color: #fff; border: none; border-radius: 10px;
  padding: 13px 22px; font-size: 15px; font-weight: 650; cursor: pointer;
  font-family: inherit; text-decoration: none; transition: background .15s ease;
}
.btn-primary:hover { background: var(--navy-soft); }

/* ---------- Login ---------- */
.login-shell { min-height: calc(100vh - 62px); display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 18px;
  box-shadow: var(--shadow); padding: 34px 30px; max-width: 400px; width: 100%; text-align: center;
}
.login-card .brand-mark { width: 48px; height: 48px; font-size: 22px; margin: 0 auto 16px; }
.login-logo { width: 230px; max-width: 80%; height: auto; display: block; margin: 0 auto 18px; }
.login-card h1 { font-size: 21px; font-weight: 750; }
.login-card p { color: var(--muted); font-size: 14px; margin: 10px 0 22px; }
.btn-google {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
  background: #fff; color: #1f2937; border: 1px solid #dadce0; border-radius: 10px;
  padding: 12px 16px; font-size: 15px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.btn-google:hover { background: #f8f9fa; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.login-form { display: flex; flex-direction: column; gap: 10px; }
.login-input {
  width: 100%; padding: 12px 14px; font-size: 15px; font-family: inherit;
  border: 1.5px solid var(--border); border-radius: 10px; color: var(--ink); background: #fff;
}
.login-input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(14,35,64,.08); }
.login-submit { width: 100%; }
.login-sent {
  display: flex; align-items: flex-start; gap: 9px; text-align: left;
  background: var(--good-bg); border: 1px solid var(--good-soft); color: #1f6b41;
  border-radius: 10px; padding: 13px 15px; font-size: 14px; margin-top: 4px;
}
.login-sent-ico { font-weight: 800; }
.admin-preview { width: 100%; margin-top: 10px; color: var(--muted); border-color: var(--border); }
.admin-preview:hover { background: var(--paper); color: var(--ink); }
.login-foot { font-size: 12px; color: var(--muted); margin-top: 18px; }
.contact-card { max-width: 480px; text-align: left; }
.contact-card .login-logo { margin-left: auto; margin-right: auto; }
.contact-card h1, .contact-card > p { text-align: center; }
.contact-form { display: flex; flex-direction: column; gap: 12px; }
.contact-form .field { display: flex; flex-direction: column; gap: 5px; text-align: left; }
.field-label { font-size: 12.5px; font-weight: 650; color: var(--ink); }
.contact-form select.login-input { appearance: auto; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.admin-entry { width: 100%; margin-top: 8px; font-size: 12px; color: var(--muted); border-color: transparent; }
.admin-entry:hover { color: var(--ink); background: var(--paper); }
.finish-card { display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
.finish-card .btn-primary { width: 100%; }
.finish-note { font-size: 13.5px; color: var(--muted); margin: 0; }
.finish-error { color: var(--danger); font-size: 14px; margin: 0; }
.turnstile-host { min-height: 65px; }

/* ---------- Traffic lights ---------- */
.light { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex: none; }
.light-green { background: var(--good); box-shadow: 0 0 0 3px var(--good-bg); }
.light-amber { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-bg); }
.light-red { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-bg); }

/* ---------- Intro ---------- */
.intro-card { padding: 24px; }
.intro-lead { font-size: 15px; color: var(--ink); margin-bottom: 18px; }
.intro-areas { display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; }
.intro-area { display: flex; gap: 12px; align-items: flex-start; }
.intro-area .light { margin-top: 4px; }
.intro-area-name { font-weight: 700; font-size: 14.5px; }
.intro-area-desc { font-size: 13.5px; color: var(--muted); }
.intro-note { font-size: 13.5px; color: var(--muted); background: var(--paper); border-radius: 10px; padding: 12px 14px; margin-bottom: 20px; }
.intro-card .btn-primary { width: 100%; }
.center-link { display: block; margin: 0 auto; }

/* ---------- Quiz ---------- */
.quiz-topbar { background: var(--card); border-bottom: 1px solid var(--border); }
.quiz-progress { height: 5px; background: var(--border); }
.quiz-progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--gold-soft)); transition: width .3s ease; }
.quiz-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; margin-top: 8px; }
.quiz-count { font-size: 13px; color: var(--muted); font-weight: 600; }
.quiz-area {
  font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px;
  padding: 4px 10px; border-radius: 20px; color: var(--navy); background: var(--gold-soft);
}
.quiz-area.area-business { background: #dbe7f5; color: #1c3a63; }
.quiz-area.area-system { background: #e7e0f2; color: #4a3b6b; }
.quiz-area.area-clarity { background: var(--gold-soft); color: #6b5320; }
.quiz-question { font-size: 21px; font-weight: 700; line-height: 1.35; letter-spacing: -.2px; margin-bottom: 22px; }
.quiz-options { display: flex; flex-direction: column; gap: 11px; }
.opt {
  text-align: left; background: var(--card); border: 1.5px solid var(--border);
  border-radius: 12px; padding: 15px 17px; font-size: 15px; font-weight: 500;
  cursor: pointer; font-family: inherit; color: var(--ink); transition: border-color .12s ease, background .12s ease, transform .05s ease;
}
.opt:hover { border-color: var(--gold); background: #fffdf8; }
.opt:active { transform: scale(.995); }
.opt.selected { border-color: var(--navy); background: #f4f7fc; }
.quiz-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 22px; }
.quiz-nav .btn-ghost { color: var(--muted); border-color: var(--border); }
.quiz-nav .btn-ghost:hover { background: var(--paper); color: var(--ink); }
.quiz-exit { margin-left: auto; }

/* ---------- Results: overall ---------- */
.prog {
  display: flex; align-items: center; gap: 8px; font-size: 14px;
  border-radius: 12px; padding: 12px 15px; margin-bottom: 18px; border: 1px solid;
}
.prog .prog-ico { font-size: 12px; }
.prog.up { background: var(--good-bg); border-color: var(--good-soft); color: #1f6b41; }
.prog.down { background: var(--danger-bg); border-color: var(--danger-soft); color: #7a241a; }
.prog.flat { background: var(--paper); border-color: var(--border); color: var(--muted); }

/* ---------- Results: gauge hero ---------- */
.report { max-width: 800px; }
.hero-card { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gauge-wrap { flex: 1 1 300px; min-width: 260px; max-width: 400px; }
.gauge-svg { width: 100%; height: auto; display: block; }
.hero-right { flex: 1 1 220px; min-width: 200px; padding: 4px 6px; }
.hero-overall-label { font-size: 13px; font-weight: 750; letter-spacing: 1.2px; color: var(--navy-soft); text-transform: uppercase; }
.hero-overall-num { font-size: 62px; font-weight: 800; line-height: 1; letter-spacing: -1px; margin: 2px 0 10px; }
.overall-title { font-size: 17px; font-weight: 750; margin-bottom: 5px; color: var(--ink); }
.overall-line { font-size: 14px; color: var(--muted); }

/* score number colors (also used by hero number) */
.score-green { color: var(--good); }
.score-amber { color: var(--amber); }
.score-red { color: var(--danger); }

/* dial chips (history + admin small circles) */
.dial-green { background: linear-gradient(135deg, #2f8f5b, #3fae70); }
.dial-amber { background: linear-gradient(135deg, #c98a1b, #e0a53a); }
.dial-red { background: linear-gradient(135deg, #c0392b, #d9534f); }

/* ---------- Results: section heading ---------- */
.vb-section { font-size: 17px; font-weight: 750; color: var(--navy); letter-spacing: .2px; margin: 6px 2px 14px; }

/* ---------- Results: driver rating bars ---------- */
.driver { padding: 20px; }
.driver-bar-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.driver-bar { position: relative; flex: 1 1 auto; height: 14px; }
.driver-track {
  position: absolute; inset: 0; border-radius: 8px;
  background: linear-gradient(90deg,
    #e11900 0%, #e11900 44%,
    #f2b21c 45%, #f2b21c 69%,
    #37a24a 70%, #37a24a 100%);
}
.driver-marker {
  position: absolute; top: 50%; transform: translate(-50%, -50%);
  width: 30px; height: 30px; border-radius: 50%; background: #fff;
  border: 3px solid var(--navy); box-shadow: 0 1px 4px rgba(14,35,64,.25);
  display: flex; align-items: center; justify-content: center; z-index: 2;
}
.driver-marker-val { font-size: 12px; font-weight: 800; color: var(--navy); }
.marker-red { border-color: #e11900; }
.marker-red .driver-marker-val { color: #e11900; }
.marker-amber { border-color: #cf9412; }
.marker-amber .driver-marker-val { color: #cf9412; }
.marker-green { border-color: #37a24a; }
.marker-green .driver-marker-val { color: #37a24a; }
.driver-scoreline { display: flex; align-items: center; gap: 8px; flex: none; }
.driver-badge { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 20px; text-transform: uppercase; letter-spacing: .3px; }
.badge-green { background: var(--good-bg); color: #1f6b41; }
.badge-amber { background: var(--amber-bg); color: #8a5a10; }
.badge-red { background: var(--danger-bg); color: #7a241a; }

/* Lead signals (admin view only) */
.flag-cell { white-space: normal; line-height: 1.9; }
.flag { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.flag-hot { background: var(--danger-bg); color: #7a241a; }
.flag-warm { background: var(--amber-bg); color: #8a5a10; }
.flag-ok { background: var(--good-bg); color: #1f6b41; }
.flag-none { color: var(--muted); }
.delta { font-size: 12px; font-weight: 700; padding: 2px 6px; border-radius: 6px; }
.delta.up { color: #1f6b41; background: var(--good-bg); }
.delta.down { color: #7a241a; background: var(--danger-bg); }
.driver-name { font-size: 17px; font-weight: 750; margin-bottom: 3px; }
.driver-desc { font-size: 13.5px; color: var(--muted); margin-bottom: 14px; }
.area-finding { font-size: 14.5px; color: var(--ink); margin-bottom: 14px; }
.area-recs-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--gold); margin-bottom: 8px; }
.area-recs { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.area-recs li { position: relative; padding-left: 22px; font-size: 14px; color: var(--ink); }
.area-recs li::before { content: "→"; position: absolute; left: 0; color: var(--gold); font-weight: 700; }

/* ---------- Results: See · Steer · Scale journey ---------- */
.journey-lede { font-size: 14.5px; font-style: italic; color: var(--muted); margin: -6px 2px 16px; }
.journey-step {
  display: flex; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 14px; overflow: hidden;
}
.journey-num {
  flex: none; width: 66px; background: var(--navy); color: var(--gold-soft);
  font-size: 23px; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.journey-body { padding: 16px 18px; min-width: 0; }
.journey-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.journey-title { font-size: 18px; font-weight: 800; color: var(--gold); letter-spacing: .2px; }
.journey-tag { font-size: 15px; font-weight: 750; color: var(--navy); }
.journey-desc { font-size: 13.5px; color: var(--muted); margin-bottom: 10px; }
.journey-hook {
  font-size: 14px; color: var(--ink); background: var(--paper);
  border-left: 3px solid var(--gold); padding: 9px 13px; border-radius: 0 8px 8px 0;
}

/* ---------- Results: book a call ---------- */
.book-card { background: var(--navy); border-color: var(--navy); color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.book-title { font-size: 17px; font-weight: 750; margin-bottom: 4px; }
.book-line { font-size: 13.5px; color: #cdd8ea; max-width: 440px; }
.book-btn { background: var(--gold); color: var(--navy); font-weight: 700; flex: none; }
.book-btn:hover { background: var(--gold-soft); }

.results-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.results-actions .btn-ghost { color: var(--muted); border-color: var(--border); }
.results-actions .btn-ghost:hover { background: var(--paper); color: var(--ink); }

/* ---------- History ---------- */
.hist-row {
  width: 100%; display: flex; align-items: center; gap: 14px; justify-content: space-between;
  background: transparent; border: none; border-bottom: 1px solid var(--border);
  padding: 14px 4px; cursor: pointer; font-family: inherit; text-align: left;
}
.hist-row:last-child { border-bottom: none; }
.hist-row:hover { background: var(--paper); }
.hist-date { font-size: 14px; font-weight: 600; color: var(--ink); flex: 1; }
.hist-scores { display: flex; gap: 6px; }
.mini { font-size: 13px; font-weight: 700; width: 34px; text-align: center; padding: 3px 0; border-radius: 6px; background: var(--paper); }
.hist-overall { flex: none; }
.dial-sm {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%; color: #fff; font-weight: 800; font-size: 14px;
}

/* ---------- Admin table ---------- */
table.cf { border-collapse: collapse; width: 100%; min-width: 640px; font-size: 13px; }
table.cf th, table.cf td { padding: 11px 12px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--border); }
table.cf thead th { background: var(--navy); color: #fff; font-weight: 600; font-size: 12px; }
table.cf th.rowlabel, table.cf td.rowlabel { text-align: left; }
table.cf thead th.rowlabel { background: var(--navy); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 10px; }
.admin-table td.num { font-weight: 700; }
.admin-table .who-cell { text-align: left; }
.admin-table .who-name { font-weight: 600; color: var(--ink); }
.admin-table .who-email { font-size: 12px; color: var(--muted); }
.admin-table .date-cell { text-align: left; color: var(--muted); }
.admin-table .overall-cell { text-align: center; }
.overall-cell .dial-sm { vertical-align: middle; }
.hint { font-size: 12px; color: var(--muted); padding: 10px 2px 2px; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; font-size: 14px; }

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  .wrap { padding: 16px 12px 48px; }
  .page-title { font-size: 19px; }
  .brand-sub { display: none; }
  .brand-logo { height: 28px; }
  .brand-chip { padding: 5px 10px; }
  .who { max-width: 22vw; }
  .topbar-right { gap: 6px; }
  .btn-ghost { padding: 6px 9px; font-size: 12px; }
  .quiz-question { font-size: 19px; }
  .opt { padding: 14px 15px; font-size: 14.5px; }
  .hero-card { justify-content: center; text-align: center; }
  .hero-right { flex-basis: 100%; }
  .hero-overall-num { font-size: 54px; }
  .book-card { flex-direction: column; align-items: flex-start; }
  .book-btn { width: 100%; }
  .journey-num { width: 48px; font-size: 18px; }
  .journey-body { padding: 14px 14px; }
}
