/* "Check my setup": the agent's pre-shift check (agent-preshift.js, docs/PRESHIFT_CHECK.md). */
.pre-view {
  position: fixed; inset: 0; z-index: 70; background: rgba(15, 42, 42, 0.45);
  display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 24px 16px;
}
.pre-card {
  width: min(640px, 100%); background: var(--panel); color: var(--text); border-radius: var(--radius);
  box-shadow: var(--shadow-lift); padding: 18px 20px 20px; box-sizing: border-box;
}
.pre-head { display: flex; align-items: center; gap: 10px; }
.pre-head h2 { margin: 0; font-size: 20px; }
.pre-head select { width: auto; min-height: 40px; }
.pre-head .ghost { min-width: 44px; min-height: 44px; color: var(--text); }
.pre-mark {
  width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-strong); font-weight: 800;
}
.pre-lead { margin: 6px 0 12px; }
.pre-sign { background: var(--bg); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 12px; }
.pre-sign .sub { margin: 0 0 6px; }
.pre-signrow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pre-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pre-row {
  display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start;
  padding: 8px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border);
}
.pre-row.hidden { display: none; }
.pre-icon {
  width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center;
  font-weight: 800; font-size: 15px; background: var(--pause-soft); color: var(--pause-text);
}
.pre-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-height: 28px; }
.pre-label { font-weight: 700; }
.pre-value { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.pre-fix { margin: 4px 0 0; font-size: 14px; }
.pre-pass .pre-icon { background: var(--ok-soft); color: var(--ok-text); }
.pre-warn { border-color: var(--warn); background: var(--warn-soft); }
.pre-warn .pre-icon { background: var(--warn); color: #2a1800; }
.pre-warn .pre-fix { color: var(--warn-text); }
.pre-fail { border-color: var(--bad); background: var(--bad-soft); }
.pre-fail .pre-icon { background: var(--bad); color: var(--on-strong); }
.pre-fail .pre-fix { color: var(--bad-text); }
.pre-skip { opacity: 0.75; }
.pre-running .pre-icon { background: var(--accent-soft); color: var(--accent-strong); animation: pre-pulse 1s ease-in-out infinite; }
@keyframes pre-pulse { 50% { opacity: 0.45; } }
@media (prefers-reduced-motion: reduce) { .pre-running .pre-icon { animation: none; } }
.pre-ask { margin: 12px 0 0; padding: 12px; border-radius: var(--radius-sm); background: var(--accent-soft); }
.pre-ask .row { gap: 8px; flex-wrap: wrap; }
.pre-q { margin: 0 0 8px; font-weight: 700; font-size: 17px; }
.pre-meter { display: block; height: 14px; border-radius: var(--pill); background: var(--panel); overflow: hidden; border: 1px solid var(--border); }
.pre-meter-bar { display: block; height: 100%; width: 0; background: var(--ok); transition: width 0.05s linear; }
.pre-summary { margin-top: 14px; }
.pre-big { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; margin: 0 0 6px; }
.pre-big.pre-pass { color: var(--ok-text); }
.pre-big.pre-warn { color: var(--warn-text); }
.pre-big.pre-fail { color: var(--bad-text); }
.pre-big .pre-icon { width: 34px; height: 34px; font-size: 18px; }
.pre-todo { margin: 6px 0; padding-left: 20px; }
.pre-todo li { margin: 3px 0; }
.pre-actions { margin-top: 14px; justify-content: flex-end; }
.pre-openlogin { margin-top: 8px; }
.pre-held {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 12px;
  padding: 10px 14px; border-radius: var(--radius-sm); background: var(--warn-soft); color: var(--warn-text); font-weight: 700;
}
.pre-held.hidden, .pre-view.hidden, .pre-ask.hidden, .pre-summary.hidden, .pre-fix.hidden, .pre-sign.hidden { display: none; }
body.pre-open { overflow: hidden; }
@media (max-width: 640px) {
  .pre-view { padding: 0; align-items: stretch; }
  .pre-card { border-radius: 0; min-height: 100%; padding: 14px 16px calc(20px + env(safe-area-inset-bottom)); }
  .pre-signrow { grid-template-columns: 1fr; }
  .pre-actions button { flex: 1; min-height: 48px; }
}
