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

/* ============================================
   LOGIN — Monitoramento de Emendas Parlamentares
   Estilo: SaaS corporativo moderno
   ============================================ */

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

body.login-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(99, 102, 241, 0.07), transparent 35%),
        radial-gradient(circle at bottom right, rgba(139, 92, 246, 0.05), transparent 30%),
        #f8fafc;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---- Container ---- */
.login-container {
    width: 100%;
    max-width: 440px;
    animation: fadeInUp 0.35s ease-out;
}

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

/* ---- Card ---- */
.login-card {
    width: 100%;
    padding: 42px 40px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 20px;
    box-shadow:
        0 20px 50px rgba(15, 23, 42, 0.06),
        0 4px 12px rgba(15, 23, 42, 0.03);
}

/* ---- Header / Marca ---- */
.login-brand {
    text-align: center;
    margin-bottom: 28px;
}

.login-brand-name {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 20px;
}

/* ---- Ícone ---- */
.login-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: #4F46E5;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin: 0 auto 20px;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

/* ---- Títulos ---- */
.login-title {
    font-size: 22px;
    font-weight: 700;
    color: #0F172A;
    text-align: center;
    margin-bottom: 6px;
    line-height: 1.3;
}

.login-subtitle {
    font-size: 14px;
    font-weight: 400;
    color: #64748b;
    text-align: center;
    margin-bottom: 32px;
    line-height: 1.5;
}

/* ---- Formulário ---- */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* ---- Grupos de input ---- */
.login-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.login-field label {
    font-size: 13px;
    font-weight: 500;
    color: #334155;
}

.input-wrapper {
    position: relative;
}

.input-wrapper .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 14px;
    pointer-events: none;
    transition: color 0.2s;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #0F172A;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-wrapper input::placeholder {
    color: #94a3b8;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.08);
}

.input-wrapper input:focus + .input-icon,
.input-wrapper input:focus ~ .input-icon {
    color: #4f46e5;
}

/* Senha: ícone à direita */
.input-wrapper.input-password {
    position: relative;
}

.input-wrapper.input-password input {
    padding-right: 42px;
}

.input-wrapper.input-password .input-icon-left {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 14px;
    pointer-events: none;
}

.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #94a3b8;
    font-size: 14px;
    background: none;
    border: none;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.toggle-password:hover {
    color: #4f46e5;
}

/* ---- Linha: Lembrar + Esqueceu ---- */
.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: -2px;
}

.login-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #475569;
    user-select: none;
}

.login-remember input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border: 1.5px solid #d1d5db;
    border-radius: 4px;
    cursor: pointer;
    accent-color: #4f46e5;
}

.login-forgot {
    font-size: 13px;
    font-weight: 500;
    color: #4f46e5;
    text-decoration: none;
    transition: color 0.2s;
}

.login-forgot:hover {
    color: #4338ca;
    text-decoration: underline;
}

/* ---- Botão ---- */
.btn-login {
    width: 100%;
    min-height: 48px;
    border: 0;
    border-radius: 10px;
    background: #4f46e5;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
}

.btn-login:hover {
    background: #4338ca;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.24);
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.18);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-login .spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.btn-login.loading .spinner {
    display: inline-block;
}

.btn-login.loading .btn-text {
    display: none;
}

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

.btn-login .btn-loading-text {
    display: none;
}

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

/* ---- Erro inline ---- */
.login-error {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: #DC2626;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.4;
}

.login-error i {
    flex-shrink: 0;
}

/* ---- Footer ---- */
.login-footer {
    text-align: center;
    margin-top: 24px;
}

.login-footer-text {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.5;
}

.login-footer-brand {
    font-size: 11px;
    font-weight: 500;
    color: #cbd5e1;
    margin-top: 12px;
    letter-spacing: 0.02em;
}

/* ---- Responsivo ---- */
@media (max-width: 480px) {
    .login-card {
        padding: 32px 24px;
        border-radius: 16px;
    }

    .login-title {
        font-size: 20px;
    }

    .login-brand-name {
        font-size: 10px;
    }

    .login-options {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}
