:root { color-scheme: light; --ink:#201b18; --muted:#6f665f; --line:#e8dfd5; --paper:#fffdf9; --accent:#9d4f1d; --accent-dark:#7d3b13; }
* { box-sizing: border-box; }
body { margin:0; min-height:100vh; color:var(--ink); background:#f4efe8; font:16px/1.65 system-ui,-apple-system,"Segoe UI","Microsoft YaHei",sans-serif; }
.login-shell { display:grid; place-items:center; padding:24px; background:radial-gradient(circle at 20% 10%,#fff9ed,transparent 42%),#eee5da; }
.login-card,.script-card { width:min(100%,560px); background:var(--paper); border:1px solid var(--line); border-radius:22px; box-shadow:0 18px 55px rgba(63,42,27,.10); }
.login-card { padding:34px; }
.eyebrow { margin:0 0 8px; color:var(--accent); font-size:12px; font-weight:800; letter-spacing:.14em; }
h1 { margin:0 0 10px; font-size:clamp(28px,7vw,42px); line-height:1.16; }
.muted { color:var(--muted); }
label { display:block; margin-top:18px; font-weight:700; }
input,select { width:100%; margin-top:7px; padding:13px 14px; border:1px solid #cfc3b7; border-radius:11px; background:white; font:inherit; }
input:focus { outline:3px solid #efd2bd; border-color:var(--accent); }
button { border:0; border-radius:11px; background:var(--accent); color:white; padding:13px 20px; font:inherit; font-weight:800; cursor:pointer; }
.login-card button { width:100%; margin-top:24px; }
button:hover { background:var(--accent-dark); }
a { color:var(--accent); }
.error { padding:10px 12px; border-radius:9px; color:#8d1c1c; background:#fff0f0; }
.topbar { min-height:68px; display:flex; align-items:center; justify-content:space-between; gap:18px; padding:14px clamp(18px,5vw,50px); background:rgba(255,253,249,.92); border-bottom:1px solid var(--line); }
.brand-mark { font-weight:900; }
.phase { margin-left:12px; color:var(--muted); font-size:13px; }
.text-button { padding:8px 12px; color:var(--accent); background:transparent; }
.workspace { min-height:calc(100vh - 68px); display:grid; place-items:center; padding:24px; }
.script-card { padding:clamp(26px,6vw,46px); }
.script-text { margin:24px 0; font-size:clamp(17px,4vw,20px); }
.status-row { display:flex; justify-content:space-between; gap:20px; padding:12px 0; border-top:1px solid var(--line); color:var(--muted); }
.status-row strong { color:var(--ink); text-align:right; }
.primary-link { display:inline-block; margin-top:24px; padding:11px 16px; border-radius:10px; color:white; background:var(--accent); font-weight:800; text-decoration:none; }
.admin-shell { width:min(1180px,100%); min-width:0; margin:0 auto; padding:24px; display:grid; gap:22px; }
.panel { width:min(100%,680px); min-width:0; padding:clamp(22px,5vw,36px); background:var(--paper); border:1px solid var(--line); border-radius:18px; box-shadow:0 12px 38px rgba(63,42,27,.07); }
.wide-panel { width:100%; min-width:0; }
.upload-form { display:grid; grid-template-columns:minmax(240px,1fr) minmax(190px,.45fr) auto; align-items:end; gap:14px; }
.upload-form label { margin:0; }
.upload-form button { height:50px; }
.small { font-size:13px; }
.table-wrap { width:100%; max-width:100%; min-width:0; overflow-x:auto; }
table { width:100%; min-width:760px; border-collapse:collapse; font-size:14px; }
th,td { padding:12px 10px; border-bottom:1px solid var(--line); text-align:left; vertical-align:top; }
th { color:var(--muted); font-size:12px; white-space:nowrap; }
th:first-child,td:first-child { min-width:210px; }
.status-badge { display:inline-flex; padding:4px 9px; border-radius:999px; background:#eee8df; color:#665b52; font-size:12px; font-weight:800; }
.status-completed { background:#e3f3e9; color:#17663a; }
.status-completed_with_issues { background:#fff1d9; color:#8b5300; }
.status-failed { background:#ffe4e4; color:#9b2222; }
.status-running,.status-queued { background:#e8efff; color:#244f9a; }
.detail-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; }
.stats-grid { display:grid; grid-template-columns:repeat(6,minmax(100px,1fr)); gap:10px; margin-top:24px; }
.stats-grid div { padding:14px; border-radius:12px; background:#f5f0ea; }
.stats-grid span { display:block; color:var(--muted); font-size:12px; }
.stats-grid strong { display:block; margin-top:5px; font-size:24px; }
@media (max-width:520px) { .phase { display:none; } .login-card { padding:26px 22px; } }
@media (max-width:820px) { .upload-form { grid-template-columns:1fr; } .stats-grid { grid-template-columns:repeat(2,1fr); } }
.review-card { padding:18px 0; border-top:1px solid var(--line); }
.source-body { white-space:pre-wrap; max-height:240px; overflow:auto; padding:14px; background:#f7f2eb; border-radius:10px; }
.inline-actions,.filter-form,.bulk,nav { display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.inline-actions select,.filter-form select,.filter-form input { width:auto; min-width:160px; }
.inline-actions label,.check { margin:0; font-size:13px; }
.inline-actions input,.check input { width:auto; margin-right:5px; }
.run-hero { position:relative; overflow:hidden; background:linear-gradient(135deg,#fffdf9 0%,#fbf2e8 100%); }
.run-hero:after { content:""; position:absolute; width:240px; height:240px; right:-100px; top:-130px; border:1px solid rgba(157,79,29,.18); border-radius:50%; box-shadow:0 0 0 24px rgba(157,79,29,.035),0 0 0 52px rgba(157,79,29,.025); }
.seal { position:absolute; z-index:1; right:34px; top:28px; display:grid; place-items:center; width:78px; height:78px; border:2px solid #a24f27; border-radius:50%; color:#8d3c19; background:#fffaf2; font:800 13px/1.35 "STSong","Songti SC",serif; text-align:center; transform:rotate(7deg); }
.final-run-row { background:#fff8ee; }
.final-mark { display:inline-block; margin-top:5px; padding:2px 7px; color:#7d3b13; background:#f7dfc7; border-radius:2px; font-size:11px; font-weight:800; letter-spacing:.08em; }
.class-pill { display:inline-flex; padding:2px 8px; border-radius:999px; font-size:12px; font-weight:850; }
.class-useful { color:#175f39; background:#e2f3e9; }
.class-invalid { color:#8f2929; background:#fbe4e1; }
.empty-state { margin:18px 0; padding:28px; border:1px dashed #d7c9ba; border-radius:12px; color:var(--muted); background:#faf6f0; text-align:center; }
.audit-hero { border-top:4px solid var(--accent); background:linear-gradient(110deg,#fffdf9,#f8efe4); }
.audit-counts { display:flex; flex-wrap:wrap; gap:9px; margin-top:24px; }
.audit-counts a { padding:8px 12px; border:1px solid #d8c7b8; border-radius:999px; color:var(--ink); background:#fffdf9; font-size:13px; font-weight:750; text-decoration:none; }
.audit-counts a:hover { color:white; border-color:var(--accent); background:var(--accent); }
.audit-list { display:grid; gap:16px; }
.audit-card { padding:22px; border:1px solid var(--line); border-left:4px solid #bc7448; border-radius:4px 16px 16px 4px; background:var(--paper); box-shadow:0 9px 26px rgba(63,42,27,.055); }
.audit-meta { display:flex; flex-wrap:wrap; gap:8px 16px; color:var(--muted); font-size:12px; font-weight:700; }
.audit-source { margin:16px 0; padding:13px 15px; border:1px solid #eee3d8; background:#faf7f2; white-space:pre-wrap; }
.verdict-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.verdict-grid section { padding:14px; border:1px solid var(--line); border-radius:10px; background:white; }
.verdict-grid h3 { margin:0 0 7px; color:var(--muted); font-size:11px; letter-spacing:.1em; text-transform:uppercase; }
.verdict-grid p { margin:0 0 5px; overflow-wrap:anywhere; }
.verdict-grid small { color:var(--muted); }
.verdict-grid .final-verdict { border-color:#d69b70; background:#fff5e8; }
@media (max-width:760px) { .verdict-grid { grid-template-columns:1fr; } .seal { position:static; margin:12px 0; } }
.ready-body { background:radial-gradient(circle at 12% 8%,#fff5e7 0,transparent 34%),linear-gradient(160deg,#f1e8dc,#e7dacb); }
.ready-topbar nav,.ready-topbar form { display:flex; align-items:center; margin:0; }
.ready-workspace { min-height:calc(100vh - 68px); display:grid; place-items:center; padding:clamp(18px,4vw,54px); }
.ready-card { width:min(760px,100%); padding:clamp(26px,6vw,58px); border:1px solid #ded0c1; border-radius:3px 28px 28px 3px; background:#fffdf8; box-shadow:0 28px 80px rgba(67,43,28,.13); position:relative; }
.ready-card:before { content:""; position:absolute; left:-1px; top:32px; bottom:32px; width:5px; background:var(--accent); }
.ready-meta,.ready-foot { display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px 18px; color:var(--muted); font-size:12px; letter-spacing:.04em; }
.ready-meta span:first-child { color:var(--accent); }.ready-meta i { font-style:normal; }.ready-meta b { font-weight:900; }
.persona-switch { display:flex; gap:7px; margin-bottom:20px; }.persona-switch button { padding:7px 11px; color:#6b5547; border:1px solid #d7c3b2; border-radius:999px; background:transparent; font-size:12px; }.persona-switch button.active { color:white; border-color:var(--accent); background:var(--accent); }
.voice-note { margin:12px 0 0; color:#856b5b; font-size:13px; }
.ready-card h1 { max-width:640px; margin:22px 0 15px; font-family:"STSong","Songti SC","Noto Serif CJK SC",serif; font-size:clamp(30px,6vw,48px); }
.ready-rule { width:54px; height:3px; margin:20px 0 26px; background:#bf6a35; }
.ready-script { margin:0; white-space:pre-wrap; font-family:"STSong","Songti SC","Noto Serif CJK SC",serif; font-size:clamp(18px,3.2vw,22px); line-height:1.95; letter-spacing:.02em; }
.ready-foot { margin-top:28px; padding-top:14px; border-top:1px solid var(--line); }
.ready-actions { display:grid; grid-template-columns:1.2fr 1fr .7fr; gap:10px; margin-top:24px; }
.ready-primary { background:#9d4f1d; }.ready-secondary { color:#fff; background:#322722; }.ready-ghost { color:#6e4a35; border:1px solid #cfb9a8; background:transparent; }
.ready-ghost[aria-pressed="true"] { color:#8d3c19; border-color:#bf6a35; background:#fff0df; }
.ready-notice { min-height:24px; margin:12px 0 0; color:#17663a; text-align:center; font-weight:800; }
@media (max-width:560px){.ready-actions{grid-template-columns:1fr 1fr}.ready-ghost{grid-column:1/-1}.ready-card{padding:28px 24px}.ready-script{line-height:1.82}}
