/* ColonyEdge phone app */
body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
.bar { gap: 8px; padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
.bar .back { background: none; border: 0; color: #fff; font-size: 30px; line-height: 1; padding: 0 8px 4px 0; cursor: pointer; }
.bar select { max-width: 52vw; font-size: 14px; }
#menuBtn { font-size: 16px; letter-spacing: 1px; }
.menu { position: fixed; right: 10px; top: calc(56px + env(safe-area-inset-top)); background: var(--sheet); border: 1px solid var(--line-2);
  border-radius: 12px; box-shadow: 0 12px 32px rgba(11,37,48,0.22); z-index: 60; min-width: 220px; padding: 6px; }
.menu button, .menu a { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 11px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 15px; cursor: pointer; }
.menu button:hover, .menu a:hover { background: var(--paper); }
.menu .who { padding: 8px 12px; color: var(--muted); font-size: 13px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; background: var(--sheet); border-top: 1px solid var(--line); display: flex; z-index: 30;
  padding-bottom: env(safe-area-inset-bottom); }
.tabbar button { flex: 1; border: 0; background: none; padding: 12px 4px 13px; font-weight: 600; color: var(--muted); cursor: pointer; position: relative; font-size: 14px; }
.tabbar button.on { color: var(--green-ink); box-shadow: inset 0 3px 0 var(--green); }
.tabbar b { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--amber); color: #fff; font-size: 12px; margin-left: 4px; }

.banner { display: flex; gap: 10px; align-items: center; padding: 10px 14px; background: var(--amber-tint); color: #5b3d0b; font-size: 14px; }
.banner .grow { flex: 1; }

.wrap { padding: 12px max(12px, env(safe-area-inset-left)) 20px max(12px, env(safe-area-inset-right)); max-width: 760px; margin: 0 auto; }
.card { display: block; width: 100%; text-align: left; background: var(--sheet); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  margin-bottom: 8px; cursor: pointer; position: relative; overflow: hidden; color: var(--ink); }
.card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--green); }
.card.attention::before { background: var(--amber); }
.card.split::before { background: var(--sky); }
.card.busy::before { background: var(--line-2); }
.card .v { font-weight: 600; font-size: 16px; }
.card .meta { display: flex; justify-content: space-between; color: var(--ink-2); font-size: 14px; margin-top: 2px; }
.card .state { font-size: 13px; color: var(--muted); margin-top: 3px; }
.empty h2 { font: 600 19px var(--font-display); margin: 0 0 6px; color: var(--ink); }

.pages { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.pages img { width: 100%; border-radius: 8px; border: 1px solid var(--line); background: #fff; min-height: 120px; display: block; }
.pageswrap { position: relative; }
.pagenote { font-size: 12.5px; color: var(--muted); margin: 0 0 6px; }
.formcard { background: var(--sheet); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.vtag { display: inline-block; font-size: 11.5px; padding: 0 7px; border-radius: 9px; background: var(--paper); color: var(--ink-2); margin-left: 6px; font-weight: 600; }
.vtag.new { background: var(--amber-tint); color: var(--amber); }
.vtag.good { background: var(--green-tint); color: var(--green-ink); }
.combo { position: relative; }
.combo-list { position: absolute; top: calc(100% + 2px); left: 0; right: 0; max-height: 50vh; overflow: auto; background: #fff; border: 1px solid var(--line-2);
  border-radius: 10px; box-shadow: 0 10px 24px rgba(11,37,48,0.16); z-index: 25; }
.combo-list button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 11px 12px; cursor: pointer; font-size: 15px; border-bottom: 1px solid var(--line); }
.combo-list .new { color: var(--green-ink); font-weight: 600; }
.attn-note { font-size: 13px; color: #7a4e0e; margin-top: 4px; }
.attn-note .opts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.attn-note button { border: 1px solid #e3c48f; background: #fff; border-radius: 7px; padding: 5px 10px; cursor: pointer; font-size: 14px; }
.sub-block { border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; margin: 4px 0 12px; background: #fcfdfb; }
.split-line { display: grid; grid-template-columns: 1fr 104px 30px; gap: 6px; margin-bottom: 6px; align-items: center; }
.split-line.with-class { grid-template-columns: 1fr 1fr; }
.split-line.with-class .amt-row { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 30px; gap: 6px; }
.split-line .x { font-size: 22px; }
.split-check { font-size: 14px; border-top: 1px dashed var(--line-2); margin-top: 8px; padding-top: 8px; }
.split-check .line { display: flex; justify-content: space-between; gap: 8px; }
.split-check .ok { color: var(--green-ink); font-weight: 600; }
.split-check .due { color: var(--amber); font-weight: 600; }
.split-check .bad { color: var(--brick); font-weight: 600; }
.lane { border-top: 1px dashed var(--line-2); padding: 10px 0 2px; }
.lane .status { font-size: 13px; color: var(--muted); }
.lane .status.good { color: var(--green-ink); }
.lane .status.bad { color: var(--brick); font-weight: 600; }
.bottombar { position: fixed; left: 0; right: 0; bottom: 0; background: var(--sheet); border-top: 1px solid var(--line); padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  display: flex; gap: 8px; z-index: 35; }
.bottombar .btn { flex: 1; padding: 13px 10px; font-size: 16px; }
.bottombar .btn.primary { flex: 2; }
.bottombar .msg { flex: 3; color: var(--brick); font-weight: 600; font-size: 14px; align-self: center; }
input.bad-math { border-color: var(--brick) !important; }
.cut { display: flex; align-items: center; gap: 10px; margin: 2px 0 10px; }
.cut button { flex: 1; border: 1.5px dashed var(--line-2); background: none; border-radius: 10px; padding: 10px; font-weight: 600; color: var(--muted); cursor: pointer; }
.cut.on button { border-color: var(--sky); color: var(--sky); background: #eef4fb; border-style: solid; }
.thumb { position: relative; }
.thumb img { width: 100%; border-radius: 8px; border: 1px solid var(--line); display: block; background: #fff; }
.thumb .tag { position: absolute; top: 8px; left: 8px; background: var(--night); color: #fff; border-radius: 8px; padding: 2px 9px; font-size: 13px; font-weight: 600; }
.panel { position: fixed; inset: 0; background: var(--paper); z-index: 50; overflow: auto; padding-top: env(safe-area-inset-top); }
.panel .head { position: sticky; top: 0; background: var(--sheet); border-bottom: 1px solid var(--line); padding: 12px 14px; display: flex; align-items: center; gap: 10px; z-index: 2; }
.panel .head h2 { flex: 1; margin: 0; font: 600 18px var(--font-display); }
.zoom { position: fixed; inset: 0; background: #0b2530; z-index: 80; overflow: auto; touch-action: pan-x pan-y pinch-zoom; }
.zoom img { width: 200%; max-width: none; display: block; }
.zoom .x { position: fixed; top: calc(10px + env(safe-area-inset-top)); right: 12px; color: #fff; background: rgba(0,0,0,0.4); }
.install { background: var(--green-tint); color: #12553c; border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; font-size: 14px; }
@media (min-width: 900px) {
  .review-grid { display: grid; grid-template-columns: 1fr 420px; gap: 16px; align-items: start; }
  .review-grid .pages { position: sticky; top: 70px; max-height: calc(100vh - 90px); overflow: auto; }
}
