:root {
    --primary: #007bff;
    --primary-hover: #0056b3;
    --dark-bg: #0b0d14;
    --card-bg: rgba(23, 28, 40, 0.85);
    --text-color: #e2e8f0;
    --text-muted: #94a3b8;
    --accent: #38bdf8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* CANVAS DE PARTÍCULAS NO FUNDO */
#canvas-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

/* BOTÃO VOLTAR SITE NO CANTO SUPERIOR */
.btn-back {
    position: absolute;
    top: 25px;
    left: 25px;
    z-index: 10;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px 16px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.btn-back:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(56, 189, 248, 0.08);
}

/* CARD DE LOGIN (GLASSMORPHISM) */
.login-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-card {
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 40px 35px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
}

/* AVATAR DINÂMICO */
.avatar-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.avatar-box {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(11, 13, 20, 0.6);
    border: 2px solid var(--accent);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.3);
    transition: all 0.3s ease;
}

.avatar-box .default-icon {
    font-size: 2.2rem;
    color: var(--accent);
}

.user-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    transition: opacity 0.3s ease-in-out;
}

/* REGRA DE OCULTAÇÃO ESTRITA */
.hidden {
    display: none !important;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header .logo-brand {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.login-header .logo-brand span {
    color: var(--accent);
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* FORMULÁRIO */
.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    color: var(--text-color);
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
    transition: color 0.3s ease;
}

.form-control {
    width: 100%;
    padding: 12px 14px 12px 42px;
    background: rgba(11, 13, 20, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.form-control:focus + i {
    color: var(--accent);
}

/* CHECKBOX LEMBRAR USUÁRIO */
.remember-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin: -6px 0 18px 2px;
}

.remember-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: #94a3b8;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
}

.remember-label:hover {
    color: #e2e8f0;
}

.remember-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: rgba(11, 13, 20, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    cursor: pointer;
    display: grid;
    place-content: center;
    transition: all 0.2s;
}

.remember-checkbox:checked {
    background: #007bff;
    border-color: #38bdf8;
}

.remember-checkbox:checked::before {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 10px;
    color: #fff;
}

.btn-submit {
    width: 100%;
    padding: 13px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn-submit:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.5);
}

/* ALERTAS DE ERRO */
.alert-error {
    background: rgba(220, 53, 69, 0.15);
    border: 1px solid rgba(220, 53, 69, 0.4);
    color: #ff6b6b;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.88rem;
    margin-bottom: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}