* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --brand: #0F6E56; --brand-600: #0F6E56; --brand-50: #E1F5EE;
  --ink: #1a1f1d; --ink-2: #5f6b66; --ink-3: #98a29d; --line: #e6e9e7;
  --bg: #f5f7f6; --card: #ffffff; --danger: #A32D2D; --danger-50: #FCEBEB;
  --warn: #854F0B; --warn-50: #FAEEDA; --radius: 12px;
}
body { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
button { font-family: inherit; cursor: pointer; border: none; background: none; font-size: 14px; }
input, textarea, select { font-family: inherit; font-size: 14px; color: var(--ink); }
a { color: inherit; text-decoration: none; }

.topbar { height: 56px; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; padding: 0 20px; gap: 24px; position: sticky; top: 0; z-index: 50; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 15px; }
.logo-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--brand);
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; font-weight: 600; }
.switcher { display: flex; background: var(--bg); border-radius: 9px; padding: 3px; gap: 2px; }
.switcher button { padding: 6px 16px; border-radius: 7px; color: var(--ink-2); font-size: 13px; transition: .15s; }
.switcher button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.07); font-weight: 500; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; color: var(--ink-2); font-size: 13px; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--brand-50); color: var(--brand);
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; }

.admin-layout { display: flex; min-height: calc(100vh - 56px); }
.sidebar { width: 196px; background: #fff; border-right: 1px solid var(--line); padding: 16px 12px; flex-shrink: 0; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px;
  color: var(--ink-2); margin-bottom: 2px; cursor: pointer; font-size: 13.5px; }
.nav-item:hover { background: var(--bg); }
.nav-item.on { background: var(--brand-50); color: var(--brand); font-weight: 500; }
.nav-dot { width: 6px; height: 6px; border-radius: 2px; background: currentColor; opacity: .55; }
.nav-item.on .nav-dot { opacity: 1; }
.main { flex: 1; padding: 24px 28px 60px; min-width: 0; }

.page-head { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 20px; }
.page-title { font-size: 20px; font-weight: 600; letter-spacing: -.2px; }
.page-sub { color: var(--ink-3); font-size: 13px; }
.spacer { flex: 1; }

.btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px;
  border-radius: 8px; font-size: 13.5px; transition: .15s; white-space: nowrap; }
.btn-primary { background: var(--brand); color: #fff; } .btn-primary:hover { background: #0b5945; }
.btn-ghost { background: #fff; color: var(--ink-2); border: 1px solid var(--line); } .btn-ghost:hover { border-color: #cfd6d3; color: var(--ink); }
.btn-sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 7px; }
.btn-link { color: var(--brand); padding: 0; height: auto; font-size: 13px; } .btn-link:hover { text-decoration: underline; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.card-head { padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.card-title { font-size: 14.5px; font-weight: 600; }
.card-body { padding: 18px; }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat-label { font-size: 12.5px; color: var(--ink-3); margin-bottom: 6px; }
.stat-value { font-size: 24px; font-weight: 600; letter-spacing: -.5px; line-height: 1.2; }
.stat-value small { font-size: 12px; font-weight: 400; color: var(--ink-3); margin-left: 4px; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12.5px; font-weight: 500; color: var(--ink-3);
  padding: 11px 14px; border-bottom: 1px solid var(--line); background: #fafbfa; white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 13.5px; vertical-align: middle; }
tr:last-child td { border-bottom: none; } tbody tr:hover { background: #fbfcfb; }
.mono { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 13px; }

.tag { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 6px; font-size: 12px; font-weight: 500; }
.tag-green { background: var(--brand-50); color: var(--brand); }
.tag-gray { background: #f1f2f2; color: var(--ink-2); }
.tag-warn { background: var(--warn-50); color: var(--warn); }
.tag-red { background: var(--danger-50); color: var(--danger); }
.tag-blue { background: #e8f1fb; color: #185FA5; }

.act-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1500px) { .act-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1200px) { .act-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px)  { .act-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px)  { .act-grid { grid-template-columns: 1fr; } }
.act-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: .18s; }
.act-card:hover { border-color: #cfd6d3; box-shadow: 0 4px 16px rgba(16,40,32,.06); }
.act-cover { height: 104px; position: relative; overflow: hidden; }
.act-cover-inner { position: absolute; inset: 0; }
.act-cover-txt { position: absolute; left: 16px; right: 16px; bottom: 12px; color: #fff; font-size: 15px; font-weight: 600; text-shadow: 0 1px 6px rgba(0,0,0,.28); z-index: 2; }
.act-cover-badge { position: absolute; top: 12px; right: 12px; z-index: 2; }
.act-body { padding: 14px 16px 16px; }
.act-meta { color: var(--ink-3); font-size: 12.5px; display: flex; flex-direction: column; gap: 3px; margin-bottom: 12px; }
.progress-wrap { margin-bottom: 12px; }
.progress-top { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); margin-bottom: 5px; }
.progress-top b { color: var(--ink); font-weight: 600; font-size: 13px; }
.bar { height: 4px; background: #eef1ef; border-radius: 3px; overflow: hidden; }
.bar-in { height: 100%; background: var(--brand); border-radius: 3px; }
.act-actions { display: flex; gap: 8px; align-items: center; padding-top: 12px; border-top: 1px solid var(--line); }

.field { margin-bottom: 16px; } .field:last-child { margin-bottom: 0; }
.label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 7px; font-weight: 500; }
.label .req { color: var(--danger); margin-left: 2px; }
.input, .textarea, .select { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; background: #fff; outline: none; transition: .15s; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15,110,86,.08); }
.textarea { resize: vertical; min-height: 88px; line-height: 1.6; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hint { font-size: 12px; color: var(--ink-3); margin-top: 6px; }

.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; }
.switch input { display: none; }
.track { width: 38px; height: 21px; border-radius: 11px; background: #d8dddb; position: relative; transition: .18s; }
.track::after { content: ""; position: absolute; width: 17px; height: 17px; border-radius: 50%; background: #fff; top: 2px; left: 2px; transition: .18s; box-shadow: 0 1px 2px rgba(0,0,0,.18); }
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::after { transform: translateX(17px); }

.mask { position: fixed; inset: 0; background: rgba(16,26,22,.42); display: flex; align-items: center; justify-content: center; z-index: 200; padding: 24px; }
.modal { background: #fff; border-radius: 14px; width: 100%; max-width: 580px; max-height: 88vh; overflow: auto; box-shadow: 0 20px 50px rgba(0,0,0,.18); }
.modal-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.modal-title { font-size: 16px; font-weight: 600; }
.modal-x { margin-left: auto; color: var(--ink-3); font-size: 20px; line-height: 1; padding: 4px; } .modal-x:hover { color: var(--ink); }
.modal-body { padding: 20px 22px; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }

.link-bar { display: flex; align-items: center; gap: 10px; background: #fafbfa; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; margin-bottom: 16px; }
.link-bar .mono { flex: 1; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tab { padding: 10px 0; font-size: 13.5px; color: var(--ink-2); position: relative; }
.tab.on { color: var(--brand); font-weight: 500; }
.tab.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--brand); border-radius: 2px; }
.empty { text-align: center; padding: 46px 20px; color: var(--ink-3); font-size: 13px; }

/* H5 手机预览 */
.h5-page { max-width: 480px; margin: 0 auto; min-height: 100vh; background: #f2f4f3; padding-bottom: 24px; }
.h5-stage { min-height: calc(100vh - 56px); display: flex; align-items: flex-start; justify-content: center; padding: 30px 20px 60px; gap: 34px; }
.phone { width: 390px; height: 800px; background: #fff; border-radius: 40px; border: 9px solid #1c2320; overflow: hidden; position: relative; flex-shrink: 0; box-shadow: 0 18px 50px rgba(16,30,24,.16); }
.phone-notch { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 116px; height: 22px; background: #1c2320; border-radius: 0 0 14px 14px; z-index: 30; }
.phone-status { height: 34px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; font-size: 12px; font-weight: 600; color: #1c2320; position: relative; z-index: 20; }
.h5-scroll { height: calc(100% - 34px); overflow-y: auto; background: #f2f4f3; -webkit-overflow-scrolling: touch; }
.h5-scroll::-webkit-scrollbar { width: 0; }
.wechat-bar { background: #fff; height: 40px; display: flex; align-items: center; padding: 0 14px; gap: 8px; font-size: 12.5px; color: var(--ink-3); border-bottom: 1px solid #eef0ef; position: sticky; top: 0; z-index: 10; }
.wc-dots { margin-left: auto; letter-spacing: 2px; font-weight: 700; color: #bbb; }
.h5-cover { height: 178px; position: relative; }
.h5-cover-inner { position: absolute; inset: 0; }
.h5-cover-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.06), rgba(0,0,0,.42)); }
.h5-cover-txt { position: absolute; left: 18px; right: 18px; bottom: 16px; color: #fff; z-index: 2; }
.h5-cover-txt h1 { font-size: 19px; font-weight: 600; line-height: 1.35; text-shadow: 0 1px 8px rgba(0,0,0,.3); }
.h5-panel { background: #fff; border-radius: 14px; margin: -18px 12px 12px; padding: 16px; position: relative; z-index: 3; box-shadow: 0 2px 12px rgba(20,35,28,.06); }
.h5-info-row { display: flex; gap: 9px; font-size: 13px; color: var(--ink-2); padding: 5px 0; align-items: flex-start; }
.h5-info-ico { width: 15px; color: var(--ink-3); flex-shrink: 0; text-align: center; }
.h5-cap { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.h5-cap-top { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-3); margin-bottom: 6px; }
.h5-cap-top b { color: var(--brand); font-size: 13px; }
.h5-section-t { font-size: 14px; font-weight: 600; margin-bottom: 4px; display: flex; align-items: center; gap: 7px; }
.h5-section-t::before { content: ""; width: 3px; height: 13px; border-radius: 2px; background: var(--brand); }
.h5-desc { font-size: 13.5px; color: var(--ink-2); line-height: 1.75; }
.h5-desc p { margin-bottom: 8px; }
.h5-field { margin-bottom: 14px; }
.h5-label { font-size: 13px; color: var(--ink-2); margin-bottom: 6px; display: block; }
.h5-label .req { color: var(--danger); }
.h5-input { width: 100%; min-width: 0; border: 1px solid var(--line); background: #fafbfa; border-radius: 9px; padding: 11px 13px; font-size: 14px; outline: none; transition: .15s; }
.h5-row { display: flex; gap: 8px; align-items: stretch; }
.h5-row .h5-input { flex: 1 1 auto; }
.h5-row .h5-btn { flex-shrink: 0; }
.h5-input:focus { border-color: var(--brand); background: #fff; }
.h5-btn { width: 100%; height: 46px; border-radius: 10px; background: var(--brand); color: #fff; font-size: 15px; font-weight: 500; transition: .15s; display: flex; align-items: center; justify-content: center; gap: 7px; }
.h5-btn:hover { background: #0b5945; } .h5-btn:disabled { background: #d3d8d6; color: #fff; cursor: not-allowed; }
.h5-btn-ghost { background: #fff; color: var(--brand); border: 1px solid var(--brand); }
.h5-note { border-radius: 9px; padding: 11px 13px; font-size: 13px; display: flex; gap: 9px; line-height: 1.55; margin-top: 10px; }
.h5-note-ok { background: var(--brand-50); color: #0a5744; }
.h5-note-err { background: var(--danger-50); color: var(--danger); }
.h5-note-warn { background: var(--warn-50); color: var(--warn); }
.note-ico { font-weight: 700; flex-shrink: 0; }
.h5-success { padding: 40px 20px 30px; text-align: center; }
.ok-circle { width: 64px; height: 64px; border-radius: 50%; background: var(--brand-50); margin: 0 auto 16px; display: flex; align-items: center; justify-content: center; }
.ok-check { width: 30px; height: 30px; border-radius: 50%; background: var(--brand); position: relative; }
.ok-check::after { content: ""; position: absolute; left: 9px; top: 7px; width: 9px; height: 15px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(42deg); }
.ok-title { font-size: 19px; font-weight: 600; margin-bottom: 6px; } .ok-sub { color: var(--ink-2); font-size: 13.5px; }
.ticket { background: #fff; border-radius: 14px; margin: 22px 12px; padding: 20px; box-shadow: 0 2px 14px rgba(20,35,28,.07); position: relative; overflow: hidden; }
.ticket::before, .ticket::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: #f2f4f3; top: 50%; margin-top: -9px; }
.ticket::before { left: -9px; } .ticket::after { right: -9px; }
.ticket-qr { width: 158px; height: 158px; margin: 0 auto 14px; border-radius: 8px; overflow: hidden; background:#fff; }
.ticket-no { font-size: 12.5px; color: var(--ink-3); } .ticket-no b { font-family: ui-monospace, Consolas, monospace; font-size: 16px; color: var(--ink); letter-spacing: 1px; }
.ticket-hint { font-size: 12px; color: var(--ink-3); text-align: center; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.h5-footer { text-align: center; font-size: 11.5px; color: #a9b2ad; padding: 4px 0 26px; }

.spec-side { width: 300px; flex-shrink: 0; padding-top: 6px; }
.spec-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.spec-h { font-size: 13.5px; font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; gap: 7px; }
.spec-h span { width: 18px; height: 18px; border-radius: 5px; background: var(--brand-50); color: var(--brand); font-size: 11px; display: flex; align-items: center; justify-content: center; font-weight: 600; }
.spec-li { font-size: 12.5px; color: var(--ink-2); line-height: 1.7; padding-left: 15px; position: relative; margin-bottom: 5px; }
.spec-li::before { content: ""; position: absolute; left: 4px; top: 9px; width: 4px; height: 4px; border-radius: 50%; background: #c4ccc8; }
.try-list { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.try-btn { text-align: left; background: #fafbfa; border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; font-size: 12.5px; color: var(--ink-2); transition: .15s; }
.try-btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-50); }
.try-btn b { color: var(--ink); font-weight: 600; } .try-btn:hover b { color: var(--brand); }

.toast { position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%) translateY(14px); background: #1c2320; color: #fff; padding: 11px 20px; border-radius: 9px; font-size: 13.5px; opacity: 0; pointer-events: none; transition: .22s; z-index: 999; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 登录 */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg,#e8f3ee,#f5f7f6); padding: 24px; }
.login-card { background: #fff; border-radius: 16px; padding: 34px 30px; width: 100%; max-width: 360px; box-shadow: 0 16px 44px rgba(16,40,32,.1); border: 1px solid var(--line); }
.login-logo { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; margin-bottom: 6px; }
.login-sub { color: var(--ink-3); font-size: 12.5px; margin-bottom: 22px; }
.login-err { color: var(--danger); font-size: 12.5px; margin-bottom: 10px; min-height: 16px; }

@media (max-width: 1100px) {
  .h5-stage { flex-direction: column; align-items: center; }
  .spec-side { width: 390px; max-width: 100%; }
  .stat-row { grid-template-columns: 1fr 1fr; }
}
