/* ============ Brand tokens (fresh green / lime fitness style) ============ */
:root {
  --bg: #f2f7ec;
  --card: #ffffff;
  --soft: #eef5e5;        /* pale green tiles */
  --soft-2: #e3efd6;
  --forest: #0f5a3a;      /* deep green hero */
  --forest-2: #0a432b;
  --lime: #cdf25c;        /* accent */
  --lime-2: #b9e33d;
  --lime-ink: #213a05;
  --ink: #14261b;
  --muted: #7d8c82;
  --line: #e2ebd9;
  --red: #c4432f; --red-soft: #fdebe6;
  --amber: #a46a00; --amber-soft: #fdf2d6;
  --green: #1f7a4a; --green-soft: #e1f3e6;
  --radius: 24px;
  --shadow: 0 10px 30px -12px rgba(15, 90, 58, .18);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font: 15px/1.5 "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(120% 60% at 0% 0%, #e2f3cf 0%, transparent 60%), radial-gradient(90% 50% at 100% 0%, #eaf6e0 0%, transparent 60%), var(--bg);
  background-attachment: fixed; min-height: 100vh; min-height: 100dvh;
}
a { color: var(--forest); }
.wrap { max-width: 480px; margin: 0 auto; padding: calc(18px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) calc(110px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.wrap.wide { max-width: 1180px; padding-bottom: 60px; }
h1 { font-size: 22px; font-weight: 600; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 17px; font-weight: 600; margin: 0 0 12px; }
h3 { font-size: 15px; font-weight: 600; margin: 0 0 8px; }
.muted { color: var(--muted); } .small { font-size: 12.5px; }
.hidden { display: none !important; }

/* cards */
.card { background: var(--card); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; box-shadow: var(--shadow); }
.card.soft { background: var(--soft); box-shadow: none; }
.section-title { display: flex; justify-content: space-between; align-items: center; margin: 22px 2px 12px; }
.section-title h2 { margin: 0; }

/* header */
.top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; gap: 10px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--forest); font-size: 14px; }
.brand::before { content: ""; width: 22px; height: 22px; border-radius: 8px; background: var(--lime);
  background-image: radial-gradient(circle at 70% 30%, var(--forest) 0 3px, transparent 4px); }
.hello { display: flex; align-items: center; gap: 12px; }
.avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--lime); color: var(--lime-ink); display: grid; place-items: center;
  font-weight: 700; font-size: 17px; border: 3px solid #fff; box-shadow: var(--shadow); flex: 0 0 auto; }
.hello .muted { font-size: 12.5px; line-height: 1.2; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; display: grid; place-items: center; box-shadow: var(--shadow); cursor: pointer; color: var(--ink); padding: 0; }
.icon-btn svg { width: 20px; height: 20px; }

/* forms */
label { display: block; font-size: 12.5px; font-weight: 500; color: var(--muted); margin: 14px 0 6px; }
input, select, textarea { width: 100%; padding: 13px 14px; border: 1.5px solid transparent; border-radius: 16px; font: inherit; background: var(--soft); color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--forest); background: #fff; }
input[type=file] { padding: 10px; font-size: 13px; }
textarea { min-height: 90px; resize: vertical; }
.row { display: flex; gap: 10px; } .row > * { flex: 1; min-width: 0; }
.err { color: var(--red); font-size: 13px; margin-top: 10px; min-height: 1em; }

/* buttons */
button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 20px; border: 0; border-radius: 999px;
  background: var(--forest); color: #fff; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform .1s, filter .15s; }
button:active, .btn:active { transform: scale(.97); }
button svg, .btn svg { width: 18px; height: 18px; flex: 0 0 auto; }
button.lime, .btn.lime { background: var(--lime); color: var(--lime-ink); }
button.ghost, .btn.ghost { background: var(--soft); color: var(--forest); }
button.small { padding: 7px 14px; font-size: 13px; }
button:disabled { opacity: .5; cursor: default; }
.full { width: 100%; }

/* chips / pills */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 9px 15px; border: 0; border-radius: 999px; background: var(--soft); color: var(--ink); font-weight: 500; font-size: 13.5px; }
.chip.on { background: var(--lime); color: var(--lime-ink); }
.chip.flag.on { background: var(--red-soft); color: var(--red); box-shadow: inset 0 0 0 1.5px var(--red); }
.scale { display: flex; gap: 6px; } .scale .chip { flex: 1; padding: 10px 0; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.pill.lime { background: var(--lime); color: var(--lime-ink); }
.pill.glass { background: rgba(255,255,255,.14); color: #e8f5d8; }
.pill.soft { background: var(--soft); color: var(--forest); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.badge.red { background: var(--red-soft); color: var(--red); } .badge.amber { background: var(--amber-soft); color: var(--amber); }
.badge.green { background: var(--lime); color: var(--lime-ink); } .badge.grey { background: var(--soft); color: var(--muted); }

/* banners */
.banner { padding: 13px 16px; border-radius: 18px; margin-bottom: 14px; font-size: 13.5px; }
.banner.warn { background: var(--red-soft); color: var(--red); } .banner.ok { background: var(--green-soft); color: var(--green); }
.banner.due { background: var(--amber-soft); color: var(--amber); }
.demo-bar { background: var(--forest); color: #e8f5d8; text-align: center; font-size: 12.5px; padding: 8px 12px; }
.demo-bar a { color: var(--lime); font-weight: 600; }

/* ============ Client: hero card ============ */
.hero { position: relative; overflow: hidden; background: linear-gradient(140deg, #13744a 0%, var(--forest) 45%, var(--forest-2) 100%);
  color: #fff; border-radius: 28px; padding: 20px; box-shadow: 0 18px 40px -16px rgba(10, 67, 43, .55); margin-bottom: 16px; }
.hero::after { content: ""; position: absolute; right: -60px; bottom: -80px; width: 220px; height: 220px; border-radius: 50%; background: rgba(205, 242, 92, .08); }
.hero-grid { display: flex; justify-content: space-between; align-items: center; gap: 10px; position: relative; z-index: 1; }
.hero h1 { font-size: 24px; margin: 10px 0 4px; }
.hero .meta { display: flex; gap: 12px; color: #bfdcc9; font-size: 12px; margin-bottom: 16px; }
.hero .meta span { display: inline-flex; align-items: center; gap: 5px; }
.hero .meta svg { width: 13px; height: 13px; }
.ring { width: 128px; height: 128px; flex: 0 0 auto; }
.ring text { font-family: inherit; }

/* stat tiles */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.tile { background: var(--card); border-radius: 22px; padding: 15px; box-shadow: var(--shadow); }
.tile .tile-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.tile .ico { width: 30px; height: 30px; border-radius: 10px; background: var(--soft); display: grid; place-items: center; color: var(--forest); }
.tile .ico svg { width: 16px; height: 16px; }
.tile b { font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.tile b small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.tile .lbl { font-size: 12px; color: var(--muted); }
.tile.wide { grid-column: span 2; display: flex; align-items: center; gap: 14px; }
.bar { height: 8px; border-radius: 99px; background: var(--soft); overflow: hidden; flex: 1; }
.bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--lime-2), var(--lime)); }

/* chart */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .area-line { fill: none; stroke: var(--lime-2); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: #fff; stroke: var(--lime-2); stroke-width: 2; }
.chart .goal { stroke: var(--forest); stroke-dasharray: 4 5; stroke-width: 1.2; opacity: .45; }
.chart .lbl { font-size: 10px; fill: var(--muted); font-family: inherit; }
.chart .lbl.on { fill: var(--ink); font-weight: 600; }
.chart .tip { fill: var(--forest); }
.chart .tip-text { fill: #fff; font-size: 11px; font-weight: 600; font-family: inherit; }

/* history months */
.month { border-radius: 22px; padding: 2px 16px; margin-bottom: 10px; background: var(--card); box-shadow: var(--shadow); }
.month-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 15px 0; cursor: pointer; list-style: none; -webkit-tap-highlight-color: transparent; }
.month-head::-webkit-details-marker { display: none; }
.month-head b { display: inline-flex; align-items: center; gap: 12px; font-weight: 600; }
.month-head b::before { content: ""; width: 30px; height: 30px; flex: 0 0 auto; border-radius: 10px; background: var(--soft)
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f5a3a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E") center / 14px no-repeat;
  transition: transform .2s; }
.month[open] .month-head b::before { transform: rotate(90deg); background-color: var(--lime); }
.month[open] .month-head { border-bottom: 1px solid var(--line); }
.month-head .small { color: var(--muted); text-align: right; }
.hist { border-top: 1px solid var(--line); padding: 13px 0; }
.month .hist:nth-child(2) { border-top: 0; }
.hist-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.hist-row b { font-weight: 600; }
.hist-row button { flex: 0 0 auto; }

/* profile list */
.list-row { display: flex; justify-content: space-between; padding: 13px 0; border-top: 1px solid var(--line); font-size: 14px; }
.list-row:first-child { border-top: 0; }
.list-row span:first-child { color: var(--muted); }

/* bottom tab bar */
.tabbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 480px; background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-radius: 26px 26px 0 0; box-shadow: 0 -8px 30px -12px rgba(15,90,58,.2);
  display: flex; padding: 0 8px calc(10px + env(safe-area-inset-bottom)); z-index: 5; }
.tabbar button { flex: 1; flex-direction: column; gap: 3px; background: none; color: var(--muted); font-size: 11px; font-weight: 500; padding: 12px 0 4px; border-radius: 0; position: relative; }
.tabbar button svg { width: 22px; height: 22px; }
.tabbar button.on { color: var(--forest); font-weight: 600; }
.tabbar button.on::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 4px 4px; background: var(--forest); }

/* login */
.login-hero { background: linear-gradient(150deg, #13744a, var(--forest-2)); color: #fff; border-radius: 0 0 36px 36px; padding: 50px 24px 70px; text-align: center; margin: -18px -16px 0; }
.login-hero .brand { color: var(--lime); } .login-hero .brand::before { background-color: var(--lime); }
.login-hero h1 { font-size: 26px; margin-top: 18px; } .login-hero p { color: #bfdcc9; margin: 6px 0 0; }
.login-card { margin-top: -44px; position: relative; }

/* ============ Admin ============ */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--card); border-radius: 22px; padding: 16px 18px; cursor: pointer; box-shadow: var(--shadow); transition: transform .12s; }
@media (hover: hover) and (pointer: fine) { .kpi:hover { transform: translateY(-2px); } tbody tr:hover { background: var(--soft); } }
.kpi b { display: block; font-size: 30px; font-weight: 600; letter-spacing: -.02em; }
.kpi span { font-size: 12.5px; color: var(--muted); }
.kpi.active { background: linear-gradient(140deg, #13744a, var(--forest-2)); }
.kpi.active b { color: var(--lime); } .kpi.active span { color: #cfe6d6; }
.toolbar { display: flex; gap: 10px; margin-bottom: 14px; } .toolbar input { flex: 1; background: #fff; box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 13px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
th { font-size: 11.5px; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: .05em; }
tbody tr { cursor: pointer; } tbody tr:last-child td { border-bottom: 0; }
.tablecard { padding: 4px 0; overflow-x: auto; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--soft); border-radius: 18px; padding: 12px 8px; text-align: center; }
.stat b { display: block; font-size: 20px; font-weight: 600; } .stat span { font-size: 11.5px; color: var(--muted); }
.checkin { background: var(--soft); border-radius: 20px; padding: 16px; margin-bottom: 12px; }
.checkin.unrev { background: #fff; box-shadow: inset 0 0 0 2px var(--lime-2); }
.checkin dl { display: grid; grid-template-columns: max-content 1fr; gap: 5px 14px; margin: 10px 0; font-size: 13.5px; }
.checkin dt { color: var(--muted); } .checkin dd { margin: 0; }
.checkin input { background: #fff; }
.note { background: #fbfde9; border-left: 3px solid var(--lime-2); border-radius: 12px; padding: 9px 12px; margin-top: 8px; font-size: 13.5px; }
.note .muted { font-size: 11.5px; }
.photo { max-width: 220px; border-radius: 14px; display: block; margin-top: 6px; }
.modal { position: fixed; inset: 0; background: rgba(10, 40, 25, .35); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 10; }
.modal .card { width: 100%; max-width: 440px; max-height: 90vh; overflow: auto; }
.two { display: grid; grid-template-columns: 1fr 1.4fr; gap: 16px; align-items: start; }
.admin-hero { margin-bottom: 14px; }
@media (max-width: 760px) {
  .kpis { grid-template-columns: repeat(2, 1fr); } .two { grid-template-columns: 1fr; }
  .hide-m { display: none; }
}
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; }
.kpi.active .dot { box-shadow: 0 0 0 2px rgba(255,255,255,.5); }
.hero .stat { background: rgba(255,255,255,.1); } .hero .stat b { color: #fff; } .hero .stat span { color: #bfdcc9; }
.hero .avatar { border-color: rgba(255,255,255,.25); box-shadow: none; }
/* two-path check-in picker */
.mode-pick { display: grid; gap: 12px; margin-bottom: 16px; }
.mode { display: flex; align-items: center; gap: 14px; text-align: left; white-space: normal; background: var(--card); color: var(--ink);
  border-radius: 22px; padding: 16px; box-shadow: var(--shadow); font-weight: 400; }
.mode b { display: block; font-weight: 600; font-size: 15px; } .mode .small { color: var(--muted); }
.mode-ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-weight: 700; font-size: 20px; flex: 0 0 auto; }
.mode-ico.good { background: var(--lime); color: var(--lime-ink); }
.mode-ico.issue { background: var(--amber-soft); color: var(--amber); }
.mode.on[data-mode="good"] { box-shadow: inset 0 0 0 2px var(--lime-2), var(--shadow); }
.mode.on[data-mode="issue"] { box-shadow: inset 0 0 0 2px #e3a21a, var(--shadow); }
.mode-pick:has(.mode.on) .mode:not(.on) { opacity: .55; }

/* ============ Mobile polish ============ */
html { -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; }
input, select, textarea { font-size: 16px; }             /* stops iOS zooming into fields */
button, a, .chip, .mode, summary, tbody tr { touch-action: manipulation; }
button, .chip, .mode, .tabbar, summary, .kpi { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.tabbar button:active { transform: scale(.92); }
.kpi:active, .mode:active, tbody tr:active { transform: scale(.98); }
.hero .meta { flex-wrap: wrap; gap: 6px 12px; } .hero .meta span { white-space: nowrap; }
.hero-grid > div:first-child { min-width: 0; }

@media (max-width: 380px) {
  .ring { width: 104px; height: 104px; }
  .hero h1 { font-size: 21px; }
  .hero { padding: 18px; }
  .tile b { font-size: 21px; }
  .tabbar button { font-size: 10.5px; }
}

@media (max-width: 760px) {
  /* admin header + toolbar */
  .wrap.wide .top { flex-wrap: wrap; }
  .wrap.wide .top h1 { white-space: nowrap; font-size: 20px; }
  .wrap.wide .top > .row { flex: 1 1 auto !important; justify-content: flex-end; flex-wrap: wrap; }
  .toolbar { flex-direction: column; }
  .toolbar button { width: 100%; }
  .kpi { padding: 14px; } .kpi b { font-size: 26px; }

  /* client table becomes a card list */
  .tablecard { padding: 0; overflow: hidden; }
  .tablecard thead { display: none; }
  .tablecard tbody tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .tablecard tbody tr:last-child { border-bottom: 0; }
  .tablecard td { padding: 0; border: 0; min-width: 0; }
  .tablecard td:nth-child(1) { grid-column: 1; grid-row: 1; }
  .tablecard td:nth-child(4) { grid-column: 2; grid-row: 1; text-align: right; font-weight: 600; font-size: 16px; }
  .tablecard td:nth-child(4)::after { content: " kg"; font-size: 11px; font-weight: 500; color: var(--muted); }
  .tablecard td:nth-child(3) { grid-column: 1 / -1; grid-row: 2; font-size: 12.5px; color: var(--muted); }
  .tablecard td:nth-child(3) div { display: inline; } .tablecard td:nth-child(3) div::before { content: " · "; }
  .tablecard td:nth-child(6) { grid-column: 1 / -1; grid-row: 3; margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; }

  /* modal becomes a bottom sheet */
  .modal { align-items: flex-end; padding: 0; }
  .modal .card { max-width: none; border-radius: 28px 28px 0 0; margin: 0; max-height: 92dvh;
    padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)); overscroll-behavior: contain; }
  .modal .card::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: -6px auto 12px; }

  .checkin dl { grid-template-columns: 1fr; gap: 0; } .checkin dt { margin-top: 6px; font-size: 12px; }
}

/* advice: consultant reply visible to the client */
.advice { background: var(--forest); color: #eaf5e3; border-radius: 16px; padding: 12px 14px; margin-top: 10px; font-size: 13.5px; line-height: 1.55; }
.advice-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--lime); font-size: 12px; font-weight: 600; margin-bottom: 4px; }
.advice-head button { background: rgba(255,255,255,.12); color: #fff; }
.advice.client { margin: 10px 0 2px; }
.advice.client b { display: block; color: var(--lime); font-size: 12px; margin-bottom: 2px; }
.advice-box { background: #fff; border-radius: 16px; padding: 4px 12px 12px; margin-top: 10px; box-shadow: inset 0 0 0 1.5px var(--lime-2); }
.advice-box label { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.checkin .advice-box textarea { min-height: 76px; }
.advice-card { background: #fff; border-radius: 24px; padding: 16px; margin-bottom: 14px; box-shadow: inset 0 0 0 2px var(--lime), var(--shadow); }
.advice-card-head { display: flex; gap: 12px; align-items: center; }
.advice-card-head .ico { width: 40px; height: 40px; border-radius: 13px; background: var(--forest); color: var(--lime); display: grid; place-items: center; flex: 0 0 auto; }
.advice-card-head .ico svg { width: 20px; height: 20px; }
.advice-card-head b { font-weight: 600; } .advice-card-head .small { color: var(--muted); }
.advice-card p { margin: 10px 0 0; font-size: 14px; line-height: 1.6; }
/* side-effect bubbles: each row stretches to meet both edges */
/* side-effects dropdown (tick list) */
.dd-btn { display: flex; align-items: center; justify-content: space-between; gap: 10px; list-style: none; cursor: pointer;
  background: var(--soft); border-radius: 16px; padding: 13px 14px; font-size: 16px; color: var(--muted); -webkit-tap-highlight-color: transparent; }
.dd-btn::-webkit-details-marker { display: none; }
.dd-btn span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-btn::after { content: ""; width: 8px; height: 8px; flex: 0 0 auto; border-right: 2px solid var(--forest); border-bottom: 2px solid var(--forest);
  transform: translateY(-2px) rotate(45deg); transition: transform .15s; }
.dd[open] .dd-btn { box-shadow: inset 0 0 0 1.5px var(--forest); background: #fff; }
.dd[open] .dd-btn::after { transform: translateY(2px) rotate(-135deg); }
.dd.has-value .dd-btn { color: var(--ink); font-weight: 500; }
.dd-panel { margin-top: 8px; border: 1.5px solid var(--line); border-radius: 16px; padding: 4px 12px 12px; }
#f_effects .opt { display: flex; width: 100%; justify-content: flex-start; gap: 12px; background: none; border-radius: 0; padding: 12px 2px;
  border-bottom: 1px solid var(--line); font-weight: 500; font-size: 15px; color: var(--ink); text-align: left; white-space: normal; }
#f_effects .opt.on { background: none; color: var(--ink); }
#f_effects .opt .box { width: 22px; height: 22px; flex: 0 0 auto; border-radius: 7px; box-shadow: inset 0 0 0 2px var(--line); display: grid; place-items: center; }
#f_effects .opt.on .box { background: var(--lime); box-shadow: none; }
#f_effects .opt.on .box::after { content: ""; width: 6px; height: 11px; border-right: 2.5px solid var(--lime-ink); border-bottom: 2.5px solid var(--lime-ink); transform: translateY(-1px) rotate(45deg); }
#f_effects .opt.flag.on { box-shadow: none; color: var(--red); }
#f_effects .opt.flag.on .box { background: var(--red); } #f_effects .opt.flag.on .box::after { border-color: #fff; }
.dd-group { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--red); padding: 14px 2px 2px; }

/* check-ins where the client reported a problem */
.checkin.issue { background: #fff6f4; box-shadow: inset 0 0 0 2px #f2b8ad; }
.checkin.issue.unrev { box-shadow: inset 0 0 0 2px var(--red); }

/* Start -> Now -> Goal strip inside the hero card */
.journey { position: relative; z-index: 1; display: flex; align-items: center; gap: 6px; margin-top: 16px; padding: 12px 14px;
  background: rgba(255,255,255,.1); border-radius: 18px; }
.j-step { flex: 1 1 0; min-width: 0; }
.j-step span { display: block; font-size: 11px; color: #bfdcc9; white-space: nowrap; }
.j-step b { display: block; font-size: 20px; font-weight: 600; letter-spacing: -.01em; color: #fff; font-variant-numeric: tabular-nums; }
.j-step.now b { color: var(--lime); }
.j-arrow { flex: 0 0 auto; width: 7px; height: 7px; border-top: 2px solid rgba(255,255,255,.45); border-right: 2px solid rgba(255,255,255,.45); transform: rotate(45deg); margin-right: 6px; }
.j-lost { position: absolute; top: -11px; left: calc(50% - 24px); background: var(--lime); color: var(--lime-ink); font-size: 11px; font-weight: 700;
  padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
@media (max-width: 380px) { .j-step b { font-size: 17px; } .journey { padding: 12px 10px; } }
/* consultant advice on the client side: alert (amber) look */
:root { --alert: #c76a00; --alert-ink: #6b3a00; --alert-soft: #fff4e0; --alert-line: #f5b54a; }
.advice-card { background: var(--alert-soft); box-shadow: inset 0 0 0 2px var(--alert-line), var(--shadow); }
.advice-card-head .ico { background: var(--alert); color: #fff; }
.advice-card-head b { color: var(--alert-ink); }
.advice-card-head .small { color: #a0703a; }
.advice-card p { color: var(--alert-ink); }
.advice.client { background: var(--alert-soft); color: var(--alert-ink); box-shadow: inset 3px 0 0 var(--alert); border-radius: 12px; }
.advice.client b { color: var(--alert); }
/* severity scale: green -> yellow -> orange -> red */
#f_sev .chip { gap: 6px; }
#f_sev .chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
#f_sev .chip[data-v="0"]::before { background: #2f9e5c; }
#f_sev .chip[data-v="1"]::before { background: #e0b400; }
#f_sev .chip[data-v="2"]::before { background: #ec7a12; }
#f_sev .chip[data-v="3"]::before { background: #d23b2a; }
#f_sev .chip[data-v="0"].on { background: #2f9e5c; color: #fff; }
#f_sev .chip[data-v="1"].on { background: #f5cc1c; color: #4a3a00; }
#f_sev .chip[data-v="2"].on { background: #ec7a12; color: #fff; }
#f_sev .chip[data-v="3"].on { background: #d23b2a; color: #fff; }
#f_sev .chip.on::before { background: currentColor; opacity: .85; }
@media (max-width: 380px) { #f_sev .chip::before { display: none; } }
/* tidy focus ring: only for keyboard users */
button:focus:not(:focus-visible) { outline: none; }
button:focus-visible, summary:focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; }

/* BMI pill on the hero + calculator */
.bmi-pill { display: inline-flex; align-items: center; gap: 7px; background: rgba(255,255,255,.12); color: #fff; font-size: 12.5px; font-weight: 600;
  padding: 6px 12px; border-radius: 999px; margin: -6px 0 14px; }
.bmi-pill i { width: 9px; height: 9px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 2px rgba(255,255,255,.35); }
.bmi-now { display: flex; align-items: center; gap: 12px; margin: 16px 0 10px; }
.bmi-now b { font-size: 40px; font-weight: 600; letter-spacing: -.02em; line-height: 1; }
.bmi-scale { position: relative; height: 10px; border-radius: 99px;
  background: linear-gradient(90deg, #3b82c4 0 14%, #2f9e5c 14% 32%, #ec7a12 32% 50%, #d23b2a 50% 100%); }
.bmi-scale i { position: absolute; top: 50%; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--ink);
  transform: translate(-50%, -50%); }
.bmi-legend { position: relative; height: 16px; font-size: 11px; color: var(--muted); }
.bmi-legend span { position: absolute; top: 2px; transform: translateX(-50%); }
.bmi-legend span:nth-child(1) { left: 14%; } .bmi-legend span:nth-child(2) { left: 32%; } .bmi-legend span:nth-child(3) { left: 50%; }

.who-line { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.who-line:empty { display: none; }

.bmi-preview { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 10px 14px; border-radius: 14px; background: var(--soft); font-size: 13.5px; min-height: 44px; }
.bmi-preview b { font-size: 20px; font-weight: 600; }

.bmi-preview.empty { background: none; padding: 0; min-height: 0; margin-top: 6px; font-size: 12px; }

/* simplified hero */
.hero-top { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.hero-label { font-size: 13px; color: #bfdcc9; }
.hero-big { font-size: 44px; font-weight: 700; letter-spacing: -.03em; line-height: 1.05; color: #fff; }
.hero-big small { font-size: 18px; font-weight: 500; color: #bfdcc9; letter-spacing: 0; }
.bmi-line { display: flex; align-items: center; gap: 7px; margin-top: 8px; font-size: 13px; font-weight: 500; color: #e8f5d8; }
.bmi-line i { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
@media (max-width: 380px) { .hero-big { font-size: 38px; } }
/* floating glass tab bar (Apple-style) */
.tabbar {
  bottom: calc(12px + env(safe-area-inset-bottom, 0px)); width: calc(100% - 32px); max-width: 448px;
  padding: 6px; gap: 2px; border-radius: 999px;
  background: rgba(255, 255, 255, .5);
  -webkit-backdrop-filter: blur(22px) saturate(180%); backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, .65);
  box-shadow: 0 12px 32px -10px rgba(15, 60, 40, .35), 0 2px 6px rgba(15, 60, 40, .06), inset 0 1px 0 rgba(255, 255, 255, .85);
}
.tabbar button { border-radius: 999px; padding: 8px 0 6px; transition: background .2s, color .2s, transform .1s; }
.tabbar button.on { background: rgba(15, 90, 58, .1); box-shadow: inset 0 0 0 1px rgba(15, 90, 58, .06); }
.tabbar button.on::before { display: none; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .tabbar { background: rgba(255, 255, 255, .94); } }

/* Add client button: keep words together */
#addBtn { gap: 0; white-space: nowrap; }

/* Pep.Nest logo on login screens */
.brand.has-logo { display: flex; justify-content: center; }
.brand.has-logo::before { display: none; }
.brand .logo { display: block; width: 168px; height: auto; border-radius: 22px; box-shadow: 0 14px 30px -12px rgba(0,30,20,.55); }

/* Logo blends into a dark header instead of sitting as a tile */
.login-hero { background: #012a1e; padding-top: 28px; }
.login-hero .brand .logo { width: 230px; border-radius: 0; box-shadow: none; }
.login-hero h1 { margin-top: 4px; } .login-hero p { color: #a9c7b6; }
#setup > .brand.has-logo, #login > .brand.has-logo { background: #012a1e; border-radius: 24px; padding: 22px 14px; justify-content: center; margin-bottom: 18px !important; }
#setup > .brand .logo, #login > .brand .logo { width: 190px; border-radius: 0; box-shadow: none; }
.login-hero h1 { margin-top: 16px; }
