/*
 * Tela de login da marca Smart (domínio des.netlab.com.br — ver config/portal.php).
 * Carregado depois de login.css, então só sobrescreve o que muda.
 *
 * Cores tiradas dos logos:
 *   --smart-red  = vermelho do logo Smart
 *   --des-blue   = azul do logo "d" (des) que balança no painel esquerdo
 *
 * Imagens em public/img/smart/. Para usar uma foto de estabelecimento no
 * lugar da ilustração, troque a url() do "body" abaixo.
 */

:root {
    --smart-red: #ff3e32;
    --smart-red-light: #ff6a5f;
    --des-blue: #1d4294;
}

body {
    background:
        linear-gradient(rgba(6, 14, 36, 0.25), rgba(6, 14, 36, 0.45)),
        url('../../img/smart/fundo-estabelecimento.svg') center bottom / cover no-repeat;
}

/* ---------- cartão ---------- */
#login-container {
    background-color: #ffffff;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5) !important;
}

#login-container.rounded {
    border-radius: 16px !important;
}

/* ---------- painel esquerdo: logo "d" balançando (3D; <img> balançando em CSS como reserva) ---------- */
#div-canva-login {
    background: linear-gradient(160deg, #ffffff 0%, #eaf0fa 100%);
    border-right: 1px solid #e3e8f2 !important;
    border-radius: 0 !important;
}

.smart-spin-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 900px;
}

/* modelo 3D (js/auth/smart-logo-3d.js): o canvas cobre o painel; a <img> de reserva some */
.smart-3d-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.smart-spin-wrap.is-3d .smart-spin {
    display: none;
}

/* sombra suave embaixo do logo, para ele não parecer solto */
.smart-spin-wrap.is-3d::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 12%;
    width: 42%;
    height: 5%;
    transform: translateX(-50%);
    background: radial-gradient(ellipse at center, rgba(29, 66, 148, 0.28) 0%, rgba(29, 66, 148, 0) 70%);
}

.smart-spin {
    width: 46%;
    height: auto;
    animation: smart-sway 6s ease-in-out infinite;
}

/* balança de um lado para o outro, sem dar a volta (mesmo movimento do modelo 3D) */
@keyframes smart-sway {
    0%, 100% { transform: rotateY(-29deg); }
    50%      { transform: rotateY(29deg); }
}

@media (prefers-reduced-motion: reduce) {
    .smart-spin {
        animation: none;
    }
}

/* ---------- painel direito ---------- */
/* o logo da iMais é largo e estica a coluna; o da Smart não, então a coluna precisa ocupar o espaço que sobra */
#login-area {
    flex: 1 1 auto;
}

.smart-logo {
    width: 150px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 8px 18px rgba(255, 62, 50, 0.35);
}

.smart-link {
    color: var(--des-blue);
}

.form label::after {
    border-bottom-color: var(--des-blue);
}

.form input:focus + .label-name .content-name,
.form input:valid + .label-name .content-name {
    color: var(--des-blue);
}

#login-btn {
    border-color: var(--smart-red);
    background: linear-gradient(to left, var(--smart-red) 50%, var(--smart-red-light) 50%) right;
    background-size: 200% 100%;
}

#login-btn:hover {
    background-position: left !important;
}

/* botão "Ok" dos alertas (o login.css deixa verde) */
.swal2-container .swal2-styled.swal2-confirm {
    background-color: var(--smart-red) !important;
}
