:root {
  --bg: #f3faf4;
  --panel: #ffffff;
  --panel-muted: #fbfaf8;
  --line: #dcebe0;
  --text: #294334;
  --muted: #789080;
  --accent: #4d9565;
  --accent-soft: #eaf6ed;
  --green: #4d9565;
  --green-soft: #edf8f1;
  --amber: #b9853c;
  --amber-soft: #fbf5e9;
  --shadow: 0 12px 30px rgba(48, 91, 61, 0.06);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 14px; }
button, input, select, textarea { font: inherit; }
.is-hidden { display: none !important; }
.login-screen { display: grid; min-height: 100vh; place-items: center; padding: 24px; background: var(--bg); }
.login-panel { width: min(430px, 100%); padding: 34px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: 0 20px 60px rgba(48, 91, 61, .1); }
.login-brand { padding: 0; }
.login-copy { margin: 48px 0 28px; }
.login-copy .eyebrow { margin: 0 0 10px; color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: 1.4px; }
.login-copy h1 { margin: 0; font-size: 26px; }
.login-copy p:last-child { margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.login-form { display: grid; gap: 16px; }
.login-wechat-note { margin: 0; padding: 12px 14px; border: 1px solid #d9ebdd; border-radius: 7px; background: #f1faf3; color: var(--muted); font-size: 13px; line-height: 1.7; }
.login-form .field { display: grid; gap: 7px; }
.login-form .field label { margin: 0; }
.login-form .field input { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 7px; outline: 0; background: #fff; color: var(--text); }
.login-form .field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(77, 149, 101, .12); }
.login-submit { width: 100%; min-height: 42px; margin-top: 2px; }
.login-wechat-button { border-color: #b9d8bf; color: var(--accent-strong); background: #f5fbf6; }
.login-divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; }
.login-divider::before, .login-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.login-bootstrap { justify-self: center; border: 0; padding: 0; background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; }
.login-bootstrap:hover { color: var(--accent-strong); }
.login-error { min-height: 18px; margin: -2px 0 -6px; color: #c65341; font-size: 12px; }
button { cursor: pointer; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; width: 244px; padding: 30px 18px 20px; border-right: 1px solid var(--line); background: #f8fcf8; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 12px 26px; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent); color: #fff; font-size: 20px; font-weight: 800; }
.brand strong, .brand span, .account strong, .account span { display: block; }
.brand strong { font-size: 16px; }
.brand span { margin-top: 4px; color: var(--muted); font-size: 12px; }
.mode-note { margin: 0 8px 24px; padding: 10px 12px; border: 1px solid #d9ebdd; border-radius: 8px; background: #eef8f0; color: #4d9565; font-size: 12px; }
.status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #62a878; }
.main-nav { display: grid; gap: 5px; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 0; border-radius: 8px; background: transparent; color: #777269; text-align: left; }
.nav-item:hover { background: #edf7ef; color: var(--text); }
.nav-item.is-active { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.nav-icon { width: 20px; color: currentColor; font-size: 19px; text-align: center; }
.sidebar-footer { margin-top: auto; }
.side-action { display: block; width: 100%; margin-top: 7px; padding: 9px 12px; border: 0; background: transparent; color: #7d776e; font-size: 12px; text-align: left; }
.side-action:hover { color: var(--accent); }
.account { display: flex; align-items: center; gap: 10px; margin-top: 22px; padding: 14px 10px 0; border-top: 1px solid var(--line); }
.account-avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #f5c394; color: #fff; font-size: 13px; }
.account strong { font-size: 13px; }
.account span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.logout-button { margin-left: auto; padding: 4px 0; border: 0; background: transparent; color: var(--muted); font-size: 11px; }
.logout-button:hover { color: var(--accent); }
.main-content { width: calc(100% - 244px); margin-left: 244px; padding: 0 44px 50px; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; min-height: 134px; padding: 32px 0 27px; border-bottom: 1px solid var(--line); }
.breadcrumb { color: #aaa39a; font-size: 12px; }
.breadcrumb span { padding: 0 8px; color: #c3bdb5; }
.breadcrumb b { color: #726c64; font-weight: 500; }
h1 { margin: 14px 0 0; font-size: 30px; letter-spacing: 0; }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.last-saved { color: var(--muted); font-size: 12px; }
.icon-button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: #777269; font-size: 21px; }
.content-section { padding-top: 30px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 18px; }
.section-head h2 { margin: 0; font-size: 18px; }
.section-head p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.section-actions { display: flex; gap: 10px; align-items: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 15px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: #676159; font-size: 13px; }
.btn:hover { border-color: #d8cfc3; background: #fffdfb; }
.btn-primary { border-color: var(--accent); background: var(--accent); color: #fff; }
.btn-primary:hover { border-color: #db573d; background: #db573d; }
.btn-danger { color: #cf5946; }
.btn-small { min-height: 30px; padding: 0 9px; font-size: 12px; }
.filter-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.search-input { width: 280px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; outline: 0; background: var(--panel); color: var(--text); }
.search-input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: #e8a593; box-shadow: 0 0 0 3px rgba(239, 103, 77, .1); }
.select-control { padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; outline: 0; background: var(--panel); color: #676159; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi-card { padding: 22px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); box-shadow: var(--shadow); }
.kpi-card__label { color: var(--muted); font-size: 13px; }
.kpi-card__value { margin-top: 14px; font-size: 30px; font-weight: 750; }
.kpi-card__foot { display: flex; justify-content: space-between; margin-top: 14px; color: var(--muted); font-size: 12px; }
.kpi-card__trend { color: var(--green); }
.two-column { display: grid; grid-template-columns: 1.12fr .88fr; gap: 18px; }
.panel { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); box-shadow: var(--shadow); }
.panel__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.panel__head h3 { margin: 0; font-size: 15px; }
.panel__head a { color: var(--accent); font-size: 12px; cursor: pointer; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 12px 18px; background: #fcfbf9; color: #9a9389; font-size: 12px; font-weight: 500; text-align: left; white-space: nowrap; }
td { padding: 15px 18px; border-top: 1px solid #f0ece7; color: #5b564f; font-size: 13px; vertical-align: middle; }
tr:hover td { background: #fffdfb; }
.activity-cell { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.activity-thumb { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; background: #f1eee8; }
.tag-thumb { width: 52px; height: 38px; border-radius: 5px; object-fit: cover; background: #f1eee8; vertical-align: middle; }
.activity-cell strong { display: block; color: var(--text); font-weight: 650; }
.activity-cell span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.tag { display: inline-block; margin: 2px 4px 2px 0; padding: 4px 7px; border-radius: 4px; background: color-mix(in srgb, var(--tag-color, #62a878) 14%, white); color: var(--tag-color, #4d9565); font-size: 11px; }
.tag-list { min-width: 160px; }
.tag-selector { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 7px; background: #fbfefb; }
.tag-option { display: inline-flex !important; align-items: center; gap: 5px; margin: 0 !important; font-weight: 400 !important; cursor: pointer; }
.tag-option input { width: auto !important; }
.color-swatch { display: inline-block; width: 14px; height: 14px; margin-right: 6px; border-radius: 50%; vertical-align: -2px; }
.status { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 4px; font-size: 11px; }
.status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-open, .status-paid { background: var(--green-soft); color: var(--green); }
.status-closed, .status-refunded { background: #f2f0ed; color: #918b82; }
.status-pending { background: var(--amber-soft); color: var(--amber); }
.status-shipped { background: #edf4ff; color: #4a79be; }
.action-group { display: flex; gap: 6px; }
.text-button { padding: 3px 0; border: 0; background: transparent; color: var(--accent); font-size: 12px; }
.text-button.muted-action { color: #8c877f; }
.empty-table { padding: 48px; color: var(--muted); text-align: center; }
.progress { width: 110px; height: 6px; overflow: hidden; border-radius: 999px; background: #f0ece7; }
.progress span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.schedule-list { padding: 4px 20px 15px; }
.schedule-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid #f0ece7; }
.schedule-item:last-child { border-bottom: 0; }
.schedule-date { width: 50px; padding: 8px 0; border-radius: 6px; background: #fff4ea; color: var(--accent); text-align: center; }
.schedule-date strong, .schedule-date span { display: block; }
.schedule-date strong { font-size: 18px; }
.schedule-date span { margin-top: 4px; font-size: 11px; }
.schedule-info { flex: 1; min-width: 0; }
.schedule-info strong { display: block; overflow: hidden; color: var(--text); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.schedule-info span { display: block; margin-top: 7px; color: var(--muted); font-size: 12px; }
.schedule-info .progress { margin-top: 9px; }
.modal-backdrop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 24px; background: rgba(39, 35, 29, .38); }
.modal { width: min(760px, 100%); max-height: calc(100vh - 48px); overflow: auto; border-radius: 12px; background: var(--panel); box-shadow: 0 25px 70px rgba(30, 24, 17, .22); }
.modal.modal-wide { width: min(920px, 100%); }
.modal__head { display: flex; justify-content: space-between; align-items: center; padding: 21px 24px; border-bottom: 1px solid var(--line); }
.modal__head h2 { margin: 0; font-size: 18px; }
.modal-close { width: 30px; height: 30px; border: 0; background: transparent; color: #999188; font-size: 23px; }
.modal__body { padding: 24px; }
.modal__foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--line); background: #fcfbf9; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .field-full { grid-column: 1 / -1; }
.field label { display: block; margin-bottom: 7px; color: #625d55; font-size: 12px; font-weight: 600; }
.field label em { color: var(--accent); font-style: normal; }
.field input, .field select, .field textarea { width: 100%; padding: 10px 11px; border: 1px solid var(--line); border-radius: 7px; outline: 0; background: #fff; color: var(--text); }
.field textarea { min-height: 78px; resize: vertical; line-height: 1.6; }
.field-hint { margin-top: 6px; color: #aaa39a; font-size: 11px; }
.rich-editor-shell { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.rich-editor-shell:focus-within { border-color: #76a487; box-shadow: 0 0 0 3px rgba(63, 128, 96, .1); }
.rich-editor-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; min-height: 42px; padding: 6px 8px; border-bottom: 1px solid var(--line); background: #f8f7f4; }
.rich-editor-toolbar button { min-width: 31px; height: 29px; padding: 0 8px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: #575149; font-size: 12px; line-height: 27px; }
.rich-editor-toolbar button:hover { border-color: #d9d3ca; background: #fff; color: var(--accent); }
.rich-editor-toolbar .toolbar-image { border-color: #c9ded0; background: #edf6ef; color: #3f8060; font-weight: 600; }
.toolbar-divider { width: 1px; height: 20px; margin: 0 3px; background: #ddd7ce; }
.toolbar-spacer { flex: 1; }
.rich-editor-content { min-height: 320px; max-height: 560px; overflow-y: auto; padding: 20px 22px; outline: 0; color: #3e3832; font-size: 14px; line-height: 1.75; }
.rich-editor-content:empty::before { content: attr(data-placeholder); color: #aaa39a; pointer-events: none; }
.rich-editor-content h1, .rich-editor-content h2, .rich-editor-content h3, .rich-editor-content h4 { margin: 22px 0 10px; color: #28241f; line-height: 1.35; }
.rich-editor-content h1 { font-size: 25px; }
.rich-editor-content h2 { font-size: 21px; }
.rich-editor-content h3 { font-size: 18px; }
.rich-editor-content p { margin: 0 0 14px; }
.rich-editor-content ul, .rich-editor-content ol { margin: 0 0 14px; padding-left: 24px; }
.rich-editor-content blockquote { margin: 14px 0; padding: 10px 14px; border-left: 3px solid #6fa181; background: #f2f7f2; color: #58705f; }
.rich-editor-content img { max-width: 100%; height: auto; border-radius: 6px; }
.rich-editor-content a { color: #3f8060; }
.rich-editor-content table { width: 100%; border-collapse: collapse; }
.rich-editor-content th, .rich-editor-content td { padding: 8px; border: 1px solid #ddd7ce; }
.rich-editor-footer { display: flex; justify-content: space-between; gap: 12px; padding: 7px 10px; border-top: 1px solid var(--line); background: #fcfbf9; color: #9c958d; font-size: 11px; }
.input-action-row { display: flex; gap: 8px; align-items: center; }
.input-action-row input { flex: 1; min-width: 0; }
.asset-picker { display: flex; align-items: center; gap: 14px; }
.asset-preview { width: 112px; height: 76px; border-radius: 7px; object-fit: cover; background: #f1eee8; }
.asset-picker input[type="file"] { max-width: 250px; }
.color-palette { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 9px; }
.palette-color { width: 26px; height: 26px; padding: 0; border: 2px solid transparent; border-radius: 50%; cursor: pointer; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.palette-color.is-selected { border-color: #2d4c37; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #2d4c37; }
.location-results { display: grid; gap: 6px; margin-top: 8px; }
.location-result { display: flex; flex-direction: column; gap: 3px; width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--text); text-align: left; cursor: pointer; }
.location-result:hover { border-color: var(--accent); background: #f5fbf6; }
.location-result span { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.location-picked { color: #4d9565; }
.location-map { width: 100%; height: 180px; margin-top: 8px; border: 1px solid var(--line); border-radius: 7px; background: #f1f5f2; }
.subsection { margin: 24px 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 700; }
.repeat-list { display: grid; gap: 8px; }
.repeat-row { display: grid; grid-template-columns: 1.1fr .75fr .75fr .9fr 34px; gap: 8px; align-items: center; }
.repeat-row input { width: 100%; padding: 9px; border: 1px solid var(--line); border-radius: 6px; outline: 0; }
.repeat-head { display: grid; grid-template-columns: 1.1fr .75fr .75fr .9fr 34px; gap: 8px; color: #aaa39a; font-size: 11px; }
.icon-remove { width: 30px; height: 30px; border: 0; border-radius: 5px; background: #fff0ed; color: var(--accent); }
.add-row { margin-top: 10px; border: 0; background: transparent; color: var(--accent); font-size: 12px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 30px; }
.detail-item { display: flex; justify-content: space-between; gap: 20px; padding: 13px 0; border-bottom: 1px solid #f0ece7; }
.detail-item dt { color: var(--muted); }
.detail-item dd { margin: 0; color: var(--text); text-align: right; }
.toast { position: fixed; left: 50%; bottom: 30px; z-index: 30; padding: 10px 16px; border-radius: 7px; background: #282721; color: #fff; opacity: 0; pointer-events: none; transform: translate(-50%, 10px); transition: .2s ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 1040px) { .sidebar { width: 210px; } .main-content { width: calc(100% - 210px); margin-left: 210px; padding: 0 24px 40px; } .two-column { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .app-shell { display: block; } .sidebar { position: static; width: 100%; padding: 16px; border-right: 0; border-bottom: 1px solid var(--line); } .brand { padding-bottom: 14px; } .mode-note, .sidebar-footer { display: none; } .main-nav { display: flex; overflow-x: auto; gap: 5px; } .nav-item { width: auto; flex-shrink: 0; } .main-content { width: 100%; margin-left: 0; padding: 0 16px 30px; } .topbar { min-height: 110px; } .topbar-actions { align-items: flex-end; } .last-saved { display: none; } h1 { font-size: 26px; } .kpi-grid { grid-template-columns: 1fr 1fr; } .filter-bar { flex-wrap: wrap; } .search-input { width: 100%; } .form-grid, .detail-grid { grid-template-columns: 1fr; } .form-grid .field-full { grid-column: auto; } .repeat-row, .repeat-head { grid-template-columns: 1fr .7fr .7fr .8fr 30px; font-size: 11px; } .rich-editor-content { min-height: 260px; padding: 16px; } .toolbar-spacer { display: none; } th, td { padding: 12px 10px; } }
