:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --ink: #182230;
  --muted: #718096;
  --line: #e4eaf1;
  --brand: #2f78e8;
  --brand-dark: #1d5fc3;
  --brand-soft: #edf5ff;
  --green: #1c9b73;
  --green-soft: #eaf8f2;
  --danger: #df5363;
  --shadow: 0 14px 38px rgba(31, 50, 81, .08);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--bg); }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .6; }
:focus-visible { outline: 3px solid rgba(47, 120, 232, .25); outline-offset: 2px; }
.auth-shell { display: grid; grid-template-columns: minmax(430px, 1fr) minmax(440px, .8fr); min-height: 100vh; }
.brand-panel { display: flex; flex-direction: column; justify-content: space-between; padding: 46px clamp(36px, 7vw, 104px); background: linear-gradient(145deg, #eef6ff, #f8fbff 58%, #f1f7f5); }
.brand-lockup, .nav-brand { display: flex; align-items: center; }
.brand-lockup::before { width: 330px; height: 105px; background: url('/assets/brand-logo-raw.png') center/contain no-repeat; content: ""; }
.nav-brand::before { width: 170px; height: 55px; background: url('/assets/brand-logo-raw.png') center/contain no-repeat; content: ""; }
.brand-seal, .brand-name, .brand-sub { display: none; }
.brand-statement { max-width: 510px; padding-bottom: 50px; }
.brand-statement h1 { max-width: 8.5em; margin: 0 0 20px; font-size: clamp(40px, 5vw, 66px); letter-spacing: -.05em; line-height: 1.13; }
.brand-statement p { max-width: 31em; margin: 0; color: #5d7188; font-size: 15px; line-height: 1.9; }
.brand-foot { color: #9aabba; font-size: 11px; letter-spacing: .08em; }
.auth-main { display: grid; min-height: 100vh; place-items: center; padding: 46px clamp(24px, 7vw, 100px); background: var(--surface); }
.auth-box { width: min(100%, 430px); }
.auth-heading { margin-bottom: 30px; }
.auth-heading h2 { margin: 0 0 9px; font-size: 28px; letter-spacing: -.03em; }
.auth-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.auth-tab { border: 0; border-bottom: 2px solid transparent; padding: 12px; background: transparent; color: var(--muted); }
.auth-tab.active { border-bottom-color: var(--brand); color: var(--brand); font-weight: 700; }
.form { display: grid; gap: 18px; }
.form-row, .settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 8px; min-width: 0; }
.field label { color: #43556a; font-size: 13px; font-weight: 650; }
.field input { width: 100%; height: 48px; border: 1px solid #dbe3ed; border-radius: 10px; background: var(--surface); padding: 0 14px; color: var(--ink); transition: border .15s, box-shadow .15s; }
.field input:focus { border-color: var(--brand); outline: 0; box-shadow: 0 0 0 3px rgba(47,120,232,.11); }
.field input:disabled { background: var(--surface-soft); color: var(--muted); }
.field-hint { margin: -2px 0 0; color: var(--muted); font-size: 11px; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 52px; }
.reveal { position: absolute; top: 0; right: 0; width: 48px; height: 48px; border: 0; background: transparent; color: var(--brand); font-size: 12px; }
.checkbox { display: flex; align-items: flex-start; gap: 9px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.checkbox input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--brand); }
.checkbox a { color: var(--brand); }
.button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 10px; padding: 0 17px; font-weight: 650; text-decoration: none; transition: .15s; }
.button:active { transform: translateY(1px); }
.button.primary { background: var(--brand); color: white; }
.button.primary:hover { background: var(--brand-dark); box-shadow: 0 5px 14px rgba(47,120,232,.22); }
.button.secondary { border-color: #d9e2ec; background: white; color: #405268; }
.button.secondary:hover { border-color: #b7c7d9; background: var(--surface-soft); }
.button.danger { border-color: #f0c6cb; background: white; color: var(--danger); }
.button.block { width: 100%; min-height: 50px; }
.button.small { min-height: 35px; padding: 0 12px; font-size: 12px; }
.error-box { border-radius: 9px; background: #fff0f1; padding: 11px 13px; color: #b53d4d; font-size: 13px; }
.app-shell { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; display: flex; height: 100vh; flex-direction: column; border-right: 1px solid var(--line); background: white; padding: 27px 17px; }
.nav-brand { border-bottom: 1px solid var(--line); padding: 0 8px 22px; }
.nav-list { display: grid; gap: 6px; margin-top: 19px; }
.nav-item { display: flex; width: 100%; min-height: 43px; align-items: center; gap: 11px; border: 0; border-radius: 9px; padding: 0 13px; background: transparent; color: #718096; text-align: left; }
.nav-item:hover { background: var(--surface-soft); color: var(--ink); }
.nav-item.active { background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.nav-icon { display: grid; width: 19px; place-items: center; font-size: 12px; }
.sidebar-user { display: flex; align-items: center; gap: 10px; margin-top: auto; border-top: 1px solid var(--line); padding: 19px 6px 0; }
.avatar { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; border-radius: 50%; background: #e8f2ff; color: var(--brand); font-size: 13px; font-weight: 700; }
.sidebar-user-text { min-width: 0; flex: 1; }
.sidebar-user strong, .sidebar-user span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user strong { font-size: 12px; }.sidebar-user span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.logout { border: 0; background: transparent; color: var(--muted); font-size: 18px; }
.main { min-width: 0; }.topbar { display: flex; height: 70px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 0 clamp(24px,5vw,64px); background: rgba(255,255,255,.9); }
.topbar h1 { margin: 0; font-size: 18px; }.status-pill { display: inline-flex; align-items: center; gap: 7px; color: var(--green); font-size: 12px; font-weight: 650; }.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.content { width: min(100%, 1040px); padding: 42px clamp(24px,5vw,64px) 70px; }.welcome { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 38px; }.eyebrow { margin: 0 0 8px; color: var(--brand); font-size: 11px; font-weight: 750; letter-spacing: .09em; }.welcome h2 { margin: 0; font-size: 32px; letter-spacing: -.04em; }.welcome p:last-child { margin: 9px 0 0; color: var(--muted); font-size: 14px; }.account-id { border-left: 2px solid var(--brand); padding-left: 14px; }.account-id span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 10px; }.account-id code { color: #516277; font-size: 11px; }
.stat-grid { display: grid; grid-template-columns: repeat(3,1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: var(--shadow); }.stat { min-height: 105px; padding: 22px; }.stat + .stat { border-left: 1px solid var(--line); }.stat-label { color: var(--muted); font-size: 11px; }.stat-value { margin-top: 11px; font-size: 24px; font-weight: 750; }.stat-value.good { color: var(--green); }
.section { margin-top: 40px; }.section-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 14px; }.section-head h3 { margin: 0; font-size: 15px; }.section-head p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }.service-list, .activity-list { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: white; }.service-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 20px; padding: 17px 18px; }.service-row + .service-row, .activity-row + .activity-row { border-top: 1px solid var(--line); }.service-main { display: flex; min-width: 0; align-items: center; gap: 14px; }.service-icon { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; border-radius: 11px; background: var(--service-color,var(--brand)); color: white; font-size: 13px; font-weight: 700; }.service-text { min-width: 0; }.service-name { font-size: 13px; font-weight: 700; }.service-meta { margin-top: 5px; color: var(--muted); font-size: 11px; }.empty { border: 1px dashed #ced8e4; border-radius: 14px; padding: 34px; color: var(--muted); text-align: center; font-size: 13px; }.activity-row { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 13px; padding: 15px 18px; font-size: 12px; }.activity-mark { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }.activity-detail, .activity-time { color: var(--muted); }.activity-time { font-size: 10px; }
.settings-grid { gap: 26px; }.settings-panel { border: 1px solid var(--line); border-radius: 14px; background: white; padding: 24px; box-shadow: var(--shadow); }.settings-panel h3 { margin: 0 0 7px; font-size: 15px; }.settings-panel > p { margin: 0 0 24px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.consent-shell { display: grid; min-height: 100vh; place-items: center; padding: 34px 20px; background: linear-gradient(145deg,#eff7ff,#f7fbff); }.consent, .callback { width: min(100%,500px); border: 1px solid var(--line); border-radius: 18px; background: white; padding: 34px; box-shadow: var(--shadow); }.consent-brands { display: flex; align-items: center; justify-content: center; gap: 18px; margin-bottom: 27px; }.consent-brands .brand-seal { display: block; width: 150px; height: 48px; background: url('/assets/brand-logo-raw.png') center/contain no-repeat; }.consent-brands .brand-seal span { display: none; }.connect-line { width: 28px; height: 1px; background: #cbd6e3; }.consent h1 { margin: 0; text-align: center; font-size: 22px; }.consent-intro { margin: 11px auto 26px; color: var(--muted); text-align: center; font-size: 13px; line-height: 1.7; }.permission-list { margin: 0 0 26px; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; padding: 0; list-style: none; }.permission { display: grid; grid-template-columns: 25px 1fr; gap: 10px; padding: 14px; font-size: 12px; }.permission + .permission { border-top: 1px solid var(--line); }.permission-check { color: var(--green); font-weight: 700; }.consent-account { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; border-radius: 11px; background: var(--surface-soft); padding: 13px; }.consent-account .avatar { width: 34px; height: 34px; flex-basis: 34px; font-size: 12px; }.consent-account strong, .consent-account span { display: block; }.consent-account strong { font-size: 12px; }.consent-account span { margin-top: 3px; color: var(--muted); font-size: 10px; }.consent-actions { display: grid; grid-template-columns: 1fr 1.5fr; gap: 10px; }.consent-foot { margin: 19px 0 0; color: var(--muted); text-align: center; font-size: 10px; line-height: 1.6; }.callback { width: min(100%,620px); }.callback h1 { margin: 0 0 10px; }.callback p { color: var(--muted); line-height: 1.7; }.code-box { overflow-wrap: anywhere; margin: 22px 0; border-radius: 10px; background: var(--surface-soft); padding: 15px; color: #42566e; font-family: ui-monospace, monospace; font-size: 11px; line-height: 1.6; }
.mobile-menu { display: none; }.toast { position: fixed; right: 24px; bottom: 24px; z-index: 10; max-width: min(380px,calc(100vw - 48px)); border-radius: 11px; background: #213247; padding: 13px 17px; color: white; font-size: 12px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(10px); transition: .2s; }.toast.show { opacity: 1; transform: translateY(0); }.loading { display: grid; min-height: 100vh; place-items: center; color: var(--muted); font-size: 13px; }
/* 管理后台样式：角色徽章、表格、行操作 */
.role-pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 11px; font-size: 10px; font-weight: 700; letter-spacing: .04em; margin-right: 4px; }
.role-admin { background: #fff0f1; color: #b53d4d; }
.role-developer { background: var(--brand-soft); color: var(--brand); }
.role-system { background: #f4f1ff; color: #6b54b8; }
.role-dev { background: var(--green-soft); color: var(--green); }
.role-none { background: var(--surface-soft); color: var(--muted); }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: var(--shadow); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.admin-table th { text-align: left; padding: 14px 16px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .04em; border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.admin-table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table .empty { border: 0; }
.scope-checkboxes { display: flex; gap: 14px; flex-wrap: wrap; }
.field textarea { width: 100%; min-height: 72px; border: 1px solid #dbe3ed; border-radius: 10px; background: var(--surface); padding: 10px 14px; color: var(--ink); font: inherit; resize: vertical; transition: border .15s, box-shadow .15s; }
.field textarea:focus { border-color: var(--brand); outline: 0; box-shadow: 0 0 0 3px rgba(47,120,232,.11); }
#roles-modal { position: fixed; inset: 0; z-index: 30; }
/* 本地开发验证码回显框（区别于错误提示） */
.dev-code-box { border: 1px solid #b8e3c9; border-radius: 10px; background: #f3fbf6; padding: 16px; text-align: center; }
.dev-code-label { font-size: 10px; color: #2a8c4d; letter-spacing: 0.15em; font-weight: 700; margin-bottom: 8px; }
.dev-code-value { font-size: 32px; font-weight: 800; letter-spacing: 0.18em; color: #1d7a3f; font-family: ui-monospace, 'SF Mono', Menlo, monospace; }
.dev-code-hint { margin-top: 8px; font-size: 11px; color: #5d6b7d; line-height: 1.5; }
.info-box { border: 1px solid #c5d2e3; border-radius: 10px; background: var(--surface-soft); padding: 12px 14px; color: var(--muted); font-size: 12px; line-height: 1.6; }
@media (max-width:820px) { .auth-shell { grid-template-columns:1fr; }.brand-panel { min-height:250px; padding:28px 24px; }.brand-lockup::before { width:270px; height:83px; }.brand-statement { padding:35px 0 6px; }.brand-statement h1 { max-width:none; font-size:37px; }.brand-statement p,.brand-foot { display:none; }.auth-main { min-height:auto; padding:42px 24px 60px; }.app-shell { grid-template-columns:1fr; }.sidebar { position:fixed; z-index:5; width:244px; transform:translateX(-100%); transition:transform .2s; }.sidebar.open { transform:translateX(0); }.mobile-menu { display:grid; width:37px; height:37px; place-items:center; border:1px solid var(--line); border-radius:9px; background:white; }.topbar { height:62px; padding:0 20px; }.topbar-title { display:flex; align-items:center; gap:13px; }.content { padding:30px 20px 60px; }.welcome { align-items:flex-start; flex-direction:column; }.welcome h2 { font-size:28px; }.stat-grid { grid-template-columns:1fr; }.stat + .stat { border-top:1px solid var(--line); border-left:0; }.settings-grid { grid-template-columns:1fr; } }
@media (max-width:480px) { .form-row,.consent-actions { grid-template-columns:1fr; }.brand-statement h1 { font-size:31px; }.service-row { grid-template-columns:1fr; }.service-row .button { width:100%; }.activity-row { grid-template-columns:10px 1fr; }.activity-time { grid-column:2; }.consent,.callback { padding:27px 22px; } }
