/* 作者：youwei。桌面集中展示分支与队列，手机扫码页优先保留版本和安装入口。 */
:root { --ink: #182c2c; --muted: #778381; --green: #126d56; --line: #e3e9e5; --paper: #f4f6f3; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif; color: var(--ink); background: var(--paper); font-synthesis: none; }
* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { opacity: .48; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid #67bb9b; outline-offset: 3px; }
a { color: var(--green); text-decoration: none; }
[hidden] { display: none !important; }
.topbar { height: 82px; display: flex; align-items: center; justify-content: space-between; padding: 0 5%; border-bottom: 1px solid var(--line); background: #fff; }
.brand { display: flex; gap: 13px; align-items: center; color: var(--ink); font-size: 20px; font-weight: 750; }
.brand small { font-size: 13px; font-weight: 400; color: var(--muted); margin-left: 12px; padding-left: 15px; border-left: 1px solid var(--line); }
.brand-mark { display: grid; place-items: center; width: 36px; height: 39px; color: white; background: var(--green); border-radius: 12px 4px 12px 4px; font-size: 28px; font-style: italic; }
.connection { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.connection::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #a8afab; }
.connection.online::before { background: #22a47a; box-shadow: 0 0 0 4px #eff8f1; }
main { max-width: 1376px; padding: 48px 40px 24px; margin: 0 auto; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 34px; }
.eyebrow { font-size: 10px; letter-spacing: 2px; color: var(--green); font-weight: 700; }
h1 { font-size: clamp(23px, 2.7vw, 34px); font-weight: 650; letter-spacing: -1px; margin: 13px 0 12px; }
.page-heading p { color: var(--muted); font-size: 13px; margin: 0; line-height: 1.8; }
.platform { color: #537360; font-size: 12px; border: 1px solid #d5e1d5; padding: 9px 15px; border-radius: 30px; white-space: nowrap; }
.workspace { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start; }
.panel { border: 1px solid var(--line); background: #fff; border-radius: 14px; }
.branches { padding: 22px 14px 16px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 9px 20px; }
h2 { margin: 0; font-size: 15px; font-weight: 650; }
.count { border-radius: 6px; padding: 3px 7px; background: #f0f4f0; color: var(--muted); font-size: 11px; }
input[type=search] { width: 100%; background: #f7f8f5; border: 1px solid #e9ede6; border-radius: 8px; height: 39px; padding: 0 12px; font-size: 12px; color: var(--ink); }
.branch-list { margin-top: 16px; max-height: 460px; overflow: auto; }
.branch-item { border: 0; background: transparent; display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 13px 12px; margin: 3px 0; border-radius: 8px; color: #667671; font-size: 12px; }
.branch-item:hover { background: #f4f7f3; }
.branch-item.selected { background: #e9f2eb; color: var(--green); font-weight: 650; }
.branch-symbol { font-size: 20px; }
.branch-name { overflow-wrap: anywhere; line-height: 1.5; }
.aside-note { color: #929c94; font-size: 10px; line-height: 1.8; padding: 15px 10px 0; border-top: 1px solid var(--line); margin: 20px 0 0; }
.branch-summary { padding: 28px 30px; display: flex; gap: 24px; justify-content: space-between; min-height: 270px; }
.summary-main { min-width: 0; flex: 1; }
#selected-branch { font-size: 24px; margin-top: 11px; overflow-wrap: anywhere; }
.muted { color: var(--muted); font-size: 12px; line-height: 1.6; }
.configuration { display: inline-flex; padding: 4px; background: #f0f3ef; border-radius: 9px; margin: 13px 0 22px; }
.configuration button { background: transparent; border: 0; color: var(--muted); padding: 8px 22px; border-radius: 6px; font-size: 12px; }
.configuration button.active { background: #fff; box-shadow: 0 1px 5px #233d2310; color: var(--green); font-weight: 650; }
.primary, .secondary { display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; padding: 12px 20px; border: 1px solid transparent; font-size: 12px; font-weight: 600; min-height: 42px; }
.primary { background: var(--green); color: white; }
.primary:hover { background: #0d5845; }
.secondary { background: #fff; color: var(--green); border-color: #dce5dd; }
.build-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.qr-panel { display: flex; flex-direction: column; align-items: center; padding: 0 4px 0 30px; border-left: 1px dashed var(--line); flex-shrink: 0; }
.qr-panel img { border: 1px solid var(--line); border-radius: 8px; }
.qr-panel strong { font-size: 11px; margin: 12px 0 6px; }
.qr-panel span { font-size: 9px; color: var(--muted); }
.text-button { border: 0; background: transparent; color: var(--green); font-size: 11px; padding: 12px; }
.share-actions { display: flex; align-items: center; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 28px 1px 14px; }
.section-heading h2 { font-size: 14px; }
.release-card { padding: 25px 30px; }
.release-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.badge { display: inline-flex; padding: 4px 8px; border-radius: 5px; font-size: 10px; font-weight: 550; white-space: nowrap; background: #eff2ed; color: #617061; }
.badge.succeeded { background: #eaf5ed; color: #208263; }
.badge.running { background: #eaf1fe; color: #496bba; }
.badge.queued { background: #fbf3df; color: #9b7b31; }
.badge.failed { background: #fcefed; color: #b66357; }
.version-title { font-size: 23px; margin: 10px 0 4px; font-weight: 650; }
.release-heading p { margin: 7px 0; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; color: #6c8276; }
.revision { padding: 7px 10px; background: #f4f6f2; border-radius: 6px; }
.download-actions { display: flex; gap: 10px; margin-top: 21px; flex-wrap: wrap; }
.commits { border-top: 1px solid var(--line); margin-top: 23px; padding-top: 20px; }
.commits h3 { font-size: 11px; color: #78877c; font-weight: 550; margin: 0 0 16px; }
.commit-list { padding: 0; margin: 0; list-style: none; }
.commit-item { display: flex; align-items: baseline; gap: 18px; padding: 8px 0; }
.commit-description { display: grid; min-width: 0; gap: 4px; }
.commit-subject { font-size: 12px; overflow-wrap: anywhere; line-height: 1.5; }
.commit-description small { font-size: 10px; }
.history { overflow: hidden; }
.history-item + .history-item { border-top: 1px solid var(--line); }
.history-summary { display: flex; align-items: center; gap: 20px; cursor: pointer; padding: 19px 24px; list-style: none; }
.history-summary::-webkit-details-marker { display: none; }
.history-summary::after { content: "+"; font-size: 16px; color: #899789; margin-left: auto; }
details[open] > summary::after { content: "−"; }
.history-config { font-size: 11px; color: #778779; }
.history-summary time { margin-left: auto; font-size: 11px; }
.history-body { padding: 0 25px 24px; overflow-wrap: anywhere; }
.build-error { color: #a05a4c; background: #fff8f3; border-radius: 8px; padding: 14px; font-size: 12px; white-space: pre-wrap; }
.empty { color: #8a978c; font-size: 12px; text-align: center; padding: 30px 12px; line-height: 1.8; }
.notice { background: #e7f1ea; color: #28634b; border: 1px solid #cbded0; padding: 14px 18px; border-radius: 9px; margin-bottom: 24px; font-size: 12px; overflow-wrap: anywhere; }
.notice.error { background: #fff2eb; color: #925638; border-color: #edd4c5; }
footer { text-align: center; color: #96a092; font-size: 10px; padding-top: 38px; line-height: 2; }
footer span { padding: 0 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.public-mode main { max-width: 940px; }
/* 登录页使用现有门户色彩与布局，窄屏输入保持 16px，避免 iPhone 聚焦时自动放大页面。 */
.account-actions { display: flex; align-items: center; gap: 14px; }
/* 两个独立入口在窄屏也保持可见，当前页面通过文字和底色共同标识。 */
.page-navigation { display: flex; gap: 6px; white-space: nowrap; }
.page-navigation a { padding: 8px 10px; border-radius: 7px; font-size: 12px; text-decoration: none; color: var(--ink); }
.page-navigation a[aria-current="page"] { background: #e7f1ea; color: #28634b; }
.login-main { max-width: 540px; padding: 64px 24px; }
.login-card { padding: 34px; }
.login-card h1 { font-size: 28px; }
.login-card form { margin-top: 28px; }
.login-card label { display: block; font-size: 13px; margin: 18px 0 9px; }
.login-card input { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fafbf8; font-size: 16px; }
.login-card .primary { width: 100%; margin-top: 24px; font-size: 14px; }
.login-card .notice { margin: 18px 0 0; }
.login-note { margin: 24px 0 0; text-align: center; }
@media (max-width: 480px) { .login-main { padding: 32px 18px; } .login-card { padding: 26px 22px; } .account-actions { gap: 3px; } .account-actions .connection { display: none; } .page-navigation a { padding: 8px; } }
.public-mode .workspace { grid-template-columns: minmax(0, 1fr); }
.public-mode .branch-summary { min-height: auto; }
.public-mode .configuration { margin-bottom: 0; }
@media (max-width: 1000px) { .workspace { grid-template-columns: 210px minmax(0, 1fr); gap: 16px; } main { padding: 35px 24px 20px; } .branch-summary { padding: 24px; } .qr-panel { padding-left: 20px; } .qr-panel span { max-width: 120px; text-align: center; line-height: 1.6; } .history-summary { gap: 12px; padding: 18px; } }
@media (max-width: 760px) { .topbar { height: 68px; padding: 0 20px; } .brand { font-size: 17px; } .brand small { display: none; } .connection { font-size: 10px; } main { padding: 30px 16px 18px; } .page-heading { margin-bottom: 24px; } .platform { display: none; } .workspace { grid-template-columns: minmax(0, 1fr); } .branches { padding: 15px; } .branch-list { max-height: 155px; } .aside-note { display: none; } .panel-heading { padding-bottom: 13px; } .branch-summary { padding: 22px; } #selected-branch { font-size: 20px; } .qr-panel { padding-left: 12px; } .qr-panel img { width: 105px; height: 105px; } .qr-panel span { max-width: 110px; } .release-card { padding: 22px; } .history-summary { flex-wrap: wrap; gap: 10px; } .history-summary time { font-size: 9px; } .history-config { display: none; } .commit-item { gap: 12px; } footer span { padding: 0 3px; } }
@media (max-width: 410px) { .branch-summary { flex-direction: column; } .qr-panel { border-left: 0; border-top: 1px dashed var(--line); padding: 20px 0 0; } .history-summary { padding: 16px 12px; gap: 7px; } .history-summary time { font-size: 9px; } }

/* 管理二维码与当前成功包绑定；手机保持可扫描尺寸，下载中心另用更大的独立样式。 */
.qr-panel img { width: 176px; height: 176px; }
@media (max-width: 760px) { .branch-summary { flex-direction: column; } .qr-panel { border-left: 0; border-top: 1px dashed var(--line); padding: 18px 0 0; } }

/* 安装包生命周期操作与构建入口分开排列，移动端仍可查看完整版本信息。 */
.artifact-management { padding: 24px; margin-top: 24px; }
.artifact-management input { width: 90px; }
.artifact-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid #e7e9ed; flex-wrap: wrap; }

/* 全局设置脱离分支工作区；窄屏改密表单保持可用且不挤压原页面。 */
.global-settings { margin-bottom: 24px; }
#password-dialog { width: min(440px, calc(100% - 32px)); border: 1px solid var(--line); border-radius: 16px; padding: 28px; color: var(--ink); }
#password-dialog::backdrop { background: rgb(18 44 36 / 35%); }
#password-form { display: grid; gap: 12px; }
#password-form h2, #password-form p { margin: 0; }
#password-form input { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 6px; }
.password-actions { display: flex; justify-content: flex-end; gap: 12px; }
#password-message { color: #a05a4c; }

/* 两行分支标签同时呈现名称与最新提交时间。 */
.branch-label { display: grid; gap: 4px; min-width: 0; }
.branch-label small { font-size: 10px; font-weight: 400; }

/* 可选标签邻接发起构建，成功包与历史记录使用相同的强调样式。 */
.build-composer { display: grid; gap: 18px; max-width: 480px; padding: 18px; border: 1px solid #e1e9e3; border-radius: 12px; background: #f7faf8; }
.build-label-field { display: grid; gap: 10px; min-width: 0; }
.build-label-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.build-label-heading label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; }
.optional-label { color: #708078; background: #eaf0ec; border-radius: 4px; padding: 2px 6px; font-size: 10px; font-weight: 400; }
#build-label-count { font-size: 11px; font-variant-numeric: tabular-nums; color: #77877e; white-space: nowrap; }
.build-label-field input { width: 100%; min-width: 0; min-height: 46px; padding: 12px 14px; background: white; color: var(--ink); border: 1px solid #d9e3dc; border-radius: 8px; font-size: 14px; }
.build-label-field input::placeholder { color: #91a097; }
#build-label-hint { margin: 0; color: #7a8980; font-size: 11px; line-height: 1.6; }
.build-composer .build-actions { justify-content: space-between; gap: 12px; padding-top: 16px; border-top: 1px solid #e1e9e3; }
#build-button { min-height: 46px; min-width: 140px; font-size: 13px; gap: 12px; white-space: nowrap; }
.build-queue-note { font-size: 11px; line-height: 1.7; color: #6e8074; }
/* 中等窗口把二维码放到表单下方，保证输入与提交区域始终有足够宽度。 */
@media (min-width: 761px) and (max-width: 1100px) { .branch-summary { flex-direction: column; } .qr-panel { width: 100%; border-left: 0; border-top: 1px dashed var(--line); padding: 20px 0 0; } }
@media (max-width: 480px) { .build-composer { padding: 15px; } .build-composer .build-actions { flex-direction: column; align-items: stretch; } #build-button { width: 100%; } .build-queue-note { text-align: center; } .build-label-field input { font-size: 16px; } }
.build-label-badge { display: inline-block; padding: 6px 10px; border-radius: 6px; background: #ede5ff; color: #512b88; font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }

/* 管理页沿用下载中心的蓝灰卡片，登录页保留原有样式。 */
.build-admin { --ink: #202e3d; --muted: #52677e; --green: #243d5a; --line: #e1e5e8; background: #f5f6f8; color: var(--ink); }
.build-admin .topbar { height: auto; min-height: 76px; gap: 12px; padding: 12px max(16px, calc((100% - 1280px) / 2)); }
.build-admin main { padding-top: 30px; }
.build-admin .page-heading { margin-bottom: 22px; }
.build-admin .brand { flex: none; }
.build-admin .account-actions { flex-wrap: wrap; justify-content: flex-end; }
.build-admin .branch-item { color: var(--muted); border: 1px solid transparent; }
.build-admin .branch-item:hover, .build-admin .branch-item.selected { background: #edf3fa; }
.build-admin .branch-item.selected { border-color: #b6cbe2; color: var(--green); }
.build-admin .branch-list { margin-top: 8px; }
.build-admin .aside-note { margin-top: 10px; color: var(--muted); }
.build-admin .build-overview { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.build-admin .branch-summary { min-height: 0; display: block; padding: 22px; }
.build-admin .build-field-title { font-size: 13px; font-weight: 650; margin: 16px 0 0; }
.build-admin .configuration { margin: 8px 0 12px; background: #edf2f8; }
.build-admin .configuration button.active { background: #243d5a; color: #fff; }
.build-admin .build-composer { max-width: none; padding: 14px; gap: 12px; background: #f5f8fc; border-color: #e1e8f0; }
.build-admin .build-actions { border-color: #e1e8f0; padding-top: 12px; }
.build-admin .primary:hover { background: #182d47; }
.build-admin .admin-queue { margin: 0; padding: 18px; }
.build-admin .admin-queue .queue-hint { margin: 7px 0 0; }
.build-admin .admin-queue .queue-item { grid-template-columns: minmax(0, 1fr) auto; gap: 5px 8px; }
.build-admin .admin-queue .queue-status { grid-column: 1 / -1; }
.build-admin .admin-queue .queue-time, .build-admin .admin-queue .queue-label { grid-column: 1 / -1; }
.build-admin .build-results { display: flex; flex-wrap: wrap; gap: 16px; align-items: start; }
.build-admin .build-results .release-card { flex: 1 1 300px; min-width: 0; }
.build-admin .build-results .qr-panel { width: min(100%, 220px); padding: 12px; border: 1px solid #e1e8f0; border-radius: 12px; background: #f5f8fc; }
.build-admin .build-results .qr-panel img { width: min(100%, 152px); height: auto; aspect-ratio: 1; }
.build-admin .build-results .qr-panel span { max-width: none; text-align: center; }
.build-admin .global-settings { margin: 24px 0 0; }
@media (min-width: 1120px) { .build-admin .build-overview { grid-template-columns: minmax(0, 1fr) minmax(0, 255px); } }
@media (max-width: 760px) {
  .build-admin .branch-list { max-height: 136px; }
  .build-admin .branch-summary { padding: 16px; }
  .build-admin .account-actions { gap: 0; }
  .build-admin .brand-mark { display: none; }
  .build-admin .topbar .page-navigation a[aria-current] { display: none; }
  .build-admin .topbar .text-button { padding: 8px; }
}
