/* ===== SL Brasil — Login ===== */
:root {
    --brand: #003D8F;
    --brand-dark: #002a63;
    --brand-light: #1e63c9;
    --accent: #38d39f;
    --text: #1f2a3d;
    --muted: #8a94a6;
    --field-bg: #f4f7fb;
    --field-border: #e2e8f2;
    --white: #ffffff;
}

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

html, body {
    height: 100%;
}

body {
    font-family: 'Poppins', 'Source Sans Pro', sans-serif;
    background: #eef2f8;
    color: var(--text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow-x: hidden;
}

/* legacy element kept hidden */
.wave { display: none; }

/* ===== Card wrapper ===== */
.container {
    width: 100%;
    max-width: 960px;
    min-height: 560px;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    background: var(--white);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 30px 70px -20px rgba(0, 61, 143, 0.35),
                0 10px 30px -15px rgba(0, 0, 0, 0.15);
    animation: rise .7s cubic-bezier(.2, .8, .2, 1) both;
}

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

/* ===== Left brand panel ===== */
.img {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    padding: 48px 40px;
    background: linear-gradient(155deg, var(--brand) 0%, var(--brand-dark) 65%, #001a40 100%);
    overflow: hidden;
    text-align: center;
}

/* decorative glows */
.img::before,
.img::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    opacity: .5;
}
.img::before {
    width: 340px;
    height: 340px;
    top: -120px;
    right: -120px;
    background: radial-gradient(circle at center, rgba(56, 211, 159, .55), transparent 70%);
}
.img::after {
    width: 300px;
    height: 300px;
    bottom: -120px;
    left: -100px;
    background: radial-gradient(circle at center, rgba(30, 99, 201, .6), transparent 70%);
}

.img img {
    position: relative;
    width: 240px;
    max-width: 80%;
    background: #fff;
    padding: 22px 26px;
    border-radius: 16px;
    box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .55);
    z-index: 1;
    animation: floaty 5s ease-in-out infinite;
}

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

.img .brand-tagline {
    position: relative;
    z-index: 1;
    color: rgba(255, 255, 255, .92);
}
.img .brand-tagline h4 {
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: .3px;
    margin-bottom: 8px;
}
.img .brand-tagline span {
    font-size: .92rem;
    font-weight: 300;
    color: rgba(255, 255, 255, .7);
    line-height: 1.5;
    display: block;
    max-width: 280px;
    margin: 0 auto;
}

/* ===== Right form panel ===== */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 52px;
}

form {
    width: 100%;
    max-width: 340px;
    text-align: left;
}

form h3 {
    font-size: 1.9rem;
    font-weight: 600;
    color: var(--text);
}

form > p {
    color: var(--muted);
    font-size: .95rem;
    margin-top: 4px;
    margin-bottom: 4px;
}

form br { display: none; }

/* ===== Alert ===== */
.login-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fdecec;
    border: 1px solid #f6c9c9;
    color: #b42318;
    font-size: .88rem;
    line-height: 1.35;
    animation: rise .35s ease both;
}
.login-alert i {
    font-size: 1rem;
    flex-shrink: 0;
}

/* ===== Inputs ===== */
.input-div {
    position: relative;
    display: block;
    margin: 22px 0;
    padding: 0;
    border: none;
}
.input-div:after,
.input-div:before { display: none; }

.input-div .i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    z-index: 2;
    pointer-events: none;
}
.input-div .i i {
    color: var(--muted);
    font-size: 1rem;
    transition: color .25s;
}

.input-div > div {
    position: relative;
    height: auto;
}

/* floating label */
.input-div > div h5 {
    position: absolute;
    left: 46px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: .95rem;
    font-weight: 400;
    pointer-events: none;
    transition: .2s ease;
    background: transparent;
    padding: 0 4px;
}

.input {
    position: relative;
    width: 100%;
    height: 54px;
    border: 1.6px solid var(--field-border);
    border-radius: 12px;
    outline: none;
    background: var(--field-bg);
    padding: 0.9rem 0.9rem 0.9rem 46px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text);
    transition: border-color .25s, background .25s, box-shadow .25s;
}

.input::placeholder { color: transparent; }

.input:focus {
    border-color: var(--brand);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(0, 61, 143, .12);
}

/* float the label when focused or filled */
.input:focus ~ h5,
.input:not(:placeholder-shown) ~ h5 {
    top: -1px;
    left: 40px;
    font-size: .74rem;
    font-weight: 600;
    color: var(--brand);
    background: var(--white);
}

.input:focus + .i i,
.input-div:focus-within > .i i {
    color: var(--brand);
}

/* password toggle */
.toggle-pass {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    cursor: pointer;
    font-size: 1rem;
    z-index: 3;
    transition: color .2s;
}
.toggle-pass:hover { color: var(--brand); }

/* ===== Button ===== */
.btn {
    display: block;
    width: 100%;
    height: 54px;
    border-radius: 12px;
    margin: 26px 0 0;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: .3px;
    outline: none;
    border: none;
    background: linear-gradient(to right, var(--brand), var(--brand-light), var(--brand));
    background-size: 200%;
    cursor: pointer;
    color: var(--white) !important;
    font-family: inherit;
    box-shadow: 0 12px 24px -10px rgba(0, 61, 143, .7);
    transition: background-position .5s, transform .15s, box-shadow .25s;
}
.btn:hover {
    background-position: right;
    box-shadow: 0 16px 30px -10px rgba(0, 61, 143, .8);
}
.btn:active { transform: translateY(1px); }

/* ===== Responsive ===== */
@media screen and (max-width: 860px) {
    .container {
        grid-template-columns: 1fr;
        max-width: 440px;
        min-height: auto;
    }
    .img {
        padding: 40px 32px;
    }
    .img img { width: 190px; }
    .img .brand-tagline { display: none; }
    .login-container { padding: 40px 32px; }
}

@media screen and (max-width: 480px) {
    body { padding: 12px; }
    .container { border-radius: 18px; }
    .login-container { padding: 32px 24px; }
    .img { padding: 32px 24px; }
}
