/* “轻紫行动台” · shared responsive console, with local assets only. */
:root {
  --bg: #f7f6fb; --surface: #fff; --surface-soft: #faf9fd;
  --ink: #242035; --text: #242035; --muted: #7a738e; --muted-2: #938ca4;
  --line: #ebe7f2; --line-strong: #d8cfee;
  --primary: #7950e8; --blue: #7950e8; --blue-weak: #f1ebff;
  --shadow: 0 5px 22px rgba(48, 31, 86, .035); --radius: 14px;
  --bs-primary-rgb: 121, 80, 232;
}
body { font-size: 14px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
.console-page { background: #fcfbfe; }
a { color: var(--primary); }
button, input, textarea, select { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #b6a0f3; outline-offset: 3px; }
.ui-icon { width: 22px; height: 22px; display: inline-block; flex: 0 0 auto; vertical-align: middle; }
.icon-purple { filter: invert(36%) sepia(90%) saturate(1960%) hue-rotate(238deg) brightness(94%) contrast(91%); }
.icon-muted { opacity: .55; }
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 7px; min-height: 42px; font-size: 14px; border-radius: 9px; }
.btn-primary { background: var(--primary); border-color: var(--primary); box-shadow: none; }
.btn-primary:hover, .btn-primary:focus { background: #6840d4; border-color: #6840d4; }
.btn-primary .ui-icon { filter: invert(1); }
.btn-outline-primary { --bs-btn-color: #7950e8; --bs-btn-border-color: #d8cfee; --bs-btn-hover-bg: #7950e8; --bs-btn-hover-border-color: #7950e8; --bs-btn-active-bg: #6840d4; --bs-btn-active-border-color: #6840d4; }
.btn-outline-secondary { color: #655d78; border-color: var(--line-strong); }
.btn-link { color: var(--primary); }
.form-control, .form-select { min-height: 44px; border-radius: 9px; font-size: 14px; color: var(--ink); }
.form-control:focus, .form-select:focus { border-color: #a78beb; box-shadow: 0 0 0 3px #f1ebff; }
.card, .panel { box-shadow: var(--shadow); }
.card h4, .card h5, .card h6 { font-weight: 650; }
.text-primary { color: var(--primary) !important; }
code { color: #7547d7; background: #f3edff; }
.auth-page { background: #f7f4fd; }
.auth-page .center-wrap { max-width: 480px; min-height: 100svh; padding: 62px 24px 40px; display: flex; align-items: center; flex-direction: column; }
.auth-brand { text-align: center; margin-bottom: 30px; }
.auth-brand h1 { font-size: 26px; font-weight: 750; letter-spacing: -.5px; margin: 0 0 5px; }
.auth-brand p { font-size: 16px; color: var(--muted); margin: 0; }
.auth-card { width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 30px 32px 24px; box-shadow: 0 12px 35px rgba(67, 42, 117, .07); text-align: center; }
.auth-avatar { display: block; width: 90px; height: 90px; border-radius: 50%; object-fit: cover; margin: 0 auto 20px; }
.auth-card h2 { font-size: 22px; font-weight: 700; margin: 0 0 15px; }
.auth-hint { color: var(--muted); font-size: 14px; line-height: 1.9; margin: 0 0 24px; }
.auth-code { height: 54px; font-size: 23px; letter-spacing: .55em; padding-left: 1em; text-align: center; font-variant-numeric: tabular-nums; }
.auth-card .btn-primary { width: 100%; min-height: 48px; margin-top: 16px; font-weight: 650; }
.auth-switch { display: block; border-top: 1px solid var(--line); margin-top: 26px; padding-top: 22px; color: var(--primary); font-weight: 550; min-height: 44px; }
.auth-card .alert { text-align: left; font-size: 14px; }
.page-shell { grid-template-columns: 216px minmax(0, 1fr); }
.side { background: #272338; padding: 24px 14px 18px; gap: 22px; overflow-y: auto; }
.side .brand { width: auto; height: auto; display: flex; align-self: stretch; justify-content: flex-start; gap: 10px; padding: 0 8px; border: 0; border-radius: 0; background: transparent; }
.side .brand-mark { width: 40px; height: 40px; border-radius: 12px; }
.brand-copy { min-width: 0; display: flex; flex-direction: column; line-height: 1.5; }
.brand-copy strong { font-size: 15px; font-weight: 650; color: #fff; white-space: nowrap; }
.brand-copy small { font-size: 11px; color: #b9b1cd; font-weight: 400; letter-spacing: .5px; }
.nav-label { padding: 0 12px; color: #a59bbd; font-size: 12px; margin: 6px 0 -12px; }
.side-nav { gap: 5px; }
.side-link { gap: 12px; padding: 12px; color: #d3cce1; font-size: 14px; font-weight: 450; min-height: 46px; border-radius: 10px; }
.side-link .ui-icon { filter: invert(94%) sepia(8%) saturate(589%) hue-rotate(212deg) brightness(90%); width: 21px; height: 21px; }
.side-link.active { background: #7950e8; box-shadow: none; color: #fff; }
.side-link.active .ui-icon { filter: invert(1); }
.side-sublink { margin: 0; padding: 7px 10px 7px 45px; font-size: 12px; min-height: 36px; }
.side-sublink .ui-icon { width: 16px; height: 16px; }
.side-bottom { padding-top: 18px; border-top: 1px solid #484055; display: grid; gap: 4px; margin-top: auto; }
.main { padding: 0 36px 56px; }
.content-wrap { max-width: 1120px; }
.workspace-header { min-height: 94px; padding: 20px 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); margin-bottom: 30px; }
.workspace-identity { display: flex; gap: 12px; align-items: center; min-width: 0; }
.workspace-identity > div { min-width: 0; }
.workspace-avatar { width: 38px; height: 38px; border-radius: 12px; object-fit: cover; }
.workspace-title { display: block; font-size: 16px; font-weight: 650; overflow-wrap: anywhere; }
.workspace-meta { display: flex; gap: 12px; color: var(--muted); font-size: 12px; align-items: center; flex-wrap: wrap; }
.protection-state { display: inline-flex; align-items: center; gap: 5px; color: #159568; white-space: nowrap; font-size: 12px; }
.protection-state::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.protection-state.inactive { color: #8b8299; }
.workspace-header .btn { flex-shrink: 0; min-height: 38px; font-size: 12px; padding: 6px 12px; }
.page-heading { margin: 0 0 22px; font-size: 25px; font-weight: 700; line-height: 1.4; letter-spacing: -.4px; }
.overview-content { max-width: 760px; }
.today-card { background: #f0eaff; border: 1px solid #ece3ff; border-radius: 16px; padding: 27px 30px; display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 166px; margin-bottom: 30px; }
.today-label { font-size: 17px; font-weight: 600; margin: 0 0 4px; }
.today-number { font-size: 44px; line-height: 1.25; font-weight: 700; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.today-number small { font-size: 16px; font-weight: 400; margin-left: 5px; letter-spacing: 0; }
.today-date { font-size: 13px; color: #766093; margin-top: 3px; }
.today-art { width: 66px; height: 66px; opacity: .45; }
.today-card { display: block; }
.today-overview-title { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 16px; font-weight: 650; margin-bottom: 20px; }
.today-overview-title span { color: #766093; font-size: 12px; font-weight: 400; margin-left: 8px; }
.overview-members { color: #65577d; font-size: 12px; font-weight: 400; }
.overview-members strong { color: #4f3688; font-size: 16px; margin-left: 3px; }
.overview-members small { color: #766093; font-size: 11px; }
.today-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.today-metrics a { display: flex; flex-direction: column; gap: 3px; color: var(--ink); padding: 0 18px; border-left: 1px solid #dcd2f2; }
.today-metrics a:first-child { padding-left: 0; border-left: 0; }
.today-metrics a:hover { color: var(--primary); }
.today-metrics span { font-size: 13px; color: #65577d; }
.today-metrics strong { font-size: 32px; font-weight: 700; line-height: 1.3; }
.today-metrics small { font-size: 13px; font-weight: 400; margin-left: 3px; }
.today-metrics a { min-height: 64px; justify-content: center; }
.section-heading { margin: 0 0 14px; font-size: 17px; font-weight: 650; }
.quick-actions { background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 0 20px; overflow: hidden; }
.quick-action { display: flex; align-items: center; gap: 15px; min-height: 78px; padding: 16px 0; color: var(--ink); border-bottom: 1px solid var(--line); }
.quick-action:last-child { border-bottom: 0; }
.quick-action:hover { color: var(--primary); }
.quick-icon { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: #f2edff; flex-shrink: 0; }
.quick-icon .ui-icon { width: 25px; height: 25px; }
.quick-copy { flex: 1; min-width: 0; }
.quick-copy strong { display: block; font-size: 16px; font-weight: 600; }
.quick-copy small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.quick-copy b { font-weight: 550; color: #7652b5; }
.quick-action > .ui-icon { width: 18px; height: 18px; opacity: .55; }
.mobile-tabs { display: none; }
.side-toggle { box-shadow: none; background: #f0eaff; color: #5a3da0; border-radius: 9px; }
.console-page .card > h4 { font-size: 21px; }
.groups-page .center-wrap { max-width: 1100px; padding: 30px 28px 48px; }
.public-header { margin-bottom: 26px; }
.groups-page .public-title { font-size: 18px; font-weight: 650; }
.groups-page .ph-actions { display: flex; width: auto; }
.groups-page .public-header { flex-direction: row; align-items: center; }
.groups-page .public-header .user-name, .groups-page .public-header .recharge-btn, .groups-page .public-header .user-tier-badge { display: none; }
.groups-page .public-header .user-menu { padding: 0; border: 0; border-radius: 50%; box-shadow: none; background: transparent; }
.groups-page .user-avatar-wrap { border: 0; background: transparent; padding: 0; }
.groups-page .public-header .user-avatar { background: #ede5fd; color: #7950e8; box-shadow: none; border: 0; }
.groups-page .customer-head { margin: 0 0 22px !important; }
.groups-page .customer-head h1 { font-size: 26px; font-weight: 700; margin: 0; }
.groups-page .eyebrow { display: none; }
.account-summary { display: flex; align-items: center; gap: 14px; padding: 20px 24px; background: linear-gradient(125deg, #fff 35%, #f1ebff); border: 1px solid #e7def5; border-radius: 18px; margin: 0 0 30px; box-shadow: 0 8px 28px rgba(77,49,133,.06); }
.account-summary .auth-avatar { width: 45px; height: 45px; margin: 0; flex-shrink: 0; }
.account-summary-info { flex: 1; min-width: 0; }
.account-summary-top, .account-summary-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.account-summary-top { align-items: flex-start; padding-bottom: 14px; border-bottom: 1px solid #eee9f6; }
.account-summary-bottom { padding-top: 14px; }
.account-caption { display: block; color: #8e7cac; font-size: 11px; }
.account-name { display: block; font-weight: 650; font-size: 15px; overflow-wrap: anywhere; }
.account-membership { display: flex; gap: 7px 12px; flex-wrap: wrap; align-items: center; margin-top: 3px; color: #7b659f; font-size: 12px; }
.membership-plan { color: #7149c5; background: #f2edff; padding: 2px 8px; border-radius: 6px; }
.groups-page .panel-head { gap: 16px; padding: 18px 20px; }
.groups-page .panel-title { flex-shrink: 0; font-size: 15px; font-weight: 600; white-space: nowrap; }
.groups-page .toolbar { min-width: 0; }
.groups-page .search { max-width: 100%; width: 310px; height: 42px; }
.groups-page .group-list { background: #fff; gap: 0; padding: 0 20px; }
.groups-page .group-row, .groups-page .group-row.mode-personal { grid-template-columns: minmax(0, 1fr) auto; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; padding: 24px 0; gap: 18px; }
.groups-page .group-row:last-child { border-bottom: 0; }
.groups-page .group-row.featured { box-shadow: none; }
.groups-page .group-row.mode-personal { position: relative; }
.group-card-link { position: absolute; inset: 0; z-index: 1; border-radius: 12px; }
.group-card-link img { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; opacity: .45; }
.groups-page .mode-personal .row-actions { position: relative; z-index: 2; }
.groups-page .mode-personal .group-card-link img { display: none; }
.groups-page .group-row.mode-personal:hover { background: #faf7ff; }
.groups-page .group-avatar, .groups-page .group-avatar.green, .groups-page .group-avatar.amber { background: #f1eaff; color: #7950e8; width: 42px; height: 42px; border-radius: 12px; }
.groups-page .group-title { font-size: 16px; font-weight: 650; color: var(--ink); }
.groups-page .group-subline { font-size: 12px; gap: 8px; margin-top: 3px; }
.group-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 12px; color: #7a738e; font-size: 12px; }
.group-summary strong { color: #443657; font-size: 14px; font-weight: 650; margin-left: 3px; }
.group-expiry { margin-top: 6px; color: #8d839e; font-size: 11px; }
.user-dropdown .ui-icon { width: 19px; height: 19px; }
.groups-page .tag.id { background: transparent; color: var(--muted); padding: 0; font-weight: 450; }
.groups-page .tag.active { background: #e8f7ef; color: #13875c; }
.groups-page .row-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.groups-page .row-actions .btn { white-space: nowrap; font-size: 13px; }
.groups-page .stats-strip, .groups-page .expiry-meter { display: none; }
.groups-page .expiry-badge { margin-top: 6px; font-size: 12px; padding: 3px 8px; }
.groups-page .customer-pill { grid-column: 1; font-size: 12px; }
.groups-page .groups-total-footer { color: var(--muted); font-size: 13px; }
.rules-intro { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.rules-intro .page-heading { margin: 0 0 5px; }
.rules-intro p { color: var(--muted); margin: 0; font-size: 13px; }
.rules-surface { background: #fff; border: 1px solid var(--line); border-radius: 15px; margin-bottom: 24px; padding: 24px; }
.rules-surface > h2 { font-size: 17px; margin: 0 0 7px; font-weight: 650; }
.ad-toggle { margin-top: 18px; border-top: 1px solid var(--line); }
.ad-toggle summary { cursor: pointer; display: flex; gap: 12px; justify-content: space-between; padding: 18px 0 0; font-size: 14px; font-weight: 600; list-style: none; }
.ad-toggle .at-state { font-size: 12px; color: var(--muted); }
.ad-toggle.is-on .at-state { color: var(--primary); }
.ad-toggle .at-body { padding-top: 15px; }
.ad-toggle .at-desc { color: var(--muted); font-size: 12px; margin-bottom: 15px; }
.ad-toggle .at-actions { display: flex; gap: 10px; }
.ad-toggle .at-btn { min-height: 42px; padding: 8px 18px; border: 1px solid var(--line-strong); background: #fff; border-radius: 9px; color: #756b86; }
.ad-toggle .at-btn.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.rule-row { display: flex; align-items: center; gap: 15px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.rule-row:last-child { border-bottom: 0; padding-bottom: 0; }
.rule-copy { flex: 1; min-width: 0; }
.rule-copy strong { display: block; font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.rule-copy p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.75; }
.rule-row form { margin: 0; flex-shrink: 0; }
.rule-switch { display: inline-flex; border: 0; background: transparent; padding: 8px 0 8px 8px; min-width: 48px; min-height: 44px; align-items: center; justify-content: center; }
.rule-switch-track { width: 35px; height: 21px; border-radius: 20px; padding: 3px; background: #d6d1e0; display: inline-flex; align-items: center; transition: background .15s; }
.rule-switch-track::before { content: ''; width: 15px; height: 15px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #0002; transition: transform .15s; }
.rule-switch[aria-checked='true'] .rule-switch-track { background: #7950e8; }
.rule-switch[aria-checked='true'] .rule-switch-track::before { transform: translateX(14px); }
.rule-switch:disabled { opacity: .55; }
.keyword-summary { display: flex; gap: 15px; align-items: center; }
.keyword-summary > div:nth-child(2) { flex: 1; min-width: 0; }
.keyword-summary h2 { font-size: 17px; font-weight: 650; margin: 0 0 5px; }
.keyword-summary p { color: var(--muted); margin: 0; font-size: 12px; }
.keyword-preview { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.keyword-preview span { padding: 5px 10px; color: #7950e8; background: #f2edff; border-radius: 6px; font-size: 12px; overflow-wrap: anywhere; max-width: 100%; }
.keyword-drawer { position: fixed; inset: 0 0 0 auto; width: min(480px, 100%); height: 100dvh; margin: 0; padding: 0; border: 0; border-left: 1px solid var(--line); max-height: none; max-width: none; color: var(--ink); background: #fff; box-shadow: -10px 0 45px #27233812; }
.keyword-drawer::backdrop { background: #20183142; }
.keyword-drawer form { display: flex; flex-direction: column; height: 100%; }
.keyword-drawer-header { display: flex; align-items: center; justify-content: space-between; padding: 23px 24px; border-bottom: 1px solid var(--line); }
.keyword-drawer-header h2 { margin: 0; font-size: 18px; font-weight: 650; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 10px; background: transparent; border: 0; border-radius: 8px; }
.icon-button:hover { background: #f4f0fa; }
.keyword-drawer-body { flex: 1; overflow-y: auto; padding: 26px 24px; }
.keyword-match { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 9px; color: var(--ink); font-size: 14px; background: #fcfbfe; margin-bottom: 14px; }
.keyword-help { color: var(--muted); font-size: 12px; line-height: 1.8; margin-bottom: 20px; }
.keyword-toolbar { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 10px; }
.keyword-toolbar .btn { min-height: 40px; font-size: 12px; }
.tag-editor { display: flex; align-items: flex-start; align-content: flex-start; flex-wrap: wrap; gap: 8px; min-height: 170px; border: 1px solid var(--line-strong); border-radius: 10px; padding: 12px; cursor: text; }
.tag-editor:focus-within { border-color: #a78beb; box-shadow: 0 0 0 3px #f6f1ff; }
.keyword-tag { display: inline-flex; align-items: center; max-width: 100%; background: #f1eaff; color: #7649d6; border-radius: 6px; padding: 1px 2px 1px 10px; min-height: 34px; font-size: 13px; }
.keyword-tag span { overflow-wrap: anywhere; min-width: 0; }
.keyword-remove { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; height: 32px; width: 32px; padding: 7px; border: 0; border-radius: 5px; background: transparent; }
.keyword-remove:hover { background: #e1d4fb; }
.keyword-remove .ui-icon { width: 14px; height: 14px; }
.keyword-input { flex: 1 1 180px; width: 180px; min-width: 100px; height: 36px; padding: 5px 2px; border: 0; outline: none; color: var(--ink); background: transparent; font-size: 13px; }
.keyword-input:focus-visible { outline: none; }
.keyword-feedback { font-size: 12px; color: var(--muted); min-height: 22px; margin: 9px 0; }
.keyword-feedback.error { color: #bd3653; }
.keyword-bulk { background: #faf8fe; border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-top: 18px; }
.keyword-bulk label { font-size: 13px; font-weight: 550; }
.keyword-bulk textarea { margin: 8px 0 10px; min-height: 150px; resize: vertical; }
.keyword-drawer-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 18px 24px max(18px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; }
.keyword-drawer-footer .btn { min-width: 96px; min-height: 44px; }
.drawer-open { overflow: hidden; }
.management-page { max-width: 900px; }
.management-page .page-heading { margin-bottom: 5px; }
.page-description { color: var(--muted); font-size: 13px; margin: 0 0 20px; line-height: 1.7; }
.management-tabs { display: flex; gap: 6px; border: 0; overflow-x: auto; flex-wrap: nowrap; padding: 4px; background: #f1eef8; border-radius: 12px; margin-bottom: 20px !important; }
.management-tabs .nav-item { flex: 0 0 auto; }
.management-tabs .nav-link { border: 0; border-radius: 9px; color: #716783; padding: 9px 14px; font-size: 13px; }
.management-tabs .nav-link.active { color: #6840d4; background: #fff; font-weight: 650; box-shadow: 0 2px 8px #3323560d; }
.management-page .card { border-radius: 15px; box-shadow: none; }
.management-section-title { margin: 0 0 8px; font-size: 17px; font-weight: 650; }
.template-intro { color: var(--muted); margin: 12px 0 25px; }
.template-intro p { line-height: 1.7; }
.template-list-title { margin-bottom: 14px; }
.template-card textarea { min-height: 100px; background: #fcfbfe; }
.template-card .form-check-input:checked { background-color: #7950e8 !important; border-color: #7950e8 !important; }
.template-help summary { cursor: pointer; font-size: 15px; font-weight: 650; color: #574276; }
.template-help ul { padding-left: 20px; line-height: 1.8; }
@media (max-width: 560px) {
  .management-page .card.p-4 { padding: 20px !important; }
  .management-tabs .nav-link { padding: 9px 12px; }
}
@media (min-width: 1300px) { .overview-content { max-width: 800px; } }
@media (max-width: 980px) {
  .page-shell { grid-template-columns: 1fr; }
  .side { width: 280px; padding: 24px 18px; visibility: hidden; }
  .side.open { visibility: visible; }
  .main { padding: 0 24px 100px; }
  .workspace-header { margin-bottom: 26px; min-height: 84px; }
  .workspace-header .side-toggle { display: none; }
  .mobile-tabs { display: flex; justify-content: space-around; position: fixed; bottom: 0; left: 0; right: 0; z-index: 1020; background: #fff; border-top: 1px solid var(--line); padding: 8px 10px max(8px, env(safe-area-inset-bottom)); }
  .mobile-tabs a, .mobile-tabs button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 30%; min-height: 56px; padding: 2px 4px; font-size: 12px; font-weight: 600; line-height: 1.25; color: #64538b; border: 0; background: transparent; }
  .mobile-tab-icon { display: grid; place-items: center; width: 36px; height: 30px; border-radius: 9px; background: #f1ebfa; }
  .mobile-tab-icon svg { display: block; width: 21px; height: 21px; }
  .mobile-tabs .active, .mobile-tabs button[aria-expanded='true'] { color: #6238c7; }
  .mobile-tabs .active .mobile-tab-icon, .mobile-tabs button[aria-expanded='true'] .mobile-tab-icon { color: #fff; background: #6238c7; }
  .overview-content { max-width: 680px; margin: 0 auto; }
}
@media (max-width: 560px) {
  .auth-page .center-wrap { padding: 60px 22px 28px; }
  .auth-brand { margin-bottom: 32px; }
  .auth-brand h1 { font-size: 28px; }
  .auth-card { padding: 32px 23px 26px; border-radius: 17px; }
  .auth-avatar { width: 90px; height: 90px; margin-bottom: 25px; }
  .auth-card h2 { font-size: 24px; }
  .auth-hint { font-size: 15px; margin-bottom: 28px; }
  .main { padding: 0 20px 100px; }
  .workspace-header { min-height: 86px; margin-bottom: 24px; gap: 8px; }
  .workspace-avatar { width: 36px; height: 36px; }
  .workspace-identity { gap: 9px; }
  .workspace-title { font-size: 14px; }
  .workspace-meta { font-size: 10px; gap: 7px; }
  .workspace-meta .protection-state { display: none; }
  .workspace-header .btn { font-size: 11px; gap: 4px; padding: 6px 8px; min-height: 44px; }
  .workspace-header .btn .ui-icon { width: 16px; height: 16px; }
  .page-heading { font-size: 24px; margin-bottom: 22px; }
  .today-card { padding: 22px; min-height: 156px; margin-bottom: 28px; }
  .today-label { font-size: 18px; }
  .today-number { font-size: 44px; }
  .today-art { width: 58px; height: 58px; }
  .today-metrics a { padding: 0 8px; }
  .today-metrics strong { font-size: 26px; }
  .quick-actions { padding: 0 16px; }
  .quick-action { min-height: 80px; gap: 12px; padding: 14px 0; }
  .quick-copy strong { font-size: 18px; }
  .quick-copy small { font-size: 12px; }
  .groups-page .center-wrap { padding: 20px 18px 32px; }
  .groups-page .public-header { margin-bottom: 22px; gap: 12px; }
  .groups-page .public-title { font-size: 17px; }
  .groups-page .public-title .brand-mark { width: 33px; height: 33px; }
  .groups-page .public-header > div { width: auto; }
  .account-summary { padding: 17px 15px; gap: 10px; margin-bottom: 28px; flex-wrap: wrap; }
  .account-summary .auth-avatar { width: 40px; height: 40px; }
  .account-name { font-size: 14px; }
  .account-membership { gap: 5px; }
  .account-summary .btn { font-size: 12px; min-height: 38px; padding: 6px 10px; }
  .groups-page .panel-head { flex-direction: column; align-items: stretch; gap: 12px; padding: 17px 15px; }
  .groups-page .toolbar, .groups-page .search { width: 100%; }
  .groups-page .group-list { padding: 0 15px; }
  .groups-page .group-row, .groups-page .group-row.mode-personal { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 22px 0; }
  .groups-page .row-actions { justify-content: flex-start; padding-left: 54px; }
  .groups-page .mode-personal .row-actions { display: none; }
  .groups-page .mode-personal .group-card-link img { display: block; }
  .groups-page .mode-personal .group-identity { padding-right: 30px; }
  .groups-page .row-actions .btn { min-height: 40px; }
  .rules-intro { align-items: flex-start; flex-direction: column; }
  .rules-surface { padding: 20px 16px; }
  .rule-row { gap: 10px; }
  .rule-row > .quick-icon { width: 36px; height: 36px; border-radius: 10px; }
  .rule-row .quick-icon .ui-icon { width: 21px; height: 21px; }
  .rule-copy p { font-size: 11px; }
  .keyword-summary { gap: 10px; flex-wrap: wrap; }
  .keyword-summary .btn { margin-left: 52px; }
  .keyword-drawer { width: 100%; border: 0; }
  .keyword-drawer-header { padding: 15px 18px; }
  .keyword-drawer-body { padding: 24px 20px; }
  .keyword-drawer-footer { padding-left: 20px; padding-right: 20px; }
  .keyword-remove { width: 40px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }

/* MagicPath: workspace overview and navigation */
.console-page { background: #f8f7fc; }
.overview-eyebrow { color: #967bd4; font-size: 10px; font-weight: 700; letter-spacing: .1em; margin-bottom: 4px; }
.overview-content .page-heading { margin-bottom: 18px; }

/* Product updates */
.release-banner { display:flex; align-items:center; gap:13px; padding:14px 16px; margin:0 0 24px; color:var(--ink); background:#f1ebff; border:1px solid #e6dafa; border-radius:15px; text-decoration:none; }
.release-banner:hover { color:var(--ink); border-color:#bda4ec; background:#ece3ff; }
.release-banner-icon { display:grid; place-items:center; flex-shrink:0; width:38px; height:38px; background:#fff; border-radius:11px; }
.release-banner-copy { min-width:0; flex:1; }
.release-banner-label { display:inline-block; margin-right:8px; padding:2px 7px; background:#7950e8; border-radius:6px; color:#fff; font-size:11px; font-weight:650; }
.release-banner-copy strong { font-size:14px; overflow-wrap:anywhere; }
.release-banner-copy small { display:block; margin-top:2px; color:#746a85; font-size:12px; overflow-wrap:anywhere; }
.release-banner-action { flex-shrink:0; color:#7950e8; font-size:12px; font-weight:600; }
.release-banner-action .ui-icon { width:16px; height:16px; opacity:.65; }
.release-page { max-width:860px; }
.release-page-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin-bottom:22px; }
.release-page-heading .page-heading { margin:0 0 4px; }
.release-page-heading p { color:var(--muted); margin:0; }
.release-page-heading .btn { flex-shrink:0; }
.release-editor, .release-card, .release-empty { background:#fff; border:1px solid var(--line); border-radius:15px; padding:22px 24px; box-shadow:var(--shadow); }
.release-editor { margin-bottom:18px; }
.release-editor > summary, .release-edit-existing > summary { color:#7950e8; font-weight:600; cursor:pointer; }
.release-list { display:grid; gap:14px; }
.release-meta { display:flex; align-items:center; flex-wrap:wrap; gap:9px; color:var(--muted); font-size:12px; }
.release-meta span { border-radius:6px; padding:2px 8px; background:#f4f0fb; }
.release-meta .release-latest { color:#6f44cf; background:#efe7ff; font-weight:600; }
.release-card h2 { margin:10px 0 4px; font-size:18px; font-weight:700; overflow-wrap:anywhere; }
.release-summary { color:#6d617e; margin:0 0 14px; overflow-wrap:anywhere; }
.release-body { white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.8; color:#51475f; }
.release-edit-existing { margin-top:18px; border-top:1px solid var(--line); padding-top:14px; }
.release-form { display:grid; gap:14px; margin-top:18px; }
.release-form label { display:grid; gap:5px; color:#534b62; font-weight:600; }
.release-form label span { color:var(--muted); font-weight:400; font-size:12px; }
.release-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.release-form .btn { justify-self:start; }
.release-empty { color:var(--muted); }
@media (max-width:600px) {
  .release-banner { align-items:flex-start; }
  .release-banner-action { font-size:0; }
  .release-banner-action .ui-icon { width:18px; height:18px; }
  .release-page-heading { align-items:center; }
  .release-page-heading .btn { padding:8px 10px; }
  .release-editor, .release-card, .release-empty { padding:18px; }
  .release-form-grid { grid-template-columns:1fr; }
}
.today-card { background: linear-gradient(125deg, #f0e9ff, #e8ddfb); border-color: #e6d9fc; border-radius: 20px; padding: 22px; min-height: 0; }
.today-overview-title { margin-bottom: 18px; }
.overview-members { background: #ffffffa8; border-radius: 20px; padding: 4px 10px; }
.today-metrics a { padding: 0 14px; }
.today-metrics strong { font-variant-numeric: tabular-nums; }
.quick-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0; background: transparent; border: 0; overflow: visible; }
.quick-action { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-content: start; position: relative; min-height: 130px; padding: 16px; background: #fff; border: 1px solid #ede8f5; border-radius: 16px; box-shadow: 0 5px 18px rgba(48,31,86,.035); }
.quick-action:last-child { border-bottom: 1px solid #ede8f5; }
.quick-action:hover { border-color: #cbb8f2; background: #fefcff; }
.quick-icon { grid-column: 1 / -1; width: 36px; height: 36px; border-radius: 11px; }
.quick-icon .ui-icon { width: 21px; height: 21px; }
.quick-copy strong { font-size: 14px; }
.quick-copy small { font-size: 11px; line-height: 1.5; }
.quick-action > .ui-icon { align-self: start; margin-top: 3px; }
.side { background: #262139; }
.side .brand { padding: 0 8px 20px; border-bottom: 1px solid #484059; }
.side-link { border-radius: 11px; transition: background .15s ease; }
.side-link:hover { background: #39304d; color: #fff; }
.side-link.active { background: #7950e8; }
.side-sublink { color: #bdb3cc; border-left: 1px solid #514660; border-radius: 0 10px 10px 0; margin-left: 22px; padding-left: 23px; }
.side-bottom { border-color: #484059; }
@media (max-width: 980px) {
  .mobile-tabs { background: #fffffff5; box-shadow: 0 -5px 24px rgba(42,29,68,.06); }
  .mobile-tabs a, .mobile-tabs button { color: #8e80a1; font-weight: 550; }
  .mobile-tabs .mobile-tab-icon { background: transparent; }
  .mobile-tabs .active .mobile-tab-icon, .mobile-tabs button[aria-expanded='true'] .mobile-tab-icon { color: #7144d6; background: #f1eaff; }
}
@media (max-width: 560px) {
  .today-card { padding: 19px; }
  .today-metrics a { padding: 0 9px; }
  .quick-actions { gap: 9px; }
  .quick-action { min-height: 124px; padding: 14px; }
}

/* MagicPath merchant workspace */
.management-page .merchant-add-card { background: linear-gradient(125deg, #fff 35%, #f3eeff); border: 1px solid #e9e2f5; border-radius: 18px; }
.merchant-kicker { color: #9276cf; font-size: 11px; font-weight: 650; margin-bottom: 4px; }
.merchant-add-card .management-section-title { font-size: 18px; margin-bottom: 5px; }
.merchant-search-form { margin-top: 16px; }
.merchant-search-form .form-control { background: #fff; }
.management-page .merchant-list-card { border: 1px solid #ece7f3; border-radius: 18px; }
.merchant-list-card h6 { font-size: 16px; font-weight: 700; }
.merchant-list-card .alert { border-radius: 12px; font-size: 12px; }
.merchant-list-card .table-responsive { overflow: visible; }
.merchant-list-card .table { font-size: 13px; }
@media (max-width: 767px) {
  .merchant-search-form { display: flex; flex-wrap: nowrap; }
  .merchant-search-form > div:first-of-type { flex: 1; min-width: 0; }
  .merchant-search-form > div:nth-of-type(2) { width: auto; flex: 0 0 auto; }
  .merchant-search-form .btn { padding-left: 16px; padding-right: 16px; }
  .merchant-list-table tbody tr { border: 1px solid #ebe5f4; border-radius: 14px; background: #fcfbfe; padding: 8px 12px; margin-bottom: 12px; box-shadow: none; }
  .merchant-list-table tbody td { border-color: #f0ecf6; }
  .merchant-list-table tbody td[data-label='昵称'] a { font-size: 15px; color: #332747; }
  .merchant-list-table tbody td[data-label='积分'] a { color: #7149c5; }
}

/* MagicPath group cards and merchant controls */
.groups-page .group-list:has(.mode-personal) { background: transparent; padding: 0; display: grid; gap: 12px; }
.groups-page .panel:has(.mode-personal) { background: transparent; border: 0; box-shadow: none; overflow: visible; }
.groups-page .group-row.mode-personal { padding: 20px; border: 1px solid #eae5f2; border-radius: 19px; background: #fff; box-shadow: 0 8px 26px rgba(53,33,80,.045); }
.groups-page .group-row.mode-personal:hover { border-color: #d6c6f1; background: #fff; }
.groups-page .mode-personal .group-identity { align-items: flex-start; }
.groups-page .mode-personal .group-summary { border-top: 1px solid #f0edf5; padding-top: 14px; margin-top: 15px; gap: 22px; }
.groups-page .mode-personal .group-summary strong { font-size: 16px; }
.groups-page .mode-personal .group-expiry { margin-top: 9px; }
.groups-page .mode-personal .group-card-link img { right: 17px; }
.merchant-stat { display: inline-flex; align-items: center; gap: 4px; padding: 5px 8px; border-radius: 20px; color: #7149c5; background: #f1ebff; font-size: 11px; font-weight: 650; white-space: nowrap; }
.merchant-stat .ui-icon, .score-icon { width: 14px; height: 14px; }
.coupon-stat { background: #eef8f3; color: #238660; }
.coupon-stat .ui-icon { filter: invert(43%) sepia(49%) saturate(634%) hue-rotate(105deg) brightness(91%); }
.merchant-coupon-panel { border: 1px solid #ece6f5; border-radius: 14px; background: #faf8fe; padding: 13px; }
.merchant-coupon-icon { width: 38px; height: 38px; border-radius: 11px; background: #f0eaff; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.merchant-coupon-icon .ui-icon { width: 20px; height: 20px; }
.merchant-coupon-panel strong { font-size: 13px; }
.merchant-coupon-status { color: #8b809c; font-size: 11px; line-height: 1.4; margin-top: 3px; }
.merchant-coupon-link { display: inline-flex; align-items: center; color: #7950e8; font-size: 12px; font-weight: 650; white-space: nowrap; }
.merchant-coupon-link .ui-icon { width: 16px; height: 16px; }
@media (max-width: 560px) { .groups-page .group-row.mode-personal { padding: 18px; } }

/* MagicPath: membership, overview and scene controls */
.membership-plan { display: inline-flex; align-items: center; gap: 5px; border-radius: 20px; font-weight: 650; padding: 5px 10px; }
.membership-plan img { width: 15px; height: 15px; }
.membership-plan.plan-month { color: #5e70a3; background: #eef1fb; }
.membership-plan.plan-quarter { color: #8050b1; background: #f1eaff; }
.membership-plan.plan-year { color: #996a22; background: #fff2d7; }
.membership-plan.plan-trial { color: #977057; background: #f8efe4; }
.membership-plan img { filter: invert(39%) sepia(38%) saturate(907%) hue-rotate(228deg); }
.groups-page .user-avatar-wrap { display: flex; align-items: center; gap: 5px; padding: 4px 7px 4px 4px; background: #fff; border: 1px solid #e8e0f3; border-radius: 15px; box-shadow: 0 3px 12px #38265a0a; }
.groups-page .user-avatar-wrap::after { content: '⌄'; color: #8569b1; font-size: 14px; line-height: 1; }
.groups-page .public-header .user-avatar { width: 32px; height: 32px; border-radius: 11px; }
.today-card { background: linear-gradient(130deg,#f8f4ff,#e8dcfa); border: 1px solid #e7dcf7; box-shadow: 0 8px 24px rgba(105,64,157,.09); }
.today-overview-title { margin-bottom: 4px; }
.overview-members { display: flex; align-items: baseline; gap: 6px; padding: 0; background: transparent; color: #77698c; }
.overview-members span { font-size: 12px; }
.overview-members strong { font-size: 32px; color: #302340; line-height: 1.3; margin-left: 0; font-variant-numeric: tabular-nums; }
.overview-members small { font-size: 11px; }
.today-metrics { border-top: 1px solid #dcd0ee; padding-top: 10px; margin-top: 10px; }
.today-metrics a { min-height: 42px; gap: 1px; }
.today-metrics strong { font-size: 20px; }
.today-metrics span, .today-metrics small { font-size: 11px; }
.carousel-tabs { display: flex; gap: 5px; border: 0; background: #efebf7; border-radius: 12px; padding: 4px; }
.carousel-tabs .nav-item { flex: 1; }
.carousel-tabs .nav-link { text-align: center; border: 0; border-radius: 9px; color: #786c88; font-size: 13px; padding: 10px; }
.carousel-tabs .nav-link.active { color: #7149c5; background: #fff; font-weight: 650; box-shadow: 0 2px 8px #3323560d; }
.template-controls { display: grid; gap: 12px; padding-top: 12px; }
.template-delete-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid #eee8f5; border-radius: 10px; background: #faf8fd; }
.template-delete-row .form-select { min-height: 38px; }
.template-hint { color: #8f839e; font-size: 12px; overflow-wrap: anywhere; }
.template-save { justify-self: end; }
@media (max-width: 560px) { .today-metrics strong { font-size: 19px; } .today-card { padding: 17px 19px; } }

/* MagicPath group metrics and management */
.workspace-identity { padding: 6px 9px 6px 6px; border-radius: 14px; background: linear-gradient(135deg,#fff,#f5f0ff); border: 1px solid #eee7f7; }
.workspace-title { font-size: 15px; }
.groups-page .mode-personal { background: linear-gradient(135deg,#fff,#f4efff) !important; }
.group-total-label { margin-top: 15px; color: #8a7b9c; font-size: 11px; }
.group-total-number { color: #2f2540; font-size: 30px; line-height: 1.25; font-weight: 750; font-variant-numeric: tabular-nums; }
.group-total-number small { color: #8a7b9c; font-size: 11px; font-weight: 400; margin-left: 5px; }
.groups-page .mode-personal .group-summary { gap: 14px; }
.group-joined, .group-joined strong { color: #ad7d21 !important; }
.today-metrics { grid-template-columns: repeat(4,minmax(0,1fr)); }
.today-metrics a { padding-left: 8px; padding-right: 5px; }
.today-metrics a:last-child small { display: block; margin: 0; font-size: 9px; white-space: nowrap; }
.score-page .card, .ban-page .card { border: 1px solid #ebe5f2; border-radius: 17px; box-shadow: 0 6px 22px rgba(53,33,80,.035); }
.score-page .card h6 { color: #332744; font-size: 16px; font-weight: 700; }
.score-page .form-control, .score-page .form-select { background: #fbfafe; }
.ban-release-card, .ban-record-card { padding: 20px !important; }
.ban-page .management-section-title { margin: 0 0 14px; }
.ban-record-table .badge { font-weight: 550; }
@media(max-width: 560px) { .ban-record-card .table-responsive { overflow: visible; } .ban-record-table tbody tr { border: 1px solid #eee8f4; border-radius: 13px; background: #fcfbfe; padding: 8px 12px; } .today-metrics span { font-size: 10px; } .today-metrics strong { font-size: 17px; } }

/* Inline rule controls and keyword editors. */
.rule-settings { display:flex; flex-wrap:wrap; gap:12px; align-items:end; padding: 16px 0 20px 50px; border-bottom:1px solid var(--line); }
.rule-settings label { color:var(--muted); font-size:12px; }
.rule-settings input { width:100px; margin-top:5px; }
.rule-duration { min-width:112px; }
.rule-footnote { color:var(--muted); font-size:12px; margin:10px 0 0 50px; }
.inline-tag-editor { margin-top:18px; }
.inline-keyword-actions { display:flex; justify-content:space-between; gap:12px; align-items:center; }
.inline-keyword-actions .keyword-feedback { margin:8px 0; }
.inline-keyword-actions .btn { min-width:76px; }
.groups-page .group-summary { font-size:14px; gap:20px; }
.groups-page .group-summary strong { font-size:16px; }
@media (max-width: 500px) { .rule-settings { padding-left:0; } .rule-footnote { margin-left:0; } .groups-page .group-summary { gap:10px; flex-wrap:wrap; } }

.rule-settings { padding-top: 10px; padding-bottom: 12px; }
.rule-settings input { min-height: 36px; height: 36px; padding: 5px 10px; }
.rule-settings .btn { min-height: 36px; padding: 5px 12px; }
.rule-saved { margin: 8px 0 4px 50px; color: #21835e; font-size: 13px; font-weight: 600; }
.groups-page .group-summary-tiles { gap: 8px; }
.groups-page .group-summary-tiles > span { display: flex; flex-direction: column; gap: 4px; min-width: 90px; padding: 10px 14px; border: 1px solid #ebe5f5; border-radius: 10px; background: #f9f7fe; color: #766e86; font-size: 12px; }
.groups-page .group-summary-tiles strong { margin-left: 0; color: #392e4d; font-size: 18px; line-height: 1.2; }
.groups-page .group-summary-tiles > span:first-child { background: #f1eaff; border-color: #dfd2ff; color: #6c43cf; }
.groups-page .group-summary-tiles > span:first-child strong { color: #7950e8; }
@media (max-width: 500px) { .rule-saved { margin-left: 0; } .groups-page .group-summary-tiles > span { min-width: 76px; padding: 9px 10px; } }

/* 群组统计卡片：群人数以主色突出，数字仍由原有数据源提供。 */
.groups-page .group-summary-tiles { display:grid; grid-template-columns:1.25fr 1fr 1fr; gap:10px; width:min(100%, 450px); margin-top:20px; }
.groups-page .group-summary-tiles > .group-stat { min-width:0; display:flex; flex-direction:column; gap:12px; padding:15px 17px; background:#fcfbfe; border:1px solid #ece7f4; border-radius:12px; }
.groups-page .group-summary-tiles > .group-stat-primary { background:#f2edff; border-color:#ded0ff; }
.group-stat-label { display:flex; align-items:center; gap:8px; white-space:nowrap; color:#81778e; font-size:12px; font-weight:600; }
.group-stat-label img { width:23px; height:23px; padding:5px; border-radius:7px; background:#f0edf5; opacity:.75; }
.group-stat-primary .group-stat-label { color:#7044db; }
.group-stat-primary .group-stat-label img { background:#e3d6ff; opacity:1; }
.group-stat-value { display:flex; align-items:baseline; gap:4px; white-space:nowrap; }
.groups-page .group-summary-tiles .group-stat-value strong { color:#241d38; font-size:23px; font-weight:760; line-height:1.1; letter-spacing:-.04em; }
.groups-page .group-summary-tiles .group-stat-primary .group-stat-value strong { color:#7950e8; }
.group-stat-value small { color:#988fa4; font-size:11px; }
@media(max-width:500px) { .groups-page .group-summary-tiles { gap:6px; margin-top:16px; } .groups-page .group-summary-tiles > .group-stat { min-width:0; padding:12px 8px; } .group-stat-label { font-size:11px; gap:4px; } .group-stat-label img { width:19px; height:19px; padding:4px; } .groups-page .group-summary-tiles .group-stat-value strong { font-size:18px; } }

/* 轮播状态与列表细节 */
.overview-members strong { color: #7950e8; }
.carousel-actions { display: inline-block; }
.carousel-status { min-width: 84px; border: 1px solid #d9caff; background: #f4efff; color: #7044d6; font-weight: 650; }
.carousel-status.is-disabled { border-color: #e2dfea; background: #f7f6f9; color: #716b7b; }
.carousel-actions .dropdown-menu { min-width: 110px; }
.merchant-name { display:inline-block; max-width:180px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; vertical-align:middle; border:0; padding:0; background:transparent; color:var(--blue); text-align:left; cursor:pointer; }
.merchant-name-dialog { max-width:min(90vw, 420px); border:1px solid #e3d9f3; border-radius:14px; padding:24px; box-shadow:0 16px 60px #21183533; }
.merchant-name-dialog::backdrop { background:#1f183b80; }
.merchant-name-dialog h3 { font-size:18px; }
.merchant-name-dialog p { overflow-wrap:anywhere; }
.groups-page .group-summary-tiles > .group-stat { gap:7px; padding:10px 17px; }
.groups-page .customer-pill { min-height:30px; padding:5px 10px; border-radius:6px; background:#eef9f4; border-color:#d5eee1; }
.groups-page .customer-pill .customer-dot { background:#31a46c; }
.groups-page .customer-pill .link { color:#23865a; }
@media(max-width:500px) { .groups-page .group-summary-tiles > .group-stat { padding:9px 8px; } .merchant-name { max-width:min(55vw, 180px); } }

@media(min-width:768px) { .carousel-list-wrap { overflow:visible; } }
