@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Manrope:wght@600;700&display=swap');

:root {
    /* Variables de la paleta de colores */
    --palette-bg: #FAF7F2;
    --brand-marron: #574239;
    --brand-terracota: #B95F45;
    --brand-crema: #F3E6D8;
    --brand-salvia: #71866B;
    --action-primary: #A64E36;
    --text-secondary: #806F64;
    --text-secondary-accessible: #746258;
    --info-bg: #EDF3F8;
    --info-fg: #365F80;
    --surface-white: #FFFFFF;
    --border-default: #E8DCD0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--palette-bg);
    color: var(--brand-marron);
}

/* Tipografía */
.font-manrope {
    font-family: 'Manrope', sans-serif;
}

/* Header / Navbar */
.navbar {
    width: 100%;
    height: 76px;
    background: var(--surface-white);
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid var(--border-default);
}

.navbar-inner {
    width: 1280px;
    height: 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    color: var(--text-secondary);
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--brand-marron);
}

/* Botones */
.btn {
    height: 44px;
    padding: 0 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s;
}

.btn:hover {
    opacity: 0.9;
}

.btn-sm {
    height: 39px;
}

.btn-primary-action {
    background: var(--action-primary);
    color: white;
    border: 1px solid var(--action-primary);
}

.btn-primary-marron {
    background: var(--brand-marron);
    color: var(--palette-bg);
    border: 1px solid var(--brand-marron);
}

.btn-secondary {
    background: var(--palette-bg);
    color: var(--brand-marron);
    border: 1px solid var(--brand-marron);
}

.btn-secondary-salvia {
    background: var(--palette-bg);
    color: var(--brand-marron);
    border: 1px solid var(--brand-salvia);
}

.btn-light {
    background: var(--palette-bg);
    color: var(--brand-marron);
    border: 1px solid var(--palette-bg);
}

/* Badges / Chips */
.badge {
    height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
}

.badge-info {
    background: var(--info-bg);
    color: var(--info-fg);
}

.avatar-initials {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: var(--brand-crema);
    color: var(--brand-terracota);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
}

/* Footer */
.footer {
    width: 100%;
    padding: 64px 80px;
    background: var(--palette-bg);
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.footer-top {
    display: flex;
    gap: 48px;
}

.footer-brand {
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-columns {
    flex: 1;
    display: flex;
    gap: 64px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col-title {
    font-family: 'Manrope', sans-serif;
    font-size: 18px;
    font-weight: 600;
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--brand-crema);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.footer-bottom-links {
    display: flex;
    gap: 24px;
}

/* Cuenta autenticada y cierre de sesión */
.dt-salida {
    display: inline-flex;
    margin: 0;
    flex: 0 0 auto;
}

.dt-salir {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid #efd5ce;
    border-radius: 8px;
    background: #fff5f2;
    color: #b13e30;
    cursor: pointer;
}

.dt-salir:hover {
    background: #fbe8e2;
}

.dt-salir:focus-visible,
.dt-cuenta a:focus-visible,
.dt-cuenta button:focus-visible {
    outline: 2px solid #a94f36;
    outline-offset: 2px;
}

/* Registro posterior a Logto */
.dt-cuenta {
    width: min(720px, calc(100% - 40px));
    margin: 48px auto 64px;
    min-height: 55vh;
}

.dt-cuenta h1 {
    margin: 12px 0;
}

.dt-cuenta-etiqueta,
.dt-cuenta-ayuda {
    font-size: 12px;
}

.dt-cuenta-opciones {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 24px 0;
}

.dt-cuenta-opcion {
    display: flex;
    flex: 1 1 240px;
    flex-direction: column;
    gap: 10px;
    padding: 24px;
    border: 1px solid #ead5c5;
    border-radius: 12px;
    background: white;
    color: inherit;
    text-decoration: none;
}

.dt-cuenta-opcion:hover {
    border-color: #a94f36;
}

.dt-cuenta-opcion span {
    font-size: 14px;
    line-height: 1.5;
}

.dt-cuenta-form {
    display: grid;
    gap: 20px;
    padding: 28px;
    border: 1px solid #ead5c5;
    border-radius: 12px;
    background: white;
}

.dt-cuenta-form h2 {
    margin: 0;
}

.dt-cuenta-form label {
    display: grid;
    gap: 8px;
    font-size: 14px;
    min-width: 0;
}

.dt-cuenta-form input,
.dt-cuenta-form select {
    box-sizing: border-box;
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid #ac8875;
    border-radius: 6px;
    background: white;
    color: inherit;
    font: inherit;
}

.dt-cuenta-form input:focus,
.dt-cuenta-form select:focus {
    outline: none;
    border-color: #a94f36;
    box-shadow: inset 0 0 0 1px #a94f36;
}

.dt-cuenta-form fieldset {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin: 0;
    padding: 18px;
    border: 1px solid #ead5c5;
    border-radius: 8px;
    min-width: 0;
}

.dt-cuenta-form fieldset[hidden] {
    display: none;
}

.dt-cuenta-ancho {
    grid-column: 1 / -1;
}

.dt-cuenta-error {
    padding: 14px;
    border-radius: 8px;
    background: #fff0eb;
    color: #9d3526;
}

@media (max-width: 600px) {
    .dt-cuenta-form {
        padding: 20px;
    }

    .dt-cuenta-form fieldset {
        grid-template-columns: 1fr;
    }
}

html.dt-perfil-abierto,
html.dt-perfil-abierto body {
    overflow: hidden;
}

.dt-perfil-modal {
    box-sizing: border-box;
    width: min(660px, calc(100vw - 32px));
    max-height: calc(100dvh - 48px);
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: 1px solid #ead5c5;
    border-radius: 18px;
    background: #fff;
    color: #5c483e;
    box-shadow: 0 24px 80px rgb(50 30 20 / 24%);
}

.dt-perfil-modal[open] {
    display: flex;
    flex-direction: column;
}

.dt-perfil-modal::backdrop {
    background: rgb(45 33 26 / 38%);
    backdrop-filter: blur(3px);
}

.dt-perfil-cabecera {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 26px 28px 20px;
    border-bottom: 1px solid #f0e4da;
    flex-shrink: 0;
}

.dt-perfil-cabecera h2 {
    margin: 8px 0;
    font-size: 26px;
    line-height: 1.2;
}

.dt-perfil-cabecera p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
}

.dt-perfil-cerrar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.dt-perfil-cerrar:hover {
    background: #f7f1eb;
}

.dt-perfil-contenido {
    padding: 24px 28px 28px;
    overflow-y: auto;
    min-height: 0;
    overscroll-behavior: contain;
}

.dt-perfil-modal .dt-cuenta-opciones {
    margin: 0;
}

.dt-perfil-modal .dt-cuenta-opcion {
    padding: 20px;
    background: #fcf9f5;
}

.dt-perfil-modal .dt-cuenta-form {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.dt-perfil-tipos {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid #ead5c5;
}

.dt-perfil-tipos a {
    padding: 0 0 12px;
    border-bottom: 2px solid transparent;
    color: inherit;
    font-size: 14px;
    text-decoration: none;
}

.dt-perfil-tipos a[aria-current="page"] {
    border-bottom-color: #a94f36;
    color: #a94f36;
}

.dt-perfil-acciones {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 8px;
}

.dt-perfil-modal button:focus-visible,
.dt-perfil-modal a:focus-visible {
    outline: 2px solid #a94f36;
    outline-offset: 2px;
}

@media (max-width: 600px) {
    .dt-perfil-modal {
        max-height: calc(100dvh - 24px);
    }

    .dt-perfil-cabecera {
        padding: 22px 20px 18px;
    }

    .dt-perfil-contenido {
        padding: 20px;
    }

    .dt-perfil-cabecera h2 {
        font-size: 23px;
    }

    .dt-perfil-acciones .btn {
        flex: 1;
    }
}

.dt-contacto-pagina {
    width: min(680px, calc(100% - 32px));
    margin: 40px auto;
    padding: 28px;
    background: #fff;
    border: 1px solid #ead5c7;
    border-radius: 20px;
    color: #604b40;
    box-sizing: border-box;
}

.dt-contacto-pagina h1 {
    margin: 24px 0 10px;
}

.dt-contacto-campos {
    display: grid;
    gap: 18px;
    min-width: 0;
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #ead5c7;
    border-radius: 14px;
}

.dt-contacto-campos legend {
    padding: 0 8px;
    font-weight: 600;
}

.dt-contacto-campos label {
    display: grid;
    gap: 7px;
    min-width: 0;
    font-size: 14px;
}

.dt-contacto-campos input,
.dt-contacto-campos select {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid #d8b6a4;
    border-radius: 8px;
    background: #fff;
    color: inherit;
    font: inherit;
    box-sizing: border-box;
}

.dt-contacto-campos input[readonly] {
    background: #faf6f2;
}

.dt-contacto-telefono {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 12px;
}

.dt-contacto-guardar {
    padding: 12px 20px;
    border: 0;
    border-radius: 8px;
    background: #aa4e34;
    color: white;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.dt-contacto-error {
    color: #aa302b;
}

.dt-contacto-exito {
    color: #28724e;
}

@media (max-width: 540px) {
    .dt-contacto-telefono {
        grid-template-columns: 1fr;
    }

    .dt-contacto-pagina {
        padding: 20px;
    }
}