/* =========================================================================
   SISTEMA DE DESIGN BRIODOCS - TELA DE LOGIN PREMIUM
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --brand-red: #8B0000;
    --brand-red-hover: #a30000;
    --bg-page: #f0f2f5;
    --white: #ffffff;
    --text-dark: #1e293b;
    --text-gray: #64748b;
    --border-ui: #e2e8f0;
    --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.08);
}

/* =========================================================================
   RESET E BACKGROUND
   ========================================================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.modern-login-body {
    font-family: 'Inter', sans-serif !important;
    background-color: var(--bg-page);
    background-image: radial-gradient(circle at top right, rgba(139, 0, 0, 0.03) 0%, transparent 40%),
        radial-gradient(circle at bottom left, rgba(15, 23, 42, 0.03) 0%, transparent 40%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Alertas flutuantes no topo da tela */
.login-alerts-wrapper {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 450px;
    z-index: 1000;
    padding: 0 20px;
}

/* =========================================================================
   CONTAINER DO LOGIN (CARD)
   ========================================================================= */
.login-page-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.modern-login-card {
    background: var(--white);
    width: 100%;
    max-width: 450px;
    border-radius: 20px;
    padding: 50px 40px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-top: 6px solid var(--brand-red);
    /* Detalhe premium da marca */
}

/* =========================================================================
   CABEÇALHO E LOGO
   ========================================================================= */
.login-header {
    text-align: center;
    margin-bottom: 35px;
}

.login-logo-img {
    height: 55px;
    object-fit: contain;
    margin-bottom: 25px;
}

.login-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.login-subtitle {
    font-size: 0.95rem;
    color: var(--text-gray);
    font-weight: 400;
}

/* =========================================================================
   FORMULÁRIO E CAMPOS DO DJANGO
   ========================================================================= */
.form-fields-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modern-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modern-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* O segredo: Estilizando o input que o Django gera automaticamente */
.input-wrapper-inner input,
.input-wrapper-inner select {
    width: 100%;
    height: 54px;
    padding: 0 15px;
    border-radius: 12px;
    border: 1px solid var(--border-ui);
    background-color: #f8fafc;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.input-wrapper-inner input:focus {
    outline: none;
    border-color: var(--brand-red);
    background-color: var(--white);
    box-shadow: 0 0 0 4px rgba(139, 0, 0, 0.1);
}

.input-wrapper-inner input::placeholder {
    color: #94a3b8;
}

.modern-error-text {
    font-size: 0.8rem;
    color: #ef4444;
    /* Vermelho erro */
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.modern-error-text::before {
    content: "⚠️";
    font-size: 0.9rem;
}

/* =========================================================================
   AÇÕES (RECUPERAR SENHA E BOTÃO)
   ========================================================================= */
.form-actions-container {
    display: flex;
    justify-content: flex-end;
    margin-top: 5px;
    margin-bottom: 30px;
}

.modern-forgot-password {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-gray);
    text-decoration: none;
    transition: color 0.2s ease;
}

.modern-forgot-password:hover {
    color: var(--brand-red);
    text-decoration: underline;
}

.modern-btn-login {
    width: 100%;
    height: 54px;
    background-color: var(--brand-red);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.modern-btn-login:hover {
    background-color: var(--brand-red-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 0, 0, 0.2);
}

.modern-btn-login:active {
    transform: translateY(0);
}

/* =========================================================================
   RODAPÉ
   ========================================================================= */
.login-footer {
    margin-top: 30px;
    text-align: center;
}

.login-footer p {
    font-size: 0.85rem;
    color: #94a3b8;
    font-weight: 500;
}

/* =========================================================================
   RESPONSIVIDADE (MOBILE)
   ========================================================================= */
@media (max-width: 480px) {
    .modern-login-card {
        padding: 40px 25px;
        border-radius: 16px;
    }

    .login-title {
        font-size: 1.4rem;
    }

    .input-wrapper-inner input {
        height: 50px;
    }

    .modern-btn-login {
        height: 50px;
    }
}