:root{--auth-ink:#282538;--auth-muted:#686174;--auth-line:#e1dce6;--auth-purple:#76557b;--auth-focus:#a172ae}
button,input{font:inherit}button{cursor:pointer}button:disabled{cursor:wait;opacity:.6}button:focus-visible,input:focus-visible{outline:3px solid var(--auth-focus);outline-offset:3px}button,a{touch-action:manipulation}.account-menu{display:flex;align-items:center;justify-content:flex-end;gap:16px;font-size:14px;min-width:0}.account-menu>#account-name{max-width:180px;overflow-wrap:anywhere}.header-link,.header-button{border:0;background:transparent;padding:7px 0;color:#fff;font-size:14px;white-space:nowrap}.header-link:hover,.header-button:hover{text-decoration:underline}.session-empty{margin:15px 0;color:var(--muted);font-size:15px}.auth-button{display:inline-flex;justify-content:center;align-items:center;gap:6px;border:1px solid var(--auth-line);border-radius:7px;padding:9px 16px;min-height:40px;background:#fff;color:var(--auth-ink);font-size:14px;font-weight:600;text-decoration:none}.auth-button.primary{background:#76557b;border-color:#76557b;color:#fff}.auth-button.primary:hover{background:#64456b}.auth-button.secondary:hover{background:#f5f1f7;border-color:#bdacc7}.auth-field{display:grid;gap:6px;margin:0 0 17px;min-width:0;font-size:14px;color:var(--auth-ink)}.auth-field>span{font-weight:600}.auth-field input{min-width:0;width:100%;border:1px solid #c9bfce;border-radius:6px;min-height:43px;padding:9px 11px;background:#fff;color:var(--auth-ink)}.auth-field input:disabled{background:#f5f2f7;color:var(--auth-muted)}.auth-field small{font-size:12px;color:var(--auth-muted)}.password-toggle{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--auth-muted);margin:0 0 18px;cursor:pointer}.password-toggle input{width:16px;height:16px;accent-color:var(--auth-purple)}.auth-status{font-size:14px;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere;margin:12px 0;color:var(--auth-muted)}.auth-status:empty{display:none}.auth-status.error{color:#a2223c}.auth-status.success{color:#246b49}.login-layout{flex:1;width:100%;padding:46px 20px 25px;display:flex;flex-direction:column;align-items:center;justify-content:center}.login-brand{margin-bottom:30px}.login-card{width:min(100%,400px);border-radius:13px;padding:29px 30px;background:#fff;color:var(--auth-ink);box-shadow:0 15px 70px #241d3840}.login-card h1{font-size:23px;font-weight:650;line-height:1.4;margin:0 0 8px;letter-spacing:.3px}.form-intro{margin:0 0 25px;font-size:14px;line-height:1.6;color:var(--auth-muted)}.login-submit{width:100%;margin-top:2px}.login-footer{margin:26px 0 0;font-size:12px;color:#ddd0e0}.users-page{background:#f5f3f7;color:var(--auth-ink)}.users-page .topbar{height:auto;min-height:78px;background:#574259;color:#fff}.users-main{width:min(1120px,100%);margin:0 auto;padding:36px 28px 60px;flex:1}.users-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:20px}.users-heading h1{font-size:28px;line-height:1.3;margin:0 0 6px;font-weight:650}.users-heading p{font-size:14px;color:var(--auth-muted);margin:0;line-height:1.6}.users-panel{background:#fff;border:1px solid var(--auth-line);border-radius:10px;overflow:hidden}.users-table-scroll{overflow-x:auto}.users-table{width:100%;border-collapse:collapse;min-width:590px;font-size:14px}.users-table th,.users-table td{text-align:left;padding:15px 18px;border-bottom:1px solid #e8e3ed;vertical-align:middle}.users-table th{font-size:12px;color:var(--auth-muted);font-weight:600;background:#faf8fc}.users-table tr:last-child td{border-bottom:0}.users-table td:first-child strong{display:block;font-weight:600}.user-code{font-size:12px;color:var(--auth-muted);display:block;margin-top:3px}.user-badge{display:inline-flex;border-radius:5px;padding:4px 7px;font-size:12px;white-space:nowrap;background:#eaf5ee;color:#2b6848}.user-badge.owner{background:#f0e8f7;color:#735584}.user-badge.disabled{background:#f1f0f3;color:#716779}.user-permissions{line-height:1.6;font-size:12px;color:#5f556b;max-width:330px}.user-row-actions{display:flex;flex-wrap:wrap;gap:8px}.user-row-actions .auth-button{padding:5px 10px;min-height:31px;font-size:12px}.user-dialog{padding:0;width:min(600px,calc(100% - 26px));max-height:90vh;border:1px solid var(--auth-line);border-radius:11px;color:var(--auth-ink);box-shadow:0 20px 90px #24173155}.user-dialog::backdrop{background:#23172d8c}.user-dialog form{display:flex;flex-direction:column;max-height:89vh}.user-dialog-header,.user-dialog-footer{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:16px 21px;border-bottom:1px solid var(--auth-line)}.user-dialog-header h2{font-size:19px;margin:0}.dialog-close{display:grid;place-items:center;width:30px;height:30px;border:0;border-radius:6px;background:transparent;font-size:24px;color:var(--auth-muted)}.dialog-close:hover{background:#f0ebf3}.user-dialog-body{padding:20px 21px 4px;overflow:auto}.user-dialog-footer{justify-content:flex-end;border-bottom:0;border-top:1px solid var(--auth-line)}.user-form-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 15px}.span-all{grid-column:1/-1}.permissions-fieldset{border:1px solid var(--auth-line);border-radius:7px;padding:13px 14px;margin:0 0 18px;min-width:0}.permissions-fieldset legend{font-size:14px;font-weight:600;padding:0 5px}.permission-group+.permission-group{margin-top:13px;padding-top:12px;border-top:1px solid #ece7f0}.permission-group h3{font-size:13px;margin:0 0 8px}.permission-options{display:flex;flex-wrap:wrap;gap:8px 17px}.permission-option{display:flex;align-items:center;gap:6px;font-size:13px;color:var(--auth-muted);cursor:pointer}.permission-option input{width:16px;height:16px;accent-color:var(--auth-purple)}
@media(max-width:640px){.account-menu{gap:11px;font-size:12px}.account-menu>#account-name{max-width:105px}.header-link,.header-button{font-size:12px}.users-page .topbar{padding:13px 18px;flex-wrap:wrap;gap:14px}.users-page .account-menu{margin-left:auto}.users-main{padding:25px 16px 40px}.users-heading{align-items:flex-start;gap:12px}.users-heading h1{font-size:25px}.login-card{padding:25px 23px}.login-layout{padding-top:26px}.user-form-fields{grid-template-columns:minmax(0,1fr)}.user-dialog-header,.user-dialog-footer{padding:13px 16px}.user-dialog-body{padding:16px 16px 2px}.home-auth .topbar{height:auto;min-height:78px;padding-top:14px;padding-bottom:14px;flex-wrap:wrap;gap:12px}.home-auth .account-menu{margin-left:auto}.home-auth .brand-name>span{display:none}}

.login-page{background:#f3f2f5;color:var(--auth-ink)}.login-page .login-card{border:1px solid #e0dce5;border-radius:9px;box-shadow:0 4px 22px #42374813}.login-page .login-brand{display:flex;flex-direction:column;justify-content:center;gap:10px;margin:0 auto 24px;color:var(--auth-ink)}.login-page .login-brand .brand-logo{width:66px;height:66px;border-radius:10px}.login-page .login-brand .brand-logo img{width:62px;height:62px}.login-page .login-brand .brand-name>span{border-left-color:#d7cfdd;color:var(--auth-muted)}.login-page .login-card h1{font-size:21px;text-align:center}.login-page .form-intro{text-align:center}.login-page .login-footer{color:#83798c}
@media(max-width:640px){
  .login-page .auth-field input,.users-page .auth-field input{font-size:16px;min-height:46px}
  .login-page .auth-button,.users-page .auth-button,.users-page .dialog-close{min-height:44px}
  .users-page .permission-option{min-height:44px;padding:4px 0}
}

.users-mobile-entry { display: none; }
@media screen {
  :where(html[data-workbench-device="phone"]) :is(.login-page, .users-page) {
    --auth-ink: #16372f; --auth-muted: #48675d; --auth-line: #dce8e1;
    --auth-purple: #1e6354; --auth-focus: #548f7e;
    min-width: 0; background: #f1f6f3; color: var(--auth-ink);
  }
  :where(html[data-workbench-device="phone"]) .login-page {
    background: linear-gradient(160deg, #123b37 0%, #286054 35%, #e2efe7 35%, #f1f6f3 100%);
    min-height: 100dvh;
  }
  :where(html[data-workbench-device="phone"]) .login-page .login-layout {
    padding: max(42px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));
    justify-content: flex-start;
  }
  :where(html[data-workbench-device="phone"]) .login-page .login-card {
    width: min(100%, 29rem); min-width: 0; padding: clamp(20px, 6vw, 32px);
    border-color: #dce8e1; border-radius: 24px; box-shadow: 0 13px 38px #133d2b24;
  }
  :where(html[data-workbench-device="phone"]) .login-page .login-brand {
    gap: 10px; flex-direction: row; justify-content: flex-start; margin: 0 0 23px;
  }
  :where(html[data-workbench-device="phone"]) .login-page .login-brand .brand-logo { width: 49px; height: 49px; border: 1px solid var(--auth-line); border-radius: 13px; flex: none; }
  :where(html[data-workbench-device="phone"]) .login-page .login-brand .brand-logo img { width: 42px; height: 42px; }
  :where(html[data-workbench-device="phone"]) .login-page .login-brand .brand-name > span { border-left-color: #d0e0d7; margin-left: 6px; padding-left: 9px; }
  :where(html[data-workbench-device="phone"]) .login-page .login-card h1 { text-align: left; font-size: clamp(24px, 6vw, 31px); letter-spacing: -.035em; }
  :where(html[data-workbench-device="phone"]) .login-page .form-intro { text-align: left; margin-bottom: 21px; }
  :where(html[data-workbench-device="phone"]) .login-page .auth-field { margin-bottom: 15px; }
  :where(html[data-workbench-device="phone"]) :is(.login-page,.users-page) .auth-field input { font-size: 16px; min-height: 50px; border-radius: 12px; border-color: #bccfc5; }
  :where(html[data-workbench-device="phone"]) :is(.login-page,.users-page) .auth-button { min-height: 46px; border-radius: 12px; }
  :where(html[data-workbench-device="phone"]) :is(.login-page,.users-page) .auth-button.primary { background: #1e6354; border-color: #1e6354; }
  :where(html[data-workbench-device="phone"]) :is(.login-page,.users-page) .auth-button.primary:hover { background: #154b40; border-color: #154b40; }
  :where(html[data-workbench-device="phone"]) .login-page .password-toggle { min-height: 44px; margin-bottom: 6px; }
  :where(html[data-workbench-device="phone"]) .login-page .login-submit { min-height: 48px; margin-top: 7px; }
  :where(html[data-workbench-device="phone"]) .login-page .login-footer { color: #365d51; margin-top: 18px; }
  :where(html[data-workbench-device="phone"]) .users-page .topbar { min-height: 62px; padding: max(9px,env(safe-area-inset-top)) 14px 9px; background: #123b37; gap: 9px; }
  :where(html[data-workbench-device="phone"]) .users-page .brand { min-height: 44px; }
  :where(html[data-workbench-device="phone"]) .users-page .brand-name > span, :where(html[data-workbench-device="phone"]) .users-page #account-name, :where(html[data-workbench-device="phone"]) .users-desktop-entry { display:none; }
  :where(html[data-workbench-device="phone"]) .users-mobile-entry { display: inline-flex; align-items: center; }
  :where(html[data-workbench-device="phone"]) .users-page .account-menu { margin-left: auto; }
  :where(html[data-workbench-device="phone"]) .users-page .account-menu > :is(button,a) { min-height: 44px; }
  :where(html[data-workbench-device="phone"]) .users-main { padding: 21px 14px max(28px,env(safe-area-inset-bottom)); }
  :where(html[data-workbench-device="phone"]) .users-heading { align-items: center; gap: 9px; }
  :where(html[data-workbench-device="phone"]) .users-heading p { max-width: 18rem; }
  :where(html[data-workbench-device="phone"]) .users-panel { border: 0; background: transparent; border-radius: 0; overflow: visible; }
  :where(html[data-workbench-device="phone"]) .users-table-scroll { overflow: visible; }
  :where(html[data-workbench-device="phone"]) .users-table, :where(html[data-workbench-device="phone"]) .users-table tbody { display: block; min-width: 0; }
  :where(html[data-workbench-device="phone"]) .users-table thead { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  :where(html[data-workbench-device="phone"]) .users-table tbody { display: grid; gap: 9px; }
  :where(html[data-workbench-device="phone"]) .users-table tbody tr { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px 10px; padding: 14px; border: 1px solid var(--auth-line); border-radius: 17px; background: #fff; box-shadow: 0 2px 4px #123c2a0a; }
  :where(html[data-workbench-device="phone"]) .users-table tbody td { display: block; min-width: 0; padding: 0; border: 0; overflow-wrap: anywhere; }
  :where(html[data-workbench-device="phone"]) .users-table tbody td:first-child strong { font-size: 16px; }
  :where(html[data-workbench-device="phone"]) .users-table .user-permissions { grid-column: 1/-1; max-width: none; padding-block: 8px 5px; border-top: 1px solid var(--auth-line); color: var(--auth-muted); }
  :where(html[data-workbench-device="phone"]) .users-table .user-permissions::before { content: "权限"; display: block; margin-bottom: 3px; color: var(--auth-ink); font-weight: 650; }
  :where(html[data-workbench-device="phone"]) .users-table td:last-child { grid-column: 1/-1; }
  :where(html[data-workbench-device="phone"]) .user-row-actions .auth-button { min-height: 44px; padding-inline: 13px; }
  :where(html[data-workbench-device="phone"]) .users-page .user-dialog { width: min(calc(100% - 16px), 35rem); max-height: calc(100dvh - 22px - env(safe-area-inset-bottom)); margin: auto auto max(8px,env(safe-area-inset-bottom)); border-radius: 22px; }
  :where(html[data-workbench-device="phone"]) .users-page .user-dialog form { max-height: calc(100dvh - 24px - env(safe-area-inset-bottom)); }
  :where(html[data-workbench-device="phone"]) .users-page .user-dialog-footer { background: #f9fcfa; padding-bottom: max(12px,env(safe-area-inset-bottom)); }
  :where(html[data-workbench-device="phone"]) .users-page .dialog-close { width: 44px; height: 44px; border-radius: 12px; background: #edf5f0; color: var(--auth-ink); }
  :where(html[data-workbench-device="phone"]) .users-page .permission-options { display: grid; gap: 0; }
  :where(html[data-workbench-device="phone"]) .users-page .permission-option { padding-inline: 2px; min-height: 42px; }
}


@media screen {
  :where(html[data-workbench-device="phone"]) .login-page { --auth-ink:#172d2a; --auth-muted:#506760; --auth-line:#dce6e1; --auth-purple:#13584c; background:#f4f7f6; }
  :where(html[data-workbench-device="phone"]) .login-page .login-layout { padding-top:max(28px,env(safe-area-inset-top)); }
  :where(html[data-workbench-device="phone"]) .login-page .login-card { padding:24px 20px; border-radius:18px; box-shadow:none; }
  :where(html[data-workbench-device="phone"]) .login-page .login-brand { margin-bottom:21px; }
  :where(html[data-workbench-device="phone"]) .login-page .auth-button.primary { background:#13584c; border-color:#13584c; }
  :where(html[data-workbench-device="phone"]) .login-page .auth-field input { border-color:#b5c8bf; }
}

