:root {
  --bg:#f4f6f1; --paper:#fff; --ink:#17271f; --muted:#5c6c62; --line:#dfe7de;
  --primary:#20563e; --primary-hover:#17442f; --soft:#e6f1e8; --danger:#a43237;
  font:15px/1.55 'Microsoft YaHei','PingFang SC',system-ui,sans-serif;
  color:var(--ink); background:var(--bg); color-scheme:light;
}
* { box-sizing:border-box; }
[hidden] { display:none!important; }
body { margin:0; min-width:280px; }
button,input,select,textarea { font:inherit; }
button { cursor:pointer; }
button:disabled { cursor:wait; opacity:.58; }
:focus-visible { outline:3px solid #629775; outline-offset:3px; }
h1,h2,h3,p { margin:0; }
h1 { font-size:clamp(27px,3vw,39px); letter-spacing:-.055em; line-height:1.2; }
h2 { font-size:21px; letter-spacing:-.03em; }
h3 { font-size:16px; }
.muted,.eyebrow { color:var(--muted); }
.eyebrow { font-size:12px; font-weight:700; letter-spacing:.13em; }
.brand { display:flex; align-items:center; gap:12px; font-size:19px; font-weight:750; line-height:1.22; white-space:nowrap; }
.brand-mark { display:grid; place-items:center; width:42px; height:42px; border-radius:14px; background:#d9eccd; color:#204933; font-size:23px; }
.brand-en { display:block; font-size:9px; letter-spacing:.14em; opacity:.64; margin-top:5px; }
.login-view { min-height:100dvh; display:grid; grid-template-columns:1fr 1fr; }
.login-art {
  display:flex; flex-direction:column; justify-content:space-between; padding:clamp(30px,6vw,92px); overflow:hidden; position:relative;
  background:radial-gradient(ellipse at 89% 12%,#668f63,transparent 58%), radial-gradient(ellipse at 12% 88%,#253a3a,transparent 59%),#153e2f;
  color:#f7fbef;
}
.art-orbit { position:absolute; width:64%; aspect-ratio:1; border:1px solid #d1eac565; border-radius:50%; transform:rotate(-25deg) scaleY(.57); pointer-events:none; }
.orbit-one { top:20%; left:14%; }.orbit-two { top:27%; left:21%; }.orbit-three { top:34%; left:28%; }
.art-copy { position:relative; }.art-copy p { color:#d3e7ca; margin-bottom:10px; }.art-copy h2 { font-size:clamp(42px,6vw,83px); line-height:1.1; }
.login-side { display:grid; place-items:center; padding:30px; }
.login-card { width:min(100%,405px); }.login-card h1 { margin:12px 0; }.login-card form { margin-top:30px; }
.mobile-brand { display:none; }
.app { display:grid; min-height:100dvh; grid-template-columns:238px minmax(0,1fr); }
.sidebar { height:100dvh; position:sticky; top:0; display:flex; flex-direction:column; gap:46px; padding:28px 20px 20px; background:#122a21; color:#edf4ed; }
.sidebar .brand { padding:0 9px; }.sidebar-body { flex:1; }.sidebar-label { color:#a6b9ab; padding:0 12px; font-size:11px; letter-spacing:.16em; margin-bottom:12px; }
.sidebar nav { display:grid; gap:5px; }.sidebar nav button,.sidebar nav a { border:0; border-radius:10px; padding:12px; background:transparent; color:inherit; text-align:left; text-decoration:none; width:100%; font-weight:650; }
.sidebar nav button:hover,.sidebar nav a:hover { background:#253e33; }.sidebar nav [aria-current]:not([aria-current=false]),.sidebar nav .active,.sidebar nav [aria-selected=true] { background:#e2eedc; color:#1a392a; }
.sidebar-account { border-top:1px solid #486153; padding:15px 2px 0; display:flex; align-items:center; gap:9px; font-size:12px; }.sidebar-account div { flex:1; min-width:0; }.sidebar-account div span { display:block; color:#a9b9ad; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.account-icon { color:#163829; border-radius:50%; background:#c9e2cb; width:34px; height:34px; display:grid; place-items:center; font-weight:750; }
.logout { background:none; border:none; color:#d9e6da; padding:7px; border-radius:6px; }
.main-area { min-width:0; }.topbar { min-height:72px; padding:14px clamp(16px,4vw,56px); border-bottom:1px solid var(--line); display:flex; align-items:center; justify-content:space-between; gap:12px; background:#fbfcfa; }
.breadcrumb { color:var(--muted); font-size:13px; }.breadcrumb button { border:0; background:transparent; color:var(--primary); padding:0; font-weight:700; }
.content { max-width:1560px; margin:auto; padding:34px clamp(16px,4vw,56px) 64px; display:grid; gap:22px; }
.page-head { display:flex; align-items:flex-end; justify-content:space-between; flex-wrap:wrap; gap:15px; }.page-head p { color:var(--muted); margin-top:7px; }
.stats { display:grid; grid-template-columns:repeat(auto-fit,minmax(142px,1fr)); gap:14px; }.stat,.panel,.job-card { background:var(--paper); border:1px solid var(--line); border-radius:16px; }
.stat { padding:20px; display:flex; flex-direction:column; gap:6px; }.stat span,.stat p { color:var(--muted); font-size:13px; }.stat strong,.stat b { font-size:clamp(24px,3vw,36px); line-height:1.15; font-variant-numeric:tabular-nums; }
.panel { min-width:0; overflow:hidden; }.panel-head { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; padding:19px 22px; }.panel-head p { color:var(--muted); }
.table-wrap { max-width:100%; overflow-x:auto; }.table,table { border-collapse:collapse; width:100%; text-align:left; }.table th,.table td,th,td { padding:13px 17px; border-top:1px solid var(--line); vertical-align:middle; }.table th,th { color:var(--muted); background:#f8faf7; font-size:12px; white-space:nowrap; }.table td,td { font-size:13px; }.table tbody tr:hover { background:#fafcf9; }
.tenant-cell { display:flex; align-items:center; gap:10px; min-width:110px; }.tenant-cell small { display:block; color:var(--muted); }.tenant-swatch { width:13px; height:13px; border-radius:4px; background:var(--tenant-color,#7fae90); flex:none; }
.badge { display:inline-flex; align-items:center; border-radius:30px; padding:3px 9px; font-size:12px; white-space:nowrap; background:#eaf0ec; color:#385447; }.badge.on,.badge.succeeded { background:#e1f3e6; color:#245a38; }.badge.off,.badge.failed { background:#f8e7e5; color:#97343c; }.badge.running,.badge.queued { background:#f6efdc; color:#705714; }
.empty { color:var(--muted); padding:28px 22px; text-align:center; }.empty h3 { color:var(--ink); }
.tabs,.detail-actions,.form-actions,.actions { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }.tabs button { background:#fff; color:var(--muted); border:1px solid var(--line); border-radius:9px; padding:7px 13px; }.tabs [aria-pressed=true],.tabs [aria-selected=true],.tabs .active { background:var(--soft); color:var(--primary); font-weight:700; }
.button { display:inline-flex; align-items:center; justify-content:center; gap:8px; border-radius:10px; border:1px solid transparent; min-height:41px; padding:8px 14px; font-weight:700; text-decoration:none; white-space:nowrap; }
.button.primary { color:#fff; background:var(--primary); }.button.primary:hover { background:var(--primary-hover); }.button.secondary { color:var(--primary); background:#fff; border-color:var(--line); }.button.secondary:hover { background:var(--soft); }.button.compact { min-height:33px; padding:4px 10px; font-size:12px; }.button.danger { color:var(--danger); background:#fff4f2; border-color:#edd1ce; }
.form-stack { display:grid; gap:15px; }.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }.form-actions { justify-content:flex-end; margin-top:4px; }
label { display:grid; gap:6px; font-size:13px; font-weight:700; }.form-stack input,.form-stack select,.form-stack textarea,input,select,textarea { min-width:0; padding:10px 12px; border-radius:9px; border:1px solid #cad7cd; background:#fff; color:var(--ink); }.form-stack input[type=color] { padding:3px; width:100%; min-height:42px; }.form-error { color:var(--danger); font-size:13px; }.form-error:empty { display:none; }
.job-grid { display:grid; gap:14px; grid-template-columns:repeat(auto-fill,minmax(215px,1fr)); }.job-card { display:grid; align-content:start; gap:9px; padding:13px; overflow:hidden; }.job-card img { width:100%; aspect-ratio:1.4; object-fit:cover; display:block; border-radius:9px; }.job-card p { overflow-wrap:anywhere; }
.invite-path { display:block; width:100%; background:#eff4ef; border-radius:8px; padding:10px; word-break:break-all; color:var(--primary); }
.panel-body { padding:0 22px 22px; }
.panel-head p,.field-hint { font-size:13px; color:var(--muted); margin-top:4px; }
.upstream-panel,.ads-panel { width:min(100%,800px); }
.ads-group { min-width:0; margin:0; padding:12px 14px 14px; display:grid; gap:12px; border:1px solid var(--line); border-radius:12px; background:#fbfcfa; }
.ads-group legend { padding:0 5px; font-size:14px; font-weight:750; }
.ads-group .field-hint { margin-top:0; }
.ads-note { padding:10px 12px; border-radius:9px; background:var(--bg); color:var(--muted); font-size:13px; }
.upstream-actions { border-top:1px solid var(--line); padding-top:15px; }
.model-row { display:grid; gap:12px; padding:14px; border:1px solid var(--line); border-radius:12px; background:#fbfcfa; }
.model-row-fields { display:grid; grid-template-columns:minmax(0,1.3fr) minmax(0,1fr) minmax(112px,.5fr); gap:12px; }
.model-row-options { display:flex; flex-wrap:wrap; align-items:center; gap:8px 16px; }
.model-row-options button { margin-inline-start:auto; }
.channel-row { min-width:0; margin:0; padding:12px 14px 14px; display:grid; gap:14px; border:1px solid var(--line); border-radius:12px; background:#fbfcfa; }
.channel-row legend { padding:0 5px; font-size:14px; font-weight:750; }
.channel-row-options { display:flex; gap:8px 16px; flex-wrap:wrap; align-items:center; }
.channel-row-options button { margin-inline-start:auto; }
.channel-mapping-section,.channel-mappings { display:grid; gap:9px; }
.channel-mapping-section { padding-top:12px; border-top:1px solid var(--line); }
.channel-mapping-section .field-hint { margin-top:0; }
.channel-mapping { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)) auto; gap:8px; align-items:end; }
.channel-mapping button { min-height:40px; }
#channels-form button:disabled { cursor:default; }
.inline-status { border-radius:9px; color:var(--muted); background:var(--bg); padding:10px 12px; overflow-wrap:anywhere; }
.inline-status.success { background:var(--soft); color:var(--primary); }
.inline-status.error { background:#fbebea; color:var(--danger); }
.search-form { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.search-form input { flex:1 1 145px; width:min(100%,220px); min-height:33px; padding:4px 9px; }
.user-id { overflow-wrap:anywhere; }
.user-panel td:first-child { min-width:210px; max-width:280px; }
.user-panel td:nth-child(n+2) { white-space:nowrap; font-variant-numeric:tabular-nums; }
.user-profile { display:flex; align-items:center; gap:10px; overflow-wrap:anywhere; }
.user-profile > div { min-width:0; }
.user-profile strong,.user-profile .muted { display:block; }
.user-avatar { flex:none; display:grid; place-items:center; width:38px; height:38px; border-radius:50%; object-fit:cover; background:var(--soft); color:var(--muted); }
.user-actions { display:flex; gap:6px; }
.gallery-grid { grid-template-columns:repeat(auto-fill,minmax(min(100%,215px),1fr)); }
.gallery-card { background:#fbfcfa; }
.gallery-image { display:block; border-radius:9px; background:var(--soft); }
.gallery-image img { object-fit:contain; }
.gallery-placeholder { display:grid; place-items:center; aspect-ratio:1.4; color:var(--muted); }
.gallery-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:8px; }
.gallery-heading h3 { overflow-wrap:anywhere; }
.prompt-excerpt { color:var(--muted); display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; white-space:pre-wrap; overflow-wrap:anywhere; }
.job-prompt { width:clamp(130px,34vw,390px); }
.job-prompt .button { margin-top:6px; }
.full-prompt { display:grid; gap:6px; min-width:0; }
.full-prompt p { max-height:32vh; overflow:auto; white-space:pre-wrap; overflow-wrap:anywhere; border:1px solid var(--line); border-radius:9px; background:var(--bg); padding:10px 12px; }
.gallery-card .actions { margin-top:4px; }
.submission-history { border-top:1px solid var(--line); }
.submission-preview-image img { display:block; width:100%; max-height:42dvh; object-fit:contain; border-radius:9px; }
.submission-confirm,.modal-head h2 { overflow-wrap:anywhere; }
.modal-head h2 { min-width:0; }
.modal-head .icon-button { flex:none; }
.check-field { display:flex; align-items:center; gap:8px; }
.check-field input { margin:0; width:16px; height:16px; accent-color:var(--primary); }
.watermark-name { overflow-wrap:anywhere; }
.form-stack textarea { resize:vertical; }
.form-stack input[type=file] { max-width:100%; }
dialog { border:1px solid var(--line); width:min(540px,calc(100% - 28px)); max-height:calc(100dvh - 32px); border-radius:17px; background:#fff; color:var(--ink); padding:0; box-shadow:0 22px 80px #0c241b36; }
dialog::backdrop { background:#0e2520a6; }.modal-head { padding:18px 22px; display:flex; justify-content:space-between; align-items:center; gap:10px; border-bottom:1px solid var(--line); }.modal-body { padding:20px 22px; }.icon-button { border:0; border-radius:8px; background:var(--soft); width:34px; height:34px; color:var(--primary); font-size:20px; }
.toast { position:fixed; z-index:2; right:22px; bottom:22px; padding:11px 16px; background:#203c30; color:#fff; max-width:calc(100% - 44px); border-radius:10px; box-shadow:0 9px 30px #142e2440; }
@media(max-width:800px) {
  .app { grid-template-columns:1fr; }.sidebar { position:static; height:auto; padding:13px 16px; display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:10px; }.sidebar .brand { padding:0; }.sidebar-body { grid-column:1/-1; grid-row:2; }.sidebar-label { display:none; }.sidebar nav { display:flex; overflow:auto; }.sidebar nav button,.sidebar nav a { white-space:nowrap; width:auto; padding:7px 9px; }.sidebar-account { border:0; padding:0; }.topbar { min-height:53px; }.content { padding-top:20px; gap:14px; }
}
@media(max-width:620px) {
  .model-row-fields { grid-template-columns:minmax(0,1fr); }
  .model-row-options button,.channel-row-options button { margin-inline-start:0; }
  .channel-mapping { grid-template-columns:minmax(0,1fr); padding-bottom:9px; border-bottom:1px solid var(--line); }
  .channel-mapping button { justify-self:start; min-height:33px; }
  .login-view { display:block; }.login-art { display:none; }.login-side { min-height:100dvh; padding:23px; }.mobile-brand { display:flex; margin-bottom:29px; }.sidebar .brand-en,.account-icon,.sidebar-account div { display:none; }.stats { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }.stat { padding:13px; }.panel-head { padding:13px; }.panel-body { padding:0 13px 13px; }.table th,.table td,th,td { padding:10px; }.form-grid { grid-template-columns:1fr; }
}
