/**
 * Santa Boca — Estilos da Tela de Login
 * Layout moderno com logo flutuante acima do card.
 */

:root {
    --sb-primary: #B71C1C;
    --sb-primary-dark: #7F0000;
    --sb-primary-light: #F05545;
    --sb-gold: #d2ac67;
    --sb-gold-light: #e8cd9a;
    --sb-dark: #1a1a1a;
    --sb-medium: #616161;
    --sb-light: #F5F5F5;
    --sb-white: #FFFFFF;
    --sb-success: #2E7D32;
    --sb-danger: #C62828;
}

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

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--sb-dark);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Fundo decorativo com gradiente e formas */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 20% 50%, rgba(183, 28, 28, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(183, 28, 28, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 60% 80%, rgba(210, 172, 103, 0.1) 0%, transparent 40%);
    animation: bgShift 20s ease-in-out infinite alternate;
    z-index: 0;
}

@keyframes bgShift {
    0%   { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-30px, -20px) rotate(3deg); }
}

/* Wrapper centralizado */
.login-wrapper {
    width: 100%;
    max-width: 420px;
    padding: 20px;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.6s ease-out;
}

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

/* Logo dentro de um recorte do background que "vaza" para dentro do card */
.login-logo {
    text-align: center;
    margin-bottom: -60px;
    position: relative;
    z-index: 2;
}

.login-logo-circle {
    width: 120px;
    height: 120px;
    background: var(--sb-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    position: relative;
    /* Sombra interna para dar profundidade, como se fosse um buraco no card */
    box-shadow:
        inset 0 4px 15px rgba(0, 0, 0, 0.5),
        0 0 0 6px rgba(255, 255, 255, 0.97);
}

/* Gradientes vermelhos dentro do círculo, espelhando o background da página */
.login-logo-circle::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 40%, rgba(183, 28, 28, 0.4) 0%, transparent 60%),
        radial-gradient(circle at 70% 60%, rgba(183, 28, 28, 0.25) 0%, transparent 50%);
    z-index: 0;
}

.login-logo-circle img {
    width: 64px;
    height: 64px;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 2px 8px rgba(210, 172, 103, 0.5));
}

@keyframes logoPulse {
    0%, 100% { filter: drop-shadow(0 2px 8px rgba(210, 172, 103, 0.5)); }
    50%      { filter: drop-shadow(0 2px 15px rgba(210, 172, 103, 0.8)); }
}

/* Card do formulário */
.login-card {
    background: rgba(255, 255, 255, 0.97);
    border-radius: 20px;
    padding: 76px 32px 32px;
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

/* Linha dourada decorativa no topo do card */
.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--sb-primary), var(--sb-gold), var(--sb-primary));
}

/* Header com nome e subtítulo */
.login-header {
    text-align: center;
    margin-bottom: 28px;
}

.login-header h1 {
    font-size: 26px;
    font-weight: 700;
    color: var(--sb-dark);
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.login-subtitle {
    font-size: 13px;
    color: var(--sb-medium);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
}

/* Separador decorativo */
.login-divider {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #E0E0E0, transparent);
}

.login-divider span {
    padding: 0 12px;
    font-size: 11px;
    color: #BDBDBD;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Labels */
.form-label {
    font-weight: 600;
    font-size: 13px;
    color: var(--sb-medium);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-label i {
    color: var(--sb-gold);
}

/* Inputs */
.form-control {
    border: 2px solid #E8E8E8;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 15px;
    transition: all 0.25s ease;
    background: var(--sb-light);
}

.form-control:focus {
    border-color: var(--sb-gold);
    box-shadow: 0 0 0 3px rgba(210, 172, 103, 0.2);
    background: var(--sb-white);
}

.form-control::placeholder {
    color: #C0C0C0;
    font-size: 14px;
}

/* Input group (senha + botão eye) */
.input-group .btn-outline-secondary {
    border: 2px solid #E8E8E8;
    border-left: 0;
    border-radius: 0 12px 12px 0;
    color: var(--sb-medium);
    background: var(--sb-light);
    transition: all 0.25s ease;
}

.input-group .form-control {
    border-radius: 12px 0 0 12px;
}

.input-group .form-control:focus + .btn-outline-secondary,
.input-group .btn-outline-secondary:hover {
    border-color: var(--sb-gold);
    background: var(--sb-white);
    color: var(--sb-gold);
}

/* Botão de login */
.btn-login {
    background: linear-gradient(135deg, var(--sb-primary), var(--sb-primary-dark));
    border: none;
    color: var(--sb-white);
    font-weight: 600;
    font-size: 15px;
    border-radius: 12px;
    padding: 14px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.btn-login::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
}

.btn-login:hover {
    background: linear-gradient(135deg, var(--sb-primary-dark), #5D0000);
    color: var(--sb-white);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(183, 28, 28, 0.4);
}

.btn-login:hover::after {
    left: 100%;
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(183, 28, 28, 0.3);
}

/* Alerts */
.alert {
    border-radius: 12px;
    font-size: 14px;
    border: none;
}

.alert-danger {
    background: #FFEBEE;
    color: var(--sb-danger);
}

.alert-success {
    background: #E8F5E9;
    color: var(--sb-success);
}

/* Footer */
.login-footer {
    text-align: center;
    margin-top: 24px;
    color: rgba(255, 255, 255, 0.35);
    font-size: 12px;
}

/* Responsividade */
@media (max-width: 480px) {
    .login-wrapper {
        padding: 12px;
    }

    .login-card {
        padding: 64px 20px 24px;
        border-radius: 16px;
    }

    .login-logo-circle {
        width: 100px;
        height: 100px;
    }

    .login-logo-circle img {
        width: 52px;
        height: 52px;
    }

    .login-logo {
        margin-bottom: -50px;
    }

    .login-header h1 {
        font-size: 22px;
    }
}
