/* PGH Cleaning Pros · VA Practice — one stylesheet matching the reference look */
@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:wght@600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #f4f3ef;
  --card: #ffffff;
  --card-soft: #f8f7f3;
  --line: #e4e2dc;
  --ink: #1d2a26;
  --muted: #5f6b66;
  --green: #1f5c4a;
  --green-dark: #17463a;
  --green-soft: #e7efe9;
  --green-tint: #eef4ef;
  --tan: #9a7b4f;
  --tan-soft: #f7f2ea;
  --amber: #b7791f;
  --badge: #eef0d6;
  --radius: 16px;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--sans); }
a { color: #2745c7; }
h1, h2, h3 { font-family: var(--serif); color: var(--ink); margin: 0 0 .5rem; line-height: 1.15; }
h1.display { font-size: clamp(2rem, 5vw, 3.1rem); font-weight: 600; }
h2 { font-size: 1.9rem; font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; font-family: var(--sans); }
p { margin: .4rem 0; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.tiny { font-size: .72rem; }
.hidden { display: none !important; }

/* Top bar */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem 2rem; border-bottom: 1px solid var(--line); background: var(--bg); flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); }
.brand-mark { color: var(--green); font-size: 1.6rem; line-height: 1; }
.brand-name { font-weight: 700; letter-spacing: .14em; font-size: .95rem; }
.brand-sub { font-size: .66rem; letter-spacing: .2em; color: var(--muted); font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.badge { background: var(--badge); border: 1px solid #dfe3b8; border-radius: 999px; padding: .45rem 1rem;
  font-size: .7rem; letter-spacing: .14em; font-weight: 700; }

/* Layout */
.wrap { max-width: 1180px; margin: 0 auto; padding-inline: 1rem; padding-block: 1.5rem 3rem; }
.hero { display: grid; grid-template-columns: 1.6fr 1fr; gap: 2rem; align-items: start; margin: 1.5rem 0 2rem; }
.hero-status { border-left: 1px solid var(--line); padding-left: 1.5rem; }
.eyebrow { font-size: .72rem; letter-spacing: .16em; font-weight: 700; color: var(--muted); text-transform: uppercase; margin: .3rem 0 .8rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem 1.8rem; margin-bottom: 1.4rem; }
.card-soft { background: var(--card-soft); border: 1px solid var(--line); border-radius: 12px; padding: 1.2rem 1.4rem; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .6rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.row { display: flex; gap: .8rem; align-items: end; flex-wrap: wrap; }
.stack > * + * { margin-top: .8rem; }
hr, .divider { border: 0; border-top: 1px solid var(--line); margin: 1.2rem 0; }

/* Controls */
.controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto auto; gap: 1rem; align-items: end; }
label, .label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .35rem; }
input[type=text], input[type=email], input[type=password], input[type=number], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--card-soft); border: 1px solid var(--line);
  border-radius: 10px; padding: .7rem .85rem; }
select { font-weight: 600; }
textarea { min-height: 110px; resize: vertical; font-size: .92rem; }
textarea.code { font-family: ui-monospace, Consolas, monospace; font-size: .82rem; min-height: 260px; }
.help { font-size: .78rem; color: var(--muted); margin-top: .25rem; }
.btn { font: inherit; font-weight: 600; border-radius: 10px; padding: .72rem 1.2rem; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); cursor: pointer; white-space: nowrap; }
.btn:hover:not(:disabled) { border-color: #c9c6bd; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--green-dark); }
.btn-primary:disabled { background: #9db8ae; border-color: #9db8ae; opacity: 1; }
.btn-sm { padding: .45rem .8rem; font-size: .85rem; }
.btn-link { background: none; border: 0; padding: 0; color: #2745c7; text-decoration: underline; cursor: pointer; font: inherit; }

/* Conversation */
.convo { max-height: 380px; overflow-y: auto; padding-right: .5rem; }
.turn { padding: .7rem 0; border-bottom: 1px solid var(--line); }
.turn:last-child { border-bottom: 0; }
.turn-meta { font-size: .72rem; font-weight: 600; color: var(--muted); }
.turn-text { margin-top: .15rem; }
.turn.ai .turn-text { color: var(--green); }
.turn .tag { display: inline-block; margin-left: .4rem; }
.empty { color: var(--muted); padding: 1.4rem 0; }

/* Pills & status */
.pill { display: inline-block; border: 1px solid #b9b6ad; border-radius: 999px; padding: .2rem .7rem; font-size: .75rem; background: #fff; }
.pill-green { background: var(--green-soft); border-color: #bcd2c5; color: var(--green-dark); }
.st-effective { color: var(--green); font-weight: 700; }
.st-partial { color: var(--amber); font-weight: 700; }
.st-missed, .st-na { color: var(--muted); font-weight: 700; }

/* Score */
.review-grid { display: grid; grid-template-columns: 220px 1fr; gap: 2rem; align-items: center; margin: 1rem 0; }
.score-big { font-family: var(--sans); font-weight: 700; font-size: 4.2rem; color: var(--green); line-height: 1; }
.score-big small { font-size: 1rem; color: var(--muted); font-weight: 500; }
.bar-row { margin-bottom: 1rem; }
.bar-label { font-weight: 600; font-size: .92rem; margin-bottom: .35rem; }
.bar { height: 7px; background: #e6e5e0; border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--green); border-radius: 999px; }

/* Coaching blocks */
.icon-h { display: flex; align-items: center; gap: .5rem; }
.loop-card { border: 1.5px solid var(--green); border-radius: 12px; padding: 1.4rem; background: var(--green-tint); }
.gap-callout { background: var(--tan-soft); border-left: 4px solid var(--tan); padding: 1rem 1.2rem; margin: 1rem 0; border-radius: 4px; }
.finding { background: var(--tan-soft); border-left: 4px solid var(--tan); padding: 1rem 1.2rem; margin: .8rem 0; border-radius: 4px; }
.finding.minor { border-left-color: #c8b99f; }
.turning { border-left: 5px solid var(--green); }
.try-card { background: var(--green-tint); border-color: #b9d0c3; }
.quote { font-style: normal; }
ol.steps { padding-left: 1.2rem; }
ol.steps > li { padding: .6rem 0; border-bottom: 1px solid var(--line); }

details { margin: .6rem 0; }
details > summary { cursor: pointer; font-weight: 700; list-style: none; }
details > summary::before { content: '▸ '; }
details[open] > summary::before { content: '▾ '; }
details > summary::-webkit-details-marker { display: none; }
details .details-body { padding: .6rem 0 .2rem 1rem; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; background: #e8eee6; font-weight: 700; padding: .8rem 1rem; font-size: .92rem; }
td { padding: .9rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }

/* Tabs (owner) */
.tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.tab { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: .5rem 1rem; font-weight: 600; cursor: pointer; }
.tab.active { background: var(--green); color: #fff; border-color: var(--green); }

/* Messages */
.notice { padding: .8rem 1rem; border-radius: 10px; background: var(--tan-soft); border: 1px solid #e6d9c3; font-size: .9rem; }
.error { color: #a1291f; }
.ok { color: var(--green); }

.footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 2rem 1rem; }

/* Login */
.auth-card { max-width: 420px; margin: 8vh auto; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero-status { border-left: 0; padding-left: 0; }
  .controls { grid-template-columns: 1fr 1fr; }
  .review-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .grid-2, .controls { grid-template-columns: 1fr; }
  .topbar { padding: 1rem; }
  .card { padding: 1.2rem; }
}
