/* Muted blue actions and amber status accents complement the portal's teal theme. */
.employee-service-record-list-page {
    --ep-service-action-bg: #526b98;
    --ep-service-action-hover: #40577e;
    --ep-service-action-text: #ffffff;
    --ep-service-badge-bg: #fff0d7;
    --ep-service-badge-text: #875816;
}
html[data-theme="dark"] .employee-service-record-list-page {
    --ep-service-action-bg: #a6bde4;
    --ep-service-action-hover: #c0d1ef;
    --ep-service-action-text: #1d2c48;
    --ep-service-badge-bg: #453724;
    --ep-service-badge-text: #f1cb8b;
}
.ep-service-summary {
    min-width: 0; padding: 20px; margin-bottom: 20px;
    border: 1px solid var(--ep-border, #dce7ed); border-radius: 18px;
    background: var(--ep-surface, var(--surface, #fff)); color: var(--ep-text, var(--text, #243247));
}
.ep-service-position-card {
    display: flex; align-items: center; gap: 16px; padding: 20px 16px;
    border-radius: 14px; background: var(--ep-soft, var(--teal-soft, #e2f5f0));
}
.ep-service-position-icon {
    display: grid; place-items: center; flex: 0 0 48px; height: 48px;
    border-radius: 12px; background: var(--ep-soft, var(--teal-soft, #e2f5f0)); color: var(--ep-brand, #00877d);
}
.ep-service-position-icon .ep-form-icon { width: 29px; height: 29px; }
.ep-service-position-card > div { display: grid; gap: 5px; min-width: 0; }
.ep-service-position-card span { font-size: 12px; }
.employee-service-record-list-page .ep-service-position-card h2 {
    margin: 0; font-size: clamp(20px, 5.5vw, 28px); line-height: 1.25;
    letter-spacing: -.025em; color: inherit; overflow-wrap: anywhere;
}
.ep-service-position-card small { font-size: 12px; color: var(--ep-muted, #64748b); }
.ep-service-summary-details { margin: 14px 0 0; }
.ep-service-summary-details > div {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
    align-items: start; gap: 12px; padding: 11px 2px;
}
.ep-service-summary-details dt {
    display: flex; align-items: center; gap: 9px; margin: 0;
    font-size: 12px; font-weight: 400; color: var(--ep-muted, #64748b);
}
.ep-service-summary-details dt .ep-form-icon { width: 17px; height: 17px; flex: 0 0 17px; }
.ep-service-summary-details dd { margin: 0; font-size: 12px; text-align: right; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.ep-service-summary-remarks dd { white-space: pre-wrap; }
.ep-service-summary-details .ep-service-summary-office { grid-template-columns: auto minmax(0, 1fr); }
.ep-service-summary-office dd { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.employee-service-record-list-page .ep-service-history-title { margin: 8px 0 0; font-size: 14px; line-height: 1.4; color: var(--ep-text, var(--text, #243247)); }
@media (max-width: 760px) {
    .ep-service-summary { padding: 0; margin: 0; border: 0; border-radius: 0; background: transparent; }
}
.ep-service-list-heading { display: flex; align-items: center; gap: 12px; }
.ep-service-heading-icon, .ep-service-card-icon {
    display: grid; place-items: center; flex-shrink: 0; width: 38px; height: 38px;
    border-radius: 11px; background: var(--ep-soft, #e4f5f0); color: var(--ep-brand, #00877d);
}
.ep-service-heading-icon .ep-form-icon { width: 25px; height: 25px; }
.employee-service-record-card-arrow svg { width: 18px; height: 18px; }
.ep-service-search-row { display: flex; gap: 10px; min-width: 0; }
.ep-service-search {
    display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0;
    padding: 0 13px; border: 1px solid var(--ep-border, #dce7ed); border-radius: 15px;
    background: var(--ep-surface, white); color: var(--ep-muted, #637e91); margin: 0;
}
.ep-service-search > svg { flex: 0 0 21px; width: 21px; height: 21px; }
html body .page .content.content .employee-service-record-list-page .ep-service-search input {
    width: 100%; min-width: 0; min-height: 46px; padding: 0 !important;
    background: transparent !important; border: 0 !important; box-shadow: none !important; outline: none !important;
    color: var(--ep-text, #103a43) !important; font-size: 14px;
}
html body .page .content.content .employee-service-record-list-page .ep-service-search input::placeholder { color: var(--ep-muted, #637e91) !important; opacity: 1; }
.ep-service-search:focus-within { border-color: var(--ep-brand, #00877d); outline: 1px solid var(--ep-brand, #00877d); }
html body .page .content.content .employee-service-record-list-page .ep-service-sort-toggle {
    display: inline-flex; align-items: center; justify-content: center; gap: 5px;
    flex: 0 0 46px; min-height: 46px; padding: 0 10px; font-family: inherit; font-size: 11px; font-weight: 600;
    border: 1px solid var(--ep-service-action-bg); border-radius: 13px;
    background: var(--ep-service-action-bg); color: var(--ep-service-action-text);
}
html body .page .content.content .employee-service-record-list-page .ep-service-sort-toggle:hover,
html body .page .content.content .employee-service-record-list-page .ep-service-sort-toggle:active {
    background: var(--ep-service-action-hover); border-color: var(--ep-service-action-hover);
}
.ep-service-sort-toggle svg { width: 20px; height: 20px; }
html body .page .content.content .employee-service-record-list-page .ep-service-sort-toggle:focus-visible { outline: 1px solid var(--ep-brand, #00877d); outline-offset: 2px; }
html body .page .content.content .employee-service-record-list-page .ep-service-filters {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 36px;
    gap: 8px; align-items: center; padding: 5px 0 0; border: 0; background: transparent;
}
.ep-filter-select { position: relative; min-width: 0; }
.ep-filter-select:has(.ep-filter-options) { z-index: 30; }
html body .page .content.content .employee-service-record-list-page .ep-service-filters .ep-filter-border-label {
    position: absolute; top: 0; left: 9px; transform: translateY(-50%); z-index: 4;
    padding: 0 4px; background: var(--ep-surface, white); color: var(--ep-muted, #637e91);
    font-size: 10px; line-height: 1.2; font-weight: 500; pointer-events: none;
}
html body .page .content.content .employee-service-record-list-page .ep-service-filters button {
    outline: none !important; box-shadow: none !important; font-family: inherit;
}
html body .page .content.content .employee-service-record-list-page .ep-service-filters .ep-filter-trigger {
    position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 4px;
    width: 100%; min-width: 0; height: 42px; padding: 10px 9px 8px;
    border: 1px solid var(--ep-border, #dce7ed) !important; border-radius: 9px;
    background: var(--ep-surface, white) !important; color: var(--ep-text, #103a43); font-size: 12px;
}
.ep-filter-trigger > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-filter-trigger > svg { width: 14px; height: 14px; flex: 0 0 14px; color: var(--ep-muted, #637e91); }
html body .page .content.content .employee-service-record-list-page .ep-service-filters .ep-filter-trigger:is([aria-expanded="true"], :focus-visible) {
    border-color: color-mix(in srgb, var(--ep-brand, #00877d) 55%, var(--ep-border, #dce7ed)) !important;
}
html body .page .content.content .employee-service-record-list-page .ep-service-filters .ep-filter-dismiss {
    position: fixed; inset: 0; z-index: 1; width: 100%; height: 100%; padding: 0;
    border: 0 !important; background: transparent !important; cursor: default;
}
.ep-filter-options {
    position: absolute; z-index: 5; top: calc(100% + 5px); left: 0; min-width: 150px; width: 100%;
    max-height: 220px; overflow-y: auto; padding: 4px; border-radius: 10px;
    border: 1px solid var(--ep-border, #dce7ed); background: var(--ep-surface, white);
    box-shadow: 0 8px 22px #163b4c16;
}
.ep-filter-select:nth-child(2) .ep-filter-options { left: auto; right: 0; }
html body .page .content.content .employee-service-record-list-page .ep-service-filters .ep-filter-options button {
    display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 38px;
    padding: 8px; text-align: left; border: 0 !important; border-radius: 7px;
    background: transparent; color: var(--ep-text, #103a43); font-size: 12px;
}
html body .page .content.content .employee-service-record-list-page .ep-service-filters .ep-filter-options button:is(.is-selected, :hover, :focus-visible) {
    background: var(--ep-soft, #e4f5f0) !important; color: var(--ep-brand, #00877d) !important;
}
.ep-filter-options svg { width: 16px; height: 16px; flex: 0 0 16px; }
html body .page .content.content .employee-service-record-list-page .ep-service-filters .ep-service-filter-reset {
    display: grid; place-items: center; width: 36px; height: 42px; padding: 8px;
    border: 0 !important; border-radius: 9px; background: var(--ep-soft, #e4f5f0); color: var(--ep-brand, #00877d);
}
.ep-service-filter-reset svg { width: 19px; height: 19px; }
html body .page .content.content .employee-service-record-list-page .ep-service-filters .ep-service-filter-reset:focus-visible {
    outline: 1px solid var(--ep-brand, #00877d) !important; outline-offset: 2px;
}
.ep-service-empty button { border: 0; border-radius: 8px; min-height: 36px; padding: 6px 10px; background: var(--ep-soft, #e4f5f0); color: var(--ep-brand, #00877d); font-size: 12px; }
html body .page .content.content .employee-service-record-list-page .ep-service-pagination {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    margin-top: 12px; padding: 4px 0; width: 100%;
}
html body .page .content.content .employee-service-record-list-page .ep-service-pagination button {
    display: inline-flex; align-items: center; justify-content: center; gap: 4px;
    min-width: 0; min-height: 40px; padding: 8px 10px; border: 1px solid var(--ep-border, #dfeaf0);
    border-radius: 10px; background: var(--ep-surface, #fff); color: var(--ep-brand, #00877d);
    font-family: inherit; font-size: 12px; font-weight: 600; line-height: 1.2;
    box-shadow: none; cursor: pointer;
}
.ep-service-pagination button svg { width: 15px; height: 15px; flex-shrink: 0; }
.ep-service-pagination > span { font-size: 11px; color: var(--ep-muted, #637e91); white-space: nowrap; }
html body .page .content.content .employee-service-record-list-page .ep-service-pagination button:disabled {
    opacity: .4; cursor: default;
}
html body .page .content.content .employee-service-record-list-page .ep-service-pagination button:not(:disabled):hover {
    background: var(--ep-soft, #e2f5f0);
}
html body .page .content.content .employee-service-record-list-page .ep-service-pagination button:focus-visible {
    outline: 1px solid var(--ep-brand, #00877d); outline-offset: 2px;
}
@media (max-width: 760px) {
    body .page:has(.employee-service-record-list-page) {
        --ep-service-badge-bg: var(--ep-soft); --ep-service-badge-text: var(--ep-brand);
        --ep-service-icon-bg: var(--ep-soft); --ep-service-icon-color: var(--ep-brand);
    }
    html body .page .content.content .employee-service-record-list-page .ep-service-list-heading { display: flex !important; gap: 12px !important; align-items: center; }
    html body .page .content.content .employee-service-record-list-page .ep-service-list-heading h1 { font-size: 25px !important; letter-spacing: -.035em; color: var(--ep-text) !important; }
    html body .page .content.content .employee-service-record-list-page .employee-service-record-panel { padding: 0 !important; margin: 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important; }
    html body .page .content.content .employee-service-record-list-page .employee-service-record-card-list { gap: 8px !important; }
    html body .page .content.content .employee-service-record-list-page .employee-service-record-card {
        display: grid !important; grid-template-columns: 32px minmax(0, 1fr) 26px !important; gap: 10px !important;
        align-items: center !important; padding: 10px 11px !important; min-height: 66px !important;
        border: 1px solid var(--ep-border) !important; border-radius: 13px !important;
        background: var(--ep-surface) !important; box-shadow: 0 4px 12px #23465c04 !important;
    }
    html body .page .content.content .employee-service-record-list-page .employee-service-record-card::before { display: none !important; }
    html body .page .content.content .employee-service-record-list-page .ep-service-card-icon {
        width: 32px; height: 36px; border-radius: 10px;
        background: var(--ep-service-icon-bg); color: var(--ep-service-icon-color);
    }
    html body .page .content.content .employee-service-record-list-page .employee-service-record-card-main {
        display: grid !important; grid-template-columns: minmax(0, 1fr) auto !important;
        grid-template-areas: "position status" "date date"; gap: 1px 7px !important; align-items: center; min-width: 0;
    }
    html body .page .content.content .employee-service-record-list-page .employee-service-record-card-main strong {
        grid-area: position; margin: 0 !important; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
        font-size: 12px !important; line-height: 1.4 !important; color: var(--ep-text) !important;
    }
    html body .page .content.content .employee-service-record-list-page .employee-service-record-card-main span {
        grid-area: status; justify-self: end; width: auto !important; max-width: 85px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
        padding: 2px 6px !important; border-radius: 20px;
        font-size: 9px !important; line-height: 1.3 !important; font-weight: 650;
        color: var(--ep-service-badge-text) !important; background: var(--ep-service-badge-bg) !important;
    }
    html body .page .content.content .employee-service-record-list-page .employee-service-record-card-main em {
        grid-area: date; margin: 0 !important; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
        font-size: 11px !important; line-height: 1.4 !important; font-style: normal; font-weight: 400 !important; color: var(--ep-muted) !important;
    }
    html body .page .content.content .employee-service-record-list-page .employee-service-record-card-arrow {
        position: static !important; display: grid !important; place-items: center;
        width: 26px !important; height: 28px !important; min-width: 0 !important; min-height: 0 !important; padding: 0 !important; border: 0 !important;
        border-radius: 50% !important; background: transparent !important; color: var(--ep-muted) !important;
    }
    html body .page .content.content .employee-service-record-list-page .employee-service-record-card-arrow::before,
    html body .page .content.content .employee-service-record-list-page .employee-service-record-card-arrow::after { display: none !important; }
    @media (max-width: 359px) {
        html body .page .content.content .employee-service-record-list-page .ep-service-list-heading h1 { font-size: 22px !important; }
        html body .page .content.content .employee-service-record-list-page .employee-service-record-card { grid-template-columns: 28px minmax(0, 1fr) 22px !important; gap: 8px !important; padding: 10px 9px !important; }
        html body .page .content.content .employee-service-record-list-page .employee-service-record-card-main strong { font-size: 11px !important; }
        html body .page .content.content .employee-service-record-list-page .ep-service-card-icon { width: 28px; }
        html body .page .content.content .employee-service-record-list-page .employee-service-record-card-arrow { width: 22px !important; height: 24px !important; }
    }
}
