/* ========================================
   AUTH PAGES - PREMIUM GLASSMORPHISM
   ======================================== */

:root {
    /* Cores extraídas do style.css e hero section */
    --primary-color: hsl(190, 90%, 35%);
    /* Primary Cyan */
    --primary-dark: hsl(190, 90%, 25%);
    --secondary-color: #0ea5e9;
    /* Sky Blue */
    --accent-color: #22d3ee;
    /* Cyan Light */
    --text-main: #1a202c;
    --text-muted: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.92);
    --glass-border: rgba(255, 255, 255, 0.8);
    --glass-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --input-bg: white;
    --input-border: #e2e8f0;
    --input-focus: hsl(190, 90%, 35%);
}

/* Container Principal com Fundo igual ao Hero Section */
.auth-container {
    min-height: calc(100vh - 72px);
    /* Desconta header */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 40px 20px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    /* Hero Background */
    overflow: hidden;
}

/* Elementos Flutuantes (Blobs) ajustados para tons de azul/ciano */
.auth-blobs {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 10s infinite ease-in-out;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: var(--primary-color);
    animation-delay: 0s;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: #0f172a;
    /* Dark Blue */
    animation-delay: -2s;
    opacity: 0.8;
}

.blob-3 {
    top: 30%;
    right: 30%;
    width: 300px;
    height: 300px;
    background: var(--accent-color);
    animation-delay: -4s;
    opacity: 0.3;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -30px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* Card Principal (Glassmorphism) */
.auth-card {
    position: relative;
    width: 100%;
    max-width: 480px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow: var(--glass-shadow);
    z-index: 10;
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header do Card */
.auth-header {
    text-align: center;
    margin-bottom: 35px;
}

.auth-header h1 {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Formulário e Inputs */
.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-group label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

.form-group input:not([type="checkbox"]) {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    color: var(--text-main);
    background: var(--input-bg);
    border: 2px solid var(--input-border);
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.form-group input:focus {
    outline: none;
    border-color: var(--input-focus);
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

.form-group input.error {
    border-color: #ef4444;
    background: #fef2f2;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 6px;
    display: block;
}

/* Senha e Toggle */
.password-input {
    position: relative;
}

.password-input input {
    padding-right: 48px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s;
    display: flex;
    align-items: center;
}

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

.forgot-password {
    font-size: 0.85rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.forgot-password:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Checkbox Moderno */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-muted);
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 2px solid var(--input-border);
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    background: white;
    position: relative;
    transition: all 0.2s;
}

.checkbox-label input[type="checkbox"]:checked {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: translate(-50%, -60%) rotate(45deg);
}

/* Botões */
.btn-block {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    font-size: 1.05rem;
    font-weight: 700;
    margin-top: 10px;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.25);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(102, 126, 234, 0.35);
}

.btn-primary:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.25);
}

/* Loader */
.btn-loader {
    display: inline-flex;
}

.spinner {
    width: 24px;
    height: 24px;
    animation: rotate 2s linear infinite;
}

.spinner circle {
    stroke: white;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }

    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }

    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* Footer & Divider */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 30px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.auth-divider span {
    padding: 0 15px;
}

.auth-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #e2e8f0;
}

.auth-footer p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
    color: var(--secondary-color);
}

/* Mensagens de Erro */
.error-message {
    font-size: 0.8rem;
    color: #ef4444;
    min-height: 20px;
    margin-top: 5px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s;
}

.form-group input.error+.error-message {
    opacity: 1;
    transform: translateY(0);
}

/* Grid para Cadastro */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Mobile */
@media (max-width: 640px) {
    .auth-card {
        padding: 30px 24px;
        border-radius: 20px;
    }

    .auth-header h1 {
        font-size: 1.7rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .blob {
        filter: blur(40px);
        opacity: 0.4;
    }
}