/* ===== Auth & Perfil · We Love Medellín =====
   Tema claro: usa los tokens de wlm.css (--paper, --text, --brand, etc.)
   para que combine con el resto del sitio y siga cualquier re-theming. */

.auth-section {
    min-height: calc(100vh - 220px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 16px 80px;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 38px 32px 32px;
}

.auth-card h1 {
    font-family: var(--font-display);
    font-size: clamp(30px, 5vw, 38px);
    color: var(--ink);
    letter-spacing: -0.045em;
    line-height: 1.02;
    font-weight: 800;
    margin: 12px 0 8px;
}

.auth-card .auth-sub {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.55;
    margin: 0 0 26px;
}

.auth-form {
    display: grid;
    gap: 17px;
}

.auth-field {
    display: grid;
    gap: 7px;
}

.auth-field label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.005em;
}

.auth-field input,
.auth-field textarea {
    width: 100%;
    font: inherit;
    font-size: 15px;
    color: var(--text);
    background: var(--paper-soft);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 13px 15px;
    outline: none;
    transition:
        border-color 0.16s ease,
        box-shadow 0.16s ease,
        background 0.16s ease;
}

.auth-field input::placeholder,
.auth-field textarea::placeholder {
    color: var(--soft);
}

.auth-field input:hover,
.auth-field textarea:hover {
    border-color: #cfcfcf;
}

.auth-field input:focus-visible,
.auth-field textarea:focus-visible {
    border-color: var(--brand);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(255, 56, 92, 0.14);
}

.auth-field textarea {
    resize: vertical;
    min-height: 96px;
    line-height: 1.5;
}

.auth-hint {
    font-size: 12px;
    color: var(--soft);
    margin: 0;
}

.auth-submit {
    width: 100%;
    margin-top: 6px;
}

.auth-alt {
    margin: 24px 0 0;
    font-size: 14px;
    color: var(--muted);
    text-align: center;
}

.auth-alt a {
    color: var(--brand);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1.5px;
}

.auth-alt a:hover {
    color: var(--brand-dark);
}

.auth-message {
    border-radius: var(--radius-sm);
    padding: 13px 15px;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 500;
    margin: 0 0 20px;
}

.auth-message-error {
    background: var(--brand-soft);
    border: 1px solid rgba(255, 56, 92, 0.3);
    color: var(--brand-dark);
}

.auth-message-success {
    background: #effaf2;
    border: 1px solid #bfe9cd;
    color: #1c7a44;
}

/* ===== Perfil ===== */

.profile-section {
    max-width: 760px;
    margin: 0 auto;
    padding: 48px 16px 88px;
}

.profile-head {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 26px;
}

.profile-avatar {
    width: 84px;
    height: 84px;
    flex: 0 0 84px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-size: 34px;
    font-weight: 800;
    color: #fff;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-head h1 {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-family: var(--font-display);
    font-size: clamp(28px, 5vw, 38px);
    color: var(--ink);
    letter-spacing: -0.045em;
    line-height: 1.02;
    font-weight: 800;
    margin: 0;
}

.profile-handle {
    color: var(--muted);
    font-size: 15px;
    font-weight: 600;
    margin: 6px 0 0;
}

.profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 32px;
}

.profile-meta span {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    background: var(--paper-soft);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 7px 13px;
}

.profile-card {
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 30px;
    margin-bottom: 22px;
}

.profile-card h2 {
    font-family: var(--font-display);
    font-size: 20px;
    color: var(--ink);
    letter-spacing: -0.03em;
    font-weight: 800;
    margin: 0 0 20px;
}

.profile-logout {
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 560px) {
    .auth-section {
        padding: 32px 14px 64px;
    }

    .auth-card {
        padding: 28px 20px 24px;
        border-radius: var(--radius-md);
    }

    .profile-card {
        padding: 22px 18px;
        border-radius: var(--radius-md);
    }

    .profile-head {
        gap: 15px;
    }

    .profile-avatar {
        width: 66px;
        height: 66px;
        flex-basis: 66px;
        font-size: 26px;
    }
}

/* Enlace "¿Olvidaste tu contraseña?" debajo del campo de clave */
.auth-hint a {
    color: var(--brand);
    font-weight: 600;
    text-decoration: none;
}

.auth-hint a:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Estado "enviando" de los botones de cuenta (anti doble-clic) */
.auth-submit:disabled,
.auth-submit.is-loading {
    opacity: 0.78;
    cursor: progress;
}

.auth-submit.is-loading::after {
    content: "";
    display: inline-block;
    width: 15px;
    height: 15px;
    margin-left: 9px;
    vertical-align: -2px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: wlm-auth-spin 0.6s linear infinite;
}

/* Campos en solo-lectura mientras se procesa el envío */
.auth-field input:read-only,
.auth-field textarea:read-only {
    opacity: 0.7;
    cursor: not-allowed;
}

@keyframes wlm-auth-spin {
    to {
        transform: rotate(360deg);
    }
}