:root {
    --gold-1: #f5df9b;
    --gold-2: #d8a63a;
    --gold-3: #9a6518;

    --red-1: #c1121f;
    --red-2: #7d0f17;
    --red-3: #4c070d;

    --dark-1: #050505;
    --dark-2: #0d0d0f;
    --dark-3: #17171b;

    --white-soft: #f7f1e3;
    --text-soft: #d7c7ab;
    --border-gold: rgba(245, 223, 155, 0.20);
    --glass: rgba(255, 255, 255, 0.06);
}

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

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(193, 18, 31, 0.20), transparent 30%),
        radial-gradient(circle at bottom right, rgba(216, 166, 58, 0.14), transparent 30%),
        linear-gradient(135deg, #040404 0%, #0b0b0d 40%, #120509 70%, #040404 100%);
    color: var(--white-soft);
    min-height: 100vh;
    overflow-x: hidden;
}

.login-page {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    padding: 30px 0;
}

/* Fundo animado */
.bg-animated {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.bg-animated span {
    position: absolute;
    display: block;
    border-radius: 50%;
    filter: blur(70px);
    animation: floatGlow 10s infinite ease-in-out;
}

.bg-animated span:nth-child(1) {
    width: 220px;
    height: 220px;
    background: rgba(193, 18, 31, 0.18);
    top: 10%;
    left: 6%;
}

.bg-animated span:nth-child(2) {
    width: 260px;
    height: 260px;
    background: rgba(216, 166, 58, 0.12);
    bottom: 12%;
    right: 8%;
    animation-delay: 1.5s;
}

.bg-animated span:nth-child(3) {
    width: 180px;
    height: 180px;
    background: rgba(255, 215, 120, 0.10);
    top: 55%;
    left: 20%;
    animation-delay: 3s;
}

.bg-animated span:nth-child(4) {
    width: 160px;
    height: 160px;
    background: rgba(160, 20, 35, 0.18);
    top: 18%;
    right: 18%;
    animation-delay: 2.4s;
}

@keyframes floatGlow {
    0%, 100% {
        transform: translateY(0px) translateX(0px) scale(1);
    }
    50% {
        transform: translateY(-18px) translateX(10px) scale(1.06);
    }
}

/* Shell duas colunas */
.login-shell {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    min-height: 650px;
    border-radius: 30px;
    overflow: hidden;
    border: 1px solid rgba(245, 223, 155, 0.12);
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.55),
        0 0 20px rgba(216, 166, 58, 0.08);
}

/* Lado esquerdo */
.login-left {
    position: relative;
    padding: 50px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)),
        linear-gradient(135deg, rgba(90, 8, 16, 0.70), rgba(20, 20, 20, 0.78));
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-left::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(245, 223, 155, 0.06), transparent 35%),
        linear-gradient(315deg, rgba(193, 18, 31, 0.08), transparent 35%);
    pointer-events: none;
}

.brand-box {
    position: relative;
    z-index: 2;
    max-width: 520px;
}

/* NOVO: centraliza logo + título */
.brand-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 14px;
}

.brand-logo {
    max-width: 360px;
    width: 100%;
    display: block;
    margin: 0 auto 20px auto;
    filter: drop-shadow(0 0 18px rgba(216, 166, 58, 0.25));
}

.brand-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0;
    text-align: center;
    background: linear-gradient(180deg, #fff4cc 0%, #f1cf76 45%, #cc8b20 100%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.brand-title span {
    display: block;
    margin-top: 2px;
}

.brand-text {
    color: var(--text-soft);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 30px;
    text-align: center;
}

.brand-badges {
    display: grid;
    gap: 14px;
}

.badge-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(245, 223, 155, 0.10);
    border-radius: 16px;
    color: #f2e6cb;
}

.badge-item i {
    color: var(--gold-1);
    font-size: 1rem;
}

/* Lado direito */
.login-right {
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01)),
        rgba(8, 8, 10, 0.55);
}

.login-card {
    width: 100%;
    max-width: 430px;
    padding: 35px 30px;
    border-radius: 26px;
    background: rgba(12, 12, 14, 0.56);
    border: 1px solid var(--border-gold);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.04),
        0 16px 35px rgba(0,0,0,0.35);
    position: relative;
}

.login-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 26px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(245, 223, 155, 0.6), rgba(255,255,255,0.02), rgba(193, 18, 31, 0.25));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.login-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(180deg, #fff6d8 0%, #efc866 55%, #c7891f 100%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.login-subtitle {
    color: var(--text-soft);
    margin: 0;
}

.form-label {
    font-weight: 600;
    font-size: 0.92rem;
    color: #f0e2c3;
    margin-bottom: 8px;
}

.custom-input-group {
    position: relative;
    display: flex;
    align-items: center;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(245, 223, 155, 0.10);
    transition: 0.3s ease;
}

.custom-input-group:focus-within {
    border-color: rgba(245, 223, 155, 0.48);
    box-shadow: 0 0 0 4px rgba(216, 166, 58, 0.10);
    transform: translateY(-1px);
}

.input-icon {
    width: 54px;
    min-width: 54px;
    text-align: center;
    color: var(--gold-1);
}

.custom-input {
    background: transparent !important;
    border: 0 !important;
    color: #fff !important;
    box-shadow: none !important;
    height: 54px;
    padding-left: 0;
    font-size: 0.98rem;
}

.custom-input::placeholder {
    color: rgba(255,255,255,0.38);
}

.password-toggle {
    width: 54px;
    height: 54px;
    border: 0;
    background: transparent;
    color: #f3d995;
    transition: 0.2s ease;
    cursor: pointer;
}

.password-toggle:hover {
    color: #fff2c9;
}

.btn-login {
    height: 54px;
    border: 0;
    border-radius: 16px;
    font-weight: 800;
    font-size: 1rem;
    color: #2f1a00;
    background: linear-gradient(135deg, #fff2c4 0%, #e2b652 45%, #b77718 100%);
    box-shadow:
        0 12px 24px rgba(183, 119, 24, 0.28),
        inset 0 1px 0 rgba(255,255,255,0.5);
    transition: 0.3s ease;
}

.btn-login:hover {
    transform: translateY(-2px);
    color: #1d1000;
    box-shadow:
        0 16px 28px rgba(183, 119, 24, 0.35),
        0 0 18px rgba(245, 223, 155, 0.12);
}

.login-footer {
    color: rgba(255, 235, 190, 0.58);
    font-size: 0.88rem;
}

.alert-danger {
    background: rgba(193, 18, 31, 0.18);
    border: 1px solid rgba(193, 18, 31, 0.30);
    color: #ffe1e1;
    border-radius: 14px;
}

/* Responsivo */
@media (max-width: 991px) {
    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-left {
        padding: 35px 25px 20px;
    }

    .login-right {
        padding: 20px 25px 35px;
    }

    .brand-logo {
        max-width: 280px;
    }

    .brand-title {
        font-size: 1.65rem;
    }
}

@media (max-width: 576px) {
    .login-page {
        padding: 18px 0;
    }

    .login-shell {
        border-radius: 22px;
    }

    .login-left,
    .login-right {
        padding-left: 18px;
        padding-right: 18px;
    }

    .login-card {
        padding: 26px 18px;
        border-radius: 20px;
    }

    .brand-title {
        font-size: 1.35rem;
    }

    .login-title {
        font-size: 1.45rem;
    }
}