/* Account management is a compact working table; other tabs keep their styling. */
#tab-accounts .account-panel{border-radius:8px;background:rgba(17,24,36,.88);box-shadow:none;padding:20px}
#tab-accounts .accounts-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:20px}
#tab-accounts .accounts-heading h3{font-size:18px;margin:0 0 6px}
#tab-accounts .accounts-heading h3 span{margin-left:8px;font-weight:400}
#tab-accounts .accounts-header-actions{display:flex;gap:8px;flex-wrap:wrap}
#tab-accounts .btn,#tab-accounts summary.btn{border-radius:6px;font-size:12px;min-height:34px;padding:6px 12px;box-shadow:none;backdrop-filter:none;background:rgba(255,255,255,.05)}
#tab-accounts .btn-p{background:var(--accent-d);color:#041a13}
#tab-accounts .accounts-filter-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap;padding-bottom:16px}
#tab-accounts #accountSearch{height:36px;width:280px;max-width:100%;padding:8px 12px;border-radius:6px;font-size:13px}
#tab-accounts #srcFilter{height:36px;min-width:112px;padding:6px 10px;border-radius:6px;font-size:13px}
#tab-accounts #accountPoints{margin-left:auto;white-space:nowrap;color:var(--sub);font-size:12px}
#tab-accounts #accountPoints b{color:var(--text);font-size:15px;margin:0 3px;font-variant-numeric:tabular-nums}
#tab-accounts #groupBar{display:flex;gap:4px;padding:10px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);margin:0 0 4px;flex-wrap:wrap}
#tab-accounts #groupBar .gbtn{border:0;background:none;border-radius:4px;padding:7px 9px;font-size:12px;white-space:nowrap;box-shadow:none;min-height:32px;color:var(--sub)}
#tab-accounts #groupBar .gbtn.on{background:rgba(46,230,168,.14);color:var(--accent)}
#tab-accounts #groupBar .n{margin-left:3px;font-variant-numeric:tabular-nums}
#tab-accounts #groupBar .sep{height:18px;margin:7px 3px;background:var(--line)}
#tab-accounts #mobileAccountGroup{display:none}
#tab-accounts .account-menu{position:relative}
#tab-accounts .account-menu summary{list-style:none;cursor:pointer;user-select:none}
#tab-accounts .account-menu summary::-webkit-details-marker{display:none}
#tab-accounts .account-menu summary::after{content:'\2304';margin-left:5px;color:var(--sub)}
#tab-accounts .account-menu-items{position:absolute;left:0;top:calc(100% + 6px);z-index:45;width:210px;max-height:65vh;overflow:auto;padding:6px;background:#18232f;border:1px solid var(--stroke-hi);border-radius:6px;box-shadow:0 12px 30px rgba(0,0,0,.4)}
#tab-accounts #accountTools .account-menu-items{left:auto;right:0}
#tab-accounts .account-menu-items .btn{display:flex;width:100%;justify-content:flex-start;border:0;background:none;min-height:36px;text-align:left;white-space:normal}
#tab-accounts .account-menu-items .btn:hover:not(:disabled){background:rgba(255,255,255,.08)}
#tab-accounts .account-menu-items .btn:disabled{opacity:.4;cursor:default}
#tab-accounts .account-menu-items .menu-danger{color:#ff9a9a;border-top:1px solid var(--line);border-radius:0;margin-top:5px}
#accountsTable table{min-width:970px;table-layout:fixed}
#accountsTable th,#accountsTable td{padding:11px 8px;font-size:12px;vertical-align:middle}
#accountsTable th{height:40px}
#accountsTable th:nth-child(1){width:32px}
#accountsTable th:nth-child(2){width:158px}
#accountsTable th:nth-child(3){width:134px}
#accountsTable th:nth-child(4){width:76px}
#accountsTable th:nth-child(5){width:146px}
#accountsTable th:nth-child(6){width:55px}
#accountsTable th:nth-child(7){width:80px}
#accountsTable th:nth-child(8){width:96px}
#accountsTable th:nth-child(9){width:154px}
#accountsTable .account-id-btn{border:0;background:none;color:#b4efda;font:600 13px ui-monospace,Consolas,monospace;padding:0;cursor:pointer;min-height:24px;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-align:left}
#accountsTable .account-secondary{display:block;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--sub);font-size:12px;line-height:18px}
#accountsTable .account-state{display:flex;align-items:center;gap:5px;max-width:100%;flex-wrap:wrap}
#accountsTable .badge{padding:2px 7px;font-size:11px;line-height:17px}
#accountsTable .account-history{font-size:11px;color:var(--sub);white-space:nowrap}
#accountsTable .account-history.active{color:#ff9a9a}
#accountsTable .account-country{font-size:12px;color:var(--text);white-space:nowrap;background:none;border:0;cursor:pointer;padding:4px 0;min-height:28px}
#accountsTable .account-proxy{background:none;border:0;padding:0;color:var(--text);cursor:pointer;text-align:left;display:block;width:100%;min-height:24px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font:inherit}
#accountsTable .account-quota{font-size:14px;font-weight:600;white-space:nowrap;font-variant-numeric:tabular-nums}
#accountsTable .account-quota span{font-size:12px;color:var(--sub);font-weight:400}
#accountsTable .account-last-used{white-space:nowrap;line-height:19px;color:var(--sub);font-variant-numeric:tabular-nums}
#accountsTable .account-last-used b{display:block;color:var(--text);font-weight:400}
#accountsTable .account-actions{display:flex;gap:4px;align-items:center;white-space:nowrap}
#accountsTable .account-actions .btn{padding:4px 7px;min-height:28px;font-size:12px;background:none;border-color:transparent;color:var(--sub)}
#accountsTable .account-actions .btn:hover{color:var(--text);background:rgba(255,255,255,.07)}
#accountsTable .pager{border-top:1px solid var(--line);padding-top:12px}
#accountsTable .sw input:focus-visible+i{outline:2px solid var(--accent);outline-offset:3px}
.account-row-menu{position:fixed;z-index:80;width:188px;max-width:calc(100vw - 24px);max-height:60vh;overflow:auto;padding:6px;background:#18232f;color:var(--text);border:1px solid var(--stroke-hi);border-radius:6px;box-shadow:0 12px 30px rgba(0,0,0,.4)}
.account-row-menu[hidden]{display:none}
.account-row-menu button{display:block;width:100%;border:0;background:none;color:inherit;text-align:left;padding:9px 10px;font:13px inherit;cursor:pointer;border-radius:4px;min-height:34px}
.account-row-menu button:hover,.account-row-menu button:focus-visible{background:rgba(255,255,255,.09)}
.account-row-menu button.danger{color:#ff9a9a;border-top:1px solid var(--line);border-radius:0;margin-top:4px}
#accountInfoDialog{border:1px solid var(--stroke-hi);border-radius:8px;background:#15212d;color:var(--text);padding:24px;width:660px;max-width:calc(100vw - 32px);max-height:86vh;margin:auto;overflow:auto;box-shadow:0 16px 50px rgba(0,0,0,.5)}
#accountInfoDialog::backdrop{background:rgba(0,0,0,.6);backdrop-filter:blur(5px)}
#accountInfoDialog h2{font-size:18px;margin:0 0 18px;overflow-wrap:anywhere}
#accountInfoDialog .account-detail-heading{position:sticky;top:-24px;display:flex;align-items:flex-start;justify-content:space-between;gap:12px;background:#15212d;z-index:1;padding-top:4px}
#accountInfoDialog .account-detail-close{flex:none;font-size:24px;padding:0;width:32px;height:32px;min-height:32px;justify-content:center;margin-top:-4px}
#accountInfoDialog .account-detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px 24px}
#accountInfoDialog dt{color:var(--sub);font-size:12px;margin-bottom:5px}
#accountInfoDialog dd{font-size:13px;margin:0;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.5}
#accountInfoDialog .account-detail-wide{grid-column:1/-1}
#accountInfoDialog .account-detail-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end;border-top:1px solid var(--line);padding-top:16px;margin-top:20px}
#accountInfoDialog .btn{border-radius:6px;min-height:34px}
@media(max-width:620px){
  #tab-accounts .account-panel{padding:14px}
  #tab-accounts .accounts-heading{gap:12px;margin-bottom:16px}
  #tab-accounts .accounts-header-actions{width:100%;gap:6px}
  #tab-accounts .accounts-header-actions>.btn,#tab-accounts .accounts-header-actions>details{flex:1}
  #tab-accounts .accounts-header-actions summary{justify-content:center}
  #tab-accounts #accountSearch{width:100%;font-size:16px}
  #tab-accounts #srcFilter{flex:1;font-size:16px}
  #tab-accounts #accountPoints{width:100%;margin-left:0}
  #tab-accounts #accountSelection{flex:1;text-align:right}
  #tab-accounts #groupBar .gbtn{padding:6px 8px}
  #tab-accounts #groupBar{display:none}
  #tab-accounts #mobileAccountGroup{display:block;width:100%;padding:8px 10px;margin:0 0 10px;border-radius:6px;font-size:16px;min-height:36px}
  #accountInfoDialog{padding:18px}
  #accountInfoDialog .account-detail-heading{top:-18px}
  #accountInfoDialog .account-detail-grid{grid-template-columns:minmax(0,1fr)}
  #accountsTable table{display:block;min-width:0;table-layout:auto}
  #accountsTable thead{display:none}
  #accountsTable tbody{display:block}
  #accountsTable tbody tr{display:grid;grid-template-columns:22px minmax(0,1fr) minmax(0,1fr);gap:10px 8px;padding:14px 0;border-bottom:1px solid var(--line)}
  #accountsTable td{display:block;border:0;padding:0;min-width:0;white-space:normal}
  #accountsTable td:nth-child(1){grid-column:1;grid-row:1/5;padding-top:4px}
  #accountsTable td:nth-child(2){grid-column:2/4;grid-row:1;padding-right:0}
  #accountsTable td:nth-child(3){grid-column:2/4;grid-row:2}
  #accountsTable td:nth-child(4){grid-column:2;grid-row:3}
  #accountsTable td:nth-child(5){grid-column:3;grid-row:3}
  #accountsTable td:nth-child(6){grid-column:2;grid-row:4;display:flex;gap:6px;align-items:center}
  #accountsTable td:nth-child(6)::before{content:'调度';font-size:12px;color:var(--sub)}
  #accountsTable td:nth-child(7){grid-column:3;grid-row:4}
  #accountsTable td:nth-child(8){grid-column:2;grid-row:5}
  #accountsTable td:nth-child(9){grid-column:3;grid-row:5;align-self:center}
  #accountsTable .account-secondary{font-size:11px}
  #accountsTable .account-actions{flex-wrap:wrap;gap:0}
  #accountsTable .account-actions .btn{padding:4px 6px}
  #accountsTable .account-quota::before{content:'额度 ';font-size:12px;color:var(--sub);font-weight:400}
  #accountsTable .account-last-used{font-size:11px}
  #accountsTable .pager .btn{font-size:12px;padding:5px 8px}
}
@media(prefers-reduced-motion:reduce){#tab-accounts *{transition:none!important}}
