.employee-name-link {
    border: 0 !important;
    background: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    color: #245b91 !important;
    font: inherit;
    font-weight: 650;
    text-align: left;
    cursor: pointer;
}
.employee-name-link:hover {text-decoration: underline}

.employee-profile {
    --profile-text: #172e47;
    --profile-muted: #49627d;
    --profile-line: #d8e4ef;
    --profile-pink: #fbe6ef;
    --profile-rose: #792749;
    width: min(1080px, calc(100% - 32px));
    max-width: none;
    max-height: 92dvh;
    padding: 0;
    overflow: auto;
    border: 1px solid var(--profile-line);
    border-radius: 20px;
    background: #f5f8fc;
    color: var(--profile-text);
    box-shadow: 0 24px 80px #102b4840;
    scroll-padding-top: 110px;
}
.employee-profile::backdrop {background: #10263c88}
.employee-profile > header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 17px 24px;
    border-bottom: 1px solid var(--profile-line);
    background: #fff;
}
.employee-profile > header small {
    color: var(--profile-muted);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .12em;
}
.profile-identity {display: flex; align-items: center; flex-wrap: wrap; gap: 5px 12px}
.employee-profile h2 {margin: 2px 0; font-size: clamp(23px, 3vw, 32px); overflow-wrap: anywhere}
.profile-employment {
    padding: 4px 9px;
    border-radius: 20px;
    background: #eef2f6;
    color: #46586b;
    font-size: 12px;
    font-weight: 650;
}
.profile-employment.is-active {background: #e3f3ec; color: #235b46}
.employee-profile [data-profile-close] {
    flex: 0 0 44px;
    width: 44px;
    min-height: 44px;
    padding: 0;
    border: 1px solid var(--profile-line);
    border-radius: 10px;
    background: #fff;
    color: #234a75;
    font-size: 24px;
    cursor: pointer;
}
.employee-profile [data-profile-close]:hover {background: #edf5ff}
.employee-profile :is(button, summary, input, select, a):focus-visible {
    outline: 2px solid #23588d;
    outline-offset: 2px;
}
.profile-month-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin: 14px 24px;
}
.profile-month-options,.profile-month-shortcuts,.profile-salary,.profile-envelope {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.profile-month-shortcuts button,.profile-salary [data-salary-edit] {min-height: 44px}
.profile-month-shortcuts button {text-transform: capitalize}
.employee-profile .profile-month-shortcuts button[aria-pressed="true"],
.employee-profile .profile-other-month.is-selected summary {
    border-color: #e5a6bf;
    background: var(--profile-pink);
    color: var(--profile-rose);
}
.profile-other-month summary,.profile-absence-form summary {
    cursor: pointer;
    padding: 10px 8px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #23588d;
}
.profile-month {display: flex; align-items: center; gap: 8px; margin-top: 6px}
.profile-month input {max-width: 190px; min-height: 44px}
.profile-salary {font-size: .92rem}
.profile-salary [data-salary-edit] {display: inline-grid; place-items: center; padding: 7px}
.profile-salary [data-salary-form]:not([hidden]) {display: flex; align-items: center; flex-wrap: wrap; gap: 8px}
.profile-salary input {max-width: 145px}
.profile-salary small {color: var(--profile-muted)}
.employee-profile [data-profile-body] {padding: 0 24px 24px}
.profile-overview,.profile-work-grid,.profile-records {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 14px;
    align-items: start;
}
.profile-overview {align-items: stretch}
.profile-records {grid-template-columns: repeat(2,minmax(0,1fr))}
.profile-panel,.profile-calendar-panel {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--profile-line);
    border-radius: 14px;
    background: #fff;
}
.profile-payroll {background: #edf4fc}
.employee-profile :is(h3,h4) {margin: 0 0 12px; font-size: 1.05rem; line-height: 1.3}
.profile-stats {display: grid; gap: 12px; margin: 0}
.profile-stats > div {min-width: 0}
.profile-stats dt {color: var(--profile-muted); font-size: .82rem; line-height: 1.35}
.profile-stats dd {margin: 3px 0 0; font-weight: 700; overflow-wrap: anywhere; font-variant-numeric: tabular-nums}
.profile-payroll-stats {grid-template-columns: repeat(3,minmax(0,1fr))}
.profile-payroll-stats dd {font-size: clamp(1rem, 1.8vw, 1.35rem)}
.profile-payroll-stats > div:last-child dd {color: #184f86}
.profile-info-stats {grid-template-columns: repeat(2,minmax(0,1fr))}
.profile-info-stats dd {font-size: .92rem}
.profile-note,.profile-envelope,.profile-notice {font-size: .82rem; color: var(--profile-muted)}
.profile-note {margin: 12px 0 0; line-height: 1.5}
.profile-envelope {margin-top: 12px}
.profile-work,.profile-records {margin-top: 20px}
.profile-section-head {display: flex; align-items: baseline; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; margin-bottom: 10px}
.profile-section-head h3,.profile-section-head p {margin: 0}
.profile-section-head p {color: var(--profile-muted); font-size: .9rem}
.profile-work-grid {grid-template-columns: minmax(0,2fr) minmax(0,1fr)}
.profile-work-grid:has(> :only-child) {grid-template-columns: minmax(0,1fr)}
.profile-norm-stats > div {display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--profile-line)}
.profile-norm-stats dd {margin: 0; text-align: right; font-size: .92rem}
.profile-norm-stats > :is(.profile-overtime-15, .profile-overtime-20) {
    padding: 6px 8px;
    border-bottom: 0;
    border-radius: 6px;
}
.profile-norm-stats > :is(.profile-overtime-15, .profile-overtime-20) dt {color: inherit}
.profile-notice {padding: 10px; background: #fff3db; border-radius: 8px; color: #71490d}
.profile-load-state {margin: 0; min-height: 70px; padding: 16px}

.profile-calendar-panel {padding: 0}
.profile-calendar-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--profile-line);
}
.profile-calendar-heading strong {font-size: 1.05rem; text-transform: capitalize}
.profile-calendar-nav {display: flex; flex: none; gap: 6px}
.employee-profile .profile-calendar-nav button {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border: 1px solid #e5a6bf;
    border-radius: 9px;
    background: var(--profile-pink);
    color: var(--profile-rose);
    box-shadow: 0 2px 5px #a9426c29;
}
.employee-profile .profile-calendar-nav button:hover {background: #f4c0d5}
.profile-calendar-nav svg {display: block; width: 20px; height: 20px; pointer-events: none}
.profile-calendar {
    display: grid;
    grid-template-columns: repeat(7,minmax(0,1fr));
    gap: 4px;
    padding: 8px 10px 12px;
}
.profile-calendar-weekday {text-align: center; color: var(--profile-muted); padding: 4px 0; font-size: .81rem}
.profile-calendar-day {
    min-width: 0;
    min-height: 48px;
    padding: 2px;
    border-radius: 8px;
    text-align: center;
    color: #204f85;
    overflow-wrap: anywhere;
    font-size: .75rem;
}
.profile-calendar-day.is-off {color: #a63838; background: #fcf3f3}
.profile-calendar-date {display: block; margin-bottom: 2px; font-weight: 700}
.profile-calendar-day summary {display: grid; align-content: center; min-height: 44px; list-style: none; cursor: pointer; border-radius: 6px}
.profile-calendar-day summary::-webkit-details-marker {display: none}
.profile-calendar-day summary:hover,.profile-calendar-day[open] {background: #eaf3ff}
.profile-day-compact {display: none}
.profile-calendar-detail {padding-top: 5px; margin-top: 4px; border-top: 1px solid var(--profile-line)}
.profile-calendar-detail small {display: block}
.profile-table {overflow: auto}
.profile-table table {width: 100%; border-collapse: collapse; font-size: .87rem}
.profile-table :is(th,td) {padding: 8px; text-align: left; border-bottom: 1px solid var(--profile-line); overflow-wrap: anywhere}
.profile-table th {color: var(--profile-muted); background: #eef4fa}
.profile-table td {font-variant-numeric: tabular-nums}
.profile-table tr:last-child td {border-bottom: 0}
.profile-absence-form {margin-bottom: 8px}
.profile-absence-form form {display: grid; gap: 8px; padding: 8px 0}
.profile-absence-form form :is(input,select) {max-width: 100%}
.profile-absence-form form button {justify-self: start}
[data-absence-error]:empty {display: none}
.profile-footer {margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--profile-line); text-align: right}
.employee-profile [data-profile-employment="dismiss"] {color: #a12f2f}
@media(max-width: 760px) {
    .profile-overview,.profile-work-grid,.profile-records {grid-template-columns: minmax(0,1fr)}
}
@media(max-width: 480px) {
    .employee-profile {width: calc(100% - 16px); max-height: 96dvh; border-radius: 14px}
    .employee-profile > header {padding: 10px 12px}
    .profile-month-bar {margin: 12px}
    .employee-profile [data-profile-body] {padding: 0 12px 12px}
    .profile-panel {padding: 12px}
    .profile-payroll-stats {grid-template-columns: repeat(2,minmax(0,1fr))}
    .profile-payroll-stats > div:last-child {grid-column: 1 / -1; padding-top: 8px; border-top: 1px solid var(--profile-line)}
    .profile-calendar {gap: 2px; padding-inline: 5px}
    .profile-day-full {display: none}
    .profile-day-compact {display: block}
}
@media(prefers-reduced-motion: reduce) {
    .employee-profile,.employee-profile * {animation: none !important; transition: none !important; scroll-behavior: auto !important}
}

.profile-calendar {gap: 6px}
.profile-calendar-day {border: 1px solid #e2eaf3; background: #f7f9fc; padding: 5px; line-height: 1.25}
.profile-calendar-day.is-off {border-color: #f0e3e3}
.profile-calendar-day summary {align-content: start; gap: 2px}
.profile-calendar-date {margin-bottom: 3px}
.profile-day-time {display: flex; align-items: baseline; justify-content: space-between; gap: 3px; padding-inline: 3px; white-space: nowrap; font-variant-numeric: tabular-nums}
.profile-day-time {
    border-radius: 4px;
    background: #e7f0fb;
    color: #244e79;
    box-shadow: inset 0 0 0 1px #c4d6ec;
}
.profile-norm-stats > .profile-overtime-15,
.profile-day-time + .profile-day-time {
    background: #fff0d6;
    color: #76470b;
    box-shadow: inset 0 0 0 1px #e9ce98;
}
.profile-norm-stats > .profile-overtime-20,
.profile-day-time + .profile-day-time + .profile-day-time {
    background: #f0e8fa;
    color: #5c357c;
    box-shadow: inset 0 0 0 1px #d9c7ee;
}
.profile-day-time small {color: inherit; font-size: .78em}
.profile-day-time.is-zero strong {font-weight: 400}
@media(max-width: 600px) {
    .profile-calendar {gap: 3px}
    .profile-calendar-day {padding: 3px 1px}
    .profile-day-time {padding-inline: 0; gap: 1px; font-size: .62rem}
}
