/* Shared collaboration views. Keep all business data in the database API. */
:root{--collab-blue-soft:#edf4fb;--collab-teal-soft:#edf7f4;--collab-radius:10px}
body.dialog-open{overflow:hidden;overscroll-behavior:none}
button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}
button:disabled,input:disabled,select:disabled,textarea:disabled{cursor:not-allowed}
input:disabled,select:disabled,textarea:disabled{background:#f1f4f7;color:#788b9b}
.muted{color:var(--muted)}
.page-section{min-width:0}
.main-content{padding-top:25px}
.mode-notice{padding:12px 16px;margin-bottom:16px;border:1px solid #ead3b1;border-radius:8px;background:#fff7ed;color:#815122;font-size:14px;line-height:1.6}
.identity-control{display:flex;align-items:center;gap:9px;color:#6d8293;font-size:11px;white-space:nowrap}
.identity-control select{max-width:160px;min-height:34px;padding:5px 27px 5px 10px;border:1px solid var(--line);border-radius:6px;color:var(--ink-2);background:#fff;font-size:12px}
.top-actions{flex-shrink:0}
.sidebar{overflow-y:auto}
.sidebar-footer{line-height:1.8}
.scope-box{height:auto;min-height:58px;padding-top:10px;padding-bottom:10px}
.page-head p{max-width:760px;line-height:1.8}
.day-banner{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:13px 16px;margin-bottom:18px;border:1px solid #d4e4e1;border-radius:8px;background:#f0f8f5;color:var(--teal);font-size:12px}
.day-banner>div{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.day-banner b{font-size:12px}
.day-banner span{font-size:11px;color:#66817c}
.day-banner a{color:var(--teal);text-decoration:none;white-space:nowrap;font-size:11px}
.day-banner a:hover{text-decoration:underline}
.permission-pill{display:inline-flex;align-items:center;border:1px solid #d5e3ed;border-radius:20px;padding:5px 12px;color:#4b6d88;background:#f6f9fc;font-size:11px;white-space:nowrap}
.kpi-card{text-align:left;font:inherit;color:inherit;transition:border-color .15s,box-shadow .15s}
.kpi-card:hover{border-color:#a7c0d5;box-shadow:0 5px 18px rgba(28,64,92,.08)}
.kpi-top>span:last-child{display:grid;place-items:center;width:25px;height:25px;border-radius:7px;background:#edf3f8;color:var(--blue);font-size:16px}
.kpi-card[data-kpi="upstream"] .kpi-top>span:last-child{color:#a46d25;background:#fff5e5}
.kpi-card[data-kpi="downstream"] .kpi-top>span:last-child{color:var(--teal);background:#edf7f4}
.filter-bar{flex-wrap:wrap}
.search-box{flex:1;min-width:205px;max-width:390px}
.filter-bar select{max-width:190px}
.filter-chip{white-space:nowrap}
.table-wrap{max-width:100%;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
.schedule-table{min-width:1160px;table-layout:fixed}
.schedule-table th{height:43px;color:#647c8f;font-size:11px;background:#f4f7fa}
.schedule-table th:nth-child(1){width:52px}
.schedule-table th:nth-child(2){width:220px}
.schedule-table th:nth-child(3){width:174px;color:#416c98;background:#eef4fa}
.schedule-table th:nth-child(4){width:175px;background:#f0f6f4;color:#427368}
.schedule-table th:nth-child(5){width:174px;background:#edf5f5;color:#467c78}
.schedule-table th:nth-child(6){width:225px}
.schedule-table th:nth-child(7){width:82px}
.schedule-table td{height:auto;padding-top:16px;padding-bottom:16px;white-space:normal;vertical-align:top;line-height:1.7;overflow-wrap:anywhere}
.schedule-table .pin-btn{margin-top:2px;min-width:26px;min-height:30px}
.work-cell-td>b,.work-cell-td>span,.work-cell-td>small,.local-plan>b,.local-plan>span,.local-plan>small{display:block}
.work-cell-td>b{color:var(--ink);font-size:12px;letter-spacing:.01em}
.work-cell-td>span{color:#5f7587;font-size:11px;margin:5px 0}
.work-cell-td>small{color:#8b9ca9;font-size:10px}
.local-plan>b{color:#325c56;font-size:12px;margin-bottom:4px}
.local-plan>span:not(.status-tag){font-size:11px;color:#4d697d;font-variant-numeric:tabular-nums}
.local-plan>small{font-size:10px;color:#7b8d9b;margin:4px 0 6px;line-height:1.8}
.local-plan .status-tag{display:inline-flex;max-width:100%;height:auto;min-height:22px;line-height:1.5;padding:3px 6px;white-space:normal}
.relation-cell>small{display:block;color:#8c9ba7;font-size:10px;line-height:1.7;margin-top:3px}
.relation-button{display:flex;flex-direction:column;align-items:stretch;text-align:left;width:100%;padding:8px 9px;border:1px solid #e3ebf3;border-radius:7px;background:#f7faff;color:#3c658a;line-height:1.6}
.relation-button:hover{border-color:#adc8df;background:#eef5fb}
.relation-button>span{display:block;font-size:11px;margin:1px 0}
.relation-button i{font-style:normal;font-size:9px;color:#7d91a3;margin-left:3px}
.relation-button small{font-size:9px;color:#7891a8;margin-top:6px}
.schedule-table td:nth-child(5) .relation-button{background:#f5faf8;border-color:#dcece6;color:#3e786c}
.schedule-table td:nth-child(5) .relation-button:hover{background:#edf6f2;border-color:#b4d6ca}
.schedule-table td:nth-child(5) .relation-button small{color:#6c9388}
.note-preview{display:block;width:100%;text-align:left;background:transparent;color:#4e687c;padding:0;line-height:1.7}
.note-preview>span{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;white-space:pre-wrap;overflow-wrap:anywhere;font-size:11px}
.note-preview>small{display:block;color:#91a0ad;font-size:9px;line-height:1.7;margin-top:6px}
.note-preview:hover>span{color:var(--blue)}
.list-pagination{display:flex;justify-content:flex-end;align-items:center;gap:8px;padding:13px 20px;border-top:1px solid #edf1f4}
.list-pagination>span{margin-right:auto;color:#8395a3;font-size:11px}
.list-pagination .btn{height:30px;padding:0 11px;font-size:11px}
.card-foot{line-height:1.8;padding-top:10px;padding-bottom:10px}
.cards-view{grid-template-columns:repeat(2,minmax(0,1fr))}
.schedule-card{min-width:0;padding:17px}
.schedule-card h3{overflow-wrap:anywhere;line-height:1.7}
.schedule-card p{line-height:1.9;overflow-wrap:anywhere}
.card-relation-actions{display:flex;justify-content:space-between;gap:12px;padding-top:12px;margin-top:12px;border-top:1px solid #e7edf1}
.schedule-card>.note-preview{padding-top:10px;margin-top:10px;border-top:1px dashed #e3e9ee}
.impact-summary{padding:11px 12px;border:1px solid #e0e9ef;border-radius:6px;background:#f7fafc;line-height:1.7}
.impact-summary-flow{display:flex;flex-wrap:wrap;align-items:center;gap:4px;font-size:10px}
.impact-summary-flow>b{color:var(--ink-2);font-size:11px}
.impact-upstream{color:#50789b}.impact-downstream{color:#497f72}.impact-arrow{color:#92a8b8}.impact-attention{color:#b57530}
.impact-summary>small{display:block;margin-top:4px;font-size:9px;color:#8b9da9}
.impact-unknown>b{font-size:11px;font-weight:600;color:#778d9f}

/* A wider reading surface makes both sides of the handover visible together. */
.drawer{width:min(920px,100vw)}
.drawer-head{padding:24px 28px 20px;flex-shrink:0}
.drawer-head h2{overflow-wrap:anywhere;font-size:22px}
.drawer-head>.icon-btn{flex-shrink:0}
.drawer-tabs{display:flex;gap:5px;padding:0 24px;border-bottom:1px solid var(--line);background:#fbfcfd;flex-shrink:0;overflow-x:auto}
.drawer-tabs>button{min-height:47px;white-space:nowrap;background:transparent;border-bottom:2px solid transparent;padding:0 14px;color:#7d90a0;font-size:12px}
.drawer-tabs>button.active{border-color:var(--teal);color:var(--teal);font-weight:700}
.drawer-tabs>button:hover{background:#f1f6f6}
.drawer-tabs>button>span{display:inline-block;min-width:17px;padding:0 4px;margin-left:4px;border-radius:10px;background:#e5eff1;font-size:10px}
.drawer-body{padding:23px 28px 35px;flex:1;min-height:0;overscroll-behavior:contain}
.detail-hero{padding-bottom:20px;gap:20px}
.detail-hero>div{min-width:0}
.detail-hero h3{font-size:15px;line-height:1.7;overflow-wrap:anywhere}
.detail-hero p{font-size:11px;line-height:1.8}
.detail-hero>.status-tag{flex-shrink:0;height:auto;padding:4px 7px}
.detail-section{line-height:1.8;color:#6f8495;font-size:12px}
.detail-section h3{font-size:13px;color:var(--ink-2)}
.detail-grid{gap:18px;padding:4px 0}
.detail-field{min-width:0}
.detail-field b{overflow-wrap:anywhere;line-height:1.8}
.detail-field span{font-size:11px;color:#899ca9}
.impact-detail{padding-top:20px}
.impact-detail-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.impact-detail-head h3{font-size:15px;margin:0}
.impact-link-state{display:inline-flex;align-items:center;flex-shrink:0;padding:3px 7px;background:#f0f4f7;border-radius:4px;color:#7b8e9d;font-size:9px;font-weight:400;white-space:nowrap}
.impact-notice{margin:0 0 18px;padding:10px 12px;border-radius:6px;background:#fff8ed;border:1px solid #f1e6d2;color:#a4814d;font-size:11px;line-height:1.9}
.impact-branches{display:grid;grid-template-columns:minmax(0,1fr) 62px minmax(0,1fr);gap:10px;align-items:start}
.impact-column{min-width:0}
.impact-column>h4{display:flex;align-items:center;justify-content:space-between;gap:7px;font-size:12px;color:#46779f;margin:0 0 11px;padding:10px 11px;background:#edf4fb;border-radius:6px;line-height:1.8}
.impact-column:last-child>h4{color:#467e70;background:#edf7f2}
.impact-column>h4>span{font-size:10px;font-weight:400;white-space:nowrap}
.impact-self{display:flex;align-items:center;flex-direction:column;gap:8px;padding-top:77px;text-align:center;color:#8199ab;font-size:18px}
.impact-self>b{font-size:11px;color:#47677a;padding:10px 3px;background:#f0f5f7;border:1px solid #dfe8ee;border-radius:6px;align-self:stretch}
.impact-self>small{font-size:9px;line-height:1.8;color:#94a5b1}
.impact-link{border:1px solid #dce7ef;border-radius:8px;background:#fff;padding:14px 13px;margin-bottom:12px;overflow-wrap:anywhere}
.impact-column:last-child .impact-link{border-color:#dbe8e1}
.impact-link-head{display:flex;justify-content:space-between;align-items:center;gap:9px}
.impact-link-head>b{font-size:13px;color:#365b78}
.impact-column:last-child .impact-link-head>b{color:#3e7568}
.impact-deliverable{font-size:12px;line-height:1.8;color:#5d778b;margin:9px 0 12px}
.impact-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px 12px;padding:12px 10px;margin:0;background:#f7f9fb;border-radius:6px}
.impact-facts>div{min-width:0}
.impact-facts dt{font-size:9px;color:#8da0af;margin-bottom:4px}
.impact-facts dd{font-size:11px;color:#506e82;margin:0;font-variant-numeric:tabular-nums;line-height:1.7}
.impact-link-context{padding-top:5px}
.impact-link-context p{margin:9px 0;color:#607a8b;font-size:10px;line-height:1.9}
.impact-link-context p>span{display:block;font-size:9px;color:#91a3b0;margin-bottom:1px}
.impact-warning{padding:9px 10px;margin:12px 0 0;background:#fff5e7;border-radius:5px;color:#ae7d3c;font-size:10px;line-height:1.9}
.impact-provenance{padding-top:10px;margin:12px 0 0;border-top:1px dashed #dce5ec;color:#96a6b1;font-size:9px;line-height:1.9}
.impact-empty{min-height:145px;padding:28px 16px;text-align:center;border:1px dashed #d6e2ea;border-radius:7px;background:#fafcfd;color:#7c93a4;font-size:12px;line-height:1.9}
.impact-empty small{display:block;margin-top:8px;color:#94a4af;font-size:10px}
.impact-footnote,.impact-calendar-hint{font-size:10px;line-height:1.9;color:#8ca0ad;margin:13px 0 0}
.impact-calendar-hint{padding:9px 12px;border-radius:5px;background:#f0f7f5;color:#7a948c}

/* Notes are shared records with visible authors, dates, and preserved line breaks. */
.notes-toolbar{display:grid;grid-template-columns:minmax(220px,1fr) minmax(240px,360px);gap:12px;margin-bottom:17px;max-width:1050px}
.notes-toolbar input,.notes-toolbar select,.form-label input,.form-label select,.assignment-row select,.note-composer select{width:100%;min-height:39px;border:1px solid var(--line);border-radius:6px;background:#fff;color:#47677d;padding:8px 11px;font-size:12px;min-width:0}
.notes-toolbar input::placeholder,.form-label input::placeholder{color:#a2afb9}
.notes-feed{display:flex;flex-direction:column;gap:14px;max-width:1050px}
.shared-note{padding:20px 23px 14px;background:#fff;border:1px solid #dce6ed;border-radius:9px;box-shadow:0 3px 12px rgba(29,58,81,.025);min-width:0}
.note-header{display:flex;align-items:center;gap:11px;min-width:0}
.note-avatar{flex-shrink:0;width:35px;height:35px;border-radius:10px;background:#eaf3f5;color:#56878b;display:grid;place-items:center;font-size:14px;font-weight:700}
.note-header>div{flex:1;min-width:0}
.note-header>div>b{display:block;font-size:13px;color:#35566e;margin-bottom:3px;overflow-wrap:anywhere}
.note-header>div>span{display:block;color:#93a1ac;font-size:10px;line-height:1.8;overflow-wrap:anywhere}
.note-header time{font-variant-numeric:tabular-nums}
.note-category{align-self:flex-start;flex-shrink:0;margin-top:2px;padding:3px 7px;background:#f1f6f8;color:#7892a3;border-radius:4px;font-size:10px}
.note-object{display:block;margin:15px 0 0;padding:6px 10px;max-width:100%;border:1px solid #e1eaf1;border-radius:5px;background:#f7fafc;color:#62839d;font-size:10px;text-align:left;line-height:1.8;overflow-wrap:anywhere}
.note-object:hover{background:#eef5fc;color:#356e9f;border-color:#c5d9eb}
.note-content{padding:14px 0 17px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.95;font-size:14px;color:#3c596e}
.note-footer{display:flex;justify-content:space-between;gap:12px;align-items:center;padding-top:11px;border-top:1px solid #edf1f4;font-size:9px;color:#a0adb7}
.note-footer .text-button{font-size:10px}
.note-composer{max-width:1050px;border:1px solid #d9e5ed;border-radius:9px;background:#fbfdfe;padding:18px 20px;margin-bottom:20px}
.composer-author{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:13px}
.composer-author b{color:#4e6d82;font-size:12px}
.composer-author span{color:#95a5b1;font-size:10px}
.note-composer>label{display:flex;align-items:center;gap:10px;color:#7c919f;font-size:10px;margin-bottom:11px}
.note-composer select{width:auto;min-width:120px;min-height:31px;padding:4px 8px;font-size:11px}
.note-composer textarea{display:block;width:100%;min-height:128px;resize:vertical;border:1px solid #d5e2eb;border-radius:6px;background:#fff;line-height:1.9;font-size:13px;padding:12px;color:#3f5e73}
.note-composer textarea::placeholder{color:#a3b0ba}
.note-composer>div:last-child{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px;margin-top:12px}
.note-composer>div:last-child small{margin-right:auto;color:#a0acb5;font-size:9px;line-height:1.7}
.sharing-note,.read-only-message{max-width:1050px;color:#849aa9;font-size:11px;line-height:1.9;padding:12px 15px;background:#eef5f8;border-radius:6px;margin:0 0 17px}
.read-only-message{background:#f5f7f9;color:#8c9ba7}
.notes-empty{padding:45px 20px;border:1px dashed #d3e0e9;border-radius:8px;color:#90a1ae;font-size:12px;line-height:1.8;text-align:center;background:#fafcfd}

/* Calendar: seven columns stay inside the viewport at every breakpoint. */
.calendar-workspace{padding:22px 24px}
.cal-calendar{min-width:0}
.cal-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:14px}
.cal-title{margin:0 0 3px;font-size:21px;font-weight:700;color:#34546d}
.cal-subtitle{font-size:10px;color:#91a3b0;margin:0}
.cal-navigation{display:flex;gap:6px;flex-shrink:0}
.cal-navigation button{min-width:34px;min-height:32px;padding:4px 10px;border:1px solid #d6e2eb;border-radius:6px;background:#fff;color:#6c8699;font-size:12px}
.cal-navigation button:first-child,.cal-navigation button:last-child{font-size:20px;line-height:1}
.cal-navigation button:hover{background:#eef5fa;border-color:#b5cbdc;color:var(--blue)}
.cal-source{margin:0 0 16px;padding:9px 12px;border-radius:6px;background:#f1f7f5;color:#678e83;font-size:10px;line-height:1.9}
.cal-source-demo{background:#fff8ee;color:#a58351;border:1px solid #f0e4d2}
.cal-legend{display:flex;align-items:center;gap:17px;flex-wrap:wrap;font-size:10px;color:#8b9eac;margin:0 0 15px}
.cal-legend-work{color:#638a77}.cal-legend-rest{color:#9aa7b2}.cal-legend-holiday{color:#a98a56}.cal-legend-maintenance{color:#9174aa}
.cal-weekdays{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));color:#7f94a5;background:#f2f6f9;border:1px solid #dce6ed;border-bottom:0;border-radius:7px 7px 0 0;text-align:center}
.cal-weekdays span{font-size:11px;font-weight:600;padding:10px 3px}
.cal-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:1px;border:1px solid #dce6ed;background:#dce6ed;border-radius:0 0 7px 7px;overflow:hidden}
.cal-cell{display:flex;flex-direction:column;align-items:flex-start;min-width:0;min-height:108px;gap:6px;padding:12px 11px;border:0;border-radius:0;background:#fff;color:#4b7164;position:relative;text-align:left;line-height:1.5;overflow:hidden}
.cal-cell:hover{box-shadow:inset 0 0 0 2px #a1c8b9;background:#f4faf7;z-index:1}
.cal-cell:focus-visible{outline:0;box-shadow:inset 0 0 0 3px #7daee4;z-index:2}
.cal-cell.cal-rest{background:#f6f8fa;color:#94a3af}
.cal-cell.cal-holiday{background:#fff9ef;color:#af8a4a}
.cal-cell.cal-maintenance{background:#f6f1fb;color:#9072ac}
.cal-cell.cal-outside{background:#fafbfc;color:#b7c1c9}
.cal-cell.cal-outside .cal-type,.cal-cell.cal-outside .cal-detail{opacity:.5}
.cal-date{font-size:15px;font-weight:600;line-height:1.2;font-variant-numeric:tabular-nums}
.cal-date sup{font-size:10px;font-weight:400;color:#b28b53;margin-left:3px}
.cal-type{font-size:10px;color:inherit}
.cal-detail{display:block;font-size:9px;line-height:1.6;color:#91a399;overflow-wrap:anywhere}
.cal-rest .cal-detail{color:#a2afb8}.cal-holiday .cal-detail{color:#b89b6b}.cal-maintenance .cal-detail{color:#a18ab7}
.cal-today{box-shadow:inset 0 0 0 2px #659b86;background:#eff8f3}
.cal-today .cal-date{background:#528a75;color:#fff;padding:3px 5px;border-radius:4px;margin-top:-3px;margin-left:-5px}
.cal-footnote{font-size:10px;color:#96a7b3;line-height:1.9;margin:14px 0 0}
.calendar-audit{margin-top:18px;padding:20px 24px;color:#8a9eac;font-size:11px;line-height:1.9}
.calendar-audit h2{font-size:14px;color:#536f83;margin:0 0 13px}
.calendar-audit article{padding:12px 0;border-top:1px solid #ebf0f4;overflow-wrap:anywhere}
.calendar-audit article>b{display:block;color:#5d7c8f;font-size:11px;font-weight:600}
.calendar-audit article>span{display:block;font-size:9px;color:#9baab6;margin-top:3px}
.calendar-audit article>p{font-size:10px;color:#92a3b0;margin:5px 0 0}

/* Import and access controls remain readable as scrollable tables on small screens. */
.security-callout{padding:17px 20px;margin-bottom:20px;background:#f0f5fa;border:1px solid #d7e3ed;border-left:3px solid #7b9fbe;border-radius:7px;color:#6e899d;font-size:11px;line-height:1.9}
.security-callout b{font-size:12px;color:#52748e}
.security-callout p{margin:7px 0 0}
.permission-table{width:100%;min-width:850px;border-collapse:collapse;text-align:center;font-size:11px;line-height:1.7}
.permission-table th{padding:13px 12px;background:#f5f8fa;color:#79909f;border-bottom:1px solid #dce6ed;font-size:10px;font-weight:600;white-space:nowrap}
.permission-table td{padding:16px 12px;border-bottom:1px solid #edf1f4;color:#71899a;white-space:nowrap}
.permission-table tbody th{text-align:left;padding-left:20px;background:#fbfcfd;color:#526f83;font-size:11px;min-width:108px}
.permission-table tbody tr:last-child>*{border-bottom:0}
.permission-table .allowed{display:inline-block;padding:2px 7px;background:#eef7f2;color:#658f7c;border-radius:4px;font-size:10px}
.permission-table .muted{color:#bcc7cf}
.user-management{margin-top:20px}
.assignment-row{display:grid;grid-template-columns:minmax(160px,1fr) minmax(170px,250px) minmax(90px,150px);gap:20px;align-items:center;padding:17px 20px;border-bottom:1px solid #edf1f4;color:#8ca0af;font-size:11px}
.assignment-row>div{min-width:0}
.assignment-row b{display:block;color:#5f7c8f;font-size:12px}
.assignment-row small{display:block;color:#a0afba;font-size:10px;margin-top:4px}
.assignment-row label{display:flex;align-items:center;gap:9px;color:#91a2af;font-size:10px}
.assignment-row select{min-height:33px;padding:5px 8px;font-size:11px}
.assignment-row select:disabled{background:#f6f8fa;border-color:#e4ebf0;color:#91a4b1}
.form-label{display:flex;flex-direction:column;gap:7px;margin-bottom:16px;color:#6d8798;font-size:11px}
.form-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.import-access{font-size:11px;line-height:1.9;color:#63839a;background:#eff5fa;border:1px solid #dce7f0;border-radius:6px;padding:10px 12px;margin-bottom:16px}
.import-file b,.import-file small{overflow-wrap:anywhere}
.import-file>div{min-width:0}
.import-preview h3{font-size:13px;color:#536f84;margin:0 0 12px}
#importPreviewMeta{font-size:10px;color:#8b9fac;line-height:1.9;margin-bottom:13px}
#importSample{margin-top:14px;border:1px solid #e0e8ef;border-radius:6px}
#importSample .permission-table{min-width:550px;text-align:left}
#importSample .permission-table th{font-size:9px;padding:10px 8px}
#importSample .permission-table td{font-size:9px;padding:9px 8px;white-space:normal;overflow-wrap:anywhere}
.mapping-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.quality-warning{font-size:10px;line-height:1.9;margin-top:14px}
.drop-zone{padding:20px 15px;line-height:1.9}
.drop-zone small{line-height:1.9}
.modal{max-height:calc(100dvh - 36px)}
.modal-head,.modal-foot{flex-shrink:0}
.modal-body{min-height:0;overscroll-behavior:contain}
#dayModal{width:min(540px,calc(100vw - 30px))}
#dayForm{display:flex;flex-direction:column;min-height:0;overflow:hidden}
#dayForm .modal-body{flex:1;overflow-y:auto}
#daySource,#dayPermissionHint{font-size:11px;line-height:1.9;margin:0 0 15px;overflow-wrap:anywhere}
#dayPermissionHint{margin:0;background:#f4f7fa;padding:10px 12px;border-radius:6px;color:#8a9eac}
#saveDayButton[hidden]{display:none}
.modal-foot>span{line-height:1.8;min-width:0}
.toast{font-size:12px;line-height:1.8}

@media(min-width:1600px){
  .main-content{padding-right:42px;padding-left:42px}
  .schedule-table{min-width:1220px}
  .schedule-table th:nth-child(3),.schedule-table th:nth-child(5){width:190px}
  .schedule-table th:nth-child(6){width:260px}
}
@media(max-width:1100px){
  .main-content{padding-top:22px}
  .mode-notice{margin-bottom:22px}
  .page-head{align-items:flex-start}
  .page-head h1{font-size:29px}
  .page-head p{font-size:11px}
  .page-actions{flex-shrink:0}
  .filter-bar .search-box{max-width:none;flex-basis:100%}
  .filter-bar select{flex:1;max-width:none;min-width:145px}
  .cal-cell{min-height:98px;padding:10px 7px;gap:6px}
  .cal-detail{font-size:8px}
  .calendar-workspace{padding:20px}
  .notes-toolbar{grid-template-columns:1fr}
  .notes-toolbar select{max-width:none}
  .assignment-row{grid-template-columns:minmax(140px,1fr) minmax(140px,200px) 90px;gap:13px}
}
@media(max-width:760px){
  .topbar{gap:8px;padding:0 12px}
  .brand{gap:7px;font-size:12px}
  .top-actions{gap:0}
  .identity-control{font-size:0;gap:0}
  .identity-control select{max-width:125px;min-height:31px;font-size:11px;padding:5px 20px 5px 8px}
  .top-actions .avatar{display:none}
  .main-content{padding:18px 13px 40px}
  .mode-notice{font-size:10px;line-height:1.9;padding:10px 12px;margin-bottom:22px}
  .page-head{margin-bottom:18px}
  .page-head h1{font-size:26px}
  .page-head p{font-size:11px;line-height:1.9}
  .page-head>.permission-pill{margin-top:13px;font-size:10px}
  .day-banner{display:block;padding:11px 12px;margin-bottom:14px}
  .day-banner>div{gap:5px;display:block}
  .day-banner b,.day-banner span{display:block;font-size:10px}
  .day-banner span{margin-top:5px;line-height:1.9}
  .day-banner a{display:inline-block;margin-top:8px;font-size:10px}
  .kpi-grid{margin-bottom:14px}
  .kpi-card small{line-height:1.8;display:block;font-size:9px}
  .kpi-top{font-size:10px}
  .kpi-top>span:last-child{width:22px;height:22px;font-size:14px}
  .filter-bar{gap:7px}
  .filter-bar .search-box{flex-basis:100%;width:100%;min-width:0;max-width:none;height:38px}
  .search-box input{font-size:12px}
  .filter-bar select{min-width:0;max-width:none;flex:1 1 42%;height:36px;font-size:11px}
  .filter-chip{height:34px;flex:1 1 42%;font-size:10px}
  .card-head{height:60px}
  .card-head h2{font-size:15px}
  .record-count{font-size:9px;line-height:1.8}
  .table-wrap{display:block;overflow-x:auto;max-width:100%}
  #tableView{display:none!important}
  #permissionMatrix,#importSample{display:block}
  .cards-view{gap:10px;padding:10px}
  .schedule-card{padding:14px}
  .schedule-card h3{font-size:12px}
  .schedule-card p{font-size:11px;line-height:1.9}
  .card-relation-actions{gap:8px}
  .card-relation-actions button{font-size:10px}
  .schedule-card>.note-preview>span{font-size:11px}
  .impact-summary-flow{font-size:9px;gap:3px}
  .impact-summary-flow>b{font-size:10px}
  .list-pagination{flex-wrap:wrap;gap:7px;padding:12px 13px}
  .list-pagination>span{font-size:10px}
  .list-pagination .btn{font-size:10px;height:29px;padding:0 8px}
  .card-foot{font-size:9px}
  .drawer{width:100vw}
  .drawer-head{padding:18px 17px 16px}
  .drawer-head h2{font-size:20px}
  .drawer-tabs{padding:0 10px;gap:0}
  .drawer-tabs>button{font-size:11px;padding:0 12px;min-height:46px;flex:1}
  .drawer-body{padding:17px 16px 28px}
  .detail-hero{gap:12px;padding-bottom:16px}
  .detail-hero h3{font-size:13px}
  .detail-hero p{font-size:10px}
  .detail-hero>.status-tag{font-size:9px;max-width:100px;white-space:normal}
  .impact-detail{padding-top:18px}
  .impact-detail-head h3{font-size:14px}
  .impact-notice{font-size:10px;padding:9px 11px;margin-bottom:15px}
  .impact-branches{grid-template-columns:minmax(0,1fr);gap:8px}
  .impact-column>h4{font-size:12px;margin-bottom:10px;padding:10px 12px}
  .impact-link{padding:14px;margin-bottom:11px}
  .impact-link-head>b{font-size:13px}
  .impact-facts{gap:10px 13px;padding:11px}
  .impact-facts dt{font-size:10px}
  .impact-facts dd{font-size:12px}
  .impact-link-context p{font-size:11px}
  .impact-link-context p>span{font-size:10px}
  .impact-warning{font-size:10px}
  .impact-self{flex-direction:row;justify-content:center;align-items:center;gap:14px;padding:0 0 12px;font-size:19px}
  .impact-self>b{padding:7px 14px;align-self:center;font-size:11px}
  .impact-self>small{max-width:105px;font-size:9px}
  .impact-self>span{transform:rotate(90deg)}
  .impact-footnote,.impact-calendar-hint{font-size:10px}
  .notes-toolbar{gap:9px;margin-bottom:13px}
  .notes-toolbar input,.notes-toolbar select{font-size:12px;min-height:40px}
  .shared-note{padding:16px 15px 12px}
  .notes-feed{gap:12px}
  .note-header{gap:9px;flex-wrap:wrap}
  .note-avatar{width:32px;height:32px;border-radius:9px;font-size:13px}
  .note-header>div{min-width:150px}
  .note-header>div>b{font-size:12px}
  .note-header>div>span{font-size:9px;line-height:1.8}
  .note-category{font-size:9px;padding:3px 6px}
  .note-object{font-size:10px;line-height:1.9;margin-top:12px;padding:5px 8px}
  .note-content{font-size:13px;line-height:2;padding-top:12px;padding-bottom:15px}
  .note-footer{font-size:9px}
  .note-footer .text-button{font-size:10px}
  .note-composer{padding:15px 14px;margin-bottom:15px}
  .composer-author{gap:5px 9px}
  .composer-author b{font-size:11px}
  .composer-author span{font-size:9px}
  .note-composer textarea{font-size:13px;min-height:135px}
  .note-composer>div:last-child{justify-content:flex-start;gap:7px}
  .note-composer>div:last-child small{flex-basis:100%;font-size:9px;margin:0 0 3px}
  .note-composer .btn{font-size:11px;height:34px}
  .sharing-note,.read-only-message{font-size:10px;padding:10px 12px;line-height:1.9}
  .calendar-workspace{padding:16px 11px}
  .cal-toolbar{gap:8px;margin-bottom:12px}
  .cal-title{font-size:18px}
  .cal-subtitle{font-size:8px;max-width:160px;overflow-wrap:anywhere}
  .cal-navigation{gap:4px}
  .cal-navigation button{min-width:29px;min-height:31px;padding:3px 7px;font-size:10px}
  .cal-navigation button:first-child,.cal-navigation button:last-child{font-size:18px}
  .cal-source{font-size:9px;padding:9px 10px;margin-bottom:12px;line-height:1.9}
  .cal-legend{font-size:9px;gap:7px 11px;margin-bottom:13px;line-height:1.9}
  .cal-weekdays span{font-size:9px;padding:8px 0}
  .cal-cell{min-height:71px;gap:5px;padding:9px 5px}
  .cal-date{font-size:13px;line-height:1.3}
  .cal-date sup{font-size:8px;margin-left:1px}
  .cal-type{font-size:8px;white-space:nowrap;letter-spacing:-.02em}
  .cal-maintenance .cal-type{font-size:0}
  .cal-maintenance .cal-type::after{content:'检修';font-size:8px}
  .cal-detail{display:none}
  .cal-today .cal-date{padding:2px 4px;margin:-2px 0 0 -4px}
  .cal-footnote{font-size:9px;line-height:1.9;margin-top:12px}
  .calendar-audit{padding:17px 16px;font-size:10px}
  .calendar-audit h2{font-size:13px}
  .calendar-audit article>b{font-size:10px}
  .security-callout{font-size:10px;line-height:1.9;padding:14px 15px;margin-bottom:16px}
  .security-callout b{font-size:11px}
  .permission-table{font-size:10px;min-width:800px}
  .permission-table th{font-size:9px;padding:12px 10px}
  .permission-table td{padding:14px 10px}
  .permission-table tbody th{font-size:10px;padding-left:14px;min-width:96px}
  .assignment-row{grid-template-columns:minmax(0,1fr) minmax(130px,160px);gap:10px;padding:15px 14px}
  .assignment-row>span{grid-column:1/-1;font-size:9px;margin-top:-2px}
  .assignment-row b{font-size:11px}
  .assignment-row small{font-size:9px;overflow-wrap:anywhere}
  .assignment-row label{font-size:9px;gap:7px}
  .assignment-row select{font-size:10px}
  .modal{max-height:calc(100dvh - 24px);width:calc(100vw - 22px)}
  .modal-head{padding:18px 16px 15px}
  .modal-head h2{font-size:18px}
  .modal-head p{font-size:10px;line-height:1.9}
  .modal-body{padding:16px}
  .modal-foot{flex-wrap:wrap;justify-content:flex-end;padding:12px 16px;gap:7px}
  .modal-foot>span{flex-basis:100%;font-size:9px;line-height:1.9;margin:0 0 4px}
  .modal-foot .btn{font-size:10px;height:34px;padding:0 12px}
  .form-label{font-size:11px;margin-bottom:14px}
  .form-label input,.form-label select{font-size:12px;min-height:40px}
  .import-access{font-size:10px;padding:9px 11px}
  .drop-zone{padding:20px 11px;min-height:145px}
  .drop-zone small{font-size:9px}
  .mapping-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .quality-warning{font-size:9px;line-height:1.9}
  .toast{font-size:11px;padding:10px 14px;max-width:calc(100vw - 30px);width:max-content;line-height:1.9;bottom:18px}
}
@media(max-width:420px){
  .topbar{height:auto;min-height:99px;flex-wrap:wrap;padding:10px 13px;gap:8px}
  .mobile-menu{width:27px;height:27px}
  .brand{font-size:12px;flex:1}
  .brand-mark{width:25px;height:25px}
  .top-actions{flex-basis:100%;margin-left:0;justify-content:flex-end}
  .identity-control{font-size:9px;gap:8px}
  .identity-control select{min-height:28px;max-width:150px;font-size:10px}
  .sidebar{top:99px}
  .cal-cell{min-height:65px;padding:8px 4px}
  .cal-type{font-size:8px}
  .cal-title{font-size:17px}
  .cal-navigation button{min-width:26px;padding:3px 6px}
  .note-category{margin-left:41px}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.sidebar,.toast,.kpi-card{transition:none}}

/* Shell polish using unslop by Damir Sokolovsky (@heydamir), CC BY 4.0.
   https://github.com/heydamir/unslop — retain production data and status colors. */
.nav-icon{display:grid;place-items:center;width:18px;height:18px;flex:none}
.nav-icon svg{display:block;width:18px;height:18px}
.env-badge,.avatar,.sidebar-footer,#collabAuthStatus{display:none}
.scope-box small{font-size:13px;color:var(--muted)}
.workspace-help{margin:16px 0;color:var(--muted);font-size:14px}
.workspace-help>summary,.schedule-data-notes>summary{cursor:pointer;padding:12px 0;color:#526777}
.workspace-help[open]>summary{margin-bottom:12px}
.workspace-help .collab-responsibility-card,.workspace-help .collab-account-matrix{box-shadow:none;border-radius:8px}
.workspace-help .card-head h2{font-weight:500}
.workspace-help .record-count{font-size:13px}
.workspace-help .table-wrap{display:block}
.schedule-data-notes{padding:0 16px;border-top:1px solid var(--line);font-size:13px;color:var(--muted)}
.schedule-data-notes p{margin:0 0 16px;max-width:80ch;line-height:1.65}
@media(max-width:760px){.workspace-help>summary{padding:12px 0}.scope-box small{font-size:13px}}
