@font-face { font-family: 'Alibaba PuHuiTi 3'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/puhuiti3-regular-40.woff2') format('woff2'); }
@font-face { font-family: 'Alibaba PuHuiTi 3'; font-style: normal; font-weight: 500 900; font-display: swap; src: url('/fonts/puhuiti3-medium-40.woff2') format('woff2'); }

:root {
  color-scheme: light;
  --page: #eef0ed;
  --surface: #f8f9f6;
  --surface-strong: #e2e6de;
  --text: #20251e;
  --muted: #65705f;
  --line: rgba(45, 55, 40, 0.16);
  --accent: #566146;
  --accent-strong: #3f4934;
  --on-accent: #f7f8f3;
  --danger: #9a3b32;
  --radius: 14px;
  font-family: "Alibaba PuHuiTi 3", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }
.site-group-heading { margin: 40px 0 12px; font-size: 23px; }
.site-slot { display: grid; grid-template-columns: 200px minmax(0,1fr); gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--line); align-items: center; }
.site-slot-preview { height: 150px; display: grid; place-items: center; background: var(--surface-strong); overflow: hidden; border-radius: 10px; font-size: 13px; color: var(--muted); }
.site-slot-preview img,.site-slot-preview video { display:block; max-width: 100%; max-height: 150px; object-fit:contain; }
.site-slot .form-actions { flex-wrap:wrap; margin-top:12px; }
.site-slot input { font-size:13px; color:var(--muted); }
.site-text-row { padding-block:16px; max-width:760px; }
.site-slot > *, .site-text-row, .site-text-row label { min-width:0; }
.site-text-row textarea { font-weight:400; }
.site-publish-bar { position:sticky; bottom:0; display:flex; flex-wrap:wrap; gap:12px; padding:18px 0; margin-top:30px; background:var(--page); border-top:1px solid var(--line); z-index:3; }
.media-picker { width:min(850px,calc(100% - 32px)); max-height:85vh; padding:28px; border:1px solid var(--line); border-radius:14px; background:var(--surface); color:var(--text); }
.media-picker::backdrop { background:rgba(20,25,17,.5); }
.media-picker .view-heading { margin-bottom:20px; }
.picker-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-top:20px; }
.picker-item { display:grid; grid-template-rows:120px auto; gap:10px; padding:10px; text-align:left; background:var(--page); border:1px solid var(--line); border-radius:10px; color:var(--text); }
.picker-item:hover { border-color:var(--accent); }
.picker-item img { width:100%; height:120px; object-fit:contain; }
.picker-item strong { align-self:center; text-align:center; }
.picker-item span { overflow-wrap:anywhere; font-size:13px; }
.editor-tools { display:flex; flex-wrap:wrap; border:1px solid var(--line); gap:6px; padding:8px; margin-top:8px; }
.editor-tools button { border:0; border-radius:6px; color:var(--text); background:var(--surface-strong); min-height:40px; padding:0 12px; }
.article-rich-editor { min-height:300px; max-height:700px; overflow:auto; padding:20px; border:1px solid var(--line); border-top:0; background:var(--surface); font-size:16px; line-height:1.8; }
.article-rich-editor img { max-width:100%; height:auto; }
.article-cover-preview { max-width:240px; max-height:160px; margin-top:12px; object-fit:contain; }
@media(max-width:620px) { .site-slot { grid-template-columns:minmax(0,1fr); gap:14px; } .site-slot-preview { height:180px; } .picker-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .media-picker { padding:18px; } }
button:disabled { cursor: not-allowed; opacity: .55; }
.help-text { max-width: 75ch; color: var(--muted); font-size: 14px; line-height: 1.7; }
.api-workbench { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(0, 1.2fr); gap: 32px; border-block: 1px solid var(--line); padding-block: 28px; }
.api-workbench h2, .api-example h2 { margin: 0 0 20px; font-size: 21px; }
.api-endpoint { overflow-wrap: anywhere; font: 14px/1.6 Consolas, monospace; }
.api-request { display: grid; align-content: start; gap: 16px; }
.api-request p { margin: 0; }
.api-request textarea { font: 14px/1.65 Consolas, monospace; }
.api-response { min-width: 0; }
.api-response > p { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
pre { margin: 0; padding: 20px; background: #e2e6de; color: #20251e; overflow: auto; max-height: 540px; font: 14px/1.7 Consolas, monospace; tab-size: 2; }
.api-example { margin-top: 36px; }
.api-example .view-heading { align-items: center; margin-bottom: 8px; }
.api-example h2 { margin: 0; }
.pager { flex-wrap: wrap; align-items: center; margin-top: 24px; }
.pager input { flex: 1 1 200px; max-width: 320px; }
.pager span { color: var(--muted); font-size: 14px; }
.data-row > div, .data-row > span { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 900px) { .api-workbench { grid-template-columns: 1fr; } }
@media (max-width: 620px) { input, select, textarea { font-size: 16px; } .toolbar { flex-wrap: wrap; } pre { padding: 14px; } }
body { margin: 0; min-width: 320px; background: var(--page); color: var(--text); line-height: 1.55; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.brand-lockup { display: inline-flex; align-items: center; gap: 11px; }
.brand-lockup span { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-weight: 720; }
.brand-lockup strong { font-size: 19px; letter-spacing: .12em; }

.login-screen { min-height: 100dvh; display: grid; grid-template-columns: minmax(360px, .92fr) minmax(440px, 1.08fr); }
.login-brand { padding: clamp(44px, 7vw, 96px); display: flex; flex-direction: column; justify-content: space-between; background: var(--accent-strong); color: var(--on-accent); }
.login-brand h1 { max-width: 8em; margin: 0 0 20px; font-size: clamp(48px, 6vw, 82px); line-height: 1.04; letter-spacing: -.04em; }
.login-brand p { max-width: 32em; margin: 0; color: rgba(247,248,243,.72); }
.login-brand small { color: rgba(247,248,243,.56); }
.login-panel { display: grid; place-items: center; padding: 36px; }
.login-form { width: min(420px, 100%); display: grid; gap: 10px; }
.login-form h2 { margin: 0; font-size: 30px; }
.login-form div > p { margin: 8px 0 28px; color: var(--muted); }
label { display: grid; gap: 7px; font-size: 13px; font-weight: 650; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); }
input, select { min-height: 46px; padding: 0 12px; }
textarea { resize: vertical; padding: 12px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: 2px solid rgba(86,97,70,.18); outline-offset: 1px; }

.primary-button, .secondary-button, .text-button, .danger-button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; padding: 0 17px; font-weight: 680; white-space: nowrap; }
.primary-button { border: 1px solid var(--accent-strong); background: var(--accent-strong); color: var(--on-accent); }
.primary-button:hover { background: var(--accent); border-color: var(--accent); }
.secondary-button { border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.text-button { min-height: 36px; border: 0; background: transparent; color: var(--muted); }
.danger-button { min-height: 34px; border: 1px solid rgba(154,59,50,.28); background: transparent; color: var(--danger); }
.form-message { min-height: 22px; margin: 4px 0; color: var(--danger); font-size: 13px; }
.form-message.is-success { color: var(--accent); }

.topbar { height: 68px; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: var(--surface); }
.topbar-user { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.topbar-user span { color: var(--muted); }
.app-layout { min-height: calc(100dvh - 68px); display: grid; grid-template-columns: 220px 1fr; }
.sidebar { padding: 24px 14px; display: grid; align-content: start; gap: 5px; border-right: 1px solid var(--line); background: var(--surface); }
.nav-item { min-height: 44px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); text-align: left; font-weight: 620; }
.nav-link { display: flex; align-items: center; justify-content: space-between; text-decoration: none; }
.nav-external { color: var(--muted); font-size: 15px; }
.product-admin-row { display: grid; grid-template-columns: 180px minmax(0,1fr); gap: 24px; align-items: center; padding-block: 24px; border-bottom: 1px solid var(--line); }
.product-admin-row > img { width: 180px; height: 160px; object-fit: contain; border-radius: 10px; background: var(--surface-strong); }
.product-admin-row h3 { margin: 0 0 8px; font-size: 20px; font-weight: 500; overflow-wrap: anywhere; }
.product-admin-row p { margin-block: 8px; color: var(--muted); }
.product-admin-row .form-actions { flex-wrap: wrap; }
[data-product-form] input,[data-product-form] textarea { font-size: 16px; }
[data-product-form] > *,[data-product-form] .form-grid > * { min-width: 0; }
[data-product-form] .form-actions { flex-wrap: wrap; }
@media(max-width:620px) { .product-admin-row { grid-template-columns: 96px minmax(0,1fr); gap: 16px; } .product-admin-row > img { width: 96px; height: 125px; } .product-admin-row .form-actions { gap: 8px; } }
.nav-item:hover, .nav-item.is-active { background: var(--surface-strong); color: var(--text); }
.workspace { min-width: 0; padding: 40px clamp(24px, 4vw, 64px) 80px; }
.workspace-view { max-width: 1240px; margin-inline: auto; }
.view-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 30px; margin-bottom: 36px; }
.view-heading h1 { margin: 0; font-size: 32px; letter-spacing: -.03em; }
.view-heading p { margin: 7px 0 0; color: var(--muted); }

.stats-strip { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: 26px 0; }
.stat + .stat { padding-left: 28px; border-left: 1px solid var(--line); }
.stat strong { display: block; font-size: 30px; }
.stat span { color: var(--muted); font-size: 13px; }
.dashboard-note { max-width: 620px; margin-top: 58px; }
.dashboard-note h2 { margin: 0 0 18px; }
.dashboard-note ol { margin: 0; padding-left: 20px; color: var(--muted); }
.dashboard-note li + li { margin-top: 9px; }

.toolbar { display: flex; gap: 10px; margin-bottom: 18px; }
.toolbar select { width: auto; min-width: 140px; }
.content-editor, .inline-form, .security-form { margin-bottom: 34px; padding: 24px; display: grid; gap: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.form-grid { display: grid; gap: 14px; }
.two-cols { grid-template-columns: 1fr 1fr; }
.form-actions { display: flex; gap: 10px; }
.inline-form { grid-template-columns: 1fr 1fr 180px auto; align-items: end; }
.inline-form .form-message { grid-column: 1 / -1; }
.security-form { max-width: 560px; }
.upload-bar { margin-bottom: 30px; padding: 20px; display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.upload-bar span { grid-column: 1 / -1; color: var(--muted); font-size: 13px; }

.data-list, .media-list { border-top: 1px solid var(--line); }
.module-list { max-width: 760px; border-top: 1px solid var(--line); }
.module-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.module-row strong, .module-row small { display: block; }
.module-row small { margin-top: 4px; color: var(--muted); }
.switch { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.switch { position: relative; }
.switch input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; min-height: 0; padding: 0; inset: 0; }
.switch-track { position: relative; width: 46px; height: 26px; border-radius: 999px; background: var(--surface-strong); transition: background .2s ease; }
.switch-track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); box-shadow: 0 2px 5px rgba(32,37,30,.2); transition: transform .2s ease; }
.switch input:checked + .switch-track { background: var(--accent); }
.switch input:checked + .switch-track::after { transform: translateX(20px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--accent); outline-offset: 3px; }
.data-row { display: grid; grid-template-columns: minmax(180px, 1.4fr) minmax(120px, .7fr) minmax(100px, .6fr) auto; gap: 20px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.data-row strong { display: block; }
.data-row small, .data-row span { color: var(--muted); }
.row-actions { display: flex; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.status { width: max-content; padding: 4px 8px; border-radius: 999px; background: var(--surface-strong); color: var(--muted); font-size: 12px; }
.status.published { background: rgba(86,97,70,.14); color: var(--accent-strong); }
.status.offline { background: rgba(154,59,50,.1); color: var(--danger); }
.empty-state { padding: 44px 0; color: var(--muted); }
.media-row { display: grid; grid-template-columns: 86px minmax(220px, 1fr) 110px auto; gap: 18px; align-items: center; padding: 17px 0; border-bottom: 1px solid var(--line); }
.media-preview { width: 64px; height: 52px; display: grid; place-items: center; overflow: hidden; border-radius: 8px; background: var(--surface-strong); color: var(--muted); font-size: 11px; }
.media-preview img { width: 100%; height: 100%; object-fit: cover; }
.media-copy { min-width: 0; }
.media-copy strong, .media-copy a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-copy a { color: var(--accent); font-size: 12px; }
.media-meta { display: block; margin: 4px 0; color: var(--muted); font-size: 13px; }
.media-variants, .media-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.media-variants { margin-top: 5px; }
.media-actions { justify-content: flex-end; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 50; max-width: 360px; padding: 13px 16px; border-radius: 10px; background: var(--text); color: var(--page); box-shadow: 0 14px 44px rgba(32,37,30,.2); }

@media (max-width: 900px) {
  .login-screen { grid-template-columns: 1fr; }
  .login-brand { min-height: 320px; }
  .app-layout { grid-template-columns: 1fr; }
  .sidebar { position: sticky; top: 0; z-index: 10; grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .inline-form { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .login-brand { padding: 34px 24px; }
  .login-brand h1 { font-size: 46px; }
  .login-panel { padding: 48px 20px; }
  .topbar { height: auto; min-height: 68px; padding: 12px 16px; gap: 16px; }
  .topbar-user span { display: none; }
  .workspace { padding: 30px 16px 64px; }
  .view-heading { align-items: stretch; flex-direction: column; }
  .stats-strip { grid-template-columns: 1fr; }
  .stat + .stat { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .two-cols, .inline-form, .upload-bar { grid-template-columns: 1fr; }
  .upload-bar span { grid-column: auto; }
  .data-row { grid-template-columns: 1fr; gap: 8px; }
  .module-row { align-items: flex-start; flex-direction: column; gap: 14px; }
  .row-actions { justify-content: flex-start; }
  .media-row { grid-template-columns: 58px 1fr; }
  .media-row > :nth-child(3), .media-row > :nth-child(4) { grid-column: 2; }
}
