/* ============================================================
   auth_modal.css — Estilos do modal de autenticacao
   Usado no index.php e login.php
   ============================================================ */

/* Overlay */
.modal-auth-overlay {
    position: fixed;
    inset: 0;
    background: rgba(12, 22, 44, 0.52);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.28s ease;
    padding: 16px;
}
.modal-auth-overlay.active {
    display: flex;
    opacity: 1;
}

/* Card glassmorphism */
.mac {
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(36px) saturate(155%);
    -webkit-backdrop-filter: blur(36px) saturate(155%);
    border: 1px solid rgba(200, 220, 240, 0.65);
    border-radius: 26px;
    position: relative;
    box-shadow:
        0 24px 64px rgba(50, 100, 170, 0.14),
        0 4px 16px rgba(50, 100, 170, 0.07),
        inset 0 1px 0 rgba(255, 255, 255, 0.75);
    transform: translateY(24px) scale(0.97);
    transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}
.modal-auth-overlay.active .mac {
    transform: translateY(0) scale(1);
}
.mac::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3a5575, #4d6d8e, #3a5575);
}

/* Fechar */
.mac-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(175, 202, 225, 0.22);
    border: 1px solid rgba(175, 202, 225, 0.40);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #607080;
    transition: all 0.2s;
    z-index: 2;
}
.mac-close:hover {
    background: rgba(175, 202, 225, 0.45);
    color: #1a2a3a;
}

/* Corpo */
.mac-body {
    padding: 36px 28px 26px;
    text-align: center;
    color: #1a2a3a;
    font-family: 'Inter', -apple-system, sans-serif;
}

/* Icone */
.mac-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(185, 212, 235, 0.70);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: #2c4060;
    box-shadow: 0 3px 12px rgba(70, 130, 190, 0.10);
}

/* Titulo e subtitulo */
.mac-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a2a3a;
    margin-bottom: 4px;
    letter-spacing: -0.3px;
}
.mac-sub {
    font-size: 13px;
    color: #6a7f96;
    margin-bottom: 20px;
    line-height: 1.55;
}

/* Campos */
.mf {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 9px;
}
.mf-ic {
    position: absolute;
    left: 14px;
    color: #8fa5be;
    display: flex;
    align-items: center;
    pointer-events: none;
}
.mi {
    width: 100%;
    height: 44px;
    padding: 0 40px;
    background: rgba(220, 232, 245, 0.50);
    border: 1.5px solid rgba(170, 200, 228, 0.50);
    border-radius: 11px;
    font-size: 14px;
    font-family: inherit;
    color: #1a2a3a;
    transition: all 0.2s;
    outline: none;
    box-sizing: border-box;
}
.mi::placeholder {
    color: #98b0c6;
}
.mi:focus {
    border-color: #4a90d9;
    background: rgba(245, 250, 255, 0.88);
    box-shadow: 0 0 0 4px rgba(74, 144, 217, 0.09);
}
.mi-pwd {
    padding-right: 42px;
}

/* Toggle senha */
.mi-eye {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #8fa5be;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 4px;
    transition: color 0.2s;
    outline: none;
}
.mi-eye:hover {
    color: #4a90d9;
}

/* Esqueceu senha */
.mforgot-row {
    display: flex;
    justify-content: flex-end;
    margin: 2px 0 14px;
}
.mforgot {
    font-size: 12.5px;
    font-weight: 600;
    color: #4a90d9;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
}
.mforgot:hover {
    text-decoration: underline;
}

/* Botao primario */
.mbtn {
    width: 100%;
    height: 44px;
    background: #3a5575;
    color: #fff;
    border: none;
    border-radius: 11px;
    font-size: 14.5px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    letter-spacing: 0.1px;
    transition: all 0.22s;
    box-shadow: 0 4px 14px rgba(58, 85, 117, 0.22);
    position: relative;
    overflow: hidden;
}
.mbtn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0%, transparent 60%);
    pointer-events: none;
}
.mbtn:hover {
    background: #4d6d8e;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(58, 85, 117, 0.28);
}
.mbtn:active {
    transform: translateY(0);
}

/* Divisor */
.mdiv {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 18px 0 14px;
    color: #8fa5be;
    font-size: 11.5px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.mdiv::before,
.mdiv::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(150, 185, 215, 0.38);
}

/* Botoes sociais */
.msocials {
    display: flex;
    gap: 8px;
    width: 100%;
}
.msbtn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    flex: 1;
    height: 43px;
    background: rgba(255, 255, 255, 0.68);
    border: 1.5px solid rgba(190, 215, 235, 0.68);
    border-radius: 11px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: #1a2a3a;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 1px 4px rgba(70, 130, 190, 0.06);
    white-space: nowrap;
}
.msbtn:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(130, 180, 215, 0.88);
    transform: translateY(-2px);
    box-shadow: 0 5px 14px rgba(74, 144, 217, 0.12);
}
.msbtn:active {
    transform: translateY(0);
}

/* Loading */
.mload {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #4a90d9;
    min-height: 42px;
}
.mspin {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(74, 144, 217, 0.18);
    border-top-color: #4a90d9;
    border-radius: 50%;
    animation: msa 0.7s linear infinite;
}
@keyframes msa {
    to { transform: rotate(360deg); }
}

/* Termos */
.mterms {
    font-size: 11px;
    color: #8fa5be;
    line-height: 1.65;
    margin-top: 14px;
}
.mterms a {
    color: #4a90d9;
    font-weight: 600;
    text-decoration: none;
}
.mterms a:hover {
    text-decoration: underline;
}

/* Rodape */
.mfooter {
    font-size: 13px;
    color: #6a7f96;
    margin-top: 10px;
}
.mfooter a,
.mfooter button {
    color: #4a90d9;
    font-weight: 700;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    padding: 0;
}
.mfooter a:hover,
.mfooter button:hover {
    text-decoration: underline;
}

/* Alerta inline */
.malert {
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    margin-bottom: 12px;
}
.malert-err {
    background: rgba(215, 50, 60, 0.07);
    border: 1px solid rgba(215, 50, 60, 0.18);
    color: #a82030;
}

/* Responsivo */
@media (max-width: 480px) {
    .mac-body {
        padding: 28px 16px 22px;
    }
    .mac {
        border-radius: 20px;
    }
    .msbtn span {
        display: none;
    }
    .msbtn {
        flex: 0 0 50px;
        width: 50px;
        gap: 0;
    }
    .msocials {
        justify-content: center;
        gap: 9px;
    }
}
