/* Overtime management */
.overtime-policy-panel {
    overflow: hidden;
    padding: 0 !important;
    border: 1px solid #dce5f1;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(30, 64, 175, .08);
}

.overtime-policy-header {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    min-height: 122px;
    padding: 27px 30px;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(122deg, #172554 0%, #1d4ed8 58%, #0284c7 100%);
}

.overtime-policy-header::before,
.overtime-policy-header::after {
    position: absolute;
    content: "";
    border-radius: 999px;
    pointer-events: none;
}

.overtime-policy-header::before {
    width: 260px;
    height: 260px;
    top: -190px;
    right: 14%;
    border: 42px solid rgba(255, 255, 255, .07);
}

.overtime-policy-header::after {
    width: 170px;
    height: 170px;
    right: -65px;
    bottom: -135px;
    background: rgba(56, 189, 248, .22);
}

.overtime-policy-header > * {
    position: relative;
    z-index: 1;
}

.overtime-policy-header-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border: 1px solid rgba(255, 255, 255, .78);
    border-radius: 17px;
    color: #1d4ed8;
    background: linear-gradient(145deg, #fff, #e0f2fe);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .22);
}

.overtime-policy-header-icon svg {
    width: 25px;
    height: 25px;
}

.overtime-policy-header .feedback-step-label {
    color: #bae6fd;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.overtime-policy-header h2 {
    margin: 5px 0 6px;
    color: #fff;
    font-size: clamp(24px, 2vw, 30px);
    line-height: 1.1;
}

.overtime-policy-header p {
    max-width: 720px;
    margin: 0;
    color: #dbeafe;
    font-size: 13px;
    line-height: 1.55;
}

.overtime-policy-state {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, .12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
    font-size: 11px;
    font-weight: 750;
    white-space: nowrap;
    backdrop-filter: blur(8px);
}

.overtime-policy-state i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #86efac;
    box-shadow: 0 0 0 4px rgba(134, 239, 172, .15);
}

.overtime-current-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 0 16px;
    border-bottom: 1px solid #e5edf7;
    background: #f8fbff;
}

.overtime-current-summary > div {
    display: flex;
    gap: 11px;
    align-items: center;
    min-width: 0;
    padding: 16px 14px;
    border-right: 1px solid #e5edf7;
}

.overtime-current-summary > div:last-child {
    border-right: 0;
}

.overtime-current-summary > div > span {
    display: grid;
    place-items: center;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    color: #7c8ba1;
    background: #e9eff7;
}

.overtime-current-summary > div.is-active > span {
    color: #1d4ed8;
    background: #dbeafe;
}

.overtime-current-summary > div.is-warning > span {
    color: #b45309;
    background: #fef3c7;
}

.overtime-current-summary svg {
    width: 16px;
    height: 16px;
}

.overtime-current-summary p {
    min-width: 0;
    margin: 0;
}

.overtime-current-summary small,
.overtime-current-summary strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.overtime-current-summary small {
    margin-bottom: 3px;
    color: #728096;
    font-size: 10px;
}

.overtime-current-summary strong {
    color: #1e293b;
    font-size: 12px;
}

.overtime-policy-form {
    padding: 24px 28px 28px;
}

.overtime-policy-intro {
    display: flex;
    gap: 13px;
    align-items: flex-start;
    margin-bottom: 24px;
    padding: 15px 17px;
    border: 1px solid #bfdbfe;
    border-radius: 14px;
    color: #1e3a8a;
    background: linear-gradient(100deg, #eff6ff, #f8fbff);
}

.overtime-policy-intro > span {
    display: grid;
    place-items: center;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    color: #fff;
    background: #2563eb;
}

.overtime-policy-intro strong {
    display: block;
    color: #1e3a8a;
    font-size: 12px;
}

.overtime-policy-intro p {
    margin: 4px 0 0;
    color: #52637a;
    font-size: 11px;
    line-height: 1.55;
}

.overtime-policy-section-heading {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin: 2px 0 14px;
}

.overtime-policy-section-heading.is-secondary {
    margin-top: 25px;
}

.overtime-policy-section-heading > div {
    display: flex;
    gap: 11px;
    align-items: center;
}

.overtime-policy-section-heading > div > span {
    display: grid;
    place-items: center;
    width: 31px;
    height: 31px;
    border-radius: 10px;
    color: #2563eb;
    background: #eaf2ff;
    font-size: 10px;
    font-weight: 850;
}

.overtime-policy-section-heading p {
    margin: 0;
}

.overtime-policy-section-heading strong,
.overtime-policy-section-heading small {
    display: block;
}

.overtime-policy-section-heading strong {
    color: #263449;
    font-size: 13px;
}

.overtime-policy-section-heading small,
.overtime-policy-section-heading em {
    color: #7a8799;
    font-size: 10px;
    font-style: normal;
}

.overtime-policy-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
}

.overtime-rule-card {
    position: relative;
    display: grid;
    grid-template-columns: 43px minmax(0, 1fr);
    gap: 13px;
    align-content: start;
    align-items: start;
    min-height: 124px;
    padding: 17px 46px 17px 17px;
    border: 1px solid #dce5f1;
    border-radius: 16px;
    color: #263449;
    background: #fbfcfe;
    box-shadow: 0 2px 4px rgba(15, 23, 42, .02);
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
}

.overtime-rule-card:hover {
    border-color: #9fc4fb;
    background: #fff;
    box-shadow: 0 12px 26px rgba(37, 99, 235, .09);
    transform: translateY(-2px);
}

.overtime-rule-card > input[type="checkbox"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.overtime-rule-card:has(input[type="checkbox"]:checked) {
    border-color: #74a7f7;
    background: linear-gradient(145deg, #fff 10%, #eff6ff 100%);
    box-shadow: inset 0 0 0 1px rgba(96, 165, 250, .28), 0 10px 24px rgba(37, 99, 235, .08);
}

.overtime-rule-check {
    position: absolute;
    top: 14px;
    right: 14px;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: transparent;
    background: #fff;
    transition: .18s ease;
}

.overtime-rule-check svg {
    width: 14px;
    height: 14px;
}

.overtime-rule-card:has(input[type="checkbox"]:checked) .overtime-rule-check {
    border-color: #2563eb;
    color: #fff;
    background: #2563eb;
    box-shadow: 0 4px 10px rgba(37, 99, 235, .24);
}

.overtime-rule-icon {
    display: grid;
    place-items: center;
    width: 43px;
    height: 43px;
    border-radius: 13px;
    color: #2563eb;
    background: #e6efff;
}

.overtime-rule-icon.is-weekend {
    color: #7c3aed;
    background: #f1eafe;
}

.overtime-rule-icon.is-holiday {
    color: #b45309;
    background: #fff4d6;
}

.overtime-rule-icon svg {
    width: 19px;
    height: 19px;
}

.overtime-rule-card > span:not(.overtime-rule-check):not(.overtime-rule-icon) strong,
.overtime-rule-card > span:not(.overtime-rule-check):not(.overtime-rule-icon) small {
    display: block;
}

.overtime-rule-card strong {
    padding-top: 2px;
    color: #243247;
    font-size: 12px;
    line-height: 1.35;
}

.overtime-rule-card small {
    margin-top: 5px;
    color: #708096;
    font-size: 10px;
    line-height: 1.55;
}

.overtime-rule-limit {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 144px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    margin-top: 2px;
    padding-top: 13px;
    border-top: 1px solid #e3eaf3;
}

.overtime-limit-input {
    position: relative;
    display: flex;
    align-items: center;
    height: 43px;
    overflow: hidden;
    border: 1px solid #cbd8e8;
    border-radius: 11px;
    background: #fff;
    box-shadow: 0 3px 9px rgba(15, 23, 42, .04), inset 0 1px 0 rgba(255, 255, 255, .8);
    transition: border-color .18s ease, box-shadow .18s ease;
}

.overtime-limit-input:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, .11), 0 4px 12px rgba(37, 99, 235, .08);
}

.overtime-rule-limit .overtime-limit-input input {
    min-width: 0;
    width: 100%;
    height: 100%;
    padding: 0 8px 0 13px;
    border: 0 !important;
    border-radius: 0;
    outline: 0 !important;
    color: #1e293b;
    background: transparent;
    box-shadow: none !important;
    font-size: 15px;
    font-weight: 750;
    appearance: textfield;
}

.overtime-rule-limit .overtime-limit-input input::-webkit-inner-spin-button,
.overtime-rule-limit .overtime-limit-input input::-webkit-outer-spin-button {
    margin: 0;
    appearance: none;
}

.overtime-limit-input b {
    display: grid;
    align-self: stretch;
    place-items: center;
    min-width: 43px;
    border-left: 1px solid #e1e8f1;
    color: #68778b;
    background: #f5f8fc;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.overtime-limit-conversion {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1px 8px;
    align-items: baseline;
}

.overtime-limit-conversion small {
    grid-row: 1;
    margin: 0;
    color: #8491a3;
    font-size: 9px;
}

.overtime-limit-conversion strong {
    grid-row: 1;
    padding: 0;
    color: #2563eb;
    font-size: 12px;
}

.overtime-limit-conversion em {
    grid-column: 1 / -1;
    grid-row: 2;
}

.overtime-rule-limit em {
    color: #718096;
    font-size: 10px;
    font-style: normal;
    line-height: 1.4;
}

.overtime-rule-card.is-compact {
    min-height: 104px;
}

.overtime-policy-options {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px 210px;
    gap: 15px;
    align-items: end;
    padding: 18px;
    border: 1px solid #dce5f1;
    border-radius: 16px;
    background: #f8fafc;
}

.overtime-option-copy {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.overtime-option-copy > span {
    display: grid;
    place-items: center;
    flex: 0 0 35px;
    width: 35px;
    height: 35px;
    border-radius: 10px;
    color: #2563eb;
    background: #e5efff;
}

.overtime-option-copy strong {
    display: block;
    color: #263449;
    font-size: 12px;
}

.overtime-option-copy p {
    margin: 4px 0 0;
    color: #718096;
    font-size: 10px;
    line-height: 1.5;
}

.overtime-policy-options label > span {
    display: block;
    margin-bottom: 7px;
    color: #526075;
    font-size: 10px;
    font-weight: 750;
}

.overtime-policy-options select {
    width: 100%;
    height: 40px;
    border-color: #cfd9e7;
    border-radius: 10px;
    background-color: #fff;
}

.overtime-approval-option {
    margin-top: 13px;
    padding: 16px 18px;
    border: 1px solid #dce5f1;
    border-radius: 16px;
    background: #fff;
    transition: .18s ease;
}

.overtime-approval-option:has(input[type="checkbox"]:checked) {
    border-color: #93c5fd;
    background: #f3f8ff;
}

.overtime-approval-option label {
    display: flex;
    gap: 14px;
    align-items: center;
    cursor: pointer;
}

.overtime-approval-option input {
    position: absolute;
    opacity: 0;
}

.overtime-approval-option strong,
.overtime-approval-option small {
    display: block;
}

.overtime-approval-option strong {
    color: #263449;
    font-size: 12px;
}

.overtime-approval-option small {
    margin-top: 4px;
    color: #718096;
    font-size: 10px;
    line-height: 1.45;
}

.overtime-approval-toggle {
    position: relative;
    flex: 0 0 48px;
    width: 48px;
    height: 27px;
    border-radius: 999px;
    background: #cbd5e1;
    box-shadow: inset 0 1px 3px rgba(15, 23, 42, .12);
    transition: .2s ease;
}

.overtime-approval-toggle::after {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 21px;
    height: 21px;
    border-radius: 50%;
    content: "";
    background: #fff;
    box-shadow: 0 2px 5px rgba(15, 23, 42, .23);
    transition: .2s ease;
}

.overtime-approval-option label:has(input[type="checkbox"]:checked) .overtime-approval-toggle {
    background: #2563eb;
}

.overtime-approval-option label:has(input[type="checkbox"]:checked) .overtime-approval-toggle::after {
    transform: translateX(21px);
}

.overtime-approval-management {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e3eaf3;
}

.overtime-approval-management > span {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    color: #2563eb;
    background: #dbeafe;
}

.overtime-approval-management strong,
.overtime-approval-management small {
    display: block;
}

.overtime-approval-management strong {
    color: #334155;
    font-size: 10px;
}

.overtime-approval-management small {
    margin-top: 3px;
    color: #718096;
    font-size: 9px;
    line-height: 1.45;
}

.overtime-approval-management .button {
    min-height: 36px;
    white-space: nowrap;
}

.overtime-policy-footer {
    display: flex;
    justify-content: space-between;
    gap: 22px;
    align-items: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e3eaf3;
}

.overtime-effective-date {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    max-width: 620px;
}

.overtime-effective-date-icon {
    display: grid;
    place-items: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    margin-top: 21px;
    border-radius: 11px;
    color: #2563eb;
    background: #e8f1ff;
}

.overtime-effective-date label > span,
.overtime-effective-date label > small {
    display: block;
}

.overtime-effective-date label > span {
    margin-bottom: 7px;
    color: #263449;
    font-size: 11px;
    font-weight: 750;
}

.overtime-effective-date input {
    width: 190px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #cbd8e8 !important;
    border-radius: 10px;
    outline: 0 !important;
    color: #263449;
    background: #fff;
    box-shadow: 0 3px 9px rgba(15, 23, 42, .04) !important;
    font-weight: 700;
}

.overtime-effective-date input:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, .11) !important;
}

.overtime-effective-date label > small {
    margin-top: 6px;
    color: #7a8799;
    font-size: 9px;
    line-height: 1.4;
}

.overtime-policy-footer .button {
    min-width: 180px;
    min-height: 42px;
    box-shadow: 0 8px 18px rgba(37, 99, 235, .2);
}

.overtime-policy-readonly {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 22px 28px;
    color: #526075;
}

.overtime-policy-readonly > svg {
    color: #2563eb;
}

.overtime-policy-readonly strong,
.overtime-policy-readonly small {
    display: block;
}

.overtime-policy-readonly small {
    margin-top: 3px;
    color: #7a8799;
}

.overtime-policy-history {
    margin: 0 28px 25px;
    border-top: 1px solid #e3eaf3;
}

.overtime-policy-history summary {
    padding: 15px 0;
    color: #334155;
    font-size: 11px;
    font-weight: 750;
    cursor: pointer;
}

.overtime-policy-history summary span {
    margin-left: 6px;
    padding: 2px 7px;
    border-radius: 999px;
    color: #2563eb;
    background: #dbeafe;
    font-size: 9px;
}

.overtime-policy-history article {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
    border-top: 1px solid #eef2f7;
    font-size: 10px;
}

.overtime-policy-history article small {
    color: #718096;
    text-align: right;
}

/* Overtime review in reports */
.overtime-review-section {
    overflow: hidden;
    padding: 0 !important;
    border-radius: 20px;
}

.overtime-review-heading {
    display: flex;
    justify-content: space-between;
    gap: 22px;
    align-items: center;
    padding: 22px 24px;
    color: #fff;
    background: linear-gradient(125deg, #172554, #1d4ed8 70%, #0284c7);
}

.overtime-review-heading h2 {
    margin: 3px 0 5px;
    color: #fff;
}

.overtime-review-heading p {
    max-width: 680px;
    margin: 0;
    color: #dbeafe;
}

.overtime-review-heading .feedback-step-label {
    color: #93c5fd;
}

.overtime-review-totals {
    display: flex;
    gap: 9px;
}

.overtime-review-totals > span {
    min-width: 112px;
    padding: 11px 13px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 12px;
    background: rgba(255, 255, 255, .1);
}

.overtime-review-totals small,
.overtime-review-totals strong {
    display: block;
}

.overtime-review-totals small {
    color: #bfdbfe;
}

.overtime-review-totals strong {
    margin-top: 3px;
    font-size: 1.1rem;
}

.overtime-review-totals .is-pending {
    border-color: #fbbf24;
    background: rgba(245, 158, 11, .18);
}

.overtime-review-list {
    padding: 0 24px 8px;
}

.overtime-review-row {
    display: grid;
    grid-template-columns: minmax(190px, 1fr) minmax(260px, 1.4fr) 130px;
    gap: 16px;
    align-items: center;
    padding: 17px 0;
    border-bottom: 1px solid #e2e8f0;
}

.overtime-review-row.is-pending {
    grid-template-columns: minmax(190px, 1fr) minmax(260px, 1.4fr) 130px minmax(210px, .8fr);
}

.overtime-review-person {
    display: flex;
    gap: 10px;
    align-items: center;
}

.overtime-review-person > span {
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    color: #1d4ed8;
    background: #dbeafe;
    font-weight: 800;
}

.overtime-review-person strong,
.overtime-review-person small,
.overtime-review-result small,
.overtime-review-result strong,
.overtime-review-meta > * {
    display: block;
}

.overtime-review-person small,
.overtime-review-result small,
.overtime-review-meta small {
    margin-top: 3px;
    color: #64748b;
}

.overtime-review-components {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.overtime-review-components span {
    padding: 6px 9px;
    border-radius: 9px;
    background: #f1f5f9;
}

.overtime-review-components small,
.overtime-review-components strong {
    display: block;
    font-size: .75rem;
}

.overtime-review-components small {
    color: #64748b;
}

.overtime-review-result {
    padding-left: 13px;
    border-left: 2px solid #bfdbfe;
}

.overtime-review-result > strong {
    color: #1d4ed8;
    font-size: 1.05rem;
}

.overtime-review-result > span {
    display: inline-block;
    margin-top: 4px;
    color: #475569;
    font-size: .72rem;
    font-weight: 700;
}

.overtime-review-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
}

.overtime-review-actions input {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
}

.overtime-review-meta span,
.overtime-review-meta em {
    color: #64748b;
    font-size: .76rem;
}

.overtime-review-meta em {
    margin-top: 5px;
    font-style: normal;
}

@media (max-width: 1080px) {
    .overtime-policy-header {
        grid-template-columns: auto 1fr;
    }

    .overtime-policy-state {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .overtime-policy-options {
        grid-template-columns: 1fr 1fr;
    }

    .overtime-option-copy {
        grid-column: 1 / -1;
    }

    .overtime-review-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .overtime-review-row,
    .overtime-review-row.is-pending {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 760px) {
    .overtime-current-summary {
        grid-template-columns: 1fr 1fr;
    }

    .overtime-current-summary > div:nth-child(2) {
        border-right: 0;
    }

    .overtime-current-summary > div:nth-child(-n+2) {
        border-bottom: 1px solid #e5edf7;
    }

    .overtime-policy-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .overtime-policy-panel {
        border-radius: 16px;
    }

    .overtime-policy-header {
        grid-template-columns: 44px minmax(0, 1fr);
        gap: 13px;
        min-height: 0;
        padding: 22px 18px;
    }

    .overtime-policy-header-icon {
        width: 44px;
        height: 44px;
        border-radius: 13px;
    }

    .overtime-policy-header h2 {
        font-size: 22px;
    }

    .overtime-policy-header p {
        grid-column: 1 / -1;
        font-size: 11px;
    }

    .overtime-current-summary {
        grid-template-columns: 1fr;
        padding: 0 14px;
    }

    .overtime-current-summary > div {
        padding: 13px 4px;
        border-right: 0;
        border-bottom: 1px solid #e5edf7;
    }

    .overtime-current-summary > div:last-child {
        border-bottom: 0;
    }

    .overtime-policy-form {
        padding: 19px 16px 21px;
    }

    .overtime-policy-section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .overtime-rule-card {
        grid-template-columns: 40px minmax(0, 1fr);
        padding: 15px 43px 15px 15px;
    }

    .overtime-policy-options {
        grid-template-columns: 1fr;
    }

    .overtime-option-copy {
        grid-column: auto;
    }

    .overtime-policy-footer,
    .overtime-policy-history article {
        align-items: stretch;
        flex-direction: column;
    }

    .overtime-effective-date input,
    .overtime-policy-footer .button {
        width: 100%;
    }

    .overtime-effective-date-icon {
        display: none;
    }

    .overtime-approval-management {
        grid-template-columns: auto 1fr;
    }

    .overtime-approval-management .button {
        grid-column: 1 / -1;
        justify-content: center;
        width: 100%;
    }

    .overtime-policy-history article small {
        text-align: left;
    }

    .overtime-review-totals {
        flex-direction: column;
    }

    .overtime-review-row,
    .overtime-review-row.is-pending {
        grid-template-columns: 1fr;
    }

    .overtime-review-result {
        padding-left: 0;
        border-left: 0;
    }
}
