/* ============================================================
 * CSS del módulo "profile" para el skin "sky".
 * Este archivo es un SUSTITUTO COMPLETO del CSS normal del
 * módulo cuando el skin activo es "sky" (no una capa de
 * ajustes encima) -- se carga en su lugar, nunca junto a él.
 * Edítalo libremente para dar a este módulo un aspecto
 * específico de este skin (incluye layout/estructura, no solo
 * colores). Ver también: assets/css/base.css (tokens/variables
 * por skin+modo).
 * ============================================================ */

.profile-layout {
    display: grid;
    gap: 20px;
}

.profile-hero {
    /* #2b2118 fijo (no var(--text)): en Goat2 OSCURO --text es un color
       CLARO (pensado para servir de texto sobre fondo oscuro, no al revés),
       así que usarlo como extremo de un degradado de FONDO lo volvía pálido
       y sin contraste con el texto blanco encima -- el bug real que se
       veía. Un oscuro fijo mantiene el mismo look "solemne" en los 2 modos. */
    background: var(--hero-gradient);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
}

.profile-hero__body,
.profile-card__body {
    padding: 32px;
}

.profile-kicker {
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.76rem;
    font-weight: 700;
}

.profile-title,
.profile-card__body h3 {
    margin: 0 0 12px;
    letter-spacing: -0.03em;
}

.profile-text {
    margin: 0;
    max-width: 760px;
    line-height: 1.7;
    opacity: 0.92;
}

.profile-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.profile-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 0 0 24px;
}

.profile-photo {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 24px;
    align-items: center;
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface-soft);
}

.profile-photo__avatar {
    width: 108px;
    height: 108px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--surface-soft) 0%, var(--surface-hover) 100%);
}

.profile-photo__image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.profile-photo__fallback {
    color: var(--primary-dark);
    font-size: 2rem;
    font-weight: 700;
    text-transform: uppercase;
}

.profile-photo__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 10px;
}

.profile-photo__body h3 {
    margin: 0;
}

.profile-photo__text,
.profile-photo__filename {
    margin: 0;
    color: var(--text-soft);
}

.profile-photo__actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 108px;
    gap: 6px;
    align-items: stretch;
}

.profile-photo__picker {
    position: relative;
    overflow: hidden;
}

.profile-photo__picker,
.profile-photo__submit {
    width: 100%;
    min-width: 0;
    min-height: 0;
    padding: 0;
    aspect-ratio: 1 / 1;
}

.profile-photo__button-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.profile-photo__button-icon svg {
    width: 24px;
    height: 24px;
    display: block;
}

.profile-photo__button-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.profile-photo__filename,
.profile-photo__body .status {
    max-width: 100%;
    overflow-wrap: anywhere;
}

.profile-photo-crop {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.8);
}

.profile-photo-crop__dialog {
    width: min(100%, 560px);
    display: grid;
    gap: 16px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: 0 22px 70px rgba(15, 23, 42, 0.24);
}

.profile-photo-crop__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.profile-photo-crop__title,
.profile-photo-crop__text {
    margin: 0;
}

.profile-photo-crop__text {
    color: var(--text-soft);
}

.profile-photo-crop__viewport {
    position: relative;
    width: min(100%, 320px);
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: #0f172a;
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.profile-photo-crop__viewport.is-dragging {
    cursor: grabbing;
}

.profile-photo-crop__image {
    position: absolute;
    top: 0;
    left: 0;
    max-width: none;
    max-height: none;
    transform-origin: top left;
    will-change: transform, width, height;
}

.profile-photo-crop__guide {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: var(--radius-lg);
    pointer-events: none;
    background:
        linear-gradient(to right,
            transparent 33%,
            rgba(255, 255, 255, 0.28) 33%,
            rgba(255, 255, 255, 0.28) 34%,
            transparent 34%,
            transparent 66%,
            rgba(255, 255, 255, 0.28) 66%,
            rgba(255, 255, 255, 0.28) 67%,
            transparent 67%),
        linear-gradient(to bottom,
            transparent 33%,
            rgba(255, 255, 255, 0.28) 33%,
            rgba(255, 255, 255, 0.28) 34%,
            transparent 34%,
            transparent 66%,
            rgba(255, 255, 255, 0.28) 66%,
            rgba(255, 255, 255, 0.28) 67%,
            transparent 67%);
}

.profile-photo-crop__zoom {
    display: grid;
    gap: 8px;
}

.profile-photo-crop__zoom span {
    color: var(--text-soft);
    font-size: 0.88rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.profile-photo-crop__zoom input {
    width: 100%;
}

.profile-photo-crop__actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.profile-meta div {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface-soft);
}

.profile-meta dt,
.profile-field span {
    margin-bottom: 8px;
    color: var(--text-soft);
    font-size: 0.88rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.profile-meta dt {
    display: block;
}

.profile-meta dd {
    margin: 0;
    font-weight: 600;
}

.profile-form {
    display: grid;
    gap: 16px;
}

.profile-form__split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.profile-field {
    display: grid;
    gap: 8px;
}

.profile-actions {
    display: flex;
    justify-content: flex-start;
}

/* ---- Apariencia: skin (Goat1/Goat2) + modo (claro/oscuro) ---- */
.profile-appearance {
    display: grid;
    gap: 18px;
}

.profile-appearance__group {
    display: grid;
    gap: 10px;
}

.profile-appearance__label {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.88rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.profile-appearance__options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.profile-appearance__option {
    position: relative;
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.profile-appearance__option:hover {
    border-color: var(--border-strong);
}

.profile-appearance__option.is-selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 14%, transparent);
}

.profile-appearance__swatch {
    display: flex;
    gap: 6px;
}

.profile-appearance__swatch span {
    display: block;
    width: 22px;
    height: 22px;
    border-radius: var(--radius);
    border: 1px solid rgba(0, 0, 0, 0.12);
}

.profile-appearance__option-title {
    font-weight: 700;
    color: var(--text);
}

.profile-appearance__option-text {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.82rem;
}