/* ============================================================
   PERFIL
============================================================ */

.perfil-page {
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
    padding: 25px 18px 120px;
    box-sizing: border-box;
}

.perfil-card {
    width: 100%;
    background: linear-gradient(
        135deg,
        #8bc2f5,
        #b3daff
    );
    border-radius: 24px;
    padding: 30px 20px;
    box-sizing: border-box;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.10);
    margin-bottom: 20px;
}

.perfil-avatar {
    width: 85px;
    height: 85px;
    margin: 0 auto 15px;

    border-radius: 50%;
    background: #ffffff;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #5b9bd5;
    font-size: 36px;

    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.10);
}

.perfil-card h1 {
    margin: 8px 0 5px;
    font-size: 25px;
    color: #12344d;
    overflow-wrap: anywhere;
}

.perfil-card p {
    margin: 0;
    font-size: 14px;
    color: #31566f;
    overflow-wrap: anywhere;
}


/* ============================================================
   INFORMAÇÕES
============================================================ */

.perfil-info {
    width: 100%;
    background: #ffffff;
    border-radius: 20px;
    padding: 8px 18px;
    box-sizing: border-box;

    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);

    margin-bottom: 20px;
}

.perfil-item {
    width: 100%;

    display: flex;
    align-items: center;

    gap: 14px;
    padding: 18px 0;

    border-bottom: 1px solid #eeeeee;

    box-sizing: border-box;
}

.perfil-item:last-child {
    border-bottom: none;
}


/* ============================================================
   ÍCONES
============================================================ */

.perfil-item > span {
    width: 42px;
    height: 42px;

    min-width: 42px;

    border-radius: 12px;

    background: #e8f4ff;
    color: #5b9bd5;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 18px;
}


/* ============================================================
   TEXTO
============================================================ */

.perfil-item div {
    flex: 1;
    min-width: 0;

    display: flex;
    flex-direction: column;

    gap: 5px;
}

.perfil-item small {
    font-size: 12px;
    color: #888888;
    font-weight: 500;
}

.perfil-item strong {
    font-size: 16px;
    color: #222222;
    line-height: 1.4;
    overflow-wrap: anywhere;
}


/* ============================================================
   TERMINAR SESSÃO
============================================================ */

.logout-button {
    width: 100%;
    min-height: 52px;

    padding: 14px 20px;

    border-radius: 15px;
    border: 1px solid #f0b5b3;

    background: #ffffff;
    color: #d9534f;

    font-size: 15px;
    font-weight: 700;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 10px;

    box-sizing: border-box;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.logout-button:hover {
    background: #fff3f2;
}

.logout-button:active {
    transform: scale(0.98);
}

.logout-message {
    width: 100%;

    text-align: center;

    margin: 12px 0 0;

    font-size: 14px;
    color: #d9534f;

    overflow-wrap: anywhere;
}


/* ============================================================
   NAVEGAÇÃO INFERIOR
   Apenas corrigimos a centralização.
============================================================ */

.bottom-nav {
    position: fixed;

    left: 50%;
    right: auto;

    bottom: 15px;

    width: 90%;
    max-width: 430px;

    margin: 0;

    transform: translateX(-50%);

    z-index: 1000;
}


/* ============================================================
   PERFIL + NAVEGAÇÃO
   Corrige uma regra antiga do style.css que podia
   deixar a navegação com 100% da largura.
============================================================ */

.perfil-page + .bottom-nav {
    position: fixed;

    left: 50%;
    right: auto;

    bottom: 15px;

    width: 90%;
    max-width: 430px;

    margin: 0;

    transform: translateX(-50%);

    z-index: 1000;
}


/* ============================================================
   TELEMÓVEL
============================================================ */

@media (max-width: 480px) {

    .perfil-page {
        padding: 18px 14px 110px;
    }

    .perfil-card {
        border-radius: 20px;
        padding: 25px 15px;
    }

    .perfil-avatar {
        width: 72px;
        height: 72px;
        font-size: 30px;
    }

    .perfil-card h1 {
        font-size: 22px;
    }

    .perfil-card p {
        font-size: 13px;
    }

    .perfil-info {
        border-radius: 18px;
        padding: 5px 15px;
    }

    .perfil-item {
        padding: 16px 0;
    }

    .perfil-item strong {
        font-size: 15px;
    }

    .logout-button {
        min-height: 50px;
        font-size: 14px;
    }

    .perfil-page + .bottom-nav {
        width: calc(100% - 30px);
        max-width: 430px;
    }
}


/* ============================================================
   TELEMÓVEIS MUITO PEQUENOS
============================================================ */

@media (max-width: 360px) {

    .perfil-page {
        padding-left: 10px;
        padding-right: 10px;
    }

    .perfil-card {
        padding: 22px 12px;
    }

    .perfil-card h1 {
        font-size: 20px;
    }

    .perfil-info {
        padding-left: 12px;
        padding-right: 12px;
    }

    .perfil-item strong {
        font-size: 14px;
    }

    .perfil-page + .bottom-nav {
        width: calc(100% - 20px);
    }
}

/* =========================================================
   BOTÃO — SOBRE O DESENVOLVEDOR
========================================================= */

.developer-button {

    width: 100%;

    display: flex;

    align-items: center;

    gap: 14px;

    padding: 16px;

    margin-top: 16px;

    border: none;

    border-radius: 16px;

    background: #ffffff;

    color: #1f2937;

    cursor: pointer;

    text-align: left;

    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;

}


.developer-button:active {

    transform: scale(0.98);

}


.developer-button-icon {

    width: 44px;

    height: 44px;

    min-width: 44px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 12px;

    background: #b3daff;

    color: #1f5f91;

    font-size: 18px;

}


.developer-button-text {

    flex: 1;

    display: flex;

    flex-direction: column;

    gap: 3px;

}


.developer-button-text strong {

    font-size: 15px;

}


.developer-button-text small {

    font-size: 12px;

    opacity: 0.65;

}


.developer-button > .fa-chevron-right {

    font-size: 14px;

    opacity: 0.5;

}


/* =========================================================
   MODAL
========================================================= */

.developer-modal {

    position: fixed;

    inset: 0;

    z-index: 100000;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 20px;

    opacity: 0;

    visibility: hidden;

    pointer-events: none;

    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;

}


.developer-modal-active {

    opacity: 1;

    visibility: visible;

    pointer-events: auto;

}


/* =========================================================
   FUNDO DA MODAL
========================================================= */

.developer-modal-overlay {

    position: absolute;

    inset: 0;

    background: rgba(20, 45, 70, 0.60);

    backdrop-filter: blur(4px);

}


/* =========================================================
   CARTÃO
========================================================= */

.developer-modal-card {

    position: relative;

    z-index: 2;

    width: 100%;

    max-width: 420px;

    max-height: 90vh;

    overflow-y: auto;

    padding: 28px 22px;

    border-radius: 24px;

    background: #ffffff;

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.25);

    transform: translateY(20px) scale(0.96);

    transition:
        transform 0.25s ease;

}


.developer-modal-active
.developer-modal-card {

    transform: translateY(0) scale(1);

}


/* =========================================================
   FECHAR
========================================================= */

.developer-modal-close {

    position: absolute;

    top: 14px;

    right: 14px;

    width: 36px;

    height: 36px;

    border: none;

    border-radius: 50%;

    background: #f1f5f9;

    color: #334155;

    cursor: pointer;

    font-size: 17px;

}


/* =========================================================
   ÍCONE
========================================================= */

.developer-modal-icon {

    width: 70px;

    height: 70px;

    margin: 0 auto 14px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 20px;

    background: #b3daff;

    color: #1f5f91;

    font-size: 30px;

}


/* =========================================================
   TÍTULO
========================================================= */

.developer-modal-card h2 {

    margin: 0 0 22px;

    text-align: center;

    font-size: 22px;

    color: #1f2937;

}


/* =========================================================
   INFORMAÇÕES
========================================================= */

.developer-info-item {

    display: flex;

    align-items: center;

    gap: 14px;

    padding: 13px 0;

    border-bottom: 1px solid #e5e7eb;

}


.developer-info-item > i {

    width: 38px;

    height: 38px;

    min-width: 38px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 10px;

    background: #eef7ff;

    color: #3478a8;

}


.developer-info-item div {

    display: flex;

    flex-direction: column;

    gap: 3px;

}


.developer-info-item small {

    font-size: 11px;

    color: #64748b;

}


.developer-info-item strong {

    font-size: 14px;

    color: #1f2937;

}


/* =========================================================
   DESCRIÇÃO
========================================================= */

.developer-description {

    margin: 20px 0 10px;

    text-align: center;

    line-height: 1.6;

    font-size: 13px;

    color: #64748b;

}


/* =========================================================
   VERSÃO / ASSINATURA
========================================================= */

.developer-version {

    margin-top: 18px;

    text-align: center;

    font-size: 12px;

    font-weight: 600;

    color: #3478a8;

}


/* =========================================================
   BLOQUEAR SCROLL COM MODAL ABERTA
========================================================= */

body.modal-open {

    overflow: hidden;

}

/* =========================================================
   PERFIL — ORGANIZAÇÃO VERTICAL
========================================================= */

.perfil-page {

    width: 100%;

    display: flex;

    flex-direction: column;

    align-items: stretch;

    gap: 16px;

}


/* =========================================================
   CARTÃO PRINCIPAL
========================================================= */

.perfil-card {

    width: 100%;

    box-sizing: border-box;

    margin: 0;

}


/* =========================================================
   INFORMAÇÕES DA CONTA
========================================================= */

.perfil-info {

    width: 100%;

    box-sizing: border-box;

    display: flex;

    flex-direction: column;

    margin: 0;

}


/* =========================================================
   CADA INFORMAÇÃO
========================================================= */

.perfil-item {

    width: 100%;

    box-sizing: border-box;

}


/* =========================================================
   SOBRE O DESENVOLVEDOR
========================================================= */

.developer-button {

    width: 100%;

    box-sizing: border-box;

    margin: 0;

    flex-shrink: 0;

}


/* =========================================================
   TERMINAR SESSÃO
========================================================= */

.logout-button {

    width: 100%;

    box-sizing: border-box;

    margin: 0;

    flex-shrink: 0;

}


/* =========================================================
   MENSAGEM DE LOGOUT
========================================================= */

.logout-message {

    width: 100%;

    box-sizing: border-box;

    margin: 0;

}


/* =========================================================
   CORREÇÃO PARA LAYOUTS GRID/FLEX ANTIGOS
========================================================= */

.perfil-page > * {

    grid-column: 1 / -1;

}

/* ============================================================
   NOTIFICAÇÕES WEB PUSH
============================================================ */

.webpush-card {
    width: 100%;
    box-sizing: border-box;
    margin: 18px 0;
    padding: 18px;
    border: 1px solid #dce8f5;
    border-radius: 16px;
    background: #ffffff;
}

.webpush-card-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.webpush-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #eaf4ff;
    color: #2468a8;
    font-size: 18px;
}

.webpush-card-heading > div {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.webpush-card-heading strong {
    color: #222222;
    font-size: 16px;
}

.webpush-card-heading small {
    color: #666666;
    font-size: 13px;
    line-height: 1.5;
}

.webpush-button {
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 0;
    border-radius: 12px;
    background: #2468a8;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.webpush-button:disabled {
    opacity: 0.65;
    cursor: wait;
}

.webpush-status {
    margin: 12px 0 0;
    color: #ffffff;
    font-size: 13px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

/* =========================================================
   SELETOR DE IDIOMA
========================================================= */

.perfil-idioma {
    width: 100%;
    padding: 18px;
    box-sizing: border-box;

    background: #ffffff;
    border: 1px solid #e1edf7;
    border-radius: 18px;

    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
}

.perfil-idioma form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.perfil-idioma label {
    color: #31566f;
    font-size: 14px;
    font-weight: 600;
}

.perfil-idioma select {
    width: 100%;
    min-height: 48px;
    padding: 12px 42px 12px 14px;

    box-sizing: border-box;
    border: 1px solid #b9d6ee;
    border-radius: 12px;

    background-color: #f7fbff;
    color: #12344d;

    font: inherit;
    font-size: 15px;

    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.perfil-idioma select:focus {
    outline: none;
    border-color: #5b9bd5;
    box-shadow: 0 0 0 3px rgba(91, 155, 213, 0.2);
}

.perfil-idioma select:focus-visible {
    outline: 2px solid #5b9bd5;
    outline-offset: 2px;
}

@media (max-width: 480px) {
    .perfil-idioma {
        padding: 15px;
    }

    .perfil-idioma select {
        min-height: 50px;
        font-size: 16px;
    }
}