#mailInboundPanel .mail-inbound-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,280px));gap:16px;align-items:start}
#mailInboundPanel .mail-inbound-form>label{display:flex;flex-direction:column;gap:6px;min-width:0}
#mailInboundPanel .mail-inbound-form>.choice-line{flex-direction:row;align-items:center}
#mailInboundPanel input[type=number]{max-width:110px}
#mailInboundPanel select[multiple]{height:auto;min-height:100px}
#mailInboundPanel .mail-pending>details{padding:12px;border:1px solid var(--line);border-radius:8px;margin:10px 0}
#mailInboundPanel .mail-text{white-space:pre-wrap;overflow-wrap:anywhere;max-height:220px;overflow:auto}
#mailInboundPanel .mail-pending select{max-width:320px}
@media(max-width:600px){#mailInboundPanel .mail-inbound-form{grid-template-columns:minmax(0,1fr)}}

/* V676: a bounded, alphabetic list remains readable for large notification teams. */
html body #mailInboundPanel #mailTeam{grid-column:1/-1;max-width:720px;min-width:0;display:block}
html body #mailTeam>h4{margin:0 0 10px}
html body #mailTeam .mail-team-toggle{max-width:100%;width:300px;text-align:left}
html body #mailTeam .mail-team-picker{border:1px solid var(--line);border-radius:8px;padding:12px;margin:10px 0;background:var(--surface,#fff);max-width:480px}
html body #mailTeam .mail-team-picker>label{display:block;font-size:12px;margin-bottom:6px}
html body #mailTeam .mail-team-options{max-height:288px;overflow-y:auto;margin:10px 0;overscroll-behavior:contain}
html body #mailTeam .mail-team-option{display:flex!important;align-items:center;gap:10px;min-height:36px;padding:6px 8px;border-bottom:1px solid var(--line);cursor:pointer}
html body #mailTeam .mail-team-option input{width:16px!important;height:16px!important;min-height:0!important;flex:0 0 16px;margin:0}
html body #mailTeam .mail-team-selected{list-style:none;margin:8px 0 0;padding:0;max-height:320px;overflow-y:auto;overscroll-behavior:contain;border:1px solid var(--line);border-radius:7px;background:var(--surface,#fff)}
html body #mailTeam .mail-team-selected>li{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:40px;padding:4px 12px;border-bottom:1px solid var(--line)}
html body #mailTeam .mail-team-selected>li:last-child{border-bottom:0}
html body #mailTeam .mail-team-selected>li>span{min-width:0;overflow-wrap:anywhere}
html body #mailTeam .mail-team-remove{flex:none;border:0;background:transparent;color:var(--muted);font:inherit;font-size:12px;cursor:pointer;padding:4px 6px!important;min-height:28px!important;height:auto!important}
html body #mailTeam .mail-team-count{margin:14px 0 6px;font-weight:600}
html body #mailTeam .mail-team-empty{color:var(--muted)}
html body #mailTeam [hidden],html body #mailTeam .mail-team-option[hidden]{display:none!important}
html body #mailTeam :is(button,input,ul):focus-visible{outline:2px solid var(--blue);outline-offset:2px}

html body #mailTeam .mail-team-toggle{display:inline-flex;align-items:center;gap:10px;min-height:40px;padding:9px 12px;border:1px solid var(--line);border-radius:7px;background:var(--pale,#e9f0f8);color:var(--ink);font:inherit;font-weight:600;cursor:pointer}
html body #mailTeam .mail-team-toggle>svg{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
