:root{
  --bg:#f3f7fb;--surface:#fff;--surface-soft:#f8fbff;--line:#e5edf6;--text:#152033;--muted:#6b7a90;
  --primary:#12b8a6;--primary-2:#2c7df0;--cyan:#e8fbff;--blue:#eaf3ff;--green:#eafbf2;--orange:#fff5df;--purple:#f4efff;--red:#fff0f0;
  --shadow:0 18px 45px rgba(31,56,88,.08);--shadow-sm:0 8px 22px rgba(31,56,88,.06);--radius:16px;--radius-sm:10px
}
*{box-sizing:border-box}
html{background:var(--bg)}
body{margin:0;color:var(--text);font-family:Inter,Arial,"Microsoft YaHei",sans-serif;font-size:14px;line-height:1.55}
a{color:#078f83;text-decoration:none}a:hover{color:#0b6fca}
.app-body{background:var(--bg)}.auth-body{min-height:100vh;background:linear-gradient(135deg,#eff8ff,#f7fbff)}
.sidebar{position:fixed;left:18px;top:18px;bottom:18px;width:236px;background:rgba(255,255,255,.88);border:1px solid rgba(226,236,248,.9);border-radius:22px;padding:16px 12px;box-shadow:var(--shadow);backdrop-filter:blur(12px);z-index:20;overflow:auto}
.brand{display:flex;align-items:center;gap:12px;padding:8px 8px 18px;margin-bottom:8px;border-bottom:1px solid var(--line)}
.brand-mark{display:grid;place-items:center;width:42px;height:42px;border-radius:14px;background:linear-gradient(135deg,var(--primary),var(--primary-2));color:#fff;font-weight:900;letter-spacing:.5px;box-shadow:0 12px 24px rgba(18,184,166,.25)}
.brand-copy strong{display:block;font-size:17px;line-height:1.1}.brand-copy small{display:block;margin-top:4px;color:var(--muted);font-size:12px}
.side-nav{display:flex;flex-direction:column;gap:6px}.nav-link,.nav-group summary{display:flex;align-items:center;gap:10px;min-height:42px;padding:10px 12px;border-radius:13px;color:#526276;font-weight:800;cursor:pointer;list-style:none;transition:.16s ease}
.nav-group summary::-webkit-details-marker{display:none}.nav-link:hover,.nav-group summary:hover{background:#f4f9ff;color:#0d7fbe}.nav-link.active,.nav-group summary.active,.sub-nav a.active{background:linear-gradient(135deg,#e7fbff,#eef6ff);color:#078f83;box-shadow:inset 0 0 0 1px rgba(18,184,166,.16)}
.nav-icon{display:grid;place-items:center;width:24px;height:24px;border-radius:9px;background:#eef6ff;color:#0a93c6;font-size:13px;flex:0 0 auto}.chevron{margin-left:auto;color:#8ca0b7}.nav-group[open] .chevron{transform:rotate(180deg)}
.sub-nav{display:grid;gap:4px;margin:4px 0 4px 34px;padding-left:10px;border-left:1px solid var(--line)}.sub-nav a{display:block;padding:9px 10px;border-radius:10px;color:#64748b;font-weight:800}
.main{margin-left:272px;min-height:100vh}.content-wrap{padding:22px 28px 34px}.auth-main{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px}.auth-wrap{width:min(460px,100%)}
.topbar{position:sticky;top:0;z-index:15;height:68px;background:rgba(255,255,255,.9);border-bottom:1px solid rgba(226,236,248,.9);backdrop-filter:blur(12px);display:flex;align-items:center;justify-content:space-between;padding:0 28px;box-shadow:0 6px 18px rgba(31,56,88,.04)}
.topbar-title h1{margin:2px 0 0;font-size:22px;letter-spacing:.1px}.page-kicker{font-size:12px;color:#7190ad;font-weight:800}.topbar-actions{display:flex;align-items:center;gap:10px;white-space:nowrap}
.icon-button{display:grid;place-items:center;width:36px;height:36px;border-radius:12px;border:1px solid var(--line);background:#fff;color:#4f6b86;cursor:pointer}.user-pill,.system-pill{display:inline-flex;align-items:center;height:36px;padding:0 12px;border-radius:999px;background:#f6faff;border:1px solid var(--line);font-weight:800;color:#34465e}
.panel,.login-panel{background:var(--surface);border:1px solid rgba(226,236,248,.95);border-radius:var(--radius);padding:20px;margin-bottom:18px;box-shadow:var(--shadow-sm)}
.panel h2,.login-panel h1{margin:0 0 16px;font-size:18px}.login-panel{width:390px}.section-title{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0 0 16px}.section-title h2{margin:0}.section-title>a{font-weight:800}
.hero-card{display:grid;grid-template-columns:minmax(0,1.4fr) 320px;gap:20px;align-items:center;margin-bottom:18px;padding:28px;border-radius:24px;background:linear-gradient(135deg,#e8f8ff 0%,#eefcff 44%,#f7fbff 100%);border:1px solid #dceffc;box-shadow:var(--shadow);overflow:hidden}
.hero-card h2{font-size:32px;margin:8px 0 8px}.hero-card p{max-width:720px;margin:0;color:#4b647f;font-size:15px}.eyebrow{display:inline-flex;padding:5px 10px;border-radius:999px;background:rgba(18,184,166,.12);color:#078f83;font-weight:900}.hero-actions{display:flex;gap:10px;margin-top:18px}
.hero-art{height:170px;border-radius:24px;background:linear-gradient(135deg,#22c3b5,#5da6ff);position:relative;overflow:hidden;box-shadow:inset 0 0 50px rgba(255,255,255,.25)}
.hero-art span{position:absolute;border-radius:18px;background:rgba(255,255,255,.55)}.hero-art span:nth-child(1){width:150px;height:46px;left:36px;top:34px}.hero-art span:nth-child(2){width:210px;height:70px;right:26px;bottom:30px}.hero-art span:nth-child(3){width:76px;height:76px;left:70px;bottom:24px;border-radius:50%}
.dashboard-grid{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(260px,.7fr);gap:18px}.quick-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.quick-card{display:grid;gap:7px;padding:14px;border-radius:15px;background:var(--surface-soft);border:1px solid var(--line);color:var(--text);transition:.16s ease}.quick-card:hover{transform:translateY(-2px);box-shadow:var(--shadow-sm);color:#078f83}.quick-icon{display:grid;place-items:center;width:36px;height:36px;border-radius:13px;background:#eaf7ff;color:#0b82c3;font-weight:900}.quick-card strong{font-size:15px}.quick-card small{color:var(--muted)}
.mini-list{display:grid;gap:10px}.mini-list div{display:flex;align-items:center;justify-content:space-between;padding:13px 14px;border-radius:14px;background:var(--surface-soft);border:1px solid var(--line)}.mini-list span{color:var(--muted);font-weight:800}.mini-list strong{font-size:22px}
.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px}.stat-card,.stats>div{background:#fff;border:1px solid var(--line);border-radius:18px;padding:18px;box-shadow:var(--shadow-sm);position:relative;overflow:hidden}.stat-card:after,.stats>div:after{content:"";position:absolute;right:-24px;top:-26px;width:86px;height:86px;border-radius:50%;background:#edf8ff}.stat-card span,.stats span{display:block;color:var(--muted);font-weight:900}.stat-card strong,.stats strong{display:block;margin-top:8px;font-size:30px;line-height:1;color:#14243a}.stat-card small{display:block;margin-top:7px;color:#7a8da3;font-weight:700}.tone-green:after{background:#e8fbef}.tone-orange:after{background:#fff1d6}.tone-purple:after{background:#f0e9ff}.tone-red:after{background:#ffe9eb}.tone-cyan:after{background:#e5fbff}
.grid{display:grid;gap:18px}.grid.two{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.row{display:grid;grid-template-columns:1fr 1fr;gap:14px}
label{display:block;margin:0 0 13px;font-size:13px;font-weight:900;color:#43536a}input,select,textarea{width:100%;margin-top:7px;min-height:42px;padding:9px 12px;border:1px solid #d8e4f1;border-radius:11px;background:#fff;color:#142033;outline:none;transition:.15s ease}textarea{min-height:120px;resize:vertical}input:focus,select:focus,textarea:focus{border-color:#35b8df;box-shadow:0 0 0 4px rgba(53,184,223,.14)}.code{font-family:Consolas,Monaco,monospace;min-height:230px}.code.tall{min-height:460px}
.button,button.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:38px;padding:8px 14px;border-radius:11px;border:1px solid #d8e4f1;background:#fff;color:#24364d;cursor:pointer;font-weight:900;line-height:1.2;transition:.15s ease}.button:hover{background:#f6faff;border-color:#bdd3e8}.button.primary{border:0;background:linear-gradient(135deg,var(--primary),var(--primary-2));color:#fff;box-shadow:0 10px 20px rgba(18,184,166,.18)}.button.primary:hover{filter:saturate(1.08);transform:translateY(-1px)}.button.ghost{background:#f8fbff;color:#36516f}.button.danger{background:#fff1f2;border-color:#fecdd3;color:#be123c}.button[disabled]{opacity:.55;cursor:not-allowed;transform:none}
.notice{padding:12px 14px;border-radius:14px;margin-bottom:14px;border:1px solid;font-weight:900}.notice.success{background:#ecfdf5;border-color:#b8f0d0;color:#166534}.notice.error{background:#fff1f2;border-color:#fecdd3;color:#a01424}
.table-wrap,.batch-preview{overflow:auto}table{width:100%;border-collapse:separate;border-spacing:0;background:#fff;font-size:13px}th,td{padding:14px 13px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}th{background:#f7faff;color:#52657d;font-weight:900;white-space:nowrap}tbody tr:hover td{background:#fbfdff}td:first-child,th:first-child{border-left:0}.history-urls a{display:block;max-width:280px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.badge{display:inline-flex;align-items:center;min-height:24px;padding:3px 9px;border-radius:999px;font-size:12px;font-weight:900;line-height:1.2}.badge.warning{background:var(--orange);color:#a15c00}.badge.info{background:var(--blue);color:#1d5fd1}.badge.purple{background:var(--purple);color:#7042c9}.badge.success{background:var(--green);color:#137647}.badge.danger{background:var(--red);color:#b4232c}.badge.muted{background:#eef3f8;color:#64748b}
.actions{white-space:nowrap}.actions a,.actions form{display:inline-flex;margin:2px 6px 2px 0}.actions a{align-items:center;min-height:30px;padding:5px 9px;border-radius:9px;background:#f6fbff;font-weight:900}.inline-form{display:inline-flex;margin:0}.link-button{border:0;background:#f6fbff;color:#078f83;cursor:pointer;padding:6px 9px;border-radius:9px;font-weight:900}.link-button.danger{color:#c02a3a;background:#fff3f4}
.check,.table-check{display:flex;align-items:center;gap:8px}.check input,.table-check input{width:auto;margin:0}.help{padding:12px 14px;background:#f8fbff;border:1px dashed #cbdcec;border-radius:13px;color:#637892;margin:8px 0 14px}.empty{padding:30px;text-align:center;color:#7890aa;background:#f8fbff;border:1px dashed var(--line);border-radius:14px;font-weight:800}.wide-form .button{margin-right:8px}
.mode-tabs{display:flex;gap:10px;margin-bottom:16px}.mode-tabs a{padding:10px 15px;border:1px solid var(--line);border-radius:999px;background:#fff;color:#52657d;font-weight:900}.mode-tabs a.active{border-color:transparent;background:linear-gradient(135deg,var(--primary),var(--primary-2));color:#fff}
.batch-title-box{min-height:190px}.batch-preview table{min-width:1280px}.batch-preview textarea{min-height:76px;font-size:13px}.run-log{white-space:pre-wrap;max-height:320px;overflow:auto;background:#0f2035;color:#d8f6ff;border-radius:14px;padding:16px;border:1px solid #19304d}.progress{display:grid;gap:10px}.task-summary,.result-summary{display:flex;flex-wrap:wrap;gap:10px;align-items:center}.task-summary .badge,.result-summary .badge{min-height:28px}
.article-preview{max-width:900px;padding:22px;border:1px solid var(--line);border-radius:16px;background:#fff}.article-preview p{line-height:1.85;color:#334155}.image-placeholder{display:grid;place-items:center;min-height:120px;margin:18px 0;border:1px dashed #cbdcec;border-radius:14px;background:#f8fbff;color:var(--muted);font-weight:900}
.image-preview-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:16px;margin-top:18px}.image-preview-card{overflow:hidden;border:1px solid var(--line);border-radius:16px;background:#fff}.image-preview-card img{display:block;width:100%;aspect-ratio:1/1;object-fit:cover;background:#f1f5f9}.image-preview-card>div,.image-preview-card>small{display:flex;justify-content:space-between;gap:8px;margin:10px 12px}.image-preview-card>small{display:block;color:var(--muted);min-height:38px}
.image-preview-card>[data-image-error]:empty{display:none}.image-preview-card>[data-image-error].notice{display:block;margin:10px 12px;min-height:0}
.modal-backdrop{position:fixed;inset:0;background:rgba(16,32,52,.38);display:grid;place-items:center;z-index:50}.confirm-modal{width:min(760px,calc(100vw - 40px));max-height:86vh;overflow:auto;background:#fff;border-radius:22px;padding:24px;box-shadow:var(--shadow)}.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:16px}
@media(max-width:1180px){.quick-grid,.stats{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-grid,.grid.two,.grid.three,.row{grid-template-columns:1fr}.hero-card{grid-template-columns:1fr}.hero-art{display:none}}
@media(max-width:820px){.sidebar{position:static;width:auto;margin:12px}.main{margin-left:0}.topbar{position:static;height:auto;align-items:flex-start;gap:12px;flex-direction:column;padding:14px 18px}.content-wrap{padding:16px}.topbar-actions{flex-wrap:wrap}.quick-grid,.stats{grid-template-columns:1fr}}
.auth-main{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px}.auth-wrap{width:min(430px,100%)}
.login-panel{text-align:left;padding:28px;border-radius:24px}.auth-brand{text-align:center;margin-bottom:22px}.auth-brand .brand-mark{margin:0 auto 12px}.auth-brand h1{margin:0 0 8px;font-size:24px}.auth-brand p{margin:0;color:var(--muted);font-weight:700}.auth-form{display:grid;gap:4px}.auth-submit{width:100%;margin-top:8px;min-height:44px}.setup-panel{width:min(460px,100%)}
.sidebar{display:flex;flex-direction:column;overflow:hidden}.side-nav{flex:1;overflow:auto;padding-bottom:12px}.sidebar-footer{border-top:1px solid var(--line);padding-top:12px;display:grid;gap:6px}.sidebar-user{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:13px;background:#f6faff;color:#34465e}.logout-link{color:#b4232c}.main.no-topbar .content-wrap{padding-top:26px}.auth-brand h1{font-size:26px}.auth-brand p{font-size:14px;color:#52657d}
.badge{white-space:nowrap;word-break:keep-all}.site-cell{min-width:92px;white-space:nowrap}.status-cell{min-width:84px;white-space:nowrap}.status-cell .badge{display:inline-flex;align-items:center;justify-content:center}.publish-history-cell{min-width:150px;white-space:normal}.publish-history-cell .badge{display:inline-flex;white-space:nowrap}.publish-history-cell small{display:block;margin-top:6px;max-width:190px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#52657d;font-weight:700}
.article-preview figure{margin:22px 0}.article-preview figure img{max-width:100%;height:auto;border-radius:14px;display:block}
.chart-risk-note{margin:18px 0 10px;padding:10px 12px;border:1px solid #dbe4ee;border-radius:10px;background:#f8fafc;color:#52657d;font-size:13px;font-weight:800}
.strategy-chart{margin-top:10px}.strategy-chart figcaption{margin-top:10px;color:#52657d;font-size:13px;line-height:1.65}.strategy-chart img{background:#fff;border:1px solid var(--line)}
