/* ===================================
   AUTH.CSS - SISTEMA DE AUTENTICAÇÃO
   Login, Cadastro e Recuperação de Senha
   Totalmente Responsivo
   =================================== */

/* ===== BODY E BACKGROUND ===== */
body {
    min-height: 100vh;
    min-height: -webkit-fill-available; /* Fix para iOS/Android */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
    width: 100%;
    box-sizing: border-box;
}

html {
    height: -webkit-fill-available;
}

body::before {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle at center, rgba(139, 92, 246, 0.15) 0%, rgba(139, 92, 246, 0.05) 40%, transparent 70%);
    animation: pulseGlow 8s ease-in-out infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* ===== CONTAINER PRINCIPAL ===== */
.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 450px;
}

/* ===== LOGO ===== */
.logo {
    text-align: center;
    margin-bottom: 40px;
}

.logo-text {
    font-size: 36px;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary-purple), var(--light-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.logo-icon {
    display: block;
    margin: 0 auto 10px;
    text-align: center;
    animation: float 3s ease-in-out infinite;
}

.logo-icon img {
    width: 70px;
    height: 32px;
    display: inline-block;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ===== CARDS DE AUTENTICAÇÃO ===== */
.auth-card {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 40px;
    border: 1px solid rgba(139, 92, 246, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

.form-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
}

.form-subtitle {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 30px;
    font-size: 14px;
}

/* ===== ALERTAS ===== */
.alert {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
    animation: slideIn 0.3s ease;
}

.alert.show {
    display: block;
}

.alert.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.alert.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== PASSWORD WRAPPER ===== */
.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 18px;
    transition: color 0.3s ease;
    padding: 4px;
    z-index: 10;
}

.password-toggle:hover {
    color: var(--primary-purple);
}

/* ===== CHECKBOX ===== */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-purple);
}

.checkbox-group label {
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    user-select: none;
}

/* ===== FORM FOOTER ===== */
.form-footer {
    text-align: center;
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

.form-footer a {
    color: var(--primary-purple);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    position: relative;
    z-index: 10;
}

.form-footer a:hover {
    color: var(--light-purple);
    text-decoration: underline;
}

/* ===== FORGOT PASSWORD ===== */
.forgot-password {
    text-align: right;
    margin-top: -10px;
    margin-bottom: 20px;
}

.forgot-password a {
    color: var(--primary-purple);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
    position: relative;
    z-index: 10;
}

.forgot-password a:hover {
    color: var(--light-purple);
}

/* ===== VISIBILIDADE DOS FORMULÁRIOS ===== */
.form-container {
    display: none;
}

.form-container.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== FORÇA DA SENHA ===== */
.strength-meter {
    height: 4px;
    background: var(--bg-dark);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-weak {
    width: 33%;
    background: #ef4444;
}

.strength-medium {
    width: 66%;
    background: #f59e0b;
}

.strength-strong {
    width: 100%;
    background: #10b981;
}

.strength-text {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 5px;
}

/* ===================================
   RESPONSIVIDADE
   =================================== */

/* ===== TABLETS (Portrait) ===== */
@media (max-width: 768px) {
    .container {
        max-width: 90%;
    }

    .auth-card {
        padding: 35px 25px;
    }

    .logo-text {
        font-size: 32px;
    }

    .logo-icon {
        font-size: 42px;
    }

    .form-title {
        font-size: 26px;
    }
}

/* ===== TABLETS (Landscape) ===== */
@media (max-width: 1024px) and (min-width: 769px) {
    .container {
        max-width: 500px;
    }
}

/* ===== MOBILE (Landscape) ===== */
@media (max-width: 768px) and (orientation: landscape) {
    body {
        height: auto;
        min-height: 100vh;
        padding: 10px;
    }

    .auth-card {
        padding: 25px 20px;
    }

    .logo {
        margin-bottom: 20px;
    }

    .logo-icon {
        font-size: 36px;
    }

    .logo-text {
        font-size: 28px;
    }

    .form-title {
        font-size: 24px;
    }

    .form-group {
        margin-bottom: 15px;
    }
}

/* ===== MOBILE (Portrait) ===== */
@media (max-width: 480px) {
    body {
        padding: 10px;
        align-items: flex-start;
        padding-top: 20px;
    }

    .container {
        max-width: 100%;
        width: 100%;
    }

    .auth-card {
        padding: 25px 20px;
        border-radius: 20px;
        width: 100%;
        box-sizing: border-box;
    }

    .logo {
        margin-bottom: 30px;
    }

    .logo-text {
        font-size: 28px;
    }

    .logo-icon img {
        width: 60px;
        height: 28px;
    }

    .form-title {
        font-size: 22px;
    }

    .form-subtitle {
        font-size: 13px;
    }

    .btn {
        padding: 14px;
        font-size: 15px;
    }

    .form-input {
        padding: 12px 14px;
        font-size: 15px;
    }

    .password-toggle {
        font-size: 16px;
    }
}

/* ===== MOBILE MUITO PEQUENO ===== */
@media (max-width: 360px) {
    .auth-card {
        padding: 20px 15px;
    }

    .logo-text {
        font-size: 24px;
    }

    .logo-icon img {
        width: 52px;
        height: 24px;
    }

    .form-title {
        font-size: 20px;
    }

    .form-subtitle {
        font-size: 12px;
    }

    .btn {
        padding: 11px;
        font-size: 14px;
    }

    .form-input {
        padding: 11px 12px;
        font-size: 14px;
    }
}

/* ===== AJUSTES PARA TELAS MUITO GRANDES ===== */
@media (min-width: 1440px) {
    body::before {
        width: 800px;
        height: 800px;
    }

    .container {
        max-width: 500px;
    }

    .auth-card {
        padding: 50px;
    }
}

/* ===== MODO PAISAGEM ESTREITO ===== */
@media (max-height: 600px) and (orientation: landscape) {
    body {
        padding: 10px;
    }

    .logo {
        margin-bottom: 15px;
    }

    .logo-icon {
        font-size: 30px;
        margin-bottom: 5px;
    }

    .logo-text {
        font-size: 24px;
    }

    .auth-card {
        padding: 20px;
    }

    .form-title {
        font-size: 20px;
        margin-bottom: 8px;
    }

    .form-subtitle {
        font-size: 12px;
        margin-bottom: 20px;
    }

    .form-group {
        margin-bottom: 12px;
    }

    .btn {
        padding: 10px;
        font-size: 14px;
    }

    .divider {
        margin: 15px 0;
    }
}