#manage-records, #manage-holiday, #manage-filters { display: grid; gap: 12px; }
#manage-filters { margin-bottom: 12px; }
#manage-filters .add-panel { margin-bottom: 0; }
.rec-contents { display: contents; }
.rec-more { white-space: pre-wrap; }
.rec-li-actions { display: flex; gap: 6px; margin: 4px 0 2px; }
.rec-li-actions .sign-out, .hol-actions .sign-out { height: 32px; padding: 0 10px; font-size: 0.85rem; }
.hol-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.hol-actions .sign-out:disabled { opacity: 0.4; cursor: default; }
.hol-form { grid-column: 1 / -1; display: grid; gap: 10px; padding: 12px; border: 1px solid var(--primary); border-radius: 10px; background: var(--card); }
.hol-form h4, .hol-form .note { margin: 0; }
.hol-form input[type="number"] { max-width: 8rem; }
.staff-bar .rec-year { flex: 0 0 6rem; }
.rec-row { cursor: pointer; }
.rec-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    overflow-wrap: anywhere;
}
.rec-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.rec-arrow { color: var(--muted); width: 1em; flex: 0 0 auto; }
.rec-nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.rec-num { display: grid; gap: 2px; }
.rec-num .cell-label { color: var(--muted); font-size: 0.75rem; }
.rec-num.warn strong { color: var(--danger); }
.rec-detail { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--page); }
.rec-section h4 { margin: 0 0 6px; font-size: 0.95rem; }
.rec-section .note { margin: 0; }
.rec-days { display: grid; gap: 6px; margin: 0; padding-left: 18px; font-size: 0.9rem; }
.rec-days li .note { display: block; font-size: 0.85rem; overflow-wrap: anywhere; }

.rec-toggle { flex-wrap: wrap; }
.rec-toggle .badge { margin-left: 6px; white-space: nowrap; overflow-wrap: normal; }
.rec-add { justify-self: start; margin-top: 8px; height: 36px; }
#manage-discipline, .disc-list { display: grid; gap: 12px; }
.disc-bar select { flex: 0 1 10rem; min-width: 0; }
.disc-bar .add-plus { flex: 0 0 auto; height: 40px; padding: 0 10px; border: 0; background: transparent; color: var(--primary); font-size: 1.75rem; line-height: 1; cursor: pointer; }
.disc-bar .add-plus:hover { opacity: 0.7; }
.disc-date { color: var(--muted); font-size: 0.875rem; }
.disc-reason { overflow-wrap: anywhere; }
.disc-expires { color: var(--muted); font-size: 0.875rem; }
.disc-detail { grid-template-columns: minmax(0, 1fr); }
.disc-detail p { margin: 0 0 6px; overflow-wrap: anywhere; white-space: pre-wrap; }
.badge.disc-active { border-color: var(--danger); color: var(--danger); }
.badge.disc-expired { opacity: 0.8; }
.badge.disc-withdrawn { text-decoration: line-through; }
.disc-form { display: grid; gap: 12px; }
.disc-form textarea { width: 100%; font: inherit; font-size: 16px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--input); color: var(--foreground); }
.disc-form input[type="date"] { max-width: 12rem; }

@media (min-width: 768px) {
    .disc-grid .data-head,
    .disc-grid .data-row { grid-template-columns: 7rem minmax(0, 1.2fr) minmax(0, 1fr) 9rem minmax(0, 1.4fr) 8rem 6.5rem; }
    .disc-grid .staff-meta { display: block; color: var(--muted); font-size: 0.875rem; }
    .disc-form { max-width: 44rem; }
    .rec-grid .data-head,
    .rec-grid .data-row { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) 5rem repeat(4, 5rem); }
    .rec-nums { display: contents; }
    .rec-row.open { background: var(--nav-active); }
    .hol-grid .data-head,
    .hol-grid .data-row { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) 3.5rem 5rem repeat(3, 3.75rem) 12.5rem; gap: 8px; }
    .hol-grid .hol-actions { flex-wrap: nowrap; justify-content: flex-end; gap: 4px; }
    .hol-grid .hol-actions .sign-out { padding: 0 8px; font-size: 0.8rem; }
    .hol-grid .rec-detail,
    .rec-grid .rec-detail { border: 0; border-radius: 0; border-bottom: 1px solid var(--border); padding: 12px 16px 16px 36px; }
}
