.interval-editor>summary{cursor:pointer;font-size:17px}
.page-title-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px}.page-title-actions h1{margin:0}
.interval-edit-row{display:grid;grid-template-columns:1.5fr repeat(4,minmax(100px,1fr)) 1.3fr 1.3fr 1.3fr auto;gap:8px;align-items:end;padding:14px 0;border-bottom:1px solid var(--line)}
.interval-edit-row:last-child{border-bottom:0}.interval-edit-title{display:flex;flex-direction:column;gap:5px}.interval-edit-title span{font-size:12px;color:var(--muted)}.interval-edit-row button{white-space:nowrap}
@media(max-width:1100px){.interval-edit-row{grid-template-columns:repeat(3,1fr)}.interval-edit-title{grid-column:1/-1}}
@media(max-width:650px){.interval-edit-row{grid-template-columns:1fr}}
.absence-edit{padding:18px 0;border-bottom:1px solid var(--line)}.absence-edit:last-child{border-bottom:0}.delete-absence{justify-content:flex-end;margin-top:10px}.delete-absence input{min-width:260px}

.attendance-month .month-plan-heading h2 {
    margin-bottom: 4px;
}

.attendance-month .month-plan-heading p {
    margin: 0;
}

.attendance-month ~ section.panel:has(> form.toolbar:not(.attendance-toolbar)),
.attendance-month ~ section.panel:has(> h2:first-child + p + form.form-grid) {
    display: none;
}

.attendance-month .month-employee > header {
    background: #fbfaf9;
}

.attendance-month .legend-overtime {
    background: #fff3dc;
    color: #9a5b00;
}

.attendance-month .month-day.has-plan-reference {
    background: #fafbfd;
}

.attendance-plan-hint {
    position: absolute;
    left: 50%;
    bottom: 4px;
    color: #98a2b3;
    font-size: 7px;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    transform: translateX(-50%);
}

.attendance-month .month-absence-marks.with-shift .attendance-overtime-mark {
    display: flex;
    flex: 0 0 14px;
    width: 14px;
    height: 14px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--overtime-color);
    color: #fff;
}

.attendance-month .attendance-overtime-mark b {
    font-size: 7px;
    line-height: 1;
}

.attendance-month .month-day.has-shift.has-overtime .month-absence-marks.with-shift {
    top: 7px;
}

.attendance-month .month-day.has-shift.has-overtime .month-shift-times {
    top: 22px;
    bottom: auto;
    transform: translateX(-50%);
}

.attendance-month .month-break-time {
    display: flex;
    max-width: 100%;
    margin-top: 1px;
    align-items: center;
    flex-direction: column;
    overflow: hidden;
    color: #68428a;
    font-size: 9px;
    font-weight: 800;
    line-height: 9px;
    white-space: normal;
}

.attendance-month .month-break-range {
    display: flex;
    max-width: 100%;
    align-items: center;
    flex-direction: column;
    padding: 2px;
    border: 1px solid #d8c8e8;
    border-radius: 4px;
    background: #f4edfa;
    line-height: inherit;
}

.attendance-month .month-break-range > span {
    display: block;
    width: auto;
    max-width: none;
    text-align: center;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.month-plan.attendance-month .month-day .month-break-range > span {
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}

.attendance-month .month-shift-time > b {
    display: block;
    width: auto;
    max-width: none;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.attendance-month .month-break-warning {
    display: grid;
    width: 15px;
    height: 15px;
    margin: 1px auto 0;
    place-items: center;
    border-radius: 999px;
    background: #b42318;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
}

.attendance-month .attendance-balance.is-balanced {
    color: #237a3b;
    font-weight: 800;
}

.attendance-month .attendance-balance.is-under {
    color: #b42318;
    font-weight: 800;
}

.attendance-month .attendance-balance.is-over {
    color: #b54708;
    font-weight: 800;
}

.attendance-month .month-shift-times.is-multiple .month-break-time {
    font-size: 7px;
    line-height: 8px;
}

@media screen {
    .month-plan.attendance-month .month-employee > header,
    .month-plan.attendance-month .month-day {
        height: auto;
        min-height: 72px;
    }

    .month-plan.attendance-month .month-row .month-day {
        display: flex;
        padding: 6px 1px;
        align-items: center;
        justify-content: center;
        flex-direction: column;
    }

    .month-plan.attendance-month .month-employee > header {
        padding-top: 8px;
        padding-bottom: 8px;
        gap: 2px;
    }

    .month-plan.attendance-month .month-employee > header span,
    .month-plan.attendance-month .month-employee > header small {
        font-size: 10px;
        line-height: 1.2;
    }

    .month-plan.attendance-month .month-employee > header strong,
    .month-plan.attendance-month .month-employee > header span,
    .month-plan.attendance-month .month-employee > header small {
        overflow: visible;
        white-space: normal;
        text-overflow: clip;
        overflow-wrap: anywhere;
    }

    .month-plan.attendance-month .month-employee > header .month-employee-summary,
    .month-plan.attendance-month .month-employee > header .month-employee-difference {
        font-size: 8.5px;
        white-space: nowrap;
        overflow-wrap: normal;
    }

    .month-plan.attendance-month .month-shift-time b {
        font-size: 10px;
        line-height: 11px;
    }

    .month-plan.attendance-month .month-shift-time i {
        height: 7px;
        font-size: 8px;
        line-height: 7px;
    }

    .month-plan.attendance-month .month-break-time {
        margin-top: 3px;
        font-size: 10px;
        line-height: 11px;
    }

    .month-plan.attendance-month .month-row .month-day.has-shift .month-shift-times {
        position: static;
        top: auto;
        bottom: auto;
        width: 100%;
        align-items: center;
        justify-content: center;
        transform: none;
    }

    .month-plan.attendance-month .month-row .month-day.has-shift.has-absence .month-shift-times,
    .month-plan.attendance-month .month-row .month-day.has-shift.has-overtime .month-shift-times,
    .month-plan.attendance-month .month-row .month-day.has-shift.has-foreign-shift .month-shift-times {
        padding-top: 17px;
    }

    .month-plan.attendance-month .month-shift-times.is-multiple .month-shift-time b {
        font-size: 8px;
        line-height: 9px;
    }

    .month-plan.attendance-month .month-shift-times.is-multiple .month-break-time {
        font-size: 8px;
        line-height: 9px;
    }
}

.attendance-day-editor {
    width: min(760px, calc(100vw - 24px));
}

.attendance-day-editor-content {
    width: 100%;
    max-height: calc(100vh - 32px);
    padding: 22px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.attendance-day-editor .attendance-day-form,
.attendance-day-editor .attendance-absence-form,
.attendance-day-editor .attendance-delete-form {
    padding: 0;
}

.attendance-existing {
    margin-bottom: 14px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f7f8fa;
}

.attendance-existing-heading,
.attendance-existing-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.attendance-existing-heading {
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 8px;
}

.attendance-existing-actions {
    display: grid;
    gap: 8px;
}

.attendance-existing-actions .attendance-delete-form {
    margin: 0;
    padding: 0;
    border-top: 0;
}

.attendance-existing-actions button {
    width: 100%;
}

.attendance-existing-list .is-active {
    border-color: var(--brand);
    background: #fff1f1;
    color: var(--brand);
}

.attendance-existing-locked {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 7px 10px;
    border: 1px solid #d6dae1;
    border-radius: 8px;
    background: #e9edf3;
    color: #465164;
    font-size: .88rem;
    font-weight: 700;
}

.attendance-day-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
    gap: 10px 12px;
}

.attendance-absence-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
    gap: 10px 12px;
}

.attendance-field-wide {
    grid-column: span 3;
}

.attendance-break-paid {
    min-height: 42px;
    align-self: end;
}

.attendance-break-manager {
    margin-top: 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fafafa;
}

.attendance-break-heading,
.attendance-break-row {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.attendance-break-heading > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

.attendance-break-heading small,
.attendance-break-empty {
    color: var(--muted);
    font-size: 12px;
}

.attendance-break-list {
    display: grid;
    gap: 6px;
    margin-top: 9px;
}

.attendance-break-row {
    padding: 7px 8px;
    border: 1px solid #e2e5e9;
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
}

.attendance-break-row > span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.attendance-break-row form {
    flex: 0 0 auto;
    margin: 0;
}

.attendance-break-empty {
    margin: 9px 0 0;
}

.attendance-break-validation {
    margin: 9px 0 0;
    padding: 8px 10px;
    font-size: 12px;
}

.attendance-break-add {
    display: grid;
    margin-top: 10px;
    grid-template-columns: 105px 105px 95px minmax(150px, 1fr) auto;
    align-items: end;
    gap: 8px;
}

.attendance-break-add button {
    white-space: nowrap;
}

.attendance-absence-note {
    margin: 0 0 12px;
}

.attendance-delete-form {
    display: flex;
    margin-top: 12px;
    padding-top: 12px;
    justify-content: flex-end;
    border-top: 1px solid var(--line);
}

.attendance-approval-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.attendance-approval-heading h2 {
    margin: 0;
}

.attendance-approval-panel h3 {
    margin: 18px 0 8px;
}

.attendance-approval-table td > small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
}

.attendance-absence-decision {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) auto;
    align-items: end;
    gap: 8px;
    min-width: 250px;
}

.attendance-overtime-decision {
    display: grid;
    grid-template-columns: minmax(175px, 1.15fr) minmax(190px, 1.25fr) 90px minmax(150px, 1fr) auto;
    align-items: end;
    gap: 8px;
    min-width: 760px;
}

.attendance-delete-form[hidden],
.attendance-existing[hidden],
.attendance-break-manager[hidden],
.attendance-break-empty[hidden],
.attendance-absence-note[hidden],
.attendance-overlap-note[hidden],
[data-attendance-work-pane][hidden],
[data-attendance-absence-pane][hidden] {
    display: none;
}

@media (max-width: 700px) {
    .attendance-day-fields,
    .attendance-absence-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .attendance-break-add {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .attendance-break-add button {
        grid-column: 1 / -1;
    }

    .attendance-field-wide {
        grid-column: span 2;
    }

    .attendance-day-editor-content {
        max-height: calc(100vh - 16px);
        padding: 16px;
    }

    .attendance-absence-decision,
    .attendance-overtime-decision {
        grid-template-columns: 1fr;
        min-width: 0;
    }
}

@media (max-width: 460px) {
    .attendance-day-fields,
    .attendance-absence-fields,
    .attendance-break-add {
        grid-template-columns: 1fr;
    }

    .attendance-field-wide {
        grid-column: span 1;
    }
}
