/* The Johnson Trade crew app */
.jt-app, .jt-login, .jt-toast {
  --jt-bg: #F4F6F5; --jt-card: #fff; --jt-ink: #1E2528; --jt-muted: #5C676B; --jt-line: #E2E7E5;
  --jt-gold: #A87C0E; --jt-gold-soft: #FCF4DC; --jt-gold-line: #EFD993;
  --jt-green: #1F8A4C; --jt-red: #C8372D; --jt-blue: #2459B8;
  font-family: "Figtree", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--jt-ink); line-height: 1.5; -webkit-font-smoothing: antialiased;
}
.jt-app { background: var(--jt-bg); max-width: 560px; margin: 0 auto; min-height: 100vh; padding: 0 16px 96px; box-sizing: border-box; }
.jt-app *, .jt-app *::before, .jt-app *::after { box-sizing: border-box; }
.jt-app h1, .jt-app h2, .jt-app h3 { font-family: inherit; letter-spacing: normal; margin: 0; line-height: 1.2; color: var(--jt-ink); }
.jt-app h1 { font-size: 26px; font-weight: 800; }
.jt-app h2 { font-size: 20px; font-weight: 700; }
.jt-app h3 { font-size: 16px; font-weight: 700; }
.jt-app p { margin: 0; }
.jt-loading { padding: 40px 0; text-align: center; color: var(--jt-muted); }

.jt-top { display: flex; justify-content: space-between; align-items: flex-end; padding: 20px 0 14px; }
.jt-eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--jt-gold); }
.jt-link { font-size: 14px; color: var(--jt-muted); text-decoration: none; }

#jt-main { display: flex; flex-direction: column; gap: 14px; }
.jt-card { background: var(--jt-card); border: 1px solid var(--jt-line); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.jt-card.jt-gold { background: var(--jt-gold-soft); border-color: var(--jt-gold-line); }
.jt-empty { text-align: center; padding: 32px 18px; }
.jt-label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--jt-muted); }
.jt-muted { color: var(--jt-muted); }
.small { font-size: 13.5px; }
.jt-note { text-align: center; padding: 4px 8px; }
.jt-center { text-align: center; }
.jt-row { display: flex; gap: 10px; margin-top: 6px; }
.jt-row > * { flex: 1; }

.jt-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 18px; border-radius: 14px;
  border: 0; background: var(--jt-ink); color: #fff; font-weight: 700; font-size: 16px; line-height: 1; font-family: inherit; cursor: pointer; text-decoration: none; }
.jt-btn.ghost { background: var(--jt-card); color: var(--jt-ink); border: 1px solid var(--jt-line); }
.jt-btn.red { background: var(--jt-red); }
.jt-btn:disabled { opacity: .45; cursor: not-allowed; }
.jt-btn:focus-visible, .jt-tab:focus-visible, .jt-send:focus-visible { outline: 3px solid var(--jt-gold-line); outline-offset: 2px; }

.jt-clock.on { border-color: #BFE3CD; background: #EFF8F2; }
.jt-timer { font-size: 44px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

.jt-photo { display: block; margin-top: 4px; font-size: 14px; font-weight: 600; color: var(--jt-blue); cursor: pointer; }
.jt-photo input { display: block; margin-top: 6px; font-size: 13px; color: var(--jt-muted); max-width: 100%; }

/* bottom tabs */
.jt-tabs { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 6px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(255,255,255,.96); border-top: 1px solid var(--jt-line); z-index: 50; }
.jt-tab { position: relative; flex: 1; max-width: 180px; min-height: 46px; border: 0; border-radius: 12px; background: transparent; font-weight: 600; font-size: 15px; line-height: 1;
  font-family: inherit; color: var(--jt-muted); cursor: pointer; }
.jt-tab.on { background: var(--jt-ink); color: #fff; }
.jt-badge { position: absolute; top: 4px; right: 12px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--jt-red); color: #fff;
  font-size: 12px; line-height: 20px; }

/* onboarding */
.jt-ob { display: flex; flex-direction: column; gap: 16px; padding-top: 28px; }
.jt-hero { font-size: 30px !important; line-height: 1.15 !important; text-wrap: balance; }
.jt-lead { font-size: 17px; color: var(--jt-muted); }
.jt-assign h2 { font-size: 22px; }
.jt-steps { display: flex; gap: 6px; }
.jt-steps span { height: 5px; flex: 1; border-radius: 3px; background: var(--jt-line); }
.jt-steps span.on { background: var(--jt-gold); }
.jt-field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.jt-field input, .jt-field select { min-height: 50px; padding: 0 14px; border-radius: 12px; border: 1px solid #CBD3D0; background: #fff; font-size: 16px; font-family: inherit; color: var(--jt-ink); }
.jt-rules { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 15.5px; }
.jt-check { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; }
.jt-check input { width: 22px; height: 22px; margin-top: 1px; }

/* chat */
.jt-chat { display: flex; flex-direction: column; height: calc(100vh - 190px); min-height: 360px; }
.jt-thread { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 6px 2px 12px; }
.jt-day { align-self: center; font-size: 12px; color: var(--jt-muted); margin: 10px 0 4px; }
.jt-bubble { max-width: 78%; padding: 9px 13px; border-radius: 18px; }
.jt-bubble p { white-space: pre-wrap; word-wrap: break-word; }
.jt-bubble time { display: block; font-size: 11px; opacity: .7; margin-top: 2px; }
.jt-bubble.me { align-self: flex-end; background: #1C7CF4; color: #fff; border-bottom-right-radius: 6px; }
.jt-bubble.them { align-self: flex-start; background: #E7E9EA; color: var(--jt-ink); border-bottom-left-radius: 6px; }
.jt-compose { display: flex; gap: 8px; align-items: flex-end; padding-top: 8px; }
.jt-compose textarea { flex: 1; min-height: 44px; max-height: 120px; padding: 11px 14px; border-radius: 22px; border: 1px solid #CBD3D0; font-size: 16px; font-family: inherit; resize: none; }
.jt-send { width: 44px; height: 44px; border-radius: 50%; border: 0; background: #1C7CF4; color: #fff; font-size: 20px; font-weight: 700; cursor: pointer; }

/* pay */
.jt-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.jt-stats b { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.jt-line { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--jt-line); font-variant-numeric: tabular-nums; }
.jt-line:first-of-type { border-top: 0; }
.jt-line small { display: block; color: var(--jt-muted); font-size: 12.5px; }
.jt-pill { font-style: normal; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #EDEFEF; color: var(--jt-muted); }
.jt-pill.ok { background: #E3F4EA; color: var(--jt-green); }

/* toast */
.jt-toast { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 99;
  max-width: 92vw; padding: 12px 16px; border-radius: 12px; background: var(--jt-ink); color: #fff; font-size: 15px; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.jt-toast.ok { background: var(--jt-green); }
.jt-toast.err { background: var(--jt-red); }

.jt-login { max-width: 420px; margin: 40px auto; padding: 24px; background: #fff; border: 1px solid #E2E7E5; border-radius: 16px; }
.jt-login h2 { margin: 0 0 12px; }

@media (prefers-reduced-motion: reduce) { .jt-app * { transition: none !important; } }

/* ---------- v0.4: job management for team leads and PMs ---------- */
.jt-field textarea { min-height: 70px; padding: 10px 14px; border-radius: 12px; border: 1px solid #CBD3D0; background: #fff; font-size: 16px; font-family: inherit; color: var(--jt-ink); resize: vertical; }
.jt-btn.gold { background: var(--jt-gold-soft); color: var(--jt-ink); border: 1px solid var(--jt-gold-line); font-size: 15px; min-height: 48px; }
.jt-btn.small { min-height: 38px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.jt-walk { font-size: 13.5px; font-weight: 700; padding: 6px 10px; border-radius: 10px; align-self: flex-start; }
.jt-walk.ok { background: #E3F4EA; color: var(--jt-green); }
.jt-walk.todo { background: #FBECE8; color: var(--jt-red); }
.jt-back { align-self: flex-start; border: 0; background: none; color: var(--jt-blue); font-size: 15px; font-weight: 600; padding: 8px 0 0; cursor: pointer; font-family: inherit; }
.jt-h { font-size: 22px !important; }
.jt-seg-tabs { display: flex; gap: 4px; background: #E8ECEA; padding: 4px; border-radius: 12px; }
.jt-seg-tabs button { flex: 1; min-height: 40px; border: 0; border-radius: 9px; background: transparent; font-weight: 600; font-size: 14px; color: var(--jt-muted); font-family: inherit; cursor: pointer; }
.jt-seg-tabs button.on { background: #fff; color: var(--jt-ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
#mbody { display: flex; flex-direction: column; gap: 14px; }
.jt-okcard { background: #EFF8F2; border-color: #BFE3CD; }
.jt-todo { background: var(--jt-gold-soft); border-color: var(--jt-gold-line); }
.jt-arealist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.jt-arealist li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--jt-line); }
.jt-arealist li:first-child { border-top: 0; }
.jt-arealist li > span:nth-child(2) { font-weight: 700; color: var(--jt-muted); min-width: 20px; text-align: right; }
.jt-arealist li.ok > span:first-child::before { content: "✓ "; color: var(--jt-green); font-weight: 800; }
.jt-mini-btn { position: relative; overflow: hidden; font-size: 14px; font-weight: 700; color: var(--jt-blue); padding: 8px 12px; border: 1px solid var(--jt-line); border-radius: 10px; cursor: pointer; }
.jt-mini-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.jt-tpls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.jt-tpls .jt-btn { flex-direction: column; gap: 4px; font-size: 15px; min-height: 64px; }
.jt-tpls small { font-weight: 500; font-size: 12px; color: var(--jt-muted); }
.jt-qc { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; border-top: 1px solid var(--jt-line); font-weight: 600; }
.jt-pf { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.jt-pf label { position: relative; }
.jt-pf input { position: absolute; opacity: 0; }
.jt-pf b { display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 10px; border: 1px solid var(--jt-line); font-size: 15px; color: var(--jt-muted); background: #fff; }
.jt-pf .pass input:checked + b { background: var(--jt-green); border-color: var(--jt-green); color: #fff; }
.jt-pf .fail input:checked + b { background: var(--jt-red); border-color: var(--jt-red); color: #fff; }
.jt-pf .na input:checked + b { background: #8A9296; border-color: #8A9296; color: #fff; }
.jt-pf input:focus-visible + b { outline: 3px solid var(--jt-gold-line); }
.jt-issue { border-left: 4px solid var(--jt-red); padding: 8px 0 8px 12px; display: flex; flex-direction: column; gap: 4px; }
.jt-issue.medium { border-left-color: #E07B12; }
.jt-issue.low { border-left-color: #8A9296; }
.jt-issue input, .jt-restock input { min-height: 40px; padding: 0 10px; border-radius: 10px; border: 1px solid #CBD3D0; font-size: 15px; font-family: inherit; min-width: 0; }
.jt-lowcard { background: #FFF6F4; border-color: #F3C9C2; }
.jt-lowcard h3 { color: var(--jt-red); }
.jt-line .jt-row { margin-top: 0; flex: none; gap: 6px; }
.jt-line .jt-row > * { flex: none; }
.jt-restock { flex-basis: 100%; }
.jt-line { flex-wrap: wrap; }
.jt-pill.bad { background: #FBECE8; color: var(--jt-red); }
.jt-card h3 + .jt-line { border-top: 0; }
.jt-report { width: 100%; margin-top: 4px; color: var(--jt-red); }

/* ---------- v0.5: role-based crew app ---------- */
.jt-tabs.many { justify-content: flex-start; overflow-x: auto; gap: 4px; scrollbar-width: none; }
.jt-tabs.many::-webkit-scrollbar { display: none; }
.jt-tabs.many .jt-tab { flex: 0 0 auto; min-width: 72px; padding: 0 12px; font-size: 14px; }
.jt-addr { margin: 0; font-size: 16px; font-weight: 600; }
.jt-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 4px 0 0; font-size: 15px; }
.jt-facts dt { color: var(--jt-muted); font-weight: 600; }
.jt-facts dd { margin: 0; }
.jt-card-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.jt-picker select { width: 100%; }
.jt-chat-head { font-weight: 700; font-size: 17px; padding: 4px 0 8px; }
.jt-threads { display: flex; flex-direction: column; gap: 8px; }
.jt-thread-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 16px; min-height: 64px;
  background: var(--jt-card); border: 1px solid var(--jt-line); border-radius: 14px; font-family: inherit; font-size: 16px; color: var(--jt-ink); cursor: pointer; }
.jt-thread-row small { display: block; color: var(--jt-muted); font-size: 13px; font-weight: 400; }
.jt-chev { color: var(--jt-muted); font-size: 22px; line-height: 1; }
.jt-badge.static { position: static; flex: none; }
.jt-pill.warn { background: var(--jt-gold-soft); color: var(--jt-gold); }
.jt-line.total { font-weight: 700; border-top: 2px solid var(--jt-ink); }
.jt-arealist.two li { grid-template-columns: 1fr auto auto; }
.jt-mini-btn b { color: var(--jt-ink); margin-left: 2px; }
.jt-mini-btn.after { color: var(--jt-green); }

/* ---------- v0.6: team lead phase loop, PM screens ---------- */
.jt-phase-tabs { overflow-x: auto; }
.jt-phase-tabs button.ok { color: var(--jt-green); }
.jt-steplist { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.jt-stepbtn { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; width: 100%; text-align: left; padding: 12px; min-height: 56px;
  background: #fff; border: 1px solid var(--jt-line); border-radius: 12px; font-family: inherit; font-size: 15px; color: var(--jt-ink); cursor: pointer; }
.jt-stepbtn .num { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; background: var(--jt-gold-soft); color: var(--jt-gold); border: 1px solid var(--jt-gold-line); }
.jt-stepbtn.done .num { background: var(--jt-green); color: #fff; border-color: var(--jt-green); }
.jt-stepbtn small { display: block; color: var(--jt-muted); font-size: 12.5px; font-weight: 400; }
.jt-stepbtn.done b { color: var(--jt-muted); }
.jt-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.jt-tools .jt-btn { font-size: 14px; min-height: 52px; padding: 0 10px; }
.jt-att { display: flex; flex-direction: column; gap: 8px; padding: 14px; margin-bottom: 10px; background: var(--jt-card); border: 1px solid var(--jt-line); border-radius: 14px; }
.jt-att input:not([type=checkbox]), .jt-att select { min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid #CBD3D0; font-size: 15px; font-family: inherit; background: #fff; }
.jt-att .jt-row { align-items: center; margin-top: 0; }
.jt-att small.warn { color: var(--jt-red); font-weight: 600; }
.jt-issue.good { border-left-color: var(--jt-green); }
.jt-pmjob { margin-bottom: 8px; }
.jt-pmjob small .jt-pill { margin-top: 4px; display: inline-block; }
#jt-main .jt-btn.gold { width: 100%; }
.jt-att .jt-field span { font-size: 13px; }

/* ---------- v0.7 brand: white app, charcoal + metallic gold, Archivo ---------- */
.jt-app {
  --jt-bg: #FFFFFF; --jt-ink: #1B1A18; --jt-muted: #6B675F; --jt-line: #E8E5DF;
  --jt-gold: #A8741F; --jt-gold-soft: #FBF3E2; --jt-gold-line: #E9D3A3;
  --jt-gold-grad: linear-gradient(100deg, #8A5E1A 0%, #C8922E 24%, #F3D98C 46%, #D9A441 62%, #A8741F 82%, #E3BD6C 100%);
  font-family: 'Archivo', 'Helvetica Neue', Arial, sans-serif; background: #FFFFFF;
}
.jt-app h1, .jt-app h2 { font-family: 'Archivo', sans-serif; font-weight: 800; letter-spacing: -.01em; }
.jt-app .jt-h, .jt-hero { text-transform: uppercase; font-stretch: 88%; }
.jt-app .jt-eyebrow { font-weight: 800; letter-spacing: .16em; background: var(--jt-gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.jt-top { background: #1B1A18; margin: 0 -16px 16px; padding: 14px 16px; border-radius: 0 0 18px 18px; align-items: center; }
.jt-top-brand { display: flex; align-items: center; gap: 12px; }
.jt-top-logo { width: 64px; height: auto; display: block; }
.jt-top h1 { color: #F1EEE8 !important; font-size: 22px; }
.jt-top .jt-link { color: #A39F97; white-space: nowrap; }
.jt-ob-logo, .jt-login-logo { width: 220px; max-width: 70%; height: auto; display: block; margin: 0 auto 6px; }
.jt-btn { border-radius: 999px; }
.jt-btn:not(.ghost):not(.red):not(.gold) { background: linear-gradient(100deg, #C8922E 0%, #F3D98C 45%, #DDAE55 70%, #C8922E 100%); background-size: 140% 100%; color: #1B1A18; }
.jt-btn[disabled] { background: #D6D3CD !important; color: #6B675F !important; }
.jt-btn.gold { background: #1B1A18; color: #F1EEE8; border: 0; }
.jt-tab.on { background: linear-gradient(100deg, #C8922E 0%, #F3D98C 45%, #DDAE55 70%, #C8922E 100%); color: #1B1A18; font-weight: 700; }
.jt-card.jt-gold { background: #1B1A18; border-color: #1B1A18; color: #F1EEE8; }
.jt-card.jt-gold .jt-muted, .jt-card.jt-gold small { color: #A39F97; }
.jt-card.jt-gold b, .jt-card.jt-gold h3 { color: #F1EEE8; }
.jt-stepbtn .num { background: #FBF3E2; color: #8A5E1A; }
.jt-login { max-width: 380px; margin: 40px auto; text-align: center; font-family: 'Archivo', sans-serif; }
.jt-login h2 { font-weight: 800; text-transform: uppercase; letter-spacing: -.01em; margin: 8px 0 2px; }
.jt-login .jt-slogan { color: #6B675F; margin: 0 0 16px; }
.jt-login form { text-align: left; }
.jt-login input[type=text], .jt-login input[type=password] { width: 100%; min-height: 48px; border-radius: 12px; border: 1px solid #CFCBC3; padding: 0 12px; font-size: 16px; }
.jt-login input[type=submit] { width: 100%; min-height: 50px; border: 0; border-radius: 999px; background: linear-gradient(100deg, #8A5E1A 0%, #C8922E 24%, #F3D98C 46%, #D9A441 62%, #A8741F 82%, #E3BD6C 100%); color: #1B1A18; font-weight: 800; font-size: 16px; }
body.jt-crew-page .jt-app { min-height: 100vh; }
body.jt-crew-page .jt-top { margin-top: 0; padding-top: calc(14px + env(safe-area-inset-top, 0px)); }

/* v0.8: the owner viewing as this person */
.jt-viewas { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #FFF4D6; color: #1B1A18; border-bottom: 2px solid #C8922E; padding: 8px 14px; font-size: 13px; }
.jt-viewas b { font-weight: 800; }
.jt-viewas a { color: #1B1A18; background: linear-gradient(100deg,#C8922E,#F3D98C 45%,#DDAE55 70%,#C8922E); padding: 5px 12px; border-radius: 8px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.jt-login-links { margin: 14px 0 0; }
.jt-login-links a { font-weight: 700; color: #A8741F; text-decoration: none; }
.jt-login-help { margin: 10px 0 0; font-size: 13px; }
.jt-login-help a { color: #6B665C; text-decoration: none; }

/* ===================================================================== v0.9 */
/* Bottom tabs: icon + label, always fit one screen (4 or 5 tabs). */
.jt-tabs { gap: 2px; padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px)); overflow: visible; }
.jt-tabs .jt-tab { flex: 1 1 0; min-width: 0; max-width: none; min-height: 54px; padding: 4px 2px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11.5px; font-weight: 700; border-radius: 12px; }
.jt-tabs .jt-tab span:not(.jt-badge) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.jt-ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.jt-tab .jt-badge { top: 2px; right: calc(50% - 22px); }
.jt-tab.hot:not(.on) { color: #C8372D; }
.jt-tab.hot .jt-ic { animation: jtpulse 1.4s ease-in-out infinite; }
@keyframes jtpulse { 50% { transform: scale(1.18); } }
.jt-tabs.many { justify-content: center; overflow: visible; }

/* Header avatar */
.jt-top-av { border: 0; background: none; padding: 0; cursor: pointer; border-radius: 50%; }
.jt-top-av .jt-av { box-shadow: 0 0 0 2px #C8922E; }
.jt-av { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; object-fit: cover; background: #3E3A33; color: #F3D98C; font-weight: 800; flex: none; letter-spacing: .02em; }

/* Messages: the compose bar always shows without scrolling */
.jt-app.jt-chatmode { height: 100vh; height: 100dvh; min-height: 0; display: flex; flex-direction: column; padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); overflow: hidden; }
.jt-app.jt-chatmode .jt-top { flex: none; padding-top: 10px; padding-bottom: 10px; margin-bottom: 10px; }
.jt-app.jt-chatmode .jt-top-logo { width: 44px; }
.jt-app.jt-chatmode .jt-top h1 { font-size: 18px; }
.jt-app.jt-chatmode #jt-main { flex: 1; min-height: 0; gap: 8px; }
.jt-app.jt-chatmode .jt-chat { flex: 1; min-height: 0; height: auto; }
.jt-app.jt-chatmode .jt-thread { min-height: 0; }
.jt-app.jt-chatmode .jt-threads { overflow-y: auto; }
.jt-app.jt-chatmode .jt-compose { flex: none; background: var(--jt-bg); padding-bottom: 4px; }

/* Me / More */
.jt-profile { flex-direction: row; align-items: center; gap: 16px; }
.jt-av-edit { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; font-size: 12px; font-weight: 700; color: var(--jt-blue); }
.jt-av-edit input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.jt-menu { padding: 4px 0; gap: 0; }
.jt-menu .jt-thread-row { border-radius: 0; border: 0; border-top: 1px solid var(--jt-line); background: none; }
.jt-menu .jt-thread-row:first-child { border-top: 0; }
.jt-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.jt-tile { position: relative; min-height: 66px; border: 1px solid var(--jt-line); background: #fff; border-radius: 14px; font: 700 15px/1.2 inherit; font-family: inherit; color: var(--jt-ink); cursor: pointer; text-align: left; padding: 14px; }
.jt-tile .jt-badge { top: 8px; right: 8px; }
.jt-badge.static { position: static; display: inline-block; }

/* KPI bar */
.jt-kpibar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.jt-kpibar div { background: #fff; border: 1px solid var(--jt-line); border-radius: 12px; padding: 8px 6px; text-align: center; min-width: 0; }
.jt-kpibar b { display: block; font-size: 20px; line-height: 1.1; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jt-kpibar span { display: block; font-size: 10.5px; font-weight: 700; color: var(--jt-muted); text-transform: uppercase; letter-spacing: .03em; line-height: 1.2; }
.jt-kpibar .ok b { color: var(--jt-green); } .jt-kpibar .warn b { color: #B7600B; } .jt-kpibar .bad { background: #FDEEEC; border-color: #F3C4BE; } .jt-kpibar .bad b { color: var(--jt-red); }
.jt-h2row { display: flex; align-items: center; justify-content: space-between; }
.jt-att { gap: 4px; border-left: 4px solid #D9D2C2; }
.jt-att small { color: var(--jt-muted); font-size: 13px; }
.jt-att.k-emergency { border-left-color: var(--jt-red); background: #FFF6F4; }
.jt-att.k-issue, .jt-att.k-feedback, .jt-att.k-gc_wait { border-left-color: #E07B12; }
.jt-att.k-readiness, .jt-att.k-health { border-left-color: #C8922E; }
.jt-row.wrap { flex-wrap: wrap; } .jt-row.wrap > * { flex: 0 0 auto; }
.jt-btn.small { min-height: 38px; padding: 0 12px; font-size: 14px; border-radius: 11px; }
.jt-newsnote { flex-direction: row; font-weight: 700; text-align: left; cursor: pointer; font-family: inherit; font-size: 15px; background: #FFF8E8; border-color: #EFD993; }
.jt-cnt { font-weight: 800; }

/* Emergency */
.jt-app .jt-btn.sos { background: #C8372D !important; color: #fff !important; border: 0 !important; gap: 8px; width: 100%; font-size: 17px; box-shadow: 0 6px 18px rgba(200, 55, 45, .3); }
.jt-btn.sos.armed { background: #7A1710 !important; box-shadow: 0 0 0 4px #F3C4BE !important; }
.jt-btn.sos .jt-ic { stroke: #fff; }
.jt-sos-title { display: flex; align-items: center; gap: 8px; color: #C8372D !important; }
.jt-pmcard, .jt-sos-on { gap: 10px; }
.jt-sos-on { border-color: #F3C4BE; background: #FFF6F4; }
.jt-pmrow { display: flex; align-items: center; gap: 10px; }
.jt-pmrow > span:not(.jt-av) { flex: 1; min-width: 0; }
.jt-pmrow small { display: block; color: var(--jt-muted); font-size: 12.5px; }
.jt-catgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.jt-catgrid label, .jt-yn label { position: relative; }
.jt-catgrid input, .jt-yn input { position: absolute; opacity: 0; }
.jt-catgrid span, .jt-yn span { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 46px; padding: 6px 8px; border: 1.5px solid var(--jt-line); border-radius: 12px; font-weight: 700; font-size: 14px; background: #fff; cursor: pointer; }
.jt-catgrid input:checked + span { border-color: #C8372D; background: #FFF0EE; color: #A12A21; }
.jt-yn { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.jt-yn input:checked + span { border-color: var(--jt-ink); background: var(--jt-ink); color: #fff; }
.jt-emcard { text-align: left; font-family: inherit; cursor: pointer; color: inherit; gap: 4px; }
.jt-emcard.active { border-left: 4px solid #E07B12; }
.jt-emcard.new { border-left-color: var(--jt-red); background: #FFF6F4; }
.jt-emhead.active { border-color: #F3C4BE; }
.jt-embody { font-size: 17px; font-weight: 600; }
.jt-actgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.jt-card textarea#emnote, .jt-note-in { width: 100%; padding: 10px 12px; border: 1px solid #CBD3D0; border-radius: 12px; font: inherit; font-size: 15px; }
.jt-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin: 4px 0; }
.jt-facts dt { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--jt-muted); }
.jt-facts dd { margin: 0; font-weight: 600; }

/* Jobs */
.jt-jobcard { text-align: left; font-family: inherit; cursor: pointer; color: inherit; gap: 4px; }
.jt-jobmeta { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.jt-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.jt-mini span { background: #F6F4EF; border-radius: 10px; padding: 6px; text-align: center; font-size: 11px; color: var(--jt-muted); font-weight: 600; }
.jt-mini b { display: block; font-size: 17px; color: var(--jt-ink); }
.jt-checks { list-style: none; margin: 4px 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; font-size: 13.5px; }
.jt-checks .y { color: var(--jt-green); } .jt-checks .n { color: var(--jt-red); font-weight: 700; }

/* Tasks / contacts */
.jt-task.late { border-left: 4px solid var(--jt-red); }
.jt-task.done b { text-decoration: line-through; color: var(--jt-muted); }
.jt-status { min-height: 38px; border-radius: 10px; border: 1px solid #CBD3D0; padding: 0 10px; font: inherit; font-size: 14px; background: #fff; align-self: flex-start; }
.jt-search { min-height: 46px; border-radius: 12px; border: 1px solid #CBD3D0; padding: 0 14px; font: inherit; font-size: 16px; width: 100%; }
.jt-contact small { font-size: 12.5px; }
.jt-inline { flex-direction: row; align-items: center; gap: 10px; }
.jt-inline select { flex: 1; min-height: 42px; }

/* News */
.jt-news { gap: 8px; }
.jt-news.unread { border-left: 4px solid #C8922E; }
.jt-news header { display: flex; align-items: center; gap: 10px; }
.jt-news header small { display: block; color: var(--jt-muted); font-size: 12px; }
.jt-news-body { font-size: 15.5px; line-height: 1.5; }
.jt-news-img { width: 100%; border-radius: 12px; }
.jt-pin { align-self: flex-start; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #8A5E1A; background: #FFF1CF; padding: 2px 8px; border-radius: 999px; }

/* Bonus */
.jt-bonushead b { font-size: 34px; font-weight: 800; line-height: 1.1; }
.jt-bonuspart { display: flex; flex-direction: column; gap: 4px; padding: 8px 0; border-top: 1px solid var(--jt-line); }
.jt-bonuspart:first-child { border-top: 0; }
.jt-bar { height: 8px; background: #EEE9DE; border-radius: 99px; overflow: hidden; }
.jt-bar i { display: block; height: 100%; background: linear-gradient(90deg, #C8922E, #F3D98C); }
.jt-seg-tabs { overflow-x: auto; scrollbar-width: none; } .jt-seg-tabs::-webkit-scrollbar { display: none; } .jt-seg-tabs button { flex: 1 0 auto; padding: 0 10px; white-space: nowrap; }

/* v0.10 photo check-in */
.jt-checkin-cta { flex-direction: row; align-items: center; gap: 12px; text-align: left; cursor: pointer; font-family: inherit; color: inherit; border-color: #EFD993; background: #FFF8E8; }
.jt-checkin-cta > span:first-child { font-size: 26px; }
.jt-checkin-cta > span:nth-child(2) { flex: 1; }
.jt-checkin-cta small { display: block; color: var(--jt-muted); font-size: 13px; font-weight: 400; }
.jt-ci-count { font-size: 15px; }
.jt-ci-count b { font-size: 22px; }
.jt-ci { gap: 10px; }
.jt-ci.in { border-left: 4px solid var(--jt-green); }
.jt-ci.done { opacity: .75; }
.jt-ci-who { display: flex; align-items: center; gap: 12px; }
.jt-ci-who > span { flex: 1; min-width: 0; }
.jt-ci-who > .jt-av, .jt-ci-who > img { flex: none; }
.jt-ci-who small { display: block; color: var(--jt-muted); font-size: 13px; }
.jt-ci-who small.ok { color: var(--jt-green); font-weight: 700; }
.jt-ci-photo { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; flex: none; }
.jt-ci-btn { position: relative; overflow: hidden; width: 100%; cursor: pointer; }
.jt-ci-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.jt-ci-btn.busy { opacity: .7; pointer-events: none; }
.jt-checked { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; }
.jt-checked img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }

/* v0.11 messages: avatars in lists, groups, photos, who-can-post notes */
.jt-thread-row > span:not(.jt-av):not(.jt-badge):not(.jt-chev) { flex: 1; min-width: 0; }
.jt-thread-row .jt-av { flex: none; }
.jt-av-group { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--jt-ink, #1B1A18); font-size: 18px; }
.jt-h-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.jt-h-row .jt-h { margin: 0; }
.jt-chat-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.jt-chat-head small { display: block; font-weight: 500; font-size: 12.5px; color: var(--jt-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 62vw; }
#cfoot { flex: none; }
.jt-chat-note { background: #F6F1E6; border: 1px solid #E8DCC2; color: #5B4A2A; border-radius: 14px; padding: 12px 14px; font-size: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.jt-attach { position: relative; flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid #CBD3D0; background: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; cursor: pointer; overflow: hidden; }
.jt-attach input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.jt-attach-prev:empty { display: none; }
.jt-attach-prev { display: flex; align-items: center; gap: 8px; padding: 6px 0 0 52px; }
.jt-attach-prev img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }
.jt-attach-prev button { border: 0; background: #eee; border-radius: 50%; width: 28px; height: 28px; cursor: pointer; }
.jt-msg-img { display: block; max-width: 220px; max-height: 260px; width: 100%; object-fit: cover; border-radius: 12px; margin: 2px 0 4px; }
.jt-from { display: block; font-size: 11.5px; font-weight: 700; color: var(--jt-muted); margin-bottom: 2px; }
.jt-pick-people { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow-y: auto; }
.jt-pick-person { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--jt-line); border-radius: 12px; font-weight: 600; }
.jt-pick-person input { width: 20px; height: 20px; accent-color: #B8862B; }

/* v0.11 my crew, store, directory */
.jt-crew-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--jt-line); }
.jt-crew-row:first-of-type { border-top: 0; }
.jt-crew-row > span:not(.jt-av) { flex: 1; }
.jt-crew-row .jt-av { flex: none; }
.jt-shop { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.jt-shop-item { display: flex; flex-direction: column; gap: 4px; text-align: left; background: #fff; border: 1px solid var(--jt-line); border-radius: 14px; padding: 10px; font-family: inherit; cursor: pointer; color: var(--jt-ink); }
.jt-shop-item img, .jt-shop-ph { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: #F4EFE6; display: flex; align-items: center; justify-content: center; font-size: 40px; }
.jt-shop-item b { font-size: 15px; }
.jt-shop-item span { color: var(--jt-muted); font-weight: 700; }
.jt-shop-detail img { width: 100%; border-radius: 12px; }
.jt-price { font-size: 22px; font-weight: 800; margin: 0; }
.jt-search-in { width: 100%; min-height: 48px; border-radius: 14px; border: 1px solid #CBD3D0; padding: 10px 14px; font-size: 16px; font-family: inherit; }
.jt-dir-card h3 { margin: 0; }

.jt-av-hr { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: linear-gradient(135deg,#B8862B,#F1D58A,#C99A3B); color: #1B1A18; font-weight: 800; font-size: 14px; flex: none; }
