:root {
  color-scheme: light;
  --ink: #182d28;
  --muted: #5d7069;
  --line: #dbe4df;
  --accent: #176448;
  --canvas: #f2f5f2;
  --rail: #15382f;
  --sidebar-width: clamp(186px, 16.5vw, 242px);
  --header-height: 74px;
  font-family: "Instrument Sans", "Microsoft YaHei UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis-weight: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body, h1, h2, h3, p, figure { margin: 0; }
body { min-height: 100vh; line-height: 1.55; overflow-wrap: break-word; }
button, input, textarea, select { font: inherit; }
:focus-visible { outline: 3px solid #439678; outline-offset: 3px; }
a { color: var(--accent); text-underline-offset: .2em; }
button {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .48rem .9rem; border: 1px solid #c8d4cd; border-radius: 7px;
  background: #fff; color: var(--ink); font-size: .88rem; font-weight: 550;
  line-height: 1.4; cursor: pointer;
}
button:hover { color: var(--accent); background: #f3f7f4; border-color: #a0b9a9; }
button:disabled { cursor: default; opacity: .53; }
button.primary { color: white; background: var(--accent); border-color: var(--accent); }
button.primary:hover { background: #104d38; border-color: #104d38; }
button.small { padding: .28rem .65rem; font-size: .81rem; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
.icon {
  flex: 0 0 auto; width: 1.15rem; height: 1.15rem; fill: none;
  stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.masthead {
  position: sticky; z-index: 5; top: 0; height: var(--header-height);
  display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); background: #fff;
}
.brand {
  display: flex; align-items: center; gap: .8rem; padding: 0 clamp(1rem, 1.7vw, 1.65rem);
  background: var(--rail); color: #fff; font-size: 1.12rem; font-weight: 700; letter-spacing: .04em;
  line-height: 1.3; text-decoration: none; white-space: nowrap;
}
.brand small { display: block; margin-top: .17rem; color: #becfc6; font-size: .72rem; letter-spacing: .12em; font-weight: 500; }
.brand-mark, .login-mark {
  display: inline-grid; flex: none; place-items: center; width: 40px; height: 40px;
  border-radius: 11px; background: #dfebac; color: #214936;
}
.brand-mark .icon, .login-mark .icon { width: 25px; height: 25px; stroke-width: 1.9; }
.account {
  display: flex; align-items: center; justify-content: flex-end; gap: 1.3rem; min-width: 0;
  padding: 0 clamp(1rem, 3.35vw, 3.5rem); border-bottom: 1px solid var(--line);
}
.account a, .link-button, .identity { display: inline-flex; align-items: center; gap: .44rem; font-size: .86rem; }
.account a, .link-button { min-height: 40px; white-space: nowrap; flex-shrink: 0; }
.account a { font-weight: 600; color: #385a4b; text-decoration: none; }
.account a:hover, .link-button:hover { color: var(--accent); text-decoration: underline; }
.account .icon { width: 1rem; height: 1rem; }
.link-button, .link-button:hover { padding: .35rem 0; border: none; background: transparent; color: var(--muted); }
.identity { padding-left: 1rem; border-left: 1px solid var(--line); color: var(--ink); font-weight: 650; }
.identity:has(#operator[hidden]) { display: none; }
.avatar { display: grid; place-items: center; width: 1.85rem; height: 1.85rem; border-radius: 50%; color: #395d41; background: #e6eddd; }
#operator { max-width: 11rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#workspace { display: grid; align-items: start; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); min-height: calc(100vh - var(--header-height)); }
.tabs {
  position: sticky; top: var(--header-height); height: calc(100vh - var(--header-height));
  overflow: auto; padding: 1.5rem .75rem; background: var(--rail); color: #c7d5cf;
  border-top: 1px solid #325448;
}
.nav-group + .nav-group { margin-top: 1.85rem; }
.nav-group button {
  position: relative; width: 100%; margin-bottom: .15rem; justify-content: flex-start; gap: .85rem;
  border: 0; border-radius: 7px; padding: .69rem .9rem; color: #d3e0d8; background: transparent;
  font-size: .92rem; font-weight: 550; text-align: left;
}
.nav-group button .icon { color: #a1b9ab; }
.nav-group button:hover { background: #20483b; color: #fff; }
.nav-group button[aria-current="page"] { background: #315847; color: #f4f7ee; font-weight: 700; }
.nav-group button[aria-current="page"] .icon { color: #deeca7; }
.nav-group button[aria-current="page"]::after {
  content: ""; position: absolute; right: .85rem; width: .33rem; height: .33rem;
  border-radius: 50%; background: #d4e4a0;
}
.nav-label { margin: 0 .9rem .5rem; color: #a9bdb0; font-size: .72rem; font-weight: 600; letter-spacing: .09em; }
.work-area { width: 100%; min-width: 0; max-width: 1510px; margin: 0 auto; padding: clamp(1.5rem, 2.9vw, 3rem) clamp(1.25rem, 3.35vw, 3.5rem) 3rem; }
.card, .metric, .overview-block, dialog {
  min-width: 0; border: 1px solid var(--line); border-radius: 13px; background: #fff;
  box-shadow: 0 2px 5px #173e2910;
}
.work-area > .card { padding: clamp(1.1rem, 2.4vw, 2rem); }
.work-area > .overview { background: transparent; border: 0; box-shadow: none; padding: 0; }
h1, h2, h3 { font-weight: 680; line-height: 1.3; }
h1 { font-size: clamp(1.4rem, 2.35vw, 2.05rem); letter-spacing: -.035em; }
h2 { font-size: 1.27rem; }
h3 { font-size: 1rem; }
.section-head, .actions, .dialog-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; }
.section-head { justify-content: space-between; padding-bottom: 1.1rem; margin-bottom: 1.25rem; border-bottom: 1px solid var(--line); }
.overview .section-head { border: 0; padding-bottom: 0; margin-bottom: 1.2rem; }
.section-head button .icon { width: 1rem; height: 1rem; }
.overview-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.65rem, 1.45vw, 1.3rem); }
.metric {
  position: relative; overflow: hidden; display: flex; align-items: flex-start; flex-direction: column; justify-content: flex-start;
  padding: clamp(.9rem, 1.55vw, 1.5rem); gap: .35rem; text-align: left; color: var(--ink);
}
.metric:hover { background: #fcfdfb; border-color: #8ea695; }
.metric-label { display: inline-flex; align-items: center; gap: .5rem; font-size: .89rem; font-weight: 600; color: #4a6155; }
.metric-label .icon {
  width: 30px; height: 30px; padding: 6px; color: #45634e; border-radius: 8px; background: #e9f0e8;
}
.metric:nth-child(3) .metric-label .icon { background: #f8edda; color: #8b5e20; }
.metric:nth-child(4) .metric-label .icon { background: #e9edf6; color: #536581; }
.metric-value {
  position: relative; margin-top: .22rem; font-family: "Instrument Sans", "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums; font-size: clamp(1.7rem, 2.8vw, 2.75rem);
  font-weight: 660; line-height: 1.1; letter-spacing: -.045em; overflow-wrap: anywhere;
}
.metric-note { font-size: .78rem; color: var(--muted); font-weight: 450; }
.metric:first-child, .metric:first-child:hover { background: #214d3e; color: #fff; border-color: #214d3e; }
.metric:first-child .metric-label, .metric:first-child .metric-note { color: #d5e3d6; }
.metric:first-child .metric-label .icon { background: #41644c; color: #e1eeb0; }
.metric:first-child::after {
  content: ""; position: absolute; right: -60px; bottom: -84px; width: 145px; height: 145px;
  border: 1px solid #b7d2ab26; border-radius: 50%; box-shadow: 0 0 0 16px #96b9930b, 0 0 0 32px #96b99309;
  pointer-events: none;
}
.overview-columns { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1.15rem; margin: 1.15rem 0; }
.overview-block { padding: clamp(1rem, 1.65vw, 1.65rem); }
.overview-block h2 { font-size: 1.13rem; }
.overview-block h3 { font-size: 1rem; }
.overview-block header { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: .65rem; margin-bottom: .85rem; }
.overview-block a { font-size: .84rem; font-weight: 550; }
.overview-actions, .activity-list { display: grid; padding: 0; margin: 0; list-style: none; }
.dashboard-action {
  width: 100%; justify-content: flex-start; gap: .8rem; padding: .7rem .3rem; border: 0; border-bottom: 1px solid #e8eee8;
  border-radius: 0; color: var(--ink); text-align: left;
}
.dashboard-action:last-child, .activity-row:last-child { border-bottom: 0; }
.dashboard-action:hover { border-color: #e8eee8; background: #f5f8f4; }
.dashboard-action > .icon:first-child { width: 30px; height: 30px; padding: 6px; background: #ecf2e8; color: #3a6850; border-radius: 8px; }
.dashboard-action > .icon:last-child { margin-left: auto; width: .95rem; color: #71867a; }
.activity-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 11rem 7rem; align-items: center;
  gap: .7rem; padding: .7rem 0; border-bottom: 1px solid #e8eee8;
}
.activity-row > * { min-width: 0; }
.activity-row time { white-space: nowrap; font-variant-numeric: tabular-nums; }
.activity-row small { display: block; color: var(--muted); font-size: .78rem; font-weight: 450; }
.activity-amount { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 650; color: var(--accent); }
.results { margin-top: 1.15rem; }
.placeholder, .empty { padding: 1rem 0; font-size: .88rem; color: var(--muted); }
.results > .empty { padding: 2rem 1rem; border: 1px dashed #cedacf; border-radius: 8px; text-align: center; background: #fafbf9; }
.feedback { color: var(--accent); font-size: .88rem; overflow-wrap: anywhere; }
.feedback:empty, .placeholder:empty { display: none; }
.feedback.error, .error-text { color: #a03b31; }
#notice:not(:empty) { margin-bottom: .85rem; padding: .65rem .9rem; border: 1px solid #cbddd0; border-radius: 7px; background: #f8fbf6; }
.retry { margin-inline-start: .65rem; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .88rem; }
th, td { padding: .83rem .65rem; border-bottom: 1px solid #e3e9e4; overflow-wrap: anywhere; }
th { padding-block: .58rem; border-top: 1px solid #e3e9e4; background: #f4f7f3; color: #56695d; font-size: .78rem; font-weight: 650; }
tbody tr:hover { background: #fafcf9; }
td:first-child { font-weight: 550; }
td .sub { display: block; color: var(--muted); margin-top: .2rem; font-size: .74rem; font-weight: 400; }
.state { display: inline-block; padding: .14rem .48rem; border-radius: 5px; background: #e6f3e8; color: #27623c; font-size: .78rem; font-weight: 550; }
.state.muted { color: #59685c; background: #edf0eb; }
.stack { display: grid; gap: 1rem; }
label, figcaption { display: grid; gap: .4rem; font-size: .86rem; font-weight: 620; }
input, textarea, select { width: 100%; min-width: 0; padding: .55rem .72rem; border: 1px solid #bdcbc0; border-radius: 7px; color: var(--ink); background: #fff; font-size: .94rem; font-weight: 400; }
#archive-content-status input { width: 1rem; height: 1rem; margin: 0 .3rem 0 0; vertical-align: middle; accent-color: var(--accent); }
#archive-content-status small { color: var(--muted); font-weight: 400; }
.archive-pending { display: inline-block; margin-top: .2rem; padding: 0 .35rem; border-radius: 3px; color: #774d19; background: #fcf0d9; font-size: .74rem; }
input::placeholder, textarea::placeholder { color: #718176; }
textarea { resize: vertical; }
.search { max-width: 28rem; }
.hint { font-size: .82rem; font-weight: 400; color: var(--muted); }
.site-config-form { max-width: 43rem; }
.admin-brand-text { overflow:hidden; min-width:0; }
.admin-brand-text [data-site-name] { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.brand [data-brand-image],.login [data-brand-image] { width:38px; height:38px; object-fit:contain; flex:none; }
.login [data-brand-image] { margin-bottom:1rem; }
.site-config-form .popup-toggle { display:flex; align-items:center; gap:.5rem; }
.popup-toggle input { width:1rem; height:1rem; }
.brand-settings { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(17rem,100%),1fr)); gap:1rem; margin-top:1.5rem; }
.brand-editor { display:grid; align-content:start; gap:.6rem; min-width:0; padding:1rem; border:1px solid var(--line); border-radius:8px; }
.brand-editor img { max-width:8rem; height:4rem; object-fit:contain; object-position:left center; }
.brand-editor input { max-width:100%; min-width:0; }
@media(max-width:480px){ .masthead .brand { min-width:0; flex:0 1 46%; } .brand [data-brand-image]{width:30px;height:30px;} }
.site-config-form button { justify-self: start; }
#qr-form { max-width: 34rem; margin-top: 1rem; }
#qr-form button { justify-self: start; }
figure img { display: block; width: 11rem; max-width: 100%; height: 11rem; object-fit: contain; border: 1px solid var(--line); border-radius: 7px; margin: .55rem 0; }
dialog {
  width: min(33rem, calc(100% - 1.3rem)); max-height: 88vh; max-height: 88dvh; padding: clamp(1.1rem, 2.4vw, 2rem);
  margin: auto; color: var(--ink); box-shadow: 0 16px 70px #172e2454;
}
dialog::backdrop { background: #122a2199; }
dialog h2 { padding-bottom: .8rem; border-bottom: 1px solid var(--line); }
#article-dialog { width: min(41rem, calc(100% - 1.3rem)); }
.dialog-actions { justify-content: flex-end; padding-top: .85rem; border-top: 1px solid var(--line); }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.article-labels { min-width:0; margin:0; padding:0; border:0; }
.article-labels legend { padding:0; margin-bottom:.4rem; font-size:.86rem; font-weight:620; }
.label-options { display:flex; flex-wrap:wrap; gap:.4rem; }
.label-options label { display:inline-flex; flex-direction:row; align-items:center; gap:.35rem; padding:.33rem .45rem; min-height:2.1rem; border:1px solid var(--line); border-radius:7px; cursor:pointer; }
.label-options label:has(:checked) { border-color:var(--accent); box-shadow:inset 0 0 0 1px var(--accent); }
.label-options input { accent-color:var(--accent); width:1rem; height:1rem; margin:0; padding:0; }
.article-tag { display:inline-block; padding:.13rem .46rem; border-radius:5px; font-size:.8rem; font-weight:650; white-space:nowrap; color:#47564c; background:#edf0ed; }
.article-tag[data-label="精选"] { color:#805500; background:#fff0c7; }
.article-tag[data-label="推荐"] { color:#972078; background:#fce7f6; }
.article-tag[data-label="出售"] { color:#a12b20; background:#ffe6e1; }
.article-tag[data-label="精品"] { color:#344ea5; background:#e8efff; }
.article-tag[data-label="公告"] { color:#644197; background:#f0e8ff; }
#article-price-help { margin-top:-.55rem; }
#compare-article { padding: .85rem; border: 1px solid #e5d8b9; border-radius: 7px; background: #fbf8ef; }
#compare-fields { max-height: 14rem; overflow: auto; margin: .5rem 0; }
#compare-fields p { white-space: pre-wrap; overflow-wrap: anywhere; }
.text-import { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .7rem; }
.text-import p:not(:empty), .text-import .actions { flex-basis: 100%; }
.file-picker { display: inline-block; position: relative; overflow: hidden; padding: .35rem .65rem; border: 1px solid #c5d1c5; border-radius: 6px; background: #f2f6ef; cursor: pointer; }
.file-picker input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.file-picker:focus-within { outline: 3px solid #439678; outline-offset: 2px; }
.shell > #boot, .shell > #retry-boot { margin: 2rem 1.4rem; }
.login { width: min(26rem, calc(100% - 2rem)); margin: clamp(3rem, 12vh, 7.5rem) auto; padding: clamp(1.35rem, 3vw, 2.4rem); }
.login-mark { margin-bottom: 1rem; width: 47px; height: 47px; background: #e9f1df; }
.login .stack { margin-top: 1.35rem; }
.login .primary { justify-content: space-between; padding: .7rem 1rem; }
@media (min-width: 1600px) {
  .work-area { margin-left: 0; }
}
@media (max-width: 1100px) {
  .overview-metrics { gap: .65rem; }
  .metric { padding: .85rem; }
  .metric-label { gap: .4rem; font-size: .83rem; }
  .metric-label .icon { width: 25px; height: 25px; padding: 5px; }
  .overview-columns { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: .85rem; }
}
@media (max-width: 850px) {
  :root { --header-height: 60px; --sidebar-width: minmax(9rem, auto); }
  .masthead { display: flex; align-items: stretch; justify-content: space-between; border-bottom: 1px solid var(--line); }
  .brand { background: #fff; color: var(--ink); padding-inline: 1rem; gap: .55rem; }
  .brand small { color: var(--muted); font-size: .66rem; }
  .brand-mark { width: 33px; height: 33px; background: var(--rail); color: #deeca7; border-radius: 8px; }
  .brand-mark .icon { width: 21px; height: 21px; }
  .account { border: 0; padding: 0 1rem 0 0; gap: .9rem; }
  #workspace { display: block; }
  .tabs { position: static; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: .16rem; height: auto; padding: .45rem .7rem; overflow: visible; border: 0; }
  .nav-group { display: contents; }
  .nav-label { display: none; }
  .nav-group button { justify-content: center; gap: .4rem; min-height: 38px; padding: .48rem .2rem; margin: 0; border-radius: 5px; font-size: .82rem; }
  .nav-group button[aria-current="page"]::after { content: none; }
  .nav-group button .icon { width: 1rem; height: 1rem; }
}
@media (max-width: 680px) {
  .work-area { padding: 1.15rem .85rem 2rem; }
  .work-area > .card:not(.overview) { padding: .95rem; }
  .overview-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-columns { grid-template-columns: minmax(0, 1fr); margin: .85rem 0; }
  .activity-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "account amount" "time amount"; gap: .18rem .65rem; }
  .activity-account { grid-area: account; }
  .activity-row time { grid-area: time; }
  .activity-amount { grid-area: amount; }
  .metric-label { font-size: .86rem; }
  .section-head { gap: .4rem; padding-bottom: .8rem; margin-bottom: 1rem; }
  #operator { max-width: 5.5rem; }
  table, tbody, tr, td { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  tr { border-top: 1px solid var(--line); padding: .65rem .05rem; }
  td { display: grid; grid-template-columns: minmax(4rem, 27%) minmax(0, 1fr); gap: .4rem; padding: .18rem 0; border: 0; }
  td::before { content: attr(data-label); color: var(--muted); font-size: .78rem; font-weight: 500; }
  td > div { min-width: 0; }
  td .sub { display: inline; margin-left: .4rem; }
  .login { margin-top: 3.5rem; }
}
@media (max-width: 480px) {
  #article-fields .fields:has([name="revealTime"]) { grid-template-columns: minmax(0, 1fr); }
  .brand { padding-left: .7rem; font-size: .97rem; }
  .account { padding-right: .7rem; gap: .75rem; }
  .identity { padding-left: .6rem; }
  .avatar { display: none; }
  #operator { max-width: 4rem; }
  .account a, .link-button, .identity { font-size: .79rem; gap: .25rem; }
  .account .icon { width: .85rem; height: .85rem; }
  .tabs { padding: .4rem; }
  .nav-group button { font-size: .76rem; gap: .22rem; }
}
@media (max-width: 375px) {
  .account { gap: .5rem; }
  .identity { display: none; }
  .nav-group button .icon { display: none; }
  .section-head button { padding: .4rem .56rem; font-size: .8rem; }
  .metric-label { font-size: .78rem; }
  .work-area { padding-inline: .65rem; }
}
