/* SchoolWatch v6: bounded scroll panes and accessible fullscreen expansion. */
.sw-main-split{align-items:start;min-width:0}
.sw-main-split>.panel{min-width:0}
.watch-config>.panel{min-width:0;max-width:100%}
.watch-config .watch-table{margin-top:10px}
.sw-table-scroll{max-height:300px;overflow:auto;overscroll-behavior:contain;border:1px solid #e4eaf3;border-radius:12px;margin-top:12px}
.sw-table-scroll .watch-table{margin-top:0;min-width:450px}
.sw-table-scroll thead th{position:sticky;top:0;background:#f5f8ff;z-index:1}
.sw-panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.sw-expand{margin-left:auto;white-space:nowrap}
.sw-results-scroll{max-height:510px;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-gutter:stable;padding:2px 5px 2px 1px;border-radius:8px}
.sw-result{border:1px solid #e4eaf3;border-radius:13px;padding:14px;margin:0 0 10px;background:#fff;overflow-wrap:anywhere}
.sw-result.sw-unread{border-left:4px solid #2563eb;background:#f8fbff}
.sw-result-header{display:flex;gap:10px;align-items:flex-start}
.sw-result-title{flex:1;min-width:0}
.sw-result-header .tag{flex-shrink:0}
.sw-result p{white-space:pre-wrap;font-size:13px;line-height:1.6;margin:10px 0;color:#344359}
.sw-check{display:flex;align-items:center;padding-top:2px}
.sw-check input,.sw-bulk-controls input{width:17px;height:17px}
.sw-result-bottom{display:flex;justify-content:space-between;gap:9px;flex-wrap:wrap}
.sw-new-label{font-size:12px;color:#1752ad;font-weight:600}
.sw-bulk-controls{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:12px 0}
.sw-bulk-controls label{font-size:13px;white-space:nowrap;display:inline-flex;align-items:center;gap:6px}
.sw-bulk-controls select{min-width:170px;max-width:280px;flex:1;padding:9px;border:1px solid #cbd5e1;border-radius:8px;background:#fff}
.sw-search{display:flex;align-items:end;gap:8px;flex-wrap:wrap}
.sw-search .field{flex:1;min-width:190px}
.sw-search button,.sw-search a{margin-bottom:1px}
.sw-pagination{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:9px;margin-top:14px;font-size:12px;color:#64748b}
.sw-single-actions{display:flex;gap:6px;justify-content:flex-end;flex-wrap:wrap;margin-top:10px}
.sw-nav-badge{display:inline-flex;align-items:center;justify-content:center;margin-left:8px;min-width:22px;height:22px;border-radius:13px;padding:0 6px;font-size:11px;font-weight:800;line-height:1;background:#d82b4b;color:white}
.sw-nav-badge[hidden]{display:none!important}
.sw-nav-badge.sw-flash{animation:sw-alert-pulse .65s ease-in-out 8}
@keyframes sw-alert-pulse{0%,100%{transform:scale(1);filter:brightness(1)}50%{transform:scale(1.2);filter:brightness(1.4)}}
.sw-toast{position:fixed;right:20px;bottom:20px;z-index:1501;max-width:330px;padding:15px 18px;border:1px solid #a1baf5;border-radius:12px;background:#fff;box-shadow:0 10px 30px #142b4b30;color:#1d3559;font-size:14px}
.sw-toast a{color:#1752ad;font-weight:700}
body.sw-modal-open{overflow:hidden}
.sw-expanded{position:fixed!important;inset:14px!important;width:auto!important;height:auto!important;max-width:none!important;max-height:none!important;overflow:auto!important;z-index:1450!important;margin:0!important;padding:20px!important;box-shadow:0 0 0 100vmax #091b33a6,0 20px 70px #06193235!important;border-radius:16px!important;background:#fff!important;display:flex!important;flex-direction:column}
.sw-expanded .sw-results-scroll{max-height:none!important;flex:1;min-height:150px}
.sw-expanded .sw-table-scroll{max-height:none!important;min-height:150px;flex:1}
.sw-expanded .sw-pagination{margin-top:auto}
@media(max-width:700px){.sw-expanded{inset:5px!important;padding:12px!important}.sw-result-header{flex-wrap:wrap}.sw-result-header .tag{margin-left:28px}.sw-results-scroll{max-height:410px}.sw-bulk-controls select{min-width:140px}.sw-toast{left:10px;right:10px;bottom:10px;max-width:none}}
@media(prefers-reduced-motion:reduce){.sw-nav-badge.sw-flash{animation:none;outline:3px solid #efbc40}}
