/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent; /* Remove highlight no iOS */
}

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    -webkit-text-size-adjust: 100%; /* Previne ajuste automático de fonte no iOS */
    -ms-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, Arial, Helvetica, sans-serif;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #141f3f; /* Azul padrão do app */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    touch-action: manipulation; /* Melhora responsividade do toque */
}

/* Previne pull-to-refresh no Chrome mobile */
body.no-scroll {
    overscroll-behavior-y: contain;
}

/* Ajuste para inputs no iOS */
input, textarea, button {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: 0;
}

/* Classe para esconder elementos */
.hidden {
    display: none !important;
}

/* Tela de Abertura (Splash Screen) */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height para mobile */
    background-color: #141f3f; /* Azul padrão consistente */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Logo */
.logo {
    width: 120px;
    height: 120px;
    margin-bottom: 30px;
    animation: fadeIn 1s ease-in-out both;
}

/* Container do Personnalité */
.personnalite-container {
    text-align: center;
}

/* Linha laranja */
.orange-line {
    height: 3px;
    background-color: #ff6600;
    margin: 0 auto 15px;
    width: 200px;
    animation: expandWidth 1s ease-in-out 0.5s both;
}

/* Texto Personnalité */
.personnalite-text {
    color: white;
    font-size: 36px;
    font-weight: 300;
    letter-spacing: 2px;
    animation: fadeIn 1s ease-in-out 0.8s both;
}

/* Animações */
@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes expandWidth {
    0% {
        width: 0;
    }
    100% {
        width: 200px;
    }
}

/* Tela de Acesso */
.access-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height para mobile */
    background-image: url('imagens/fundo.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    color: white;
    overflow: hidden;
}

/* Remover margem do body que pode estar causando espaço azul */
.access-screen::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('imagens/fundo.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
}

/* Header com logo e 100 */
.access-header {
    padding: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 2;
}

/* Para garantir que o background cubra o header */
@supports (padding: max(0px)) {
    .access-header {
        padding-top: max(40px, env(safe-area-inset-top));
    }
}

.access-logo {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    object-fit: contain;
}

.logo-100 {
    font-size: 58px;
    font-weight: 100;
    color: white;
    margin-left: 10px;
}

/* Conteúdo central */
.access-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: stretch;
    padding: 20px;
    padding-bottom: 100px;
}

.access-title {
    font-size: 28px;
    font-weight: 300;
    margin-bottom: 30px;
    text-align: left;
    line-height: 1.3;
}

/* Botão Acessar */
.access-button {
    background: white;
    color: #ff6600;
    border: none;
    padding: 20px;
    font-size: 20px;
    font-weight: bold;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-bottom: 20px;
}

.access-button:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(255, 255, 255, 0.3);
}

/* Link Personnalité */
.personnalite-link {
    color: white;
    text-decoration: none;
    font-size: 16px;
    text-align: center;
    transition: opacity 0.3s;
}

.personnalite-link:hover {
    opacity: 0.8;
}

/* Footer */
.access-footer {
    display: flex;
    justify-content: space-between;
    padding: 30px 40px;
    padding-bottom: 40px;
    width: 100%;
    position: absolute;
    bottom: 0;
    left: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.3), transparent);
}

.footer-link {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 20px;
    font-weight: 300;
    transition: opacity 0.3s;
}

.footer-link:hover {
    opacity: 0.8;
}

.footer-link span {
    letter-spacing: 0.5px;
}

.icon-token, .icon-help {
    width: 28px;
    height: 28px;
}

/* Aplicação Principal */
.main-app {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background-image: url('imagens/fundo3.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    overflow: hidden;
}

/* Garantir cobertura total do background */
.main-app::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('imagens/fundo3.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
}

/* Overlay escuro suave para melhorar legibilidade */
.main-app::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(20, 31, 63, 0.7); /* #141f3f com 70% opacidade */
    z-index: 0;
}

/* Tela de Sucesso */
.success-screen {
    height: 100%;
    display: flex;
    flex-direction: column;
    color: white;
    position: relative;
    z-index: 1;
}

.success-header {
    padding: 40px;
    padding-top: max(40px, env(safe-area-inset-top));
    text-align: center;
}

.success-logo {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    object-fit: contain;
}

.success-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
}

.success-icon {
    margin-bottom: 30px;
    animation: checkmark 0.6s ease-in-out;
}

@keyframes checkmark {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-title {
    font-size: 28px;
    font-weight: 300;
    margin-bottom: 20px;
    line-height: 1.3;
}

.success-subtitle {
    font-size: 20px;
    font-weight: 300;
    margin-bottom: 40px;
    color: rgba(255, 255, 255, 0.9);
}

.success-subtitle strong {
    font-weight: 500;
    color: #B8860B;
}

.protocol-container {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px 40px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.protocol-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 5px;
}

.protocol-number {
    font-size: 24px;
    font-weight: 500;
    letter-spacing: 2px;
}

.success-info {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.success-footer {
    padding: 30px;
    padding-bottom: max(30px, env(safe-area-inset-bottom));
}

.success-button {
    width: 100%;
    background: white;
    color: #ff6600;
    border: none;
    padding: 18px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.success-button:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 20px rgba(255, 255, 255, 0.3);
}

/* Tela de Login CPF */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background-color: #141f3f;
    color: white;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header com botão voltar */
.login-header {
    padding: 20px;
    padding-top: env(safe-area-inset-top, 20px);
}

.back-button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 10px;
    margin-left: -10px;
    display: flex;
    align-items: center;
    transition: opacity 0.3s;
}

.back-button:hover {
    opacity: 0.7;
}

/* Conteúdo central */
.login-content {
    padding: 0 40px;
    padding-top: 40px;
}

.login-title {
    font-size: 23px;
    font-weight: 300;
    margin-bottom: 60px;
    line-height: 1.2;
    text-align: left;
    white-space: nowrap;
}

/* Campo CPF */
.cpf-input-container {
    margin-bottom: 40px;
    position: relative;
}

.cpf-label {
    display: block;
    font-size: 16px;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.8);
}

.cpf-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    color: white;
    font-size: 18px;
    padding: 10px 0;
    outline: none;
    transition: border-color 0.3s;
}

.cpf-input:focus {
    border-bottom-color: white;
}

.cpf-input.error {
    border-bottom-color: #ff4444;
}

.cpf-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Mensagem de erro */
.cpf-error {
    display: none;
    position: absolute;
    bottom: -25px;
    left: 0;
    color: #ff4444;
    font-size: 14px;
    font-weight: 400;
}

.cpf-error.show {
    display: block;
}

/* Toggle Lembrar CPF */
.remember-cpf {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    font-size: 16px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.3);
    transition: 0.4s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 19px;
    width: 19px;
    left: 3.5px;
    bottom: 3.5px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #ff6600;
}

input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

/* Footer */
.login-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    padding-bottom: env(safe-area-inset-bottom, 40px);
}

.alternative-text {
    text-align: left;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
}

.agency-button {
    width: auto;
    min-width: 40%;
    background: transparent;
    border: 1px solid white;
    color: white;
    padding: 11px 18px;
    font-size: 13px;
    border-radius: 12px;
    cursor: pointer;
    margin-bottom: 30px;
    transition: all 0.3s;
    display: block;
    white-space: nowrap;
}

.agency-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.continue-button {
    width: 100%;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: rgba(255, 255, 255, 0.5);
    padding: 18px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 12px;
    cursor: not-allowed;
    transition: all 0.3s;
}

.continue-button:not(:disabled) {
    background: white;
    color: #ff6600;
    cursor: pointer;
}

.continue-button:not(:disabled):hover {
    transform: scale(1.02);
    box-shadow: 0 5px 20px rgba(255, 255, 255, 0.3);
}

/* Tela de Login Agência */
.agency-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background-color: #141f3f;
    color: white;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header com botão voltar */
.agency-header {
    padding: 20px;
    padding-top: env(safe-area-inset-top, 20px);
}

/* Conteúdo central */
.agency-content {
    padding: 0 40px;
    padding-top: 40px;
}

.agency-title {
    font-size: 23px;
    font-weight: 300;
    margin-bottom: 60px;
    line-height: 1.2;
    text-align: left;
    white-space: nowrap;
}

/* Campos de input */
.agency-inputs-container {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

.agency-input-group {
    flex: 1;
}

.agency-label {
    display: block;
    font-size: 16px;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.8);
}

.agency-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    color: white;
    font-size: 18px;
    padding: 10px 0;
    outline: none;
    transition: border-color 0.3s;
}

.agency-input:focus {
    border-bottom-color: white;
}

.agency-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Toggle Lembrar */
.remember-agency {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    font-size: 16px;
}

/* Footer */
.agency-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    padding-bottom: env(safe-area-inset-bottom, 40px);
}

.cpf-button {
    width: auto;
    min-width: 40%;
    background: transparent;
    border: 1px solid white;
    color: white;
    padding: 11px 18px;
    font-size: 13px;
    border-radius: 12px;
    cursor: pointer;
    margin-bottom: 30px;
    transition: all 0.3s;
    display: block;
    white-space: nowrap;
}

.cpf-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Tela de Senha */
.password-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background-color: #141f3f;
    color: white;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Tela de Adesão Nível 5 */
.nivel5-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background-image: url('imagens/fundo2.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: white;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Garantir cobertura total */
.nivel5-screen::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('imagens/fundo2.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
}

/* Overlay escuro para melhorar legibilidade */
.nivel5-screen::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(20, 31, 63, 0.8); /* #141f3f com 80% opacidade */
    z-index: 0;
}

/* Ajuste do z-index dos elementos */
.nivel5-screen > * {
    position: relative;
    z-index: 1;
}

/* Header Nível 5 */
.nivel5-header {
    padding: 30px;
    padding-top: max(30px, env(safe-area-inset-top));
    text-align: center;
    position: relative;
    z-index: 2;
}

.nivel5-logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
}

/* Conteúdo Nível 5 */
.nivel5-content {
    flex: 1;
    padding: 0 30px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* Header Section - Badge + Título */
.nivel5-header-section {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    width: 100%;
}

/* Badge do Nível */
.nivel5-badge {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.hexagon-border {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.nivel5-badge::before {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(184, 134, 11, 0.3) 0%, transparent 70%);
    z-index: 0;
    animation: pulse 2s ease-in-out infinite;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.3;
    }
}

.nivel5-number {
    font-size: 48px;
    font-weight: bold;
    color: #B8860B;
    position: relative;
    z-index: 2;
}

/* Títulos */
.nivel5-title {
    font-size: 28px;
    font-weight: 300;
    text-align: left;
    margin: 0;
    flex: 1;
}

.nivel5-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
    text-align: center;
    width: 100%;
}

/* Benefícios */
.nivel5-benefits {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.benefit-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.benefit-item.special {
    background: rgba(184, 134, 11, 0.1);
    border: 1px solid rgba(184, 134, 11, 0.3);
}

.check-icon, .star-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.benefit-item span {
    font-size: 16px;
    line-height: 1.4;
}

/* Footer com senha do cartão */
.nivel5-footer {
    padding: 30px;
    padding-bottom: env(safe-area-inset-bottom, 30px);
    background: rgba(0, 0, 0, 0.2);
}

.card-password-label {
    font-size: 16px;
    text-align: center;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.9);
}

.card-password-container {
    position: relative;
    margin-bottom: 30px;
}

.card-password-circles {
    display: flex;
    gap: 15px;
    justify-content: center;
    cursor: pointer;
}

.card-circle {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    display: block;
    transition: all 0.3s ease;
}

.card-circle.filled {
    background-color: white;
    border-color: white;
}

.card-pwd-input {
    position: absolute;
    left: -9999px;
    opacity: 0;
}

/* Botão Confirmar */
.confirm-nivel5-btn {
    width: 100%;
    padding: 18px;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.5);
    cursor: not-allowed;
    transition: all 0.3s ease;
}

.confirm-nivel5-btn:not(:disabled) {
    background: #B8860B;
    color: white;
    cursor: pointer;
    font-weight: bold;
}

.confirm-nivel5-btn:not(:disabled):hover {
    background: #996F00;
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(184, 134, 11, 0.4);
}

/* Tela de Carregamento */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background-color: #141f3f;
    color: white;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header do Loading */
.loading-header {
    padding: 40px;
    padding-top: max(40px, env(safe-area-inset-top));
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-logo {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    object-fit: contain;
}

/* Conteúdo do Loading */
.loading-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Spinner de Carregamento */
.loading-spinner {
    width: 80px;
    height: 80px;
    margin-bottom: 30px;
    position: relative;
}

.spinner-circle {
    width: 100%;
    height: 100%;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Texto de Loading */
.loading-text {
    font-size: 18px;
    font-weight: 300;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    max-width: 300px;
    line-height: 1.4;
}

/* Media Queries para Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    /* Ajustes Loading em landscape */
    .loading-content {
        padding-top: 10px;
    }
    
    .loading-spinner {
        width: 50px;
        height: 50px;
        margin-bottom: 20px;
    }
    
    .loading-text {
        font-size: 14px;
    }
    
    /* Ajustes para landscape mobile */
    .splash-content {
        flex-direction: row;
        gap: 30px;
    }
    
    .logo {
        width: 60px;
        height: 60px;
        margin-bottom: 0;
    }
    
    .access-content {
        padding-bottom: 60px;
    }
    
    .nivel5-content {
        padding-top: 10px;
    }
    
    .nivel5-badge {
        width: 60px;
        height: 60px;
        margin-bottom: 20px;
    }
    
    .nivel5-badge::before {
        width: 80px;
        height: 80px;
    }
    
    .nivel5-number {
        font-size: 28px;
    }
    
    /* Ajustes tela de sucesso em landscape */
    .success-icon {
        margin-bottom: 20px;
    }
    
    .success-icon svg {
        width: 60px;
        height: 60px;
    }
    
    .success-title {
        font-size: 22px;
        margin-bottom: 15px;
    }
    
    .success-subtitle {
        font-size: 18px;
        margin-bottom: 25px;
    }
    
    .protocol-container {
        padding: 15px 30px;
    }
    
    .protocol-number {
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    /* Ajustes Loading */
    .loading-header {
        padding: 20px;
        padding-top: max(20px, env(safe-area-inset-top));
    }
    
    .loading-logo {
        width: 64px;
        height: 64px;
    }
    
    .loading-spinner {
        width: 60px;
        height: 60px;
        margin-bottom: 25px;
    }
    
    .spinner-circle {
        border-width: 2px;
        border-top-width: 2px;
    }
    
    .loading-text {
        font-size: 16px;
        padding: 0 20px;
    }
    
    /* Ajustes tela de sucesso */
    .success-header {
        padding: 30px;
        padding-top: max(30px, env(safe-area-inset-top));
    }
    
    .success-logo {
        width: 64px;
        height: 64px;
    }
    
    .success-title {
        font-size: 24px;
    }
    
    .success-subtitle {
        font-size: 18px;
    }
    
    .protocol-number {
        font-size: 20px;
        letter-spacing: 1px;
    }
    
    .success-info {
        font-size: 13px;
    }
    
    /* Previne scroll horizontal */
    body {
        width: 100vw;
        overflow-x: hidden;
    }
    
    /* Ajuste para teclado virtual */
    .login-screen,
    .agency-screen,
    .password-screen,
    .nivel5-screen {
        height: 100vh;
        height: 100dvh;
        height: -webkit-fill-available;
    }
    
    /* Ajustes para safe areas (iPhone X+) */
    .access-header {
        padding: 20px;
        padding-top: max(20px, env(safe-area-inset-top));
    }
    
    .access-footer {
        padding: 20px 20px;
        padding-bottom: max(25px, env(safe-area-inset-bottom));
    }
    
    .login-footer,
    .agency-footer,
    .nivel5-footer {
        padding-bottom: max(40px, env(safe-area-inset-bottom));
    }
    
    /* Botões e elementos interativos maiores para mobile */
    button {
        min-height: 44px; /* Tamanho mínimo recomendado pela Apple */
    }
    
    .toggle-switch {
        min-width: 48px;
        min-height: 28px;
    }
    
    /* Ajustes de fonte para melhor legibilidade */
    .access-title {
        font-size: 24px;
        line-height: 1.3;
    }
    
    .login-title,
    .agency-title {
        font-size: 20px;
    }
    
    /* Inputs mais altos para facilitar toque */
    .cpf-input,
    .agency-input {
        padding: 12px 0;
        font-size: 16px; /* Previne zoom no iOS */
    }
    
    /* Ajustes Nível 5 */
    .nivel5-screen {
        padding-top: max(0px, env(safe-area-inset-top));
    }
    
    .nivel5-header {
        padding: 20px;
        padding-top: max(20px, env(safe-area-inset-top));
    }
    
    .nivel5-badge {
        width: 80px;
        height: 80px;
    }
    
    .nivel5-badge::before {
        width: 100px;
        height: 100px;
    }
    
    .nivel5-number {
        font-size: 36px;
    }
    
    .nivel5-title {
        font-size: 24px;
    }
    
    .nivel5-subtitle {
        font-size: 16px;
    }
    
    .benefit-item {
        padding: 12px;
    }
    
    .benefit-item span {
        font-size: 14px;
    }
    
    .check-icon, .star-icon {
        width: 20px;
        height: 20px;
    }
    
    /* Footer ajustments */
    .footer-link {
        font-size: 16px;
        gap: 4px;
    }
    
    .footer-link span {
        letter-spacing: 0;
    }
    
    .icon-token, .icon-help {
        width: 22px;
        height: 22px;
    }
    
    /* Ajustes na tela de abertura */
    .logo {
        width: 80px;
        height: 80px;
    }
    
    .personnalite-text {
        font-size: 24px;
    }
    
    .orange-line {
        width: 150px;
    }
    
    @keyframes expandWidth {
        0% {
            width: 0;
        }
        100% {
            width: 150px;
        }
    }
    
    /* Ajustes na tela de acesso */
    .access-header {
        padding: 20px;
    }
    
    .logo-100 {
        font-size: 38px;
    }
    
    .access-content {
        padding: 15px;
        padding-bottom: 80px;
    }
    
    .access-title {
        font-size: 22px;
        margin-bottom: 20px;
    }
    
    .access-button {
        padding: 16px;
        font-size: 18px;
        border-radius: 8px;
    }
    
    .personnalite-link {
        font-size: 14px;
    }
    
    .access-footer {
        padding: 20px 15px;
    }
    
    .footer-link {
        font-size: 14px;
    }
    
    .icon-token, .icon-help {
        font-size: 18px;
    }
}

/* Para telas muito pequenas */
@media (max-width: 375px) {
    /* Ajustes Loading em telas pequenas */
    .loading-logo {
        width: 50px;
        height: 50px;
        border-radius: 12px;
    }
    
    .loading-spinner {
        width: 50px;
        height: 50px;
    }
    
    .loading-text {
        font-size: 14px;
    }
    
    /* Ajustes tela de sucesso em telas pequenas */
    .success-logo {
        width: 50px;
        height: 50px;
    }
    
    .success-icon svg {
        width: 60px;
        height: 60px;
    }
    
    .success-title {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .success-subtitle {
        font-size: 16px;
        margin-bottom: 30px;
    }
    
    .protocol-container {
        padding: 15px 25px;
    }
    
    .protocol-label {
        font-size: 12px;
    }
    
    .protocol-number {
        font-size: 18px;
    }
    
    .success-info {
        font-size: 12px;
    }
    
    .nivel5-header-section {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .nivel5-title {
        text-align: center;
    }
    
    .access-title {
        font-size: 20px;
    }
    
    .access-button {
        font-size: 16px;
        padding: 14px;
    }
    
    .logo-100 {
        font-size: 40px;
    }
}