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

:root {
    --primary-color: #007bff;
    --secondary-color: #00c6a7;
    --gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --background-color: #f0f2f5;
    --container-bg-color: #ffffff;
    --text-color-dark: #333;
    --text-color-light: #666;
    --input-border-color: #dde1e7;
    --input-focus-border: #007bff;
    --white-color: #fff;
    --error-bg-color: #fff2f2;
    --error-text-color: #d93025;
    --error-border-color: #ffcdd2;
    --animation-duration: 30s;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-y: auto;
    padding: 1rem;
}

.login-container {
    display: flex;
    width: 100%;
    max-width: 1100px;
    min-height: 720px;
    background-color: var(--container-bg-color);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border-radius: 20px;
    overflow: hidden;
}

/* --- Painel Esquerdo - Animação --- */
.left-panel {
    flex: 1;
    background: var(--gradient);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.icon-wrapper {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.central-icon {
    width: 140px;
    height: 140px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2);
}

.central-icon i {
    font-size: 70px;
    color: var(--white-color);
}

.orbiting-icons {
    position: absolute;
    width: 100%;
    height: 100%;
    animation: rotateIcons var(--animation-duration) linear infinite;
}

@keyframes rotateIcons {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.icon-group {
    position: absolute;
    width: 65px;
    height: 65px;
    background-color: var(--white-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    left: 50%;
    top: 50%;
    margin: -32.5px;
    /* Ajuste no translate para o tamanho do wrapper de 300px */
    transform: rotate(calc(360deg / 6 * var(--i))) translateY(-180px);
}

.icon-group i {
    font-size: 30px;
    color: var(--primary-color);
    animation: anti-rotateIcons var(--animation-duration) linear infinite;
}

@keyframes anti-rotateIcons {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

/* --- Painel Direito - Formulário --- */
.right-panel {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 50px;
}

.login-box {
    width: 100%;
    max-width: 380px;
    text-align: center;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color-dark);
    line-height: 1.2;
    margin-bottom: 10px;
}

.title span {
    display: block;
    font-weight: 500;
    font-size: 2rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-color-light);
    margin-bottom: 35px;
    font-size: 1rem;
}

.login-form {
    display: flex;
    flex-direction: column;
}

.input-group {
    margin-bottom: 25px;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color-dark);
    font-size: 0.9rem;
}

.input-field {
    position: relative;
}

.input-field i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0a0a0;
    transition: color 0.3s;
}

.input-field input {
    width: 100%;
    padding: 15px 15px 15px 50px;
    border: 1px solid var(--input-border-color);
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    color: var(--text-color-dark);
    background-color: #fdfdff;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.input-field input:focus {
    outline: none;
    border-color: var(--input-focus-border);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
}

.input-field input:focus ~ i {
    color: var(--primary-color);
}

.login-button {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    background: var(--gradient);
    background-size: 200% auto;
    color: var(--white-color);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s ease-in-out;
    margin-top: 10px;
}

.login-button:hover {
    background-position: right center;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -10px rgba(0, 123, 255, 0.5);
}

/* --- Mensagem de Erro PHP --- */
.error-message {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--error-bg-color);
    color: var(--error-text-color);
    border: 1px solid var(--error-border-color);
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* --- Links extras: "Esqueceu a senha" e "Cadastre-se" --- */
.extra-links {
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.extra-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

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

.extra-links .register-link {
    color: var(--text-color-light);
}

.extra-links .register-link strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* --- Responsividade --- */
@media (max-width: 992px) {
    .left-panel {
        display: none; /* Oculta o painel de ícones */
    }
    .login-container {
        width: 95%;
        max-width: 480px;
        min-height: auto;
        margin: 2rem 0;
    }
    .right-panel {
        padding: 40px 30px;
    }
    .title{
        font-size: 2.2rem;
    }
    .title span{
        font-size: 1.8rem;
    }
}

/* --- Botão PWA --- */
.pwa-button {
    width: 100%;
    padding: 15px;
    margin-top: 20px;
    border: none;
    border-radius: 10px;
    background: var(--gradient);
    background-size: 200% auto;
    color: var(--white-color);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;              /* garante alinhamento do ícone + texto */
    align-items: center;
    justify-content: center;
    gap: 10px;                  /* espaço entre ícone e texto */
    transition: all 0.4s ease-in-out;
}

.pwa-button:hover {
    background-position: right center;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -10px rgba(0, 123, 255, 0.5);
}

