
/* =========================================================
   LOGIN — login.php
   ========================================================= */

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

body {
    background: #0d0f18;
    color: #fff;
    font-family: 'Roboto', Arial, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

/* =========================================================
   LAYOUT (2 colunas no desktop)
   ========================================================= */
.login-main {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    padding-top: 80px;
}

.login-section {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: calc(100vh - 80px);
}

/* =========================================================
   COLUNA ESQUERDA — BRANDING
   ========================================================= */
.login-brand {
    position: relative;
    padding: 60px 56px;
    display: flex;
    align-items: center;
    background:
        radial-gradient(circle at 30% 20%, rgba(229, 9, 20, 0.15) 0%, transparent 60%),
        linear-gradient(135deg, #1a1c2b 0%, #0d0f18 100%);
    overflow: hidden;
}

.login-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(circle at center, black 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(circle at center, black 30%, transparent 80%);
    pointer-events: none;
}

.login-brand::after {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(229, 9, 20, 0.2) 0%, transparent 70%);
    filter: blur(40px);
    pointer-events: none;
}

.brand-content {
    position: relative;
    z-index: 1;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.brand-logo img {
    width: 90px;
    height: auto;
    filter: drop-shadow(0 4px 20px rgba(229, 9, 20, 0.4));
}

.brand-title {
    color: #fff;
    font-size: 3em;
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -1.5px;
    margin: 0;
}

.brand-title-highlight {
    background: linear-gradient(135deg, #e50914, #ff3d47);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.brand-subtitle {
    color: #b8b9c4;
    font-size: 1.05em;
    line-height: 1.65;
    margin: 0;
    max-width: 460px;
}

.brand-benefits {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.brand-benefits li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.brand-benefits li:hover {
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(229, 9, 20, 0.3);
}

.brand-benefit-icon {
    font-size: 1.5em;
    line-height: 1;
    flex-shrink: 0;
    filter: drop-shadow(0 0 8px rgba(229, 9, 20, 0.4));
}

.brand-benefits li div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-benefits strong {
    color: #fff;
    font-size: 0.95em;
    font-weight: 700;
}

.brand-benefits small {
    color: #9a9caa;
    font-size: 0.82em;
    line-height: 1.4;
}

/* =========================================================
   COLUNA DIREITA — FORMULÁRIO
   ========================================================= */
.login-container {
    padding: 60px 56px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #0d0f18;
    overflow-y: auto;
}

.login-header {
    margin-bottom: 32px;
}

.login-header h2 {
    color: #fff;
    font-size: 2em;
    font-weight: 900;
    letter-spacing: -0.7px;
    margin: 0 0 6px;
}

.login-header p {
    color: #9a9caa;
    font-size: 0.95em;
    margin: 0;
}

/* =========================================================
   ALERTAS
   ========================================================= */
.alert-success,
.alert-error {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    margin-bottom: 20px;
    border-radius: 12px;
    font-size: 0.92em;
    font-weight: 600;
    animation: slideInAlert 0.4s cubic-bezier(.2,.9,.3,1.2);
}

@keyframes slideInAlert {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}

.alert-success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(74, 222, 128, 0.1));
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #4ade80;
}

.alert-error {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.15), rgba(239, 68, 68, 0.1));
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #ff6b72;
    animation: slideInAlert 0.4s ease, shake 0.4s ease 0.4s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.alert-success svg,
.alert-error svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.alert-error svg { color: #ff5259; }

/* =========================================================
   FORMULÁRIO
   ========================================================= */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #c9cad4;
    font-size: 0.85em;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.form-group label svg {
    width: 16px;
    height: 16px;
    color: #ff5259;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(20, 20, 28, 0.85);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: 0.95em;
    transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
    box-sizing: border-box;
}

.form-group input::placeholder {
    color: #6b6d7a;
}

.form-group input:focus {
    outline: none;
    border-color: #e50914;
    background: rgba(30, 32, 48, 0.95);
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.15);
}

/* Password wrapper */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    padding-right: 48px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #9a9caa;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s ease, color 0.2s ease;
}

.toggle-password:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.toggle-password svg {
    width: 20px;
    height: 20px;
}

/* =========================================================
   BOTÃO SUBMIT
   ========================================================= */
.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 32px;
    margin-top: 8px;
    background: linear-gradient(135deg, #e50914, #ff3d47);
    color: #fff;
    font-family: 'Roboto', Arial, sans-serif;
    font-size: 1em;
    font-weight: 800;
    letter-spacing: 0.3px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(229, 9, 20, 0.45);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.25) 50%,
        transparent 100%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.btn-primary:hover::before {
    transform: translateX(100%);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(229, 9, 20, 0.6);
}

.btn-primary:active {
    transform: translateY(-1px) scale(0.98);
}

.btn-primary svg {
    width: 20px;
    height: 20px;
    transition: transform 0.25s ease;
}

.btn-primary:hover svg {
    transform: translateX(4px);
}

/* =========================================================
   FOOTER
   ========================================================= */
.login-footer {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
}

.login-footer p {
    color: #9a9caa;
    font-size: 0.9em;
    margin: 0;
}

.login-footer a {
    color: #ff5259;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s ease;
}

.login-footer a:hover {
    color: #fff;
    text-decoration: underline;
}

.login-about {
    margin-top: 20px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
}

.login-about p {
    color: #9a9caa;
    font-size: 0.82em;
    line-height: 1.6;
    margin: 0;
}

.login-about strong {
    color: #ff5259;
    font-weight: 700;
}

/* =========================================================
   LOGIN — login.php (versão profissional mobile-first)
   ========================================================= */

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

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

body {
    background: #0d0f18;
    color: #fff;
    font-family: 'Roboto', Arial, sans-serif;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* =========================================================
   LAYOUT PRINCIPAL
   ========================================================= */
.login-main {
    width: 100%;
    min-height: 100vh;
    padding-top: 70px; /* espaço pro menu fixo */
}

.login-section {
    width: 100%;
    min-height: calc(100vh - 70px);
    display: flex;
    flex-direction: column; /* mobile-first: 1 coluna */
}

/* Desktop: 2 colunas */
@media (min-width: 1025px) {
    .login-section {
        flex-direction: row;
    }
}

/* =========================================================
   COLUNA ESQUERDA — BRANDING
   ========================================================= */
.login-brand {
    position: relative;
    width: 100%;
    padding: 24px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 30% 20%, rgba(229, 9, 20, 0.12) 0%, transparent 60%),
        linear-gradient(135deg, #1a1c2b 0%, #0d0f18 100%);
    overflow: hidden;
    flex-shrink: 0;
}

/* Desktop: 50% da largura, padding maior */
@media (min-width: 1025px) {
    .login-brand {
        width: 50%;
        padding: 60px 56px;
        min-height: calc(100vh - 70px);
    }
}

/* Decoração apenas no desktop */
@media (min-width: 1025px) {
    .login-brand::before {
        content: '';
        position: absolute;
        inset: 0;
        background-image:
            linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
            linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
        background-size: 50px 50px;
        mask-image: radial-gradient(circle at center, black 30%, transparent 80%);
        -webkit-mask-image: radial-gradient(circle at center, black 30%, transparent 80%);
        pointer-events: none;
    }

    .login-brand::after {
        content: '';
        position: absolute;
        top: -100px;
        right: -100px;
        width: 400px;
        height: 400px;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(229, 9, 20, 0.18) 0%, transparent 70%);
        filter: blur(40px);
        pointer-events: none;
    }
}

.brand-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
    text-align: center;
}

@media (min-width: 1025px) {
    .brand-content {
        gap: 32px;
        align-items: flex-start;
        text-align: left;
    }
}

.brand-logo img {
    width: 56px;
    height: auto;
    display: block;
    filter: drop-shadow(0 4px 20px rgba(229, 9, 20, 0.4));
}

@media (min-width: 1025px) {
    .brand-logo img {
        width: 90px;
    }
}

.brand-title {
    color: #fff;
    font-size: 1.5em;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.5px;
    margin: 0;
}

@media (min-width: 1025px) {
    .brand-title {
        font-size: 3em;
        line-height: 1.05;
        letter-spacing: -1.5px;
    }
}

.brand-title-highlight {
    background: linear-gradient(135deg, #e50914, #ff3d47);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.brand-subtitle {
    color: #b8b9c4;
    font-size: 0.85em;
    line-height: 1.5;
    margin: 0;
    max-width: 100%;
}

@media (min-width: 1025px) {
    .brand-subtitle {
        font-size: 1.05em;
        line-height: 1.65;
        max-width: 460px;
    }
}

/* Benefícios — SÓ no desktop */
.brand-benefits {
    display: none;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-direction: column;
    gap: 14px;
}

@media (min-width: 1025px) {
    .brand-benefits {
        display: flex;
        width: 100%;
    }
}

.brand-benefits li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.brand-benefits li:hover {
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(229, 9, 20, 0.3);
}

.brand-benefit-icon {
    font-size: 1.5em;
    line-height: 1;
    flex-shrink: 0;
    filter: drop-shadow(0 0 8px rgba(229, 9, 20, 0.4));
}

.brand-benefits li div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-benefits strong {
    color: #fff;
    font-size: 0.95em;
    font-weight: 700;
}

.brand-benefits small {
    color: #9a9caa;
    font-size: 0.82em;
    line-height: 1.4;
}

/* =========================================================
   COLUNA DIREITA — FORMULÁRIO
   ========================================================= */
.login-container {
    width: 100%;
    padding: 24px 20px 40px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background: #0d0f18;
    flex: 1;
    min-width: 0; /* IMPORTANTE: evita estouro no flex */
}

@media (min-width: 1025px) {
    .login-container {
        padding: 60px 56px;
        justify-content: center;
    }
}

.login-header {
    margin-bottom: 24px;
    width: 100%;
}

@media (min-width: 1025px) {
    .login-header {
        margin-bottom: 32px;
    }
}

.login-header h2 {
    color: #fff;
    font-size: 1.4em;
    font-weight: 900;
    letter-spacing: -0.5px;
    margin: 0 0 6px;
    line-height: 1.2;
}

@media (min-width: 1025px) {
    .login-header h2 {
        font-size: 2em;
        letter-spacing: -0.7px;
    }
}

.login-header p {
    color: #9a9caa;
    font-size: 0.85em;
    margin: 0;
    line-height: 1.4;
}

@media (min-width: 1025px) {
    .login-header p {
        font-size: 0.95em;
    }
}

/* =========================================================
   ALERTAS
   ========================================================= */
.alert-success,
.alert-error {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 12px;
    font-size: 0.88em;
    font-weight: 600;
    width: 100%;
    animation: slideInAlert 0.4s cubic-bezier(.2,.9,.3,1.2);
}

@keyframes slideInAlert {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}

.alert-success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(74, 222, 128, 0.1));
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #4ade80;
}

.alert-error {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.15), rgba(239, 68, 68, 0.1));
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #ff6b72;
    animation: slideInAlert 0.4s ease, shake 0.4s ease 0.4s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.alert-success svg,
.alert-error svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.alert-error svg { color: #ff5259; }

/* =========================================================
   FORMULÁRIO
   ========================================================= */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

@media (min-width: 1025px) {
    .login-form {
        gap: 20px;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    min-width: 0;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #c9cad4;
    font-size: 0.78em;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

@media (min-width: 1025px) {
    .form-group label {
        font-size: 0.85em;
    }
}

.form-group label svg {
    width: 15px;
    height: 15px;
    color: #ff5259;
    flex-shrink: 0;
}

.form-group input {
    width: 100%;
    max-width: 100%;
    padding: 12px 14px;
    background: rgba(20, 20, 28, 0.85);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: 0.92em;
    transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
    -webkit-appearance: none;
    appearance: none;
}

@media (min-width: 1025px) {
    .form-group input {
        padding: 14px 16px;
        font-size: 0.95em;
        border-radius: 12px;
    }
}

.form-group input::placeholder {
    color: #6b6d7a;
}

.form-group input:focus {
    outline: none;
    border-color: #e50914;
    background: rgba(30, 32, 48, 0.95);
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.15);
}

/* Password wrapper */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.password-wrapper input {
    padding-right: 48px;
}

.toggle-password {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #9a9caa;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background 0.2s ease, color 0.2s ease;
}

.toggle-password:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.toggle-password svg {
    width: 18px;
    height: 18px;
}

/* =========================================================
   BOTÃO SUBMIT
   ========================================================= */
.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 24px;
    margin-top: 8px;
    background: linear-gradient(135deg, #e50914, #ff3d47);
    color: #fff;
    font-family: 'Roboto', Arial, sans-serif;
    font-size: 0.95em;
    font-weight: 800;
    letter-spacing: 0.3px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 10px 26px rgba(229, 9, 20, 0.4);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

@media (min-width: 1025px) {
    .btn-primary {
        padding: 16px 32px;
        font-size: 1em;
        border-radius: 12px;
        box-shadow: 0 12px 30px rgba(229, 9, 20, 0.45);
    }
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.25) 50%,
        transparent 100%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.btn-primary:hover::before {
    transform: translateX(100%);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(229, 9, 20, 0.55);
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
}

.btn-primary svg {
    width: 18px;
    height: 18px;
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.btn-primary:hover svg {
    transform: translateX(4px);
}

/* =========================================================
   FOOTER DO FORM
   ========================================================= */
.login-footer {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
    width: 100%;
}

@media (min-width: 1025px) {
    .login-footer {
        margin-top: 24px;
        padding-top: 20px;
    }
}

.login-footer p {
    color: #9a9caa;
    font-size: 0.85em;
    margin: 0;
    line-height: 1.4;
}

.login-footer a {
    color: #ff5259;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s ease;
}

.login-footer a:hover {
    color: #fff;
    text-decoration: underline;
}

.login-about {
    margin-top: 16px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    width: 100%;
}

@media (min-width: 1025px) {
    .login-about {
        margin-top: 20px;
        padding: 16px 20px;
        border-radius: 12px;
    }
}

.login-about p {
    color: #9a9caa;
    font-size: 0.78em;
    line-height: 1.5;
    margin: 0;
}

@media (min-width: 1025px) {
    .login-about p {
        font-size: 0.82em;
        line-height: 1.6;
    }
}

.login-about strong {
    color: #ff5259;
    font-weight: 700;
}