/* CodeFlow · 自有外观层: 侧栏工作区外壳 / 胶囊标签 / 仓库卡头 / 首页与工作台 / 命令面板 */

/* ---------- 外壳 ---------- */
.shell { display: flex; min-height: 100vh; width: 100%; }
.sidebar { width: var(--side-w); flex: none; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: #f3f3f0; border-right: 1px solid var(--border-soft); display: flex; flex-direction: column; padding: 16px 12px 12px; z-index: 60; }
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.main-col > main { flex: 1; }

.sb-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 14px; color: var(--text); font-weight: 700; font-size: 16px; letter-spacing: -.2px; }
.sb-brand:hover { text-decoration: none; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--acc) 0%, #6b7cf0 55%, var(--acc-2) 140%); box-shadow: 0 2px 6px rgba(59,91,219,.3); }
.sb-search { display: flex; align-items: center; gap: 8px; width: 100%; height: 34px; padding: 0 10px; margin-bottom: 14px;
  background: var(--card); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); color: var(--faint);
  font: 13.5px var(--sans); cursor: pointer; box-shadow: var(--shadow-sm); }
.sb-search:hover { border-color: var(--border); color: var(--muted); }
.sb-search .kbd { margin-left: auto; }
.kbd { font: 11px var(--mono); color: var(--muted); background: var(--bg-soft); border: 1px solid var(--border-soft);
  border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; line-height: 17px; }
.sb-group { margin-bottom: 14px; }
.sb-title { display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; font-weight: 600; color: var(--faint);
  letter-spacing: .5px; padding: 6px 10px 4px; }
.sb-title a { color: var(--faint); display: flex; } .sb-title a:hover { color: var(--acc); }
.sb-link { display: flex; align-items: center; gap: 10px; padding: 0 10px; height: 34px; border-radius: var(--radius-sm);
  color: #3d3f44; font-weight: 500; position: relative; }
.sb-link .ic { color: var(--faint); }
.sb-link:hover { background: #e9e9e5; text-decoration: none; color: var(--text); }
.sb-link.active { background: var(--card); color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--border-soft); }
.sb-link.active .ic { color: var(--acc); }
.sb-link .num { margin-left: auto; font-size: 11.5px; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 10px;
  background: var(--acc); color: #fff; display: grid; place-items: center; font-weight: 600; }
.sb-link .sub { margin-left: auto; font-size: 11.5px; color: var(--faint); }
.sb-repo { height: 30px; font-weight: 400; font-size: 13.5px; }
.sb-repo span.t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border-soft); }
.sb-user { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border-radius: var(--radius-sm);
  background: none; border: none; cursor: pointer; text-align: left; font: 14px var(--sans); color: var(--text); }
.sb-user:hover { background: #e9e9e5; }
.sb-user .nm { font-weight: 600; line-height: 1.2; } .sb-user .em { font-size: 12px; color: var(--faint); }
.sb-foot .menu { bottom: calc(100% + 6px); top: auto; left: 0; right: 0; }
.sb-new { width: 100%; margin-bottom: 10px; }
.mobile-bar { display: none; }
@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
  body.side-open .sidebar { transform: none; }
  body.side-open::after { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.25); z-index: 55; }
  .mobile-bar { display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 14px; border-bottom: 1px solid var(--border-soft);
    background: var(--card); position: sticky; top: 0; z-index: 50; }
  .wrap { padding: 20px 16px 48px; }
}
.diff-head { top: 0; }
@media (max-width: 900px) { .diff-head { top: 54px; } }

/* 页面内页头 (替代原顶栏的上下文) */
.page-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.eyebrow-text { font-size: 12px; font-weight: 600; letter-spacing: .6px; color: var(--acc); text-transform: uppercase; }

/* ---------- 胶囊标签 ---------- */
.tabs { display: inline-flex; gap: 2px; padding: 4px; background: var(--bg-muted); border-radius: 11px; margin-top: 18px;
  overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.tabs a { height: 32px; padding: 0 12px; border-radius: 8px; border-bottom: none; color: var(--muted); font-weight: 500; font-size: 13.5px; }
.tabs a:hover { color: var(--text); background: rgba(255,255,255,.6); border-bottom: none; }
.tabs a.active { background: var(--card); color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(28,29,31,.1); border-bottom: none; }
.tabs a.active .ic { color: var(--acc); }
.tabs .counter { background: rgba(28,29,31,.07); }
.tabs a.active .counter { background: var(--acc-soft); color: var(--acc); }
.subtabs a.active { border-bottom-color: var(--acc); }
.clone-pop .tabs-mini span { border-bottom-color: var(--acc); }

/* ---------- 仓库卡头 ---------- */
.repo-header { background: transparent; border-bottom: none; }
.repo-header-inner { max-width: 1240px; padding: 28px 32px 0; }
.repo-card-head { background: var(--card); border: 1px solid var(--border-soft); border-radius: 14px; padding: 20px 22px 16px;
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.repo-card-head::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--acc), #6b7cf0, var(--acc-2)); }
.repo-ident { display: flex; gap: 14px; align-items: center; min-width: 0; }
.repo-ava { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 20px; flex: none;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.repo-ava.sm { width: 28px; height: 28px; border-radius: 8px; font-size: 13px; }
.repo-ava.xs { width: 20px; height: 20px; border-radius: 6px; font-size: 10px; }
.repo-title { font-size: 20px; gap: 6px; }
.repo-title .owner { color: var(--muted); font-weight: 400; }
.repo-title strong a { color: var(--text); }
.repo-desc { color: var(--muted); margin-top: 3px; font-size: 14px; }
.repo-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 20px;
  background: var(--bg-soft); border: 1px solid var(--border-soft); font-size: 12.5px; color: var(--muted); }
.chip b { color: var(--text); font-weight: 600; }
a.chip:hover { border-color: var(--border); color: var(--text); text-decoration: none; }

/* 构建流卡 (仓库首页右栏) */
.flow-card { background: var(--card); border: 1px solid var(--border-soft); border-radius: 12px; padding: 14px 16px; }
.flow-card h4 { margin: 0 0 12px; font-size: 13px; color: var(--muted); font-weight: 600; display: flex; justify-content: space-between; }
.mini-flow { display: flex; align-items: center; gap: 0; flex-wrap: wrap; row-gap: 8px; }
.mini-flow .node { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; border: 2px solid var(--border); background: var(--card); color: var(--faint); }
.mini-flow .node.success { border-color: var(--green); color: var(--green); background: var(--green-soft); }
.mini-flow .node.failure { border-color: var(--danger); color: var(--danger); background: var(--danger-soft); }
.mini-flow .node.running { border-color: #d39b00; color: #b07d00; background: var(--warn-soft); animation: pulse 1.2s infinite; }
.mini-flow .node .ic { width: 12px; height: 12px; display: block; vertical-align: 0; }
.mini-flow .node .ic svg { width: 12px; height: 12px; display: block; }
.mini-flow .edge { height: 2px; width: 18px; background: var(--border); flex: none; }
.mini-flow .edge.done { background: var(--green); }
.side-card { background: var(--card); border: 1px solid var(--border-soft); border-radius: 12px; padding: 16px; margin-bottom: 14px; }
.side-card h4 { margin: 0 0 10px; font-size: 13px; color: var(--muted); font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.side-card h4 a { color: var(--muted); } .side-card h4 a:hover { color: var(--acc); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.facts a, .facts div { background: var(--bg-soft); border-radius: 8px; padding: 8px 10px; color: var(--text); text-decoration: none; }
.facts b { display: block; font-size: 17px; } .facts span { font-size: 11.5px; color: var(--muted); }
.facts a:hover { background: var(--acc-soft); }

/* 卡片 / 盒子 跟随暖色 */
.box, .card, .file-box, .diff-file, .comment-box, .stat, .search-hit { background: var(--card); border-color: var(--border-soft); border-radius: var(--radius); }
.box-head, .file-box-head, .comment-head, .diff-head { background: var(--card-2); }
.latest-commit { background: var(--card-2); }
.box-row:hover, .issue-row:hover { background: #fafaf8; }
table.list th { background: var(--card-2); }
.code-block, .md pre { background: #f6f6f3; }
.log-panel { background: #f7f7f4; }
.pipe-graph { background: var(--card-2); }
.state-pill.open { background: var(--green); }
.badge.blue { border-color: rgba(59,91,219,.3); }
.topic { background: var(--acc-soft); color: var(--acc); }
.topic:hover { background: var(--acc); color: #fff; }
.comment-box.self { border-color: rgba(59,91,219,.35); }
.comment-box.self .comment-head { background: var(--acc-soft); border-bottom-color: rgba(59,91,219,.18); }
.settings-nav a.active::before { background: var(--acc); }
.admin-layout { min-height: 100vh; grid-template-columns: 220px minmax(0, 1fr); }
.admin-side { background: transparent; border-right: 1px solid var(--border-soft); }
.footer { border-top: 1px solid var(--border-soft); }
.footer-inner { max-width: 1240px; padding: 22px 32px; }

/* ---------- 命令面板 ---------- */
.palette-mask { position: fixed; inset: 0; background: rgba(28,29,31,.35); z-index: 400; display: flex; justify-content: center; padding-top: 12vh; animation: fade .1s; }
.palette { width: min(620px, 92vw); background: var(--card); border-radius: 14px; box-shadow: 0 24px 70px rgba(0,0,0,.25); overflow: hidden; align-self: flex-start; animation: pop .14s; }
.palette-in { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--border-soft); }
.palette-in input { border: none !important; box-shadow: none !important; height: 54px; font-size: 16px; padding: 0; background: transparent; }
.palette-list { max-height: 52vh; overflow-y: auto; padding: 6px; }
.palette-sec { font-size: 11.5px; color: var(--faint); font-weight: 600; padding: 8px 10px 4px; letter-spacing: .4px; }
.palette-item { display: flex; align-items: center; gap: 10px; padding: 0 10px; height: 40px; border-radius: 8px; cursor: pointer; color: var(--text); }
.palette-item .hint2 { margin-left: auto; font-size: 12px; color: var(--faint); }
.palette-item.on { background: var(--acc-soft); }
.palette-item.on .ic { color: var(--acc); }
.palette-foot { display: flex; gap: 16px; padding: 8px 16px; border-top: 1px solid var(--border-soft); font-size: 12px; color: var(--faint); background: var(--card-2); }

/* ---------- 首页 (未登录) ---------- */
.land { max-width: 1180px; margin: 0 auto; padding: 56px 32px 40px; }
.land-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: center; }
@media (max-width: 960px) { .land-hero { grid-template-columns: 1fr; } }
.land-hero h1 { font-size: 52px; line-height: 1.1; letter-spacing: -1.5px; margin: 14px 0 18px; font-weight: 800; }
.land-hero h1 .flowtext { background: linear-gradient(90deg, var(--acc), #6b7cf0 45%, var(--acc-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.land-hero p.lead { font-size: 17px; color: var(--muted); max-width: 520px; margin: 0 0 28px; }
.land-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.land-cta .btn { height: 44px; padding: 0 20px; font-size: 15px; border-radius: 10px; }
.land-meta { display: flex; gap: 22px; margin-top: 28px; color: var(--muted); font-size: 13px; flex-wrap: wrap; }
.land-meta span { display: flex; gap: 6px; align-items: center; } .land-meta .ic { color: var(--acc); }

/* 动态流水线板 */
.flow-board { background: var(--card); border: 1px solid var(--border-soft); border-radius: 18px; box-shadow: var(--shadow); padding: 18px; position: relative; }
.flow-board::after { content: ""; position: absolute; inset: -40px -30px auto auto; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(91,108,240,.16), transparent 70%); z-index: -1; }
.fb-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; font-size: 13px; }
.fb-commit { display: flex; gap: 10px; align-items: center; padding: 10px 12px; background: var(--card-2); border-radius: 10px; margin-bottom: 14px; font-size: 13px; }
.fb-steps { display: flex; flex-direction: column; gap: 0; }
.fb-step { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: center; padding: 9px 4px; position: relative; }
.fb-step:not(:last-child)::before { content: ""; position: absolute; left: 17px; top: 34px; bottom: -8px; width: 2px; background: var(--border-soft); }
.fb-dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--border); background: var(--card); color: var(--faint); z-index: 1;
  animation-duration: 7s; animation-iteration-count: infinite; }
.fb-dot .ic { width: 13px; height: 13px; display: block; }
.fb-dot .ic svg { width: 13px; height: 13px; display: block; }
.fb-step .nm { font-weight: 500; } .fb-step .tm { font: 12px var(--mono); color: var(--faint); }
.fb-bar { height: 4px; background: var(--bg-muted); border-radius: 4px; overflow: hidden; margin-top: 14px; }
.fb-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--acc), var(--acc-2)); animation: fbbar 7s infinite; }
@keyframes fbbar { 0% { width: 4%; } 80%, 100% { width: 100%; } }
.fb-step:nth-child(1) .fb-dot { animation-name: fb1; } .fb-step:nth-child(2) .fb-dot { animation-name: fb2; }
.fb-step:nth-child(3) .fb-dot { animation-name: fb3; } .fb-step:nth-child(4) .fb-dot { animation-name: fb4; }
.fb-step:nth-child(5) .fb-dot { animation-name: fb5; }
@keyframes fb1 { 0%,4% { border-color: #d39b00; color: #b07d00; background: var(--warn-soft); } 12%,100% { border-color: var(--green); color: var(--green); background: var(--green-soft); } }
@keyframes fb2 { 0%,12% { border-color: var(--border); color: var(--faint); background: #fff; } 14%,26% { border-color: #d39b00; color: #b07d00; background: var(--warn-soft); } 28%,100% { border-color: var(--green); color: var(--green); background: var(--green-soft); } }
@keyframes fb3 { 0%,28% { border-color: var(--border); color: var(--faint); background: #fff; } 30%,44% { border-color: #d39b00; color: #b07d00; background: var(--warn-soft); } 46%,100% { border-color: var(--green); color: var(--green); background: var(--green-soft); } }
@keyframes fb4 { 0%,46% { border-color: var(--border); color: var(--faint); background: #fff; } 48%,62% { border-color: #d39b00; color: #b07d00; background: var(--warn-soft); } 64%,100% { border-color: var(--green); color: var(--green); background: var(--green-soft); } }
@keyframes fb5 { 0%,64% { border-color: var(--border); color: var(--faint); background: #fff; } 66%,78% { border-color: #d39b00; color: #b07d00; background: var(--warn-soft); } 80%,100% { border-color: var(--acc-2); color: #fff; background: var(--acc-2); } }

/* 流程四步 */
.land-sec { margin-top: 88px; }
.land-sec h2 { font-size: 30px; letter-spacing: -.6px; margin: 8px 0 10px; }
.land-sec .sub { color: var(--muted); font-size: 15px; max-width: 560px; }
.journey { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 36px; position: relative; }
.journey::before { content: ""; position: absolute; left: 6%; right: 6%; top: 23px; height: 2px;
  background: repeating-linear-gradient(90deg, var(--acc) 0 8px, transparent 8px 14px); opacity: .5; }
@media (max-width: 860px) { .journey { grid-template-columns: 1fr 1fr; row-gap: 28px; } .journey::before { display: none; } }
.j-step { padding: 0 14px; position: relative; }
.j-ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--card); border: 1px solid var(--border-soft);
  color: var(--acc); box-shadow: var(--shadow-sm); margin-bottom: 16px; position: relative; z-index: 1; }
.j-step .no { font: 600 12px var(--mono); color: var(--faint); }
.j-step h3 { margin: 4px 0 8px; font-size: 17px; }
.j-step ul { margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 13.5px; }
.j-step li { padding: 3px 0; display: flex; gap: 6px; } .j-step li::before { content: "·"; color: var(--acc); font-weight: 700; }

/* Bento */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-top: 32px; }
.bento > div { background: var(--card); border: 1px solid var(--border-soft); border-radius: 16px; padding: 22px; min-height: 170px; position: relative; overflow: hidden; }
.bento .b-wide { grid-column: span 4; } .bento .b-mid { grid-column: span 2; } .bento .b-half { grid-column: span 3; }
@media (max-width: 860px) { .bento > div { grid-column: span 6 !important; } }
.bento h3 { margin: 12px 0 6px; font-size: 16px; } .bento p { margin: 0; color: var(--muted); font-size: 13.5px; }
.bento .tint { background: linear-gradient(160deg, #eef1fd 0%, #fff 60%); }
.bento .ink { background: #1c1d1f; color: #e8e8e6; border-color: #1c1d1f; }
.bento .ink h3 { color: #fff; } .bento .ink p { color: #a9aaa8; }
.store-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.store-chips > span { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--border-soft); font-size: 13px; font-weight: 500; }
.term { font: 12.5px/1.7 var(--mono); margin-top: 14px; color: #d6dcff; }
.term .p { color: #9fb0ff; }
.land-end { margin: 88px 0 20px; background: var(--text); color: #fff; border-radius: 20px; padding: 40px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.land-end h2 { color: #fff; margin: 0 0 6px; font-size: 26px; } .land-end p { margin: 0; color: #b3b4b2; }
.land-end .btn { height: 44px; padding: 0 22px; border-radius: 10px; }

/* ---------- 工作台 ---------- */
.wb-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.wb-head h1 { margin: 4px 0 0; font-size: 26px; letter-spacing: -.4px; }
.wb-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 22px; }
@media (max-width: 900px) { .wb-stats { grid-template-columns: 1fr 1fr; } }
.wb-stat { background: var(--card); border: 1px solid var(--border-soft); border-radius: 12px; padding: 14px 16px; display: flex; gap: 12px; align-items: center; }
.wb-stat .ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.wb-stat .v { font-size: 22px; font-weight: 700; line-height: 1.1; } .wb-stat .k { font-size: 12.5px; color: var(--muted); }
.lanes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 28px; }
@media (max-width: 1100px) { .lanes { grid-template-columns: 1fr; } }
.lane { background: var(--card-2); border: 1px solid var(--border-soft); border-radius: 14px; padding: 12px; min-height: 160px; }
.lane-h { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 10px; font-weight: 600; font-size: 13.5px; }
.lane-h .flex { gap: 6px; }
.lane-item { display: block; background: var(--card); border: 1px solid var(--border-soft); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; color: var(--text); box-shadow: var(--shadow-sm); }
.lane-item:hover { border-color: var(--acc); text-decoration: none; }
.lane-item .t { font-weight: 500; font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lane-item .m { font-size: 12px; color: var(--faint); margin-top: 4px; display: flex; gap: 8px; align-items: center; }
.lane-empty { text-align: center; color: var(--faint); font-size: 13px; padding: 28px 8px; }
.repo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.repo-tile { background: var(--card); border: 1px solid var(--border-soft); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; color: var(--text); }
.repo-tile:hover { border-color: var(--border); box-shadow: 0 6px 18px rgba(28,29,31,.06); text-decoration: none; }
.repo-tile .top { display: flex; gap: 10px; align-items: center; }
.repo-tile .nm { font-weight: 600; } .repo-tile .ow { font-size: 12px; color: var(--faint); }
.repo-tile .ds { font-size: 13px; color: var(--muted); min-height: 19px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.repo-tile .mt { display: flex; gap: 12px; font-size: 12px; color: var(--faint); align-items: center; margin-top: auto; }
.repo-tile .mt span { display: inline-flex; gap: 4px; align-items: center; }

/* ================= 细节整理 (v2) ================= */
/* 色彩: 主色更沉稳, 背景层次更清楚 */
:root { --acc: #0d7f75; --acc-hover: #0a6a62; --acc-soft: #e6f3f1; --acc-2: #5a57d1; --acc-2-soft: #efeefc; --bg: #fafaf8; --sidebar: #f4f4f1; }
.sidebar { background: var(--sidebar); }
.brand-mark { background: var(--acc); box-shadow: none; }

/* 仓库头: 标签并入卡片底部, 去掉渐变条 */
.repo-header-inner { padding: 24px 32px 0; }
.repo-card-head { padding: 20px 22px 0; border-radius: 12px; }
.repo-card-head::before { display: none; }
.repo-card-head .repo-head { align-items: flex-start; }
.repo-actions .btn { height: 30px; }
.repo-chips { margin-top: 12px; }
.chip { background: transparent; }
.tabs.repo-tabs { display: flex; margin: 14px -22px 0; padding: 0 14px; background: transparent; border-radius: 0; border-top: 1px solid var(--border-soft); gap: 0; }
.tabs.repo-tabs a { height: 44px; border-radius: 0; border-bottom: 2px solid transparent; padding: 0 12px; margin-bottom: -1px; }
.tabs.repo-tabs a:hover { background: transparent; color: var(--text); border-bottom-color: var(--border); }
.tabs.repo-tabs a.active { background: transparent; box-shadow: none; border-bottom-color: var(--acc); color: var(--text); }
.repo-header + .wrap { padding-top: 20px; }

/* 代码工具栏 */
.code-bar { gap: 8px; }
.code-bar .select-ref { width: auto; min-width: 150px; height: 32px; }
.code-search { position: relative; display: flex; align-items: center; }
.code-search .ic { position: absolute; left: 9px; color: var(--faint); pointer-events: none; }
.code-search input { width: 200px; height: 32px; min-height: 32px; padding-left: 30px; background: var(--card); transition: width .15s, border-color .12s, box-shadow .12s; }
.code-search input:focus { width: 260px; }

/* 克隆弹层 */
.clone-menu .menu { padding: 0; min-width: 0; }
.clone-pop { width: 360px; padding: 14px; }
.clone-pop .tabs-mini { margin-bottom: 10px; }
.clone-pop .input-group input { flex: 1; min-width: 0; font-size: 12.5px; background: var(--bg-soft); }
.clone-pop .input-group .btn { box-shadow: none; }
.clone-pop .hint { margin: 8px 0 4px; line-height: 1.6; }
.clone-pop .hint a { display: inline; width: auto; padding: 0; color: var(--acc); }
.clone-pop .hint a:hover { background: none; text-decoration: underline; }
.clone-pop > a { border-radius: 6px; }

/* 侧栏卡片 */
.flow-card, .side-card { border-radius: 12px; box-shadow: var(--shadow-sm); }
.side-card .facts a span, .side-card .facts div span { white-space: nowrap; }

/* 通用状态色块 */
.t-acc { background: var(--acc-soft); color: var(--acc); }
.t-acc2 { background: var(--acc-2-soft); color: var(--acc-2); }
.t-green { background: var(--green-soft); color: var(--green); }
.t-purple { background: var(--purple-soft); color: var(--purple); }
.t-warn { background: var(--warn-soft); color: var(--warn); }

/* ================= 管理后台 ================= */
.admin-wrap { max-width: 1240px; padding-top: 24px; }
.admin-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.admin-mark { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--text); color: #fff; }
.admin-top-t { font-size: 20px; font-weight: 700; letter-spacing: -.3px; line-height: 1.2; }
.tabs.admin-tabs { display: flex; margin: 18px 0 24px; padding: 0; background: transparent; border-radius: 0; border-bottom: 1px solid var(--border-soft); gap: 0; }
.tabs.admin-tabs a { height: 42px; border-radius: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs.admin-tabs a:hover { background: transparent; border-bottom-color: var(--border); }
.tabs.admin-tabs a.active { background: transparent; box-shadow: none; border-bottom-color: var(--acc); }
.admin-main { padding: 0; }
.admin-main > .page-head .page-title { font-size: 18px; }
.admin-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .admin-stats { grid-template-columns: 1fr 1fr; } }
.astat { display: flex; gap: 14px; align-items: center; padding: 16px 18px; color: var(--text); box-shadow: var(--shadow-sm); }
a.astat:hover { border-color: var(--border); text-decoration: none; box-shadow: 0 4px 14px rgba(28,29,31,.06); }
.astat .ico { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.astat .k { font-size: 12.5px; }
.astat .v { font-size: 24px; margin-top: 0; line-height: 1.25; }
.admin-2col { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
@media (max-width: 1000px) { .admin-2col { grid-template-columns: 1fr; } }
.admin-2col > .box + .box { margin-top: 0; }
.bars { height: 170px; gap: 14px; padding: 6px 8px 0; }
.bars .bar .stack { max-width: 30px; }
.bars .bar .stack i.zero { height: 3px; background: var(--border-soft); }
.env-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) 18px; gap: 10px; padding: 10px 16px; }
.env-row .k { color: var(--muted); font-size: 13px; }
.env-row .v { text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.env-row > span:last-child:not(.v) { display: flex; justify-content: flex-end; }
.admin-main .box { box-shadow: var(--shadow-sm); }
.admin-main table.list { background: var(--card); }
