/* External stylesheet only. Follows the existing light/dark/system semantic tokens. */
.ql-wa-dialog{--wa-surface:var(--ql-surface,#fff);--wa-text:var(--ql-text,#243c37);--wa-soft:var(--ql-soft,#edf4f0);--wa-danger:var(--ql-danger,#b14242);box-sizing:border-box;width:min(460px,calc(100% - 20px));max-width:calc(100% - 20px);max-height:calc(100dvh - 20px);margin:auto;padding:20px;border:1px solid var(--line,#e4ebe7);border-radius:22px;background:var(--wa-surface);color:var(--wa-text);overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;box-shadow:0 18px 70px #0003;text-align:left}
.ql-wa-dialog::backdrop{background:#102d2666;backdrop-filter:blur(3px)}
.ql-wa-dialog *{box-sizing:border-box}
.ql-wa-dialog [hidden]{display:none!important}
.ql-wa-dialog button,.ql-wa-dialog input,.ql-wa-file-label,.ql-wa-login-entry{min-height:44px;min-width:44px;font:inherit;touch-action:manipulation}
.ql-wa-dialog button{margin:0;cursor:pointer;border:0;border-radius:12px;color:inherit;background:transparent;white-space:normal;line-height:1.45;overflow-wrap:anywhere}
.ql-wa-dialog button:disabled{cursor:not-allowed;opacity:.5}
.ql-wa-dialog button:focus-visible,.ql-wa-dialog input:focus-visible,.ql-wa-login-entry:focus-visible{outline:3px solid var(--green,#167b69);outline-offset:2px}
.ql-wa-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 6px}
.ql-wa-heading h2{margin:0;font-size:19px;line-height:1.5;min-width:0;overflow-wrap:anywhere}
.ql-wa-heading h2:focus{outline:none}
.ql-wa-dialog .ql-wa-close{width:44px;height:44px;min-width:44px;flex:0 0 44px;padding:0;font-size:28px;line-height:1;background:var(--wa-soft);color:var(--green,#167b69)}
.ql-wa-description,.ql-wa-note{margin:8px 0 14px;font-size:12px;line-height:1.7;color:var(--muted,#7b8c86);overflow-wrap:anywhere}
.ql-wa-status{margin:12px 0;padding:12px;border-radius:12px;background:var(--wa-soft);font-size:13px;line-height:1.6;overflow-wrap:anywhere}
.ql-wa-status.is-error{color:var(--wa-danger);border:1px solid currentColor}
.ql-wa-section-label{margin:18px 0 8px;font-size:12px;font-weight:600;color:var(--muted,#7b8c86)}
.ql-wa-list{display:grid;gap:6px}
.ql-wa-account{display:flex;align-items:stretch;min-width:0;border:1px solid transparent;border-radius:14px}
.ql-wa-account.is-current{background:var(--wa-soft);border-color:var(--line,#e4ebe7)}
.ql-wa-dialog .ql-wa-select{display:flex;align-items:center;gap:10px;flex:1;min-width:0;padding:10px 8px;text-align:left;border-radius:13px}
.ql-wa-avatar{display:grid;place-items:center;position:relative;overflow:hidden;flex:0 0 44px;width:44px;height:44px;border-radius:50%;background:var(--wa-soft);color:var(--green,#167b69);font-size:18px;font-weight:650}
.ql-wa-avatar-image,.ql-wa-telegram-image{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;background:var(--wa-soft,#edf4f0)}
.ql-wa-initial{line-height:1}
.ql-wa-account-copy{display:block;flex:1;min-width:0}
.ql-wa-account-copy strong{display:block;font-size:15px;line-height:1.5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ql-wa-account-copy small{display:block;margin-top:3px;font-size:11px;line-height:1.5;color:var(--muted,#7b8c86);overflow-wrap:anywhere}
.ql-wa-check{display:grid;place-items:center;flex:0 0 20px;color:var(--green,#167b69);font-size:19px;font-weight:650}
.ql-wa-dialog .ql-wa-remove{flex:0 0 48px;align-self:center;min-width:44px;min-height:44px;padding:8px 5px;color:var(--muted,#7b8c86);font-size:12px}
.ql-wa-dialog .ql-wa-remove:hover{color:var(--wa-danger)}
.ql-wa-dialog .ql-wa-add,.ql-wa-dialog .ql-wa-action{width:100%;min-height:48px;text-align:left;padding:12px;color:var(--green,#167b69)}
.ql-wa-dialog .ql-wa-add{margin-top:10px;background:var(--wa-soft);font-weight:650}
.ql-wa-extras{margin-top:14px;padding-top:8px;border-top:1px solid var(--line,#e4ebe7)}
.ql-wa-dialog .ql-wa-danger{color:var(--wa-danger)}
.ql-wa-dialog .ql-wa-primary,.ql-wa-dialog .ql-wa-secondary{display:block;width:100%;min-height:46px;padding:12px 14px;margin:10px 0 0;text-align:center;font-weight:600}
.ql-wa-dialog .ql-wa-primary{background:var(--green,#167b69);color:#fff}
html[data-ql-theme=dark] .ql-wa-dialog .ql-wa-primary{background:#196b56;color:#fff}
.ql-wa-dialog .ql-wa-secondary{background:var(--wa-soft);color:var(--green,#167b69)}
.ql-wa-dialog .ql-wa-danger-fill{background:#a23845;color:#fff}
html[data-ql-theme=dark] .ql-wa-dialog .ql-wa-danger-fill{background:#862b3b}
.ql-wa-dialog .ql-wa-back{display:block;margin:0 0 12px;padding:4px 0;color:var(--green,#167b69);font-size:13px;text-align:left}
.ql-wa-form label{display:block;color:var(--wa-text);font-size:13px}
.ql-wa-form label+label{margin-top:16px}
.ql-wa-dialog input:not([type=file]){display:block;width:100%;padding:12px;margin-top:7px;border:1px solid var(--line,#e4ebe7);border-radius:12px;background:var(--ql-raised,#fff);color:var(--wa-text);font-size:16px;line-height:1.5}
.ql-wa-confirm-copy{margin:14px 0 20px;font-size:14px;line-height:1.8;overflow-wrap:anywhere}
.ql-wa-confirm-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}
.ql-wa-confirm-actions .ql-wa-primary,.ql-wa-confirm-actions .ql-wa-secondary{margin-top:0;height:100%}
.ql-wa-empty{margin:14px 4px;font-size:13px;line-height:1.7;color:var(--muted,#7b8c86)}
.ql-wa-avatar-editor{display:grid;justify-items:center;gap:12px;margin:18px 0}
.ql-wa-preview,.ql-wa-preview-placeholder{width:128px;height:128px;border-radius:50%;object-fit:cover;background:var(--wa-soft)}
.ql-wa-preview-placeholder{display:grid;place-items:center;color:var(--green,#167b69);font-size:44px}
.ql-wa-file-label{display:flex;align-items:center;justify-content:center;margin:0;padding:10px 18px;border:1px solid var(--line,#e4ebe7);border-radius:12px;color:var(--green,#167b69);cursor:pointer}
.ql-wa-file{display:block;width:100%;max-width:100%;padding:7px;border:1px solid var(--line,#e4ebe7);border-radius:10px;font-size:12px;color:var(--muted,#7b8c86);background:var(--wa-surface)}
.ql-wa-file::file-selector-button{min-height:44px;padding:8px 10px;border:0;border-radius:8px;background:var(--wa-soft);color:var(--green,#167b69);font:inherit;margin-right:8px;cursor:pointer}
#profileButton{position:relative;overflow:hidden;min-width:44px;min-height:44px}
#profileButton>.ql-wa-avatar-image,#profileButton>.ql-wa-telegram-image{border-radius:50%;background:var(--soft,#edf4f0)}
.ql-wa-login-entry{display:block;width:100%;padding:12px;margin-top:18px;border:1px solid var(--line,#e4ebe7);border-radius:12px;color:var(--green,#167b69);background:var(--ql-surface,#fff);text-align:center;line-height:1.5}
@media(max-width:360px){.ql-wa-dialog{width:calc(100% - 12px);max-width:calc(100% - 12px);padding:14px}.ql-wa-dialog .ql-wa-select{gap:8px;padding-left:5px}.ql-wa-dialog .ql-wa-remove{flex-basis:44px}.ql-wa-account-copy strong{font-size:14px}}
@media(max-height:480px){.ql-wa-dialog{max-height:calc(100dvh - 12px);padding-block:12px}.ql-wa-description{margin-bottom:8px}.ql-wa-section-label{margin-top:10px}.ql-wa-preview,.ql-wa-preview-placeholder{width:88px;height:88px}}
@media(prefers-reduced-motion:reduce){.ql-wa-dialog,.ql-wa-dialog *{scroll-behavior:auto}}

/* Native entry only: preserve all chat, identity, and original-site styles. */
#accountList .account-top{flex-wrap:wrap}
#accountList .account-top>.account-top-controls{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex:0 0 auto;max-width:100%}
#accountList .account-top-controls>.account-native-open{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;min-width:104px;min-height:44px;gap:6px;padding:10px 14px;border:1px solid #176b54;border-radius:12px;background:#176b54;color:#fff;font-size:13px;font-weight:650;box-shadow:0 3px 9px #176b5426;white-space:nowrap}
#accountList .account-top-controls>.account-status{margin-left:0}
#accountList .account-native-open:focus-visible{outline:3px solid var(--green,#167b69);outline-offset:2px}
@media(max-width:440px){#accountList .account-top>.account-top-controls{flex-basis:100%}#accountList .account-top>.account-name{flex:1 1 0;min-width:0}}

#accountList .account-native-open::before{content:"↗";font-size:18px;line-height:1} #accountList .account-native-open:disabled{background:#edf1ef;border-color:var(--line,#e4ebe7);color:#6d8178;box-shadow:none;opacity:.65} html[data-ql-theme=dark] #accountList .account-native-open:not(:disabled){background:#196b56;border-color:#318f74;color:#fff} @media(hover:hover){#accountList .account-native-open:not(:disabled):hover{background:#115a46}}

/* 96: compact account header, scoped to the owner's identity cards only. */
#accountList .account-top{display:grid;grid-template-columns:44px minmax(0,1fr) 104px;align-items:start;gap:8px;min-width:0}
#accountList .account-top>.avatar{width:44px;height:44px;min-width:44px}
#accountList .account-top>.account-name{min-width:0;max-width:100%}
#accountList .account-top>.account-top-controls{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:4px;width:104px;min-width:0;max-width:100%;flex-basis:auto}
#accountList .account-top-controls>.account-native-open{width:100%;min-width:0;min-height:44px;padding:8px 6px;gap:4px}
#accountList .account-top-controls>.account-status{width:100%;min-width:0;margin:0;white-space:normal;overflow-wrap:anywhere}
#accountList .account-finance{min-width:0}
#accountList .account-balance{flex:1;min-width:0}
#accountList .account-balance-value{min-width:0;max-width:100%}
#accountList .account-recharge{min-height:44px!important}
@media(max-width:319px){#accountList .account-top{grid-template-columns:44px minmax(0,1fr)}#accountList .account-top>.account-top-controls{grid-column:1/-1;flex-direction:row;align-items:center;justify-content:space-between;width:100%}#accountList .account-top-controls>.account-native-open{width:104px}#accountList .account-top-controls>.account-status{width:auto}}

/*97: compact card density; no global page/chat/native-frame styles.*/
#accountList .account-top{grid-template-columns:44px minmax(0,1fr) 104px;gap:8px}
#accountList .account-top>.account-top-controls{gap:2px}
#accountList .account-top-controls>.account-status{min-height:20px;padding:2px 5px;font-size:11px;line-height:16px;border-radius:7px}
#accountList .account-finance{min-height:0;margin:2px 0 4px;padding:0 0 0 52px;background:transparent;gap:0;border-radius:0}
#accountList .account-balance{flex:1;gap:6px;line-height:22px;white-space:normal;flex-wrap:wrap}
#accountList .account-balance-value{flex:0 1 auto;max-width:100%;font-size:16px;line-height:22px;overflow-wrap:anywhere;overflow:visible;text-overflow:clip}
#accountList .account-actions{grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;margin-top:4px;padding-top:6px}
#accountList .account-actions button{min-width:0;min-height:44px;padding:4px 1px;font-size:12px;line-height:1.2;white-space:normal;overflow-wrap:anywhere}
#accountList .account-actions>.account-recharge{width:auto;min-width:0;min-height:44px!important;flex:initial;border-radius:10px;background:#e8f5ed;color:#117b65}
#accountList .account-actions>.account-recharge:disabled{background:#edf1ef;color:#6d8178}
html[data-ql-theme=dark] #accountList .account-finance{background:transparent}
html[data-ql-theme=dark] #accountList .account-actions>.account-recharge:not(:disabled){background:#1a3027;color:var(--ql-accent,#73c3a6)}
@media(max-width:319px){#accountList .account-top{grid-template-columns:44px minmax(0,1fr)}#accountList .account-finance{padding-left:0}}

/*99: calm account list. One identity header, one shared metadata line, quiet actions.*/
#accountsView #accountList{gap:8px}
#accountsView #accountList .account-card{padding:12px 12px 6px!important;border-radius:12px;box-shadow:none;min-width:0}
#accountsView #accountList .account-card:focus:not(:focus-visible):not(.account-drag-chosen){outline:none}
#accountsView #accountList .account-card:focus-visible:not(.account-drag-chosen){outline:2px solid var(--green,#167b69);outline-offset:-2px}
#accountsView #accountList .account-top{display:grid;grid-template-columns:40px minmax(0,1fr) 88px;gap:10px;align-items:center}
#accountsView #accountList .account-top>.avatar{width:40px;height:40px;min-width:40px;border-radius:11px}
#accountsView #accountList .account-name{min-width:0}
#accountsView #accountList .account-name strong{font-size:15px;line-height:22px;margin:0 0 2px;font-weight:650}
#accountsView #accountList .account-name p{font-size:12px;line-height:18px;margin:0}
#accountsView #accountList .account-top>.account-top-controls{display:flex;flex-direction:row;width:88px;gap:0;grid-column:auto;max-width:100%}
#accountsView #accountList .account-top-controls>.account-native-open{width:88px;min-width:44px;min-height:44px;padding:8px 4px;border-radius:9px;gap:3px;font-size:12px;line-height:18px;box-shadow:none}
#accountsView #accountList .account-native-open::before{font-size:15px}
#accountsView #accountList .account-finance{display:flex;align-items:center;gap:8px;margin:6px 0 0;padding:0;min-height:22px;background:transparent;border-radius:0;min-width:0}
#accountsView #accountList .account-finance>.account-status{display:inline-flex;flex:0 0 auto;align-items:center;gap:4px;width:auto;max-width:100%;min-height:0;margin:0;padding:0;background:transparent;border-radius:0;font-size:11px;font-weight:400;line-height:18px;white-space:nowrap}
#accountsView #accountList .account-status .status-dot{width:5px;height:5px;flex:0 0 5px;margin:0}
#accountsView #accountList .account-finance>.account-remark{flex:1 1 0;min-width:0;margin:0;font-size:11px;line-height:18px;color:var(--muted,#7b8c86)!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#accountsView #accountList .account-balance{display:flex;flex:0 1 auto;align-items:baseline;gap:5px;max-width:55%;min-width:0;flex-wrap:nowrap;line-height:20px;font-size:10px;color:var(--muted,#7b8c86)}
#accountsView #accountList .account-balance>span{flex:0 0 auto}
#accountsView #accountList .account-balance-value{flex:0 1 auto;min-width:0;max-width:100%;font-size:14px;font-weight:600;line-height:20px;color:var(--ql-text,#243c37);font-variant-numeric:tabular-nums;overflow:visible;overflow-wrap:anywhere;white-space:normal;text-overflow:clip}
#accountsView #accountList .account-actions{display:grid;grid-template-columns:repeat(5,minmax(44px,1fr));gap:0;margin:6px 0 0;padding:3px 0 0;border-top:1px solid var(--line,#e4ebe7)}
#accountsView #accountList .account-actions>button{width:auto;min-width:44px;min-height:44px;padding:4px 1px;border:0;border-radius:6px;background:transparent;box-shadow:none;color:var(--muted,#7b8c86);font-size:12px;font-weight:400;line-height:18px;white-space:normal;overflow-wrap:anywhere}
#accountsView #accountList .account-actions>button.account-recharge{min-height:44px!important;flex:initial}
#accountsView #accountList .account-actions>button:is(.account-login,.account-recharge,[aria-pressed=true]){color:var(--green,#167b69);font-weight:600}
#accountsView #accountList .account-actions>button.account-logout{color:var(--ql-danger,#ad4949)}
#accountsView #accountList .account-actions>button:disabled{color:var(--muted,#7b8c86);opacity:.45}
#accountsView #accountList button:focus-visible{outline:2px solid var(--green,#167b69);outline-offset:-2px}
@media(hover:hover){#accountsView #accountList .account-actions>button:not(:disabled):hover{background:var(--ql-soft,#f2f6f4)}}
@media(max-width:359px){#accountsView #accountList .account-top{gap:8px}#accountsView #accountList .account-finance{gap:6px}#accountsView #accountList .account-name strong{font-size:14px}}
@media(max-width:299px){#accountsView #accountList .account-top{grid-template-columns:36px minmax(0,1fr) 80px;gap:6px}#accountsView #accountList .account-top>.avatar{width:36px;height:36px;min-width:36px}#accountsView #accountList .account-top>.account-top-controls,#accountsView #accountList .account-top-controls>.account-native-open{width:80px}#accountsView #accountList .account-finance{flex-wrap:wrap}#accountsView #accountList .account-balance{max-width:100%}#accountsView #accountList .account-actions{grid-template-columns:repeat(3,minmax(44px,1fr))}}
