/* Scoped operations workspace; shared dashboard controls retain their own styling. */
#efficiencyPanel.ops-root{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;min-width:0}
.ops-root *, .ops-dialog-mask *{box-sizing:border-box}
.ops-root [hidden],.ops-dialog-mask[hidden]{display:none!important}
.ops-root .card{min-width:0;padding:14px}
.ops-head{display:flex;justify-content:space-between;align-items:flex-start;flex-wrap:wrap;gap:10px;margin-bottom:12px}
.ops-head h3{margin:0;color:#1e293b;font-size:16px;line-height:1.45;font-weight:600}
.ops-head h4,.ops-dialog h4{margin:0 0 7px;font-size:15px;color:#334155}
.ops-head p{margin:4px 0 0;color:#64748b;font-size:13px;line-height:1.6}
.ops-actions,.ops-toolbar,.ops-dialog-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.ops-toolbar{margin:10px 0}.ops-dialog-actions{margin:0 0 13px;color:#64748b;font-size:13px}
.ops-btn,.ops-tabs button{height:34px;min-height:34px;display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;border:1px solid #dbe3ed;border-radius:5px;background:#fff;color:#475569;padding:0 11px;font:inherit;font-size:13px;cursor:pointer;line-height:1}
.ops-btn:hover{border-color:#93b5f4;color:#2563eb;background:#f8fbff}
.ops-btn:focus-visible,.ops-tabs button:focus-visible,.ops-link:focus-visible,.ops-warning:focus-visible{outline:2px solid #2563eb;outline-offset:2px}
.ops-tabs{display:flex;background:#f1f5f9;border-radius:6px;gap:2px}
.ops-tabs button{border-color:transparent;background:transparent}
.ops-tabs button.active{background:#eaf2ff;color:#2563eb;border-color:#bed6ff}
.ops-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;padding:12px;background:#f8fafc;border:1px solid #edf1f7;border-radius:6px}
.ops-summary>div{min-width:0;padding-left:12px;border-left:1px solid #e2e8f0}.ops-summary>div:first-child{padding-left:0;border-left:0}
.ops-summary span{font-size:13px;color:#64748b;display:block;margin-bottom:6px}.ops-summary b{display:block;font-size:22px;color:#1e293b;font-weight:600;line-height:1.35;overflow-wrap:anywhere}.ops-summary small{font-size:13px;font-weight:400;color:#64748b}
.ops-table-scroll{width:100%;max-width:100%;overflow:auto;overscroll-behavior-x:contain;border:1px solid #edf1f7;border-radius:6px}
.ops-main-table{max-height:330px}
.ops-table{width:100%;border-collapse:separate;border-spacing:0;font-size:14px;line-height:1.5;white-space:nowrap;color:#334155}
.ops-table th{font-weight:500;color:#64748b;background:#f8fafc;position:sticky;top:0;z-index:1}
.ops-table th,.ops-table td{padding:9px 11px;text-align:left;border-bottom:1px solid #edf1f7}
.ops-table tbody tr:hover{background:#f8fbff}.ops-table td small{display:block;font-size:13px;color:#94a3b8;margin-top:2px}
.ops-table tfoot td,.ops-table .ops-total td{font-weight:600;background:#eff6ff;border-top:1px solid #dbeafe;color:#1e3a8a}
.ops-table tfoot td{position:sticky;bottom:0;z-index:1}.ops-table tbody tr:last-child td{border-bottom:0}
.ops-link{padding:0;background:none;border:0;color:#2563eb;font:inherit;cursor:pointer;text-align:left}
.ops-note{font-size:13px;line-height:1.65;color:#64748b;margin:9px 0 0}.ops-toolbar>.ops-note{margin:0}
.ops-tag{display:inline-flex;align-items:center;border-radius:4px;padding:3px 6px;white-space:nowrap;font-size:13px;font-weight:500;line-height:1.4}
.ops-danger{background:#fff1f2;color:#dc2626}.ops-amber{background:#fff7ed;color:#b45309}.ops-muted{background:#f1f5f9;color:#64748b}
.ops-trend{margin-top:16px;padding-top:14px;border-top:1px solid #edf1f7;scroll-margin-top:12px;outline:none}
.ops-trend .ops-head{margin-bottom:4px}.ops-input,.ops-select,.ops-rules input:not([type=checkbox]),.ops-rules select{height:34px;min-width:0;max-width:100%;border:1px solid #dbe3ed;border-radius:5px;padding:0 9px;background:#fff;font:inherit;font-size:13px;color:#334155}
.ops-input{width:200px}.ops-select{max-width:320px}.ops-input:focus,.ops-select:focus,.ops-rules input:focus{outline:2px solid #bfdbfe;border-color:#93c5fd}
.ops-chart-scroll{width:100%;max-width:100%;overflow-x:auto}.ops-trend-svg{display:block;width:100%;min-width:780px;height:236px;max-height:none}.ops-trend-svg text{font-family:inherit;font-size:13px;fill:#64748b}.ops-trend-svg g{cursor:pointer}.ops-trend-svg g:focus{outline:none}.ops-trend-svg g:focus circle:last-child,.ops-trend-svg g:hover circle:last-child{fill:#2563eb;stroke-width:3px}
.ops-warning-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.ops-warning{display:flex;flex-direction:column;text-align:left;gap:5px;padding:11px 12px;border:1px solid #e7edf5;border-radius:6px;background:#fff;color:#475569;font:inherit;font-size:13px;line-height:1.5;cursor:pointer;min-width:0}
.ops-warning:hover{background:#f8fbff;border-color:#bad1f6}.ops-warning strong{font-size:14px;font-weight:500;color:#1e293b;overflow-wrap:anywhere}.ops-warning>span:not(.ops-warning-top),.ops-warning small{font-size:13px;color:#64748b;overflow-wrap:anywhere}.ops-warning-top{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;margin-bottom:3px}.ops-warning-status{color:#64748b;white-space:nowrap}
.ops-empty{padding:22px 8px;text-align:center;color:#94a3b8;font-size:14px;grid-column:1/-1}
.ops-dialog-mask{position:fixed;inset:0;z-index:50;background:rgba(15,23,42,.38);display:flex;align-items:center;justify-content:center;padding:20px}
.ops-dialog{width:min(1320px,100%);max-height:86vh;max-height:86dvh;overflow:auto;background:#fff;color:#334155;border-radius:9px;padding:18px;box-shadow:0 20px 60px rgba(15,23,42,.2);font-size:14px;line-height:1.6}
.ops-dialog-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.ops-dialog-head h3{font-size:18px;font-weight:600;margin:0;overflow-wrap:anywhere}.ops-dialog-desc{font-size:13px;color:#64748b;margin:5px 0 14px}.ops-dialog .ops-table-scroll{max-height:60vh;max-height:60dvh}.ops-dialog-actions{justify-content:flex-start}.ops-dialog .ops-table{font-size:14px}.ops-dialog .ops-table td:nth-child(3){max-width:450px;white-space:normal;min-width:160px}
.ops-detail-kpis,.ops-roles{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin-bottom:14px}.ops-detail-kpis>div,.ops-roles>div{padding:10px;background:#f8fafc;border-radius:5px;color:#64748b;font-size:13px}.ops-detail-kpis b,.ops-roles b{display:block;font-size:18px;color:#334155;font-weight:500;margin-top:4px}.ops-roles{grid-template-columns:repeat(5,minmax(0,1fr))}.ops-reasons{border:1px solid #fecdd3;background:#fff8f8;padding:10px 13px;border-radius:5px;font-size:14px}.ops-reasons p{margin:4px 0;color:#b91c1c}.ops-warning-detail{display:grid;grid-template-columns:125px minmax(0,1fr);gap:0;margin:0 0 15px}.ops-warning-detail dt,.ops-warning-detail dd{padding:10px;border-bottom:1px solid #edf1f7;margin:0}.ops-warning-detail dt{color:#64748b;background:#f8fafc}.ops-warning-detail dd{overflow-wrap:anywhere}.ops-rules{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;max-width:850px}.ops-rules label{display:flex;flex-direction:column;gap:6px;font-size:14px}.ops-rules .ops-checkbox{flex-direction:row;align-items:center;grid-column:1/-1}.ops-rules input[type=checkbox]{accent-color:#2563eb;width:16px;height:16px}.ops-rules .ops-note,.ops-form-error{grid-column:1/-1;margin:0}.ops-form-error{color:#dc2626;font-size:13px}
@media(max-width:1000px){.ops-warning-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.ops-summary b{font-size:20px}.ops-summary{gap:7px;padding:10px}.ops-summary>div{padding-left:8px}}
@media(max-width:600px){.ops-root .card{padding:11px}.ops-head{gap:8px}.ops-head h3{font-size:16px}.ops-actions{gap:6px}.ops-btn,.ops-tabs button{padding:0 9px}.ops-summary{grid-template-columns:repeat(2,minmax(0,1fr));row-gap:12px}.ops-summary>div:nth-child(3){border-left:0;padding-left:0}.ops-warning-grid{grid-template-columns:minmax(0,1fr)}.ops-toolbar{gap:7px}.ops-input{width:130px}.ops-select{max-width:100%;flex:1}.ops-trend .ops-select{max-width:calc(100% - 138px)}.ops-trend .ops-toolbar>.ops-note{width:100%}.ops-trend-svg{min-width:780px;height:236px;max-height:none}.ops-main-table{max-height:310px}.ops-dialog-mask{padding:10px}.ops-dialog{padding:13px;max-height:90vh;max-height:90dvh}.ops-dialog-head h3{font-size:16px}.ops-dialog .ops-table-scroll{max-height:63vh;max-height:63dvh}.ops-detail-kpis,.ops-roles{grid-template-columns:repeat(2,minmax(0,1fr))}.ops-warning-detail{grid-template-columns:92px minmax(0,1fr)}.ops-warning-detail dt,.ops-warning-detail dd{padding:8px}.ops-rules{grid-template-columns:1fr}.ops-rules .ops-checkbox{align-items:flex-start}}

.ops-warning-types{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.ops-warning-types .ops-btn{justify-content:space-between;background:#f8fafc;padding:0 12px}.ops-warning-types b{font-size:15px;color:#334155}.ops-warning-types .active{border-color:#93b5f4;background:#eff6ff;color:#2563eb}@media(max-width:600px){.ops-warning-types{grid-template-columns:repeat(2,minmax(0,1fr))}}

@media(max-width:760px){.ops-table-scroll::before{content:"左右滑动查看全部指标";display:block;position:sticky;left:0;padding:6px 9px;background:#f8fafc;color:#64748b;font-size:12px}}

/* Monthly staffing uses the existing ocean palette and a native modal. */
.ops-staffing-dialog{box-sizing:border-box;width:min(760px,calc(100vw - 32px));max-width:calc(100vw - 24px);max-height:90dvh;margin:auto;padding:0;overflow:hidden;border:1px solid var(--line,#dbe3ed);border-radius:12px;background:var(--panel,#fff);color:var(--text,#334155);font:inherit;font-size:14px;line-height:1.5;box-shadow:0 22px 60px #06101c70}
.ops-staffing-dialog::backdrop{background:#071321b8}
.ops-staffing-dialog[open]{display:flex;flex-direction:column}
.ops-staffing-dialog *{box-sizing:border-box}
.ops-staffing-dialog [hidden]{display:none!important}
.ops-staffing-header,.ops-staffing-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:none;padding:14px 18px;background:var(--control-bg,#f8fafc)}
.ops-staffing-header{border-bottom:1px solid var(--line,#e2e8f0)}
.ops-staffing-header h3{margin:0;font-size:18px;font-weight:650;line-height:1.5}
.ops-staffing-footer{justify-content:flex-end;border-top:1px solid var(--line,#e2e8f0)}
.ops-staffing-body{min-height:0;overflow:auto;overscroll-behavior:contain;padding:16px 18px}
.ops-staffing-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.ops-staffing-fields label{display:flex;flex-direction:column;gap:5px;min-width:0;font-size:14px;font-weight:500}
.ops-staffing-fields .staffing-wide{grid-column:1/-1}
.ops-staffing-fields input{width:100%;min-width:0;height:36px;padding:0 10px;border:1px solid var(--control-line,#cbd5e1);border-radius:7px;background:var(--summary-surface,#fff);color:var(--text,#334155);font:inherit;font-size:14px;line-height:1.5;caret-color:var(--cyan,#2563eb)}
.ops-staffing-fields input::placeholder{color:var(--muted,#64748b);opacity:1}
.ops-staffing-fields input:focus-visible{outline:2px solid var(--cyan,#2563eb);outline-offset:2px}
.ops-staffing-submit{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:14px}
#opsStaffingMode,.ops-staffing-basis,.ops-staffing-conflict{color:var(--muted,#64748b);font-size:12px;line-height:1.5}
.ops-staffing-dialog .ops-staffing-save,html.dashboard-v2 .ops-staffing-dialog .ops-staffing-save,html.dashboard-v2 .ops-root .ops-staffing-open{background:var(--cyan,#2563eb);border-color:var(--cyan,#2563eb);color:var(--action-text,#fff);font-weight:600}
.ops-staffing-dialog .ops-staffing-save:hover,html.dashboard-v2 .ops-staffing-dialog .ops-staffing-save:hover,html.dashboard-v2 .ops-root .ops-staffing-open:hover{background:var(--primary-hover,#1d4ed8);border-color:var(--primary-hover,#1d4ed8);color:var(--action-text,#fff)}
.ops-staffing-error{margin:10px 0 0;color:var(--red,#b91c1c);font-size:14px;overflow-wrap:anywhere}
.ops-staffing-conflict{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:10px;padding:10px;background:var(--summary-surface,#f8fafc);border:1px solid var(--line,#e2e8f0);border-radius:7px}
.ops-staffing-year{margin-top:20px;padding-top:16px;border-top:1px solid var(--line,#e2e8f0)}
.ops-staffing-year h4{margin:0 0 5px;font-size:16px;font-weight:600;line-height:1.5}
.ops-staffing-basis{margin:0 0 10px}
.ops-staffing-table-scroll{max-height:268px;overflow:auto;overscroll-behavior:contain;border:1px solid var(--line,#e2e8f0);border-radius:7px}
.ops-staffing-table-scroll table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:14px;line-height:1.5;font-variant-numeric:tabular-nums}
.ops-staffing-table-scroll th,.ops-staffing-table-scroll td{padding:8px 10px;text-align:left;vertical-align:middle;border-bottom:1px solid var(--line-soft,#e2e8f0);overflow-wrap:anywhere}
.ops-staffing-table-scroll th{position:sticky;top:0;z-index:1;background:var(--table-head,#f8fafc);color:var(--muted,#64748b);font-weight:500}
.ops-staffing-table-scroll th:first-child{width:64px}.ops-staffing-table-scroll th:nth-child(2){width:108px}.ops-staffing-table-scroll th:last-child{width:150px}
.ops-staffing-table-scroll td small{display:block;color:var(--muted,#64748b);font-size:12px}
.ops-staffing-table-scroll td .ops-btn{height:30px;min-height:30px;padding:0 8px;font-size:12px;margin:2px 4px 2px 0}
.ops-staffing-table-scroll tr:last-child td{border-bottom:0}
@media(max-width:600px){.ops-staffing-dialog{width:calc(100vw - 24px);max-height:92dvh}.ops-staffing-header,.ops-staffing-footer{padding:12px 14px}.ops-staffing-body{padding:14px}.ops-staffing-fields{gap:10px}.ops-staffing-table-scroll th,.ops-staffing-table-scroll td{padding:7px 6px}.ops-staffing-table-scroll th:first-child{width:44px}.ops-staffing-table-scroll th:nth-child(2){width:70px}.ops-staffing-table-scroll th:last-child{width:60px}.ops-staffing-table-scroll td .ops-btn{margin:2px 0}.ops-staffing-table-scroll{max-height:220px}}
@media(max-width:360px){.ops-staffing-fields{grid-template-columns:minmax(0,1fr)}.ops-staffing-header h3{font-size:18px}.ops-staffing-table-scroll th:nth-child(2){width:62px}.ops-staffing-table-scroll th:last-child{width:52px}.ops-staffing-table-scroll th,.ops-staffing-table-scroll td{padding:6px 4px}}

html.dashboard-v2 .ops-staffing-fields input{color-scheme:dark}

/* Rule reasons wrap within their column instead of widening the operations table. */
.ops-table .ops-warning-reason-cell{min-width:240px;max-width:360px;white-space:normal;overflow-wrap:anywhere}
.ops-normal{background:var(--success-bg,#ecfdf5);color:var(--green,#15803d)}
