/* Agent Monday brand, taken from the coaching deck theme:
   Montserrat headings, Nunito Sans body, charcoal + lavender grounds, purple and teal accents. */
:root {
  --purple: #8F1ACB;
  --purple-dark: #7614AA;
  --purple-soft: #C08BF0;
  --purple-tint: #F1E4FA;
  --teal: #91DFD5;
  --teal-deep: #1F8C7E;       /* teal dark enough for text on light grounds */
  --teal-tint: #E3F7F4;
  --charcoal: #2E2D31;        /* ink, and the dark slide background */
  --charcoal-2: #3A393F;      /* raised surfaces on charcoal */
  --lavender: #EAE4F1;        /* light slide background */
  --line: #D7D2DE;
  --line-soft: #ECE8F1;
  --muted: #6B6873;
  --muted-on-dark: #B9B5C2;
  --bg: var(--lavender);
  --card: #FFFFFF;
  --ok: #1B7F6E;
  --warn: #B26A00;
  --bad: #B3261E;
  --radius: 16px;
  --head: "Montserrat", "Segoe UI", Arial, sans-serif;
  --body: "Nunito Sans", "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--charcoal);
  font: 16px/1.5 var(--body);
}
a { color: var(--purple); }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--head); line-height: 1.15; margin: 0; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.center { text-align: center; }
.up { color: var(--ok); } .down { color: var(--bad); }

/* Small spaced capitals used above every heading in the deck */
.eyebrow { font-family: var(--head); font-weight: 700; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--purple); }
.on-dark .eyebrow, .eyebrow.teal { color: var(--teal); }

/* ---------- top bar + logo ---------- */
.topbar, .brandbar { background: var(--charcoal); color: #fff; }
.topbar .inner, .brandbar .inner { max-width: 1100px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 12px; }
.topbar .inner { max-width: 640px; }
.logo { display: inline-flex; align-items: center; gap: 9px; color: #fff; text-decoration: none; font-family: var(--head); font-weight: 700; font-size: 16px; letter-spacing: -.01em; white-space: nowrap; }
.logo svg { width: 22px; height: 28px; flex: none; }
.spacer { flex: 1; }
.topbar .eyebrow { font-size: 11px; }

/* ---------- agent pages ---------- */
.wrap { max-width: 640px; margin: 0 auto; padding: 0 16px; }
.hero { background: var(--charcoal); color: #fff; padding: 22px 0 26px; }
.hero h1 { font-size: 34px; font-weight: 700; margin-top: 8px; letter-spacing: -.01em; }
.hero .tagline { font-family: var(--head); font-weight: 600; color: var(--teal); font-size: 17px; margin: 8px 0 0; }
.hero .meta { color: var(--muted-on-dark); font-size: 14px; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.body { padding-top: 18px; padding-bottom: 150px; }

.pill { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; font-family: var(--head); }
.pill.ok { background: var(--teal-tint); color: var(--ok); }
.pill.warn { background: #FFF1DC; color: var(--warn); }
.pill.bad { background: #FDECEA; color: var(--bad); }
.pill.muted { background: #ECE8F1; color: var(--muted); }
.on-dark .pill.muted { background: var(--charcoal-2); color: var(--muted-on-dark); }
.on-dark .pill.ok { background: rgba(145,223,213,.16); color: var(--teal); }
.on-dark .pill.warn { background: rgba(255,190,90,.16); color: #FFC56E; }

/* Target progress, on the dark hero and in the bottom bar */
.target-card { margin-top: 20px; background: var(--charcoal-2); border-radius: 14px; padding: 14px 16px; }
.target-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.target-top .score { font-family: var(--head); font-weight: 800; font-size: 26px; color: #fff; }
.target-top .score small { font-weight: 600; font-size: 15px; color: var(--muted-on-dark); }
.target-note { font-size: 14px; color: var(--muted-on-dark); margin-top: 8px; }
.target-note b { color: var(--teal); font-weight: 700; }
.track { height: 10px; border-radius: 99px; background: rgba(255,255,255,.12); overflow: hidden; margin-top: 10px; }
.track > span { display: block; height: 100%; border-radius: 99px; background: var(--teal); width: 0; transition: width .25s ease; }
.track.hit > span { background: linear-gradient(90deg, var(--teal), #B8F0E8); }

/* Cards */
.card { background: var(--card); border-radius: var(--radius); margin-top: 14px; overflow: hidden; box-shadow: 0 1px 2px rgba(46,45,49,.04); }
.card > h2, .card-head { font-family: var(--head); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--purple); padding: 16px 16px 6px; }
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 10px; }
.card-head .sub { letter-spacing: 0; text-transform: none; color: var(--muted); font-weight: 600; font-size: 13px; white-space: nowrap; }
.card .pad { padding: 14px 16px; }
.card-title { font-family: var(--head); font-weight: 700; font-size: 20px; padding: 0 16px; margin-top: 2px; }

.row { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-top: 1px solid var(--line-soft); }
.card > h2 + .row, .card-head + .row { border-top: 0; }
.row .what { flex: 1; min-width: 0; }
.row .label { font-weight: 700; font-size: 16px; }
.row .hint { font-size: 13px; color: var(--muted); line-height: 1.4; }
.row .meta { font-size: 12px; color: #9C98A5; margin-top: 3px; }
.row .meta b { color: var(--muted); font-weight: 700; }
.row.has-value .label { color: var(--purple); }

.stepper { display: flex; align-items: center; flex: none; gap: 6px; }
.stepper button { width: 40px; height: 40px; border: 0; border-radius: 12px; background: var(--purple-tint); font-size: 22px; line-height: 1; cursor: pointer; color: var(--purple); font-weight: 700; touch-action: manipulation; }
.stepper button:active { background: var(--purple-soft); color: #fff; }
.stepper input { width: 56px; height: 44px; border: 1.5px solid var(--line); border-radius: 12px; text-align: center; font-family: var(--head); font-weight: 700; font-size: 17px; background: #fff; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-tint); }
.row.has-value .stepper input { border-color: var(--purple); color: var(--purple); }

.other-row .other-label { width: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; }
.icon-btn { border: 0; background: none; color: var(--muted); font-size: 22px; cursor: pointer; padding: 4px 6px; }
.link-btn { background: none; border: 0; color: var(--purple); font-weight: 700; cursor: pointer; padding: 12px 16px 16px; font-family: var(--head); font-size: 14px; }

textarea { width: 100%; min-height: 110px; padding: 12px; border: 1.5px solid var(--line); border-radius: 12px; resize: vertical; background: #fff; }
textarea:focus, input:focus, select:focus { outline: 2px solid var(--purple); outline-offset: 0; }
.stepper input:focus, .other-label:focus, textarea:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-tint); }

/* Sticky submit bar */
.submitbar { position: fixed; left: 0; right: 0; bottom: 0; background: var(--charcoal); color: #fff; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 20px rgba(46,45,49,.18); z-index: 5; }
.submitbar .inner { max-width: 640px; margin: 0 auto; display: flex; align-items: center; gap: 14px; }
.submitbar .total { flex: 1; min-width: 0; }
.submitbar .total .line { font-family: var(--head); font-size: 14px; color: var(--muted-on-dark); white-space: nowrap; }
.submitbar .total .line b { font-size: 22px; color: #fff; font-weight: 800; }
.submitbar .track { height: 6px; margin-top: 6px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 12px; padding: 13px 20px; font-family: var(--head); font-weight: 700; font-size: 15px; cursor: pointer; background: var(--purple); color: #fff; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--purple-dark); }
.btn:disabled { opacity: .6; cursor: default; }
.btn.secondary { background: #fff; color: var(--purple); box-shadow: inset 0 0 0 1.5px var(--purple); }
.btn.secondary:hover { background: var(--purple-tint); }
.btn.white { background: #fff; color: var(--purple); }
.btn.white:hover { background: var(--purple-tint); }
.btn.small { padding: 7px 12px; font-size: 13px; border-radius: 9px; }
.btn.ghost { background: transparent; color: var(--charcoal); box-shadow: inset 0 0 0 1px var(--line); }
.btn.ghost:hover { background: #F4F1F8; }
.btn.danger { background: #fff; color: var(--bad); box-shadow: inset 0 0 0 1px #F0C9C5; }

.privacy { font-size: 13px; color: var(--muted); margin: 22px 0 0; line-height: 1.5; }
.site-foot { font-family: var(--head); font-weight: 700; color: var(--purple); font-size: 14px; margin-top: 18px; }
.error { background: #FDECEA; color: var(--bad); padding: 12px 14px; border-radius: 12px; margin-top: 14px; }
.notice { background: var(--purple-tint); padding: 13px 15px; border-radius: 12px; margin-top: 14px; font-size: 15px; }
.inline-link { background: none; border: 0; padding: 0; color: var(--purple); font-weight: 700; cursor: pointer; text-decoration: underline; }
.loading { padding: 60px 0; text-align: center; color: var(--muted); }

/* ---------- score screen ---------- */
.result { text-align: center; }
.result h1 { font-size: 30px; }
.ring { position: relative; width: 196px; height: 196px; margin: 22px auto 0; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .inside { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring .big { font-family: var(--head); font-weight: 800; font-size: 54px; line-height: 1; color: #fff; }
.ring .of { font-size: 14px; color: var(--muted-on-dark); margin-top: 6px; }
.verdict { font-family: var(--head); font-weight: 600; color: var(--teal); font-size: 17px; margin: 18px auto 0; max-width: 420px; line-height: 1.35; }
.verdict + .verdict { color: #fff; font-size: 15px; margin-top: 6px; font-weight: 500; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 22px; }
.stats > div { background: var(--charcoal-2); border-radius: 12px; padding: 12px 6px; text-align: center; }
.stats b { display: block; font-family: var(--head); font-size: 22px; font-weight: 700; color: #fff; }
.stats b.up { color: var(--teal); } .stats b.down { color: #FF9C8F; }
.stats span { font-size: 11px; color: var(--muted-on-dark); text-transform: uppercase; letter-spacing: .08em; font-family: var(--head); font-weight: 600; }
.chart { width: 100%; height: auto; display: block; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.legend .dash { display: inline-block; width: 16px; border-top: 2px dashed var(--charcoal); margin-right: 5px; vertical-align: 3px; }
.legend .tick { display: inline-block; width: 2px; height: 12px; background: var(--charcoal); margin-right: 5px; vertical-align: -2px; }
.grow + .grow { margin-top: 14px; }
.gtop { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; margin-bottom: 6px; }
.gtop b { font-family: var(--head); }
.gtop span { color: var(--muted); }
.gbar { position: relative; height: 10px; border-radius: 99px; background: var(--line-soft); }
.gbar .fill { height: 100%; border-radius: 99px; background: var(--purple); }
.gbar .avg { position: absolute; top: -3px; width: 2px; height: 16px; background: var(--charcoal); }
.changes + .changes { margin-top: 16px; }
.ctitle { font-family: var(--head); font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.crow { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line-soft); font-size: 15px; }
.crow .muted { white-space: nowrap; }
.card.purple { background: var(--purple); color: #fff; }
.card.purple .eyebrow { color: #E5C8FA; }
.card.purple h3 { font-size: 21px; font-weight: 700; margin: 6px 0 10px; }
.card.purple p { margin: 0 0 10px; color: #F6ECFD; }
.card.purple b { color: #fff; }
.card.purple .btn { margin-top: 6px; }

/* ---------- admin ---------- */
.admin .wrap { max-width: 1100px; padding: 0 16px 60px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; }
.tabs button { background: none; border: 0; color: var(--muted-on-dark); padding: 8px 12px; border-radius: 9px; cursor: pointer; font-weight: 700; font-family: var(--head); font-size: 14px; white-space: nowrap; }
.tabs button.active { background: var(--charcoal-2); color: #fff; box-shadow: inset 0 -2px 0 var(--teal); }
.brandbar .btn.secondary { box-shadow: none; }
.brandbar .btn.ghost { color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.3); }
.brandbar .btn.ghost:hover { background: var(--charcoal-2); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 20px; }
.toolbar h1 { font-size: 26px; flex: 1; min-width: 200px; }
.toolbar select, .field input, .field select { padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.kpi { background: #fff; border-radius: var(--radius); padding: 14px 16px; font-family: var(--head); font-weight: 600; color: var(--muted); font-size: 14px; }
.kpi b { font-size: 30px; display: block; font-weight: 800; }
.kpi.ok b { color: var(--ok); } .kpi.warn b { color: var(--warn); } .kpi.bad b { color: var(--bad); }
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; font-family: var(--head); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 12px; border-bottom: 2px solid var(--teal); white-space: nowrap; }
table.data td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data tr.inactive td { color: #AAA6B2; }
table.data input[type=text], table.data input[type=number] { width: 100%; min-width: 60px; padding: 6px 8px; border: 1.5px solid var(--line); border-radius: 8px; }
table.data input.w-sm { max-width: 84px; }
.notes-text { white-space: pre-wrap; font-size: 14px; max-width: 420px; }
.detail { background: #FAF8FC; font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 2px 9px; font-size: 12px; }
.mover-up { color: var(--ok); } .mover-down { color: var(--bad); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; align-items: end; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; font-weight: 600; }
.field input, .field select { width: 100%; }
.login { max-width: 360px; margin: 60px auto; }
.login h1 { font-size: 22px; margin-bottom: 12px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--charcoal); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 10; }
iframe.preview { width: 100%; height: 70vh; border: 0; background: #F5F3F7; }
.admin .chart { height: 160px; }

@media (max-width: 560px) {
  .kpis { gap: 8px; }
  .kpi { padding: 10px; }
  .kpi b { font-size: 22px; }
  .row { gap: 8px; }
  .stepper { gap: 4px; }
  .stepper button { width: 36px; }
  .stepper input { width: 50px; }
  .other-row { flex-wrap: wrap; }
  .other-row .what { flex-basis: 100%; }
  .other-row .stepper { margin-left: auto; }
  .hero h1 { font-size: 30px; }
}
