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

body {
    margin: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #f0f4f8;
}

/* ── WRAPPER ── */
.login-wrapper {
    min-height: 100vh;
    display: flex;
}

/* ── PAINEL ESQUERDO (marca) ── */
.login-brand {
    flex: 0 0 45%;
    background: linear-gradient(145deg, #1a3a5c 0%, #1e5799 50%, #2bc4a4 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 48px;
    position: relative;
    overflow: hidden;
}

.login-brand::before {
    content: '';
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    top: -120px;
    left: -100px;
}

.login-brand::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    bottom: -80px;
    right: -80px;
}

.brand-logo {
    width: 100px;
    height: auto;
    margin-bottom: 28px;
    filter: drop-shadow(0 4px 16px rgba(0,0,0,0.3));
    position: relative;
    z-index: 1;
}

.brand-title {
    font-size: 36px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 12px;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
}

.brand-subtitle {
    font-size: 15px;
    color: rgba(255,255,255,0.75);
    text-align: center;
    line-height: 1.6;
    max-width: 280px;
    position: relative;
    z-index: 1;
}

.brand-badge {
    margin-top: 48px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50px;
    padding: 8px 20px;
    font-size: 13px;
    color: rgba(255,255,255,0.85);
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2bc4a4;
    display: inline-block;
    box-shadow: 0 0 0 3px rgba(43,196,164,0.3);
}

/* ── PAINEL DIREITO (formulário) ── */
.login-form-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    background: #f8fafc;
}

.login-card {
    width: 100%;
    max-width: 400px;
}

.login-card-title {
    font-size: 26px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px;
}

.login-card-subtitle {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 32px;
}

/* ── CAMPOS ── */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.form-control {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    background: #ffffff;
    font-size: 15px;
    color: #0f172a;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}

.form-control::placeholder {
    color: #cbd5e1;
}

/* ── BOTÃO LOGIN ── */
.btn-login {
    width: 100%;
    padding: 13px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 12px rgba(37,99,235,0.35);
    letter-spacing: 0.3px;
    margin-top: 8px;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(37,99,235,0.4);
}

.btn-login:active {
    transform: translateY(0);
}

/* ── DIVIDER ── */
.login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    color: #94a3b8;
    font-size: 13px;
}

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

.register-link {
    text-align: center;
    font-size: 14px;
    color: #64748b;
}

.register-link a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.register-link a:hover {
    text-decoration: underline;
}

/* ── ESTADO LOGADO ── */
.logged-in-box {
    text-align: center;
}

.logged-in-box p {
    color: #374151;
    font-size: 15px;
    margin-bottom: 24px;
    line-height: 1.6;
}

.logged-in-box strong {
    color: #0f172a;
    font-weight: 700;
}

.logged-in-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-auth-secondary,
.btn-auth-danger {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all .2s ease;
    min-width: 150px;
}

.btn-auth-secondary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(37,99,235,0.3);
}

.btn-auth-secondary:hover {
    box-shadow: 0 5px 16px rgba(37,99,235,0.4);
    transform: translateY(-1px);
    color: #fff;
}

.btn-auth-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(220,38,38,0.3);
}

.btn-auth-danger:hover {
    box-shadow: 0 5px 16px rgba(220,38,38,0.4);
    transform: translateY(-1px);
}

/* ── MOBILE HEADER ── */
.login-mobile-header {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 28px;
}

.login-mobile-header img {
    width: 40px;
    height: auto;
}

.login-mobile-header span {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.5px;
}

/* ── RESPONSIVO ── */
@media (max-width: 768px) {
    .login-brand {
        display: none;
    }

    .login-form-panel {
        padding: 40px 24px;
        align-items: center;
    }

    .login-card {
        text-align: center;
    }

    .login-card-title,
    .login-card-subtitle {
        text-align: center;
    }

    .form-label {
        text-align: left;
        display: block;
    }

    .register-link,
    .login-divider {
        text-align: center;
    }

    .login-mobile-header {
        display: flex;
    }
}
