:root{color-scheme:light;--ui-bg:#f5f8f6;--ui-surface:#fff;--ui-soft:#f1f6f3;--ui-text:#17253a;--ui-muted:#586b80;--ui-line:#e1e9e4;--ui-accent:#167c5b;--ui-accent-hover:#106347;--ui-accent-soft:#edf7f1;--ui-accent-line:#b9dcca;--ui-accent-focus:#59a789;--ui-accent-ring:#167c5b1a;--ui-accent-disabled:#c7e2d5;--ui-accent-ink:#164e39;--ui-action:#167c5b;--ui-action-hover:#106347;--blue:var(--ui-accent);--blue-dark:var(--ui-accent-hover);--blue-soft:var(--ui-accent-soft)}
:root[data-theme=dark]{color-scheme:dark;--ui-bg:#000;--ui-surface:#151515;--ui-soft:#222;--ui-text:#f0f0f0;--ui-muted:#aaa;--ui-line:#333;--ui-accent:#8ad5b2;--ui-accent-hover:#b1ebd0;--ui-accent-soft:#162e24;--ui-accent-line:#315846;--ui-accent-focus:#7dbca0;--ui-accent-ring:#8ad5b226;--ui-accent-disabled:#303a35;--ui-accent-ink:#c1ebd6;--ui-action:#207858;--ui-action-hover:#25805c;--ink:var(--ui-text);--muted:var(--ui-muted);--line:var(--ui-line);--blue:var(--ui-accent);--blue-dark:var(--ui-accent-hover)}
:root{--ui-field-height:48px;--ui-field-radius:999px;--ui-field-bg:#f3f6f4;--ui-field-focus-bg:#fff;--ui-field-hover:#bdd3c6}
:root[data-theme=dark]{--ui-field-bg:var(--ui-soft);--ui-field-focus-bg:var(--ui-soft);--ui-field-hover:#496052}
html{background:var(--ui-bg)}body{background-color:var(--ui-bg);color:var(--ui-text)}
.interface-controls{display:flex;align-items:center;gap:10px;flex:none;font-weight:400;letter-spacing:0}
.brand>.interface-controls{margin-left:auto}.theme-toggle{display:grid;place-items:center;width:36px;height:36px;border:1px solid var(--ui-line);border-radius:50%;background:var(--ui-surface);color:var(--ui-muted);padding:8px;flex:none}
.theme-toggle:hover{color:var(--ui-accent);background:var(--ui-accent-soft)}.theme-toggle svg,.language-control>svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.theme-toggle .theme-sun{display:none}[data-theme=dark] .theme-toggle .theme-moon{display:none}[data-theme=dark] .theme-toggle .theme-sun{display:block}
.language-control{position:relative;color:var(--ui-muted);flex:none}
.language-trigger{display:flex;align-items:center;gap:8px;height:36px;padding:6px 10px;border:1px solid transparent;border-radius:999px;background:transparent;color:var(--ui-muted);font-size:14px;font-weight:400;white-space:nowrap}
.language-trigger:hover,.language-trigger[aria-expanded=true]{background:var(--ui-soft);border-color:var(--ui-line);color:var(--ui-text)}
.language-trigger>svg{width:17px;height:17px;flex:none;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.language-trigger>.language-chevron{width:13px;height:13px;opacity:.65}
.language-options{position:absolute;z-index:100;right:0;top:calc(100% + 8px);width:172px;border:1px solid var(--ui-line);border-radius:14px;background:var(--ui-surface);padding:6px;box-shadow:0 10px 38px #0000001c;color:var(--ui-text)}
.language-options button{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;min-height:38px;margin:0;padding:9px 11px;border:0;border-radius:9px;background:transparent;color:inherit;text-align:left;font-size:14px;font-weight:400}
.language-options button:hover,.language-options button:focus-visible{background:var(--ui-soft)}.language-options button[aria-checked=true]{background:var(--ui-accent-soft);color:var(--ui-accent);font-weight:500}.language-options button svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;visibility:hidden}.language-options button[aria-checked=true] svg{visibility:visible}
.account-header-actions{display:flex;align-items:center;gap:24px;min-width:0}.account-user{gap:16px}.account-identity{display:flex;align-items:center;gap:9px;color:var(--ui-text);text-decoration:none;min-width:0}.account-identity:hover{text-decoration:none}.account-avatar{width:34px;height:34px;border-radius:11px;font-size:17px;flex:none}.account-display-name{max-width:170px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.account-nav{position:relative;min-height:64px}.account-nav[aria-busy=true]::after{content:'';position:absolute;bottom:0;left:24px;right:24px;height:2px;background:var(--ui-accent);opacity:.4}.account-page-status{position:fixed;top:96px;right:24px;z-index:20;border:1px solid var(--ui-line);border-radius:999px;background:var(--ui-surface);color:var(--ui-muted);font-size:13px;padding:8px 15px;box-shadow:0 4px 18px #14263812}.account-page-status.error{color:#bc4943;max-width:calc(100vw - 32px)}
main[data-account-view]{min-height:390px}.page-heading h1:focus{outline:none}.phone-field>.input-divider,.code-field>.input-divider{display:block;flex:none;width:1px;height:16px;margin:0;padding:0;border:0;border-radius:0;background:var(--ui-line)}
@keyframes account-autofill{from{opacity:1}to{opacity:1}}
input:-webkit-autofill{animation-name:account-autofill;animation-duration:1ms}
.auth-page .button.primary:enabled{background:var(--ui-action);color:#fff;opacity:1}.auth-page .button.primary:enabled:hover{background:var(--ui-action-hover)}
[data-theme=dark] body{background:var(--ui-bg);color:var(--ui-text)}
[data-theme=dark] .auth-page{background:var(--ui-bg)}
[data-theme=dark] :is(.brand,.account-header .account-brand){color:var(--ui-text)}[data-theme=dark] :is(.brand-caption,.account-brand small){color:var(--ui-muted);border-color:var(--ui-line)}
[data-theme=dark] :is(.account-header,.center-header,.panel,.auth-card,.team-card,.invite-node>summary,.invite-application,.auth-dialog,.wechat-result){background:var(--ui-surface);color:var(--ui-text);border-color:var(--ui-line)}
[data-theme=dark] .scan-panel{background:#111}
[data-theme=dark] :is(.account-nav,.center-nav,.invite-records,.invite-node,.invite-node-body,.invite-meta,.list-row,.setting-row,.help-list li,.application){border-color:var(--ui-line)}
[data-theme=dark] :is(.invite-node-body,.segmented,.notice,.phone-field,.code-field,.button.neutral){background:var(--ui-soft)}
[data-theme=dark] :is(label,.auth-dialog h2,.team-card h3,.panel h2,.panel h3,.setting-row h2){color:var(--ui-text)}
[data-theme=dark] :is(.muted,.scan-panel p,.form-heading p,.auth-dialog p,.setting-row p,.setting-row p small,.team-card p,.team-management p,.list-row p,.application-account,.invite-node-title small,.invite-node-count,.invite-meta,.decision-reason,.account-nav a,.account-logout,.auth-policy-links a,.form-switch,.form-links,.account-info-grid dt,.brand-caption,.help-icon,.password-field button){color:var(--ui-muted)}
[data-theme=dark] .hero .eyebrow{color:var(--ui-muted)!important}
[data-theme=dark] :is(input:not([type=checkbox]),select,textarea){background:var(--ui-soft);color:var(--ui-text);border-color:var(--ui-line)}
[data-theme=dark] .auth-page input:not([type=checkbox]){background:var(--ui-field-bg);color:var(--ui-text);border-color:transparent}
[data-theme=dark] input::placeholder{color:#999}[data-theme=dark] :is(input:not([type=checkbox]),select,textarea):focus{border-color:var(--ui-accent-focus);background:var(--ui-soft)}
[data-theme=dark] .language-control select,[data-theme=dark] .phone-field>select{background-color:transparent;border:0;color:var(--ui-text)}
[data-theme=dark] .segmented button{color:var(--ui-muted)}[data-theme=dark] .segmented button[aria-selected=true]{background:var(--ui-accent-soft);color:var(--ui-accent);box-shadow:none}
[data-theme=dark] :is(.button.subtle,.badge,.pagination [aria-disabled]){background:var(--ui-soft);color:var(--ui-muted);border-color:var(--ui-line)}
[data-theme=dark] .badge.pending{background:#453a25;color:#f4cf82}[data-theme=dark] .badge.approved{background:#203f36;color:#97d5b7}[data-theme=dark] .badge.rejected{background:#472c32;color:#f5b7b7}
[data-theme=dark] a,[data-theme=dark] .setting-link,[data-theme=dark] .text-button,[data-theme=dark] .code-field button,[data-theme=dark] .account-nav a[aria-current=page]{color:var(--ui-accent)}
[data-theme=dark] .button.primary{background:var(--ui-action);color:#fff}[data-theme=dark] .button.primary:hover{background:var(--ui-action-hover)}
[data-theme=dark] .auth-page .button.primary:disabled{background:#303030;color:#999;opacity:1}
[data-theme=dark] .qr-refresh{background:#292929;border-color:#444;color:#f0f0f0}[data-theme=dark] .qr-refresh:hover{background:#383838}
[data-theme=dark] .code-field button:disabled{color:#718397}[data-theme=dark] .phone-field>.input-divider,[data-theme=dark] .code-field>.input-divider{background:var(--ui-line)}
[data-theme=dark] .auth-dialog::backdrop{background:#000000b8}[data-theme=dark] .dialog-close{color:var(--ui-text)}[data-theme=dark] .dialog-close:hover{background:var(--ui-soft)}
[data-theme=dark] .form-message{color:#ffb2ad}[data-theme=dark] .form-message.success{color:#92d7bb}[data-theme=dark] .notice.error{color:#ffb2ad;background:#452d35}
[data-theme=dark] .invite-output{color:var(--ui-text);background:var(--ui-soft);border-color:var(--ui-accent-line)}[data-theme=dark] .account-info-grid dd{color:var(--ui-text)}
[data-theme=dark] .portal-body{--surface:var(--ui-surface);--background:var(--ui-bg);--border:var(--ui-line);--text:var(--ui-text);--muted:var(--ui-muted);--navy:var(--ui-text)}
[data-theme=dark] .portal-body :is(.portal-sidebar,.portal-detail,.portal-panel,.portal-heading,.person-link,.device-card){background:var(--ui-surface);color:var(--ui-text);border-color:var(--ui-line)}
[data-theme=dark] .portal-body .portal-software-choices label{background:var(--ui-soft);color:var(--ui-text);border-color:var(--ui-line)}[data-theme=dark] .portal-body .portal-software-choices small{color:var(--ui-muted)}[data-theme=dark] .portal-body .portal-software-choices label:focus-within{border-color:var(--ui-accent)}
html[lang=en] .auth-card{height:620px;min-height:620px}html[lang=en] .scan-panel{padding-top:30px;padding-bottom:30px}html[lang=en] .scan-panel .consent{font-size:12px;line-height:20px}html[lang=en] .scan-panel form{grid-template-rows:48px 40px 40px;height:140px;min-height:140px}html[lang=en] .qr-refresh{min-width:170px}
[data-theme=dark] :is(.brand-logo,.account-brand img){filter:brightness(1.6)}
@media(max-width:1000px){.account-header{flex-wrap:wrap}.account-header-actions{gap:16px}.account-brand small{display:none}}
@media(max-width:760px){.brand{flex-wrap:wrap;gap:10px}.brand>.interface-controls{flex-basis:100%;justify-content:flex-end;margin-top:8px}.account-header-actions{width:100%;justify-content:space-between}.account-user{gap:8px}.account-display-name{max-width:100px}.account-avatar{width:30px;height:30px;font-size:16px;border-radius:10px}.language-control{padding:0 8px;gap:5px}.language-control select{min-width:85px}.interface-controls{gap:8px}.account-page-status{top:auto;bottom:18px;right:16px}.account-nav a{font-size:14px}.account-nav{gap:22px}html[lang=en] .auth-card{height:auto;min-height:0}html[lang=en] .scan-panel .consent{font-size:13px}.field-pair{grid-template-columns:1fr}}
.profile-details{min-width:0}.profile-name-row{display:flex;align-items:center;gap:8px;margin-bottom:5px}.profile-name-row h2{margin:0;font-size:20px;overflow-wrap:anywhere}.profile-edit{display:grid;place-items:center;width:32px;height:32px;flex:none;border:0;border-radius:50%;background:transparent;color:var(--ui-muted);padding:7px}.profile-edit:hover{background:var(--ui-soft);color:var(--ui-text)}.profile-edit svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.profile-dialog{width:420px;max-width:calc(100vw - 32px);max-height:calc(100dvh - 48px);overflow-y:auto;padding:30px;border:1px solid var(--ui-line);border-radius:22px;background:var(--ui-surface);color:var(--ui-text);box-shadow:0 24px 80px #0003}.profile-dialog::backdrop{background:#0006}.profile-dialog h2{font-size:21px;font-weight:500;margin:0 30px 24px 0}.profile-dialog .profile-dialog-close{position:absolute;top:12px;right:12px;display:grid;place-items:center;width:32px;height:32px;border:0;border-radius:50%;padding:0;background:transparent;font-size:26px;color:var(--ui-muted)}.profile-dialog-close:hover{background:var(--ui-soft)}.profile-dialog-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin-top:26px}.profile-dialog-actions .button{margin:0;min-width:90px}.profile-dialog .form-message:empty{display:none}
[data-theme=dark] .profile-dialog::backdrop{background:#000000b8}[data-theme=dark] .profile-dialog,[data-theme=dark] .language-options{box-shadow:0 18px 60px #0008}[data-theme=dark] .avatar{background:#303030;color:#dedede}[data-theme=dark] .code-field button:disabled{color:#777}
@media(max-width:760px){.language-control{padding:0}.language-trigger{padding:6px 8px;gap:6px}.profile-dialog{padding:26px}.profile-panel{gap:18px}}

.profile-details p{overflow-wrap:anywhere}.profile-panel>.avatar{flex:none}
.email-code-field{display:flex;align-items:center;border:1px solid var(--ui-line);border-radius:999px;background:var(--ui-soft);overflow:hidden}.email-code-field input{min-width:0;flex:1;border:0!important;background:transparent!important;box-shadow:none!important}.email-code-field button{flex:none;border:0;border-left:1px solid var(--ui-line);padding:0 20px;background:transparent;color:var(--ui-accent);font:inherit;cursor:pointer}.email-code-field button:disabled{color:var(--ui-muted);cursor:not-allowed}.email-code-field:focus-within{outline:2px solid var(--ui-accent);outline-offset:2px}form[data-email-form] .notice{color:var(--ui-muted)}
.password-label-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:20px}.password-strength{display:inline-flex;align-items:center;gap:7px;flex:none;font-size:12px;font-weight:500;color:var(--ui-muted)}.strength-bars{display:inline-flex;align-items:center;gap:3px}.strength-bars i{display:block;width:12px;height:4px;border-radius:3px;background:var(--ui-line)}.password-strength[data-level=weak]{color:#b33f3f}.password-strength[data-level=weak] i:first-child{background:currentColor}.password-strength[data-level=medium]{color:#ad6715}.password-strength[data-level=medium] i:nth-child(-n+2){background:currentColor}.password-strength[data-level=strong]{color:#277d5c}.password-strength[data-level=strong] i{background:currentColor}
.password-field .password-toggle{display:grid;place-items:center;width:34px;padding:5px;right:10px;color:var(--ui-muted);border-radius:999px}.password-toggle svg{display:block;width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.password-toggle .password-eye-off{display:none}.password-toggle[data-visible=true] .password-eye{display:none}.password-toggle[data-visible=true] .password-eye-off{display:block}.password-field input{padding-right:54px!important}.field-hint{display:block!important;margin:7px 0 0!important;font-size:12px!important;line-height:1.6;color:var(--ui-muted)}.username-feedback.pending{color:var(--ui-muted)}
.form-content{padding-right:18px}.auth-page .form-content input[aria-invalid=true],.auth-page .form-content input[aria-invalid=true]:focus{border-color:#c35b5b}
[data-theme=dark] .auth-dialog .button.neutral{background:#2b2b2b;color:#f0f0f0;border:1px solid #444}[data-theme=dark] .auth-dialog .button.neutral:hover{background:#383838}[data-theme=dark] .password-strength[data-level=weak]{color:#ee9696}[data-theme=dark] .password-strength[data-level=medium]{color:#eab778}[data-theme=dark] .password-strength[data-level=strong]{color:#8bceab}
@media(max-width:760px){.form-content{padding-right:0}.password-label-row{gap:8px}}
.approval-access-dialog{box-sizing:border-box;width:min(820px,calc(100vw - 32px));max-height:90vh;padding:28px;border:1px solid var(--ui-line);border-radius:28px;background:var(--ui-surface);color:var(--ui-text);box-shadow:0 24px 90px #0005;overflow:hidden}
.approval-access-dialog::backdrop{background:#0009}.approval-access-dialog form{display:flex;flex-direction:column;gap:14px;max-height:calc(90vh - 58px);margin:0}
.approval-access-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.approval-access-heading h2{font-size:23px;margin:0 0 8px}.approval-access-heading p{margin:0;color:var(--ui-muted);overflow-wrap:anywhere}.approval-access-close{border:0;background:transparent;color:var(--ui-text);font-size:28px;line-height:1;cursor:pointer;padding:4px 8px}
.approval-access-dialog p{margin:0;line-height:1.6}.approval-access-toolbar,.approval-access-actions{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}.approval-access-toolbar>label,.approval-device legend label,.approval-software label{display:flex;align-items:center;gap:10px;cursor:pointer}
.approval-access-dialog input[type=checkbox]{appearance:auto;width:17px;height:17px;min-width:17px;margin:0;padding:0;accent-color:var(--ui-accent)}.approval-access-dialog input:disabled{cursor:not-allowed}.approval-access-list{display:grid;align-content:start;gap:14px;overflow-y:auto;max-height:44vh;padding:2px 7px 2px 2px;min-height:60px}
.approval-device{min-width:0;margin:0;padding:14px 16px 16px;border:1px solid var(--ui-line);border-radius:16px;background:var(--ui-soft)}.approval-device legend{float:left;width:100%;max-width:100%;padding:0;margin:0 0 6px}.approval-device legend label{margin:0}.approval-device legend strong{overflow-wrap:anywhere}.approval-device>p{clear:both;font-size:13px;margin:0 0 8px;padding:0}.approval-software{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px}
.approval-software label{margin:0;padding:10px 12px;border:1px solid var(--ui-line);border-radius:12px;background:var(--ui-surface)}.approval-software label:has(input:disabled){opacity:.6;cursor:not-allowed}.approval-software strong,.approval-software small{display:block}.approval-software strong{font-size:14px;font-weight:500}.approval-software small,.approval-access-notice{font-size:12px;color:var(--ui-muted)}.approval-access-actions{justify-content:flex-end}.approval-access-dialog .form-message{min-height:24px;font-size:14px;color:var(--ui-muted)}.approval-access-dialog .form-message.error{color:#c74343}[data-theme=dark] .approval-access-dialog .form-message.error{color:#f29b9b}
@media(max-width:600px){.approval-access-dialog{padding:20px}.approval-access-dialog form{max-height:calc(90vh - 42px)}.approval-access-heading h2{font-size:20px}.approval-software{grid-template-columns:1fr}.approval-access-list{max-height:37vh}}

/* Primary selection and keyboard focus share the account green palette. */
input[type=checkbox],input[type=radio]{accent-color:var(--ui-action)}
