/* ============================================================
   百工 · 接入 / v0.3
   登录后直接显示当前部署 SSH + 一段给 AI 的任务书。无表单。
   ============================================================ */
.view-access { padding-top: 18px; }

.ac-page { width: 980px; margin: 0 auto; position: relative; }
.ac-page[hidden], .ac-content[hidden], .ac-gate[hidden], .ac-loading[hidden], .ac-error[hidden], #acReady[hidden] { display: none; }

/* ---------- head ---------- */
.ac-head { display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: end; padding: 10px 0 22px; }
.ac-eyebrow { font: 600 8.5px/1 var(--mono); color: var(--faint); letter-spacing: .18em; text-transform: uppercase; display: flex; align-items: center; gap: 9px; }
.ac-eyebrow::before { content: ''; width: 18px; height: 1px; background: var(--line-3); }
.ac-head h1 { margin: 14px 0 10px; font: 500 54px/1.02 var(--serif); letter-spacing: -.05em; }
.ac-head p { margin: 0; max-width: 680px; font: 400 13px/1.68 var(--sans); color: var(--muted); }
.ac-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; font: 500 9px/1 var(--mono); color: var(--faint); }
.ac-meta b { color: var(--ink-2); font-weight: 500; }
.ac-meta .sep { width: 1px; height: 9px; background: var(--line-2); }
.ac-meta .safe { color: var(--ok-ink); display: inline-flex; align-items: center; gap: 5px; }
.ac-meta .safe i { width: 5px; height: 5px; border-radius: 50%; background: var(--ok); }
.ac-head-badge { display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; background: #fff; font: 500 8px/1 var(--mono); color: var(--faint); white-space: nowrap; }
.ac-head-badge i { width: 5px; height: 5px; border-radius: 50%; background: var(--ok); }

/* ---------- credentials ---------- */
.ac-cred { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 17px 20px 14px; box-shadow: 0 1px 0 rgba(18,20,23,.02); margin-bottom: 14px; }
.ac-cred-head { display: flex; align-items: flex-start; gap: 12px; }
.ac-cred-head .k { font: 600 7px/1 var(--mono); color: var(--faint); letter-spacing: .15em; }
.ac-cred-head h2 { margin: 5px 0 0; font: 600 18px/1.15 var(--sans); letter-spacing: -.03em; }
.ac-only { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; padding: 5px 7px; border: 1px solid #C9F0DF; border-radius: 999px; background: #F2FCF8; font: 500 7px/1 var(--mono); color: var(--ok-ink); white-space: nowrap; }
.ac-only i { width: 5px; height: 5px; border-radius: 50%; background: var(--ok); }
.ac-cred-rows { margin-top: 12px; border-top: 1px solid var(--line); }
.ac-row { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto auto; gap: 9px; align-items: center; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.ac-row:last-child { border-bottom: 0; }
.ac-row .label { font: 500 7.5px/1 var(--mono); color: var(--faint); letter-spacing: .08em; text-transform: uppercase; }
.ac-row .val { font: 500 10px/1.5 var(--mono); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-row .val.missing { color: var(--ac-warn, #B77900); }
.ac-mini { height: 26px; padding: 0 8px; border: 1px solid var(--line); border-radius: 5px; background: #fff; font: 500 7px/1 var(--mono); color: var(--faint); white-space: nowrap; }
.ac-mini:hover { border-color: var(--line-2); color: var(--ink); }
.ac-cred-note { margin: 9px 0 0; font: 400 8px/1.55 var(--sans); color: var(--faint); }
.ac-cred-note b { color: var(--ac-warn, #B77900); font-weight: 500; }

/* ---------- task ---------- */
.ac-task { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: 0 1px 0 rgba(18,20,23,.02); }
.ac-task-head { display: flex; align-items: flex-end; gap: 16px; padding: 14px 18px 12px; border-bottom: 1px solid var(--line); }
.ac-task-head .k { font: 600 7px/1 var(--mono); color: var(--faint); letter-spacing: .15em; }
.ac-task-head h2 { margin: 5px 0 0; font: 600 18px/1.15 var(--sans); letter-spacing: -.03em; }
.ac-task-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.ac-task-meta { font: 500 7.5px/1 var(--mono); color: var(--faint); }
.ac-btn-copy { height: 38px; padding: 0 13px; border-radius: 7px; background: var(--ink); color: #fff; font: 600 9.5px/1 var(--sans); display: inline-flex; align-items: center; gap: 7px; transition: background .15s, opacity .15s; }
.ac-btn-copy:hover { background: #000; }
.ac-btn-copy[disabled] { opacity: .45; cursor: default; }
.ac-btn-copy svg { width: 12px; height: 12px; }
.ac-btn-ghost { height: 32px; padding: 0 10px; border-radius: 6px; background: #fff; border: 1px solid var(--line-2); font: 500 8px/1 var(--mono); color: var(--muted); }
.ac-btn-ghost:hover { border-color: var(--line-3); color: var(--ink); }

.ac-summary { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; padding: 8px 18px; background: rgba(247,248,250,.55); border-bottom: 1px solid var(--line); }
.ac-summary span { font: 500 7.5px/1 var(--mono); color: var(--faint); border: 1px solid var(--line); border-radius: 3px; padding: 4px 5px; background: #fff; }
.ac-summary span:first-child { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.ac-summary i { font-style: normal; color: var(--line-3); font: 500 7px/1 var(--mono); }

.ac-code { background: var(--code); }
.ac-code-head { height: 31px; display: flex; align-items: center; gap: 7px; padding: 0 12px; border-bottom: 1px solid var(--code-line); background: #191C23; font: 500 7px/1 var(--mono); color: #7E8796; }
.ac-code-head .dots { display: flex; gap: 3px; margin-right: 2px; }
.ac-code-head .dots i { width: 5px; height: 5px; border-radius: 50%; background: #3A3F4A; }
.ac-code-head .size { margin-left: auto; color: #5E6675; }
.ac-code-head button { color: #A9B2C1; border: 1px solid #333947; border-radius: 3px; padding: 3px 5px; font: 500 6.5px/1 var(--mono); }
.ac-code-head button:hover { color: #fff; border-color: #4A5263; }
.ac-code-head button[disabled] { opacity: .35; cursor: default; }
.ac-code pre { margin: 0; padding: 15px 17px 18px; max-height: 560px; overflow: auto; font: 400 9.4px/1.72 var(--mono); color: #C9D1DE; white-space: pre-wrap; word-break: break-word; tab-size: 2; }
.ac-code pre::-webkit-scrollbar { width: 8px; }
.ac-code pre::-webkit-scrollbar-thumb { background: #343A47; border-radius: 4px; border: 2px solid var(--code); }
.ac-code .ph { color: #8FE8C6; font-weight: 600; }
.ac-code .warn { color: #FF9A7A; }
.ac-code .dim { color: #6F7888; }

.ac-notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 13px 18px; border-top: 1px solid var(--line); background: #fff; }
.ac-notes b { display: block; font: 600 8.5px/1 var(--sans); color: var(--ink-2); }
.ac-notes p { margin: 5px 0 0; font: 400 7.8px/1.55 var(--sans); color: var(--faint); }
.ac-notes .ok b { color: var(--ok-ink); }
.ac-notes .no b { color: var(--danger); }
.ac-warn { padding: 9px 18px 10px; border-top: 1px solid #F2E3C2; background: #FFFBF1; font: 400 8px/1.5 var(--sans); color: var(--muted); }
.ac-warn b { color: #B77900; font-weight: 600; }

/* ---------- states ---------- */
.ac-loading { padding: 46px 20px; text-align: center; border: 1px dashed var(--line-2); border-radius: 10px; font: 500 9px/1.6 var(--mono); color: var(--faint); background: rgba(255,255,255,.5); }
.ac-error { padding: 24px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.ac-error b { display: block; font: 600 12px/1.3 var(--sans); color: var(--danger); }
.ac-error p { margin: 6px 0 12px; font: 400 9px/1.6 var(--mono); color: var(--faint); }

/* ---------- gate ---------- */
.ac-gate { min-height: 520px; display: grid; place-items: center; }
.ac-gate-card { width: 460px; padding: 26px 28px; background: #fff; border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 14px 40px rgba(18,20,23,.06); }
.ac-gate-card .ac-eyebrow { margin-bottom: 14px; }
.ac-gate-card h2 { margin: 0 0 8px; font: 600 28px/1.1 var(--serif); letter-spacing: -.04em; }
.ac-gate-card p { margin: 0 0 18px; font: 400 11px/1.7 var(--sans); color: var(--muted); }
.ac-gate-card .ac-btn-copy { width: max-content; }

.ac-page-foot { margin-top: 24px; padding-top: 12px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font: 400 7.5px/1.5 var(--mono); color: var(--ghost); }
.ac-page-foot b { color: var(--faint); font-weight: 500; }
.ac-page-foot .draft { margin-left: auto; color: var(--accent); border: 1px solid var(--accent-line); background: var(--accent-soft); padding: 4px 6px; border-radius: 3px; letter-spacing: .05em; }

@media (max-width: 1240px) {
  .ac-page { width: auto; }
}
@media (max-width: 720px) {
  .ac-head { grid-template-columns: 1fr; gap: 14px; }
  .ac-head h1 { font-size: 40px; }
  .ac-cred { padding: 15px 14px 12px; }
  .ac-row { grid-template-columns: 50px minmax(0, 1fr) auto; }
  .ac-row .ac-mini { display: none; }
  .ac-task-head { align-items: flex-start; flex-direction: column; gap: 10px; }
  .ac-task-actions { width: 100%; justify-content: space-between; }
  .ac-notes { grid-template-columns: 1fr; gap: 9px; }
  .ac-code pre { max-height: 430px; font-size: 8.8px; }
  .ac-head-badge { display: none; }
}
