:root {
    --naranja: #f37021;
    --naranja-oscuro: #d45a12;
    --naranja-suave: rgba(243, 112, 33, 0.12);
    --fondo: #f7f4f0;
    --fondo-tarjeta: #ffffff;
    --borde: #eadfd6;
    --texto: #1c1c1c;
    --texto-tenue: #5c534c;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

html {
    color-scheme: light;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: radial-gradient(circle at top right, #ffe8d6 0%, var(--fondo) 46%);
    color: var(--texto);
    font-family: "Segoe UI", Arial, sans-serif;
}

.encabezado,
.pie {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: #fff;
    border-bottom: 1px solid var(--borde);
}

.pie {
    border-bottom: 0;
    border-top: 1px solid var(--borde);
    justify-content: center;
    color: var(--texto-tenue);
    font-size: 0.9rem;
}

.marca {
    display: inline-flex;
    align-items: center;
}

.logo {
    height: 38px;
    width: auto;
    display: block;
    border-radius: 4px;
}

.navegacion {
    display: flex;
    gap: 1rem;
}

.navegacion a {
    color: var(--texto);
    text-decoration: none;
    font-weight: 600;
}

.navegacion a:hover {
    color: var(--naranja);
}

.contenido {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.25rem;
}

.tarjeta {
    width: min(560px, 100%);
    padding: 2.25rem;
    background: var(--fondo-tarjeta);
    border: 1px solid var(--borde);
    border-top: 4px solid var(--naranja);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(90, 50, 20, 0.08);
}

.etiqueta {
    margin: 0 0 0.75rem;
    color: var(--naranja);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

h1 {
    margin: 0 0 0.75rem;
    font-size: 2rem;
    line-height: 1.2;
}

.descripcion {
    margin: 0 0 1.75rem;
    color: var(--texto-tenue);
    line-height: 1.6;
}

.boton {
    display: inline-block;
    padding: 0.8rem 1.4rem;
    border: 0;
    border-radius: 8px;
    background: var(--naranja);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.boton:hover {
    background: var(--naranja-oscuro);
    color: #fff;
}

.boton-secundario {
    background: transparent;
    color: var(--naranja);
    box-shadow: inset 0 0 0 2px var(--naranja);
}

.boton-secundario:hover {
    background: var(--naranja-suave);
    color: var(--naranja-oscuro);
}

.formulario {
    display: grid;
    gap: 0.55rem;
}

.formulario label {
    font-weight: 600;
}

.formulario input {
    margin-bottom: 0.7rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--borde);
    border-radius: 8px;
    background: #fff;
    color: var(--texto);
    font-size: 1rem;
}

.formulario input:focus {
    outline: 2px solid var(--naranja);
    border-color: var(--naranja);
}

.formulario .boton {
    margin-top: 0.4rem;
    width: 100%;
}

.error-auth {
    padding: 0.75rem 0.9rem;
    border: 1px solid #f3c4b0;
    border-radius: 8px;
    background: #fff4ee;
    color: #8a2f10;
}

.pagina-inicio .contenido-inicio {
    display: block;
    width: min(1040px, 100%);
    margin: 0 auto;
    padding: 2.5rem 1.25rem 3rem;
}

.bienvenida {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--borde);
    border-radius: 20px;
    box-shadow: 0 18px 40px rgba(90, 50, 20, 0.08);
}

.bienvenida-texto {
    padding: 3rem 2.75rem;
}

.bienvenida-texto h1 {
    max-width: 16ch;
    font-size: clamp(2rem, 4vw, 3.1rem);
    letter-spacing: -0.03em;
}

.pagina-privada .contenido-privada {
    display: block;
    width: min(1040px, 100%);
    margin: 0 auto;
    padding: 2.5rem 1.25rem 3rem;
}

.sesion-banner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: center;
    padding: 2.5rem 2.75rem;
    background: #fff;
    border: 1px solid var(--borde);
    border-radius: 20px;
    box-shadow: 0 18px 40px rgba(90, 50, 20, 0.08);
}

.sesion-saludo h1 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    letter-spacing: -0.03em;
}

.sesion-saludo .descripcion {
    max-width: 42ch;
}

.sesion-perfil {
    display: grid;
    justify-items: center;
    gap: 0.45rem;
    min-width: 220px;
    padding: 1.75rem 1.5rem;
    background: linear-gradient(165deg, var(--naranja) 0%, #c4470c 100%);
    border-radius: 16px;
    color: #fff;
    text-align: center;
}

.avatar {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    font-size: 1.6rem;
    font-weight: 700;
}

.perfil-nombre {
    margin: 0.4rem 0 0;
    font-weight: 700;
    word-break: break-all;
}

.perfil-estado {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.sesion-detalle {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1.25rem;
}

.sesion-detalle article {
    padding: 1.35rem 1.25rem;
    background: #fff;
    border: 1px solid var(--borde);
    border-radius: 14px;
}

.sesion-detalle h2 {
    margin: 0 0 0.45rem;
    color: var(--naranja);
    font-size: 1.05rem;
}

.sesion-detalle p {
    margin: 0;
    color: var(--texto-tenue);
    line-height: 1.5;
}

.sesion-detalle code {
    color: var(--texto);
    font-size: 0.92em;
}

.avatar-foto {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
}

.perfil-bloques {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1.25rem;
}

.perfil-bloques article {
    padding: 1.35rem 1.25rem;
    background: #fff;
    border: 1px solid var(--borde);
    border-radius: 14px;
}

.perfil-bloques h2 {
    margin: 0 0 0.9rem;
    color: var(--naranja);
    font-size: 1.05rem;
}

.datos {
    margin: 0;
}

.dato {
    display: grid;
    gap: 0.15rem;
    padding: 0.55rem 0;
    border-top: 1px solid var(--borde);
}

.dato:first-child {
    border-top: 0;
    padding-top: 0;
}

.dato dt {
    color: var(--texto-tenue);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.dato dd {
    margin: 0;
    line-height: 1.45;
    word-break: break-word;
}

.vacio {
    color: var(--texto-tenue);
    font-style: italic;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.chips li {
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: var(--naranja-suave);
    color: var(--naranja-oscuro);
    font-size: 0.85rem;
}

@media (max-width: 640px) {
    .encabezado {
        flex-direction: column;
        gap: 0.75rem;
    }

    h1 {
        font-size: 1.6rem;
    }

    .sesion-banner,
    .sesion-detalle,
    .perfil-bloques {
        grid-template-columns: 1fr;
    }

    .bienvenida-texto,
    .sesion-banner {
        padding: 1.75rem 1.4rem;
    }
}
