@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --font-family: 'Inter', sans-serif;
    --primary-blue: #0069d0;
    --background-gradient-end: #c4d3e2;
    --text-dark: #333333;
    --background-white: #FFFFFF;
    --border-light: #c1d0da;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.login-page-wrapper {
    width: 100%;
    min-height: 100vh; /* Garante que o wrapper ocupe pelo menos toda a altura da tela */
    display: flex;
    flex-direction: column; /* Organiza os itens verticalmente */
    align-items: center;
    justify-content: center; /* Centraliza o conteúdo principal */
    background: linear-gradient(135deg, var(--primary-blue), var(--background-gradient-end));
    padding: 2rem; /* Adiciona um respiro nas laterais */
    position: relative;
    overflow: hidden;
}

.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-box {
    background: var(--background-white);
    padding: 2.5rem 3rem;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    width: 100%;
    text-align: center;
    border: 1px solid var(--border-light);
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.logo-icon {
    font-size: 2rem;
    color: var(--primary-blue);
}

.logo-container h1 {
    font-size: 1.75rem;
    color: var(--text-dark);
    font-weight: 700;
}

.login-subtitle {
    margin-bottom: 2rem; /* Reduzido o espaço */
    color: #666;
    font-size: 0.95rem;
}

.form-group {
    text-align: left;
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 1px solid var(--border-light);
    background-color: #f9fafb;
    color: var(--text-dark);
    border-radius: 6px;
    font-size: 1rem;
    font-family: var(--font-family);
    transition: all 0.2s ease;
}

.form-group input::placeholder {
    color: #999;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 105, 208, 0.2);
}

.error-text {
    color: #d9534f;
    text-align: center;
    min-height: 1.2em;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.submit-button {
    width: 100%;
    padding: 0.9rem;
    border: none;
    border-radius: 6px;
    background-color: var(--primary-blue);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-top: 0.5rem;
}

.submit-button:hover {
    background-color: #0056b3;
}

.separator {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: #ccc;
}

.separator::before,
.separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #eee;
}

.separator:not(:empty)::before { margin-right: .5em; }
.separator:not(:empty)::after { margin-left: .5em; }

.google-login-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background-color: var(--background-white);
    color: #333;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.google-login-button:hover {
    background-color: #f7f7f7;
}

.google-login-button img {
    width: 20px;
    height: 20px;
}

/* Ajuste no rodapé do card de login */
.login-info-footer {
    margin-top: 1.5rem; /* Reduzido o espaço */
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

.login-info-footer p {
    margin: 0;
    color: #777;
    font-size: 0.8rem;
    line-height: 1.5;
}

.login-info-footer strong {
    color: #555;
    font-weight: 600;
}

.login-info-footer .version-text {
    margin-top: 0.5rem;
    color: #999;
    font-size: 0.75rem;
}

/* Posição do link "Voltar" ajustada */
.footer-credit {
    margin-top: 2rem; /* Espaço entre a caixa de login e o link */
    text-align: center;
    z-index: 10;
}
.footer-credit a {
    color: white; /* Cor mais visível */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    font-weight: 500;
}


/* --- ANIMAÇÃO DE FUNDO COM FORMAS GEOMÉTRICAS --- */
.background-animation-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.shape {
    position: absolute;
    list-style: none;
    display: block;
    background-color: rgba(255, 255, 255, 0.15);
    animation: moveShapes 35s linear infinite;
    bottom: -150px;
}

.shape-1 { width: 80px; height: 80px; left: 10%; animation-duration: 32s; border-radius: 50%; }
.shape-2 { width: 120px; height: 120px; left: 20%; animation-duration: 45s; animation-delay: 2s; }
.shape-3 { width: 150px; height: 150px; left: 70%; animation-duration: 38s; }
.shape-4 { width: 60px; height: 60px; left: 40%; animation-duration: 30s; animation-delay: 5s; border-radius: 20%; }
.shape-5 { width: 100px; height: 100px; left: 85%; animation-duration: 35s; }
.shape-6 { width: 50px; height: 50px; left: 50%; animation-duration: 50s; animation-delay: 3s; border-radius: 50%; }

@keyframes moveShapes {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(-120vh) rotate(720deg); opacity: 0; }
}


/* --- ANIMAÇÃO DE ONDAS (WAVES) --- */
.waves-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 15vh;
    min-height: 100px;
    max-height: 200px;
    z-index: 5;
}

.waves {
    position: relative;
    width: 100%;
    height: 100%;
}

.parallax > use {
    animation: move-forever 25s cubic-bezier(.55,.5,.45,.5) infinite;
}
.parallax > use:nth-child(1) { animation-delay: -2s; animation-duration: 7s; fill: rgba(255, 255, 255, 0.7); }
.parallax > use:nth-child(2) { animation-delay: -3s; animation-duration: 10s; fill: rgba(255, 255, 255, 0.5); }
.parallax > use:nth-child(3) { animation-delay: -4s; animation-duration: 13s; fill: rgba(255, 255, 255, 0.3); }
.parallax > use:nth-child(4) { animation-delay: -5s; animation-duration: 20s; fill: #fff; }

@keyframes move-forever {
    0% { transform: translate3d(-90px,0,0); }
    100% { transform: translate3d(85px,0,0); }
}

/* --- CÓDIGO ADICIONADO PARA CORREÇÃO EM CELULARES --- */
@media (max-width: 480px) {
    .login-page-wrapper {
        padding: 1rem; /* Diminui o espaçamento nas laterais da página */
    }

    .login-box {
        padding: 2rem 1.5rem; /* Diminui o preenchimento interno da caixa */
    }

    .logo-container h1 {
        font-size: 1.5rem; /* Diminui o tamanho do título "Sistema TFD" */
    }
    
    .logo-icon {
        font-size: 1.8rem;
    }

    .login-subtitle {
        margin-bottom: 1.5rem; /* Reduz o espaço abaixo do subtítulo */
        font-size: 0.9rem;
    }

    .separator {
        margin: 1.25rem 0; /* Diminui o espaço dos separadores "ou" */
    }

    .submit-button,
    .google-login-button {
        padding: 0.8rem; /* Ajusta o padding dos botões */
        font-size: 0.95rem; /* Garante que o texto do botão caiba bem */
    }

    .footer-credit {
        margin-top: 1.5rem;
    }
}
