/* Employee profile: scoped to this page. */
.employee-profile {
    --ep-blue: #2563eb;
    --ep-ink: #172b4d;
    --ep-muted: #64748b;
    color: var(--ep-ink);
    padding-bottom: 28px;
}

.employee-profile .profile-hero,
.employee-profile .profile-section,
.employee-profile .profile-actions {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 5px 18px rgba(15, 23, 42, .045);
    margin-bottom: 20px;
    overflow: hidden;
}

.employee-profile .profile-hero {
    border-top: 4px solid var(--ep-blue);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.employee-profile .profile-avatar {
    width: 90px;
    height: 90px;
    flex: 0 0 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #dbeafe;
    background: #eff6ff;
}

.employee-profile .profile-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1d4ed8;
    font-size: 32px;
    font-weight: 700;
}

.employee-profile .profile-identity {
    flex: 1 1 220px;
    min-width: 0;
}

.employee-profile .profile-identity h4 {
    font-size: 23px;
    font-weight: 700;
    margin: 0 0 7px;
    overflow-wrap: anywhere;
}

.employee-profile .profile-identity p {
    color: var(--ep-muted);
    font-size: 13px;
    margin: 4px 0;
    overflow-wrap: anywhere;
}

.employee-profile .profile-hero-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.employee-profile .profile-badge {
    display: inline-block;
    border-radius: 20px;
    background: #eff6ff;
    color: #1e40af;
    padding: 5px 11px;
    font-size: 12px;
    font-weight: 700;
}

.employee-profile .profile-badge-submitted {
    background: #dcfce7;
    color: #166534;
}

.employee-profile .profile-badge-draft {
    background: #fff7ed;
    color: #9a3412;
}

.employee-profile .profile-note {
    padding: 14px 16px;
    margin-bottom: 20px;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    background: #eff6ff;
    color: #1e40af;
    font-size: 13px;
    line-height: 1.65;
}

.employee-profile .section-heading {
    padding: 17px 22px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.employee-profile .section-heading h5 {
    color: #17365d;
    font-size: 16px;
    font-weight: 700;
    margin: 0;
}

.employee-profile .section-heading p {
    color: var(--ep-muted);
    font-size: 12px;
    margin: 6px 0 0;
    line-height: 1.6;
}

.employee-profile .section-content {
    padding: 20px 22px 8px;
}

.employee-profile .profile-block + .profile-block {
    border-top: 1px solid #e8edf4;
    padding-top: 18px;
    margin-top: 6px;
}

.employee-profile .profile-block-title {
    color: #1d4ed8;
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 14px;
}

.employee-profile .info-item {
    height: calc(100% - 14px);
    min-height: 77px;
    padding: 12px 14px;
    margin-bottom: 14px;
    border: 1px solid #e5ebf3;
    border-radius: 9px;
    background: #fbfdff;
}

.employee-profile .info-label {
    display: block;
    color: var(--ep-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .055em;
    text-transform: uppercase;
    margin-bottom: 7px;
}

.employee-profile .info-value {
    display: block;
    color: var(--ep-ink);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.65;
    overflow-wrap: anywhere;
    white-space: pre-line;
}

.employee-profile .profile-empty {
    color: var(--ep-muted);
    font-size: 13px;
    padding: 0 0 14px;
    margin: 0;
}

.employee-profile .profile-actions {
    padding: 20px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.employee-profile .profile-actions p {
    margin: 0;
    color: var(--ep-muted);
    font-size: 13px;
    flex: 1 1 260px;
}

.employee-profile .profile-edit-btn {
    display: inline-block;
    background: var(--ep-blue);
    border: 1px solid var(--ep-blue);
    color: #fff !important;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
}

.employee-profile .profile-edit-btn:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    text-decoration: none;
}

.employee-profile .profile-edit-btn:focus-visible {
    outline: 3px solid #93c5fd;
    outline-offset: 3px;
}

.employee-profile .alert {
    border-radius: 9px;
}

.employee-profile .profile-completion-card {
    padding: 22px;
    margin-bottom: 22px;
    background: #fff;
    border: 1px solid #dbe5f0;
    border-radius: 14px;
}

.employee-profile .completion-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}

.employee-profile .completion-heading strong {
    color: #17365d;
    font-size: 22px;
    font-weight: 750;
}

.employee-profile .completion-status {
    padding: 6px 12px;
    border-radius: 20px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 12px;
    font-weight: 700;
}

.employee-profile .completion-status.is-submitted {
    background: #dcfce7;
    color: #166534;
}

.employee-profile .completion-track {
    height: 12px;
    overflow: hidden;
    background: #e2e8f0;
    border-radius: 20px;
}

.employee-profile .completion-fill {
    height: 100%;
    background: #2563eb;
    border-radius: inherit;
}

.employee-profile .completion-description {
    margin: 10px 0 0;
    color: #52647a;
    font-size: 13px;
}

.employee-profile .completion-draft-note {
    margin: 12px 0 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: #eff6ff;
    color: #1e40af;
    font-size: 12px;
    line-height: 1.6;
}

/* HR record layout */
.employee-profile .hr-record-section .section-heading {
    padding: 18px 22px;
    background: #f8fafc;
}

.employee-profile .hr-record-section .section-heading h5 {
    font-size: 17px;
    margin-bottom: 5px;
}

.employee-profile .hr-record-section .section-heading p {
    font-size: 12px;
    line-height: 1.6;
}

.employee-profile .hr-record-section .section-content {
    padding: 22px;
}

.employee-profile .hr-record-section .profile-block {
    margin: 0;
}

.employee-profile .hr-record-section .profile-block + .profile-block {
    margin-top: 20px;
}

.employee-profile .hr-record-section .profile-block-title {
    margin: 0 0 12px;
    padding: 0;
    border: 0;
    color: #52647a;
    font-size: 13px;
    font-weight: 700;
}

/* Two columns for HR administration. */
.employee-profile .hr-record-section .row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
}

/* Three equal summary cards. */
.employee-profile .hr-record-section .profile-block:first-child .row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Full-width remarks. */
.employee-profile .hr-record-section .profile-block:last-child .row {
    grid-template-columns: minmax(0, 1fr);
}

/* Override Bootstrap widths only inside this section. */
.employee-profile .hr-record-section .row > [class*="col-"] {
    width: 100%;
    max-width: none;
    min-width: 0;
    flex: none;
    margin: 0;
    padding: 0;
}

.employee-profile .hr-record-section .info-item {
    box-sizing: border-box;
    height: 100%;
    min-height: 88px;
    margin: 0;
    padding: 15px 17px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.employee-profile .hr-record-section .profile-block:first-child .info-item {
    background: #f8fafc;
}

.employee-profile .hr-record-section .info-label {
    margin-bottom: 9px;
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .05em;
}

.employee-profile .hr-record-section .info-value {
    color: #17365d;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

/* Profile-status badge. */
.employee-profile .hr-record-section
.profile-block:first-child .row > :first-child .info-value {
    display: inline-block;
    padding: 4px 11px;
    border-radius: 20px;
    background: #e2e8f0;
    color: #475569;
    font-size: 12px;
}

.employee-profile .hr-record-section[data-profile-state="submitted"]
.profile-block:first-child .row > :first-child .info-value {
    background: #dcfce7;
    color: #166534;
}

/* Completion percentage. */
.employee-profile .hr-record-section
.profile-block:first-child .row > :last-child .info-value {
    color: #1d4ed8;
    font-size: 19px;
    font-weight: 750;
}

/* Remarks. */
.employee-profile .hr-record-section
.profile-block:last-child .info-item {
    min-height: 0;
    background: #fafbfc;
}

.employee-profile .hr-record-section
.profile-block:last-child .info-value {
    white-space: pre-line;
    font-weight: 400;
}

@media (max-width: 767px) {
    .employee-profile .profile-hero,
    .employee-profile .section-heading,
    .employee-profile .profile-actions {
        padding: 16px;
    }

    .employee-profile .section-content {
        padding: 16px 16px 4px;
    }

    .employee-profile .profile-avatar {
        width: 72px;
        height: 72px;
        flex-basis: 72px;
    }

    .employee-profile .profile-identity h4 {
        font-size: 20px;
    }

    .employee-profile .profile-hero-actions {
        width: 100%;
    }
    
    .employee-profile .hr-record-section .section-heading,
    .employee-profile .hr-record-section .section-content {
        padding: 16px;
    }

    .employee-profile .hr-record-section .row,
    .employee-profile .hr-record-section .profile-block:first-child .row {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .employee-profile .hr-record-section .info-item {
        min-height: 0;
    }
    
    .employee-profile .profile-completion-card {
        box-sizing: border-box;
        width: 100%;
        min-width: 0;
        padding: 16px;
        margin-bottom: 16px;
        border-radius: 12px;
    }

    .employee-profile .completion-heading {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 12px;
    }

    .employee-profile .completion-heading strong {
        font-size: 20px;
        line-height: 1.3;
    }

    .employee-profile .completion-status {
        max-width: 100%;
        box-sizing: border-box;
        padding: 5px 10px;
        font-size: 11px;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .employee-profile .completion-track {
        width: 100%;
        height: 10px;
    }

    .employee-profile .completion-description {
        margin-top: 9px;
        font-size: 12px;
        line-height: 1.7;
        overflow-wrap: anywhere;
    }

    .employee-profile .completion-description > strong {
        display: block;
        margin-bottom: 2px;
    }

    .employee-profile .completion-draft-note {
        padding: 10px;
        margin-top: 12px;
        font-size: 12px;
        line-height: 1.6;
        overflow-wrap: anywhere;
    }
}