:root {
  --ink: #172d2f;
  --muted: #71807d;
  --line: #dfe7e3;
  --paper: #f5f7f3;
  --white: #fff;
  --cloud: #eef2ee;
  --river: #24575a;
  --river-dark: #183f42;
  --river-soft: #d9e7e2;
  --jade: #76a18c;
  --gold: #c69a52;
  --danger: #b64f43;
  --shadow: 0 14px 40px rgba(22, 58, 55, .07);
  --radius: 18px;
  --sidebar: 244px;
  --display: "FZKai-Z03", "STKaiti", "KaiTi", serif;
  --body: "HarmonyOS Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
  --data: "DIN Alternate", "Bahnschrift", "Arial Narrow", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); color: var(--ink); font-family: var(--body); }
body { margin: 0; min-height: 100vh; background: var(--paper); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
::selection { background: var(--river-soft); color: var(--river-dark); }
:focus-visible { outline: 3px solid rgba(36, 87, 90, .25); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; display: flex; width: var(--sidebar); flex-direction: column; padding: 28px 18px 22px; color: rgba(255,255,255,.72); background: var(--river-dark); overflow: hidden; transition: width .24s ease, padding .24s ease; }
.sidebar::after { content: ""; position: absolute; right: -80px; bottom: 80px; width: 210px; height: 210px; border: 1px solid rgba(255,255,255,.07); border-radius: 47% 53% 62% 38%; transform: rotate(24deg); box-shadow: 0 0 0 28px rgba(255,255,255,.025), 0 0 0 58px rgba(255,255,255,.018); pointer-events: none; }
.brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 13px; padding: 0 10px 34px; color: #fff; }
.brand-mark { display: inline-grid; flex: 0 0 auto; width: 39px; height: 39px; place-items: center; color: var(--river-dark); background: #dceae2; border-radius: 12px 12px 12px 3px; font-family: var(--display); font-size: 24px; font-weight: 700; transform: rotate(-2deg); }
.brand strong { display: block; font-family: var(--display); font-size: 22px; letter-spacing: .16em; }
.brand small { display: block; margin-top: 2px; color: rgba(255,255,255,.5); font-size: 10px; letter-spacing: .18em; }
.side-nav { position: relative; z-index: 1; display: grid; gap: 8px; }
.side-nav a, .side-nav .nav-parent { display: flex; align-items: center; gap: 13px; min-height: 48px; padding: 0 14px; border-radius: 12px; font-size: 14px; transition: .2s ease; }
.side-nav .nav-parent { width: 100%; color: inherit; background: transparent; border: 0; cursor: pointer; text-align: left; }
.side-nav a:hover, .side-nav .nav-parent:hover { color: #fff; background: rgba(255,255,255,.06); }
.side-nav a.active, .side-nav .nav-parent.active { color: #fff; background: rgba(205, 229, 217, .15); box-shadow: inset 3px 0 #b7d2c1; }
.nav-icon { display: grid; width: 27px; height: 27px; place-items: center; border: 1px solid rgba(255,255,255,.16); border-radius: 8px; font-family: var(--display); font-size: 13px; }
.side-nav a.active .nav-icon, .side-nav .nav-parent.active .nav-icon { color: var(--river-dark); background: #cde0d5; border-color: #cde0d5; }
.nav-group { position: relative; display: grid; gap: 8px; }
.settings-nav-label { white-space: nowrap; }
.settings-nav-caret { margin-left: auto; font-family: var(--data); font-size: 15px; line-height: 1; transition: transform .2s ease; }
.side-subnav { display: grid; visibility: visible; max-height: 240px; gap: 2px; margin: -3px 0 8px 40px; padding-left: 10px; border-left: 1px solid rgba(255,255,255,.12); opacity: 1; overflow: hidden; transition: max-height .22s ease, margin .22s ease, opacity .16s ease, visibility .22s; }
.side-subnav a { min-height: 30px; padding: 0 8px; border-radius: 7px; color: rgba(255,255,255,.47); font-size: 10px; }
.side-subnav a:hover { color: #fff; background: rgba(255,255,255,.04); }
.side-subnav a.active { color: #d9e9e0; background: rgba(205,229,217,.1); box-shadow: none; }
html.settings-menu-collapsed:not(.sidebar-collapsed) .side-subnav { visibility: hidden; max-height: 0; margin-top: -8px; margin-bottom: 0; opacity: 0; pointer-events: none; }
html.settings-menu-collapsed:not(.sidebar-collapsed) .settings-nav-caret { transform: rotate(-90deg); }
.sidebar-toggle { position: fixed; z-index: 35; top: 47px; left: calc(var(--sidebar) - 15px); display: grid; width: 30px; height: 30px; place-items: center; padding: 0; color: var(--river); background: #fff; border: 1px solid #d2ded9; border-radius: 50%; box-shadow: 0 5px 16px rgba(18,54,52,.17); cursor: pointer; transition: left .24s ease, color .18s ease, background .18s ease, transform .18s ease; }
.sidebar-toggle:hover { color: #fff; background: var(--river); border-color: var(--river); transform: scale(1.06); }
.sidebar-toggle-icon { display: grid; place-items: center; font-family: var(--data); font-size: 20px; line-height: 1; transition: transform .24s ease; }
.sidebar-foot { position: relative; z-index: 1; margin-top: auto; }
.operator { display: grid; grid-template-columns: 37px 1fr auto; align-items: center; gap: 10px; padding: 10px; border: 1px solid rgba(255,255,255,.08); border-radius: 13px; transition: .2s ease; }
.operator:hover, .operator.active { background: rgba(255,255,255,.06); }
.avatar { display: inline-grid; flex: 0 0 auto; width: 37px; height: 37px; place-items: center; color: var(--river-dark); background: #d9e7e0; border-radius: 50%; font-family: var(--display); font-size: 16px; font-weight: 700; }
.operator small, .operator strong { display: block; }
.operator small { color: rgba(255,255,255,.42); font-size: 10px; }
.operator strong { color: #fff; font-size: 13px; margin-top: 2px; }

.content-shell { min-height: 100vh; margin-left: var(--sidebar); transition: margin-left .24s ease; }
.page-content { width: min(1480px, 100%); margin: 0 auto; padding: 38px 42px 60px; }
.mobile-header, .bottom-nav { display: none; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 0 0 26px; }
.page-header.compact { align-items: flex-start; }
.page-header h1 { margin: 3px 0 5px; font-family: var(--display); font-size: clamp(30px, 3vw, 40px); line-height: 1.2; letter-spacing: .035em; }
.dashboard-heading h1 { letter-spacing: .02em; }
.eyebrow { margin: 0 0 5px; color: var(--jade); font-family: var(--data); font-size: 10px; font-weight: 800; letter-spacing: .24em; }
.eyebrow.light { color: rgba(255,255,255,.55); }
.muted { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.back-link { display: inline-flex; margin-bottom: 12px; color: var(--muted); font-size: 12px; transition: color .2s; }
.back-link:hover { color: var(--river); }
.title-with-status { display: flex; align-items: center; gap: 12px; }
.title-with-status h1 { margin-bottom: 1px; }
.status-pill { padding: 4px 9px; color: var(--muted); background: var(--cloud); border-radius: 20px; font-size: 11px; }
.status-pill.on { color: #326e59; background: #dceee4; }
.header-actions { display: flex; gap: 10px; }

.button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 5px; padding: 0 18px; border: 1px solid transparent; border-radius: 10px; cursor: pointer; font-size: 13px; font-weight: 700; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: .45; transform: none; }
.button.primary { color: #fff; background: var(--river); box-shadow: 0 7px 18px rgba(36,87,90,.18); }
.button.primary:hover { background: var(--river-dark); box-shadow: 0 9px 23px rgba(36,87,90,.24); }
.button.secondary { color: var(--river); background: #fff; border-color: #cbd9d4; }
.button.secondary:hover { border-color: var(--river); }
.button.ghost { color: var(--muted); background: transparent; border-color: var(--line); }
.button.wide { width: 100%; }
.text-button { align-self: center; padding: 8px 5px; color: var(--river); background: transparent; border: 0; cursor: pointer; font-size: 12px; font-weight: 700; }
.danger-text { color: var(--danger); }

.panel { background: var(--white); border: 1px solid rgba(32,75,71,.07); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 23px 24px 16px; }
.panel-head h2, .form-panel h2 { margin: 0; font-family: var(--display); font-size: 21px; letter-spacing: .04em; }
.panel-head a { color: var(--river); font-size: 12px; font-weight: 700; }
.panel-head a span { display: inline-block; transition: transform .2s ease; }
.panel-head a:hover span { transform: translateX(3px); }
.soft-label { padding: 5px 9px; color: var(--muted); background: var(--cloud); border-radius: 20px; font-size: 10px; }

.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-bottom: 18px; }
.metric-card { position: relative; min-width: 0; padding: 20px 21px 18px; background: #fff; border: 1px solid rgba(32,75,71,.07); border-radius: 16px; box-shadow: 0 8px 28px rgba(22,58,55,.045); overflow: hidden; }
.metric-card.featured { color: #fff; background: var(--river); border-color: transparent; }
.metric-card.featured::after { content: ""; position: absolute; right: -28px; bottom: -60px; width: 150px; height: 150px; border: 1px solid rgba(255,255,255,.13); border-radius: 42% 58% 38% 62%; transform: rotate(-20deg); box-shadow: 0 0 0 21px rgba(255,255,255,.04); }
.metric-label { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; }
.featured .metric-label { color: rgba(255,255,255,.65); }
.pulse { width: 7px; height: 7px; background: #bfe0c7; border-radius: 50%; box-shadow: 0 0 0 5px rgba(191,224,199,.1); }
.mini-seal, .trend { padding: 3px 6px; color: var(--river); background: var(--river-soft); border-radius: 6px; font-family: var(--display); font-size: 9px; font-style: normal; }
.metric-card > strong { position: relative; z-index: 1; display: block; margin: 15px 0 10px; font-family: var(--data); font-size: clamp(27px, 2.5vw, 35px); font-weight: 650; letter-spacing: -.025em; white-space: nowrap; }
.metric-card > strong small { font-family: var(--body); font-size: 12px; font-weight: 500; letter-spacing: 0; }
.metric-card p { position: relative; z-index: 1; margin: 0; color: var(--muted); font-size: 10px; }
.metric-card.featured p { color: rgba(255,255,255,.58); }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(290px, .75fr); gap: 18px; }
.dashboard-aside { display: grid; align-content: start; gap: 18px; }
.transaction-list { padding: 0 24px 13px; }
.transaction-row { display: grid; grid-template-columns: 38px minmax(120px, 1fr) auto; align-items: center; gap: 12px; min-height: 65px; border-top: 1px solid var(--line); transition: background .18s ease; }
a.transaction-row:hover { margin-inline: -10px; padding-inline: 10px; background: #f8faf8; border-radius: 9px; }
.transaction-icon { display: grid; width: 34px; height: 34px; place-items: center; color: var(--river); background: var(--river-soft); border-radius: 10px; font-family: var(--display); font-size: 13px; }
.transaction-icon.consume { color: #976c2b; background: #f3e8d2; }
.transaction-icon.points_adjust { color: #6d5c92; background: #eae5f3; }
.transaction-icon.opening { color: #5f6b67; background: #e9eeeb; }
.transaction-person { min-width: 0; }
.transaction-person strong, .transaction-person small, .transaction-value small { display: block; }
.transaction-person strong { font-size: 13px; }
.transaction-person small, .transaction-value small { margin-top: 4px; color: var(--muted); font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.transaction-value { min-width: 95px; text-align: right; font-family: var(--data); font-size: 13px; font-weight: 700; }
.positive { color: #43806b !important; }
.negative { color: #a46542 !important; }
.transaction-value small { max-width: 150px; font-family: var(--body); font-weight: 400; }
.level-stack { display: grid; gap: 18px; padding: 4px 24px 25px; }
.level-line { display: grid; grid-template-columns: 82px 1fr 24px; align-items: center; gap: 10px; }
.level-line > div:first-child { display: flex; align-items: center; gap: 6px; }
.level-line strong { font-size: 12px; }
.level-line small { color: var(--muted); font-size: 9px; }
.level-line b { font-family: var(--data); font-size: 11px; text-align: right; }
.level-dot { width: 7px; height: 7px; background: var(--level-color); border-radius: 50%; }
.level-bar { height: 5px; background: var(--cloud); border-radius: 5px; overflow: hidden; }
.level-bar i { display: block; min-width: 2px; height: 100%; background: var(--level-color); border-radius: inherit; }
.birthday-list { padding: 0 24px 14px; }
.birthday-list a { display: grid; grid-template-columns: 35px 1fr auto; align-items: center; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); }
.avatar.tint { color: var(--river); background: var(--river-soft); }
.birthday-list .avatar { width: 33px; height: 33px; font-size: 13px; }
.birthday-list strong, .birthday-list small { display: block; }
.birthday-list strong { font-size: 12px; }
.birthday-list small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.birthday-list b { color: var(--gold); font-size: 10px; }
.quiet-empty { margin: 0; padding: 6px 24px 25px; color: var(--muted); font-size: 12px; }

.filter-panel { margin-bottom: 16px; padding: 16px; }
.filter-form { display: flex; align-items: center; gap: 10px; }
.search-field { position: relative; flex: 1; min-width: 230px; }
.search-field > span { position: absolute; z-index: 1; left: 13px; top: 50%; color: var(--muted); transform: translateY(-50%); }
.search-field input { width: 100%; padding-left: 37px; }
input, select, textarea { width: 100%; color: var(--ink); background: #fbfcfa; border: 1px solid #d6dfda; border-radius: 9px; outline: 0; transition: border-color .18s, box-shadow .18s, background .18s; }
input, select { height: 42px; padding: 0 12px; }
textarea { padding: 11px 12px; resize: vertical; line-height: 1.6; }
input::placeholder, textarea::placeholder { color: #a5afac; }
input:focus, select:focus, textarea:focus { background: #fff; border-color: var(--jade); box-shadow: 0 0 0 3px rgba(118,161,140,.12); }
.filter-form select { width: 125px; }
.table-panel { overflow: hidden; }
.table-meta { display: flex; justify-content: space-between; padding: 18px 22px 12px; color: var(--muted); font-size: 10px; }
.table-meta strong { color: var(--ink); }
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.data-table th { padding: 11px 16px; color: var(--muted); background: #f5f8f5; font-size: 10px; font-weight: 600; text-align: left; white-space: nowrap; }
.data-table td { padding: 13px 16px; border-top: 1px solid var(--line); white-space: nowrap; }
.data-table tbody tr { transition: background .15s; }
.data-table tbody tr:hover { background: #fafcfb; }
.member-cell { display: flex; align-items: center; gap: 10px; }
.member-cell .avatar { width: 34px; height: 34px; font-size: 13px; }
.member-cell strong, .member-cell small { display: block; }
.member-cell small { margin-top: 3px; color: var(--muted); font-family: var(--data); font-size: 9px; letter-spacing: .04em; }
.member-cell em { margin-left: 5px; padding: 2px 4px; color: var(--muted); background: var(--cloud); border-radius: 4px; font-size: 8px; font-style: normal; }
.level-badge { display: inline-flex; padding: 5px 8px; color: var(--river); background: var(--river-soft); border-radius: 6px; font-size: 10px; }
.level-云露 { color: #326c5b; background: #d9ece2; }
.level-云川 { color: #315e69; background: #dbe9ed; }
.level-云海 { color: #fff; background: var(--river-dark); }
.inactive-row { opacity: .58; }
.row-arrow { display: grid; width: 29px; height: 29px; place-items: center; color: var(--river); border-radius: 50%; transition: .2s; }
.row-arrow:hover { background: var(--river-soft); transform: translateX(2px); }
.empty-state { display: grid; justify-items: center; padding: 52px 24px; text-align: center; }
.empty-state > span { display: grid; width: 46px; height: 46px; place-items: center; color: var(--river); background: var(--river-soft); border-radius: 14px; font-family: var(--display); }
.empty-state h3 { margin: 15px 0 6px; font-family: var(--display); font-size: 18px; }
.empty-state p { margin: 0 0 17px; color: var(--muted); font-size: 11px; }

.form-layout { display: grid; gap: 16px; max-width: 900px; }
.form-panel { padding: 25px; }
.section-title { display: flex; align-items: center; gap: 12px; margin-bottom: 23px; }
.section-title > span { display: grid; width: 37px; height: 37px; place-items: center; color: var(--river); background: var(--river-soft); border-radius: 11px; font-family: var(--display); font-size: 12px; }
.section-title p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 19px 20px; }
.form-panel label, .operation-form label, .settings-form > label { display: grid; gap: 7px; color: #4c5e5a; font-size: 11px; font-weight: 650; }
.span-2 { grid-column: 1 / -1; }
.level-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.level-choice { position: relative; }
.level-choice input { position: absolute; opacity: 0; pointer-events: none; }
.level-choice > span { display: block; padding: 12px; background: #fbfcfa; border: 1px solid #d9e1dd; border-radius: 10px; cursor: pointer; transition: .18s; }
.level-choice b, .level-choice small { display: block; }
.level-choice b { color: var(--ink); font-family: var(--display); font-size: 14px; }
.level-choice small { margin-top: 4px; color: var(--muted); font-size: 8px; font-weight: 400; white-space: nowrap; }
.level-choice input:checked + span { color: var(--river); background: #eef6f1; border-color: var(--jade); box-shadow: inset 0 0 0 1px var(--jade); }
.input-affix { display: flex; height: 42px; align-items: center; background: #fbfcfa; border: 1px solid #d6dfda; border-radius: 9px; overflow: hidden; }
.input-affix:focus-within { background: #fff; border-color: var(--jade); box-shadow: 0 0 0 3px rgba(118,161,140,.12); }
.input-affix span { padding-left: 12px; color: var(--muted); }
.input-affix input { height: 100%; border: 0; box-shadow: none; }
.input-affix input:focus { box-shadow: none; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 3px 0 10px; }

.account-hero { position: relative; display: grid; grid-template-columns: 1.2fr repeat(3, 1fr); align-items: stretch; margin-bottom: 18px; color: #fff; background: linear-gradient(112deg, #1e4d50, #2d6261); border-radius: var(--radius); box-shadow: 0 14px 35px rgba(28,68,68,.16); overflow: hidden; }
.account-hero::after { content: ""; position: absolute; right: 8%; bottom: -110px; width: 210px; height: 210px; border: 1px solid rgba(255,255,255,.08); border-radius: 46% 54% 37% 63%; box-shadow: 0 0 0 28px rgba(255,255,255,.03), 0 0 0 58px rgba(255,255,255,.02); }
.account-identity, .account-number { position: relative; z-index: 1; min-width: 0; padding: 25px 24px; }
.account-identity { display: flex; align-items: center; gap: 15px; }
.member-seal { display: grid; width: 54px; height: 54px; place-items: center; color: var(--river-dark); background: #d8e8df; border: 1px solid rgba(255,255,255,.3); border-radius: 18px 18px 18px 5px; font-family: var(--display); font-size: 19px; box-shadow: inset 0 0 0 4px rgba(255,255,255,.24); }
.member-seal.level-云海 { color: var(--river-dark); background: #e0c48c; }
.account-identity span, .account-identity strong, .account-identity small, .account-number span, .account-number strong, .account-number em { display: block; }
.account-identity div > span, .account-number > span { color: rgba(255,255,255,.55); font-size: 10px; }
.account-identity strong { margin: 4px 0; font-family: var(--display); font-size: 21px; }
.account-identity small, .account-number em { color: rgba(255,255,255,.5); font-size: 9px; font-style: normal; }
.account-number { border-left: 1px solid rgba(255,255,255,.1); }
.account-number strong { margin: 11px 0 6px; font-family: var(--data); font-size: clamp(22px, 2.4vw, 31px); font-weight: 650; white-space: nowrap; }
.account-number strong small { font-family: var(--body); font-size: 10px; font-weight: 400; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .7fr); gap: 18px; align-items: start; }
.detail-aside { display: grid; gap: 16px; }
.detailed .transaction-row { grid-template-columns: 38px minmax(110px,.7fr) minmax(90px,.7fr) auto; }
.transaction-note { color: var(--muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-list { margin: 0; padding: 0 24px 15px; }
.profile-list > div { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 11px; }
.profile-list dt { color: var(--muted); }
.profile-list dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.profile-list a { color: var(--river); font-weight: 700; }
.member-notes { margin: 0 24px 23px; padding: 14px; background: #f5f8f5; border-radius: 10px; }
.member-notes span { color: var(--muted); font-size: 9px; }
.member-notes p { margin: 7px 0 0; font-size: 11px; line-height: 1.65; }
.danger-panel { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 18px 21px; }
.danger-panel strong { font-size: 12px; }
.danger-panel p { margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }

.account-dialog { width: min(460px, calc(100vw - 30px)); max-height: calc(100dvh - 30px); padding: 0; background: #fff; border: 0; border-radius: 20px; box-shadow: 0 25px 80px rgba(10,38,38,.28); overflow: auto; }
.account-dialog::backdrop { background: rgba(15,35,35,.52); backdrop-filter: blur(3px); }
.dialog-close-form { position: absolute; top: 16px; right: 16px; }
.dialog-close-form button { display: grid; width: 32px; height: 32px; place-items: center; color: var(--muted); background: var(--cloud); border: 0; border-radius: 50%; cursor: pointer; font-size: 20px; }
.dialog-heading { padding: 25px 27px 17px; }
.dialog-heading h2 { margin: 0 0 5px; font-family: var(--display); font-size: 25px; }
.dialog-heading p:last-child { margin: 0; color: var(--muted); font-size: 11px; }
.operation-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); margin: 0 27px; padding: 4px; background: var(--cloud); border-radius: 10px; }
.operation-tabs button { height: 35px; background: transparent; border: 0; border-radius: 7px; cursor: pointer; font-size: 11px; font-weight: 700; }
.operation-tabs button.active { color: var(--river); background: #fff; box-shadow: 0 2px 9px rgba(26,57,56,.09); }
.operation-form { display: grid; gap: 16px; padding: 21px 27px 27px; }
.input-affix.large { height: 55px; }
.input-affix.large span { color: var(--ink); font-family: var(--data); font-size: 20px; }
.input-affix.large input { font-family: var(--data); font-size: 23px; }
.quick-amounts { display: grid; grid-template-columns: repeat(4,1fr); gap: 7px; margin-top: -7px; }
.quick-amounts button { height: 31px; color: var(--river); background: #f2f7f4; border: 1px solid #dbe7e0; border-radius: 7px; cursor: pointer; font-family: var(--data); font-size: 10px; }
.payment-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin: 0; padding: 0; border: 0; }
.payment-methods legend { margin-bottom: 7px; color: var(--muted); font-size: 10px; }
.payment-methods label { position: relative; cursor: pointer; }
.payment-methods input { position: absolute; opacity: 0; pointer-events: none; }
.payment-methods label > span { display: grid; min-height: 65px; align-content: center; gap: 4px; padding: 9px; background: #fbfcfa; border: 1px solid #dbe3df; border-radius: 9px; }
.payment-methods b { font-size: 9px; }
.payment-methods small { color: var(--muted); font-size: 7px; line-height: 1.4; }
.payment-methods input:checked + span { color: var(--river); background: var(--river-soft); border-color: var(--jade); box-shadow: inset 0 0 0 1px var(--jade); }
.payment-methods label.disabled { cursor: not-allowed; opacity: .5; }
.payment-methods label.disabled > span { background: #f2f3f1; }
.consume-preview { display: grid; gap: 10px; padding: 13px; color: var(--muted); background: #f5f8f5; border: 1px solid #e4ebe7; border-radius: 10px; font-size: 10px; }
.consume-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.consume-preview-head strong { color: var(--river); font-size: 10px; }
.consume-split-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.consume-split-grid > span { display: grid; gap: 4px; padding: 8px; background: #fff; border-radius: 7px; font-size: 8px; }
.consume-split-grid b { color: var(--ink); font-family: var(--data); font-size: 11px; }
.consume-split-grid [data-preview-award] b { color: #8c6728; }
.consume-preview > small { line-height: 1.55; }

.summary-strip { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 16px; background: var(--white); border: 1px solid rgba(32,75,71,.07); border-radius: 14px; box-shadow: var(--shadow); }
.summary-strip > div { padding: 16px 21px; border-left: 1px solid var(--line); }
.summary-strip > div:first-child { border-left: 0; }
.summary-strip span, .summary-strip strong { display: block; }
.summary-strip span { margin-bottom: 7px; color: var(--muted); font-size: 9px; }
.summary-strip strong { font-family: var(--data); font-size: 18px; }
.settlement-summary { grid-template-columns: repeat(6, 1fr); }
.transaction-filter { align-items: flex-end; }
.transaction-filter label { display: grid; gap: 5px; }
.field-caption { color: var(--muted); font-size: 9px; }
.transaction-filter input, .transaction-filter select { min-width: 145px; }
.align-end { align-self: end; }
.transaction-table { min-width: 1120px; }
.transaction-table td { font-size: 11px; }
.payment-split { display: block; color: var(--ink); white-space: nowrap; }
.payment-split small, .payment-split em { display: block; margin-top: 3px; font-size: 8px; font-style: normal; }
.payment-split small { color: var(--muted); }
.payment-split em { color: #946b28; }

.payment-checkout { display: grid; grid-template-columns: minmax(360px, 1.2fr) minmax(280px, .8fr); gap: 18px; max-width: 940px; margin: 0 auto; }
.payment-code-card { display: grid; justify-items: center; align-content: start; min-height: 600px; padding: 34px; text-align: center; }
.payment-provider-mark { display: grid; width: 52px; height: 52px; place-items: center; margin-bottom: 12px; color: #fff; border-radius: 16px; font-size: 22px; font-weight: 800; }
.payment-provider-mark.wechat { background: #07c160; }
.payment-provider-mark.alipay { background: #1677ff; }
.payment-code-card > h2 { margin: 3px 0 20px; font-family: var(--data); font-size: 38px; }
.payment-qr-wrap { padding: 15px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 9px 30px rgba(27,61,59,.08); }
.payment-qr-wrap img { display: block; width: min(260px, 62vw); height: auto; }
.payment-qr-wrap p { margin: 13px 0 3px; font-size: 12px; font-weight: 700; }
.payment-qr-wrap small { color: var(--muted); font-size: 9px; }
.payment-waiting { display: flex; align-items: center; gap: 9px; margin-top: 20px; color: var(--muted); font-size: 10px; }
.payment-waiting span { width: 8px; height: 8px; background: var(--jade); border-radius: 50%; box-shadow: 0 0 0 0 rgba(65,132,116,.45); animation: payment-pulse 1.5s infinite; }
@keyframes payment-pulse { 70% { box-shadow: 0 0 0 8px rgba(65,132,116,0); } 100% { box-shadow: 0 0 0 0 rgba(65,132,116,0); } }
.payment-result { display: grid; justify-items: center; gap: 8px; max-width: 360px; margin: 70px 0 30px; }
.payment-result > span { display: grid; width: 70px; height: 70px; place-items: center; color: #fff; background: var(--jade); border-radius: 50%; font-size: 34px; }
.payment-result.closed > span, .payment-result.failed > span, .payment-result.review > span { background: #ad7841; }
.payment-result strong { font-size: 20px; }
.payment-result p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.payment-code-card > .button { max-width: 310px; margin-top: 12px; }
.payment-order-aside { display: grid; align-content: start; gap: 12px; }
.payment-breakdown { padding-bottom: 22px; }
.payment-breakdown dl { margin: 0; padding: 0 24px; }
.payment-breakdown dl > div { display: flex; justify-content: space-between; gap: 20px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 11px; }
.payment-breakdown dt { color: var(--muted); }
.payment-breakdown dd { margin: 0; font-family: var(--data); }
.payment-breakdown .payment-due { margin-top: 4px; color: var(--ink); font-weight: 800; }
.payment-breakdown .payment-due dt { color: var(--ink); }
.payment-award, .payment-note { margin: 14px 24px 0; padding: 12px; border-radius: 9px; font-size: 10px; line-height: 1.6; }
.payment-award { color: #765523; background: #fff8e8; }
.payment-note { color: var(--muted); background: var(--cloud); }
.payment-settings-panel { padding: 25px; }
.payment-provider-list { display: grid; gap: 10px; margin: 20px 0; }
.payment-provider-row { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 14px; padding: 16px; background: #fbfcfa; border: 1px solid var(--line); border-radius: 12px; }
.payment-provider-row .payment-provider-mark { margin: 0; }
.payment-provider-row > div { display: grid; gap: 4px; }
.payment-provider-row > div strong { font-size: 12px; }
.payment-provider-row > div small, .payment-provider-row > p { color: var(--muted); font-size: 9px; }
.payment-provider-row > em { padding: 5px 8px; color: #8b6230; background: #fff5e5; border-radius: 999px; font-size: 9px; font-style: normal; font-weight: 700; }
.payment-provider-row.ready > em { color: #287255; background: #eaf7ef; }
.payment-provider-row > p { grid-column: 2 / -1; margin: -2px 0 0; line-height: 1.6; }
.payment-settings-panel code { overflow-wrap: anywhere; }
.payment-vault-location { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 11px 13px; color: var(--muted); background: var(--cloud); border-radius: 9px; font-size: 9px; }
.payment-vault-location span { color: var(--ink); font-weight: 700; }
.payment-vault-location code { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.payment-vault-location em { color: #39725f; font-style: normal; }
.payment-config-form { display: grid; gap: 16px; }
.payment-common-card, .credential-card, .payment-confirm-card { padding: 24px; }
.credential-card-title { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 12px; margin-bottom: 18px; }
.credential-card-title > span { display: grid; width: 40px; height: 40px; place-items: center; color: var(--river); background: var(--river-soft); border-radius: 12px 12px 12px 4px; font-family: var(--display); font-size: 11px; font-weight: 800; }
.credential-card-title > span.wechat, .credential-card-title > span.alipay { color: #fff; font-size: 17px; }
.credential-card-title > span.wechat { background: #07a954; }
.credential-card-title > span.alipay { background: #1677e8; }
.credential-card-title h2 { margin: 0; font-family: var(--display); font-size: 18px; }
.credential-card-title p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }
.credential-card-title > em { padding: 5px 8px; color: #8b6230; background: #fff5e5; border-radius: 999px; font-size: 8px; font-style: normal; font-weight: 800; }
.credential-card-title > em.ready { color: #287255; background: #e7f5ec; }
.payment-common-card > label, .credential-fields label, .key-upload-grid label, .payment-confirm-card label { display: grid; gap: 7px; color: #4c5e5a; font-size: 10px; font-weight: 700; }
.callback-route-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 11px; }
.callback-route-list span { padding: 7px 9px; color: var(--muted); background: var(--cloud); border-radius: 7px; font-size: 8px; }
.callback-route-list code { color: var(--river); }
.provider-config-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.credential-progress { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 19px; }
.credential-progress::before { content: ""; position: absolute; z-index: 0; top: 8px; right: 15%; left: 15%; height: 1px; background: var(--line); }
.credential-progress span { position: relative; z-index: 1; display: grid; justify-items: center; gap: 6px; color: var(--muted); font-size: 8px; }
.credential-progress span::before { content: ""; width: 8px; height: 8px; background: #d9dfdc; border: 4px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px var(--line); }
.credential-progress span.done { color: #36725e; font-weight: 700; }
.credential-progress span.done::before { background: #54a17f; box-shadow: 0 0 0 1px #75ac93; }
.credential-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.credential-fields .secret-input small { color: var(--muted); font-size: 8px; font-weight: 400; }
.single-provider-fields { margin-bottom: 13px; }
.key-upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.key-upload-grid label { min-width: 0; padding: 11px; background: #f8faf8; border: 1px dashed #cedbd4; border-radius: 9px; }
.key-upload-grid input[type="file"] { width: 100%; height: auto; padding: 7px; font-size: 8px; }
.key-upload-grid input[type="file"]::file-selector-button { margin-right: 7px; padding: 6px 8px; color: var(--river); background: var(--river-soft); border: 0; border-radius: 5px; cursor: pointer; font-size: 8px; font-weight: 700; }
.key-upload-grid small { color: #9a7041; font-size: 8px; font-weight: 400; overflow-wrap: anywhere; }
.key-upload-grid small.ready { color: #35745e; }
.payment-confirm-card { display: grid; grid-template-columns: minmax(220px,1fr) minmax(190px,.7fr) auto; align-items: end; gap: 16px; color: #fff; background: linear-gradient(112deg, var(--river-dark), #2b6261); }
.payment-confirm-card strong { font-family: var(--display); font-size: 17px; }
.payment-confirm-card p { margin: 5px 0 0; color: rgba(255,255,255,.57); font-size: 9px; line-height: 1.6; }
.payment-confirm-card label { color: rgba(255,255,255,.75); }
.payment-confirm-card input { background: rgba(255,255,255,.96); }
.payment-confirm-card .button { white-space: nowrap; }
.payment-config-locked { display: grid; grid-template-columns: 48px 1fr; align-items: center; gap: 15px; padding: 25px; }
.payment-config-locked > span { display: grid; width: 46px; height: 46px; place-items: center; color: #845f31; background: #f7ecd9; border-radius: 14px; font-family: var(--display); }
.payment-config-locked h2 { margin: 0; font-family: var(--display); font-size: 18px; }
.payment-config-locked p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.plain-member strong, .plain-member small, .account-after small, .note-cell small { display: block; }
.plain-member small, .account-after small, .note-cell small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.type-label { display: inline-flex; padding: 4px 7px; color: var(--river); background: var(--river-soft); border-radius: 5px; font-size: 9px; }
.type-label.consume { color: #966b2d; background: #f4ead7; }
.type-label.points_adjust { color: #69588b; background: #ebe6f3; }
.type-label.opening { color: #5e6c68; background: #e9eeeb; }

.settings-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, .8fr); gap: 18px; max-width: 920px; }
.settings-form { display: grid; gap: 17px; }
.settings-form .button { justify-self: start; }
.system-card { padding: 25px; }
.system-card .profile-list { padding: 0; }
.path-text { font-family: monospace; font-size: 9px; }
.backup-tip { margin: 12px 0 18px; padding: 15px; color: #5d674f; background: #f5f1e5; border-radius: 10px; }
.backup-tip strong { font-size: 11px; }
.backup-tip p { margin: 6px 0 0; font-size: 9px; line-height: 1.6; }
.backup-tip code { font-size: inherit; }

.settings-heading { align-items: center; }
.role-stamp { display: grid; min-width: 112px; justify-items: center; gap: 3px; padding: 11px 16px; color: var(--river); background: var(--river-soft); border: 1px solid rgba(36,87,90,.08); border-radius: 14px 14px 14px 4px; font-family: var(--display); font-size: 15px; font-weight: 700; }
.role-stamp small { color: var(--muted); font-family: var(--body); font-size: 8px; font-weight: 500; }
.role-stamp.role-admin { color: #795d2d; background: #f1e6cc; }
.role-stamp.role-cashier { color: #526460; background: #e7ece9; }
.settings-center { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
.settings-nav { position: sticky; top: 24px; display: none; gap: 5px; padding: 8px; background: #fff; border: 1px solid rgba(32,75,71,.07); border-radius: 15px; box-shadow: var(--shadow); }
.settings-nav a { display: grid; grid-template-columns: 31px 1fr; align-items: center; gap: 10px; min-height: 54px; padding: 7px 9px; border-radius: 10px; transition: .18s ease; }
.settings-nav a:hover { background: #f6f9f6; }
.settings-nav a.active { color: var(--river); background: var(--river-soft); }
.settings-nav a > span { display: grid; width: 29px; height: 29px; place-items: center; border: 1px solid var(--line); border-radius: 8px; font-family: var(--display); font-size: 11px; }
.settings-nav a.active > span { color: #fff; background: var(--river); border-color: var(--river); }
.settings-nav strong, .settings-nav small { display: block; }
.settings-nav strong { font-size: 11px; }
.settings-nav small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.settings-content { display: grid; gap: 16px; min-width: 0; }
.identity-card { position: relative; display: grid; grid-template-columns: 59px 1fr auto; align-items: center; gap: 16px; min-height: 128px; padding: 23px 27px; color: #fff; background: linear-gradient(108deg, var(--river-dark), #2b6261); border-radius: var(--radius); box-shadow: 0 15px 38px rgba(28,68,68,.15); overflow: hidden; }
.identity-card::after { content: ""; position: absolute; right: -55px; bottom: -130px; width: 230px; height: 230px; border: 1px solid rgba(255,255,255,.08); border-radius: 43% 57% 38% 62%; box-shadow: 0 0 0 28px rgba(255,255,255,.025); }
.identity-avatar { position: relative; z-index: 1; display: grid; width: 57px; height: 57px; place-items: center; color: var(--river-dark); background: #dceae2; border-radius: 18px 18px 18px 5px; font-family: var(--display); font-size: 23px; font-weight: 700; }
.identity-card > div { position: relative; z-index: 1; }
.identity-card > div > span { color: rgba(255,255,255,.58); font-size: 9px; }
.identity-card h2 { margin: 3px 0; font-family: var(--display); font-size: 23px; }
.identity-card p { margin: 0; color: rgba(255,255,255,.52); font-size: 9px; }
.role-ribbon { position: relative; z-index: 1; padding: 6px 10px; color: #d8e9e0; border: 1px solid rgba(255,255,255,.15); border-radius: 20px; font-size: 9px; font-style: normal; }
.settings-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: stretch; }
.permission-card { padding: 25px; }
.permission-list { display: grid; gap: 11px; margin: 0 0 23px; padding: 0; list-style: none; }
.permission-list li { display: flex; align-items: center; gap: 9px; color: #485a56; font-size: 11px; }
.permission-list li span { display: grid; width: 20px; height: 20px; place-items: center; color: #3e7864; background: #e2efe7; border-radius: 50%; font-size: 9px; font-weight: 800; }
.setting-section-form { padding: 27px; }
.inline-actions { display: flex; justify-content: flex-end; margin-top: 23px; padding-top: 18px; border-top: 1px solid var(--line); }
.rule-panel { padding: 25px; }
.level-rule-list { display: grid; }
.level-rule-row { display: grid; grid-template-columns: 43px minmax(80px,1fr) minmax(105px,.65fr) minmax(125px,.75fr) minmax(170px,1fr); align-items: center; gap: 11px; padding: 14px 0; border-top: 1px solid var(--line); }
.member-seal.small { width: 40px; height: 40px; border-radius: 12px 12px 12px 4px; font-size: 14px; box-shadow: inset 0 0 0 3px rgba(255,255,255,.3); }
.level-rule-name input { height: 37px; font-family: var(--display); font-size: 13px; }
.level-rule-row > label { position: relative; }
.level-rule-row > label > small { position: absolute; right: 11px; bottom: 12px; color: var(--muted); }
.level-rule-row > label > input { padding-right: 27px; }
.rule-blocks { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.rule-block { display: grid; gap: 15px; padding: 17px; background: #f7f9f7; border: 1px solid #e5ebe7; border-radius: 12px; }
.rule-block-head, .compact-rule { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.rule-block strong, .rule-block small { display: block; }
.rule-block strong { font-size: 11px; }
.rule-block small { margin-top: 4px; color: var(--muted); font-size: 8px; line-height: 1.5; }
.rule-number { display: flex !important; grid-auto-flow: column; align-items: center; justify-content: start; gap: 8px !important; color: var(--muted) !important; }
.rule-number input { width: 68px; text-align: center; }
.compact-rule .input-affix { width: 135px; flex: 0 0 auto; }
.switch { position: relative; display: inline-block !important; flex: 0 0 auto; width: 42px; height: 24px; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch span { position: absolute; inset: 0; background: #c8d1cd; border-radius: 30px; cursor: pointer; transition: .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; background: #fff; border-radius: 50%; box-shadow: 0 2px 5px rgba(30,50,48,.2); transition: .2s; }
.switch input:checked + span { background: var(--river); }
.switch input:checked + span::after { transform: translateX(18px); }
.strategy-panel { padding: 27px; }
.strategy-steps { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 4px; }
.strategy-steps::after { content: "→"; position: absolute; z-index: 2; top: 50%; left: 50%; display: grid; width: 27px; height: 27px; place-items: center; color: var(--river); background: #fff; border: 1px solid var(--line); border-radius: 50%; font-family: var(--data); font-size: 13px; box-shadow: 0 5px 14px rgba(24,55,53,.1); transform: translate(-50%, -50%); }
.strategy-step { display: grid; align-content: start; gap: 18px; min-height: 205px; padding: 20px; background: #f8faf8; border: 1px solid var(--line); border-top: 3px solid var(--river); border-radius: 13px; }
.strategy-step.first-step { border-top-color: var(--gold); }
.strategy-step-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; }
.strategy-step-head strong, .strategy-step-head small { display: block; }
.strategy-step-head strong { font-size: 12px; }
.strategy-step-head small { margin-top: 4px; color: var(--muted); font-size: 8px; line-height: 1.55; }
.strategy-sequence { display: grid; min-width: 47px; height: 30px; place-items: center; padding-inline: 8px; color: var(--river); background: var(--river-soft); border-radius: 8px 8px 8px 3px; font-family: var(--data); font-size: 9px; font-weight: 800; }
.first-step .strategy-sequence { color: #886424; background: #f2e7cf; }
.strategy-value { display: flex !important; align-items: center; gap: 9px !important; color: #55645f !important; font-size: 10px !important; }
.strategy-value .input-affix { width: 130px; }
.strategy-value .percent-input { width: 72px; text-align: center; }
.strategy-formula { display: flex; align-items: center; justify-content: center; gap: 11px; padding: 12px; color: var(--muted); background: #fff; border: 1px dashed #dfc898; border-radius: 9px; font-size: 9px; }
.strategy-formula b { color: #896528; font-family: var(--data); font-size: 16px; }
.strategy-option { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding-top: 14px; border-top: 1px solid var(--line); }
.strategy-option strong, .strategy-option small { display: block; }
.strategy-option strong { font-size: 10px; }
.strategy-option small { margin-top: 4px; color: var(--muted); font-size: 8px; line-height: 1.5; }
.gift-level-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.gift-level-grid > span { display: grid; gap: 3px; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.gift-level-grid b { font-size: 10px; }
.gift-level-grid small { color: var(--muted); font-size: 8px; }
.strategy-example { display: grid; grid-template-columns: 42px 1fr; align-items: start; gap: 12px; margin-top: 18px; padding: 15px 17px; color: #596763; background: var(--river-soft); border-radius: 11px; }
.strategy-example > span { display: grid; height: 24px; place-items: center; color: #fff; background: var(--river); border-radius: 6px; font-size: 9px; font-weight: 700; }
.strategy-example p { margin: 2px 0 0; font-size: 10px; line-height: 1.8; }
.strategy-example b { color: var(--river-dark); font-family: var(--data); }
.staff-panel { overflow: hidden; }
.staff-list { padding: 0 22px 20px; }
.staff-row { border-top: 1px solid var(--line); }
.staff-row.inactive { opacity: .62; }
.staff-row summary { display: grid; grid-template-columns: 37px minmax(120px,1fr) 88px 58px 20px; align-items: center; gap: 12px; min-height: 67px; padding: 9px 3px; cursor: pointer; list-style: none; }
.staff-row summary::-webkit-details-marker { display: none; }
.staff-main strong, .staff-main small { display: block; }
.staff-main strong { font-size: 12px; }
.staff-main small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.staff-main em { margin-left: 6px; padding: 2px 5px; color: var(--river); background: var(--river-soft); border-radius: 4px; font-size: 7px; font-style: normal; }
.role-badge, .account-status { justify-self: start; padding: 5px 8px; border-radius: 6px; font-size: 8px; white-space: nowrap; }
.role-badge { color: #775e32; background: #f2e8d2; }
.role-badge.role-manager { color: var(--river); background: var(--river-soft); }
.role-badge.role-cashier { color: #5e6d69; background: #e9eeeb; }
.account-status { color: var(--muted); background: var(--cloud); }
.account-status.on { color: #39745e; background: #deede4; }
.disclosure { color: var(--muted); transition: transform .18s; }
.staff-row[open] .disclosure { transform: rotate(180deg); }
.staff-edit-grid { display: grid; gap: 10px; margin: 0 0 13px 49px; padding: 15px; background: #f7f9f7; border-radius: 11px; }
.staff-edit-form { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 10px; }
.staff-password-form { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 10px; }
.staff-edit-grid label { display: grid; gap: 5px; color: var(--muted); font-size: 9px; }
.role-hint { margin-top: 17px; padding: 12px 14px; color: var(--muted); background: #f5f8f5; border-radius: 9px; font-size: 9px; line-height: 1.7; }
.role-hint span { color: var(--river); font-weight: 700; }
.data-overview { display: grid; grid-template-columns: repeat(3,1fr); color: #fff; background: var(--river); border-radius: 15px; overflow: hidden; }
.data-overview > div { padding: 18px 22px; border-left: 1px solid rgba(255,255,255,.1); }
.data-overview > div:first-child { border-left: 0; }
.data-overview span { display: block; margin-bottom: 6px; color: rgba(255,255,255,.55); font-size: 9px; }
.data-overview strong { font-family: var(--data); font-size: 25px; }
.data-overview small { margin-left: 5px; color: rgba(255,255,255,.55); font-size: 9px; }
.data-actions-panel { padding: 25px; }
.download-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.download-action-form { margin: 0; }
.download-card { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 12px; padding: 16px; background: #f7f9f7; border: 1px solid var(--line); border-radius: 11px; transition: .18s; }
button.download-card { width: 100%; color: inherit; text-align: left; font: inherit; cursor: pointer; }
.download-card:hover { border-color: var(--jade); transform: translateY(-1px); }
.download-card > span { display: grid; width: 38px; height: 38px; place-items: center; color: var(--river); background: var(--river-soft); border-radius: 10px; font-family: var(--data); font-size: 9px; font-weight: 800; }
.download-card strong, .download-card small { display: block; }
.download-card strong { font-size: 11px; }
.download-card small { margin-top: 4px; color: var(--muted); font-size: 8px; line-height: 1.5; }
.download-card b { color: var(--river); font-size: 9px; white-space: nowrap; }
.database-path { margin: 0; color: var(--muted); font-family: monospace; font-size: 8px; overflow-wrap: anywhere; }
.audit-panel { overflow: hidden; }
.audit-list { padding: 0 24px 18px; }
.audit-list > div { display: grid; grid-template-columns: 8px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.audit-dot { width: 7px; height: 7px; margin-top: 4px; background: var(--jade); border-radius: 50%; box-shadow: 0 0 0 4px var(--river-soft); }
.audit-list p { margin: 0; font-size: 10px; }
.audit-list small { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; }
.error-page { display: grid; min-height: 60vh; place-content: center; justify-items: center; text-align: center; }
.error-page > span { color: var(--river-soft); font-family: var(--data); font-size: 80px; font-weight: 800; line-height: 1; }
.error-page h1 { margin: -12px 0 8px; font-family: var(--display); font-size: 28px; }
.error-page p { margin: 0 0 18px; color: var(--muted); font-size: 11px; }

.toast-stack { position: fixed; z-index: 100; top: 22px; right: 25px; display: grid; gap: 8px; width: min(370px, calc(100vw - 30px)); }
.toast { display: grid; grid-template-columns: 26px 1fr 22px; align-items: center; gap: 9px; padding: 12px 13px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 11px; box-shadow: 0 15px 45px rgba(20,49,48,.17); font-size: 11px; animation: toast-in .3s ease both; }
.toast > span { display: grid; width: 23px; height: 23px; place-items: center; color: #39745f; background: #dceee4; border-radius: 50%; font-weight: 800; }
.toast.error > span { color: var(--danger); background: #f5dfdc; }
.toast button { padding: 0; color: var(--muted); background: none; border: 0; cursor: pointer; font-size: 18px; }
.toast-leave { opacity: 0; transform: translateY(-10px); transition: .3s ease; pointer-events: none; }
.inline-alert { padding: 11px 13px; color: var(--danger); background: #f8e7e4; border-radius: 8px; font-size: 11px; }

.login-page { display: grid; min-height: 100dvh; place-items: center; padding: 34px; background: #e8efeb; }
.login-shell { display: grid; grid-template-columns: 1.05fr .95fr; width: min(920px, 100%); min-height: 570px; background: #fff; border-radius: 25px; box-shadow: 0 28px 90px rgba(18,56,53,.16); overflow: hidden; }
.login-story { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 38px 42px; color: #fff; background: var(--river-dark); overflow: hidden; }
.story-brand { position: relative; z-index: 2; display: flex; align-items: center; gap: 12px; font-family: var(--display); font-size: 19px; letter-spacing: .12em; }
.story-copy { position: relative; z-index: 2; margin-bottom: 64px; }
.story-copy h1 { margin: 10px 0 20px; font-family: var(--display); font-size: clamp(37px, 4vw, 51px); font-weight: 500; line-height: 1.32; letter-spacing: .04em; }
.story-copy > p:last-child { max-width: 320px; margin: 0; color: rgba(255,255,255,.56); font-size: 12px; line-height: 1.9; }
.flow-lines { position: absolute; inset: auto -80px -140px auto; width: 390px; height: 390px; border: 1px solid rgba(255,255,255,.09); border-radius: 50% 42% 57% 43%; transform: rotate(18deg); }
.flow-lines i { position: absolute; inset: 45px; border: 1px solid rgba(255,255,255,.07); border-radius: 42% 58% 45% 55%; }
.flow-lines i:nth-child(2) { inset: 90px; }
.flow-lines i:nth-child(3) { inset: 135px; }
.login-panel { display: grid; place-items: center; padding: 40px; }
.login-form { display: grid; width: min(320px,100%); gap: 20px; }
.login-form h2 { margin: 3px 0 7px; font-family: var(--display); font-size: 30px; }
.login-form label { display: grid; gap: 8px; color: #4d5f5c; font-size: 11px; font-weight: 700; }
.login-form input { height: 46px; }
.login-tip { margin: -8px 0 0; color: var(--muted); font-size: 9px; text-align: center; }

html.sidebar-collapsed { --sidebar: 78px; }
html.sidebar-collapsed .sidebar { padding-inline: 11px; overflow: visible; }
html.sidebar-collapsed .sidebar::after { display: none; }
html.sidebar-collapsed .brand { justify-content: center; padding-inline: 0; }
html.sidebar-collapsed .brand > span:last-child,
html.sidebar-collapsed .side-nav > a > span:last-child,
html.sidebar-collapsed .nav-group > [data-settings-toggle] > .settings-nav-label,
html.sidebar-collapsed .settings-nav-caret,
html.sidebar-collapsed .operator > span:nth-child(2),
html.sidebar-collapsed .operator > span:last-child { display: none; }
html.sidebar-collapsed .side-nav > a,
html.sidebar-collapsed .side-nav .nav-parent { justify-content: center; padding-inline: 0; }
html.sidebar-collapsed .sidebar-toggle-icon { transform: rotate(180deg); }
html.sidebar-collapsed .operator { display: flex; justify-content: center; padding: 8px 0; border-color: transparent; }
html.sidebar-collapsed .nav-group::after { content: ""; position: absolute; top: 0; left: 100%; width: 14px; height: 48px; }
html.sidebar-collapsed .side-subnav { position: absolute; z-index: 45; top: 0; left: calc(100% + 12px); display: grid; visibility: hidden; width: 148px; max-height: none; gap: 3px; margin: 0; padding: 9px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 15px 42px rgba(18,54,52,.18); opacity: 0; overflow: visible; pointer-events: none; transform: translateX(-6px); transition: opacity .16s ease, transform .16s ease, visibility .16s; }
html.sidebar-collapsed .nav-group:hover .side-subnav,
html.sidebar-collapsed.settings-menu-open .side-subnav { visibility: visible; opacity: 1; pointer-events: auto; transform: translateX(0); }
html.sidebar-collapsed.settings-menu-click-closed .side-subnav { visibility: hidden; opacity: 0; pointer-events: none; transform: translateX(-6px); }
html.sidebar-collapsed .side-subnav::before { content: "系统设置"; padding: 4px 8px 7px; color: var(--muted); border-bottom: 1px solid var(--line); font-size: 9px; font-weight: 700; letter-spacing: .1em; }
html.sidebar-collapsed .side-subnav a { justify-content: flex-start; min-height: 33px; padding: 0 9px; color: #596965; border-radius: 7px; font-size: 10px; }
html.sidebar-collapsed .side-subnav a:hover { color: var(--river); background: #f2f7f4; }
html.sidebar-collapsed .side-subnav a.active { color: #fff; background: var(--river); }

@keyframes toast-in { from { opacity: 0; transform: translateY(-10px); } }

@media (max-width: 1120px) {
  :root { --sidebar: 210px; }
  .page-content { padding-inline: 28px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .account-hero { grid-template-columns: 1.2fr repeat(3, .9fr); }
  .account-identity, .account-number { padding-inline: 18px; }
  .level-options { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  body { padding-bottom: calc(71px + env(safe-area-inset-bottom)); }
  .sidebar, .sidebar-toggle { display: none; }
  .content-shell { margin-left: 0; }
  .mobile-header { position: sticky; top: 0; z-index: 18; display: flex; height: 62px; align-items: center; justify-content: space-between; padding: 0 18px; background: rgba(245,247,243,.9); border-bottom: 1px solid rgba(32,75,71,.07); backdrop-filter: blur(12px); }
  .mobile-brand { display: flex; align-items: center; gap: 9px; font-family: var(--display); letter-spacing: .08em; }
  .mobile-brand .brand-mark { width: 31px; height: 31px; border-radius: 9px 9px 9px 3px; font-size: 18px; }
  .mobile-header > .avatar { width: 32px; height: 32px; font-size: 13px; }
  .bottom-nav { position: fixed; z-index: 50; inset: auto 0 0; display: grid; grid-template-columns: repeat(5, 1fr); height: calc(64px + env(safe-area-inset-bottom)); padding: 5px 8px env(safe-area-inset-bottom); background: rgba(255,255,255,.96); border-top: 1px solid var(--line); box-shadow: 0 -7px 30px rgba(24,55,53,.07); backdrop-filter: blur(15px); }
  .bottom-nav a { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 2px; color: #81908c; font-size: 9px; }
  .bottom-nav a > span { display: grid; width: 27px; height: 27px; place-items: center; font-family: var(--display); font-size: 13px; }
  .bottom-nav a.active { color: var(--river); font-weight: 700; }
  .bottom-nav .bottom-action > span { width: 37px; height: 37px; margin-top: -18px; color: #fff; background: var(--river); border: 4px solid var(--paper); border-radius: 50%; box-shadow: 0 5px 15px rgba(36,87,90,.25); font-family: var(--body); font-size: 21px; }
  .page-content { padding: 25px 16px 35px; }
  .page-header { align-items: flex-start; margin-bottom: 20px; }
  .page-header h1 { font-size: 29px; }
  .page-header > .button, .desktop-only { display: none; }
  .metric-grid { gap: 10px; }
  .metric-card { padding: 16px; }
  .metric-card > strong { font-size: 26px; }
  .dashboard-grid, .detail-grid, .settings-grid { grid-template-columns: 1fr; }
  .dashboard-aside { grid-template-columns: 1fr 1fr; }
  .filter-form { flex-wrap: wrap; }
  .search-field { flex: 1 0 100%; }
  .filter-form select { flex: 1; width: 100%; }
  .account-hero { grid-template-columns: repeat(3, 1fr); }
  .account-identity { grid-column: 1/-1; padding-bottom: 18px; border-bottom: 1px solid rgba(255,255,255,.1); }
  .account-number { padding-block: 18px; }
  .account-number:nth-child(2) { border-left: 0; }
  .account-number strong { font-size: 23px; }
  .member-heading { align-items: flex-end; }
  .form-layout { max-width: none; }
  .settings-center { grid-template-columns: 1fr; }
  .settings-nav { position: sticky; z-index: 15; top: 62px; display: flex; gap: 5px; margin-inline: -16px; padding: 8px 16px; border-width: 0 0 1px; border-radius: 0; box-shadow: 0 6px 18px rgba(24,55,53,.05); overflow-x: auto; scrollbar-width: none; }
  .settings-nav::-webkit-scrollbar { display: none; }
  .settings-nav a { flex: 0 0 auto; grid-template-columns: 27px auto; min-height: 45px; padding: 6px 10px; }
  .settings-nav a > span { width: 27px; height: 27px; }
  .settings-nav small { display: none; }
  .level-rule-row { grid-template-columns: 43px 1fr 110px 125px 170px; }
  .settlement-summary { grid-template-columns: repeat(6, minmax(125px, 1fr)); overflow-x: auto; scrollbar-width: none; }
  .settlement-summary::-webkit-scrollbar { display: none; }
  .strategy-steps { grid-template-columns: 1fr; }
  .strategy-steps::after { content: "↓"; }
  .payment-checkout { grid-template-columns: 1fr; }
  .payment-code-card { min-height: 0; }
  .provider-config-grid { grid-template-columns: 1fr; }
  .payment-confirm-card { grid-template-columns: 1fr 1fr; }
  .payment-confirm-card > div { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .page-content { padding-inline: 13px; }
  .page-header { gap: 10px; }
  .header-actions { display: grid; gap: 6px; }
  .header-actions .button { min-height: 36px; padding-inline: 11px; font-size: 10px; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric-card { min-height: 125px; }
  .metric-card > strong { margin-top: 18px; font-size: 24px; }
  .metric-card p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .dashboard-aside { grid-template-columns: 1fr; }
  .panel-head { padding: 20px 18px 14px; }
  .transaction-list, .level-stack, .birthday-list { padding-inline: 18px; }
  .recent-panel .transaction-row { grid-template-columns: 35px minmax(0,1fr) auto; }
  .transaction-value { min-width: 78px; }
  .transaction-value small { max-width: 90px; }
  .filter-panel { padding: 12px; }
  .filter-form { display: grid; grid-template-columns: 1fr 1fr; }
  .filter-form .search-field { grid-column: 1/-1; min-width: 0; }
  .filter-form .button { width: 100%; }
  .table-meta { padding-inline: 15px; }
  .member-table, .member-table tbody, .member-table tr, .member-table td { display: block; width: 100%; }
  .member-table thead { display: none; }
  .member-table tbody { padding: 0 12px 12px; }
  .member-table tr { position: relative; margin-bottom: 9px; padding: 14px; background: #fbfcfa; border: 1px solid var(--line); border-radius: 12px; }
  .member-table td { display: flex; justify-content: space-between; gap: 20px; padding: 6px 0; border: 0; text-align: right; }
  .member-table td::before { content: attr(data-label); color: var(--muted); font-size: 10px; }
  .member-table td:first-child { padding: 0 0 11px; margin-bottom: 4px; border-bottom: 1px solid var(--line); text-align: left; }
  .member-table td:first-child::before, .member-table td:last-child { display: none; }
  .level-badge { padding-block: 2px; background: transparent; }
  .form-panel { padding: 20px 17px; }
  .form-grid { grid-template-columns: 1fr; gap: 16px; }
  .span-2 { grid-column: auto; }
  .level-options { grid-template-columns: 1fr 1fr; }
  .form-actions { position: sticky; z-index: 12; bottom: 72px; padding: 10px; background: rgba(245,247,243,.92); border: 1px solid var(--line); border-radius: 13px; backdrop-filter: blur(10px); }
  .form-actions .button { flex: 1; }
  .account-hero { grid-template-columns: 1fr 1fr; }
  .account-identity { grid-column: 1/-1; }
  .account-number { padding: 17px; }
  .account-number:last-child { grid-column: 1/-1; border-top: 1px solid rgba(255,255,255,.1); border-left: 0; }
  .detailed .transaction-row { grid-template-columns: 35px minmax(0,1fr) auto; padding-block: 10px; }
  .detailed .transaction-note { display: none; }
  .consume-split-grid { grid-template-columns: 1fr 1fr; }
  .payment-methods { grid-template-columns: 1fr; }
  .payment-methods label > span { min-height: 0; }
  .profile-list { padding-inline: 18px; }
  .member-notes { margin-inline: 18px; }
  .summary-strip > div { padding: 13px; }
  .summary-strip span { min-height: 22px; line-height: 1.4; }
  .summary-strip strong { font-size: 15px; }
  .transaction-filter { grid-template-columns: 1fr 1fr; }
  .transaction-filter label:first-child { grid-column: 1/-1; }
  .transaction-filter input, .transaction-filter select { min-width: 0; }
  .transaction-filter .button { grid-column: 1/-1; }
  .toast-stack { top: 10px; right: 10px; }
  .login-page { padding: 0; background: #fff; }
  .login-shell { grid-template-columns: 1fr; min-height: 100dvh; border-radius: 0; }
  .login-story { min-height: 230px; padding: 25px 24px; }
  .story-copy { margin: 45px 0 0; }
  .story-copy h1 { margin-block: 7px 9px; font-size: 30px; line-height: 1.28; }
  .story-copy > p:last-child { display: none; }
  .login-panel { padding: 31px 24px max(32px, env(safe-area-inset-bottom)); place-items: start center; }
  .settings-heading { align-items: center; }
  .role-stamp { min-width: 91px; padding: 9px 10px; font-size: 12px; }
  .settings-nav { margin-inline: -13px; padding-inline: 13px; }
  .settings-nav a { grid-template-columns: 25px auto; }
  .settings-nav a > span { width: 25px; height: 25px; }
  .identity-card { grid-template-columns: 48px 1fr; min-height: 115px; padding: 20px; }
  .identity-avatar { width: 47px; height: 47px; border-radius: 14px 14px 14px 4px; font-size: 19px; }
  .identity-card h2 { font-size: 19px; }
  .role-ribbon { display: none; }
  .settings-two-col { grid-template-columns: 1fr; }
  .setting-section-form, .rule-panel, .strategy-panel, .permission-card, .data-actions-panel { padding: 19px 16px; }
  .inline-actions .button { width: 100%; }
  .level-rule-row { grid-template-columns: 38px 1fr 94px; gap: 9px; }
  .level-rule-row > label:nth-last-child(-n+2) { grid-column: 2/-1; }
  .member-seal.small { width: 36px; height: 36px; }
  .rule-blocks { grid-template-columns: 1fr; }
  .strategy-step { min-height: 0; padding: 16px; }
  .strategy-step-head { grid-template-columns: 1fr auto; }
  .strategy-sequence { grid-column: 1 / -1; justify-self: start; }
  .strategy-value { flex-wrap: wrap; }
  .staff-list { padding-inline: 13px; }
  .staff-row summary { grid-template-columns: 35px 1fr auto 17px; gap: 8px; }
  .staff-row summary .account-status { display: none; }
  .staff-main small { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .staff-edit-grid { margin-left: 0; }
  .staff-edit-form, .staff-password-form { grid-template-columns: 1fr; }
  .staff-edit-form .button, .staff-password-form .button { width: 100%; }
  .download-actions { grid-template-columns: 1fr; }
  .download-card { grid-template-columns: 38px 1fr; }
  .download-card b { grid-column: 2; }
  .data-overview > div { padding: 14px 10px; text-align: center; }
  .data-overview strong { font-size: 20px; }
  .payment-vault-location { grid-template-columns: 1fr; }
  .payment-vault-location code { white-space: normal; }
  .credential-card, .payment-common-card, .payment-confirm-card { padding: 18px 16px; }
  .credential-fields, .key-upload-grid, .payment-confirm-card { grid-template-columns: 1fr; }
  .credential-fields .span-2, .payment-confirm-card > div { grid-column: auto; }
  .payment-confirm-card .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
