/* =============================================
   STYLE.CSS — Login / Registro (index.php)
   Ícone posicionado no lado DIREITO do input
   (padrão do projeto)
============================================= */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

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

body {
    font-family: 'Poppins', sans-serif;
    background: #f0f0f0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Container ── */
.container {
    position: relative;
    width: 850px;
    height: 550px;
    background: #fff;
    border-radius: 30px;
    box-shadow: 0 0 30px rgba(117,53,0,.18);
    overflow: hidden;
}

/* ── Caixas de formulário ── */
.form-box {
    position: absolute;
    top: 0; bottom: 0;
    width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 36px;
    transition: all .6s ease;
    z-index: 1;
}

.form-box form { width: 100%; }

.form-box h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 24px;
}

/* Posições iniciais */
.form-box.login    { left: 0; }
.form-box.register { left: 50%; opacity: 0; pointer-events: none; }

/* ── Input box — ícone à DIREITA ── */
.input-box {
    position: relative;
    margin-bottom: 18px;
}

.input-box input {
    width: 100%;
    padding: 13px 46px 13px 20px; /* padding-right reserva espaço pro ícone */
    background: #f0f0f0;
    border-radius: 8px;
    border: none;
    outline: none;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    color: #1a1a1a;
    font-weight: 500;
    transition: box-shadow .2s;
}

.input-box input:focus {
    box-shadow: 0 0 0 2px rgba(240,58,0,.30);
}

.input-box input::placeholder {
    color: #aaa;
    font-weight: 400;
}

/* Ícone — direita, centralizado verticalmente */
.input-box i {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #aaa;
    pointer-events: none;
}

/* ── Esqueceu a senha ── */
.forgot-link {
    text-align: right;
    margin-bottom: 20px;
    margin-top: -8px;
}
.forgot-link a {
    font-size: 12px;
    color: #888;
    text-decoration: none;
    transition: color .2s;
}
.forgot-link a:hover { color: #f03a00; }

/* ── Botão ── */
.btn {
    width: 100%;
    padding: 13px 0;
    background: #f03a00;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, transform .15s;
}
.btn:hover  { background: #d63000; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

/* ── Alerta de erro ── */
.alert {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 10px 14px;
    background: rgba(220,50,50,.08);
    border: 1px solid rgba(220,50,50,.25);
    border-radius: 8px;
    font-size: 12px;
    color: #c0392b;
}

/* ── Painel laranja de toggle ── */
.toggle-box {
    position: absolute;
    top: 0; right: 0;
    width: 50%; height: 100%;
    background: linear-gradient(135deg, #f03a00, #ff7043);
    border-radius: 150px 0 0 150px;
    z-index: 2;
    overflow: hidden;
    transition: all .6s ease;
}

.toggle-panel {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 32px;
    text-align: center;
    transition: opacity .4s, transform .6s;
    gap: 12px;
}

.toggle-panel h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
}
.toggle-panel p {
    font-size: 13px;
    color: rgba(255,255,255,.88);
}

.toggle-panel .btn {
    width: auto;
    padding: 10px 32px;
    background: transparent;
    border: 2px solid #fff;
    color: #fff;
    border-radius: 30px;
    font-size: 13px;
    margin-top: 4px;
}
.toggle-panel .btn:hover { background: rgba(255,255,255,.15); }

/* Visibilidade dos painéis */
.toggle-right { opacity: 0; pointer-events: none; }
.toggle-left  { opacity: 1; }

/* ── Estado ativo (mostrando registro) ── */
.container.active .toggle-box {
    right: 50%;
    border-radius: 0 150px 150px 0;
}
.container.active .toggle-left  { opacity: 0; pointer-events: none; }
.container.active .toggle-right { opacity: 1; pointer-events: all; }
.container.active .form-box.login    { opacity: 0; pointer-events: none; }
.container.active .form-box.register { opacity: 1; pointer-events: all; }

/* ── Responsivo ── */
@media (max-width: 768px) {
    body { padding: 20px; align-items: flex-start; padding-top: 40px; }

    .container {
        width: 100%; height: auto;
        border-radius: 18px;
    }

    .form-box {
        position: static;
        width: 100%;
        padding: 36px 24px 28px;
        transition: none;
    }
    .form-box.register { display: none; opacity: 1; pointer-events: all; }

    .container.active .form-box.login    { display: none; }
    .container.active .form-box.register { display: flex; }

    .toggle-box {
        position: static;
        width: 100%;
        height: auto;
        border-radius: 0 0 18px 18px;
        padding: 0;
    }
    .container.active .toggle-box { border-radius: 0 0 18px 18px; }

    .toggle-panel { padding: 28px 24px; position: static; }
    .toggle-right { display: none; opacity: 1; }
    .container.active .toggle-left  { display: none; }
    .container.active .toggle-right { display: flex; }
}