/* ---- Compacto (sobrescribe el CSS del skin; los @media de abajo siguen ganando) ---- */
.profile-layout { gap: 12px; max-width: none; width: 100%; }
.profile-card__body { padding: 16px 18px; }
.profile-card__header { margin-bottom: 12px; align-items: center; }
.profile-card__body h3 { margin: 0; font-size: 1.15rem; }
.profile-photo { grid-template-columns: 72px minmax(0, 1fr); gap: 14px; padding: 10px 12px; margin-bottom: 12px; }
.profile-photo__avatar { width: 72px; height: 72px; }
.profile-photo__fallback { font-size: 1.4rem; }
.profile-photo__body { gap: 6px; }
.profile-photo__actions { display: flex; width: auto; gap: 6px; }
.profile-photo__picker, .profile-photo__submit { width: 34px; height: 34px; aspect-ratio: auto; flex: 0 0 34px; }
.profile-photo__button-icon, .profile-photo__button-icon svg { width: 18px; height: 18px; }
.profile-photo__filename:empty, .profile-photo__body .status:empty { display: none; }
.profile-meta { grid-template-columns: minmax(0,1fr) minmax(0,1fr) minmax(0,2fr); gap: 8px; margin-bottom: 12px; }
.profile-meta div { padding: 8px 10px; }
.profile-meta dt, .profile-field span { margin-bottom: 3px; font-size: 0.7rem; }
.profile-meta dd { font-size: 0.92rem; }
.profile-form { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px 12px; }
.profile-form__split { display: contents; }
.profile-field { gap: 3px; }
.profile-actions, .profile-form > .status { grid-column: 1 / -1; }
.profile-form > .status:empty { display: none; }

@media (max-width: 980px) {
    .profile-meta,
    .profile-form__split {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .profile-hero {
        box-shadow: 0 22px 42px rgba(29, 78, 216, 0.18);
        overflow: hidden;
    }

    .profile-hero__body,
    .profile-card__body {
        padding: 24px 22px;
    }

    .profile-layout {
        gap: 18px;
    }

    .profile-card__header {
        flex-direction: column;
        gap: 12px;
    }

    .profile-title,
    .profile-card__body h3 {
        line-height: 1.16;
    }

    .profile-text {
        max-width: none;
        line-height: 1.6;
    }

    .profile-photo {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 18px;
        padding: 20px 18px;
        text-align: center;
        border-color: rgba(191, 219, 254, 0.94);
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(239, 246, 255, 0.95) 100%);
        box-shadow: 0 18px 36px rgba(148, 163, 184, 0.14);
    }

    .profile-photo__body {
        width: 100%;
        align-items: center;
        gap: 14px;
    }

    .profile-photo__actions {
        width: min(100%, 192px);
        padding: 6px;
        border: 1px solid rgba(191, 219, 254, 0.92);
        border-radius: var(--radius-lg);
        background: rgba(255, 255, 255, 0.82);
    }

    .profile-photo__filename,
    .profile-photo__body .status {
        width: 100%;
        text-align: center;
    }

    .profile-photo__body .status {
        margin-top: -2px;
    }

    .profile-photo-crop {
        padding: 16px;
    }

    .profile-photo-crop__dialog {
        padding: 20px;
    }

    .profile-card__header .button,
    .profile-photo-crop__header .button {
        width: 100%;
    }

    .profile-photo-crop__header,
    .profile-photo-crop__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .profile-actions {
        display: grid;
    }

    .profile-actions .button {
        width: 100%;
        min-height: 46px;
    }
}

@media (max-width: 560px) {
    .profile-hero__body,
    .profile-card__body {
        padding: 20px 16px;
    }

    .profile-photo {
        padding: 18px 16px;
        gap: 14px;
    }

    .profile-meta {
        gap: 12px;
    }

    .profile-meta div {
        padding: 12px;
    }

    .profile-photo__avatar {
        width: 104px;
        height: 104px;
        box-shadow: 0 14px 28px rgba(59, 130, 246, 0.16);
    }

    .profile-photo__actions {
        width: min(100%, 180px);
        gap: 5px;
    }

    .profile-photo-crop {
        padding: 12px;
    }

    .profile-photo-crop__dialog {
        padding: 16px;
    }
}
/* Email editable en la cabecera del perfil (ver profile.html, data-profile-email-*) */
.profile-email {
    display: grid;
    gap: 8px;
}

.profile-email__confirm {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.profile-email__confirm .input {
    flex: 1 1 220px;
    min-width: 0;
}

.profile-email .status:empty {
    display: none;
}

/* Indicador "Editando..." (reutiliza .labor-hero__editing-flag, pensado para cabecera de color) */
.profile-card__header .profile-editing-flag { margin-left: auto; margin-right: 10px; padding: 2px 10px; border-radius: 3px; background: color-mix(in srgb, var(--success, #16a34a) 16%, transparent); color: var(--success, #15803d); font-size: 0.78rem; font-weight: 700; }
.profile-card__header .profile-editing-flag[hidden], .profile-card__header [hidden] { display: none; }
.profile-card__header > .button[data-profile-edit] { margin-left: auto; }
.profile-editing-flag:not([hidden]) + .button { margin-left: 0; }
.profile-actions { gap: 8px; }
.profile-actions[hidden] { display: none; }
.profile-form .input:disabled { opacity: 1; background: transparent; border-color: transparent; padding-left: 0; cursor: default; }
@media (max-width: 720px) { .profile-card__header { flex-direction: row; flex-wrap: wrap; } .profile-card__header .button { width: auto; } }
