/* Layout responsivo: card centralizado quando cabe, no topo quando precisa rolar */
.auth-modern {
    background: linear-gradient(135deg, #0056E4 0%, #0780DD 50%, #39d4e7 100%);
    min-height: 100vh;
}

/* Coluna direita: bastante respiro nas laterais e em cima/baixo */
.auth-right {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 2rem 1.5rem 4rem !important;
}

@media (min-width: 992px) {
    .auth-right {
        padding: 3rem 4rem 5rem !important;
    }
}

.auth-right-spacer {
    flex: 1 1 0;
    min-height: 0;
}

.auth-right .login-card {
    flex: 0 0 auto;
}

/* Card: largura contida e padding generoso para não ficar apertado */
.login-card {
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 86, 228, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0 2.25rem 2.5rem;
}

.logo-modern {
    transition: transform 0.3s ease;
}

    .logo-modern:hover {
        transform: scale(1.05);
    }

/* Título: ritmo vertical claro */
.login-title-block {
    margin-top: 0;
    margin-bottom: 2rem;
}

.title-gradient {
    background: linear-gradient(135deg, #0056E4 0%, #0780DD 50%, #26BBCD 100%);
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent;
    background-clip: text !important;
    font-family: 'Segoe UI', 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-weight: 800 !important;
    letter-spacing: -1.5px;
    font-size: 1.75rem !important;
    line-height: 1.2;
    text-transform: uppercase;
    margin-top: 0;
    margin-bottom: 0.35rem;
    text-shadow: 0 2px 4px rgba(0, 86, 228, 0.1);
}

.subtitle-gradient {
    background: linear-gradient(135deg, #0056E4 0%, #0780DD 50%, #26BBCD 100%);
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent;
    background-clip: text !important;
    font-family: 'Segoe UI', 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-weight: 600 !important;
    letter-spacing: 2px;
    font-size: 0.8rem !important;
    line-height: 1.3;
    text-transform: uppercase;
    margin-top: 0;
    margin-bottom: 0;
    opacity: 0.9;
}

/* Formulário: espaçamento confortável entre campos */
.form-container {
    margin-bottom: 0;
}

.form-container .row:first-child {
    margin-bottom: 0.5rem;
}

.form-group-login {
    margin-bottom: 1.25rem;
}

.form-options {
    margin-bottom: 1.5rem;
}

.btn-entrar {
    margin-bottom: 0;
}

.login-social-section {
    margin-top: 2rem;
    padding-top: 1.75rem;
}

.login-social-section .mb-3 {
    margin-bottom: 1rem !important;
}

.login-footer-links {
    margin-top: 1.75rem;
}

.login-branding {
    margin-top: 1.25rem;
}

.login-branding p {
    font-size: 0.7rem;
    color: #b0b8c0;
    font-weight: 500;
}

/* Inputs de login – estilo moderno e limpo */
.form-control-modern {
    --login-input-height: 3rem;
    height: var(--login-input-height);
    min-height: var(--login-input-height);
    border: 1.5px solid #dee2e6;
    border-radius: 14px;
    padding: 0 1rem 0 3rem;
    font-size: 0.8rem !important;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
    background: #fff;
    color: #1a1d21 !important;
    -webkit-text-fill-color: #1a1d21 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.form-control-modern::placeholder {
    color: #868e96 !important;
    font-weight: 400;
    opacity: 1;
}

.form-control-modern:hover {
    border-color: #ced4da;
    background: #fafbfc;
}

.form-control-modern:focus {
    border-color: #0056E4;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 86, 228, 0.12);
    outline: none;
}

.form-control-modern:focus::placeholder {
    color: #adb5bd !important;
}

/* Ícone à esquerda do input */
.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #868e96;
    font-size: 1.25rem;
    z-index: 10;
    transition: color 0.25s ease;
    pointer-events: none;
}

.form-control-modern:focus + .input-icon {
    color: #0056E4;
}

/* Alerts da página de login (gerados pela classe Messages) */
.auth .row + .row .alert,
.auth .form-container .alert,
.login-card .alert {
    position: relative;
    padding: 0.875rem 2.5rem 0.875rem 1rem;
    border-radius: 12px;
    border: 1px solid transparent;
    border-inline-start-width: 4px;
    text-align: left;
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.auth .alert-dismissible .btn-close,
.login-card .alert-dismissible .btn-close {
    position: absolute;
    top: 0.625rem;
    right: 0.625rem;
    padding: 0.25rem;
    opacity: 0.7;
}

.auth .alert-warning,
.login-card .alert-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(251, 191, 36, 0.06) 100%);
    border-color: rgba(245, 158, 11, 0.3);
    border-inline-start-color: #d97706;
    color: #92400e;
}

.auth .alert-danger,
.login-card .alert-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12) 0%, rgba(248, 113, 113, 0.06) 100%);
    border-color: rgba(239, 68, 68, 0.3);
    border-inline-start-color: #dc2626;
    color: #991b1b;
}

.auth .alert strong,
.login-card .alert strong {
    font-weight: 600;
}

/* Container do label de mensagem: alinhamento */
.auth .form-container .row .col-12 {
    text-align: left;
}

.btn-modern {
    background: linear-gradient(135deg, #0056E4 0%, #0780DD 50%, #26BBCD 100%);
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-weight: 500;
    font-size: 14px;
    text-transform: none;
    letter-spacing: 0px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 86, 228, 0.2);
}

    .btn-modern:hover {
        transform: translateY(-3px);
        box-shadow: 0 12px 30px rgba(0, 86, 228, 0.4);
        background: linear-gradient(135deg, #0056E4 0%, #00DBD1 50%, #36F2D6 100%);
    }

    .btn-modern:active {
        transform: translateY(-1px);
    }

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.8);
    color: #92a5bd;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 86, 228, 0.08);
    border: 1px solid rgba(161, 192, 161, 0.15);
    margin: 0 auto;
}

    .social-icon:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 86, 228, 0.15);
        background: #fff;
    }

    .social-icon i {
        font-size: 14px;
    }

@media (max-width: 575.98px) {
    .social-icon {
        width: 32px;
        height: 32px;
    }

        .social-icon i {
            font-size: 12px;
        }
}

.social-icon.instagram:hover {
    color: #E8ACAC;
    background: linear-gradient(135deg, rgba(232, 172, 172, 0.1), rgba(161, 192, 161, 0.1));
}

.social-icon.facebook:hover {
    color: #0056E4;
    background: linear-gradient(135deg, rgba(0, 86, 228, 0.1), rgba(7, 128, 221, 0.1));
}

.social-icon.linkedin:hover {
    color: #0780DD;
    background: linear-gradient(135deg, rgba(7, 128, 221, 0.1), rgba(38, 187, 205, 0.1));
}

.social-icon.whatsapp:hover {
    color: #2CA880;
    background: linear-gradient(135deg, rgba(44, 168, 128, 0.1), rgba(0, 157, 113, 0.1));
}

.social-icon.email:hover {
    color: #26BBCD;
    background: linear-gradient(135deg, rgba(38, 187, 205, 0.1), rgba(0, 219, 209, 0.1));
}

.social-icon.maps:hover {
    color: #00DBD1;
    background: linear-gradient(135deg, rgba(0, 219, 209, 0.1), rgba(54, 242, 214, 0.1));
}

/* Grid de ícones sociais */
.social-icons-wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
}

.social-icons-wrap .social-icon {
    flex: 0 0 auto;
}

.form-check-input:checked {
    background-color: #0056E4;
    border-color: #0056E4;
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 86, 228, 0.25);
}

.toggle-password {
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

    .toggle-password:hover {
        color: #0056E4 !important;
        transform: translateY(-50%) scale(1.1);
    }

    .toggle-password:active {
        transform: translateY(-50%) scale(0.95);
    }

.forgot-password {
    color: #0056E4;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

    .forgot-password:hover {
        color: #0780DD;
        text-decoration: underline;
    }

.fade-in {
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 991.98px) {
    .login-card {
        margin: 20px;
        border-radius: 20px;
    }
}

.video-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, #0056E4 0%, #0780DD 50%, #26BBCD 100%);
}

#backgroundVideo {
    position: relative;
    z-index: 0;
}

h7 {
    display: block;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

    h7.fw-bold {
        font-weight: 700;
    }

    h7.fw-semibold {
        font-weight: 600;
    }

.modal-body h7 {
    color: #212529 !important;
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
    max-width: 100% !important;
}

    .modal-body h7.text-primary {
        color: #0056E4 !important;
    }

.modal-header h7.modal-title {
    color: inherit;
    font-size: 1rem;
    margin-bottom: 0;
}

.modal-content {
    background-color: #ffffff !important;
    color: #212529 !important;
}

.modal-header {
    background-color: #ffffff !important;
    border-bottom: 1px solid #dee2e6 !important;
}

.modal-body {
    background-color: #ffffff !important;
    color: #212529 !important;
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    padding: 1rem !important;
}

.modal-dialog-scrollable .modal-body {
    max-height: calc(100vh - 200px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

.modal-content {
    overflow: hidden !important;
}

.modal-dialog-scrollable .modal-content {
    overflow: hidden !important;
}

.modal-footer {
    background-color: #ffffff !important;
    border-top: 1px solid #dee2e6 !important;
}

.modal-body * {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.modal-body p,
.modal-body li,
.modal-body span,
.modal-body div {
    color: #212529 !important;
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
    max-width: 100% !important;
}

.modal-body a:not(.btn) {
    color: #212529 !important;
    word-break: break-all !important;
    overflow-wrap: anywhere !important;
    max-width: 100% !important;
}

.modal-body code {
    word-break: break-all !important;
    overflow-wrap: anywhere !important;
    white-space: pre-wrap !important;
    max-width: 100% !important;
}

.modal-body img {
    max-width: 100%;
    height: auto;
}

@media (max-width: 768px) {
    .modal-body .col-md-2 {
        flex: 0 0 auto;
        width: auto;
        min-width: auto;
    }

        .modal-body .col-md-2 img,
        .modal-body img[src*="logo.svg"] {
            max-width: 60px !important;
            width: 60px !important;
        }

    .modal-body .col-md-10 {
        flex: 1 1 auto;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .modal-body .col-md-2 {
        flex: 0 0 auto;
        width: auto;
        min-width: auto;
        margin-bottom: 0.5rem;
    }

        .modal-body .col-md-2 img,
        .modal-body img[src*="logo.svg"] {
            max-width: 50px !important;
            width: 50px !important;
        }

    .modal-body .col-md-10 {
        flex: 1 1 auto;
        width: 100%;
    }

    .modal-body .row.align-items-start {
        flex-direction: column;
        align-items: center !important;
    }

    .modal-body .col-md-2 {
        margin-bottom: 1rem;
    }
}

.modal-body table {
    max-width: 100%;
    table-layout: auto;
}

.modal-body .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100% !important;
}

.modal-body .col-md-2,
.modal-body .col-md-10,
.modal-body [class*="col-"] {
    max-width: 100% !important;
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
    box-sizing: border-box !important;
}

.modal-content {
    max-width: 100% !important;
    overflow: hidden !important;
    width: 100% !important;
}

.modal-dialog {
    max-width: 90%;
    margin: 1rem auto;
}

@media (min-width: 576px) {
    .modal-dialog {
        max-width: 500px;
    }
}

@media (min-width: 992px) {
    .modal-dialog.modal-lg {
        max-width: 800px;
    }
}

.modal-body .text-muted {
    color: #6c757d !important;
}

.modal-body .text-primary {
    color: #0056E4 !important;
}

.modal-body code {
    background-color: #f8f9fa !important;
    color: #0056E4 !important;
    padding: 2px 6px;
    border-radius: 4px;
    word-break: break-all;
    white-space: pre-wrap;
}

#ModalCookies .modal-header.bg-primary,
#ModalRecord .modal-header,
#ModalPrivacity .modal-header,
#ModalSignUp .modal-header {
    background: linear-gradient(135deg, #0056E4 0%, #0780DD 50%, #26BBCD 100%) !important;
    color: #ffffff !important;
}

    #ModalCookies .modal-header.bg-primary .modal-title,
    #ModalCookies .modal-header.bg-primary h7,
    #ModalRecord .modal-header .modal-title,
    #ModalRecord .modal-header h7,
    #ModalPrivacity .modal-header .modal-title,
    #ModalPrivacity .modal-header h7,
    #ModalSignUp .modal-header .modal-title,
    #ModalSignUp .modal-header h7 {
        color: #ffffff !important;
    }

.cookie-bar {
    backdrop-filter: blur(10px);
    background: linear-gradient(135deg, #0056E4 0%, #0780DD 50%, #26BBCD 100%) !important;
    animation: slideUpFade 0.6s ease-out;
    font-size: 0.8em !important;
    z-index: 1000 !important;
    box-shadow: 0 -4px 20px rgba(0, 86, 228, 0.15);
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(100%);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cookie-bar .btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ffb300 100%);
    border: none;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
    transition: all 0.3s ease;
}

    .cookie-bar .btn-warning:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
        background: linear-gradient(135deg, #ffb300 0%, #ff8f00 100%);
    }

.cookie-bar a {
    transition: color 0.3s ease;
}

    .cookie-bar a:hover {
        color: #fff !important;
    }

@media (max-width: 768px) {
    .cookie-bar {
        padding: 15px 10px !important;
        font-size: 0.7rem !important;
    }

        .cookie-bar .cookie-message {
            font-size: 0.7rem !important;
            line-height: 1.3;
            text-align: center;
        }

        .cookie-bar .col-md-10,
        .cookie-bar .col-md-2 {
            text-align: center;
        }
}

@media (max-width: 480px) {
    .cookie-bar {
        padding: 12px 8px !important;
        font-size: 0.65rem !important;
    }

        .cookie-bar .cookie-message {
            font-size: 0.65rem !important;
            line-height: 1.2;
        }
}

/* Logo na borda do card: metade fora, metade dentro; card com espaço ao redor */
.logo-circle {
    position: absolute;
    left: 50%;
    top: -50px;
    transform: translateX(-50%);
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0, 86, 228, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 10;
}

    .logo-circle img {
        width: 72px;
        height: auto;
    }

.login-card {
    position: relative;
    margin-top: 2.5rem;
    margin-bottom: 4rem;
    padding-top: 60px;
}

@media (min-width: 992px) {
    .login-card {
        margin-top: 3rem;
        margin-bottom: 5rem;
    }
}

.auth-right {
    padding-bottom: 100px !important;
}

/* Telas baixas (notebook 1366x768, 1440x900 etc.): card mais compacto */
@media (max-height: 900px) {
    .login-card {
        margin-top: 40px;
        margin-bottom: 50px;
        padding-top: 54px;
        padding-bottom: 1.25rem !important;
    }

    .login-title-block {
        margin-top: 0;
    }

    .title-gradient {
        font-size: 2rem !important;
    }

    .subtitle-gradient {
        font-size: 0.8rem !important;
        margin-top: 4px;
    }

    .logo-circle {
        width: 88px;
        height: 88px;
        top: -44px;
    }

    .logo-circle img {
        width: 64px;
    }

    .login-card .login-social-section {
        margin-top: 1rem !important;
        padding-top: 1rem !important;
    }

    .form-control-modern {
        --login-input-height: 2.75rem;
    }
}

@media (max-height: 800px) {
    .login-card {
        margin-top: 32px;
        margin-bottom: 40px;
        padding: 1.25rem 1.5rem !important;
        padding-top: 50px !important;
    }

    .title-gradient {
        font-size: 1.75rem !important;
    }

    .subtitle-gradient {
        font-size: 0.75rem !important;
        letter-spacing: 1.5px;
    }

    .logo-circle {
        width: 80px;
        height: 80px;
        top: -40px;
    }

    .logo-circle img {
        width: 58px;
    }

    .login-card .login-social-section {
        margin-top: 1rem !important;
        padding-top: 0.75rem !important;
    }

    .login-card .mt-3.text-center,
    .login-card .mt-2.text-center {
        margin-top: 0.5rem !important;
    }

    .form-control-modern {
        --login-input-height: 2.5rem;
    }

    .btn-modern {
        padding: 10px 20px;
        font-size: 13px;
    }
}

@media (max-height: 700px) {
    .login-card {
        margin-top: 24px;
        margin-bottom: 32px;
        padding: 1rem 1.25rem !important;
        padding-top: 45px !important;
    }

    .title-gradient {
        font-size: 1.5rem !important;
    }

    .subtitle-gradient {
        font-size: 0.7rem !important;
        letter-spacing: 1px;
    }

    .logo-circle {
        width: 70px;
        height: 70px;
        top: -35px;
    }

    .logo-circle img {
        width: 50px;
    }

    .login-card .form-container .mb-3 {
        margin-bottom: 0.5rem !important;
    }

    .login-card .d-flex.justify-content-between.mb-3 {
        margin-bottom: 0.5rem !important;
    }

    .login-card .login-social-section {
        margin-top: 0.5rem !important;
        padding-top: 0.5rem !important;
    }

    .social-icons-wrap {
        gap: 0.5rem;
    }

    .form-control-modern {
        --login-input-height: 2.25rem;
    }

    .auth-right {
        padding-bottom: 80px !important;
    }
}

@media (max-width: 768px) {
    .auth-right {
        padding-bottom: 120px !important;
    }
}

@media (max-width: 768px) {
    .login-card {
        margin: 50px 15px 100px 15px;
        border-radius: 20px;
        padding-top: 54px;
    }

    .title-gradient {
        font-size: 2rem !important;
        margin-top: 0 !important;
    }

    .subtitle-gradient {
        font-size: 0.9rem !important;
        margin-top: 6px;
    }

    .form-control-modern {
        padding: 20px 14px 16px 40px;
        font-size: 13px;
    }

    .logo-circle {
        width: 88px;
        height: 88px;
        top: -44px;
    }

        .logo-circle img {
            width: 64px;
        }
}

/* Notebook/mobile com tela baixa: card compacto + margens laterais */
@media (max-width: 768px) and (max-height: 800px) {
    .login-card {
        margin: 24px 15px 80px 15px;
        padding: 1rem 1.25rem !important;
        padding-top: 48px !important;
    }

    .title-gradient {
        font-size: 1.6rem !important;
        margin-top: 0 !important;
    }

    .logo-circle {
        width: 76px;
        height: 76px;
        top: -38px;
    }

        .logo-circle img {
            width: 54px;
        }
}

@media (max-width: 480px) {
    .login-card {
        margin: 45px 10px 120px 10px;
        padding: 30px 20px !important;
        padding-top: 54px;
    }

    .title-gradient {
        font-size: 1.8rem !important;
        margin-top: 0 !important;
    }

    .subtitle-gradient {
        font-size: 0.85rem !important;
        margin-top: 5px;
        letter-spacing: 1.5px;
    }

    .form-control-modern {
        padding: 18px 14px 14px 40px;
        font-size: 12px;
    }

    .btn-modern {
        padding: 14px 20px;
        font-size: 13px;
    }

    .social-icons-wrap .social-icon {
        width: 32px;
        height: 32px;
    }

    .social-icons-wrap .social-icon i {
        font-size: 11px;
    }
}

@media (max-width: 480px) and (max-height: 700px) {
    .login-card {
        margin: 16px 10px 70px 10px;
        padding: 0.75rem 1rem !important;
        padding-top: 40px !important;
    }

    .title-gradient {
        font-size: 1.4rem !important;
        margin-top: 0 !important;
    }

    .logo-circle {
        width: 64px;
        height: 64px;
        top: -32px;
    }

        .logo-circle img {
            width: 46px;
        }
}

@media (max-width: 360px) {
    .login-card {
        margin: 40px 5px 130px 5px;
        padding: 25px 15px !important;
        padding-top: 48px;
    }

    .logo-circle {
        width: 72px;
        height: 72px;
        top: -36px;
    }

        .logo-circle img {
            width: 52px;
        }

    .title-gradient {
        font-size: 1.6rem !important;
        margin-top: 0 !important;
    }

    .subtitle-gradient {
        font-size: 0.75rem !important;
        letter-spacing: 1px;
    }
}
