/* Account lists use the same bounded workspace and footer as the account table. */
.account-list-view #panels{overflow:hidden!important;min-height:0;display:flex;flex-direction:column}
.account-list-card{background:var(--panel);border:1px solid var(--border);border-radius:14px;padding:16px;display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}
.account-list-card .card-heading{flex:none;margin-bottom:12px;display:flex;align-items:center;justify-content:space-between;gap:12px}
.account-list-card h2{display:flex;align-items:center;gap:9px;margin:0;font-size:18px}
.account-list-card h2 svg{width:22px;height:22px;color:var(--accent)}
.account-list-card .table-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.account-list-card .table-scroll{flex:1;min-height:0;overflow:auto}
.account-list-card table{width:100%;border-collapse:separate;border-spacing:0 3px}
.account-list-card th{height:36px;text-align:start;color:var(--muted);font-weight:normal}
.account-list-card tbody tr{height:44px;background:var(--panel)}
.account-list-card td{padding:4px 12px;white-space:nowrap}
.account-list-card td:first-child{border-radius:0 10px 10px 0}
.account-list-card td:last-child{border-radius:10px 0 0 10px}
.account-list-card .web-command{min-height:34px;padding:5px 12px;display:inline-flex;align-items:center;gap:6px}
.account-list-card .web-command svg,.account-list-card .web-entity-name svg{width:16px;height:16px}
.account-list-card .web-entity-name{display:flex;align-items:center;gap:8px}
.account-list-card .telegram-blocked svg{color:var(--amber)}
.account-list-card .table-footer{display:flex;justify-content:space-between;align-items:center;flex:none;padding-top:12px;min-height:46px;gap:12px}
.account-list-card .pagination svg{width:16px;height:16px}
.account-list-card .account-list-message{margin:4px 0;color:var(--muted)}
.account-list-view .scoped-accounts>.web-tail{display:none!important}
.account-list-view .scoped-accounts{height:100%;min-height:0}
@media(max-width:700px){.account-list-card .card-heading{align-items:stretch;flex-direction:column}.account-list-card .table-controls input{min-width:100px;flex:1;width:100px}.account-list-card .table-controls{flex-wrap:wrap}.account-list-card{padding:10px}.account-list-card .table-footer{flex-wrap:wrap}}
.account-list-card .table-controls{flex-wrap:nowrap;justify-content:flex-end;min-width:0}
.account-list-card .table-controls input{width:220px;max-width:100%;min-width:100px}
.account-list-card .table-controls select{width:auto;max-width:230px}
.account-list-card .card-heading{padding:0!important;margin-bottom:12px}
.account-list-card th{padding:6px 12px;font-size:12px}
@media(max-width:1000px){.account-list-view #panels>.account-list-card{min-height:420px}.account-list-card .table-controls{width:100%!important}.account-list-card .table-controls select{flex:0 1 auto;width:auto!important}.account-list-card .table-controls input{flex:1;width:180px}}

/* Fixed controls shared with the overview and the original account table. */
.unified-account-filter-tools{display:flex;align-items:center;gap:7px;flex:none}
#status-filter.unified-account-filter,.panel-system .unified-account-filter,.unified-account-filter{display:inline-flex!important;align-items:center;justify-content:center;gap:7px;width:100px!important;min-width:100px!important;max-width:100px!important;height:40px!important;min-height:40px!important;padding:5px 8px!important;font-size:12px!important;white-space:nowrap;flex:0 0 100px}
.unified-account-filter svg{width:16px;height:16px;flex:none}
.unified-account-filter.has-filters{border-color:var(--accent)!important;color:var(--accent)!important}
#status-filter-clear.unified-account-filter-clear,.panel-system .unified-account-filter-clear,.unified-account-filter-clear{display:inline-flex!important;align-items:center;justify-content:center;width:110px!important;min-width:110px!important;height:40px!important;min-height:40px!important;padding:5px 8px!important;font-size:12px!important;white-space:nowrap;color:var(--amber)!important;border:1px solid color-mix(in srgb,var(--amber) 55%,transparent)!important;background:color-mix(in srgb,var(--amber) 9%,var(--panel))!important;flex:0 0 110px}
.unified-account-filter-clear:disabled{opacity:.45;cursor:default}
.account-multi-filter{max-height:80dvh;overflow:auto}
.account-list-card .table-scroll{overflow-x:auto;overflow-y:hidden}
.account-list-card .table-controls{flex-wrap:wrap}
.account-list-card .table-footer{flex-shrink:0}

.account-list-card .account-list-refresh{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:40px;min-height:40px;font-family:inherit!important;font-size:12px!important;font-weight:600!important;line-height:1.7;padding:8px 12px;white-space:nowrap}
.account-list-refresh svg{width:18px;height:18px;flex-shrink:0}

.online-account-refresh{display:inline-flex;align-items:center;justify-content:center;gap:6px;font-family:inherit!important;font-size:12px!important;font-weight:600!important;line-height:1.7;height:40px;white-space:nowrap}
.online-account-refresh svg{width:16px;height:16px;flex:none}

/* Shared action feedback: out of flow so menu/table positions never jump. */
#busy{position:fixed;inset:auto auto max(28px,env(safe-area-inset-bottom)) 50%;transform:translateX(-50%);z-index:10000;display:flex;align-items:center;gap:14px;width:max-content;max-width:calc(100vw - 32px);padding:16px 22px;margin:0;overflow:hidden;border:1px solid var(--border);border-radius:18px;background:var(--surface);color:var(--text);box-shadow:0 12px 40px #0003;font:500 12px/1.9 IRANSansX,Tahoma,sans-serif;pointer-events:none;animation:operation-enter .24s .12s both}
#busy .operation-spinner{display:block;flex:0 0 24px;width:24px;height:24px;border:2px solid var(--border);border-top-color:var(--accent);border-inline-end-color:var(--accent);border-radius:50%;animation:operation-spin .9s linear infinite}
#busy .operation-trail{position:absolute;bottom:0;left:0;height:2px;width:40%;background:linear-gradient(90deg,transparent,var(--accent),transparent);animation:operation-sweep 1.8s ease-in-out infinite}
@keyframes operation-enter{from{opacity:0;transform:translate(-50%,8px)}to{opacity:1;transform:translate(-50%,0)}}
@keyframes operation-spin{to{transform:rotate(360deg)}}
@keyframes operation-sweep{from{transform:translateX(-100%)}to{transform:translateX(350%)}}
@media(prefers-reduced-motion:reduce){#busy{animation:none}#busy .operation-spinner,#busy .operation-trail{animation:none}#busy .operation-trail{width:100%}}

/* The viewport reserves header/footer space; only complete rows are paginated. */
.account-list-view #panels>.studio-accounts{flex:1;min-height:0;height:100%;overflow:hidden}
.account-list-view .studio-accounts>.users-card{height:100%!important;min-height:0;display:flex;flex-direction:column;overflow:hidden}
.account-list-view .studio-accounts .table-scroll{overflow-y:hidden!important;min-height:0;flex:1!important}
.account-list-view #panels>.account-list-card{min-height:0!important}
.account-list-view .table-footer{flex-shrink:0!important}

.users-card .traffic>span{white-space:nowrap!important;overflow-wrap:normal!important;word-break:normal!important}
.users-card .traffic:not(:has(>.usage-percent))>span{grid-column:1 / -1}

@media(min-width:761px){
 .app-main.account-list-view{height:calc(100dvh - 62px);max-height:calc(100dvh - 62px);min-height:0!important;display:flex;flex-direction:column;overflow:hidden;padding-bottom:8px!important}
 .account-list-view #workflow{display:flex!important;flex-direction:column;flex:1;min-height:0;overflow:hidden;margin:0!important}
 .account-list-view #panels{flex:1;min-height:0}
 .account-list-view .page-heading,.account-list-view .studio-metrics,.account-list-view .studio-tabs{flex:none}
 .account-list-view .studio-metrics{grid-template-columns:repeat(4,minmax(0,1fr))}
 .account-list-view .studio-tabs{flex-wrap:nowrap!important;overflow-x:auto;margin-bottom:8px;gap:4px}
 .account-list-view .studio-tabs button{flex:none;white-space:nowrap}
 .app-main.account-list-view>footer{position:static!important;flex:none;margin:8px 0 0!important;padding:6px 0 0!important;min-height:18px}
}

@media(min-width:761px) and (max-height:700px){
 .app-main.account-list-view{padding-top:8px!important}
 .account-list-view .page-heading{min-height:0!important;margin-bottom:6px!important}
 .account-list-view .page-heading h1{font-size:20px!important}
 .account-list-view .page-heading p{margin:0!important}
 .account-list-view .studio-metrics{margin-bottom:6px!important;gap:6px}
 .account-list-view .studio-metric{padding:6px 10px;min-height:0}
 .account-list-view .studio-metric strong{font-size:20px}
 .account-list-view .studio-tabs{padding:0!important;min-height:0}
 .account-list-view .studio-tabs button{min-height:32px!important;padding:4px 8px!important;font-size:11px!important}
 .account-list-view .card-heading{padding:6px 10px!important;gap:6px!important;flex-direction:row!important;flex-wrap:nowrap!important}
 .account-list-view .card-heading h2{font-size:12px!important;white-space:nowrap}
 .account-list-view .table-controls{width:auto!important;flex-wrap:nowrap!important;gap:4px!important}
 .account-list-view .table-controls input{width:120px!important;min-width:70px!important;max-width:150px!important;flex:1 1 120px!important}
}
