:root {
  --bg: #F7F4EF;
  --paper: #FDFBF7;
  --ink: #222222;
  --muted: #707070;
  --line: rgba(34,34,34,.09);
  --sage: #748681;
  --sage-deep: #5B6763;
  --sage-soft: rgba(116,134,129,.1);
  --warn: #8A6A2F;
  --warn-soft: rgba(214,169,80,.15);
  --danger: #B4554A;
  --danger-soft: rgba(180,85,74,.1);
  --blue: #4B7185;
  --blue-soft: rgba(75,113,133,.1);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif; font-size: 14px; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.mono { font-variant-numeric: tabular-nums; }

/* Login */
.login-mask { position: fixed; inset: 0; z-index: 100; background: radial-gradient(circle at 80% 10%, rgba(116,134,129,.24), transparent 42%), #F7F4EF; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { width: 420px; max-width: 100%; background: var(--paper); border: 1px solid var(--line); padding: 40px 36px; }
.logo { width: 54px; height: 54px; border-radius: 50%; background: var(--ink); color: var(--paper); display: flex; align-items: center; justify-content: center; font-size: 22px; letter-spacing: 2px; }
.login-card h1 { margin: 26px 0 8px; font-size: 26px; letter-spacing: .5px; }
.login-card p { margin: 0; color: var(--muted); font-size: 13px; }
.login-form { margin-top: 34px; }
.login-form input { width: 100%; height: 48px; border: none; border-bottom: 1px solid rgba(34,34,34,.22); background: transparent; font-size: 16px; outline: none; }
.login-form .primary { width: 100%; margin-top: 24px; }
.hint { display: block; margin-top: 12px; color: #A8A29A; font-size: 12px; text-align: center; }

/* Layout */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 232px; flex-shrink: 0; background: var(--paper); border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 12px; padding: 24px 20px 20px; border-bottom: 1px solid var(--line); }
.brand-mark { width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: var(--paper); display: flex; align-items: center; justify-content: center; letter-spacing: 1px; }
.brand-name { font-weight: 700; }
.brand-sub { color: var(--muted); font-size: 11px; margin-top: 3px; }
#nav { padding: 14px 10px; flex: 1; overflow-y: auto; }
.nav-item { display: flex; align-items: center; justify-content: space-between; padding: 11px 12px; color: var(--muted); border-radius: 6px; margin-bottom: 2px; }
.cfg-toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.cfg-toc a { padding: 6px 12px; border-radius: 999px; background: #F3F0EA; border: 1px solid rgba(34,34,34,.08); font-size: 12.5px; color: var(--sage-deep); cursor: pointer; }
.cfg-toc a:hover { background: #EDE9E1; }
.cfg-card { margin-bottom: 14px; }
.nav-group { margin: 14px 0 6px; padding: 0 10px; font-size: 11px; letter-spacing: .08em; color: #A8A29A; text-transform: uppercase; }
.nav-item:hover { background: var(--sage-soft); color: var(--ink); }
.nav-item.active { background: var(--sage-soft); color: var(--ink); font-weight: 600; }
.nav-count { min-width: 20px; height: 20px; line-height: 20px; padding: 0 6px; border-radius: 10px; background: var(--danger); color: #fff; font-size: 11px; text-align: center; }
.sidebar-foot { padding: 14px 16px 20px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.main { flex: 1; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 24px 32px 18px; border-bottom: 1px solid var(--line); background: rgba(247,244,239,.94); position: sticky; top: 0; z-index: 20; }
.topbar h1 { margin: 0; font-size: 24px; letter-spacing: .4px; }
.top-right { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 12px; }
.badge { padding: 6px 10px; border: 1px solid rgba(180,85,74,.28); color: var(--danger); background: var(--danger-soft); border-radius: 4px; }
.view { padding: 26px 32px 60px; }

/* Buttons */
.primary, .ghost, .danger, .mini-btn { border-radius: 6px; border: 1px solid transparent; padding: 9px 16px; font-size: 13px; }
.primary { background: var(--ink); color: var(--paper); }
.primary:hover { background: #111; }
.ghost { background: transparent; border-color: rgba(34,34,34,.18); color: var(--sage-deep); }
.ghost:hover { background: var(--sage-soft); }
.danger { background: transparent; border-color: rgba(180,85,74,.35); color: var(--danger); }
.danger:hover { background: var(--danger-soft); }
.badge.ok { border-color: rgba(116,134,129,.32); color: var(--sage-deep); background: rgba(116,134,129,.14); }
.badge.warn { border-color: rgba(184,155,106,.42); color: #8B6A34; background: rgba(184,155,106,.18); }
.mini-btn { padding: 6px 10px; font-size: 12px; border-color: rgba(34,34,34,.16); background: transparent; color: var(--sage-deep); }
.mini-btn.solid { background: var(--sage); color: #fff; border-color: var(--sage); }
.block { width: 100%; }

/* Cards & stats */
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 18px 20px; }
.stat .stat-label { color: var(--muted); font-size: 12px; }
.stat .stat-value { margin-top: 8px; font-size: 26px; font-weight: 700; }
.stat .stat-foot { margin-top: 6px; color: #A8A29A; font-size: 11px; }
.todo { cursor: pointer; transition: border-color .15s, background .15s; }
.todo:hover { border-color: rgba(116,134,129,.45); background: var(--sage-soft); }
.todo .num { font-size: 30px; font-weight: 800; color: var(--sage-deep); }
.todo .name { margin-top: 4px; font-weight: 600; }
.todo .desc { margin-top: 5px; color: var(--muted); font-size: 12px; }
.section { margin-top: 28px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.section-head h2 { margin: 0; font-size: 17px; }
.section-head .muted { font-size: 12px; }

/* Tables */
table { width: 100%; border-collapse: collapse; background: var(--paper); border: 1px solid var(--line); }
th, td { text-align: left; padding: 13px 14px; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: middle; }
th { color: var(--muted); font-weight: 500; font-size: 12px; background: #FBF9F5; }
tr:last-child td { border-bottom: none; }
td.actions { display: flex; gap: 7px; flex-wrap: wrap; }
.empty { padding: 40px; text-align: center; color: #A8A29A; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; }

/* Tags */
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 4px; font-size: 11px; white-space: nowrap; }
.tag.w { color: var(--warn); background: var(--warn-soft); }
.tag.a { color: var(--sage-deep); background: var(--sage-soft); }
.tag.d { color: var(--muted); background: rgba(34,34,34,.06); }
.tag.red { color: var(--danger); background: var(--danger-soft); }
.tag.blue { color: var(--blue); background: var(--blue-soft); }
.tag.green { color: #4E7568; background: rgba(78,117,104,.12); }

/* Risk */
.risk { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.risk-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--danger); margin-top: 6px; flex-shrink: 0; }
.risk-t { font-weight: 600; }
.risk-d { margin-top: 3px; color: var(--muted); font-size: 12px; }

/* Filters */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 7px 12px; border: 1px solid rgba(34,34,34,.14); border-radius: 6px; background: transparent; color: var(--muted); font-size: 12px; }
.chip.on { background: var(--sage); border-color: var(--sage); color: #fff; }
.search { height: 36px; min-width: 240px; border: 1px solid rgba(34,34,34,.14); border-radius: 6px; background: var(--paper); padding: 0 12px; outline: none; }

/* Forms */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.field label { display: block; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.field input, .field textarea { width: 100%; border: 1px solid rgba(34,34,34,.14); border-radius: 6px; background: var(--paper); padding: 10px 12px; outline: none; }
.field textarea { min-height: 80px; resize: vertical; }
.service-row { display: grid; grid-template-columns: 1.2fr 2fr auto; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.price-input { width: 90px; padding: 7px 9px; border: 1px solid rgba(34,34,34,.14); border-radius: 5px; background: var(--paper); }

/* Toast & modal */
.toast { position: fixed; left: 50%; top: 24px; transform: translateX(-50%); z-index: 200; background: #222; color: #FDFBF7; padding: 11px 18px; border-radius: 6px; font-size: 13px; }
.modal-mask { position: fixed; inset: 0; z-index: 150; background: rgba(20,20,20,.35); display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { width: 460px; max-width: 100%; max-height: calc(100vh - 40px); overflow: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 22px; }
.modal-mask { overflow: auto; }
.modal #modalText { white-space: pre-wrap; word-break: break-word; line-height: 1.75; font-size: 12.5px; max-height: 60vh; overflow: auto; margin: 0; }
.modal h3 { margin: 0 0 8px; }
.modal textarea { width: 100%; min-height: 80px; margin-top: 14px; border: 1px solid rgba(34,34,34,.14); border-radius: 6px; padding: 10px; resize: vertical; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }

@media (max-width: 960px) {
  .app { display: block; }
  .sidebar { width: 100%; height: auto; position: static; }
  #nav { display: flex; overflow-x: auto; padding: 10px; }
  .nav-item { white-space: nowrap; margin: 0 6px 0 0; }
  .sidebar-foot { display: flex; border-top: none; }
  .view, .topbar { padding-left: 18px; padding-right: 18px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .form-grid { grid-template-columns: 1fr; }
  .service-row { grid-template-columns: 1fr; }
  .toolbar { align-items: stretch; }
  .search { width: 100%; }
  table { display: block; overflow-x: auto; }
}
/* 媒体与须知 */
.media-hero { display: grid; grid-template-columns: 260px 1fr; gap: 20px; align-items: center; }
.media-hero-img { width: 260px; height: 140px; object-fit: cover; border-radius: 6px; background: #E4E8E4; }
.media-item { display: flex; align-items: center; gap: 12px; padding: 12px; }
.media-thumb { width: 72px; height: 52px; object-fit: cover; border-radius: 5px; background: #E4E8E4; flex-shrink: 0; }
.media-thumb.small { width: 54px; height: 40px; }
.media-avatar { width: 58px; height: 58px; object-fit: cover; border-radius: 50%; background: #E4E8E4; flex-shrink: 0; }
.media-body { flex: 1; min-width: 0; }
.media-name { font-weight: 600; margin-bottom: 6px; }
.media-body input, td input, td select, .field select { width: 100%; border: 1px solid rgba(34,34,34,.14); border-radius: 5px; background: var(--paper); padding: 7px 9px; outline: none; }
.media-hero .media-body input { width: 100%; border: 1px solid rgba(34,34,34,.14); border-radius: 5px; background: var(--paper); padding: 9px 11px; }
.upload-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.upload-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.upload-btn-wrap { position: relative; display: inline-flex; }
.upload-btn-wrap .upload-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.upload-actions label.primary { display: inline-flex; cursor: pointer; }
.service-block { grid-template-columns: 1fr; }
.pkg-list { display: grid; gap: 8px; margin: 10px 0; }
.pkg-row { display: grid; grid-template-columns: 1.4fr 1.6fr auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid rgba(34,34,34,.06); border-radius: 6px; background: #FBF9F5; font-size: 12px; }
.pkg-row .price-input { width: 80px; padding: 5px 7px; }
.content-card { margin-bottom: 16px; }
.content-card textarea { width: 100%; min-height: 80px; border: 1px solid rgba(34,34,34,.14); border-radius: 6px; padding: 10px 12px; background: var(--paper); resize: vertical; }
.content-pkg { display: grid; gap: 8px; padding: 12px; margin-top: 10px; border: 1px solid rgba(34,34,34,.08); border-radius: 6px; background: #FBF9F5; }
.content-pkg input { width: 100%; border: 1px solid rgba(34,34,34,.12); border-radius: 5px; padding: 8px 10px; background: var(--paper); }
.perm-chips { display: flex; flex-wrap: wrap; gap: 5px; max-width: 320px; }
.perm-chips .chip { padding: 4px 7px; font-size: 11px; }
.perm-group { display: flex; flex-direction: column; gap: 5px; min-width: 110px; }
.perm-sub { display: flex; flex-wrap: wrap; gap: 4px; padding-left: 8px; }
.perm-sub .chip { padding: 3px 6px; font-size: 10.5px; background: rgba(34,34,34,.03); }
.perm-sub .chip.on { background: var(--sage-deep); border-color: var(--sage-deep); }
.perm-sub-text { font-size: 11px; margin-top: 4px; }
/* 服务项目图片（服务文案页） */
.pkg-img-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pkg-img-cell { position: relative; width: 74px; height: 74px; }
.pkg-img-cell img { width: 74px; height: 74px; object-fit: cover; border-radius: 6px; background: #E4E8E4; display: block; }
.pkg-img-cell button { position: absolute; top: -6px; right: -6px; padding: 1px 6px; font-size: 12px; line-height: 1.4; border-radius: 10px; background: rgba(180,85,74,.94); color: #fff; border: none; }
.pkg-img-add { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 74px; height: 74px; padding: 6px; box-sizing: border-box; border: 1px dashed rgba(34,34,34,.24); border-radius: 6px; background: var(--paper); color: var(--sage-deep); font-size: 11px; line-height: 1.35; text-align: center; cursor: pointer; }
.pkg-img-add input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
/* 图片上传按钮（媒体与须知页每张图片卡片） */
.media-upload-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; padding: 6px 12px; margin: 4px 0 6px; border: 1px solid var(--sage); border-radius: 6px; background: #fff; color: var(--sage-deep); font-size: 12px; cursor: pointer; }
.media-upload-btn input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }

/* 主页大图上传按钮 */
.cover-upload { position: relative; display: inline-flex; align-items: center; justify-content: center; margin-top: 4px; padding: 4px 8px; border: 1px solid var(--sage); border-radius: 5px; background: #fff; color: var(--sage-deep); font-size: 11px; cursor: pointer; }
.cover-upload input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }

/* 页内分栏 */
.page-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; padding: 4px; background: #F3F0EA; border: 1px solid rgba(34,34,34,.06); border-radius: 8px; }
.page-tab { padding: 7px 14px; border-radius: 6px; font-size: 13px; color: #707070; cursor: pointer; }
.page-tab.on { background: #FDFBF7; color: #222; font-weight: 600; box-shadow: 0 1px 4px rgba(20,20,20,.06); }

/* 文案编辑 · 左侧快速定位 */
.copy-split { display: flex; gap: 18px; align-items: flex-start; }
.copy-body { flex: 1; min-width: 0; }
.copy-nav { position: sticky; top: 92px; width: 218px; flex-shrink: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 12px 10px 10px; max-height: calc(100vh - 130px); overflow-y: auto; }
.copy-nav-h { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--muted); padding: 0 6px 8px; }
.copy-nav-search { width: 100%; height: 32px; border: 1px solid rgba(34,34,34,.14); border-radius: 6px; background: var(--paper); padding: 0 10px; font-size: 12.5px; outline: none; margin-bottom: 8px; }
.copy-nav-search:focus { border-color: var(--sage); box-shadow: 0 0 0 3px var(--sage-soft); }
.copy-nav-list { display: grid; gap: 1px; }
.copy-nav-group { display: grid; gap: 1px; padding-bottom: 6px; margin-bottom: 6px; border-bottom: 1px dashed var(--line); }
.copy-nav-group:last-child { border-bottom: 0; margin-bottom: 0; }
.copy-nav-i { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 6px 8px; border-radius: 6px; font-size: 12.5px; line-height: 1.5; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy-nav-i:hover { background: rgba(34,34,34,.05); }
.copy-nav-i.grp { font-weight: 600; }
.copy-nav-i.sub { padding-left: 16px; font-size: 12px; color: var(--muted); }
.copy-nav-i.sub::before { content: '·'; margin-right: 6px; color: var(--sage); }
.copy-nav-i.on { background: var(--sage-soft); color: var(--sage-deep); font-weight: 600; }
.copy-nav-top { width: 100%; margin-top: 8px; border: 0; background: transparent; color: var(--muted); font-size: 12px; padding: 6px; border-radius: 6px; }
.copy-nav-top:hover { background: rgba(34,34,34,.05); color: var(--ink); }
.copy-anchor { scroll-margin-top: 96px; }
.copy-flash { animation: copyFlash 1.3s ease; }
@keyframes copyFlash { 0% { box-shadow: 0 0 0 3px rgba(116,134,129,.5); } 100% { box-shadow: 0 0 0 0 rgba(116,134,129,0); } }
@media (max-width: 1000px) { .copy-split { flex-direction: column; } .copy-nav { position: static; width: 100%; max-height: 280px; top: auto; } }

/* 文案编辑 · 折叠卡片 */
.copy-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.copy-toolbar-act { display: flex; gap: 8px; }
.copy-collapsed { padding: 13px 18px; }
.copy-collapsed-in { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.cc-main { min-width: 0; flex: 1; }
.cc-name { font-size: 15px; font-weight: 600; }
.cc-meta { margin-top: 3px; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.copy-collapsed .mini-btn { flex-shrink: 0; }
.content-card .section-head { align-items: center; }

/* ==========================================================================
   视觉整改层 v2（2026-10-15）—— 纯样式，不改任何标记 / 链接 / 逻辑
   目标：统一间距节奏、字体层级、卡片与表格质感、交互反馈
   ========================================================================== */

/* ---- 1. 设计令牌 ---- */
:root {
  --bg: #F6F3EE;
  --paper: #FFFFFF;
  --ink: #1F2220;
  --ink-2: #3C423F;
  --muted: #7C817E;
  --line: rgba(31,34,32,.10);
  --line-soft: rgba(31,34,32,.06);
  --sage: #748681;
  --sage-deep: #5A6A65;
  --sage-soft: rgba(116,134,129,.10);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --shadow-1: 0 1px 2px rgba(24,28,26,.04), 0 6px 18px -10px rgba(24,28,26,.10);
  --shadow-2: 0 2px 6px rgba(24,28,26,.06), 0 18px 40px -22px rgba(24,28,26,.22);
  --gap: 18px;
}

/* ---- 2. 基础排版 ---- */
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; line-height: 1.55; }
h1, h2, h3 { letter-spacing: -.01em; }
a { color: var(--sage-deep); }
::selection { background: rgba(116,134,129,.22); }
* { scrollbar-width: thin; scrollbar-color: rgba(31,34,32,.22) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: rgba(31,34,32,.18); border: 3px solid transparent; background-clip: content-box; border-radius: 99px; }
*::-webkit-scrollbar-thumb:hover { background: rgba(31,34,32,.3); background-clip: content-box; }

/* ---- 3. 骨架：侧栏 / 顶栏 / 内容区 ---- */
.app { background: var(--bg); }
.sidebar { width: 244px; background: #FFFFFF; border-right: 1px solid var(--line-soft); }
.brand { padding: 22px 20px 18px; border-bottom: 1px solid var(--line-soft); }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(140deg, var(--sage) 0%, var(--sage-deep) 100%); color: #fff; font-weight: 600; }
.brand-name { font-size: 15px; font-weight: 650; letter-spacing: .2px; }
.brand-sub { font-size: 11px; letter-spacing: .04em; color: #9AA09C; }
#nav { padding: 12px 12px 18px; }
.nav-group { margin: 16px 0 6px; padding: 0 10px; font-size: 10.5px; letter-spacing: .12em; color: #A6ABA8; text-transform: uppercase; }
.nav-item { position: relative; padding: 10px 12px 10px 14px; border-radius: var(--radius-sm); font-size: 13.5px; color: #5F6562; transition: background .16s ease, color .16s ease, transform .16s ease; }
.nav-item:hover { background: var(--sage-soft); color: var(--ink); }
.nav-item.active { background: var(--sage-soft); color: var(--ink); font-weight: 600; }
.nav-item.active::before { content: ''; position: absolute; left: 4px; top: 50%; transform: translateY(-50%); width: 3px; height: 18px; border-radius: 3px; background: var(--sage); }
.nav-count { min-width: 18px; height: 18px; line-height: 18px; padding: 0 6px; border-radius: var(--radius-pill); background: rgba(180,85,74,.92); font-size: 11px; font-weight: 600; }
.sidebar-foot { padding: 14px 16px 18px; border-top: 1px solid var(--line-soft); }
.topbar { padding: 22px 34px 16px; background: rgba(246,243,238,.86); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line-soft); }
.topbar h1 { font-size: 21px; font-weight: 650; }
.topbar .muted { font-size: 12.5px; margin-top: 3px; }
.top-right { gap: 10px; }
.view { padding: 24px 34px 72px; max-width: 1440px; }

/* ---- 4. 卡片 / 栅格 / 统计 ---- */
.card { background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow-1); padding: 20px 22px; transition: box-shadow .2s ease, transform .2s ease; }
.section { margin-top: 22px; }
.section > .card + .card { margin-top: 16px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { font-size: 15.5px; font-weight: 650; margin: 0; }
.section-head .muted { font-size: 12px; }
.grid { display: grid; gap: var(--gap); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-2 > .card, .grid-4 > .card { height: 100%; }
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat-label { font-size: 12px; color: var(--muted); letter-spacing: .02em; }
.stat-value { font-size: 27px; font-weight: 680; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat-foot { font-size: 11.5px; color: #9AA09C; }
.card .stat-value { color: var(--ink); }
.cfg-card { margin-bottom: 16px; }
.cfg-toc { gap: 8px; margin: 4px 0 14px; }
.cfg-toc a { padding: 7px 13px; border-radius: var(--radius-pill); background: #F4F1EB; border: 1px solid var(--line-soft); font-size: 12.5px; color: var(--sage-deep); transition: all .16s ease; }
.cfg-toc a:hover { background: var(--sage-soft); border-color: rgba(116,134,129,.28); }

/* ---- 5. 表格（粘性表头 + 舒适行高）---- */
.view table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.view thead th { position: sticky; top: 0; z-index: 2; background: #FBFAF7; color: var(--muted); font-weight: 600; font-size: 11.5px; letter-spacing: .04em; text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.view tbody td { padding: 13px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.view tbody tr:last-child td { border-bottom: none; }
.view tbody tr { transition: background .14s ease; }
.view tbody tr:hover { background: rgba(116,134,129,.05); }
.view table .mono, .view table .x-num { font-variant-numeric: tabular-nums; }
.actions { white-space: nowrap; }

/* ---- 6. 按钮体系 ---- */
button, .btn, .mini-btn { border-radius: var(--radius-sm); transition: background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease, transform .12s ease; }
button:active, .btn:active, .mini-btn:active { transform: translateY(1px); }
button:focus-visible, .btn:focus-visible, .mini-btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid rgba(116,134,129,.45); outline-offset: 2px; }
.primary { background: var(--sage-deep); border: 1px solid var(--sage-deep); color: #fff; padding: 10px 18px; font-weight: 600; box-shadow: 0 1px 2px rgba(24,28,26,.10); }
.primary:hover { background: #4E5C58; }
.ghost { background: #fff; border: 1px solid var(--line); color: var(--ink-2); padding: 10px 16px; }
.ghost:hover { background: #F7F5F1; border-color: rgba(31,34,32,.18); }
.mini-btn { padding: 6px 11px; font-size: 12px; border-radius: 8px; background: #fff; border: 1px solid var(--line); color: var(--sage-deep); font-weight: 500; }
.mini-btn:hover { background: var(--sage-soft); border-color: rgba(116,134,129,.3); }
.mini-btn.solid { background: var(--sage-deep); border-color: var(--sage-deep); color: #fff; }
.mini-btn.solid:hover { background: #4E5C58; }
.block { width: 100%; }

/* ---- 7. 表单 ---- */
.field { margin-bottom: 14px; }
.field > label { display: block; margin-bottom: 6px; font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.field input, .field select, .field textarea { width: 100%; min-height: 38px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #FDFCFA; color: var(--ink); transition: border-color .16s ease, box-shadow .16s ease, background .16s ease; }
.field input:hover, .field select:hover, .field textarea:hover, .search:hover { border-color: rgba(31,34,32,.18); }
.field input:focus, .field select:focus, .field textarea:focus, .search:focus { background: #fff; border-color: var(--sage); box-shadow: 0 0 0 3px rgba(116,134,129,.14); outline: none; }
.field textarea { min-height: 84px; resize: vertical; line-height: 1.6; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 20px; }
.form-grid .field { margin-bottom: 12px; }
.field .muted { font-size: 11.5px; line-height: 1.7; margin-top: 4px; }

/* ---- 8. 标签 / 徽标 / 工具条 / 页签 ---- */
.badge { padding: 6px 11px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 600; border: 1px solid rgba(180,85,74,.24); }
.badge.ok { border-color: rgba(116,134,129,.3); background: rgba(116,134,129,.12); color: var(--sage-deep); }
.badge.warn { border-color: rgba(184,155,106,.34); background: rgba(184,155,106,.14); color: #8A6A2F; }
.tag { padding: 3px 9px; border-radius: 7px; font-size: 11.5px; font-weight: 600; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 0 0 14px; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 7px 13px; border-radius: var(--radius-pill); border: 1px solid var(--line); background: #fff; font-size: 12.5px; color: var(--muted); transition: all .16s ease; }
.chip:hover { border-color: rgba(116,134,129,.34); color: var(--ink); }
.chip.on { background: var(--sage-soft); border-color: rgba(116,134,129,.34); color: var(--sage-deep); font-weight: 600; }
.page-tabs { gap: 4px; padding: 5px; background: #F4F1EB; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); margin-bottom: 18px; }
.page-tab { padding: 8px 15px; border-radius: 8px; font-size: 13px; color: var(--muted); transition: all .16s ease; }
.page-tab:hover { color: var(--ink); }
.page-tab.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(24,28,26,.10); }
.risk { display: flex; align-items: center; gap: 8px; }
.risk-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sage); }

/* ---- 9. 空状态 / 弹窗 / 提示 ---- */
.empty { padding: 42px 16px; text-align: center; color: var(--muted); font-size: 13px; }
.empty::before { content: ''; display: block; width: 46px; height: 46px; margin: 0 auto 12px; border-radius: 50%; border: 1px dashed rgba(31,34,32,.22); background: radial-gradient(circle at 50% 40%, rgba(116,134,129,.14), transparent 62%); }
.modal-mask { background: rgba(24,28,26,.42); backdrop-filter: blur(3px); }
.modal { border-radius: var(--radius); box-shadow: var(--shadow-2); padding: 24px 26px; }
.modal h3 { margin: 0 0 8px; font-size: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.toast { border-radius: var(--radius-pill); box-shadow: var(--shadow-2); padding: 12px 20px; font-size: 13.5px; }

/* ---- 10. 服务与套餐列表 / 媒体卡片 ---- */
.service-block, .service-row { border-radius: var(--radius-sm); }
.pkg-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line-soft); }
.pkg-row:last-child { border-bottom: none; }
.pkg-list { margin: 10px 0 12px; }
.media-item, .content-card, .upload-card, .cc-actions { border-radius: var(--radius-sm); }
.media-thumb, .media-hero-img { border-radius: var(--radius-sm); overflow: hidden; }

/* ---- 11. 登录页 ---- */
.login-mask { background: radial-gradient(circle at 78% 8%, rgba(116,134,129,.26), transparent 44%), radial-gradient(circle at 10% 90%, rgba(184,155,106,.16), transparent 46%), #F6F3EE; }
.login-card { border-radius: 20px; box-shadow: var(--shadow-2); border: 1px solid var(--line-soft); }
.login-card h1 { font-size: 24px; font-weight: 680; }
.login-form input { height: 46px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: #FDFCFA; padding: 0 14px; font-size: 15px; }
.login-form input:focus { border-color: var(--sage); box-shadow: 0 0 0 3px rgba(116,134,129,.14); }

/* ---- 12. 宽屏与小屏适配（只调间距，不改结构）---- */
@media (min-width: 1600px) { .view { max-width: 1560px; } .grid-4 { gap: 22px; } }
@media (max-width: 1180px) { .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); } .view, .topbar { padding-left: 20px; padding-right: 20px; } }
@media (max-width: 900px) { .grid-2, .form-grid { grid-template-columns: 1fr; } .sidebar { width: 200px; } }

/* ---- 7b. 工具条内联控件（保持紧凑，不被撑满）---- */
.toolbar .search { flex: 1 1 240px; max-width: 340px; height: 38px; min-height: 38px; padding: 0 12px; }
.toolbar input[type=date].search { flex: 0 0 150px; max-width: 150px; }
.searchbar .search { flex: 1 1 auto; max-width: none; }
.price-input { width: 96px; min-height: 34px; padding: 7px 10px; }
.upload-input { width: 100%; }

/* ============ 视觉整改层 v3：服务与配置页重排（单列卡片 · 不再横向滚动） ============ */
/* 全局：页面级不出现横向滚动条 */
html, body { max-width: 100%; overflow-x: hidden; }
.view, .card, .section { min-width: 0; }
td, th { word-break: break-word; }
.table-scroll { overflow-x: auto; }
.table-scroll table { display: table; min-width: 520px; }

/* 运营参数：分组目录吸顶，长页不必滚回顶部 */
.cfg-toc { position: sticky; top: 0; z-index: 6; background: var(--paper); padding: 10px 0; margin-top: -4px; border-bottom: 1px solid var(--line-soft); }
.cfg-toc a { white-space: nowrap; }
.cfg-card[id] { scroll-margin-top: 72px; }
.cfg-card > .section-head { margin-bottom: 10px; }
.cfg-card .form-grid { gap: 14px 16px; }

/* ⑧ 服务与套餐价格：每个服务一张小卡，子项目三列网格 */
#cfg-g8 .service-block { border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 12px; background: #FDFCFA; }
#cfg-g8 .service-block:last-child { margin-bottom: 0; }
.service-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 16px; }
.service-head .field { flex: 1 1 260px; }
.service-head-act { display: flex; align-items: center; gap: 8px; padding-bottom: 3px; }
.pkg-head { display: grid; grid-template-columns: minmax(140px, 1.3fr) minmax(240px, 1.5fr) auto; gap: 10px; padding: 2px 0 6px; font-size: 11.5px; color: var(--muted); border-bottom: 1px solid var(--line-soft); }
#cfg-g8 .pkg-row { display: grid; grid-template-columns: minmax(140px, 1.3fr) minmax(240px, 1.5fr) auto; align-items: center; gap: 10px; padding: 8px 0; border: none; border-bottom: 1px dashed var(--line-soft); border-radius: 0; background: transparent; font-size: 13px; }
#cfg-g8 .pkg-row:last-child { border-bottom: none; }
.pkg-name { overflow-wrap: anywhere; }
.pkg-price { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pkg-ctrl { display: inline-flex; align-items: center; gap: 6px; }
.pkg-act { justify-self: end; }
.pkg-row.off .pkg-name, .pkg-row.off .pkg-price { opacity: .5; }
.pkg-mode { min-width: 116px; }
#cfg-g8 .price-input { width: 92px; }

/* ⑨ 订阅消息模板：固定表格布局；窄屏自动转卡片，永不横向滚动 */
.tpl-table { table-layout: fixed; }
.tpl-table th:nth-child(1), .tpl-table td:nth-child(1) { width: 23%; }
.tpl-table th:nth-child(2), .tpl-table td:nth-child(2) { width: 39%; }
.tpl-table th:nth-child(3), .tpl-table td:nth-child(3) { width: 38%; }
.tpl-fields { line-height: 1.75; }
.tpl-input-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tpl-input { width: 100%; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }
.tpl-input-wrap .tag { white-space: nowrap; }

@media (max-width: 1080px) {
  .pkg-head { display: none; }
  #cfg-g8 .pkg-row { grid-template-columns: 1fr; gap: 6px; padding: 10px 0; }
  .pkg-act { justify-self: start; }
  .tpl-table thead { display: none; }
  .tpl-table, .tpl-table tbody, .tpl-table tr, .tpl-table td { display: block; width: auto; }
  .tpl-table { border: none; min-width: 0; }
  .tpl-table tr { padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
  .tpl-table td { border: none; padding: 3px 0; }
}
@media (max-width: 960px) {
  .cfg-toc { position: static; }
  .service-head { align-items: stretch; }
}

/* ---- 可折叠长卡片（⑧ 服务与套餐价格 / ⑨ 订阅消息模板）---- */
details.cfg-fold { padding: 14px 18px; }
details.cfg-fold > summary { cursor: pointer; list-style: none; align-items: center; margin-bottom: 0; }
details.cfg-fold > summary::-webkit-details-marker { display: none; }
details.cfg-fold > summary::after { content: '展开 ▾'; flex: 0 0 auto; font-size: 12px; color: var(--sage-deep); padding-left: 12px; }
details.cfg-fold[open] > summary::after { content: '收起 ▴'; }
details.cfg-fold[open] > summary { margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line-soft); }
details.cfg-fold > summary:hover h2 { color: var(--sage-deep); }
.cfg-fold-body { min-width: 0; }

/* 长错误提示：居中卡片，自动换行，避免横跨整页 */
.toast { max-width: min(760px, calc(100vw - 40px)); white-space: normal; text-align: center; line-height: 1.65; border-radius: 16px !important; padding: 14px 20px; word-break: break-word; }

/* ==========================================================================
   r86 · 暖调编辑式运营中枢
   仅视觉层升级：不改 URL、data-act、data-id、云端接口与业务事件
   ========================================================================== */
:root {
  --bg: #eee8de;
  --paper: #fffdf8;
  --paper-2: #f8f4ec;
  --ink: #192d27;
  --ink-2: #34473f;
  --muted: #75807a;
  --line: rgba(29,55,46,.13);
  --line-soft: rgba(29,55,46,.075);
  --sage: #71877d;
  --sage-deep: #2d5146;
  --sage-soft: rgba(74,111,97,.1);
  --brass: #c8a45f;
  --brass-soft: rgba(200,164,95,.15);
  --danger: #b75a48;
  --danger-soft: rgba(183,90,72,.1);
  --blue: #4b7180;
  --blue-soft: rgba(75,113,128,.1);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-1: 0 1px 1px rgba(25,45,39,.035), 0 12px 30px -24px rgba(25,45,39,.32);
  --shadow-2: 0 3px 8px rgba(25,45,39,.06), 0 24px 60px -34px rgba(25,45,39,.34);
  --gap: 16px;
}
html { background: #e8e2d8; }
body {
  font-family: "HarmonyOS Sans SC", "MiSans", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: radial-gradient(circle at 82% -10%, rgba(200,164,95,.15), transparent 34%), linear-gradient(135deg, rgba(255,255,255,.22) 0 1px, transparent 1px 14px), var(--bg);
  background-size: auto, 14px 14px, auto;
}
button, input, textarea, select { letter-spacing: .01em; }
.app { background: transparent; }
.sidebar {
  width: 252px;
  color: #e8eee9;
  background: radial-gradient(circle at 20% 0%, rgba(200,164,95,.13), transparent 30%), linear-gradient(180deg, #1b4037 0%, #17382f 54%, #112c26 100%);
  border-right: 0;
  box-shadow: 10px 0 36px -28px rgba(12,31,26,.72);
  isolation: isolate;
}
.sidebar::after { content: ''; position: absolute; inset: 0 0 auto; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent); pointer-events: none; }
.brand { padding: 25px 20px 22px; border-bottom: 1px solid rgba(255,255,255,.09); }
.brand-mark {
  width: 42px; height: 42px; border-radius: 50% 50% 50% 12px; color: #1b3a32;
  background: linear-gradient(145deg, #e3c984, #b58b44);
  box-shadow: 0 8px 18px -10px rgba(0,0,0,.55), inset 0 1px rgba(255,255,255,.6);
  font-family: "STSong", "SimSun", serif; font-size: 19px;
}
.brand-name { color: #fffaf0; font-size: 16px; letter-spacing: .08em; }
.brand-sub { color: rgba(231,239,234,.56); letter-spacing: .1em; text-transform: uppercase; }
#nav { padding: 14px 12px 20px; }
.nav-group { margin: 18px 0 7px; padding: 0 12px; color: rgba(230,238,233,.38); letter-spacing: .16em; font-size: 10px; }
.nav-item { display: flex; align-items: center; justify-content: space-between; min-height: 42px; padding: 10px 12px; margin-bottom: 3px; color: rgba(235,242,238,.68); border: 1px solid transparent; border-radius: 9px; transition: background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease; }
.nav-label { display: inline-flex; align-items: center; gap: 11px; min-width: 0; }
.nav-icon { width: 18px; height: 18px; display: inline-flex; flex: 0 0 18px; opacity: .78; }
.nav-icon svg { width: 18px; height: 18px; }
.nav-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-item:hover { color: #fffdf7; background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.055); transform: translateX(2px); }
.nav-item:hover .nav-icon { opacity: 1; }
.nav-item.active { color: #fffdf7; background: linear-gradient(90deg, rgba(200,164,95,.2), rgba(255,255,255,.075)); border-color: rgba(200,164,95,.22); box-shadow: inset 0 1px rgba(255,255,255,.05); font-weight: 600; }
.nav-item.active::before { left: -1px; width: 3px; height: 22px; background: linear-gradient(180deg, #efd792, #bd9148); box-shadow: 0 0 14px rgba(200,164,95,.45); }
.nav-item.active .nav-icon { color: #eed38c; opacity: 1; }
.nav-count { background: #ce7059; color: #fffaf4; min-width: 19px; height: 19px; line-height: 19px; box-shadow: 0 4px 10px -6px rgba(0,0,0,.8); }
.sidebar-foot { border-top: 1px solid rgba(255,255,255,.085); }
.sidebar-foot .muted { color: rgba(231,239,234,.42) !important; }
.sidebar-foot .ghost { color: rgba(245,249,246,.76); border-color: rgba(255,255,255,.16); }
.sidebar-foot .ghost:hover { color: #fff; background: rgba(255,255,255,.07); }
.main { background: linear-gradient(180deg, rgba(255,253,248,.34), transparent 240px); }
.topbar { padding: 20px 34px 17px; background: rgba(243,238,229,.88); border-bottom: 1px solid rgba(29,55,46,.1); box-shadow: 0 1px 0 rgba(255,255,255,.55) inset; }
.topbar::after { content: ''; position: absolute; left: 34px; bottom: -1px; width: 42px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--brass), transparent); }
.topbar h1 { color: var(--ink); font-size: 22px; letter-spacing: .02em; }
.topbar .muted { color: #7f8882; }
#today { color: #8a928d; letter-spacing: .04em; }
.view { max-width: 1520px; padding: 26px 34px 78px; }

/* 卡片与数据层级 */
.card { background: linear-gradient(180deg, rgba(255,255,255,.58), transparent 36px), var(--paper); border: 1px solid var(--line-soft); border-radius: 12px; box-shadow: var(--shadow-1); }
.card:hover { box-shadow: var(--shadow-2); }
.section { margin-top: 24px; }
.section-head { margin-bottom: 13px; }
.section-head h2 { color: var(--ink); font-size: 16px; letter-spacing: .025em; }
.section-head h2::before { content: ''; display: inline-block; width: 5px; height: 5px; margin: 0 9px 2px 0; border-radius: 50%; background: var(--brass); box-shadow: 0 0 0 4px var(--brass-soft); }
.grid-4 { grid-template-columns: 1.16fr repeat(3, minmax(0,1fr)); }
.stat { position: relative; overflow: hidden; min-height: 132px; justify-content: space-between; padding: 21px 22px 18px; }
.stat::after { content: ''; position: absolute; right: -36px; bottom: -48px; width: 118px; height: 118px; border-radius: 50%; border: 1px solid rgba(113,135,125,.12); }
.stat .stat-label { color: #6f7c75; font-weight: 600; letter-spacing: .07em; }
.stat .stat-value { color: var(--ink); font-size: 31px; font-weight: 720; }
.stat .stat-foot { color: #939b96; }
.grid-4 > .stat:first-child { color: #f8f2e6; border-color: rgba(255,255,255,.05); background: radial-gradient(circle at 90% 10%, rgba(200,164,95,.24), transparent 36%), linear-gradient(145deg, #245044, #17392f); box-shadow: 0 18px 38px -30px rgba(16,48,39,.92); }
.grid-4 > .stat:first-child .stat-label, .grid-4 > .stat:first-child .stat-foot { color: rgba(240,247,242,.63); }
.grid-4 > .stat:first-child .stat-value { color: #fff9ec; }
.grid-4 > .stat:not(:first-child)::before { content: ''; position: absolute; left: 22px; right: 22px; top: 0; height: 2px; background: linear-gradient(90deg, var(--brass), transparent 70%); opacity: .55; }
.todo { cursor: pointer; position: relative; overflow: hidden; min-height: 120px; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.todo::before { content: ''; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brass); opacity: 0; transition: opacity .18s ease; }
.todo:hover { transform: translateY(-2px); border-color: rgba(200,164,95,.28); }
.todo:hover::before { opacity: 1; }
.todo .num { color: var(--brass); font-size: 28px; font-weight: 720; line-height: 1; }
.todo .name { margin-top: 8px; color: var(--ink); font-weight: 650; }
.todo .desc { color: var(--muted); }
.risk { border-bottom: 1px dashed var(--line-soft); padding: 13px 0; }
.risk:first-child { padding-top: 2px; }
.risk:last-child { border-bottom: 0; padding-bottom: 2px; }
.risk-dot { width: 8px; height: 8px; box-shadow: 0 0 0 4px var(--danger-soft); }
.risk-t { color: var(--ink); }
.view table { background: var(--paper); border: 1px solid var(--line-soft); border-radius: 10px; overflow: hidden; box-shadow: 0 12px 28px -30px rgba(25,45,39,.35); }
.view thead th { background: #e8ede8; color: #53675e; font-size: 11px; letter-spacing: .09em; text-transform: uppercase; padding: 11px 13px; }
.view tbody td { padding: 12px 13px; border-bottom-color: rgba(29,55,46,.065); }
.view tbody tr:nth-child(even) { background: rgba(248,245,238,.42); }
.view tbody tr:hover { background: rgba(200,164,95,.075); }
.toolbar { gap: 9px; }
.toolbar .search, input.search, textarea, select, input[type=text], input[type=password], input[type=number], input[type=date] { border-radius: 8px; border-color: rgba(29,55,46,.14); background-color: rgba(255,254,250,.82); }
.toolbar .search:focus, input:focus, textarea:focus, select:focus { border-color: rgba(45,81,70,.46) !important; box-shadow: 0 0 0 3px rgba(74,111,97,.09) !important; }
.primary { background: linear-gradient(180deg, #31594d, #264c41); border-color: #264c41; box-shadow: 0 7px 16px -12px rgba(24,61,51,.9); }
.primary:hover { background: linear-gradient(180deg, #386458, #2b5448); }
.ghost { color: var(--sage-deep); border-color: rgba(45,81,70,.19); background: rgba(255,255,255,.28); }
.ghost:hover { background: var(--sage-soft); }
.chip.on { color: #fffaf0; background: #264c41; border-color: #264c41; }
.tag { letter-spacing: .02em; }
.badge { border-radius: 7px; }

/* 登录页与响应式 */
.login-mask { background: radial-gradient(circle at 78% 12%, rgba(200,164,95,.2), transparent 32%), radial-gradient(circle at 16% 88%, rgba(45,81,70,.14), transparent 38%), #ece6dc; }
.login-card { width: 440px; border-radius: 16px; border-color: rgba(29,55,46,.12); box-shadow: 0 30px 90px -50px rgba(21,48,40,.7), 0 1px 0 rgba(255,255,255,.9) inset; position: relative; overflow: hidden; }
.login-card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, #244b40, var(--brass), #244b40); }
.login-card .logo { border-radius: 50% 50% 50% 12px; background: linear-gradient(145deg, #2f5b4e, #193b32); box-shadow: 0 12px 24px -16px #17372f; }
.login-card h1 { font-size: 25px; letter-spacing: .03em; }
.login-form .primary { height: 46px; }
@media (max-width: 1180px) {
  .sidebar { width: 222px; }
  .brand-sub { display: none; }
  .topbar, .view { padding-left: 24px; padding-right: 24px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 900px) {
  .sidebar { width: 76px; }
  .brand { justify-content: center; padding: 20px 10px; }
  .brand > div:last-child, .nav-text, .nav-group, .sidebar-foot .muted { display: none; }
  #nav { padding: 12px 8px; }
  .nav-item { justify-content: center; padding: 11px 8px; }
  .nav-label { gap: 0; }
  .nav-icon, .nav-icon svg { width: 20px; height: 20px; flex-basis: 20px; }
  .nav-count { position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; line-height: 16px; padding: 0 4px; font-size: 9px; }
  .sidebar-foot { padding: 12px 8px; }
  .sidebar-foot .ghost { font-size: 0; padding: 10px 8px; }
  .sidebar-foot .ghost::after { content: '退出'; font-size: 11px; }
  .topbar { padding: 17px 20px 15px; }
  .topbar h1 { font-size: 20px; }
  .view { padding: 20px 20px 60px; }
}
@media (max-width: 680px) {
  .app { display: block; }
  .sidebar { position: relative; width: 100%; height: auto; flex-direction: row; align-items: center; overflow: visible; }
  .brand { border: 0; padding: 12px; flex: 0 0 auto; }
  .brand-mark { width: 34px; height: 34px; }
  #nav { display: flex; gap: 4px; padding: 8px 8px 8px 0; overflow-x: auto; flex: 1; }
  .nav-item { flex: 0 0 42px; margin: 0; }
  .sidebar-foot { border: 0; padding: 8px; flex: 0 0 auto; }
  .topbar { position: relative; }
  .top-right { flex-wrap: wrap; justify-content: flex-end; }
  .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .view table { display: block; overflow-x: auto; }
}

/* 服务项目新增与预约/咨询模式 */
.pkg-add-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding: 12px 0 2px; border-top: 1px dashed rgba(29,29,27,.10); margin-top: 8px; }
.pkg-add-actions .muted { margin-right: auto; font-size: 11.5px; }
.pkg-act { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.pkg-mode-tag { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 9px; background: rgba(184,85,74,.10); color: #B8554A; font-size: 10px; font-weight: 500; vertical-align: middle; }
.pkg-edit-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(220px, .8fr); gap: 12px; }
.content-pkg textarea { min-height: 76px; resize: vertical; }
.content-pkg .field { margin-bottom: 10px; }
@media (max-width: 760px) { .pkg-edit-grid { grid-template-columns: 1fr; } .pkg-add-actions { justify-content: flex-start; } .pkg-add-actions .muted { width: 100%; } }

/* ============================================================
   ARDOT BLUE ADMIN THEME · 2026-10-30
   参考「贤助到家-管理后台-全面改版」视觉规范
   ============================================================ */
:root {
  --bg: #F3F6FB;
  --paper: #FFFFFF;
  --ink: #102A43;
  --muted: #667085;
  --line: #E3EAF3;
  --sage: #0B57D0;
  --sage-deep: #0B4CA3;
  --sage-soft: #EAF2FF;
  --warn: #B7791F;
  --warn-soft: #FFF6E5;
  --danger: #D64545;
  --danger-soft: #FFF0F0;
  --blue: #0B57D0;
  --blue-soft: #EAF2FF;
  --card-shadow: 0 4px 18px rgba(16, 42, 67, .055);
  --nav-shadow: 0 8px 22px rgba(11, 87, 208, .22);
}
html, body { background: var(--bg); color: var(--ink); }
body { font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, textarea, select { color: var(--ink); }

/* 登录页 */
.login-mask { background: radial-gradient(circle at 78% 12%, rgba(11,87,208,.18), transparent 34%), radial-gradient(circle at 16% 88%, rgba(34,197,94,.08), transparent 34%), #F3F6FB; }
.login-card { background: #fff; border: 1px solid #DCE6F3; border-radius: 18px; box-shadow: 0 28px 80px -36px rgba(15, 42, 75, .38); }
.logo { width: 54px; height: 54px; border-radius: 14px; background: linear-gradient(145deg, #0D2A51, #0B57D0); color: #fff; box-shadow: 0 12px 24px -14px rgba(11,87,208,.8); }
.login-card h1 { color: #0F2744; }
.login-form input { border: 1px solid #DCE6F3; border-radius: 9px; height: 46px; padding: 0 14px; margin-top: 10px; background: #F9FBFE; transition: .18s; }
.login-form input:focus { border-color: #0B57D0; box-shadow: 0 0 0 3px rgba(11,87,208,.10); background: #fff; }

/* 主框架 */
.app { background: var(--bg); }
.sidebar { width: 226px; background: #F8FAFD; border-right: 1px solid #E5ECF5; box-shadow: 2px 0 14px rgba(16,42,67,.025); }
.brand { padding: 24px 20px 20px; border-bottom: 0; gap: 11px; }
.brand-mark { width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(145deg, #102E57 0%, #0B57D0 100%); color: #fff; position: relative; box-shadow: 0 10px 22px -12px rgba(11,87,208,.75); }
.brand-mark svg { width: 21px; height: 21px; }
.brand-mark i { position: absolute; right: -2px; top: -2px; width: 9px; height: 9px; border-radius: 50%; background: #F59E0B; border: 2px solid #F8FAFD; }
.brand-name { color: #0F2744; font-size: 16px; font-weight: 750; letter-spacing: .2px; }
.brand-sub { color: #7B8BA3; font-size: 11px; margin-top: 2px; letter-spacing: .4px; }
#nav { padding: 8px 12px 14px; }
.nav-group { margin: 18px 9px 7px; padding: 0; font-size: 10.5px; font-weight: 650; letter-spacing: .12em; color: #98A6B9; }
.nav-item { padding: 10px 12px; min-height: 42px; border-radius: 9px; color: #475467; margin-bottom: 3px; gap: 10px; transition: background .16s, color .16s, transform .16s, box-shadow .16s; }
.nav-item:hover { background: #EDF4FF; color: #0B57D0; transform: translateX(1px); }
.nav-item.active { background: linear-gradient(135deg, #0B57D0, #0849A8); color: #fff; font-weight: 650; box-shadow: var(--nav-shadow); }
.nav-item.active:hover { color: #fff; background: linear-gradient(135deg, #0C5EDF, #0849A8); }
.nav-label { display: flex; align-items: center; gap: 10px; min-width: 0; }
.nav-icon { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; color: #6E8098; flex-shrink: 0; }
.nav-icon svg { width: 17px; height: 17px; }
.nav-item:hover .nav-icon { color: #0B57D0; }
.nav-item.active .nav-icon { color: #fff; }
.nav-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-count { min-width: 19px; height: 19px; line-height: 19px; padding: 0 5px; border-radius: 10px; background: #E5484D; color: #fff; font-size: 10px; font-weight: 700; box-shadow: 0 0 0 2px #F8FAFD; }
.nav-item.active .nav-count { box-shadow: 0 0 0 2px rgba(255,255,255,.18); }
.sidebar-foot { padding: 14px 16px 18px; border-top: 1px solid #E7EDF5; background: rgba(255,255,255,.45); }
.sidebar-foot .muted { color: #8A99AD !important; }
.sidebar-foot .ghost { background: #fff; border-color: #DCE6F3; color: #50647D; }
.main { background: var(--bg); }
.topbar { padding: 18px 28px 16px; background: rgba(255,255,255,.96); border-bottom: 1px solid #E6EDF6; box-shadow: 0 2px 10px rgba(16,42,67,.025); }
.topbar h1 { font-size: 21px; line-height: 1.35; font-weight: 750; color: #0F2744; letter-spacing: .2px; }
.topbar #pageDesc { margin-top: 3px; color: #7B8BA3; font-size: 12px; }
.top-right { gap: 9px; color: #667085; }
.top-right #today { color: #8A99AD; white-space: nowrap; }
.badge { padding: 6px 11px; border-radius: 999px; border: 1px solid #D9E6F8; background: #EFF5FF; color: #365E96; font-size: 11.5px; }
.badge.ok { border-color: #CDEBD8; background: #F0FBF4; color: #21864B; }
.badge.warn { border-color: #FFE1AD; background: #FFF8E9; color: #A86500; }
#dataSource { border-color: #D9E6F8; background: #EFF5FF; color: #365E96; }
#pendingBadge { border-color: #FFE1AD; background: #FFF7E8; color: #A86500; }
.admin-avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(145deg, #102E57, #2563EB); color: #fff; font-size: 12px; font-weight: 700; box-shadow: 0 5px 12px -7px rgba(11,87,208,.8); }
.view { padding: 24px 28px 58px; max-width: 1660px; margin: 0 auto; width: 100%; }

/* 通用控件 */
.primary, .ghost, .danger, .mini-btn { border-radius: 8px; font-weight: 550; transition: .16s; }
.primary { background: linear-gradient(180deg, #0F62E6, #0B57D0); color: #fff; border-color: #0B57D0; box-shadow: 0 7px 16px -12px rgba(11,87,208,.95); }
.primary:hover { background: linear-gradient(180deg, #176BEE, #0B51C2); border-color: #0B51C2; }
.ghost { background: #fff; border-color: #DCE6F3; color: #365E96; }
.ghost:hover { background: #F1F6FF; border-color: #BFD5F4; color: #0B57D0; }
.danger { background: #fff; border-color: #F2C9C9; color: #D64545; }
.danger:hover { background: #FFF3F3; }
.mini-btn { background: #fff; border-color: #DCE6F3; color: #50647D; padding: 6px 10px; }
.mini-btn:hover { border-color: #BFD5F4; background: #F5F9FF; color: #0B57D0; }
.mini-btn.solid { background: #0B57D0; border-color: #0B57D0; color: #fff; box-shadow: 0 5px 12px -9px rgba(11,87,208,.9); }
.mini-btn.solid:hover { background: #0A4DB8; }
button:disabled, .btn.disabled { opacity: .48; cursor: not-allowed; }
input, textarea, select { border-color: #DCE6F3 !important; border-radius: 8px !important; background: #fff !important; color: #102A43; outline: none; transition: border-color .16s, box-shadow .16s; }
input:focus, textarea:focus, select:focus { border-color: #0B57D0 !important; box-shadow: 0 0 0 3px rgba(11,87,208,.09); }
input::placeholder, textarea::placeholder { color: #A2AFC0; }

/* 卡片与仪表盘 */
.grid { gap: 16px; }
.card { background: #fff; border: 1px solid #E5ECF5; border-radius: 12px; padding: 20px 22px; box-shadow: var(--card-shadow); }
.section { margin-top: 22px; }
.section-head { margin-bottom: 12px; align-items: center; }
.section-head h2 { font-size: 16px; color: #0F2744; font-weight: 700; }
.section-head .muted { color: #8290A3; }
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.dash-title { font-size: 22px; font-weight: 760; color: #102A43; letter-spacing: .1px; }
.dash-sub { margin-top: 5px; font-size: 12px; color: #7B8BA3; }
.dash-live { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 999px; background: #F0FBF4; color: #21864B; font-size: 11.5px; border: 1px solid #D3F0DE; white-space: nowrap; }
.dash-live span { width: 7px; height: 7px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 4px rgba(34,197,94,.11); }
.dash-metrics { display: grid; grid-template-columns: 1.42fr 1fr 1fr 1fr; gap: 15px; }
.metric-card { min-height: 128px; padding: 18px 20px; border: 1px solid #E5ECF5; border-radius: 12px; background: #fff; box-shadow: var(--card-shadow); position: relative; overflow: hidden; }
.metric-card::after { content: ''; position: absolute; right: -42px; bottom: -56px; width: 128px; height: 128px; border-radius: 50%; border: 1px solid rgba(11,87,208,.07); }
.metric-primary { color: #fff; border-color: transparent; background: radial-gradient(circle at 92% 8%, rgba(96,165,250,.45), transparent 38%), linear-gradient(135deg, #0D2E59 0%, #0B57D0 100%); box-shadow: 0 14px 28px -19px rgba(11,87,208,.72); }
.metric-primary::after { width: 180px; height: 180px; right: -60px; bottom: -95px; border-color: rgba(255,255,255,.13); }
.metric-label { font-size: 12px; color: #667085; font-weight: 550; }
.metric-primary .metric-label { color: rgba(255,255,255,.72); }
.metric-value { margin-top: 9px; font-size: 30px; line-height: 1.12; font-weight: 760; color: #102A43; }
.metric-primary .metric-value { color: #fff; font-size: 32px; }
.metric-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; font-size: 11px; color: #98A6B9; }
.metric-primary .metric-foot { color: rgba(255,255,255,.67); }
.metric-chip { padding: 3px 8px; border-radius: 999px; background: rgba(255,255,255,.15); color: #fff; font-size: 10.5px; }
.metric-icon { float: right; width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.metric-icon.blue { color: #0B57D0; background: #EAF2FF; }
.metric-icon.green { color: #15803D; background: #EBF9F0; }
.metric-icon.amber { color: #B7791F; background: #FFF5E4; }
.dash-main-row { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(310px, .9fr); gap: 16px; margin-top: 16px; }
.card-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.card-title { font-size: 15px; font-weight: 700; color: #102A43; }
.card-subtitle { margin-top: 4px; color: #8A99AD; font-size: 11.5px; }
.soft-pill { padding: 5px 9px; border-radius: 999px; background: #F1F6FF; color: #0B57D0; font-size: 10.5px; border: 1px solid #DCE9FC; white-space: nowrap; }
.bar-chart { height: 220px; display: flex; align-items: stretch; gap: 12px; padding: 8px 4px 0; border-bottom: 1px solid #EDF1F6; background: repeating-linear-gradient(to top, transparent 0, transparent 54px, #F5F8FC 55px); }
.bar-col { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.bar-val { height: 18px; font-size: 10px; color: #6D7F96; white-space: nowrap; }
.bar-track { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; min-height: 120px; }
.bar-fill { width: min(42px, 64%); border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, #3B82F6, #0B57D0); box-shadow: 0 6px 14px -10px rgba(11,87,208,.7); transition: height .3s ease; }
.bar-label { padding-top: 7px; font-size: 10.5px; color: #8A99AD; }
.status-visual { display: flex; align-items: center; justify-content: space-around; gap: 24px; min-height: 220px; padding: 8px 0; }
.donut { width: 146px; height: 146px; border-radius: 50%; padding: 18px; flex-shrink: 0; box-shadow: inset 0 0 0 1px rgba(16,42,67,.025); }
.donut-inner { width: 100%; height: 100%; border-radius: 50%; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 0 0 1px #EEF2F7; }
.donut-inner b { font-size: 26px; color: #102A43; line-height: 1; }
.donut-inner span { margin-top: 7px; color: #8A99AD; font-size: 10.5px; }
.legend { min-width: 134px; display: grid; gap: 11px; }
.legend-item { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 8px; font-size: 11.5px; color: #667085; }
.legend-item b { color: #102A43; font-size: 12px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.todo { cursor: pointer; position: relative; min-height: 124px; overflow: hidden; padding: 18px 20px; }
.todo:hover { transform: translateY(-2px); border-color: #BFD5F4; background: #FBFDFF; box-shadow: 0 12px 26px -20px rgba(11,87,208,.35); }
.todo-icon { position: absolute; right: 16px; top: 15px; width: 28px; height: 28px; border-radius: 9px; display: flex; align-items: center; justify-content: center; color: #0B57D0; background: #EDF4FF; font-size: 12px; font-weight: 800; }
.todo .num { color: #0B57D0; font-size: 28px; }
.todo .name { color: #102A43; }
.todo .desc { color: #8A99AD; }
.risk { padding: 13px 0; border-bottom: 1px solid #EEF2F7; }
.risk:last-child { border-bottom: 0; }
.risk-dot { width: 8px; height: 8px; margin-top: 6px; box-shadow: 0 0 0 4px rgba(11,87,208,.06); }
.risk-t { color: #102A43; font-weight: 600; }
.risk-d { margin-top: 3px; color: #8A99AD; font-size: 11.5px; }

/* 表格 */
.table-scroll { width: 100%; overflow-x: auto; }
.table-card { padding-bottom: 8px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; margin-top: 8px; background: #fff; border: 1px solid #E7EDF5; border-radius: 10px; overflow: hidden; }
th { padding: 12px 14px; background: #F4F8FD; color: #667085; font-size: 11.5px; font-weight: 650; text-align: left; border-bottom: 1px solid #E8EEF6; white-space: nowrap; }
td { padding: 13px 14px; border-bottom: 1px solid #EFF3F8; color: #344054; font-size: 12.5px; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #F8FBFF; }
.order-no-link { color: #0B57D0; font-weight: 600; text-decoration: none; }
.amount-cell { color: #102A43; font-weight: 650; }
.table-card table { margin: 0; }
.table-card table thead th:first-child { border-radius: 10px 0 0 0; }
.table-card table thead th:last-child { border-radius: 0 10px 0 0; }
.tag { padding: 4px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 600; border: 1px solid transparent; }
.tag.green { background: #ECFAF2; color: #21864B; border-color: #D4F0DF; }
.tag.w { background: #FFF8E9; color: #A86500; border-color: #FFE4B2; }
.tag.a { background: #EEF5FF; color: #0B57D0; border-color: #D8E7FF; }
.tag.d { background: #FFF1F1; color: #C63F3F; border-color: #F3D2D2; }
.tag.red { background: #FFF1F1; color: #C63F3F; border-color: #F3D2D2; }

/* 筛选、分页、标签与快捷入口 */
.toolbar, .filters, .filter-row { gap: 10px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.filters { display: flex; flex-wrap: wrap; }
.chip { padding: 7px 12px; border-radius: 999px; border: 1px solid #DCE6F3; background: #fff; color: #667085; font-size: 11.5px; }
.chip:hover { border-color: #BFD5F4; color: #0B57D0; }
.chip.on { color: #fff; background: #0B57D0; border-color: #0B57D0; box-shadow: 0 5px 13px -10px rgba(11,87,208,.9); }
.search { border-radius: 8px; }
.page-tabs { display: flex; gap: 4px; background: #EEF4FC; border: 1px solid #E1EAF6; border-radius: 10px; padding: 4px; width: max-content; margin-bottom: 16px; }
.page-tab { padding: 8px 15px; border-radius: 7px; color: #667085; font-size: 12px; }
.page-tab.on { background: #fff; color: #0B57D0; font-weight: 650; box-shadow: 0 2px 7px rgba(16,42,67,.07); }
.cfg-toc a { background: #F1F6FF; border-color: #DCE9FC; color: #365E96; }
.cfg-toc a:hover { background: #E8F1FF; color: #0B57D0; }
details.cfg-card, .cfg-card { background: #fff; }

/* 图片、内容与配置卡片 */
.media-card, .content-card, .service-block, .coupon-card { border-color: #E5ECF5; }
.media-card:hover, .content-pkg:hover, .service-block:hover { border-color: #C8D9F1; }
.service-block { border-radius: 12px; background: #fff; }
.service-head { background: #F8FAFD; border-bottom: 1px solid #E9EFF6; }
.pkg-head { background: #F4F8FD; color: #667085; }
.pkg-row { border-bottom-color: #EFF3F8; }
.pkg-row:hover { background: #F8FBFF; }
.price-input { border-color: #DCE6F3 !important; }

/* 弹窗与提示 */
.modal { border-radius: 14px; box-shadow: 0 28px 80px -38px rgba(16,42,67,.58); }
.toast { border-radius: 9px; background: #102A43; color: #fff; box-shadow: 0 12px 30px -18px rgba(16,42,67,.8); }
#entryWarn { background: #D64545 !important; }

/* 响应式 */
@media (max-width: 1180px) {
  .dash-metrics { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .metric-primary { grid-column: span 1; }
  .dash-main-row { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 820px) {
  .sidebar { width: 196px; }
  .view { padding: 18px 18px 48px; }
  .topbar { padding: 16px 18px; }
  .top-right #today, .top-right #dataSource { display: none; }
  .dash-head { align-items: flex-start; flex-direction: column; }
  .dash-metrics { grid-template-columns: 1fr; }
  .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .status-visual { flex-direction: column; }
}

/* 顶部全局搜索 */
.topbar { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(300px, 460px) auto; align-items: center; gap: 22px; }
.top-search { height: 38px; display: flex; align-items: center; gap: 9px; padding: 0 11px; background: #F6F9FD; border: 1px solid #E1E9F4; border-radius: 9px; transition: .16s; min-width: 0; }
.top-search:focus-within { background: #fff; border-color: #BFD5F4; box-shadow: 0 0 0 3px rgba(11,87,208,.07); }
.top-search-icon { color: #8A99AD; font-size: 18px; transform: rotate(-20deg); }
.top-search input { flex: 1; min-width: 0; border: 0 !important; box-shadow: none !important; background: transparent !important; padding: 0 !important; height: 34px; font-size: 12px; }
.top-search-key { color: #A2AFC0; font-size: 10px; padding: 2px 5px; border: 1px solid #E3EAF3; border-radius: 5px; background: #fff; white-space: nowrap; }
@media (max-width: 980px) { .topbar { grid-template-columns: 1fr auto; } .top-search { display: none; } }

/* 数据分析、导出与系统链路 */
.analysis-kpis { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin-bottom:16px; }
.analysis-kpi { padding:18px 20px; border:1px solid #E5ECF5; border-radius:12px; background:#fff; box-shadow:var(--card-shadow); }
.analysis-kpi span { display:block; color:#7B8BA3; font-size:11.5px; }
.analysis-kpi b { display:block; margin-top:8px; color:#102A43; font-size:26px; line-height:1.15; }
.analysis-kpi small { display:block; margin-top:7px; color:#A2AFC0; font-size:10.5px; }
.analysis-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-bottom:16px; }
.analysis-grid-wide { grid-template-columns:1.25fr .9fr; }
.funnel { display:grid; gap:14px; padding:8px 0 4px; }
.funnel-row { display:grid; grid-template-columns:72px 1fr 44px 46px; align-items:center; gap:10px; font-size:11.5px; color:#667085; }
.funnel-row > span { color:#50647D; }
.funnel-row > b { text-align:right; color:#102A43; font-size:12px; }
.funnel-row > small { text-align:right; color:#8A99AD; }
.funnel-track,.category-track,.mini-progress { height:8px; border-radius:999px; background:#EEF3F9; overflow:hidden; }
.funnel-track i,.category-track i,.mini-progress i { display:block; height:100%; min-width:4px; border-radius:999px; background:#0B57D0; }
.category-list { display:grid; gap:14px; padding:8px 0 4px; }
.category-row { display:grid; grid-template-columns:92px 1fr 74px; align-items:center; gap:12px; font-size:11.5px; color:#667085; }
.category-row > span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.category-row > b { text-align:right; color:#102A43; font-size:11.5px; }
.analytic-bars { height:210px; display:flex; align-items:stretch; gap:12px; padding-top:10px; border-bottom:1px solid #EDF2F8; background:repeating-linear-gradient(to top,transparent 0,transparent 52px,#F6F9FC 53px); }
.analytic-bar-col { flex:1; min-width:0; display:flex; flex-direction:column; align-items:center; gap:6px; }
.analytic-bar-col > span { height:18px; color:#6D7F96; font-size:10px; }
.analytic-bar-col > div { flex:1; width:100%; display:flex; align-items:flex-end; justify-content:center; }
.analytic-bar-col i { width:min(38px,65%); border-radius:5px 5px 2px 2px; background:linear-gradient(180deg,#3B82F6,#0B57D0); }
.analytic-bar-col small { padding:7px 0; color:#8A99AD; font-size:10px; }
.compact-table th,.compact-table td { padding:10px 12px; }
.compact-table .mini-progress { display:inline-block; width:70px; margin-right:7px; vertical-align:middle; }
.export-layout { display:grid; grid-template-columns:minmax(0,1.45fr) minmax(330px,.8fr); gap:16px; align-items:start; }
.export-main-card { padding:22px 24px 24px; }
.export-section-title { margin:20px 0 10px; color:#102A43; font-size:12.5px; font-weight:700; }
.export-section-title:first-child { margin-top:0; }
.export-datasets { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:9px; }
.export-dataset { min-height:72px; padding:11px 12px; border:1px solid #E2EAF4; border-radius:9px; background:#FBFDFF; text-align:left; color:#50647D; }
.export-dataset b { display:block; color:#102A43; font-size:12px; }
.export-dataset span { display:block; margin-top:5px; color:#8A99AD; font-size:10.5px; line-height:1.55; }
.export-dataset.on { border-color:#0B57D0; background:#EDF4FF; box-shadow:0 0 0 2px rgba(11,87,208,.08); }
.export-fields { display:flex; flex-wrap:wrap; gap:8px; }
.export-check { display:inline-flex; align-items:center; gap:7px; padding:8px 11px; border:1px solid #E2EAF4; border-radius:8px; background:#fff; color:#50647D; font-size:11.5px; }
.export-check input { width:14px; height:14px; padding:0 !important; accent-color:#0B57D0; }
.export-range-row { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.export-range-row input { width:132px; height:34px; padding:0 9px; font-size:11px; }
.export-format-row { display:flex; gap:9px; }
.export-format { width:126px; padding:10px 12px; border:1px solid #E2EAF4; border-radius:8px; background:#fff; text-align:left; color:#50647D; }
.export-format b { display:block; color:#102A43; font-size:12px; }
.export-format span { color:#8A99AD; font-size:10.5px; }
.export-format.on { border-color:#0B57D0; background:#EDF4FF; }
.export-mask { display:flex; align-items:center; gap:8px; margin-top:18px; color:#667085; font-size:11.5px; }
.export-mask input { accent-color:#0B57D0; }
.export-note { margin-top:14px; padding:10px 12px; border-radius:8px; background:#F3F8FF; color:#667085; font-size:11px; line-height:1.7; }
.export-note b { color:#0B57D0; margin-right:5px; }
.export-run { width:100%; margin-top:16px; height:42px; }
.export-history-card { min-height:370px; }
.export-empty { display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:270px; color:#8A99AD; gap:7px; }
.export-empty b { color:#50647D; font-size:13px; }
.export-empty span { font-size:11px; }
.export-empty-icon { width:46px; height:46px; border-radius:14px; display:flex; align-items:center; justify-content:center; background:#EDF4FF; color:#0B57D0; font-size:22px; }
.system-hero { display:flex; align-items:center; gap:18px; margin-bottom:16px; background:linear-gradient(135deg,#F7FAFF,#EDF4FF); border-color:#DCE9FC; }
.system-hero-icon { width:54px; height:54px; border-radius:15px; display:flex; align-items:center; justify-content:center; color:#fff; font-size:25px; background:linear-gradient(145deg,#102E57,#0B57D0); }
.system-hero b { color:#102A43; font-size:15px; }
.system-hero p { margin:5px 0 0; color:#667085; font-size:11.5px; line-height:1.75; }
.endpoint-text { color:#0B57D0; font-size:11.5px; }
.system-boundary { margin-top:16px; }
.boundary-list { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; margin-top:14px; }
.boundary-list > div { display:flex; gap:10px; padding:12px; border-radius:9px; background:#F8FBFF; color:#667085; font-size:11.5px; line-height:1.8; }
.boundary-list i { font-style:normal; color:#0B57D0; font-weight:800; }
@media(max-width:980px){.analysis-kpis,.export-datasets{grid-template-columns:repeat(2,minmax(0,1fr))}.analysis-grid,.analysis-grid-wide,.export-layout{grid-template-columns:1fr}.boundary-list{grid-template-columns:1fr}}

/* 首页背景视频 */
.media-video-card { margin-top: 16px; padding: 20px; }
.media-video-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.media-video-note { margin-top: 5px; font-size: 12px; line-height: 1.65; color: #7A837F; max-width: 680px; }
.media-video-preview { display: block; width: 100%; max-height: 360px; border-radius: 12px; background: #111; object-fit: contain; }
.media-video-empty { min-height: 126px; display: flex; align-items: center; justify-content: center; border: 1px dashed #CBD5E1; border-radius: 12px; color: #7A837F; background: #F8FAFD; font-size: 13px; }
.media-video-actions { display: flex; align-items: center; gap: 10px; margin: 14px 0 10px; }
.media-video-card > input { width: 100%; }


/* 首页热门项目配置 */
.home-feature-field { grid-column: 1 / -1; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #FBF9F5; }
.home-feature-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.home-feature-head > div { flex: 1; }
.home-feature-selected-list { display: grid; gap: 8px; margin-bottom: 12px; }
.home-feature-selected { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 10px; border: 1px solid var(--line-soft); border-radius: 8px; background: #fff; }
.home-feature-num { width: 24px; height: 24px; line-height: 24px; border-radius: 50%; text-align: center; background: var(--sage-soft); color: var(--sage-deep); font-size: 12px; font-weight: 700; flex: 0 0 auto; }
.home-feature-name { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.home-feature-name b { font-size: 13px; color: var(--ink); }
.home-feature-name small { margin-top: 2px; font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-feature-actions { display: flex; gap: 5px; flex: 0 0 auto; }
.home-feature-actions .mini-btn { padding: 4px 8px; }
.home-feature-actions .mini-btn:disabled { opacity: .35; cursor: not-allowed; }
.home-feature-picker { border-top: 1px solid var(--line-soft); padding-top: 12px; }
.home-feature-picker > summary { cursor: pointer; color: var(--sage-deep); font-size: 12.5px; font-weight: 600; outline: none; }
.home-feature-groups { display: grid; gap: 14px; max-height: 520px; overflow: auto; padding: 12px 4px 2px; }
.home-feature-group-title { margin-bottom: 7px; color: var(--ink-2); font-size: 12px; font-weight: 700; }
.home-feature-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.home-feature-option { display: flex; align-items: flex-start; gap: 8px; min-height: 50px; padding: 8px 9px; border: 1px solid var(--line-soft); border-radius: 8px; background: #fff; cursor: pointer; transition: border-color .16s ease, background .16s ease; }
.home-feature-option:hover { border-color: rgba(116,134,129,.42); background: #F8FBF9; }
.home-feature-option.on { border-color: rgba(116,134,129,.46); background: var(--sage-soft); }
.home-feature-option.off { opacity: .62; }
.home-feature-option input { width: 15px; height: 15px; margin-top: 2px; flex: 0 0 auto; }
.home-feature-option span { display: flex; flex-direction: column; min-width: 0; }
.home-feature-option b { font-size: 12px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-feature-option small { margin-top: 3px; font-size: 10.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1100px) { .home-feature-options { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .home-feature-options { grid-template-columns: 1fr; } .home-feature-head { flex-direction: column; } }
