/* ============================================================
   login.css — Page de connexion my.bulltio.com
============================================================ */

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-page);
    padding: 20px;
}

.login-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    width: 100%;
    max-width: 420px;
    padding: 40px;
}

/* ── Logo / Brand ── */
.login-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 32px;
}

.login-brand-icon {
    width: 40px;
    height: 40px;
    background: var(--accent-green);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
}

.login-brand-name {
    font-family: var(--font-display);
    font-size: 26px;
    color: var(--text-primary);
}

/* ── Titre ── */
.login-title {
    font-family: var(--font-display);
    font-size: 22px;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 6px;
}

.login-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 28px;
}

/* ── Formulaire ── */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.login-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* ── Mot de passe oublié ── */
.login-forgot {
    font-size: 12px;
    color: var(--accent-green);
    text-align: right;
    margin-top: -10px;
}

.login-forgot:hover {
    opacity: .8;
}

/* ── Bouton submit ── */
.login-btn {
    width: 100%;
    padding: 11px;
    font-size: 15px;
    margin-top: 8px;
    justify-content: center;
}

/* ── Message d'erreur global ── */
.login-error {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--accent-red-light);
    border: 1px solid rgba(192,57,43,.2);
    border-radius: 10px;
    color: var(--accent-red);
    font-size: 13px;
}

.login-error.visible {
    display: flex;
}

/* ── Spinner sur le bouton ── */
.login-btn .spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .6s linear infinite;
}

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

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

/* ── Theme toggle ── */
.login-theme {
    position: fixed;
    top: 20px;
    right: 20px;
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .login-card {
        padding: 28px 20px;
    }
}