.stage-strategy{--stage-border:var(--border,#e4e4e7);--stage-muted:var(--muted-foreground,#71717a)}
.stage-strategy .card-header{background:var(--card,#fff);border-bottom:1px solid var(--stage-border);padding:18px 22px}
.stage-strategy h5{font-size:16px;font-weight:650}.stage-muted{font-size:12px;color:var(--stage-muted)}
.stage-account-table{max-height:490px;border:1px solid var(--stage-border);border-radius:9px}.stage-account-table table{min-width:760px;font-size:12px}.stage-account-table thead{position:sticky;top:0;z-index:1}.stage-account-table th{background:var(--muted,#fafafa);color:var(--stage-muted);font-weight:500}.stage-account-table th,.stage-account-table td{padding:10px 12px}.stage-account-table select{min-width:105px;font-size:12px}.stage-account-table td:first-child{font-weight:600}.stage-account-table td:first-child small{display:block;font-weight:400;color:var(--stage-muted)}
.stage-error{color:#b91c1c!important}.stage-ok{color:#15803d!important}
.subject-heading,.subject-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.subject-heading h6{font-size:15px;font-weight:650;margin:0 0 6px}.subject-badge{display:inline-flex;border:1px solid var(--stage-border);border-radius:6px;padding:3px 8px;font-size:11px;white-space:nowrap;background:var(--muted,#fafafa)}.subject-toolbar{margin:22px 0 10px;font-size:13px}.subject-toolbar>div{display:flex;gap:12px;flex-wrap:wrap}.subject-toolbar label{display:flex;align-items:center;gap:8px}.subject-toolbar select{width:130px}.subject-table{max-height:550px}
@media(max-width:650px){.subject-table table{min-width:680px}}
@media(max-width:650px){.stage-strategy .card-header{padding:16px}}

/* Compact roster: stage first, bounded subject labels and aligned daily usage. */
.subject-roster-heading{align-items:center}.subject-roster-heading>strong{font-size:15px;letter-spacing:-.2px}
.subject-role-counts{display:flex;gap:6px;flex-wrap:wrap}.subject-role-counts>span{padding:4px 8px;border:1px solid var(--stage-border);border-radius:6px;background:var(--muted,#f4f4f5);font-size:11px;color:var(--stage-muted)}.subject-role-counts strong{color:var(--foreground,#18181b);font-weight:600}
.subject-table table{table-layout:fixed;min-width:960px}.subject-table th{height:42px;white-space:nowrap}.subject-table td{height:76px;padding-top:13px;padding-bottom:13px;border-color:var(--stage-border);overflow-wrap:anywhere}.subject-table tbody tr:hover{background:var(--muted,#fafafa)}
.subject-account-name{font-size:13px;font-variant-numeric:tabular-nums}.subject-table td:first-child small{font-size:11px;margin-top:3px}
.subject-role[data-role="primary"]{background:var(--foreground,#18181b);color:var(--card,#fff);border-color:var(--foreground,#18181b)}.subject-role[data-role="flex"]{border-style:dashed}
.subject-scope{display:flex;align-items:flex-start;gap:10px}.subject-stage{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;min-width:42px;min-height:27px;padding:4px 7px;border:1px solid var(--stage-border);border-radius:6px;font-size:12px;line-height:1.4;font-weight:650;white-space:nowrap;background:var(--muted,#f4f4f5);color:var(--stage-muted)}
.subject-stage[data-stage="primary"],.subject-stage[data-stage="junior"],.subject-stage[data-stage="senior"]{background:var(--muted,#f4f4f5);border-color:var(--stage-border);color:var(--foreground,#3f3f46)}
.subject-scope-detail{min-width:0}.subject-chips{display:flex;align-items:center;flex-wrap:wrap;gap:4px}.subject-chip{display:inline-block;max-width:100%;padding:4px 6px;border-radius:4px;background:var(--muted,#f4f4f5);color:var(--foreground,#3f3f46);font-size:11px;line-height:19px}
.subject-expand{border:1px dashed var(--stage-border);border-radius:4px;padding:3px 7px;background:var(--card,#fff);color:var(--stage-muted);font-size:11px;line-height:19px;white-space:nowrap}.subject-expand:hover{border-color:var(--ring,#a1a1aa);color:var(--foreground,#18181b)}.subject-expand:focus-visible{outline:2px solid var(--ring,#a1a1aa);outline-offset:2px}
.subject-lock{display:block;margin-top:6px;font-size:10px;color:var(--stage-muted)}.subject-peers{display:grid;gap:4px;font-variant-numeric:tabular-nums}.subject-peers small{font-size:10px;color:var(--stage-muted);margin-left:4px}
.subject-table .subject-number{text-align:right;font-variant-numeric:tabular-nums}.subject-number strong{font-size:16px;font-weight:600;color:var(--foreground,#18181b)}.subject-number>span{margin-left:4px;font-size:10px;color:var(--stage-muted)}
.subject-account-state{display:inline-flex;align-items:center;gap:6px;font-size:11px;line-height:1.6}.subject-account-state::before{content:"";width:6px;height:6px;flex-shrink:0;border-radius:50%;background:#15803d}.subject-account-state[data-state="busy"]::before{background:#a16207}.subject-account-state[data-state="hold"]::before{background:#b91c1c}.subject-table-note{margin:9px 0 0;font-size:11px}
@media(max-width:650px){.subject-toolbar{align-items:flex-start}.subject-roster-heading{gap:8px!important}.subject-table table{min-width:960px}.subject-expand{min-height:32px;min-width:44px}}

/* Quiet capacity cards: name, remaining quota and one compact activity line. */
.subject-heading h6{margin-bottom:0}.subject-heading #subject-status:not([hidden]){margin-top:6px}
.subject-summary{display:flex;align-items:center;gap:8px 20px;flex-wrap:wrap;margin:12px 0 14px;font-size:12px;color:var(--stage-muted)}.subject-summary strong{font-size:14px;font-weight:600;color:var(--foreground,#18181b);font-variant-numeric:tabular-nums}
.subject-groups{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.subject-group{min-width:0;padding:15px 16px 13px;border:1px solid var(--stage-border);border-radius:8px;background:var(--card,#fff)}.subject-group h6{font-size:13px;line-height:1.5;font-weight:500;margin:0;color:var(--foreground,#18181b)}
.subject-group-quota{display:flex;align-items:baseline;gap:7px;margin:13px 0 12px}.subject-group-quota strong{font-size:28px;line-height:1.1;font-weight:600;font-variant-numeric:tabular-nums;color:var(--foreground,#18181b)}.subject-group-quota>span{font-size:11px;color:var(--stage-muted)}
.subject-group-counts{display:flex;flex-wrap:wrap;gap:5px 14px;font-size:11px;color:var(--stage-muted)}.subject-group-counts>span{white-space:nowrap}.subject-group-counts b{font-weight:500;color:var(--foreground,#3f3f46);font-variant-numeric:tabular-nums}
@media(max-width:1100px){.subject-groups{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.subject-group{padding:13px 12px}.subject-group h6{font-size:12px}.subject-group-counts{gap:5px 9px}.subject-group-quota strong{font-size:25px}}
@media(max-width:370px){.subject-groups{grid-template-columns:1fr}}

.subject-account-state[data-state="standby"]::before{background:var(--stage-muted,#71717a)}
