.overplanned-summary {background:#fff7ec;border:1px solid #e7b06c;border-radius:10px;padding:20px;margin:0 0 24px;color:#59390f;}
.overplanned-summary[hidden] {display:none;}
.overplanned-heading,.overplanned-person {display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;}
.overplanned-heading h3 {margin:0;color:#714612;}
.overplanned-person {padding:14px 0;border-top:1px solid #ead4b6;}
.overplanned-person span {flex:1;min-width:240px;font-weight:600;}
.overplanned-summary button {border:1px solid #b7884d;background:white;color:#654014;padding:10px 14px;border-radius:6px;font:inherit;cursor:pointer;}
#roster-module .shift-overplanned {border-left:5px solid #d67411;background:#fff0da;box-shadow:0 0 0 1px #d67411;}
.overplanned-badge {display:block!important;font-size:11px;font-weight:700;color:#8a4600;margin-top:5px;}
@media(max-width:600px){.overplanned-person span{min-width:100%;}.overplanned-summary{padding:14px;}}
#employee-content-area > .filter-controls {display:grid;grid-template-columns:minmax(220px,1.4fr) minmax(200px,1fr) minmax(140px,.7fr);gap:12px;align-items:center;margin:20px 0;}
#employee-content-area > .filter-controls > input,#employee-content-area > .filter-controls > select {width:100%;min-width:0;margin:0;box-sizing:border-box;}
@media(max-width:850px){#employee-content-area > .filter-controls{grid-template-columns:1fr 1fr;}#employee-search-input{grid-column:1/-1;}}
@media(max-width:500px){#employee-content-area > .filter-controls{grid-template-columns:1fr;}}

#roster-module .roster-table-container { max-width:100%; overflow-x:auto; }
#roster-module .roster-table-container table { table-layout:fixed; width:100%; min-width:78rem; }
#roster-module .roster-table-container th:first-child { width:13%; }
#roster-module .roster-table-container td { padding:.55rem; vertical-align:top; }
#roster-module .roster-table-container td:first-child { overflow-wrap:anywhere; }
#roster-module .roster-card {
    display:flex; flex-direction:column; justify-content:center; gap:.12rem;
    box-sizing:border-box; position:relative; width:100%; height:4.7rem; margin:0 0 .4rem;
    padding:.3rem .6rem; border-radius:.45rem; line-height:1.2; text-align:left;
}
#roster-module .roster-card:last-child { margin-bottom:0; }
#roster-module .roster-card > strong {
    display:block; min-width:0; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
#roster-module .roster-card:has(.delete-shift-btn) > strong { padding-right:1.25rem; }
#roster-module .roster-card strong > span { display:inline; }
#roster-module .roster-card > span { display:block; white-space:nowrap; font-variant-numeric:tabular-nums; }
#roster-module .roster-card .overplanned-badge { margin:0; }
#roster-module .roster-card .delete-shift-btn {
    display:grid; place-items:center; position:absolute; inset:.12rem .12rem auto auto;
    width:1.6rem; height:1.6rem; padding:0; margin:0; min-width:0; min-height:0;
    color:#52697b; background:transparent; border:0; font:700 1.18rem/1 "Segoe UI",sans-serif;
}
#roster-module .roster-card .delete-shift-btn:is(:hover,:focus-visible) { color:#8d2627; background:#fff; }
#roster-module .roster-card .delete-shift-btn:focus-visible { outline:2px solid currentColor; }
#remove-shift-dialog { width:min(28rem,calc(100% - 2rem)); box-sizing:border-box; padding:1.35rem; border:1px solid #b7c8d6; border-radius:.8rem; color:#173f67; }
#remove-shift-dialog::backdrop { background:#102d48a6; }
#remove-shift-dialog h2 { margin:0 0 .75rem; }
#remove-shift-dialog label { display:block; font-weight:600; }
#remove-master-password { margin-top:.3rem; }
#remove-shift-detail { overflow-wrap:anywhere; }
#remove-shift-error { color:#95262c; }
#remove-shift-dialog .form-actions { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:.6rem; }
#roster-module .roster-toolbar-toggle { display:none; }
@media screen {
    #roster-module .content-header {
        position:sticky; top:var(--shell-header-height, 0px); z-index:20;
    }
    html:has(#roster-module:not(.hidden)) {
        scroll-padding-top:calc(var(--shell-header-height, 0px) + var(--roster-header-height, 0px) + .5rem);
    }
}
@media screen and (max-width:820px), screen and (max-height:620px) {
    #roster-module .content-header { padding:.65rem .85rem; }
    #roster-module .roster-title-row { display:flex; justify-content:space-between; align-items:center; gap:.5rem; }
    #roster-module .roster-title-row h2 { font-size:1.15rem; }
    #roster-module .roster-toolbar-toggle {
        display:inline-flex; align-items:center; gap:.5rem; margin:0; padding:.45rem .7rem;
        background:#edf4f9; color:#173f67; border:1px solid #cad9e6; font:600 .85rem/1.3 "Segoe UI",sans-serif;
    }
    #roster-module .roster-toolbar-toggle::after {
        content:""; width:.45rem; height:.45rem; border:solid currentColor; border-width:0 2px 2px 0;
        transform:translateY(-.1rem) rotate(45deg);
    }
    #roster-module .roster-toolbar-toggle[aria-expanded="true"]::after { transform:translateY(.1rem) rotate(225deg); }
    #roster-module .planning-period-controls { margin:.45rem 0 0; gap:.55rem; }
    #roster-module .content-header:has(.roster-toolbar-toggle[aria-expanded="false"])
        :is(#planner-sms-btn, .planning-month-control, .roster-toolbar) { display:none; }
    #roster-module .content-header:has(.roster-toolbar-toggle[aria-expanded="true"]) {
        box-sizing:border-box; max-height:min(65vh, calc(100dvh - var(--shell-header-height, 0px) - 4.5rem));
        overflow:auto;
    }
    #roster-module .roster-toolbar { margin-top:.6rem; }
    #roster-module #roster-employee-list-container { position:static; }
}
@media print {
    #roster-module .roster-table-container { overflow:visible; }
    #roster-module .roster-table-container table { min-width:0; }
    #roster-module .roster-card .delete-shift-btn, #remove-shift-dialog { display:none; }
    #roster-module .roster-card:has(.delete-shift-btn) > strong { padding-right:0; }
}
