:root { --night:#070a0e; --panel:#0e141a; --panel-2:#131b22; --line:rgba(255,255,255,.12); --text:#ece7dc; --muted:#858986; --gold:#dfb45e; --cyan:#8ad9df; --danger:#dc806d; --serif:"Songti SC","STSong",serif; --sans:"PingFang SC","Microsoft YaHei",system-ui,sans-serif; }
* { box-sizing:border-box; }
body { margin:0; min-height:100vh; color:var(--text); background:radial-gradient(circle at 80% 0,rgba(138,217,223,.07),transparent 28rem),var(--night); font-family:var(--sans); -webkit-font-smoothing:antialiased; }
button,input,textarea,select { font:inherit; }
button { cursor:pointer; }
a { color:inherit; }
[hidden] { display:none !important; }
.eyebrow { margin:0; color:var(--gold); font-size:8px; font-weight:900; letter-spacing:.19em; }
.admin-seal { width:68px; height:68px; display:grid; place-items:center; color:var(--gold); border:1px solid var(--gold); font-family:var(--serif); font-size:22px; transform:rotate(-5deg); }
.admin-seal.small { width:42px; height:42px; font-size:16px; }
.login-screen { min-height:100vh; display:grid; place-items:center; padding:25px; }
.login-card { width:min(470px,100%); padding:55px; border:1px solid rgba(223,180,94,.3); background:linear-gradient(145deg,#10171e,#090d11); box-shadow:22px 22px 0 rgba(223,180,94,.12); }
.login-card .eyebrow { margin-top:35px; }
.login-card h1 { margin:15px 0 13px; font-family:var(--serif); font-size:38px; }
.login-card > p:not(.eyebrow) { margin:0 0 32px; color:var(--muted); font-size:12px; line-height:1.7; }
label { display:block; margin-bottom:17px; color:#bcbab3; font-size:10px; font-weight:700; }
input,textarea,select { width:100%; margin-top:8px; padding:12px 13px; border:1px solid var(--line); border-radius:0; outline:0; color:var(--text); background:#080c10; font-size:13px; line-height:1.6; }
input:focus,textarea:focus,select:focus { border-color:var(--gold); box-shadow:0 0 0 2px rgba(223,180,94,.1); }
.login-card form button { width:100%; min-height:50px; margin-top:7px; padding:0 17px; display:flex; justify-content:space-between; align-items:center; border:0; color:#15130e; background:var(--gold); font-size:12px; font-weight:900; }
.form-status { min-height:20px; margin:10px 0 0; color:var(--muted); font-size:10px; line-height:1.6; }
.form-status.error { color:#ef9b8a; }
.form-status.success { color:var(--cyan); }

.topbar { position:sticky; z-index:20; top:0; min-height:76px; padding:0 max(24px,4vw); display:flex; align-items:center; justify-content:space-between; gap:25px; border-bottom:1px solid var(--line); background:rgba(7,10,14,.9); backdrop-filter:blur(16px); }
.top-brand { display:flex; align-items:center; gap:13px; color:var(--text); text-decoration:none; }
.top-brand b,.top-brand small { display:block; }
.top-brand b { font-family:var(--serif); font-size:14px; }
.top-brand small { margin-top:3px; color:#6f7473; font-size:7px; letter-spacing:.14em; }
.top-actions { display:flex; align-items:center; gap:24px; }
.top-actions a,.top-actions button,.service-light { color:#8c908e; font-size:10px; }
.top-actions button { border:0; background:transparent; }
.service-light { display:flex; align-items:center; gap:7px; }
.service-light i { width:7px; height:7px; border-radius:50%; background:#7ed6a5; box-shadow:0 0 0 4px rgba(126,214,165,.1); }

.dashboard { width:min(1500px,calc(100% - 48px)); margin:0 auto; padding:70px 0 100px; }
.overview { display:grid; grid-template-columns:1.1fr 1.3fr; gap:6vw; align-items:end; }
.overview h1 { margin:17px 0 0; font-family:var(--serif); font-size:clamp(36px,4vw,58px); line-height:1.34; letter-spacing:-.045em; }
.status-grid { display:grid; grid-template-columns:1fr 1fr; border:1px solid var(--line); }
.status-grid article { min-height:126px; padding:22px; }
.status-grid article:nth-child(odd) { border-right:1px solid var(--line); }
.status-grid article:nth-child(-n+2) { border-bottom:1px solid var(--line); }
.status-grid small,.status-grid strong,.status-grid span { display:block; }
.status-grid small { color:#707574; font-size:8px; letter-spacing:.11em; }
.status-grid strong { margin:15px 0 5px; color:var(--gold); font-size:18px; }
.status-grid span { color:#858987; font-size:9px; }

.control-grid { margin-top:65px; display:grid; grid-template-columns:340px minmax(0,1fr); gap:22px; align-items:start; }
.panel { border:1px solid var(--line); background:var(--panel); }
.panel > header { min-height:83px; padding:20px 22px; display:flex; justify-content:space-between; align-items:center; gap:15px; border-bottom:1px solid var(--line); }
.panel h2 { margin:6px 0 0; font-family:var(--serif); font-size:23px; }
.text-button { padding:4px; border:0; color:#7f8482; background:transparent; font-size:9px; }
.settings-panel form { padding:25px 22px 30px; }
.settings-panel.is-collapsed form { display:none; }
.toggle-row { margin-bottom:20px; display:grid; grid-template-columns:45px 1fr; gap:12px; align-items:center; }
.toggle-row.compact { margin-top:15px; }
.toggle-row > div strong,.toggle-row > div small { display:block; }
.toggle-row > div strong { color:#d7d3ca; font-size:11px; }
.toggle-row > div small { margin-top:4px; color:#727775; font-size:8px; line-height:1.5; }
.warning-row { padding:14px; background:rgba(220,128,109,.07); border:1px solid rgba(220,128,109,.18); }
.switch { margin:0; }
.switch input { position:absolute; opacity:0; pointer-events:none; }
.switch span { position:relative; width:42px; height:23px; display:block; border:1px solid #4a4f4e; border-radius:99px; background:#080b0e; transition:.2s; }
.switch span::after { content:""; position:absolute; width:15px; height:15px; top:3px; left:4px; border-radius:50%; background:#777c7a; transition:.2s; }
.switch input:checked + span { border-color:var(--gold); background:rgba(223,180,94,.17); }
.switch input:checked + span::after { left:21px; background:var(--gold); }
.form-grid { display:grid; gap:13px; }
.form-grid.two { grid-template-columns:1fr 1fr; }
hr { height:1px; margin:27px 0; border:0; background:var(--line); }
.settings-panel h3 { margin:0 0 18px; font-family:var(--serif); font-size:15px; }
.key-state { float:right; color:#777c7a; font-size:8px; }
.key-state.ready { color:var(--cyan); }
.check-line { display:flex; align-items:center; gap:8px; color:#838785; font-size:9px; }
.check-line input { width:14px; height:14px; margin:0; }
.field-help { margin:-5px 0 10px; color:#717674; font-size:8px; line-height:1.6; }
.sources-editor { min-height:170px; font-family:ui-monospace,monospace; font-size:10px; }
.primary-button,.secondary-button,.danger-button { min-height:40px; padding:0 15px; border:1px solid var(--gold); color:#15130e; background:var(--gold); font-size:10px; font-weight:900; }
.secondary-button { color:#d4d0c7; border-color:var(--line); background:transparent; }
.danger-button { color:#e49584; border-color:rgba(220,128,109,.35); background:transparent; }
.settings-panel .primary-button { width:100%; margin-top:8px; }
button:disabled { opacity:.45; cursor:wait; }

.workspace-head > div:last-child { display:flex; gap:8px; }
.run-report { min-height:65px; padding:14px 22px; display:flex; align-items:center; gap:13px; border-bottom:1px solid var(--line); background:#0a1015; }
.run-report > i { width:8px; height:8px; flex:0 0 8px; border-radius:50%; background:#6c7271; }
.run-report.is-running > i { background:var(--gold); box-shadow:0 0 0 5px rgba(223,180,94,.1); animation:pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity:.35; } }
.run-report strong,.run-report span { display:block; }
.run-report strong { font-size:10px; }
.run-report span { margin-top:4px; color:#707574; font-size:8px; }
.editor-layout { min-height:950px; display:grid; grid-template-columns:235px minmax(0,1fr); }
.article-list-wrap { border-right:1px solid var(--line); background:#0a0f14; }
.list-heading { min-height:55px; padding:0 17px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid var(--line); font-size:10px; }
.list-heading span { min-width:24px; padding:3px 6px; color:#111; background:var(--gold); text-align:center; }
.article-list { padding:10px; display:grid; gap:8px; }
.article-item { width:100%; padding:14px; border:1px solid transparent; color:#c8c5bd; background:transparent; text-align:left; }
.article-item:hover,.article-item.is-current { border-color:rgba(223,180,94,.3); background:#111820; }
.article-item.is-current { box-shadow:inset 2px 0 var(--gold); }
.article-item small,.article-item strong,.article-item span { display:block; }
.article-item small { color:#7d817f; font-size:7px; letter-spacing:.1em; }
.article-item strong { margin:8px 0; font-family:var(--serif); font-size:12px; line-height:1.55; }
.article-item span { color:#6f7472; font-size:8px; }
.article-item .published { color:var(--cyan); }
.article-editor { min-width:0; padding:28px; }
.empty-editor { min-height:500px; display:grid; place-items:center; align-content:center; color:#555b5a; }
.empty-editor span { font-size:40px; }
.empty-editor p { font-family:var(--serif); }
.editor-status-line { margin-bottom:22px; display:flex; justify-content:space-between; align-items:center; }
.status-pill { padding:5px 9px; border:1px solid rgba(223,180,94,.4); color:var(--gold); font-size:8px; font-weight:900; letter-spacing:.1em; }
.editor-status-line small { color:#6f7472; font-size:8px; }
.html-editor { min-height:520px; resize:vertical; font-family:ui-monospace,SFMono-Regular,Consolas,monospace; font-size:11px; line-height:1.75; tab-size:2; }
.preview-box { margin-top:25px; border:1px solid var(--line); background:#f7f3ea; }
.preview-box > header { min-height:46px; padding:0 14px; display:flex; justify-content:space-between; align-items:center; color:#1b1a17; border-bottom:1px solid rgba(20,20,18,.15); }
.preview-box > header strong { font-size:9px; }
#contentPreview { max-height:560px; padding:35px; overflow:auto; color:#22201c; font-family:var(--serif); font-size:14px; line-height:1.9; }
#contentPreview img { max-width:100%; height:auto; }
#contentPreview a { color:#8f641e; }
#contentPreview .metric-grid,#contentPreview .case-pair,#contentPreview .life-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
#contentPreview article { padding:15px; border:1px solid rgba(20,20,18,.15); }
.editor-actions { margin-top:24px; display:flex; flex-wrap:wrap; gap:9px; align-items:center; }
.editor-actions a { margin-left:auto; color:var(--cyan); font-size:10px; }
.toast { position:fixed; z-index:60; left:50%; bottom:25px; padding:12px 18px; color:#14110d; background:var(--gold); box-shadow:0 16px 45px rgba(0,0,0,.4); font-size:10px; font-weight:900; opacity:0; pointer-events:none; transform:translate(-50%,12px); transition:.2s; }
.toast.show { opacity:1; transform:translate(-50%,0); }

@media (max-width:1100px) { .overview { grid-template-columns:1fr; } .control-grid { grid-template-columns:1fr; } .settings-panel { order:2; } }
@media (max-width:720px) {
  .topbar { padding:0 15px; }
  .service-light,.top-actions a { display:none; }
  .dashboard { width:calc(100% - 24px); padding-top:45px; }
  .overview h1 { font-size:36px; }
  .status-grid { grid-template-columns:1fr; }
  .status-grid article:nth-child(odd) { border-right:0; }
  .status-grid article:not(:last-child) { border-bottom:1px solid var(--line); }
  .workspace-head { align-items:flex-start !important; flex-direction:column; }
  .workspace-head > div:last-child { width:100%; }
  .workspace-head button { flex:1; }
  .editor-layout { grid-template-columns:1fr; }
  .article-list-wrap { border-right:0; border-bottom:1px solid var(--line); }
  .article-list { max-height:300px; overflow:auto; }
  .article-editor { padding:20px 14px; }
  .form-grid.two { grid-template-columns:1fr; }
  .editor-actions a { width:100%; margin:8px 0 0; }
  .login-card { padding:40px 27px; }
}
