/* app/static/css/Login.css - Identidade Visual Falai */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

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

body {
    font-family: 'Poppins', 'Roboto', sans-serif;
    background: linear-gradient(135deg, #19bacb 0%, #0d8a96 40%, #0a6e78 70%, #084d54 100%);
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
}

/* ============================================
   LAYOUT PRINCIPAL - DUAS COLUNAS
   ============================================ */

.login-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Lado esquerdo - Branding */
.login-brand {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.brand-content {
    text-align: center;
    z-index: 2;
}

/* Logo faLai estilizado */
.logo-falai {
    font-size: 72px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -2px;
    margin-bottom: 10px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.logo-fa {
    color: #fff;
}

.logo-L {
    color: #fff;
    text-transform: uppercase;
}

.logo-ai {
    color: #fff;
}

.logo-acento {
    position: relative;
}

.logo-acento::after {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
}

.brand-subtitle {
    font-size: 14px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 8px;
    text-transform: uppercase;
    margin-bottom: 30px;
}

.brand-divider {
    width: 60px;
    height: 3px;
    background: rgba(255, 255, 255, 0.4);
    margin: 0 auto 25px;
    border-radius: 2px;
}

.brand-tagline {
    font-size: 18px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
}

/* Circulos decorativos animados */
.brand-decoration {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    overflow: hidden;
}

.circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
}

.circle-1 {
    width: 300px;
    height: 300px;
    top: -80px;
    left: -80px;
    animation: floatCircle 8s ease-in-out infinite;
}

.circle-2 {
    width: 200px;
    height: 200px;
    bottom: 10%;
    right: -50px;
    animation: floatCircle 6s ease-in-out infinite reverse;
}

.circle-3 {
    width: 150px;
    height: 150px;
    bottom: 30%;
    left: 10%;
    animation: floatCircle 10s ease-in-out infinite 1s;
}

@keyframes floatCircle {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-25px) scale(1.08);
        opacity: 1;
    }
}

/* ============================================
   LADO DIREITO - FORMULARIO
   ============================================ */

.login-form-side {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    background: rgba(255, 255, 255, 0.03);
}

.login-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    padding: 45px 40px;
    width: 100%;
    max-width: 420px;
    position: relative;
}

/* Header do card */
.login-header {
    text-align: center;
    margin-bottom: 35px;
}

.login-header h2 {
    color: #1a1a2e;
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 8px;
}

.login-header p {
    color: #6c757d;
    font-size: 14px;
    font-weight: 400;
    margin: 0;
}

/* ============================================
   ALERTA DE ERRO
   ============================================ */

.alert-login {
    background: linear-gradient(135deg, #fff5f5 0%, #fee2e2 100%);
    border: 1px solid #fecaca;
    border-left: 4px solid #dc3545;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease;
}

.alert-login i {
    color: #dc3545;
    font-size: 18px;
}

.alert-login span {
    color: #991b1b;
    font-size: 13px;
    font-weight: 500;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   CAMPOS DE INPUT
   ============================================ */

.input-group-login {
    margin-bottom: 22px;
}

.input-group-login label {
    display: block;
    color: #4a4a5a;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper > i {
    position: absolute;
    left: 14px;
    color: #9ca3af;
    font-size: 16px;
    z-index: 1;
    transition: color 0.3s ease;
}

.input-wrapper input {
    width: 100%;
    padding: 13px 14px 13px 42px;
    border: 2px solid #e8e8ef;
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Poppins', 'Roboto', sans-serif;
    background: #fafafa;
    color: #333;
    transition: all 0.3s ease;
}

.input-wrapper input:focus {
    border-color: #19bacb;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(25, 186, 203, 0.12);
    outline: none;
}

.input-wrapper input:focus + i,
.input-wrapper:focus-within > i:first-child {
    color: #19bacb;
}

.input-wrapper input::placeholder {
    color: #b0b0be;
    font-weight: 300;
}

/* Efeito de erro nos inputs */
.input-wrapper input.input-error {
    animation: shake 0.5s ease;
    border-color: #dc3545;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

/* Botao toggle senha */
.btn-toggle-senha {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    color: #9ca3af;
    transition: color 0.3s ease;
}

.btn-toggle-senha:hover {
    color: #19bacb;
}

.btn-toggle-senha:focus {
    outline: none;
}

/* ============================================
   BOTAO DE LOGIN
   ============================================ */

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #19bacb, #0d8a96);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Poppins', 'Roboto', sans-serif;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50px;
}

.btn-login:hover:not(:disabled) {
    background: linear-gradient(135deg, #15a8b8, #0b7a85);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(25, 186, 203, 0.4);
}

.btn-login:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(25, 186, 203, 0.3);
}

.btn-login:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(25, 186, 203, 0.25);
}

.btn-login:disabled {
    cursor: not-allowed;
    opacity: 0.85;
}

.btn-login-text {
    display: inline-block;
}

.btn-login-loading {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Spinner do botao */
.spinner-btn {
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   FOOTER DO CARD
   ============================================ */

.login-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e8e8ef;
}

.footer-text {
    color: #9ca3af;
    font-size: 12px;
    font-weight: 400;
}

/* ============================================
   RESPONSIVIDADE
   ============================================ */

@media (max-width: 992px) {
    .login-wrapper {
        flex-direction: column;
    }

    .login-brand {
        padding: 40px 20px;
        min-height: auto;
    }

    .logo-falai {
        font-size: 56px;
    }

    .brand-subtitle {
        font-size: 12px;
        letter-spacing: 6px;
    }

    .brand-tagline {
        font-size: 16px;
    }

    .circle-1 {
        width: 200px;
        height: 200px;
        top: -50px;
        left: -50px;
    }

    .circle-2 {
        width: 150px;
        height: 150px;
    }

    .circle-3 {
        display: none;
    }

    .login-form-side {
        padding: 30px 20px 50px;
    }

    .login-card {
        padding: 35px 25px;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .logo-falai {
        font-size: 48px;
    }

    .brand-subtitle {
        font-size: 11px;
        letter-spacing: 4px;
    }

    .brand-tagline {
        font-size: 14px;
    }

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

    .login-card {
        padding: 30px 20px;
        border-radius: 12px;
    }

    .input-wrapper input {
        padding: 12px 12px 12px 40px;
        font-size: 14px;
    }

    .btn-login {
        padding: 13px;
        font-size: 14px;
    }
}

/* ============================================
   SUPORTE PARA TEMAS ESCUROS DO SISTEMA
   ============================================ */

@media (prefers-color-scheme: dark) {
    .login-card {
        background: #fff;
    }
}
