:root {
  --bg: #f5f5f7;
  --panel: #fff;
  --ink: #1d1d1f;
  --ink-2: #3a3a3c;
  --muted: #6e6e73;
  --line: #e5e5e7;
  --line-strong: #d1d1d6;
  --brand: #0f766e;
  --brand-ink: #115e59;
  --brand-weak: #e7f5f3;
  --green: #248a3d;
  --red: #d70015;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 14px 36px -24px rgba(0,0,0,.26);
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--bg); font: 13.5px/1.5 system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; }
button, input, select, textarea { font: inherit; }
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-panel { display: grid; place-items: center; padding: 32px; background: #fff; }
.auth-inner { width: min(420px, 100%); }
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.brand-mark { width: 38px; height: 38px; border-radius: 8px; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 700; }
.brand-name { display: block; font-weight: 700; }
.brand-sub, .brand-text span, .field-hint, .hint, .subtitle { color: var(--muted); }
h1 { margin: 0 0 8px; font-size: 28px; }
.field-label { display: block; margin: 14px 0 6px; font-weight: 600; }
.input, .select, .textarea { width: 100%; min-height: 40px; border: 1px solid rgba(60,60,67,.18); border-radius: 6px; padding: 9px 11px; background: #fff; color: var(--ink); }
.textarea { min-height: 96px; resize: vertical; font-family: var(--mono); font-size: 12px; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15,118,110,.18); }
.btn { min-height: 40px; border-radius: 6px; border: 1px solid transparent; padding: 9px 14px; font-weight: 650; cursor: pointer; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--brand-ink); }
.btn-neutral { background: #fff; color: var(--ink-2); border-color: var(--line-strong); }
.btn-block { width: 100%; margin-top: 18px; }
.btn-lg { min-height: 44px; }
.auth-visual { display: grid; place-items: center; background: linear-gradient(160deg, #e7f5f3, #f5f5f7 55%, #eaf4ff); padding: 32px; }
.visual-card { width: min(460px, 100%); background: rgba(255,255,255,.8); border: 1px solid #fff; border-radius: 16px; box-shadow: var(--shadow); padding: 18px; }
.visual-head { display: flex; gap: 6px; align-items: center; color: var(--muted); margin-bottom: 16px; }
.visual-head i, .console-head i { width: 10px; height: 10px; border-radius: 50%; background: #ef4444; display: inline-block; }
.visual-head i:nth-child(2) { background: #f59e0b; }
.visual-head i:nth-child(3) { background: #22c55e; }
.fake-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.fake-metrics div { background: #fff; border-radius: 10px; padding: 12px; }
.fake-metrics span { display: block; color: var(--muted); font-size: 12px; }
.topbar { position: sticky; top: 0; z-index: 5; background: rgba(245,245,247,.86); backdrop-filter: blur(16px); border-bottom: 1px solid rgba(60,60,67,.12); }
.topbar-inner { max-width: 1180px; margin: 0 auto; min-height: 64px; padding: 10px 24px; display: flex; align-items: center; justify-content: space-between; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.topnav, .user-chip { display: flex; align-items: center; gap: 8px; }
.user-chip, .navlink { border: 1px solid rgba(60,60,67,.12); background: rgba(255,255,255,.7); border-radius: 8px; padding: 6px 10px; }
.navlink { cursor: pointer; color: inherit; text-decoration: none; }
.workspace { max-width: 1180px; margin: 0 auto; padding: 24px; display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 16px; align-items: start; }
.col-main, .col-side { display: flex; flex-direction: column; gap: 16px; }
.col-side { position: sticky; top: 80px; }
.card { background: rgba(255,255,255,.94); border: 1px solid rgba(60,60,67,.08); border-radius: 8px; box-shadow: var(--shadow); }
.card-pad { padding: 18px; }
.sec-head, .run-bar, .account-login-row, .ops-grid, .credit-presets { display: flex; gap: 10px; align-items: center; }
.sec-head { justify-content: space-between; margin-bottom: 12px; }
.sec-title { font-weight: 700; }
.sec-step, .auto-tag, .pill { font-size: 11px; color: var(--muted); background: #ededf0; border-radius: 999px; padding: 2px 8px; }
.seg { display: inline-flex; background: rgba(118,118,128,.12); border-radius: 8px; padding: 3px; }
.seg-item { border: 0; background: transparent; border-radius: 6px; padding: 6px 12px; cursor: pointer; color: var(--muted); font-weight: 650; }
.seg-item.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.linkbtn { border: 0; background: transparent; color: var(--red); cursor: pointer; }
.field { margin-top: 12px; }
.sublabel { margin: 16px 0 8px; font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--muted); }
.pkg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pkg { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 12px; cursor: pointer; }
.pkg.active { border-color: var(--brand); background: var(--brand-weak); box-shadow: 0 0 0 1px var(--brand); }
.pkg-name, .pkg-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pkg-meta { color: var(--muted); margin-top: 6px; font-size: 12px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.credit-box { margin-top: 10px; }
.credit-presets { margin: 8px 0; flex-wrap: wrap; }
.credit-presets button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 10px; cursor: pointer; }
.credit-presets button.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.disc summary { cursor: pointer; font-weight: 650; margin-top: 8px; }
.grid { display: grid; gap: 10px; margin-top: 10px; }
.c2 { grid-template-columns: 1fr 1fr; }
.card-preview { margin-top: 8px; font-family: var(--mono); background: #f8f8fa; border-radius: 8px; padding: 8px 10px; }
.run-bar { align-items: stretch; flex-wrap: wrap; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 180px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fff; }
.run-actions { display: flex; gap: 8px; margin-left: auto; }
.ops-grid { display: grid; grid-template-columns: 1fr 1fr; }
.account-login-row { margin-top: 8px; }
.account-login-row .input { flex: 1; }
.error { color: var(--red); }
.ok { color: var(--green); }
.status-box { margin-top: 12px; display: grid; gap: 6px; }
.status-box div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding: 6px 0; }
.proc-now { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.proc-now .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.steps li { color: var(--muted); }
.steps li.on { color: var(--brand-ink); font-weight: 700; }
.steps li.done { color: var(--green); }
.steps li.bad { color: var(--red); }
.out { white-space: pre-wrap; background: #f8f8fa; border-radius: 8px; padding: 10px; margin: 10px 0 0; }
.console { background: #1c1c1e; color: #f5f5f7; border-radius: 8px; overflow: hidden; }
.console-head { display: flex; justify-content: space-between; padding: 10px 12px; color: #aeaeb2; }
.console-tool { border: 0; background: transparent; color: inherit; cursor: pointer; }
.console-body { max-height: 280px; overflow: auto; padding: 0 12px 12px; font-family: var(--mono); font-size: 12px; }
.console-empty { color: #8e8e93; }
.log-line { margin: 4px 0; }
.log-time { color: #8e8e93; margin-right: 6px; }
.mono { font-family: var(--mono); }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.navlink.is-primary { background: var(--brand); color: #fff; border-color: transparent; text-decoration: none; }
@media (max-width: 900px) {
  .auth-page, .workspace, .pkg-grid, .c2 { grid-template-columns: 1fr; }
  .auth-visual, .col-side { position: static; }
  .run-actions { margin-left: 0; width: 100%; }
  .run-actions .btn { flex: 1; }
}
