@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=DM+Sans:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;600;700;800&family=Noto+Serif+SC:wght@500;600;700;800&display=swap');

:root {
  --canvas: #f3f6f2;
  --surface: #ffffff;
  --surface-soft: #f7faf7;
  --surface-tint: #edf5f0;
  --ink: #172420;
  --ink-soft: #36514a;
  --muted: #71817a;
  --line: #dce6df;
  --line-strong: #c7d6ce;
  --green: #0d7569;
  --green-dark: #07564f;
  --green-wash: #e3f2ec;
  --lime: #dfe975;
  --coral: #c9634e;
  --coral-wash: #fff0ec;
  --shadow: 0 22px 60px rgba(24, 48, 41, 0.08);
  --shadow-small: 0 8px 22px rgba(24, 48, 41, 0.06);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(13, 117, 105, 0.035) 1px, transparent 1px) 0 0 / 32px 32px,
    var(--canvas);
  font-family: "DM Sans", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
}
body.has-open-modal { overflow: hidden; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.56; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid rgba(223, 233, 117, 0.98); outline-offset: 3px; }

.customer-page {
  width: min(1320px, calc(100% - 56px));
  min-height: 100vh;
  margin: 0 auto;
  border-top: 4px solid var(--green);
}
.customer-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  border-bottom: 1px solid var(--line);
}
.customer-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); font-size: 16px; font-weight: 800; text-decoration: none; }
.customer-brand b { color: var(--muted); font-size: 12px; font-weight: 600; }
.brand-mark { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 3px; width: 30px; height: 30px; padding: 6px; background: var(--ink); border-radius: 7px; }
.brand-mark i { display: block; background: var(--lime); border-radius: 2px; }
.brand-mark i:nth-child(1) { height: 10px; }
.brand-mark i:nth-child(2) { height: 17px; background: #8ed4bd; }
.brand-mark i:nth-child(3) { height: 7px; background: #e08a70; }
.topbar-status, .live-label { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 0.04em; }
.topbar-status i, .live-label i, .footer-mark { display: inline-block; width: 7px; height: 7px; background: var(--green); border-radius: 50%; }

.customer-login-view { display: grid; grid-template-columns: minmax(0, 0.94fr) minmax(420px, 1.06fr); align-items: stretch; min-height: calc(100vh - 80px); gap: clamp(48px, 8vw, 130px); padding: 72px 0 96px; }
.login-column { align-self: center; max-width: 470px; padding-bottom: 12px; }
.eyebrow { margin: 0 0 10px; color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: 0.15em; text-transform: uppercase; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2 { color: var(--ink); letter-spacing: -0.03em; }
h1 { max-width: 520px; margin-bottom: 16px; font-size: clamp(42px, 5.2vw, 68px); line-height: 1.02; }
h2 { margin-bottom: 0; font-size: 30px; line-height: 1.14; }
.intro-copy { max-width: 390px; margin-bottom: 36px; color: var(--muted); font-size: 15px; }
.auth-mode-switch { display: inline-flex; gap: 4px; margin-bottom: 24px; padding: 4px; background: #e7eeea; border: 1px solid var(--line); border-radius: 8px; }
.auth-mode-switch button { min-width: 84px; min-height: 36px; padding: 7px 15px; color: var(--muted); background: transparent; border: 0; border-radius: 5px; font-size: 12px; font-weight: 800; transition: color 180ms ease, background 180ms ease, box-shadow 180ms ease; }
.auth-mode-switch button:hover { color: var(--green-dark); }
.auth-mode-switch button.is-active { color: var(--ink); background: var(--surface); box-shadow: 0 2px 7px rgba(24, 48, 41, 0.08); }
.customer-form { display: grid; max-width: 410px; gap: 9px; }
.customer-form label { margin-top: 7px; color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.customer-form input { width: 100%; min-height: 50px; padding: 12px 14px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px; }
.customer-form input::placeholder { color: #9aa9a1; }
.customer-form input:focus { border-color: var(--green); background: #fcfffd; box-shadow: 0 0 0 4px rgba(13, 117, 105, 0.11); outline: none; }
#customer-invite-code { letter-spacing: 0.08em; text-transform: uppercase; }
.form-error { margin: 7px 0 0; color: var(--coral); font-size: 12px; font-weight: 600; }

.customer-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 9px 16px; border: 1px solid transparent; border-radius: 6px; font-size: 12px; font-weight: 800; transition: color 180ms ease, background 180ms ease, border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease; }
.customer-button:hover:not(:disabled) { transform: translateY(-1px); }
.customer-button-primary { color: #fff; background: var(--green); border-color: var(--green); box-shadow: 0 6px 14px rgba(13, 117, 105, 0.15); }
.customer-button-primary:hover:not(:disabled) { background: var(--green-dark); border-color: var(--green-dark); box-shadow: 0 8px 17px rgba(13, 117, 105, 0.2); }
.customer-button-quiet { color: var(--green-dark); background: transparent; border-color: var(--line-strong); }
.customer-button-quiet:hover:not(:disabled) { background: var(--green-wash); border-color: #9dc7b8; }
.customer-button-compact { min-height: 36px; padding: 7px 12px; }
.customer-button-danger { min-height: 38px; padding: 7px 12px; color: var(--coral); background: transparent; border-color: #e4b8ae; }
.customer-button-danger:hover:not(:disabled) { background: var(--coral-wash); border-color: var(--coral); }
.login-note { max-width: 410px; margin: 18px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }

.login-aside { position: relative; align-self: center; min-height: 440px; padding: 38px 42px; overflow: hidden; color: #f6fbf7; background: var(--ink); border-radius: 8px; box-shadow: var(--shadow); isolation: isolate; }
.login-aside::after { position: absolute; z-index: -1; width: 320px; height: 320px; margin: 100px 0 0 35%; border: 1px solid rgba(223, 233, 117, 0.22); border-radius: 50%; box-shadow: 0 0 0 42px rgba(223, 233, 117, 0.04), 0 0 0 84px rgba(223, 233, 117, 0.025); content: ""; }
.login-aside .eyebrow { color: var(--lime); }
.aside-index { margin-bottom: 44px; color: var(--lime); font-size: 12px; font-weight: 800; }
.aside-index span { margin: 0 8px; color: #657871; }
.aside-rule { width: 100%; height: 1px; margin-bottom: 30px; background: #354942; }
.login-aside h2 { max-width: 320px; margin-bottom: 42px; color: #f6fbf7; font-size: 29px; }
.aside-steps { display: grid; gap: 20px; }
.aside-step { display: grid; grid-template-columns: 38px 1fr; column-gap: 10px; align-items: baseline; color: #7e958c; }
.aside-step span { grid-row: span 2; color: #597067; font-size: 12px; font-weight: 800; }
.aside-step strong { font-size: 13px; }
.aside-step small { font-size: 11px; }
.aside-step.is-current { color: #f6fbf7; }
.aside-step.is-current span { color: var(--lime); }

.customer-workspace { padding: 38px 0 80px; }
.workspace-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 0 26px; border-bottom: 1px solid var(--line); }
.workspace-header h1 { margin-bottom: 0; font-size: clamp(36px, 4.2vw, 52px); }
.workspace-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.identity-chip { max-width: 220px; overflow: hidden; color: var(--ink-soft); font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.subscription-chip, .service-state-badge { display: inline-flex; align-items: center; min-height: 28px; padding: 5px 9px; color: var(--muted); background: #edf2ee; border: 1px solid var(--line); border-radius: 5px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.subscription-chip.is-active, .service-state-badge.is-active { color: var(--green-dark); background: var(--green-wash); border-color: #a8d0bf; }
.subscription-chip.is-expired, .service-state-badge.is-expired { color: #9b4435; background: var(--coral-wash); border-color: #e2b4a9; }
.workspace-layout { display: grid; grid-template-columns: 198px minmax(0, 1fr); gap: 48px; padding-top: 42px; }
.workspace-rail { position: relative; padding-top: 5px; }
.rail-line { position: absolute; top: 22px; bottom: 24px; left: 12px; width: 1px; background: var(--line-strong); }
.rail-step { position: relative; display: grid; grid-template-columns: 26px 1fr; column-gap: 11px; min-height: 78px; color: #91a099; }
.rail-step span { z-index: 1; display: grid; place-items: center; width: 25px; height: 25px; color: #80918a; background: var(--canvas); border: 1px solid var(--line-strong); border-radius: 50%; font-size: 10px; font-weight: 800; }
.rail-step strong { padding-top: 1px; font-size: 13px; }
.rail-step small { grid-column: 2; color: var(--muted); font-size: 11px; }
.rail-step.is-done, .rail-step.is-current { color: var(--ink); }
.rail-step.is-done span { color: white; background: var(--green); border-color: var(--green); }
.rail-step.is-current span { color: var(--ink); background: var(--lime); border-color: var(--lime); }

.qr-panel { min-height: 490px; padding: 30px 34px 0; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--green); border-radius: 8px; box-shadow: var(--shadow-small); }
.subscription-panel { min-height: 450px; }
.dashboard-panel { min-height: 560px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-bottom: 21px; border-bottom: 1px solid var(--line); }
.panel-heading .eyebrow { margin-bottom: 6px; }
.panel-heading h2 { font-size: 25px; }
.panel-footer { display: flex; align-items: center; gap: 8px; min-height: 54px; margin-top: 24px; color: var(--muted); border-top: 1px solid var(--line); font-size: 11px; }
.footer-mark { width: 6px; height: 6px; background: #99aca3; }

.subscription-lock-content { display: grid; grid-template-columns: 88px minmax(0, 1fr); align-items: start; gap: 28px; max-width: 620px; padding: 46px 0 28px; }
.subscription-clock { position: relative; display: block; width: 76px; height: 76px; border: 6px solid var(--green-wash); border-radius: 50%; }
.subscription-clock::before, .subscription-clock::after { position: absolute; top: 25px; left: 32px; width: 3px; background: var(--green); border-radius: 3px; content: ""; transform-origin: 50% 100%; }
.subscription-clock::before { height: 22px; }
.subscription-clock::after { height: 17px; transform: rotate(125deg); }
.subscription-clock i { position: absolute; top: 31px; left: 31px; width: 6px; height: 6px; background: var(--green); border-radius: 50%; }
.subscription-lock-content h3 { margin: 0 0 7px; font-size: 21px; }
.subscription-lock-content p { margin-bottom: 22px; color: var(--muted); font-size: 13px; }
.subscription-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 0 0 22px; background: var(--line); border: 1px solid var(--line); }
.subscription-summary div { min-width: 0; padding: 11px 12px; background: var(--surface-soft); }
.subscription-summary dt { margin-bottom: 4px; color: var(--muted); font-size: 10px; font-weight: 700; }
.subscription-summary dd { margin: 0; overflow: hidden; color: var(--ink); font-size: 12px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }

.qr-content { display: flex; align-items: center; gap: 46px; padding: 40px 0; }
.qr-frame { display: grid; width: 250px; height: 250px; flex: 0 0 250px; place-items: center; background: #fbfdfb; border: 1px solid var(--line-strong); border-radius: 6px; }
.qr-placeholder { display: grid; position: relative; place-items: center; align-content: center; gap: 12px; width: 194px; height: 194px; color: var(--muted); font-size: 11px; }
.qr-placeholder::before { width: 76px; height: 76px; border: 3px solid var(--ink); background: repeating-linear-gradient(45deg, var(--ink) 0 4px, transparent 4px 8px); content: ""; }
.placeholder-corner { position: absolute; width: 18px; height: 18px; border-color: var(--green); border-style: solid; }
.corner-top-left { top: 0; left: 0; border-width: 2px 0 0 2px; }
.corner-top-right { top: 0; right: 0; border-width: 2px 2px 0 0; }
.corner-bottom-left { bottom: 0; left: 0; border-width: 0 0 2px 2px; }
.corner-bottom-right { right: 0; bottom: 0; border-width: 0 2px 2px 0; }
.placeholder-mark { display: none; }
.qq-qr { display: block; width: 224px; height: 224px; object-fit: contain; }
.qr-copy { display: grid; align-content: center; gap: 10px; max-width: 300px; }
.qr-state { color: var(--ink); font-size: 17px; font-weight: 800; }
.qr-state.is-error { color: var(--coral); }
.qr-expiry { margin: 0 0 8px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.qr-copy .customer-button { width: fit-content; min-width: 170px; }

.subject-panel { padding: 25px 0 6px; border-top: 1px solid var(--line); }
.subject-panel-heading, .account-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.subject-panel-heading h3, .account-section-heading h4 { margin: 0; font-size: 17px; }
.subject-panel-copy { margin: 10px 0 18px; color: var(--muted); font-size: 12px; }
.subject-panel-state, .plugin-version { color: var(--muted); font-size: 11px; font-weight: 700; }
.qq-subject-list { display: grid; gap: 8px; }
.subject-choice { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 6px; }
.subject-choice-text { display: grid; gap: 4px; min-width: 0; }
.subject-choice-text strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.subject-choice-text small { color: var(--muted); font-size: 11px; }
.subject-choice-button { min-height: 36px; }

.bot-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 24px 0 18px; }
.bot-toolbar p { margin: 0; color: var(--muted); font-size: 12px; }
.bot-toolbar-actions, .bot-create-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.qq-bot-list { display: grid; gap: 8px; }
.bot-row { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 13px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 6px; }
.bot-avatar, .bot-avatar-fallback { display: grid; width: 50px; height: 50px; place-items: center; overflow: hidden; color: var(--green-dark); background: var(--green-wash); border-radius: 6px; font-size: 17px; font-weight: 800; }
.bot-avatar img { width: 100%; height: 100%; object-fit: cover; }
.bot-row-copy { display: grid; gap: 4px; min-width: 0; }
.bot-row-copy strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.bot-row-copy small { color: var(--muted); font-size: 11px; }
.bot-select-button { min-height: 36px; }
.bot-next-action { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; padding: 14px; background: var(--ink); border-radius: 6px; }
.bot-next-copy { display: grid; gap: 3px; color: #9bb2a8; }
.bot-next-copy strong { color: white; font-size: 13px; }
.bot-next-copy small { color: #7e968b; font-size: 11px; }
.bot-create-form, .direct-bot-form { display: grid; gap: 10px; padding: 24px 0 8px; }
.bot-create-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 5px; }
.bot-create-heading h3 { margin: 0; font-size: 18px; }
.bot-create-form > label, .direct-bot-form > label { color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.bot-create-form input, .bot-create-form textarea, .direct-bot-form input { width: 100%; padding: 10px 12px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px; }
.bot-create-form input { min-height: 44px; }
.bot-create-form textarea { resize: vertical; }
.field-with-count { position: relative; }
.field-with-count span { position: absolute; right: 11px; bottom: 9px; color: var(--muted); font-size: 10px; }
.avatar-fieldset { margin: 0 0 8px; padding: 0; border: 0; }
.avatar-fieldset legend { margin-bottom: 10px; color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.avatar-options { display: grid; grid-template-columns: repeat(5, 54px); gap: 9px; }
.avatar-option { position: relative; display: block; width: 54px; height: 54px; cursor: pointer; }
.avatar-option input { position: absolute; opacity: 0; }
.avatar-option img { display: block; width: 54px; height: 54px; object-fit: cover; border: 2px solid transparent; border-radius: 6px; }
.avatar-option input:checked + img { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-wash); }

.dashboard-heading { align-items: center; }
.dashboard-bot-title { display: flex; align-items: center; gap: 13px; min-width: 0; }
.dashboard-bot-avatar { position: relative; display: grid; width: 50px; height: 50px; flex: 0 0 50px; place-items: center; overflow: hidden; color: var(--green-dark); background: var(--green-wash); border: 1px solid #b6d7c9; border-radius: 7px; font-size: 16px; font-weight: 800; }
.dashboard-bot-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gateway-state-badge { display: inline-flex; align-items: center; gap: 7px; min-height: 30px; padding: 6px 9px; color: var(--muted); background: #eef3ef; border: 1px solid var(--line); border-radius: 5px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.gateway-state-badge i { width: 7px; height: 7px; background: #9aaa9f; border-radius: 50%; }
.gateway-state-badge.is-online { color: var(--green-dark); background: var(--green-wash); border-color: #a8d0bf; }
.gateway-state-badge.is-online i { background: var(--green); box-shadow: 0 0 0 4px rgba(13, 117, 105, 0.11); }
.gateway-state-badge.is-connecting { color: #816b18; background: #fffbe1; border-color: #e6dc9a; }
.gateway-state-badge.is-connecting i { background: #c8a927; }
.gateway-state-badge.is-error { color: #9b4435; background: var(--coral-wash); border-color: #e2b4a9; }
.gateway-state-badge.is-error i { background: var(--coral); }
.dashboard-content { padding: 27px 0 4px; }
.runtime-section, .plugin-section { padding: 0 0 30px; }
.plugin-section { padding-top: 28px; border-top: 1px solid var(--line); }
.section-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 17px; }
.section-heading-row .eyebrow { margin-bottom: 5px; }
.section-heading-row h3 { margin: 0; font-size: 19px; }
.section-heading-row .customer-button { min-height: 38px; }
.runtime-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 0; overflow: hidden; background: var(--line); border: 1px solid var(--line); border-radius: 6px; }
.runtime-metrics div { min-width: 0; min-height: 78px; padding: 13px 14px; background: var(--surface-soft); }
.runtime-metrics .runtime-metric-wide { grid-column: span 2; }
.runtime-metrics dt { margin-bottom: 5px; color: var(--muted); font-size: 10px; font-weight: 700; }
.runtime-metrics dd { min-width: 0; margin: 0; overflow: hidden; color: var(--ink); font-size: 13px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.gateway-note { margin: 12px 0 0; color: var(--muted); font-size: 11px; }
.gateway-error { margin-top: 8px; }
.plugin-heading-row { align-items: center; }
.lanzou-plugin-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.lanzou-plugin-title-row h3 { flex: 0 0 auto; white-space: nowrap; }
.plugin-description { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.plugin-form { display: grid; gap: 10px; }
.plugin-control-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px 0 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.plugin-control-row strong { display: block; margin-bottom: 3px; font-size: 13px; }
.plugin-control-row p { max-width: 600px; margin: 0; color: var(--muted); font-size: 11px; }
.switch-control { display: inline-grid; grid-template-columns: 40px auto; min-height: 40px; flex: 0 0 auto; align-items: center; gap: 9px; margin: 0; padding: 0; color: inherit; background: transparent; border: 0; font: inherit; text-align: left; cursor: pointer; }
.switch-control input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch-state { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.switch-control span { position: relative; width: 40px; height: 23px; background: #a8b5ae; border-radius: 999px; transition: background 180ms ease; }
.switch-control span::after { position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; background: white; border-radius: 50%; box-shadow: 0 1px 3px rgba(24, 48, 41, 0.24); content: ""; transition: transform 180ms ease; }
.switch-control input:checked + span { background: var(--green); }
.switch-control input:checked + span::after { transform: translateX(17px); }
.switch-control input:focus-visible + span { outline: 3px solid rgba(223, 233, 117, 0.98); outline-offset: 3px; }
.switch-control[aria-checked="true"] span { background: var(--green); }
.switch-control[aria-checked="true"] span::after { transform: translateX(17px); }
.switch-control:focus-visible span { outline: 3px solid rgba(223, 233, 117, 0.98); outline-offset: 3px; }
.switch-control:disabled { cursor: not-allowed; opacity: 0.55; }
.switch-control b { color: var(--ink-soft); font-size: 11px; white-space: nowrap; }
.plugin-form > label { margin-top: 8px; color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.plugin-form textarea { min-height: 100px; padding: 11px 12px; }
.plugin-form-footer { display: flex; min-height: 45px; align-items: center; justify-content: space-between; gap: 14px; margin-top: 6px; }
.plugin-save-state { margin: 0; color: var(--muted); font-size: 11px; font-weight: 700; }
.plugin-save-state.is-success { color: var(--green); }
.plugin-save-state.is-error { color: var(--coral); }
.lanzou-config-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; padding-top: 4px; }
.lanzou-config-grid label, .lanzou-account-form-grid label { display: grid; gap: 5px; color: var(--muted); font-size: 10px; font-weight: 800; }
.lanzou-config-grid input { min-height: 38px; padding: 8px 10px; font-size: 12px; }
.lanzou-config-grid select { width: 100%; min-width: 0; min-height: 42px; padding: 9px 37px 9px 11px; color: var(--ink); background-color: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px; font-family: inherit; font-size: 12px; font-weight: 600; line-height: 1.35; appearance: none; cursor: pointer; transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease; }
.lanzou-config-grid select:hover { border-color: #9bb9aa; }
.lanzou-config-grid select:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(13, 117, 105, 0.11); outline: none; }
.lanzou-config-grid select:disabled { color: var(--muted); background-color: var(--surface-soft); cursor: not-allowed; opacity: 0.7; }
.group-moderation-mode-field { position: relative; }
.group-moderation-mode-field::after { position: absolute; right: 14px; bottom: 15px; width: 0; height: 0; border-top: 5px solid var(--muted); border-right: 4px solid transparent; border-left: 4px solid transparent; pointer-events: none; content: ""; }
.group-moderation-mode-field:focus-within::after { border-top-color: var(--green); }
.lanzou-config-grid textarea { min-height: 70px; padding: 8px 10px; font-size: 12px; resize: vertical; }
.lanzou-config-grid label.switch-field { display: flex; align-items: center; justify-content: space-between; min-height: 38px; padding: 8px 10px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px; }
.lanzou-config-grid label.switch-field input[type="checkbox"] { width: 18px; min-height: 18px; accent-color: var(--green); }
.group-management-config-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.group-management-toggle-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.group-management-toggle-heading > div { min-width: 0; }
.group-management-toggle-heading strong { display: block; margin-bottom: 4px; font-size: 13px; }
.group-management-toggle-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.group-management-toggle-heading .switch-field { display: flex; flex: 0 0 auto; min-width: 220px; align-items: center; justify-content: space-between; gap: 12px; min-height: 38px; padding: 8px 10px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px; font-size: 10px; font-weight: 800; }
.group-management-toggle-heading .switch-field input[type="checkbox"] { width: 18px; min-height: 18px; accent-color: var(--green); }
.group-management-toggle-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 10px; }
.group-management-toggle-card { display: grid; gap: 8px; padding: 12px; background: var(--surface-tint); border: 1px solid var(--line); border-radius: 6px; }
.group-management-toggle-card strong { color: var(--ink); font-size: 12px; }
.group-management-toggle-card label { min-width: 0; }
.lanzou-account-section { margin-top: 28px; padding-top: 26px; border-top: 1px solid var(--line); }
.account-section-heading .eyebrow { margin-bottom: 4px; }
.account-section-heading .customer-button { min-height: 38px; }
.lanzou-account-summary { margin-top: 14px; padding: 10px 12px; color: var(--muted); background: var(--surface-tint); border-left: 3px solid #a7b9af; font-size: 11px; font-weight: 700; }
.lanzou-account-summary.is-qualified { color: var(--green-dark); border-left-color: var(--green); }
.lanzou-account-summary.is-error { color: #9b4435; background: var(--coral-wash); border-left-color: var(--coral); }
.lanzou-account-form { display: grid; gap: 10px; margin-top: 16px; }
.lanzou-account-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.lanzou-account-form-grid input { min-height: 40px; padding: 8px 10px; font-size: 12px; }
.lanzou-account-list { margin-top: 18px; border-top: 1px solid var(--line); }
.lanzou-account-row { display: grid; grid-template-columns: minmax(130px, 0.7fr) minmax(240px, 1.4fr) auto; min-height: 70px; align-items: center; gap: 17px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.lanzou-account-identity { display: grid; gap: 3px; }
.lanzou-account-identity strong { font-size: 13px; }
.lanzou-account-identity span { color: var(--muted); font-size: 10px; font-weight: 700; }
.lanzou-account-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; margin: 0; }
.lanzou-account-metrics div { min-width: 0; }
.lanzou-account-metrics dt { margin-bottom: 3px; color: var(--muted); font-size: 9px; font-weight: 800; }
.lanzou-account-metrics dd { min-width: 0; margin: 0; overflow: hidden; color: var(--ink); font-size: 11px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.lanzou-account-empty { margin: 0; padding: 17px 0; color: var(--muted); font-size: 11px; }

.customer-modal-root { position: fixed; z-index: 50; inset: 0; display: grid; place-items: center; padding: 24px; }
.customer-modal-mask { position: absolute; inset: 0; background: rgba(23, 36, 32, 0.68); }
.customer-modal { position: relative; display: flex; width: min(560px, 100%); max-height: min(720px, calc(100vh - 48px)); flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--green); border-radius: 8px; box-shadow: 0 28px 80px rgba(23, 36, 32, 0.3); }
.customer-modal-header { display: flex; align-items: start; justify-content: space-between; gap: 20px; padding: 24px 26px 20px; border-bottom: 1px solid var(--line); }
.customer-modal-header .eyebrow { margin-bottom: 6px; }
.customer-modal-header h2 { font-size: 24px; }
.modal-close-button { display: grid; width: 40px; height: 40px; flex: 0 0 40px; place-items: center; padding: 0; color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: 6px; font-size: 25px; line-height: 1; }
.modal-close-button:hover { color: var(--ink); background: var(--surface-tint); border-color: var(--line); }
.customer-modal-body { min-height: 220px; padding: 24px 26px; overflow-y: auto; }
.privacy-modal-loading { display: grid; min-height: 180px; place-items: center; align-content: center; gap: 13px; color: var(--muted); font-size: 12px; }
.privacy-loading-mark { width: 28px; height: 28px; border: 3px solid var(--green-wash); border-top-color: var(--green); border-radius: 50%; animation: privacy-spin 800ms linear infinite; }
@keyframes privacy-spin { to { transform: rotate(360deg); } }
.privacy-modal-copy { margin-bottom: 20px; color: var(--muted); font-size: 13px; }
.privacy-summary { margin: 0; border-top: 1px solid var(--line); }
.privacy-summary div { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 17px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.privacy-summary dt { color: var(--muted); font-size: 11px; font-weight: 700; }
.privacy-summary dd { min-width: 0; margin: 0; overflow-wrap: anywhere; font-size: 12px; font-weight: 800; }
.privacy-summary dd.is-complete { color: var(--green); }
.privacy-modal .form-error { margin-top: 15px; }
.redeem-modal-body, .rebind-modal-body { display: grid; gap: 10px; }
.redeem-current-state { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 3px 13px; margin-bottom: 12px; padding: 13px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.redeem-current-state span { grid-row: span 2; color: var(--muted); font-size: 11px; font-weight: 700; }
.redeem-current-state strong { color: var(--green-dark); font-size: 13px; }
.redeem-current-state small { color: var(--muted); font-size: 11px; }
.redeem-modal-body label, .rebind-modal-body label { color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.rebind-modal-copy { margin: 0 0 9px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.rebind-modal-body input, #redeem-code { min-height: 48px; padding: 11px 13px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px; font-family: Consolas, "Courier New", monospace; font-size: 14px; }
#redeem-code { text-transform: uppercase; }
.rebind-modal-body input:focus, #redeem-code:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(13, 117, 105, 0.11); outline: none; }
.customer-modal-footer { display: flex; justify-content: flex-end; gap: 9px; padding: 17px 26px 20px; border-top: 1px solid var(--line); }

@media (max-width: 900px) {
  .customer-page { width: min(100% - 36px, 720px); }
  .customer-login-view { grid-template-columns: 1fr; gap: 38px; padding-top: 52px; }
  .login-column { max-width: 580px; }
  .login-aside { min-height: auto; padding: 30px 32px; }
  .workspace-layout { grid-template-columns: 1fr; gap: 26px; padding-top: 30px; }
  .workspace-rail { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
  .rail-line { top: 17px; right: 12%; bottom: auto; left: 12%; width: auto; height: 1px; }
  .rail-step { grid-template-columns: 25px 1fr; min-height: 64px; }
  .lanzou-config-grid, .lanzou-account-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .customer-page { width: calc(100% - 24px); }
  .customer-topbar { min-height: 68px; }
  .customer-brand b { display: none; }
  .topbar-status { font-size: 10px; }
  .customer-login-view { min-height: auto; padding: 48px 0 50px; }
  h1 { font-size: 43px; }
  .login-aside { padding: 26px 22px; }
  .workspace-header { align-items: flex-start; flex-direction: column; }
  .workspace-actions { width: 100%; justify-content: flex-start; }
  .identity-chip { margin-right: auto; }
  .subscription-chip { order: 3; width: 100%; justify-content: center; }
  .workspace-rail { gap: 3px; }
  .rail-step { column-gap: 6px; }
  .rail-step strong, .rail-step small { font-size: 10px; }
  .qr-panel { padding: 24px 16px 0; }
  .panel-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .qr-content { flex-direction: column; align-items: stretch; gap: 26px; padding: 28px 0; }
  .qr-frame { align-self: center; width: 250px; height: 250px; }
  .qr-copy { max-width: none; }
  .qr-copy .customer-button { width: 100%; }
  .subscription-lock-content { grid-template-columns: 1fr; gap: 20px; padding-top: 30px; }
  .subscription-summary { grid-template-columns: 1fr; }
  .bot-toolbar, .section-heading-row { align-items: stretch; flex-direction: column; }
  .bot-toolbar-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bot-toolbar-actions .customer-button, .section-heading-row .customer-button { width: 100%; }
  .bot-row { grid-template-columns: 46px minmax(0, 1fr); gap: 11px; }
  .bot-avatar, .bot-avatar-fallback { width: 44px; height: 44px; }
  .bot-select-button { grid-column: 1 / -1; width: 100%; }
  .bot-next-action { align-items: stretch; flex-direction: column; }
  .bot-next-action .customer-button { width: 100%; }
  .dashboard-heading { align-items: flex-start; }
  .gateway-state-badge { align-self: flex-start; }
  .runtime-metrics { grid-template-columns: 1fr 1fr; }
  .runtime-metrics .runtime-metric-wide { grid-column: 1 / -1; }
  .plugin-control-row { align-items: flex-start; flex-direction: column; gap: 10px; }
  .plugin-form-footer { align-items: stretch; flex-direction: column; }
  .plugin-form-footer .customer-button { width: 100%; }
  .lanzou-config-grid, .lanzou-account-form-grid { grid-template-columns: 1fr; }
  .account-section-heading { align-items: stretch; flex-direction: column; }
  .account-section-heading .customer-button { width: 100%; }
  .lanzou-account-row { grid-template-columns: 1fr; gap: 11px; padding: 15px 0; }
  .lanzou-account-remove { width: 100%; }
  .avatar-options { grid-template-columns: repeat(5, minmax(44px, 1fr)); gap: 6px; }
  .avatar-option, .avatar-option img { width: 100%; height: auto; aspect-ratio: 1; }
  .bot-create-actions, .customer-modal-footer { display: grid; grid-template-columns: 1fr 1fr; }
  .customer-modal-root { align-items: end; padding: 12px; }
  .customer-modal { max-height: calc(100vh - 24px); }
  .customer-modal-header, .customer-modal-body { padding-right: 20px; padding-left: 20px; }
  .customer-modal-footer { padding-right: 20px; padding-left: 20px; }
  .privacy-summary div { grid-template-columns: 88px minmax(0, 1fr); gap: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .privacy-loading-mark { border-right-color: var(--green); animation: none; }
}

/* Customer workspace: paper-like dashboard layout inspired by the local reference. */
.is-workspace {
  --canvas: #f5f2ec;
  --surface: #fbfaf7;
  --surface-soft: #f0eee8;
  --surface-tint: #e9eee8;
  --ink: #1f2522;
  --ink-soft: #555e58;
  --muted: #7a817b;
  --line: #deded5;
  --line-strong: #c9cbc2;
  --green: #728d73;
  --green-dark: #536b57;
  --green-wash: #e2ebe1;
  --coral: #da624b;
  --coral-wash: #f4ded8;
  --lime: #f5be62;
}
.is-workspace body { background: var(--canvas); }
.is-workspace .customer-page {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  border-top: 0;
}
.is-workspace .customer-topbar { display: none; }
.is-workspace .customer-workspace {
  min-height: 100vh;
  padding: 0;
  background: var(--canvas);
}
.workspace-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  height: 100vh;
  min-height: 0;
  overflow: hidden;
}
.workspace-sidebar {
  display: flex;
  height: 100vh;
  min-height: 0;
  flex-direction: column;
  padding: 27px 17px 20px;
  background: #f0eee8;
  border-right: 1px solid var(--line);
  overflow-y: auto;
}
.workspace-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 12px 30px;
  color: var(--ink);
  text-decoration: none;
}
.workspace-brand .brand-mark {
  width: 34px;
  height: 36px;
  flex: 0 0 34px;
  border-radius: 3px 8px 3px 8px;
  transform: rotate(-8deg);
}
.workspace-brand-copy { display: grid; gap: 2px; }
.workspace-brand-copy strong {
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 20px;
  letter-spacing: .04em;
}
.workspace-brand-copy small,
.sidebar-label,
.workspace-sidebar-heading {
  color: #9a9f99;
  font-family: Consolas, "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.workspace-switcher { padding: 0 11px 23px; }
.workspace-space {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 43px;
  margin-top: 8px;
  padding: 0 11px;
  background: rgba(255,255,255,.45);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
}
.workspace-space i {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  background: #74a877;
  border-radius: 50%;
  box-shadow: 0 0 0 3px #dfebdd;
}
.workspace-space span { margin-left: auto; color: #8c938d; }
.workspace-nav { display: flex; flex-direction: column; gap: 4px; }
.workspace-nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 42px;
  padding: 0 11px;
  color: #717872;
  border-radius: 8px;
  font-size: 13px;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}
.workspace-nav-item:hover { color: var(--ink); background: #e6e4dd; }
.workspace-nav-item:active { transform: translateY(1px); }
.workspace-nav-item.is-active { color: #fff; background: var(--ink); box-shadow: 0 7px 15px rgba(31,37,34,.12); }
.workspace-nav-icon {
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  color: #9aa29b;
  font-family: Consolas, monospace;
  font-size: 9px;
  font-weight: 700;
}
.workspace-nav-item.is-active .workspace-nav-icon { color: #f5be62; }
.workspace-sidebar-divider { height: 1px; margin: 25px 11px 22px; background: var(--line); }
.workspace-sidebar-heading { display: block; padding: 0 11px 9px; }
.workspace-nav-compact .workspace-nav-item { min-height: 39px; }
.workspace-sidebar-footer { margin-top: auto; }
.workspace-plan-card {
  position: relative;
  margin: 20px 6px 14px;
  padding: 15px 15px 13px;
  color: #fff;
  background: var(--ink);
  border-radius: 10px;
}
.workspace-plan-card > div { display: flex; justify-content: space-between; color: #bfc9bd; font-size: 11px; }
.workspace-plan-card > i { position: absolute; top: 14px; right: 15px; color: #f5be62; font-style: normal; }
.workspace-plan-card strong { display: block; margin: 15px 0 10px; font-family: Georgia, "Noto Serif SC", serif; font-size: 21px; }
.workspace-plan-card small { display: block; margin-top: 9px; color: #99a49a; font-size: 10px; }
.workspace-plan-line { height: 4px; overflow: hidden; background: #4e5750; border-radius: 4px; }
.workspace-plan-line span { display: block; width: 72%; height: 100%; background: var(--coral); border-radius: 4px; }
.workspace-profile {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 16px 7px 0;
  color: var(--ink);
  text-align: left;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
}
.workspace-avatar { display: grid; width: 31px; height: 31px; place-items: center; color: var(--ink); background: #e1b4a4; border-radius: 50%; font-family: Consolas, monospace; font-size: 10px; }
.workspace-profile > span:nth-child(2) { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.workspace-profile strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.workspace-profile small { color: #959c96; font-size: 10px; }
.workspace-profile b { margin-left: auto; color: #9aa29b; letter-spacing: 2px; }
.workspace-main {
  min-width: 0;
  height: 100vh;
  padding: 0 42px 64px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--canvas);
}
.workspace-header { height: 78px; padding: 0; border-bottom: 1px solid var(--line); }
.workspace-breadcrumbs { display: flex; align-items: center; gap: 9px; color: #9ba19a; font-size: 12px; }
.workspace-breadcrumbs b { color: #c0c4bd; font-weight: 400; }
.workspace-breadcrumbs strong { color: var(--ink); font-weight: 600; }
.workspace-actions { gap: 7px; }
.identity-chip { color: #7e8680; font-family: Consolas, monospace; font-size: 11px; }
.workspace-actions .customer-button { min-height: 38px; border-radius: 7px; box-shadow: none; }
.workspace-actions .customer-button-primary { background: var(--coral); border-color: var(--coral); }
.workspace-actions .customer-button-quiet { background: transparent; border-color: transparent; }
.workspace-actions .customer-button-quiet:hover { background: #ebe9e2; border-color: transparent; }
.workspace-layout { display: block; padding-top: 0; }
.workspace-rail { display: none; }
.qr-panel {
  min-height: auto;
  padding: 0;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.dashboard-panel { min-height: 0; }
.plugins-panel { min-height: 0; }
.plugins-panel-heading { padding: 43px 0 25px; }
.plugins-panel-heading h2 { margin: 3px 0 6px; font-family: Georgia, "Noto Serif SC", serif; font-size: 34px; }
.plugins-panel-heading p:last-child { margin: 0; color: var(--muted); font-size: 12px; }
.panel-heading { padding: 0; border-bottom: 0; }
.dashboard-heading { padding: 43px 0 25px; }
.dashboard-heading .dashboard-bot-avatar { width: 43px; height: 43px; flex-basis: 43px; border-radius: 9px; }
.dashboard-heading h2 { margin-top: 3px; font-family: Georgia, "Noto Serif SC", serif; font-size: 34px; letter-spacing: .01em; }
.dashboard-heading .eyebrow { color: var(--coral); }
.gateway-state-badge { border-radius: 8px; }
.dashboard-content { padding: 0; }
.workspace-signal-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 18px 21px;
  background: #e9eee8;
  border: 1px solid #cfd6cf;
  border-radius: 13px;
}
.workspace-signal-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.workspace-signal-icon {
  display: grid;
  width: 43px;
  height: 43px;
  flex: 0 0 43px;
  place-items: center;
  color: #507155;
  background: #d2e0d1;
  border-radius: 10px;
  font-size: 21px;
}
.workspace-signal-main strong { display: block; margin: 3px 0 2px; font-family: Georgia, "Noto Serif SC", serif; font-size: 19px; }
.workspace-signal-main p { margin: 0; color: #6d7c6d; font-size: 11px; }
.workspace-signal-meta { display: flex; align-items: center; gap: 30px; }
.workspace-signal-meta > div { padding-left: 24px; border-left: 1px solid #cfd7cf; }
.workspace-signal-meta strong { display: block; margin-top: 4px; font-family: Consolas, monospace; font-size: 17px; }
.workspace-metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; padding: 27px 0 34px; }
.workspace-metric-card { min-width: 0; min-height: 136px; padding: 16px 17px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; }
.workspace-metric-card > div { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; }
.workspace-metric-card strong { display: block; overflow: hidden; margin: 21px 0 8px; color: var(--ink); font-family: Georgia, "Noto Serif SC", serif; font-size: 27px; text-overflow: ellipsis; white-space: nowrap; }
.workspace-metric-card small { display: block; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.metric-mark { display: grid; width: 27px; height: 27px; place-items: center; color: var(--ink); background: #e3e5df; border-radius: 8px; font-size: 12px; }
.metric-mark-coral { color: #b9513e; background: var(--coral-wash); }
.metric-mark-blue { color: #427b88; background: #dfecee; }
.metric-mark-green { color: #507155; background: var(--green-wash); }
.workspace-metric-card-dark { color: #fff; background: var(--ink); border-color: var(--ink); }
.workspace-metric-card-dark > div, .workspace-metric-card-dark small { color: #aebbb0; }
.workspace-metric-card-dark strong { color: #fff; }
.workspace-metric-card-dark .metric-mark { color: #f5be62; background: #39433d; }
.runtime-section { margin-bottom: 33px; padding: 18px 21px 19px; background: #e9eee8; border: 1px solid #cfd6cf; border-radius: 13px; }
.runtime-section .section-heading-row { margin-bottom: 14px; }
.runtime-section .section-heading-row .eyebrow { color: #77877a; }
.runtime-section h3 { font-family: Georgia, "Noto Serif SC", serif; font-size: 19px; }
.runtime-metrics { background: #cfd6cf; border-radius: 9px; }
.runtime-metrics div { background: rgba(255,255,255,.34); }
.gateway-note { color: #6d7c6d; }
.plugin-section { padding: 29px 0 34px; border-top: 1px solid var(--line); }
.plugin-section:first-of-type { padding-top: 0; border-top: 0; }
.section-heading-row h3 { font-family: Georgia, "Noto Serif SC", serif; font-size: 21px; }
.section-heading-row .eyebrow { color: var(--coral); }
.plugin-description { color: var(--muted); }
.plugin-form { padding: 17px 0 0; }
.plugin-form-footer { border-top-color: var(--line); }
.lanzou-account-section { margin-top: 27px; padding-top: 27px; }
.lanzou-config-grid input, .lanzou-config-grid textarea, .lanzou-account-form-grid input { background: var(--surface); }
.plugin-center-section {
  padding: 36px 0 34px;
  border-top: 1px solid var(--line);
}
.plugin-center-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 19px;
}
.plugin-center-heading h3 {
  margin: 0 0 5px;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 23px;
}
.plugin-center-copy {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.plugin-center-count {
  flex: 0 0 auto;
  padding: 5px 9px;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 5px;
  font-family: Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
}
.plugin-catalog {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.plugin-directory-card {
  display: flex;
  min-width: 0;
  min-height: 190px;
  flex-direction: column;
  padding: 17px 17px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--line-strong);
  border-radius: 9px;
  box-shadow: 0 4px 13px rgba(31, 37, 34, .035);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.plugin-directory-card:hover {
  border-color: #bfcbbf;
  border-top-color: var(--green);
  box-shadow: 0 9px 22px rgba(31, 37, 34, .07);
  transform: translateY(-2px);
}
.plugin-directory-card.is-enabled { border-top-color: var(--green); }
.plugin-directory-card.is-locked { border-top-color: var(--coral); }
.plugin-directory-top {
  display: flex;
  align-items: start;
  gap: 10px;
  min-width: 0;
}
.plugin-directory-marker {
  display: grid;
  width: 33px;
  height: 33px;
  flex: 0 0 33px;
  place-items: center;
  color: var(--ink);
  background: var(--green-wash);
  border-radius: 8px;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 17px;
  font-weight: 700;
}
.plugin-directory-marker.marker-1 { color: #8e4c3d; background: var(--coral-wash); }
.plugin-directory-marker.marker-2 { color: #426d78; background: #e2eef0; }
.plugin-directory-marker.marker-3 { color: #6b5b27; background: #f7efd1; }
.plugin-directory-title { min-width: 0; flex: 1; }
.plugin-directory-title h4 {
  margin: 1px 0 3px;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.plugin-directory-title p {
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-family: Consolas, monospace;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.plugin-directory-status {
  flex: 0 0 auto;
  padding: 4px 6px;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}
.plugin-directory-status.is-enabled { color: var(--green-dark); background: var(--green-wash); border-color: #b6d2c3; }
.plugin-directory-card.is-disabled { border-top-color: var(--line-strong); }
.plugin-directory-status.is-disabled { color: var(--muted); background: var(--surface-soft); border-color: var(--line); }
.plugin-directory-status.is-locked { color: #9b4435; background: var(--coral-wash); border-color: #e2b4a9; }
.plugin-directory-description {
  display: -webkit-box;
  min-height: 38px;
  margin: 16px 0 14px;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.plugin-directory-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 37px;
  margin-top: auto;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}
.plugin-directory-footer > span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.plugin-configure-button {
  min-width: 58px;
  min-height: 34px;
  padding: 6px 10px;
  color: var(--green-dark);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  font-size: 11px;
  font-weight: 800;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.plugin-configure-button:hover:not(:disabled) {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
  transform: translateY(-1px);
}
.plugin-catalog-empty {
  margin: 0;
  padding: 24px 0;
  color: var(--muted);
  font-size: 12px;
}
.plugin-config-panel { scroll-margin-top: 18px; }
.account-settings-panel {
  min-height: 420px;
  margin-top: 38px;
  padding: 34px 0 12px;
  border-top: 4px solid var(--green);
  scroll-margin-top: 18px;
}
.account-settings-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.account-settings-heading .eyebrow { margin-bottom: 8px; color: var(--coral); }
.account-settings-heading h2 { margin-bottom: 8px; }
.account-settings-copy { margin-bottom: 0; color: var(--muted); font-size: 13px; }
.account-settings-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  color: var(--green-dark);
  background: var(--green-wash);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-family: Consolas, monospace;
  font-size: 19px;
  font-weight: 500;
}
.account-settings-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  border-bottom: 1px solid var(--line);
}
.account-settings-list > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  min-width: 0;
  padding: 18px 4px;
  border-bottom: 1px solid var(--line);
}
.account-settings-list > div:nth-last-child(-n + 2) { border-bottom: 0; }
.account-settings-list dt { color: var(--muted); font-size: 12px; font-weight: 600; }
.account-settings-list dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-family: Consolas, "DM Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-settings-actions { display: flex; flex-wrap: wrap; gap: 9px; padding-top: 24px; }
.group-access-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 9px; }
.group-access-manager-status, .group-management-manager-status { color: var(--muted); font-size: 12px; }
.group-management-manager-control { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.group-access-list { display: grid; gap: 12px; padding-top: 22px; }
.group-access-empty { margin: 0; padding: 18px 0; color: var(--muted); font-size: 12px; }
.group-access-card { padding: 18px 0; border-bottom: 1px solid var(--line); }
.group-access-card.is-inactive { opacity: .68; }
.group-access-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.group-access-card-heading h3 { margin: 0 0 5px; font-size: 16px; }
.group-access-card-heading p { margin: 0; color: var(--muted); font-family: Consolas, monospace; font-size: 11px; }
.group-access-manager { display: inline-flex; align-items: center; margin: 10px 0 0; padding: 7px 10px; color: var(--ink-soft); background: var(--surface-tint); border: 1px solid var(--line); border-radius: 6px; font-size: 12px; }
.group-access-controls { display: flex; flex-wrap: wrap; gap: 10px 18px; padding-top: 16px; }
.group-manager-modal-body { display: grid; gap: 10px; }
.group-manager-modal-body label { color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.group-manager-modal-body input, .group-manager-modal-body select { min-height: 48px; padding: 11px 13px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px; font-size: 14px; }
.group-manager-modal-copy { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.group-manager-copy-hint { margin: 0; color: var(--muted); font-size: 11px; }
.group-manager-code { display: block; width: 100%; margin: 5px 0 0; padding: 14px; color: var(--ink); text-align: left; background: var(--surface-tint); border: 1px dashed var(--green); border-radius: 6px; font-family: Consolas, "Courier New", monospace; font-size: 16px; font-weight: 700; letter-spacing: .04em; overflow-wrap: anywhere; user-select: all; cursor: copy; }
.group-manager-code:hover { background: var(--green-wash); border-color: var(--green-dark); }
.group-manager-success, .group-manager-unbind-state { display: grid; gap: 6px; margin-top: 5px; padding: 16px; background: var(--green-wash); border: 1px solid #acd4c6; border-radius: 6px; }
.group-manager-success strong { color: var(--green-dark); font-size: 17px; }
.group-manager-success span, .group-manager-unbind-state span { color: var(--ink); font-size: 14px; font-weight: 700; overflow-wrap: anywhere; }
.group-manager-unbind-state { background: var(--surface-tint); border-color: var(--line-strong); }
.group-manager-unbind-state strong { color: var(--ink-soft); font-size: 13px; }
.group-manager-unbind-state p { margin: 3px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.group-manager-copy-status { margin: 0; color: var(--green-dark); font-size: 11px; font-weight: 700; }
.group-access-toggle { min-height: 34px; }
.group-access-toggle b { font-size: 11px; }
.plugin-config-close { flex: 0 0 auto; min-height: 36px; }
.plugin-heading-row { align-items: start; }
.plugin-heading-row > div { min-width: 0; }
.plugin-heading-row .plugin-config-close { margin-left: auto; }
.panel-footer { margin-top: 30px; padding-bottom: 8px; }
.subscription-panel, .qq-connect-panel, .bot-panel { padding-top: 43px; }
.subscription-panel .panel-heading, .qq-connect-panel .panel-heading, .bot-panel .panel-heading { padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.is-workspace .customer-modal { border-radius: 11px; }

@media (max-width: 900px) {
  .workspace-shell { grid-template-columns: 210px minmax(0, 1fr); }
  .workspace-main { padding-right: 25px; padding-left: 25px; }
}
@media (max-width: 680px) {
  .workspace-shell { display: block; height: auto; min-height: 100vh; overflow: visible; }
  .workspace-sidebar { height: auto; min-height: auto; padding: 16px 14px 12px; border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  .workspace-brand { padding-bottom: 15px; }
  .workspace-switcher, .workspace-sidebar-divider, .workspace-sidebar-heading, .workspace-nav-compact, .workspace-sidebar-footer { display: none; }
  .workspace-nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
  .workspace-nav-item { justify-content: center; min-height: 40px; padding: 0 5px; font-size: 11px; }
  .workspace-nav-icon { display: none; }
  .workspace-nav-compact { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 8px; }
  .workspace-main { height: auto; min-height: 0; padding: 0 16px 40px; overflow: visible; }
  .workspace-header { height: auto; min-height: 70px; padding: 14px 0; }
  .workspace-actions { width: 100%; justify-content: flex-start; }
  .identity-chip { margin-right: auto; }
  .dashboard-heading { align-items: flex-start; flex-direction: column; gap: 15px; padding: 30px 0 20px; }
  .dashboard-heading h2 { font-size: 29px; }
  .plugins-panel-heading { padding: 30px 0 20px; }
  .plugins-panel-heading h2 { font-size: 29px; }
  .runtime-section { padding: 15px; border-radius: 10px; }
  .workspace-signal-strip { align-items: flex-start; flex-direction: column; gap: 17px; padding: 15px; border-radius: 10px; }
  .workspace-signal-meta { width: 100%; gap: 20px; }
  .workspace-signal-meta > div { flex: 1; }
  .workspace-metric-grid { grid-template-columns: 1fr 1fr; padding: 22px 0 28px; }
  .workspace-metric-card { min-height: 120px; }
  .workspace-metric-card strong { margin-top: 15px; font-size: 23px; }
  .runtime-metrics { grid-template-columns: 1fr 1fr; }
  .runtime-metrics .runtime-metric-wide { grid-column: 1 / -1; }
}

@media (max-width: 980px) {
  .plugin-catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .plugin-center-section { padding-top: 28px; }
  .plugin-center-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .plugin-center-count { align-self: flex-start; }
  .plugin-catalog { grid-template-columns: 1fr; gap: 8px; }
  .plugin-directory-card { min-height: 174px; }
  .plugin-heading-row { gap: 12px; }
  .plugin-heading-row .plugin-config-close { margin-left: 0; }
  .group-management-toggle-heading { align-items: flex-start; flex-direction: column; }
  .group-management-toggle-heading .switch-field { width: 100%; min-width: 0; }
  .account-settings-panel { min-height: 0; margin-top: 28px; padding-top: 28px; }
  .account-settings-heading { gap: 14px; }
  .account-settings-heading h2 { font-size: 26px; }
  .account-settings-list { grid-template-columns: 1fr; }
  .account-settings-list > div,
  .account-settings-list > div:nth-last-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .account-settings-list > div:last-child { border-bottom: 0; }
  .account-settings-actions .customer-button { flex: 1 1 160px; }
  .group-access-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
}
