.employee-profile-modal {
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.employee-profile-modal__panel {
    width: min(760px, 96vw);
    max-height: min(88vh, 820px);
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.employee-profile-modal__header,
.employee-profile-modal__actions {
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #eef2f7;
}

.employee-profile-modal__actions {
    border-top: 1px solid #eef2f7;
    border-bottom: 0;
    justify-content: flex-end;
    background: #fff;
}

.employee-profile-modal__eyebrow {
    margin: 0 0 3px;
    color: #10b981;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}

.employee-profile-modal__header h3 {
    margin: 0;
    color: #111827;
    font-size: 1.18rem;
}

.employee-profile-modal__close,
.public-profile-modal__close {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: #f3f4f6;
    color: #4b5563;
    cursor: pointer;
    display: grid;
    place-items: center;
}

.employee-profile-modal__content {
    overflow: auto;
    padding: 18px 22px 22px;
}

.employee-profile-modal__avatar-row {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.07), rgba(255, 111, 0, 0.07));
    margin-bottom: 14px;
}

.employee-profile-modal__avatar,
.public-profile-modal__avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    color: #ff5a2a;
    font-weight: 900;
    border: 3px solid #fff;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.14);
}

.employee-profile-modal__avatar-input {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #374151;
    font-size: 0.88rem;
    font-weight: 700;
}

.employee-profile-modal__avatar-input input {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 9px;
    background: #fff;
}

.employee-profile-modal__avatar-input small {
    color: #6b7280;
    font-size: 0.76rem;
    font-weight: 600;
}

.employee-profile-modal__readonly,
.public-profile-modal__facts {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.employee-profile-modal__readonly div,
.public-profile-modal__facts div {
    min-width: 0;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
    padding: 10px;
}

.employee-profile-modal__readonly span,
.public-profile-modal__facts span {
    display: block;
    color: #6b7280;
    font-size: 0.72rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.employee-profile-modal__readonly strong,
.public-profile-modal__facts strong {
    display: block;
    color: #111827;
    font-size: 0.86rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.employee-profile-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.employee-profile-form-grid label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #374151;
    font-size: 0.84rem;
    font-weight: 800;
}

.employee-profile-form-grid input,
.employee-profile-form-grid textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 10px 11px;
    font: inherit;
    color: #111827;
    background: #fff;
    box-sizing: border-box;
}

.employee-profile-form-grid textarea {
    resize: vertical;
    min-height: 74px;
}

.employee-profile-form-grid__wide {
    grid-column: 1 / -1;
}

.employee-profile-modal__primary,
.employee-profile-modal__secondary {
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    font-weight: 900;
    cursor: pointer;
}

.employee-profile-modal__primary {
    color: #fff;
    background: linear-gradient(135deg, #ff5a2a, #10b981);
    box-shadow: 0 10px 22px rgba(255, 90, 42, 0.22);
}

.employee-profile-modal__secondary {
    color: #374151;
    background: #f3f4f6;
}

.public-profile-modal.hidden {
    display: none;
}

.public-profile-modal {
    position: fixed;
    inset: 0;
    z-index: 10020;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.public-profile-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.public-profile-modal__panel {
    position: relative;
    width: min(520px, 94vw);
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.32);
    overflow: hidden;
}

.public-profile-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    background: rgba(255, 255, 255, 0.88);
}

.public-profile-modal__cover {
    height: 112px;
    background:
        radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.5), transparent 34%),
        linear-gradient(135deg, #ff5a2a, #ffd18a 52%, #10b981);
}

.public-profile-modal__body {
    padding: 0 22px 22px;
    text-align: center;
}

.public-profile-modal__avatar {
    width: 96px;
    height: 96px;
    margin: -48px auto 12px;
}

.public-profile-modal__body h3 {
    margin: 0;
    color: #111827;
    font-size: 1.35rem;
}

.public-profile-modal__role {
    margin: 5px 0 16px;
    color: #6b7280;
    font-weight: 800;
}

.public-profile-modal__facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    text-align: left;
    margin-bottom: 0;
}

@media (max-width: 720px) {
    .employee-profile-modal {
        padding: 10px;
        align-items: flex-end;
    }

    .employee-profile-modal__panel {
        width: 100%;
        max-height: 92vh;
        border-radius: 20px 20px 0 0;
    }

    .employee-profile-modal__readonly {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .employee-profile-form-grid {
        grid-template-columns: 1fr;
    }

    .employee-profile-modal__avatar-row {
        grid-template-columns: 60px minmax(0, 1fr);
    }

    .employee-profile-modal__avatar {
        width: 60px;
        height: 60px;
    }
}

.admin-profile-fields {
    display: grid;
    gap: 18px;
}

.admin-profile-fields__intro {
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(255, 111, 0, 0.06));
}

.admin-profile-fields__intro h4 {
    margin: 0 0 5px;
    color: #111827;
    font-size: 1rem;
}

.admin-profile-fields__intro p {
    margin: 0;
    color: #6b7280;
    font-size: 0.88rem;
    font-weight: 600;
}

.admin-profile-fields__form {
    display: grid;
    grid-template-columns: 1.4fr 1.1fr 0.8fr 0.6fr;
    gap: 12px;
    align-items: end;
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
}

.admin-profile-fields__form label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: #374151;
    font-size: 0.78rem;
    font-weight: 900;
}

.admin-profile-fields__form input,
.admin-profile-fields__form select {
    min-height: 38px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 8px 10px;
    font: inherit;
}

.admin-profile-fields__check {
    flex-direction: row !important;
    align-items: center;
    min-height: 38px;
}

.admin-profile-fields__check input {
    min-height: auto;
    width: auto;
}

.admin-profile-fields__form button,
.admin-profile-fields__deactivate {
    border: 0;
    border-radius: 999px;
    padding: 9px 14px;
    font-weight: 900;
    cursor: pointer;
}

.admin-profile-fields__form button {
    color: #fff;
    background: #10b981;
}

.admin-profile-fields__deactivate {
    width: auto;
    background: #ef4444 !important;
}

.admin-profile-fields__table-wrap {
    overflow-x: auto;
}

@media (max-width: 960px) {
    .admin-profile-fields__form {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .admin-profile-fields__form {
        grid-template-columns: 1fr;
    }
}
