/* ══ QUICK CAPTURE (v4.6.0) — one "+" hub replacing the nursery + log FABs ══
   Mobile: a raised center-notch "+" on the olive bottom rail.
   Desktop: a "+ Log" pill in the header nav cluster (⌘K / Ctrl+K).
   Both open the same surface: a bottom-sheet (mobile) / right drawer (desktop). */

/* — rail center-notch "+" — */
.m-tab-plus { flex: 0 0 60px; display: flex; align-items: center; justify-content: center; position: relative; }
.qc-plus {
  position: relative; margin-top: -26px;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--terra); color: #FFFFFF;
  border: 4px solid var(--paper);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(0,0,0,0.32); cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.qc-plus:active { background: #a03a22; transform: scale(0.96); }
.qc-plus svg { width: 26px; height: 26px; transition: transform 0.25s ease; }
body.capture-open .qc-plus svg { transform: rotate(45deg); }
.qc-plus__badge {
  position: absolute; top: -3px; right: -3px;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--bg-base); color: var(--terra-text);
  border: 2px solid var(--bar-bg);
  font-family: var(--f-mono); font-size: 11px; font-weight: 500; line-height: 16px; text-align: center;
}
.qc-plus__badge.empty { display: none; }

/* — desktop "+ Log" pill — */
#qcLogPill {
  display: inline-flex; align-items: center; gap: 6px; position: relative;
  background: var(--terra); color: #fff; border: none; border-radius: 99px;
  min-height: 44px; padding: 0 18px 0 16px; font-family: var(--f-body); font-size: 15px; font-weight: 700; cursor: pointer;
}
#qcLogPill svg { width: 18px; height: 18px; }
#qcLogPill:hover { background: #a03a22; }
#qcLogPill .qc-pill__badge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: #fff; color: var(--terra-text); font-family: var(--f-mono); font-size: 11px; font-weight: 500; line-height: 18px; text-align: center;
}
#qcLogPill .qc-pill__badge.empty { display: none; }
@media (max-width: 768px) { #qcLogPill { display: none; } }
@media (max-width: 480px) { #qcLogPill .qc-pill__lab { display: none; } }

/* — scrim + surface (one component, two layouts) — */
#qcScrim {
  position: fixed; inset: 0; background: rgba(20,28,12,0.55);
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease; z-index: 9500;
}
body.capture-open #qcScrim { opacity: 1; pointer-events: auto; }
#qcSurface {
  position: fixed; z-index: 9520; background: var(--bg-modal); color: var(--text-body);
  display: flex; flex-direction: column;
  left: 0; right: 0; bottom: 0; max-height: 92vh;
  border-radius: 24px 24px 0 0; box-shadow: none; visibility: hidden;
  transform: translateY(100%); transition: transform 0.22s ease-out, visibility 0s linear 0.22s;
}
/* v4.9.0 — shadow + visibility only while open: closed, the drawer's shadow
   leaked onto the right edge (desktop) / bottom (phone) of every screen. */
body.capture-open #qcSurface { transform: translateY(0); visibility: visible; box-shadow: 0 -10px 40px rgba(0,0,0,0.3); transition: transform 0.22s ease-out, visibility 0s; }
.qc-grab { width: 40px; height: 5px; border-radius: 3px; background: var(--border-tan); margin: 10px auto 2px; flex: 0 0 auto; }
#qcBody { overflow-y: auto; padding: 4px 16px calc(env(safe-area-inset-bottom) + 18px); }
.qc-eye { font-family: var(--f-display); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-secondary); margin: 10px 2px 6px; }
.qc-head { display: flex; align-items: center; gap: 6px; padding: 4px 2px 2px; }
.qc-back { background: none; border: none; cursor: pointer; color: var(--terra-text); font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 3px; padding: 6px 4px; }
.qc-title { font-family: var(--f-display); font-size: 15px; font-weight: 800; color: var(--text-primary); }

/* — smart row — */
.qc-smart { border-radius: 16px; padding: 14px; color: #fff; background: linear-gradient(135deg, var(--terra), #a03a22); }
.qc-smart.green { background: linear-gradient(135deg, var(--green), #2C3A1E); }
.qc-smart__lab { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.9; display: flex; align-items: center; gap: 6px; }
.qc-smart__dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: qcpulse 1.6s infinite; }
@keyframes qcpulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }
.qc-smart__crop { font-family: var(--f-display); font-size: 16px; font-weight: 800; margin-top: 5px; }
.qc-smart__where { font-size: 12px; opacity: 0.9; margin-top: 2px; }
.qc-smart__acts { display: flex; gap: 8px; margin-top: 12px; }
.qc-btnp { flex: 1; background: #fff; color: #A03A22; border: none; border-radius: 10px; padding: 11px; font-weight: 800; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; }
.qc-smart.green .qc-btnp { color: #1F5F3B; }
.qc-btng { background: rgba(255,255,255,0.18); color: #fff; border: none; border-radius: 10px; padding: 11px 13px; font-weight: 700; font-size: 12px; cursor: pointer; }
.qc-emptyrow { display: flex; align-items: center; gap: 11px; background: var(--bg-card); border: 1px dashed var(--border-tan); border-radius: 14px; padding: 16px 14px; color: var(--text-secondary); font-size: 12.5px; }
.qc-emptyrow .ic { width: 34px; height: 34px; border-radius: 9px; background: var(--bg-subtle); color: var(--text-muted); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }

/* — group labels + tile grid — */
.qc-grouplab { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-secondary); margin: 16px 2px 8px; }
.qc-grouplab .dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.qc-grouplab .rule { flex: 1; height: 1px; background: var(--border-rule); }
.qc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qc-tile { position: relative; text-align: left; background: var(--bg-card); border: 1px solid var(--border-mid); border-radius: 14px; padding: 13px; min-height: 96px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; transition: transform 0.1s, box-shadow 0.15s; }
.qc-tile:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.1); }
.qc-tile:active { transform: scale(0.98); }
.qc-tile__ico { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.qc-tile.amber .qc-tile__ico { background: var(--amber-tint); color: var(--amber-text); }
.qc-tile.green .qc-tile__ico { background: var(--green-tint); color: var(--green-text); }
.qc-tile.tan   .qc-tile__ico { background: var(--tan-tint); color: var(--terra-text); }
.qc-tile__t { font-family: var(--f-display); font-size: 13.5px; font-weight: 800; color: var(--text-primary); }
.qc-tile__h { font-size: 11px; color: var(--text-muted); line-height: 1.3; }
.qc-tile__badge { position: absolute; top: 11px; right: 11px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--terra); color: #fff; font-size: 10px; font-weight: 800; line-height: 18px; text-align: center; }
.qc-tile.is-new .qc-tile__t::after { content: 'NEW'; margin-left: 6px; font-size: 8px; font-weight: 800; color: var(--green-text); background: var(--green-tint); padding: 1px 4px; border-radius: 4px; vertical-align: middle; }

/* — voice row — */
.qc-voice { display: flex; align-items: center; gap: 11px; margin-top: 14px; background: var(--bg-card); border: 1px solid var(--border-mid); border-radius: 14px; padding: 13px; cursor: pointer; }
.qc-voice__mic { width: 38px; height: 38px; border-radius: 50%; background: var(--terra-tint); color: var(--terra-text); display: flex; align-items: center; justify-content: center; font-size: 17px; flex: 0 0 auto; }
.qc-voice__t { font-size: 12.5px; color: var(--text-secondary); }

/* — drill: stamp list + outcomes — */
.qc-list { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.qc-srow { background: var(--bg-card); border: 1px solid var(--border-mid); border-radius: 13px; padding: 11px 12px; }
.qc-srow__top { display: flex; align-items: center; gap: 11px; }
.qc-ring { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--terra); background: none; cursor: pointer; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; color: var(--terra); font-size: 16px; }
.qc-ring:active { background: var(--terra-tint); }
.qc-srow__main { min-width: 0; flex: 1; }
.qc-srow__crop { font-family: var(--f-display); font-size: 13.5px; font-weight: 800; color: var(--text-primary); }
.qc-srow__meta { font-size: 11.5px; color: var(--text-muted); }
.qc-chip-od { font-size: 10px; font-weight: 700; color: var(--amber-text); background: var(--amber-tint); border-radius: 5px; padding: 1px 6px; margin-left: 6px; white-space: nowrap; }
.qc-srow__acts { display: flex; gap: 7px; margin-top: 9px; padding-left: 45px; flex-wrap: wrap; }
.qc-mini { font-size: 11.5px; font-weight: 700; border-radius: 8px; padding: 6px 10px; cursor: pointer; border: 1px solid var(--border-mid); background: var(--bg-subtle); color: var(--text-body); }
.qc-mini.amber { border-color: color-mix(in srgb, var(--amber) 40%, transparent); background: var(--amber-tint); color: var(--amber-text); }
.qc-mini.terra { border-color: color-mix(in srgb, var(--terra) 40%, transparent); background: var(--terra-tint); color: var(--terra-text); }
.qc-escape { width: 100%; margin-top: 10px; background: none; border: 1px dashed var(--border-tan); border-radius: 11px; padding: 12px; color: var(--text-secondary); font-size: 12.5px; font-weight: 600; cursor: pointer; }

/* — coverage meter — */
.qc-cov { background: var(--bg-card); border: 1px solid var(--border-mid); border-radius: 13px; padding: 13px; margin: 12px 0; }
.qc-cov__lab { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary); display: flex; justify-content: space-between; align-items: baseline; }
.qc-cov__num { font-family: var(--f-display); font-size: 13px; font-weight: 800; color: var(--green-text); }
.qc-cov__bar { height: 10px; border-radius: 5px; background: var(--bg-subtle); margin-top: 8px; overflow: hidden; display: flex; }
.qc-cov__held { background: var(--green); height: 100%; }
.qc-cov__gain { background: var(--amber); height: 100%; }
.qc-seg { display: flex; gap: 6px; background: var(--bg-subtle); padding: 4px; border-radius: 11px; margin: 4px 0 12px; }
.qc-seg button { flex: 1; border: none; background: none; border-radius: 8px; padding: 9px; font-weight: 700; font-size: 12.5px; color: var(--text-secondary); cursor: pointer; }
.qc-seg button.on { background: var(--bg-card); color: var(--text-primary); box-shadow: 0 1px 3px rgba(0,0,0,0.12); }
.qc-cta { width: 100%; background: var(--terra); color: #fff; border: none; border-radius: 12px; padding: 15px; font-family: var(--f-display); font-weight: 800; font-size: 14px; cursor: pointer; min-height: 52px; margin-top: 4px; }
.qc-cta.green { background: var(--green); }
.qc-note { font-size: 12px; color: var(--text-muted); line-height: 1.45; margin: 8px 2px; }

/* — desktop right-edge drawer layout — */
@media (min-width: 769px) {
  #qcSurface {
    left: auto; right: 0; top: 0; bottom: 0; max-height: none;
    width: 440px; border-radius: 0;
    transform: translateX(100%); box-shadow: none;
  }
  body.capture-open #qcSurface { transform: translateX(0); box-shadow: -10px 0 40px rgba(0,0,0,0.25); }
  #qcScrim { background: rgba(20,28,12,0.35); }
  .qc-grab { display: none; }
  #qcBody { padding-top: 16px; }
}
@media print { #qcSurface, #qcScrim, .m-tab-plus { display: none !important; } }

