.account-inbound-view{container:account-inbound / inline-size}
.account-inbound-view header{display:flex;flex-wrap:wrap;justify-content:space-between;gap:12px;align-items:center;margin-bottom:var(--sp-4)}
.account-inbound-view .header-actions{display:flex;margin-left:auto;align-items:center;gap:8px;flex-wrap:wrap}
.account-inbound-view .ainb-header-overview{display:flex;flex:1 1 360px;align-items:center;flex-wrap:wrap;gap:8px;min-width:0}
.account-inbound-view .ainb-env-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px;margin:12px 0}
.account-inbound-view .ainb-env-card{border:1px solid var(--border);border-radius:var(--r-md);padding:10px 12px;background:var(--bg-elevated)}
.account-inbound-view .ainb-env-card.ok{border-color:color-mix(in srgb, var(--success, #16a34a) 45%, var(--border))}
.account-inbound-view .ainb-env-card.bad{border-color:color-mix(in srgb, var(--danger, #dc2626) 45%, var(--border))}
.account-inbound-view .ainb-env-card b{display:block;font-size:var(--fs-sm);margin-bottom:4px}
.account-inbound-view .ainb-env-card span{font-size:var(--fs-2xs);color:var(--text-muted);word-break:break-word}
.account-inbound-view .ainb-create-form{display:grid;gap:12px;max-width:640px}
.account-inbound-view .ainb-create-actions{display:flex;gap:8px}
.account-inbound-view .ainb-job-actions{display:flex;gap:6px;flex-wrap:wrap}

.account-inbound-view .ainb-live-log{max-height:360px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere}.account-inbound-view progress{display:block;width:100%}.account-inbound-view dialog form{display:grid;gap:12px}.account-inbound-view label{display:grid;gap:6px}
.account-inbound-view .ainb-flow-choice{display:grid;gap:8px;text-align:left;padding:16px;border:1px solid var(--border);border-radius:var(--r-md);background:var(--bg-elevated);color:var(--text-primary);cursor:pointer}
.account-inbound-view .ainb-flow-choice:hover{border-color:var(--accent)}.account-inbound-view .ainb-flow-choice span{font-size:var(--fs-2xs);color:var(--text-muted);line-height:1.7}
.account-inbound-view .ainb-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px}.account-inbound-view .ainb-fields .metric-note{grid-column:1/-1}
.account-inbound-view .ainb-draft-steps{display:grid;gap:14px;margin:16px 0}.account-inbound-view .ainb-draft-step{min-width:0;margin:0;border:1px solid var(--border);border-radius:var(--r-lg);padding:16px}.account-inbound-view .ainb-draft-step legend{padding:0 8px;font-weight:600}
.account-inbound-view .ainb-step-number{display:inline-grid;place-items:center;width:28px;height:28px;border-radius:50%;background:var(--bg-elevated);border:1px solid var(--border);font-size:13px}
.account-inbound-view .ainb-step-tools{display:flex;justify-content:flex-end;gap:4px;margin-bottom:10px}.account-inbound-view .ainb-check{display:flex;align-items:center;gap:8px}.account-inbound-view .ainb-submit-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;border-top:1px solid var(--border);padding-top:16px}
.account-inbound-view .ainb-empty{padding:32px 16px;text-align:center;color:var(--text-muted)}.account-inbound-view .ainb-import{margin-bottom:20px}.account-inbound-view .ainb-import>summary{padding:16px;cursor:pointer}
.account-inbound-view .ainb-run-steps{display:flex;gap:12px;list-style:none;margin:0 0 24px;padding:0;flex-wrap:wrap}.account-inbound-view .ainb-run-step{display:flex;align-items:center;gap:10px;padding:12px 16px;border:1px solid var(--border);border-radius:var(--r-md);flex:1;min-width:160px}.account-inbound-view .ainb-run-step div{display:grid;gap:4px}.account-inbound-view .ainb-run-step span:last-child{font-size:var(--fs-2xs);color:var(--text-muted)}
.account-inbound-view .ainb-run-step[data-state="running"]{border-color:var(--accent);background:var(--bg-elevated)}.account-inbound-view .ainb-run-step[data-state="succeeded"] .ainb-step-number{color:var(--success,#16a34a)}.account-inbound-view .ainb-run-step[data-state="failed"]{border-color:var(--danger,#dc2626)}.account-inbound-view .ainb-run-output{display:grid;gap:20px}.account-inbound-view .ainb-run-output summary{cursor:pointer}
.account-inbound-view [hidden]{display:none!important}
@media(max-width:900px){.account-inbound-view .ainb-submit-bar{align-items:stretch;flex-direction:column}}
.account-inbound-view .ainb-operations{display:grid;gap:18px;min-width:0}.account-inbound-view .ainb-operations .panel{margin:0}.account-inbound-view .ainb-operations .ainb-fields{grid-template-columns:1fr}.account-inbound-view .ainb-operations .ainb-submit-bar{flex-direction:column;align-items:stretch}

.account-inbound-view .ainb-history-pagination{display:flex;gap:12px;align-items:center;justify-content:flex-end;padding:16px}.account-inbound-view #ainb-savedResult td{overflow-wrap:anywhere;max-width:500px}.account-inbound-view #ainb-savedResult th{font-weight:400;max-width:300px;overflow-wrap:anywhere}
.account-inbound-view .ainb-records-dialog{width:min(1160px,94vw);max-width:94vw;max-height:88vh;overflow:auto}.account-inbound-view .ainb-records-dialog #ainb-runDetail{margin-top:20px}.account-inbound-view .ainb-records-dialog .table-wrap{overflow-x:auto}.account-inbound-view .ainb-records-dialog td{overflow-wrap:anywhere}.account-inbound-view .ainb-records-dialog .ainb-live-log{max-height:240px}

.ainb-browser-window{position:fixed;inset:auto;margin:0;width:min(380px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);overflow:auto;z-index:1100;padding:0;box-sizing:border-box;border:1px solid var(--border);border-radius:8px;background:var(--bg-elevated);color:var(--text-primary);box-shadow:0 8px 24px #0004}.ainb-browser-window[data-expanded="true"]{width:min(860px,calc(100vw - 24px),calc((100dvh - 100px)*1.44))}.ainb-browser-handle{display:flex;align-items:center;gap:8px;padding:8px 10px;border-bottom:1px solid var(--border);cursor:grab;touch-action:none;user-select:none}.ainb-browser-window[data-dragging="true"] .ainb-browser-handle{cursor:grabbing}.ainb-browser-heading{flex:1;min-width:0;display:grid;gap:2px}.ainb-browser-heading h3{font-size:var(--fs-sm);line-height:1.3;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ainb-browser-heading span{font-size:var(--fs-xs);line-height:1.3;color:var(--text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ainb-browser-tools{display:flex;gap:5px;flex-shrink:0}.ainb-browser-action{appearance:none;border:1px solid var(--border);background:var(--bg-subtle);box-shadow:var(--sh-rim);color:var(--text-muted);font:inherit;font-size:var(--fs-xs);padding:4px 5px;border-radius:4px;cursor:pointer}.ainb-browser-action:hover{background:var(--bg-hover);color:var(--text-primary)}.ainb-browser-action:disabled{opacity:.55;cursor:default}.ainb-browser-action:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.ainb-browser-window canvas{display:block;width:100%;height:auto;min-height:120px;background:#111;outline:none;touch-action:none}.ainb-browser-window canvas:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}



.account-inbound-view .ainb-connection-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--text-muted);margin-right:8px}
.account-inbound-view [data-stream="connected"] .ainb-connection-dot{background:var(--success,#16a34a);animation:ainb-heartbeat 1.6s ease-out infinite}
.account-inbound-view [data-stream="connecting"] .ainb-connection-dot,.account-inbound-view [data-stream="reconnecting"] .ainb-connection-dot{background:var(--warning,#d97706)}
@keyframes ainb-heartbeat{0%,100%{box-shadow:0 0 0 0 transparent;opacity:1}40%{box-shadow:0 0 0 5px color-mix(in srgb,var(--success,#16a34a) 25%,transparent);opacity:.7}}
@media(prefers-reduced-motion:reduce){.account-inbound-view [data-stream="connected"] .ainb-connection-dot{animation:none}}

.account-inbound-view .ainb-history-table{table-layout:fixed;min-width:0;width:100%}
.account-inbound-view .ainb-history-table th,.account-inbound-view .ainb-history-table td{white-space:normal;overflow-wrap:anywhere}
.account-inbound-view .ainb-history-account-preview{display:block;max-width:100%;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left;background:transparent;border:0;padding:0;color:inherit;font:inherit;cursor:help}
.ainb-history-accounts-popover{position:fixed;inset:auto;margin:0;width:min(640px,calc(100vw - 32px));max-height:min(360px,60vh);overflow:auto;box-sizing:border-box;padding:16px;border:1px solid var(--border);border-radius:var(--r-md);background:var(--bg-elevated);color:var(--text-primary);box-shadow:0 8px 28px #0003}
.ainb-history-accounts-popover b{display:block;margin-bottom:10px;font-size:var(--fs-sm)}
.ainb-history-account-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 20px;font-size:var(--fs-xs)}
.ainb-history-account-grid span{overflow-wrap:anywhere}
@media(min-width:761px){.account-inbound-view .ainb-history-table th:nth-child(1){width:32%}.account-inbound-view .ainb-history-table th:nth-child(2){width:23%}.account-inbound-view .ainb-history-table th:nth-child(3){width:10%}.account-inbound-view .ainb-history-table th:nth-child(4){width:21%}.account-inbound-view .ainb-history-table th:nth-child(5){width:14%}}

.ainb-outcome-summary{display:flex;gap:4px 10px;flex-wrap:wrap;font-size:var(--fs-2xs);margin:5px 0}
.ainb-outcome-success{color:var(--success,#16a34a)}.ainb-outcome-failure{color:var(--danger,#dc2626)}.ainb-outcome-pending{color:var(--text-muted)}
.ainb-history-account-grid>div{display:grid;gap:4px;min-width:0;padding:8px 0;border-top:1px solid var(--border)}
.account-inbound-view .ainb-outcome-list{display:grid;gap:8px;max-height:360px;overflow:auto}
.account-inbound-view .ainb-outcome-list>div{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;border-top:1px solid var(--border);padding-top:8px}
.account-inbound-view .ainb-outcome-list span{white-space:normal;overflow-wrap:anywhere}

.account-inbound-view .ainb-job-detail-dialog{width:min(1100px,94vw);max-width:94vw}


.account-inbound-view .ainb-account-panel{padding:0;margin:0;min-width:0}
.account-inbound-view .ainb-account-panel>.table-wrap{margin:0;padding:0}
.account-inbound-view .ainb-account-table{--ainb-row-font:clamp(.875rem,calc(.75rem + .2cqi),1rem);width:100%;min-width:0;table-layout:auto;font-size:var(--ainb-row-font)}
.account-inbound-view .ainb-account-table th,.account-inbound-view .ainb-account-table td{white-space:normal;overflow-wrap:anywhere}
.account-inbound-view .ainb-account-table th,.account-inbound-view .ainb-account-table td{text-align:center}
.account-inbound-view .ainb-account-table td{padding-block:clamp(5px,.45cqi,8px);font-size:inherit;line-height:1.35}
.account-inbound-view .ainb-account-table th{font-size:.86em}
.account-inbound-view .ainb-account-table td>button{font-size:.93em}
.account-inbound-view .ainb-account-table td:first-child:not([colspan]){text-align:left}
.account-inbound-view .ainb-account-table td:last-child:not([colspan]){white-space:nowrap}
.account-inbound-view .ainb-account-table td>.actions{justify-content:center;flex-wrap:nowrap}
.account-inbound-view .ainb-key-scope{display:flex;gap:8px;padding:10px 16px;border-bottom:1px solid var(--border)}
.account-inbound-view .ainb-plan-badge{min-height:1.6em;padding:0 .55em;box-sizing:border-box;font-size:.86em;line-height:1.5;letter-spacing:0;vertical-align:middle}
.account-inbound-view .ainb-plan-badge{font-weight:600;color:var(--ainb-plan-color,var(--text-secondary));background:color-mix(in srgb,var(--ainb-plan-color,var(--text-secondary)) 12%,var(--bg-elevated));border-color:color-mix(in srgb,var(--ainb-plan-color,var(--text-secondary)) 28%,transparent)}
.account-inbound-view .ainb-plan-badge[data-plan="plus"]{--ainb-plan-color:#70aaff}
.account-inbound-view .ainb-plan-badge[data-plan="pro"]{--ainb-plan-color:#b79aff}
.account-inbound-view .ainb-plan-badge[data-plan="team"]{--ainb-plan-color:#4fd1b0}
.account-inbound-view .ainb-plan-badge[data-plan="business"]{--ainb-plan-color:#f3bb60}
.account-inbound-view .ainb-plan-badge[data-plan="enterprise"]{--ainb-plan-color:#ed95c8}
.account-inbound-view .ainb-plan-badge[data-plan="edu"]{--ainb-plan-color:#74cddd}
[data-theme="light"] .account-inbound-view .ainb-plan-badge[data-plan="plus"]{--ainb-plan-color:#2463bf}
[data-theme="light"] .account-inbound-view .ainb-plan-badge[data-plan="pro"]{--ainb-plan-color:#7842bc}
[data-theme="light"] .account-inbound-view .ainb-plan-badge[data-plan="team"]{--ainb-plan-color:#087b63}
[data-theme="light"] .account-inbound-view .ainb-plan-badge[data-plan="business"]{--ainb-plan-color:#96620a}
[data-theme="light"] .account-inbound-view .ainb-plan-badge[data-plan="enterprise"]{--ainb-plan-color:#af347d}
[data-theme="light"] .account-inbound-view .ainb-plan-badge[data-plan="edu"]{--ainb-plan-color:#12758a}

.account-inbound-view .ainb-plan-badge[data-plan="promax"]{--ainb-plan-color:#5cdb87}
[data-theme="light"] .account-inbound-view .ainb-plan-badge[data-plan="promax"]{--ainb-plan-color:#188441}

.account-inbound-view .ainb-pool-summary{display:grid;flex:1 1 450px;grid-template-columns:repeat(6,minmax(max-content,1fr));gap:6px;min-width:0;margin:0}
.account-inbound-view .ainb-summary-card{display:flex;align-items:center;justify-content:center;gap:4px;padding:5px 7px;margin:0;min-width:0;border:1px solid var(--border);border-radius:var(--r-sm);background:var(--bg-subtle);white-space:nowrap;font-size:11px;line-height:18px}
.account-inbound-view .ainb-summary-card>span{color:var(--text-secondary)}
.account-inbound-view .ainb-summary-card>strong{font-size:12px;font-weight:600;font-variant-numeric:tabular-nums;color:var(--text-primary)}
.account-inbound-view .ainb-summary-card[data-tone="scheduling"]>strong{color:var(--pos)}
.account-inbound-view .ainb-summary-card[data-tone="rate-limited"]>strong{color:var(--warn)}
.account-inbound-view .ainb-summary-card[data-tone="abnormal"]>strong{color:var(--neg)}
.account-inbound-view .ainb-summary-remaining{grid-column:auto}
@container account-inbound (max-width:650px){.account-inbound-view .ainb-pool-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.account-inbound-view .ainb-summary-remaining{grid-column:1/-1}}

.account-inbound-view .ainb-plan-badge{position:relative;margin-right:8px;overflow:visible}
.account-inbound-view .ainb-plan-resets{position:absolute;top:-5px;right:-7px;font-size:9px;line-height:12px;min-width:12px;text-align:center;color:var(--ainb-plan-color,var(--text-secondary));background:var(--bg-elevated);border-radius:6px;padding:0 2px;font-weight:700}


@container account-inbound (max-width:1200px){
.account-inbound-view .ainb-account-table th,.account-inbound-view .ainb-account-table td{padding-inline:8px}
}

.account-inbound-view .ainb-account-table .ainb-account-email{display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;vertical-align:middle}


.account-inbound-view .ainb-allowance-header{display:grid;gap:16px;padding:18px 20px;margin-bottom:16px;border:1px solid var(--border);border-radius:12px;background:var(--bg-elevated)}
.ainb-allowance-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.ainb-allowance-summary>div{display:grid;gap:6px;min-width:0}.ainb-allowance-summary span{font-size:12px;color:var(--text-muted)}.ainb-allowance-summary strong{font-size:18px;color:var(--text-primary);font-variant-numeric:tabular-nums}.ainb-allowance-summary .has-gap strong{color:var(--neg)}
.ainb-allowance-track{position:relative;height:36px;border-radius:7px;background:var(--bg-subtle);isolation:isolate}.ainb-allowance-segment{position:absolute;top:0;height:100%;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:600;white-space:nowrap;overflow:hidden;color:#fff}.ainb-allowance-segment:first-child{border-radius:7px 0 0 7px}.ainb-allowance-segment:last-of-type{border-radius:0 7px 7px 0}
.ainb-allowance-segment[data-kind="current"],.ainb-allowance-legend i[data-kind="current"]{background:#15976b}.ainb-allowance-segment[data-kind="recovery"],.ainb-allowance-legend i[data-kind="recovery"]{background:#337fca}.ainb-allowance-segment[data-kind="gap"],.ainb-allowance-legend i[data-kind="gap"]{background:repeating-linear-gradient(135deg,#c64655 0 5px,#ac3b48 5px 10px)}
.ainb-allowance-marker{position:absolute;top:-4px;bottom:-4px;width:2px;background:var(--text-primary);z-index:1}.ainb-allowance-marker::before{content:"";position:absolute;top:-2px;left:-3px;width:8px;height:8px;border-radius:50%;background:#60a5fa;border:1px solid var(--bg-elevated)}
.ainb-allowance-ticks{position:relative;height:17px;margin-top:9px;font-size:11px;color:var(--text-muted);font-variant-numeric:tabular-nums}.ainb-allowance-ticks>span{position:absolute;white-space:nowrap;transform:translateX(-50%);text-align:center}.ainb-allowance-ticks>span:first-child{transform:none;text-align:left}.ainb-allowance-ticks>span:last-child{transform:translateX(-100%);text-align:right}
.ainb-allowance-details{display:flex;align-items:center;flex-wrap:wrap;gap:8px 20px;font-size:12px;color:var(--text-muted)}.ainb-allowance-details b{color:var(--text-secondary);font-weight:500}.ainb-allowance-gap-note{color:var(--neg)}.ainb-allowance-legend{display:inline-flex;align-items:center;gap:5px;margin-left:auto}.ainb-allowance-legend i{width:9px;height:9px;border-radius:2px;margin-left:5px}.ainb-allowance-empty{padding:9px;text-align:center;color:var(--text-muted);font-size:12px}.ainb-allowance-track.is-unknown{border:1px dashed var(--border-strong)}
@media(max-width:640px){.account-inbound-view .ainb-allowance-header{padding:14px;gap:14px}.ainb-allowance-summary{gap:10px}.ainb-allowance-summary strong{font-size:14px}.ainb-allowance-ticks{font-size:10px}.ainb-allowance-legend{margin-left:0}}

.ainb-mailbox-toolbar{display:flex;gap:12px;align-items:center;justify-content:space-between;margin-bottom:12px}.ainb-mailbox-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.ainb-mailbox-grid label{display:flex;flex-direction:column;gap:6px;min-width:0}.ainb-mailbox-grid .ainb-check{flex-direction:row;align-items:center}.ainb-mailbox-fields{border:1px solid var(--border);border-radius:8px;padding:16px}#ainb-mailboxMessage{min-height:1.4em;margin:8px 0}@media(max-width:760px){.ainb-mailbox-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:480px){.ainb-mailbox-grid{grid-template-columns:1fr}}

.ainb-mailbox-tabs{display:flex;flex:1;min-width:0;gap:8px;overflow-x:auto;padding-bottom:8px}
.ainb-mailbox-tab{flex-shrink:0;background:var(--bg-subtle);color:var(--text-secondary);border:1px solid var(--border);border-radius:var(--r-md);padding:8px 12px;white-space:nowrap;box-shadow:var(--sh-rim);cursor:pointer}
.ainb-mailbox-tab[aria-selected="true"]{color:var(--accent);border-color:var(--accent);background:color-mix(in srgb,var(--accent) 12%,var(--bg-elevated));font-weight:600}
.ainb-mailbox-tab:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}

.ainb-workflow{display:flex;flex-wrap:wrap;justify-content:center;gap:4px;max-width:360px;margin-inline:auto;white-space:normal}.ainb-workflow-chip{border:1px solid var(--border-color);border-radius:5px;padding:.15em .4em;font-size:.875em;line-height:1.5;background:var(--bg-secondary);color:var(--text-secondary);cursor:pointer;white-space:nowrap}.ainb-workflow-chip.complete{color:var(--success,#16a34a)}.ainb-workflow-chip.incomplete{color:var(--danger,#dc2626)}#ainb-pushResult:empty{display:none}#ainb-pushResult{white-space:pre-wrap;max-height:180px;overflow:auto}
.ainb-detail-accounts{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:12px}.ainb-detail-accounts[hidden]{display:none}.ainb-detail-accounts button{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.ainb-mailbox-state-tabs{padding:0 16px;margin-bottom:0}.ainb-mailbox-state-tabs .ainb-mailbox-tab{display:inline-flex;align-items:center;gap:8px}.ainb-mailbox-state-count{font-size:11px;font-variant-numeric:tabular-nums;background:var(--bg-subtle);border-radius:10px;min-width:22px;padding:1px 6px;text-align:center}

.account-inbound-view .ainb-import-config{display:grid;gap:14px}.ainb-import-config label:not(.ainb-check){display:grid;gap:6px}.ainb-import-config fieldset{min-width:0;border:1px solid var(--border);border-radius:var(--r-md);padding:12px}.ainb-import-config #ainb-pushResult{white-space:pre-wrap;overflow-wrap:anywhere;margin:0}

/* Account identity: address on the first line, shared metadata on the second. */
.account-inbound-view .ainb-account-info{min-width:0;flex:1}
.account-inbound-view .ainb-account-primary{display:flex;align-items:center;gap:6px;min-width:0;white-space:normal;line-height:1.4}
.account-inbound-view .ainb-account-primary>.ainb-account-email{flex:0 1 auto;min-width:0;white-space:normal;overflow-wrap:anywhere}
.account-inbound-view .ainb-account-primary>input,.account-inbound-view .ainb-account-primary>.badge{flex:none}
.account-inbound-view .ainb-account-meta{display:flex;flex-wrap:wrap;align-items:center;gap:6px;min-width:0;min-height:1.7em;white-space:normal;text-align:left}


.account-inbound-view .ainb-account-detail-dialog{width:min(960px,94vw)}

/* Account and mailbox imports share one dialog shell and form layout. */
.account-inbound-view .ainb-import-dialog{width:min(640px,calc(100vw - 32px));padding:0}
.account-inbound-view .ainb-import-dialog>.panel-head{padding:16px 20px;border-bottom:1px solid var(--border);margin:0}
.account-inbound-view .ainb-import-dialog h2{margin:0}
.account-inbound-view .ainb-import-form{gap:0}
.account-inbound-view .ainb-import-form>.panel-body{display:grid;gap:14px;padding:20px}
.account-inbound-view .ainb-import-form textarea{width:100%;resize:vertical;min-height:150px}
.account-inbound-view .ainb-import-form .metric-note{margin:0}
.account-inbound-view .ainb-import-form>.dialog-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 20px;border-top:1px solid var(--border);margin:0}
.account-inbound-view .ainb-import-form [role="status"]{font-size:var(--fs-sm);color:var(--text-secondary);overflow-wrap:anywhere}
.account-inbound-view .ainb-import-form button[type="submit"]{flex-shrink:0}

.account-inbound-view .ainb-profile-credentials{display:flex;align-items:center;flex-wrap:wrap;gap:16px;margin-bottom:16px}
.account-inbound-view .ainb-profile-field{display:grid;gap:6px;flex:1 1 220px;min-width:0}
.account-inbound-view .ainb-profile-field>span{font-size:var(--fs-xs);color:var(--text-secondary)}
.account-inbound-view .ainb-profile-field>code{font-family:var(--font-mono,monospace);font-size:var(--fs-sm);color:var(--text-primary);overflow-wrap:anywhere}
.account-inbound-view .ainb-profile-head{flex-wrap:nowrap;gap:12px}
.account-inbound-view .ainb-profile-head>h2{display:block;flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.account-inbound-view .ainb-profile-head>h2::before{display:inline-block;vertical-align:middle;margin-right:8px}
.account-inbound-view .ainb-profile-actions{display:flex;align-items:center;flex:0 0 auto;flex-wrap:nowrap;gap:8px}

.account-inbound-view td[data-account-selection-cell]{cursor:pointer}


.account-inbound-view .ainb-usage-badge{height:auto;min-height:1.6em;padding:0 .4em;font-size:inherit;line-height:1.5;letter-spacing:0}
.account-inbound-view .ainb-usage-amount{color:var(--text-primary)}

.account-inbound-view .ainb-usage-period[data-period="5h"]{--ainb-period-color:#70aaff}
.account-inbound-view .ainb-usage-period[data-period="7d"]{--ainb-period-color:#b79aff}
.account-inbound-view .ainb-usage-period{color:var(--ainb-period-color,var(--text-secondary));background:color-mix(in srgb,var(--ainb-period-color,var(--text-secondary)) 12%,var(--bg-elevated));border-color:color-mix(in srgb,var(--ainb-period-color,var(--text-secondary)) 28%,transparent)}
[data-theme="light"] .account-inbound-view .ainb-usage-period[data-period="5h"]{--ainb-period-color:#2463bf}
[data-theme="light"] .account-inbound-view .ainb-usage-period[data-period="7d"]{--ainb-period-color:#7842bc}


.account-inbound-view .ainb-network-fields{border:0;padding:0;margin:0;min-width:0;display:grid;gap:16px}
.account-inbound-view .ainb-network-fields>fieldset{border:1px solid var(--border);border-radius:var(--r-md);padding:16px;min-width:0}
.account-inbound-view .ainb-network-toolbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin:12px 0}
.account-inbound-view .ainb-network-toolbar>.input{flex:1 1 220px}
.account-inbound-view .ainb-network-toolbar>.select{flex:0 1 160px}
.account-inbound-view #ainb-proxyPoolRows{display:grid;gap:8px;padding-left:24px;max-height:300px;overflow:auto}
.account-inbound-view #ainb-proxyPoolRows li{padding:8px;border-bottom:1px solid var(--border);overflow-wrap:anywhere}
.account-inbound-view .ainb-proxy-picker{width:min(960px,96vw)}
.account-inbound-view .ainb-proxy-picker-table{max-height:min(52vh,520px);overflow:auto}
.account-inbound-view .ainb-proxy-picker-table thead{position:sticky;top:0;background:var(--bg-elevated);z-index:1}
.account-inbound-view .ainb-proxy-picker-table tr[data-picker-proxy]{cursor:pointer}
.account-inbound-view .ainb-worker-config{display:grid;gap:12px;padding-bottom:20px;margin-bottom:20px;border-bottom:1px solid var(--border)}
.account-inbound-view .ainb-worker-config label{display:grid;gap:6px}
.account-inbound-view .ainb-profile-proxy{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px;margin-bottom:16px;padding-bottom:16px;border-bottom:1px solid var(--border);overflow-wrap:anywhere}
.account-inbound-view .ainb-profile-proxy code{font-size:var(--fs-sm)}
.account-inbound-view .ainb-network-proxy-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.account-inbound-view .ainb-network-proxy-row>span{flex:1 1 220px;min-width:0}
.account-inbound-view .ainb-network-proxy-actions{display:flex;gap:6px;flex-shrink:0}
.account-inbound-view .ainb-network-fields label:has(>input[type="checkbox"]),.account-inbound-view .ainb-proxy-picker label:has(>input[type="checkbox"]){display:flex;align-items:center;gap:8px}
.account-inbound-view .ainb-network-fields input[type="checkbox"],.account-inbound-view .ainb-proxy-picker input[type="checkbox"]{width:16px;height:16px;margin:0;flex:0 0 auto}
.account-inbound-view .ainb-proxy-picker .dialog-actions,.account-inbound-view .ainb-worker-config .dialog-actions{display:flex;justify-content:flex-end;align-items:center;gap:10px}
.account-inbound-view #ainb-networkMessage,.account-inbound-view #ainb-workerMessage{flex:1;font-size:var(--fs-sm);color:var(--text-secondary)}
.account-inbound-view #ainb-envDialog{width:min(720px,94vw)}
.account-inbound-view .ainb-worker-config{grid-template-columns:repeat(2,minmax(0,1fr))}
.account-inbound-view .ainb-worker-config>h3,.account-inbound-view .ainb-worker-config>.dialog-actions{grid-column:1/-1}
@media(max-width:640px){.account-inbound-view .ainb-worker-config{grid-template-columns:minmax(0,1fr)}}

.ainb-api-key-detail dl{margin:0}.ainb-api-key-detail dl>div{display:grid;grid-template-columns:minmax(100px,180px) minmax(0,1fr);gap:12px;padding:10px 0;border-bottom:1px solid var(--border-color)}.ainb-api-key-detail dt{color:var(--text-secondary)}.ainb-api-key-detail dd{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}.ainb-api-key-detail dd dl>div{grid-template-columns:minmax(90px,150px) minmax(0,1fr)}

.ainb-key-heading{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:4px 0 18px}.ainb-key-heading>span{color:var(--text-secondary);font-size:12px}.ainb-key-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:24px}.ainb-key-summary>div{padding:14px;background:var(--bg-secondary);border:1px solid var(--border-color);border-radius:8px;display:flex;flex-direction:column;gap:8px}.ainb-key-summary span,.ainb-key-secret>span{font-size:12px;color:var(--text-secondary)}.ainb-key-summary strong{font-size:20px;overflow-wrap:anywhere}.ainb-key-section{margin:0 0 24px}.ainb-key-section h3{font-size:14px;margin:0 0 8px}.ainb-api-key-detail .ainb-key-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:24px}.ainb-api-key-detail .ainb-key-fields>div{grid-template-columns:100px minmax(0,1fr);font-size:13px}.ainb-key-secret{display:flex;flex-direction:column;gap:8px;padding:12px;margin-top:12px;background:var(--bg-secondary);border-radius:6px}.ainb-key-secret code{overflow-wrap:anywhere;white-space:pre-wrap;user-select:all}.ainb-key-original{border-top:1px solid var(--border-color);padding-top:14px}.ainb-key-original summary{cursor:pointer;color:var(--text-secondary)}.ainb-key-original>div{margin-top:12px}@media(max-width:640px){.ainb-key-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.ainb-api-key-detail .ainb-key-fields{grid-template-columns:minmax(0,1fr)}}

.account-inbound-view .ainb-preset-dialog{width:min(760px,94vw);padding:0}.ainb-preset-dialog>.panel-head{padding:16px 20px;margin:0;border-bottom:1px solid var(--border)}.ainb-preset-dialog>.panel-head h2{margin:0}.ainb-preset-dialog>.panel-body{padding:20px}

.account-inbound-view .ainb-process-steps{display:flex;flex-wrap:wrap;gap:10px 6px;list-style:none;margin:0;padding:0}.ainb-process-steps li{display:flex;align-items:center;gap:6px;font-size:var(--fs-2xs);line-height:1.7}.ainb-process-number{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;border-radius:50%;background:var(--bg-elevated);color:var(--accent);border:1px solid var(--border);font-size:11px}.ainb-process-arrow{margin:0 2px;color:var(--text-muted)}.ainb-process-panel .metric-note{margin:12px 0 0}

/* Bordered label/value table keeps related result fields on the same row. */
.account-inbound-view #ainb-savedResult .ainb-result-summary-cell{padding:0;max-width:none;border:0}
.account-inbound-view #ainb-savedResult .ainb-result-fields{width:100%;min-width:660px;table-layout:fixed;border-collapse:collapse;border:1px solid var(--border)}
.account-inbound-view #ainb-savedResult .ainb-result-fields th,.account-inbound-view #ainb-savedResult .ainb-result-fields td{padding:12px 14px;border:1px solid var(--border);vertical-align:top;text-align:left;line-height:1.6;overflow-wrap:anywhere;max-width:none;white-space:pre-wrap}
.account-inbound-view #ainb-savedResult .ainb-result-fields th{color:var(--text-secondary);background:var(--bg-subtle);font-size:12px;font-weight:500}
.account-inbound-view #ainb-savedResult .ainb-result-fields td{background:var(--bg-elevated);color:var(--text-primary);font-size:13px}
.account-inbound-view #ainb-savedResult .ainb-result-fields .ainb-result-empty{background:var(--bg-elevated)}
@media(max-width:800px){.account-inbound-view #ainb-savedResult .ainb-result-fields th,.account-inbound-view #ainb-savedResult .ainb-result-fields td{padding:10px}}

/* Lifecycle is the primary account workspace; collections retain independent scrolling. */
.account-inbound-view .ainb-life-workspace{box-sizing:border-box;container-type:inline-size;width:100%;min-width:0;margin:18px 0 20px;display:flex;flex-direction:column;gap:14px}
.account-inbound-view .ainb-life-workspace>[hidden]{display:none!important}
.account-inbound-view .ainb-life-workspace .actions{display:flex;align-items:center;gap:6px;flex-wrap:nowrap}
.account-inbound-view .ainb-life-workspace .btn{width:auto;min-height:30px;padding:5px 10px;font-size:14px;white-space:nowrap}
[data-tone="pool"]{--life-color:#10b981;--life-bg:#10b98114}[data-tone="archive"]{--life-color:#94a3b8;--life-bg:#94a3b814}[data-tone="scheduling"]{--life-color:#38bdf8;--life-bg:#38bdf814}[data-tone="abnormal"]{--life-color:#fb7185;--life-bg:#fb718514}[data-tone="cooldown"]{--life-color:#f59e0b;--life-bg:#f59e0b14}[data-tone="key"]{--life-color:#a78bfa;--life-bg:#a78bfa14}[data-tone="archive"].has-archives{--life-color:#ef4444;--life-bg:#ef444426;border-color:#ef444460}
.ainb-life-summary,.ainb-life-account-summary{display:grid;grid-template-columns:minmax(0,.7fr) minmax(0,1.5fr);gap:10px}
.ainb-life-financial-card{display:grid;gap:4px;min-width:0;padding:10px 14px;border:1px solid var(--border);border-radius:8px;background:var(--bg-elevated)}.ainb-life-financial-card>strong{font-size:23px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;color:var(--text-primary);line-height:1.2}
.ainb-life-account-summary{margin-bottom:12px;flex-shrink:0}

#ainb-lifeCalendarPanel,#ainb-lifeAccountsPanel{min-height:0;min-width:0}
.ainb-life-calendar-layout{display:grid;grid-template-columns:minmax(0,1fr) clamp(220px,22vw,270px);gap:18px;height:auto;min-height:0;align-items:stretch;align-content:start}
.ainb-life-calendar{position:relative;display:grid;grid-template-rows:26px minmax(0,max-content);align-content:start;border:1px solid var(--border);border-radius:12px;box-shadow:0 6px 20px #00000012;overflow:hidden;background:var(--bg-elevated);min-width:0;min-height:0}
.ainb-life-weekdays{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));align-items:center;border-bottom:1px solid var(--border);font-size:13px;color:var(--text-muted);text-align:center}
.ainb-life-days{--life-day-height:110px;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));grid-template-rows:repeat(6,var(--life-day-height));align-content:start;gap:1px;background:var(--border);min-height:0;overflow-y:auto}
.ainb-life-date,.ainb-life-day-blank{position:relative;container-type:inline-size;overflow:hidden;min-height:0;min-width:0;background:var(--bg-elevated);padding:6px;box-sizing:border-box}
.ainb-life-date{display:grid;grid-template-rows:16px auto;gap:2px;padding:4px;border:0;outline-offset:-2px;text-align:left;color:var(--text-primary);font:inherit;cursor:pointer}
.ainb-life-date:hover{background:color-mix(in srgb,var(--accent) 5%,var(--bg-elevated))}.ainb-life-date.is-selected{box-shadow:inset 0 0 0 2px var(--accent);background:color-mix(in srgb,var(--accent) 6%,var(--bg-elevated))}
.ainb-life-day-number{font-size:14px;font-weight:600;display:flex;gap:4px;align-items:center}.ainb-life-day-number small{font-size:12px;font-weight:400;color:var(--accent)}.ainb-life-date.is-today .ainb-life-day-number{color:var(--accent)}

.ainb-life-day-chips{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;gap:4px 2px;min-height:0;width:100%}.ainb-life-day-chips>span{display:flex;justify-content:space-between;align-items:center;padding:1px 2px;background:var(--life-bg);color:var(--life-color);border-radius:3px;gap:1px;font-size:12px;line-height:14px;min-width:0;white-space:nowrap}.ainb-life-day-chips small{font-size:12px;color:var(--text-muted);align-self:center}
.ainb-life-date.is-fully-archived .ainb-life-day-chips>span{background:var(--bg-subtle);color:var(--text-muted)}
.ainb-life-date.is-fully-archived .ainb-life-day-chips small{color:inherit}
.ainb-life-withdrawn{font-size:10px;color:#f59e0b;margin-left:2px;white-space:nowrap}.ainb-life-withdrawn:before{content:"（"}.ainb-life-withdrawn:after{content:"）"}
.ainb-life-today-change{font-size:11px;font-weight:500;white-space:nowrap}.ainb-life-today-change:before{content:"（"}.ainb-life-today-change:after{content:"）"}
.ainb-life-day-chips b{display:flex;align-items:center;flex-wrap:nowrap;justify-content:flex-end;font-size:11px;line-height:14px}.ainb-life-day-chips .ainb-life-today-change{color:inherit;font-size:10px;line-height:12px;margin-left:1px}

.ainb-life-day-panel,.ainb-life-timeline-panel,.ainb-life-account-list{border:1px solid var(--border);border-radius:12px;box-shadow:0 6px 20px #00000012;background:var(--bg-elevated);padding:12px;min-width:0;min-height:0;overflow:hidden}
.ainb-life-day-panel{display:grid;grid-template-rows:minmax(0,1fr);contain:size;padding:8px}

.ainb-life-day-batch{display:block;width:100%;box-sizing:border-box;text-align:left;font:inherit;color:var(--text-primary);background:var(--bg-subtle);border:1px solid var(--border);border-radius:8px;padding:10px;cursor:pointer}
.ainb-life-day-batch+.ainb-life-day-batch{margin-top:8px}
.ainb-life-day-batch:hover,.ainb-life-day-batch:focus-visible{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 6%,var(--bg-elevated))}
.ainb-life-day-batch:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.ainb-life-day-batch>strong{display:block;font-size:15px;line-height:1.5}
.ainb-life-batch-time{display:block;color:var(--text-muted);font-size:12px;line-height:1.5;margin-top:4px}
.ainb-life-day-batch>.ainb-life-event-meta{display:flex;justify-content:space-between;gap:8px;margin-top:6px;color:var(--text-muted);font-size:12px}
.ainb-life-day-batch .ainb-life-event-tags{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));margin:8px 0 0}
.ainb-life-day-batch .ainb-life-event-tags>span{display:flex;align-items:center;justify-content:space-between;gap:4px;white-space:nowrap}
.ainb-life-day-events{min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain}

.ainb-life-event-tags{display:flex;flex-wrap:wrap;gap:4px;margin:7px 0}.ainb-life-event-tags>span{font-size:12px;border:1px solid color-mix(in srgb,var(--life-color) 35%,transparent);border-radius:4px;padding:3px 5px;color:var(--life-color);background:var(--life-bg)}
.ainb-life-event-meta{display:flex;justify-content:space-between;gap:8px;font-size:12px;color:var(--text-muted);overflow-wrap:anywhere}
.ainb-life-empty{display:grid;gap:8px;padding:clamp(12px,3vh,32px) 10px;text-align:center;color:var(--text-muted);font-size:14px;line-height:1.6;align-content:center;min-width:0}.ainb-life-empty b{font-weight:500;color:var(--text-primary)}
.ainb-life-account-layout{display:grid;grid-template-columns:clamp(300px,29vw,380px) minmax(0,1fr);gap:14px;height:100%;min-height:0}.ainb-life-account-list{min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain}.ainb-life-group-title{position:sticky;top:-12px;z-index:2;background:var(--bg-elevated);padding:12px;margin:-12px -12px 12px;border-bottom:1px solid var(--border);font-size:15px;line-height:1.5;color:var(--text-primary)}
.ainb-life-account-row{display:grid;grid-template-columns:18px minmax(0,1fr);align-items:center;width:100%;text-align:left;gap:8px;padding:10px;margin:0 0 6px;border:1px solid var(--border);border-radius:7px;background:var(--bg-elevated);color:var(--text-primary);cursor:pointer;box-sizing:border-box;min-width:0}.ainb-life-account-row.is-selected{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 6%,var(--bg-elevated))}.ainb-life-account-heading,.ainb-life-account-meta{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}.ainb-life-account-heading strong{font-size:14px;font-weight:500;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ainb-life-account-meta{justify-content:flex-start;flex-wrap:wrap}.ainb-life-account-state{flex:none}.ainb-life-account-usage{flex:none;margin-left:auto;font-variant-numeric:tabular-nums}.ainb-life-account-row small{font-size:12px;color:var(--text-muted)}
.ainb-life-timeline-panel{display:flex;flex-direction:column}.ainb-life-timeline-panel>.metric-note{font-size:13px;margin:0 0 10px;flex-shrink:0}

.ainb-life-trace-calendar{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,172px),1fr));align-content:start;grid-auto-rows:110px;gap:10px;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;padding:1px;flex:1}
.ainb-life-trace-day{min-width:0;border:1px solid var(--border);border-radius:8px;background:var(--bg-elevated);overflow:hidden;display:flex;flex-direction:column}.ainb-life-trace-day.is-today{border-color:var(--accent)}
.ainb-life-trace-day>header{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;border-bottom:1px solid var(--border);gap:6px}.ainb-life-trace-day>header time{display:flex;align-items:center;gap:8px}.ainb-life-trace-day>header b{font-size:23px;line-height:1;font-variant-numeric:tabular-nums}.ainb-life-trace-day>header small,.ainb-life-trace-day>header>span{font-size:12px;color:var(--text-muted)}
.ainb-life-trace-summary{display:flex;align-items:center;justify-content:center;gap:5px;padding:10px 6px;flex:1;min-width:0}.ainb-life-trace-summary .badge{font-size:14px!important;white-space:nowrap;padding:3px 7px}.ainb-life-trace-arrow{color:var(--text-muted);font-size:17px}

/* Keep wheel/touch scrolling without showing tracks inside the lifecycle view. */
.ainb-life-days,.ainb-life-day-events,.ainb-life-account-list,.ainb-life-trace-calendar{scrollbar-width:none}
.ainb-life-days::-webkit-scrollbar,.ainb-life-day-events::-webkit-scrollbar,.ainb-life-account-list::-webkit-scrollbar,.ainb-life-trace-calendar::-webkit-scrollbar{display:none}

.ainb-life-date:focus-visible,.ainb-life-account-row:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}

.account-inbound-view .ainb-life-workspace .badge,.account-inbound-view .ainb-life-workspace .metric-note{font-size:13px}
.ainb-life-day-chips .ainb-life-metric-name{display:inline;font-size:11px}
@container(max-width:180px){
 .ainb-life-day-chips .ainb-life-today-change:before,.ainb-life-day-chips .ainb-life-today-change:after{content:none}
}
@container(max-width:90px){
 .ainb-life-day-chips>span{flex-direction:column;gap:0;padding:0}
 .ainb-life-day-chips .ainb-life-metric-name{font-size:10px;line-height:12px}
 .ainb-life-day-chips b{font-size:10px;line-height:12px}
 .ainb-life-day-chips .ainb-life-today-change{font-size:8px;line-height:12px}
 .ainb-life-day-number small{display:none}
}
@media(max-width:700px){
 .account-inbound-view .ainb-life-workspace{gap:10px}
 .ainb-life-calendar-layout{grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto;gap:8px;height:auto;align-items:stretch}
 .ainb-life-date,.ainb-life-day-blank{padding:2px}
 .ainb-life-day-panel{contain:none;padding:8px;min-height:140px;max-height:300px}
 .ainb-life-day-events{max-height:280px}
 .ainb-life-account-layout{grid-template-columns:minmax(0,1fr);grid-template-rows:140px minmax(0,1fr);gap:8px}

}



@container(max-width:55px){
 .ainb-life-day-chips b{flex-wrap:wrap;justify-content:center}

 .ainb-life-day-chips .ainb-life-metric-name{font-size:9px}
 .ainb-life-day-chips b{font-size:9px}
 .ainb-life-day-chips .ainb-life-today-change{font-size:7px;margin-left:0}
}


@container(max-width:950px){.ainb-life-days{--life-day-height:144px}}




@media(max-width:400px){.ainb-life-days{--life-day-height:148px}}
@media(max-width:400px){
 .ainb-life-date,.ainb-life-day-blank{padding:1px}
 .ainb-life-day-chips>span{padding-inline:0}
}

@container(max-width:180px){.ainb-life-withdrawn:before,.ainb-life-withdrawn:after{content:none}}

.account-inbound-view .ainb-account-table .ainb-account-action,.account-inbound-view .ainb-profile-actions .ainb-account-action{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;min-height:30px;padding:5px;margin:0 3px 0 0;vertical-align:middle;border:1px solid var(--border);border-radius:6px;background:var(--bg-subtle);color:var(--text-secondary);cursor:pointer;box-sizing:border-box}
.account-inbound-view .ainb-account-action svg{display:block;width:18px;height:18px;pointer-events:none;flex:none}
.account-inbound-view .ainb-account-action:hover:not(:disabled){color:var(--accent);border-color:var(--accent);background:color-mix(in srgb,var(--accent) 8%,transparent)}
.account-inbound-view .ainb-account-action.ainb-credentials-complete{color:var(--success,#16a34a)}
.account-inbound-view .ainb-account-action:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.account-inbound-view .ainb-account-action:disabled{opacity:.4;cursor:not-allowed}
.account-inbound-view .ainb-account-action[data-account-delete]:hover{color:var(--negative,#ef4444);border-color:currentColor}


.ainb-life-financial-label{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:13px;color:var(--text-muted)}
.ainb-life-cost-refresh{display:inline-flex;align-items:center;justify-content:center;flex:0 0 24px;width:24px;height:24px;border:1px solid var(--border);border-radius:5px;color:var(--text-primary);background:var(--bg-subtle);cursor:pointer;font-size:18px;line-height:1;padding:0}.ainb-life-cost-refresh:hover{color:var(--accent);border-color:var(--accent)}.ainb-life-cost-refresh:disabled{opacity:.45;cursor:wait}.ainb-life-cost-refresh:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

.ainb-life-credit-values{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.ainb-life-credit-values>div{display:grid;align-content:start;gap:4px;min-width:0}.ainb-life-credit-values>div>span{font-size:12px;color:var(--text-muted)}.ainb-life-credit-values strong{font-size:20px;line-height:1.4;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;color:var(--text-primary)}.ainb-life-credit-values strong.is-negative{color:#ef4444}
@media(max-width:700px){
 .ainb-life-summary,.ainb-life-account-summary{grid-template-columns:minmax(0,1fr) minmax(0,1.6fr);gap:6px}
 .ainb-life-financial-card{padding:8px}
 .ainb-life-credit-values{grid-template-columns:minmax(0,1fr);gap:4px}
 .ainb-life-credit-values>div{grid-template-columns:minmax(0,1fr) auto;align-items:baseline;gap:2px}
 .ainb-life-credit-values strong{font-size:16px}
}

.ainb-life-key-query{border:1px solid var(--border);border-radius:5px;padding:2px 8px;background:var(--bg-subtle);color:var(--accent);font-size:12px;line-height:20px;cursor:pointer;white-space:nowrap}.ainb-life-key-query:hover{border-color:var(--accent)}.ainb-life-key-query:disabled{opacity:.5;cursor:wait}.ainb-life-key-query:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

.ainb-life-today-summary{display:grid;margin-bottom:14px;grid-template-columns:repeat(7,minmax(0,1fr));gap:10px}
.ainb-life-today-card{font:inherit;text-align:left;cursor:pointer;appearance:none;transition:border-color .16s ease,box-shadow .16s ease;min-width:0;display:grid;gap:6px;padding:10px 14px;border:1px solid var(--border);border-top:2px solid var(--life-color);border-radius:8px;background:var(--life-bg)}
.ainb-life-today-card>span{font-size:13px;color:var(--text-muted)}.ainb-life-today-card>strong{font-size:25px;line-height:1.15;color:var(--life-color);font-variant-numeric:tabular-nums}
@media(max-width:760px){.ainb-life-today-summary{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.ainb-life-today-card{padding:7px 10px}}

[data-tone="resting"]{--life-color:#8b7acb;--life-bg:color-mix(in srgb,#8b7acb 8%,var(--bg-elevated))}

[data-tone="pending"]{--life-color:#fbbf24;--life-bg:#fbbf2414}

.ainb-life-summary:has(>.ainb-life-business-card),.ainb-life-account-summary:has(>.ainb-life-operation-history){grid-template-columns:minmax(120px,.7fr) minmax(240px,1.5fr) minmax(220px,1.2fr)}
.ainb-life-business-buttons{display:flex;gap:6px;flex-wrap:wrap;align-content:start}.ainb-life-business-buttons .btn{padding:4px 9px;min-height:28px;font-size:12px}
.ainb-business-dialog{width:min(600px,90vw);max-height:85dvh}.ainb-business-dialog>.panel-body{display:grid;gap:12px;overflow-y:auto}.ainb-business-dialog .panel{margin:0}.ainb-business-dialog .ainb-operations .ainb-submit-bar{flex-direction:row}
@media(max-width:1200px){.ainb-life-summary,.ainb-life-account-summary,.ainb-life-summary:has(>.ainb-life-business-card),.ainb-life-account-summary:has(>.ainb-life-operation-history){grid-template-columns:minmax(0,.7fr) minmax(0,1.5fr)}.ainb-life-business-card,.ainb-life-operation-history{grid-column:1/-1}}
.ainb-life-account-actions{display:flex;align-items:center;gap:6px}
.ainb-resource-dialog{width:min(1000px,88vw);max-height:86dvh}.ainb-resource-dialog>.panel-body{overflow:auto}.ainb-resource-dialog .ainb-account-panel{padding:0}
.ainb-life-workspace #ainb-lifeAccountsPanel{height:clamp(480px,calc(100dvh - 330px),760px)}
@media(max-width:700px){.ainb-life-workspace #ainb-lifeAccountsPanel{height:780px}}
.account-inbound-view .ainb-life-month-nav{display:flex;align-items:center;gap:6px}
.ainb-life-month-watermark{position:absolute;inset:0;z-index:1;display:grid;place-items:center;pointer-events:none;user-select:none;font-size:clamp(20px,30cqw,56px);font-weight:700;line-height:1;color:color-mix(in srgb,var(--text-primary) 5%,transparent);text-shadow:0 8px 30px color-mix(in srgb,var(--text-primary) 3%,transparent)}
.account-inbound-view .ainb-connection-indicator{display:inline-flex;align-items:center;justify-content:center;width:18px;min-height:30px}.account-inbound-view .ainb-connection-indicator .ainb-connection-dot{margin:0}
.ainb-admin-settings{margin-bottom:20px;padding:20px}.ainb-admin-settings>.panel-head{margin:0 0 16px;padding:0 0 12px}.ainb-admin-settings form{display:grid;gap:12px}.ainb-settings-layout{display:grid;grid-template-columns:150px minmax(0,1fr);min-height:300px;min-width:0;overflow:hidden;gap:22px}.ainb-settings-nav{display:flex;flex-direction:column;gap:6px;align-self:start;padding:6px;background:var(--bg-subtle);border-radius:10px}.ainb-settings-nav button{border:0;border-radius:7px;padding:12px;text-align:left;color:var(--text-secondary);background:transparent;font:inherit;cursor:pointer}.ainb-settings-nav button[aria-selected="true"]{background:var(--bg-elevated);color:var(--accent);box-shadow:0 2px 6px #00000010}.ainb-settings-nav button:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}.ainb-settings-content{overflow:visible;min-width:0;min-height:0;padding-right:8px;overscroll-behavior:contain}.ainb-settings-section{display:grid;gap:16px;align-content:start}.account-inbound-view .ainb-settings-section>h3{font-size:17px;margin:0 0 2px}.ainb-settings-section fieldset{min-width:0;margin:0;border:1px solid var(--border);border-radius:10px;padding:16px;display:grid;gap:12px}.ainb-settings-section legend{padding:0 6px;color:var(--text-primary);font-weight:600}.ainb-settings-section .metric-note{margin:0;line-height:1.6}.ainb-settings-section .dialog-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;margin:0}.ainb-settings-section .dialog-actions>[role="status"]{margin-right:auto}.ainb-settings-section .ainb-mailbox-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.ainb-settings-section .ainb-worker-config{margin:0}.ainb-settings-section .ainb-worker-config>h3{font-size:14px}.ainb-settings-section #ainb-timeout,.ainb-settings-section #ainb-poolSyncSeconds{max-width:220px}
@media(max-width:700px){.ainb-settings-layout{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);gap:14px}.ainb-settings-nav{flex-direction:row;overflow-x:auto;white-space:nowrap;align-self:stretch}.ainb-settings-nav button{padding:10px 12px}.ainb-settings-content{padding-right:0}.ainb-settings-section fieldset{padding:12px}}
@media(max-width:480px){.ainb-settings-section .ainb-mailbox-grid{grid-template-columns:minmax(0,1fr)}}

.ainb-mailbox-pool-dialog{height:min(620px,80dvh);max-height:80dvh;overflow:hidden}.ainb-mailbox-pool-dialog[open]{display:flex;flex-direction:column}.ainb-mailbox-pool-dialog>.panel-head{flex-shrink:0}.ainb-mailbox-pool-actions{display:flex;align-items:center;gap:8px}.ainb-mailbox-pool-dialog>.panel-body{flex:1;min-height:0;overflow:hidden}.ainb-mailbox-pool-dialog #ainb-mailboxPanel{height:100%;display:flex;flex-direction:column;min-height:0}.ainb-mailbox-pool-dialog .ainb-mailbox-state-tabs{flex:0 0 auto;flex-wrap:wrap;padding:0 0 12px;gap:8px}.ainb-mailbox-pool-dialog #ainb-mailboxStatePanel{flex:1;min-height:0;display:flex;flex-direction:column}.ainb-mailbox-pool-dialog .table-wrap{flex:1;min-height:0;overflow:auto;margin:0}.ainb-mailbox-pool-dialog thead{position:sticky;top:0;z-index:1;background:var(--bg-elevated)}

.account-inbound-view button:focus-visible,.ainb-browser-action:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.account-inbound-view button:disabled:not(.ainb-life-today-card){opacity:.45;cursor:not-allowed}.ainb-mailbox-tab:hover:not(:disabled){border-color:var(--accent);color:var(--accent)}

.account-inbound-view .ainb-main-actions{flex:0 0 auto;margin-left:auto;gap:6px}.ainb-main-actions #ainb-recordsOpen{margin-left:auto}

.account-inbound-view>header{gap:10px}.account-inbound-view .ainb-main-actions>.btn,.account-inbound-view .ainb-life-month-nav>.btn{height:34px;padding:0 9px;font-size:12px}.account-inbound-view .ainb-pool-summary{gap:4px;flex-basis:0}.account-inbound-view .ainb-summary-card{padding:6px;font-size:12px}.account-inbound-view .ainb-summary-card strong{font-size:13px}

.ainb-life-operation-history{align-content:start;gap:10px}.ainb-life-operation-history .ainb-workflow{margin:0}

.ainb-life-account-select{display:grid;gap:8px;min-width:0;text-align:left;font:inherit;color:inherit;cursor:pointer}.ainb-life-account-row>input,.ainb-life-select-all>input{width:16px;height:16px;accent-color:var(--accent);cursor:pointer}.account-inbound-view .ainb-life-select-all{display:flex;align-items:center;gap:8px;font-size:13px;margin:0;flex:0 0 auto;white-space:nowrap}.ainb-life-group-heading{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px}.ainb-life-group-heading>span{font-size:13px;text-align:center}.ainb-life-group-heading>.btn{padding:4px 8px;min-height:28px;font-size:12px}.ainb-life-account-select:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:4px}

.ainb-life-account-tools{display:flex;align-items:center;gap:10px;margin-top:10px;min-width:0}.ainb-life-account-filters{display:flex;align-items:center;gap:5px;flex:1;min-width:0;overflow-x:auto;scrollbar-width:none;white-space:nowrap}.ainb-life-account-filters::-webkit-scrollbar{display:none}.ainb-life-account-filters button{flex:0 0 auto;display:inline-flex;align-items:center;gap:4px;border:1px solid var(--border);border-radius:6px;padding:5px 7px;font:inherit;font-size:12px;line-height:1.2;background:var(--bg-subtle);color:var(--text-secondary);cursor:pointer}.ainb-life-account-filters button[aria-selected="true"]{color:var(--accent);border-color:var(--accent);background:color-mix(in srgb,var(--accent) 10%,var(--bg-elevated))}

/* Two circular controls share one draggable container. */
.ainb-search-float{display:none;position:relative;width:56px;margin-top:12px;touch-action:none}
body:has(#view-account-inbound.active) .ainb-search-float{display:block}
#ainb-searchOpen{display:grid;place-items:center;width:56px;height:56px;min-height:0;padding:0;border-radius:50%;border:1px solid var(--border-strong);background:var(--bg-elevated);color:var(--text-secondary);box-shadow:0 6px 20px #0002;cursor:grab;touch-action:none;transition:background .16s ease,color .16s ease,border-color .16s ease,box-shadow .16s ease;transform:none}
#ainb-searchOpen:hover,#ainb-searchOpen[aria-expanded="true"]{color:var(--accent);border-color:color-mix(in srgb,var(--accent) 55%,var(--border));background:color-mix(in srgb,var(--accent) 8%,var(--bg-elevated));box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 10%,transparent),0 6px 20px #0002}
#ainb-searchOpen:active{cursor:grabbing;transform:none}
#ainb-searchOpen:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
#ainb-searchOpen svg{width:20px;height:20px;pointer-events:none}
.ainb-search-popover{position:absolute;width:min(340px,calc(100vw - 16px));overflow-y:auto;overscroll-behavior:contain;touch-action:auto;padding:20px;background:var(--bg-elevated);color:var(--text-primary);border:1px solid var(--border-strong);border-radius:18px;box-shadow:0 16px 48px #0003,0 2px 8px #0001}
.ainb-search-popover[hidden]{display:none}
.ainb-search-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px;font-size:15px}
#ainb-searchClose{display:grid;place-items:center;width:28px;height:28px;min-height:0;padding:0;border:0;border-radius:8px;background:transparent;color:var(--text-muted);font-size:20px;box-shadow:none}
#ainb-searchClose:hover{background:var(--bg-hover);color:var(--text-primary)}
.ainb-search-popover label{display:flex;flex-direction:column;gap:8px;font-size:12px;color:var(--text-secondary);margin-bottom:16px}
.ainb-search-filters{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.ainb-search-popover .input{width:100%;min-width:0;min-height:40px;border-radius:10px;font-size:13px;background:var(--bg-subtle)}
#ainb-searchSubmit{width:100%;min-height:40px;border-radius:10px;margin-top:2px}
.ainb-life-search-description{font-size:12px;color:var(--text-muted);text-align:center;padding:0 8px 8px;overflow-wrap:anywhere}

.ainb-life-today-card:not(:disabled):hover{border-color:var(--life-color);box-shadow:0 3px 12px #0001}.ainb-life-today-card:focus-visible{outline:2px solid var(--life-color);outline-offset:3px}.ainb-life-today-card:disabled{cursor:default}

.account-inbound-view .ainb-sync-pools{display:flex;flex-wrap:wrap;gap:12px 20px}
.account-inbound-view .ainb-sync-pools label{display:flex;align-items:center;gap:8px}
.account-inbound-view .ainb-profile-pools{margin-bottom:16px;line-height:1.6;overflow-wrap:anywhere}


.account-inbound-view h3{margin:0;font-size:var(--fs-sm)}

.account-inbound-view .ainb-business-task-choices{padding-bottom:12px;border-bottom:1px solid var(--border)}
.account-inbound-view .ainb-business-task-choices [aria-pressed="true"]{color:var(--accent);border-color:var(--accent);background:color-mix(in srgb,var(--accent) 12%,var(--bg-elevated))}

.ainb-allowance-timeline{position:relative}
.ainb-recovery-popover{display:none;position:absolute;right:0;top:calc(100% + 10px);z-index:60;width:min(620px,calc(100vw - 64px));border:1px solid var(--border-strong);border-radius:12px;background:var(--bg-elevated);color:var(--text-primary);box-shadow:0 12px 40px #0004;overflow:visible}
.ainb-recovery-popover::after{content:"";position:absolute;left:0;right:0;bottom:100%;height:14px}
.ainb-allowance-timeline:has(.ainb-allowance-segment[data-kind="recovery"]:hover,.ainb-allowance-segment[data-kind="recovery"]:focus-visible,.ainb-allowance-marker:hover) .ainb-recovery-popover,.ainb-recovery-popover:hover{display:block}
.ainb-recovery-popover-heading{padding:13px 16px;border-bottom:1px solid var(--border);font-size:13px;font-weight:600}
.ainb-recovery-popover-scroll{max-height:280px;overflow:auto;border-radius:0 0 12px 12px;scrollbar-width:thin}
.ainb-recovery-popover table{width:100%;border-collapse:collapse;font-size:12px}.ainb-recovery-popover th{position:sticky;top:0;background:var(--bg-elevated);color:var(--text-muted);font-weight:500}.ainb-recovery-popover td,.ainb-recovery-popover th{padding:10px 14px;text-align:center;white-space:nowrap;border-bottom:1px solid var(--border)}.ainb-recovery-popover td:first-child,.ainb-recovery-popover th:first-child{text-align:left}.ainb-recovery-popover td:first-child{max-width:290px;overflow:hidden;text-overflow:ellipsis}.ainb-recovery-popover tr:last-child td{border-bottom:0}
