/* /login — fields & actions (matches register wizard styling) */

.login-page .reg-form-group {
    animation: loginFieldIn 0.5s ease backwards;
}

.login-page .reg-form-group:nth-child(1) { animation-delay: 0.1s; }
.login-page #loginForm .reg-form-group:nth-child(2) { animation-delay: 0.15s; }

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

#login-alert-container {
    margin-bottom: 1rem;
}

.login-page .alert-message {
    padding: 0.875rem 1rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: loginFieldIn 0.3s ease;
    direction: rtl;
    text-align: right;
}

.login-page .alert-message.error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.login-page .alert-message.success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.login-form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.login-form-options label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    color: #475569;
}

.login-form-options input[type="checkbox"] {
    width: 1.125rem;
    height: 1.125rem;
    min-height: auto;
    padding: 0;
    accent-color: #2d3748;
}

.login-forgot-link {
    color: #1e3a5f;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
}

.login-forgot-link:hover {
    text-decoration: underline;
}

/* Password field — show/hide toggle (icon on physical left) */
.reg-password-field {
    position: relative;
}

.reg-password-field input {
    padding-left: 2.85rem;
    padding-right: 1rem;
}

.reg-password-toggle {
    position: absolute;
    left: 0.35rem;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, background 0.2s ease;
}

.reg-password-toggle:hover {
    color: #1e3a5f;
    background: rgba(15, 23, 42, 0.06);
}

.reg-password-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(45, 55, 72, 0.15);
}

.reg-password-icon {
    display: block;
    flex-shrink: 0;
}

.reg-password-icon[hidden] {
    display: none;
}

.login-page #loginForm .reg-btn-primary,
.login-page #loginSubmitBtn {
    width: 100%;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    margin-bottom: 0.75rem;
    position: relative;
}

.login-page .reg-btn-primary.loading .reg-btn-text {
    opacity: 0;
}

.login-page .reg-btn-loader {
    display: none;
    position: absolute;
    inset: 0;
    align-items: center;
    justify-content: center;
}

.login-page .reg-btn-primary.loading .reg-btn-loader {
    display: inline-flex;
}

.login-page .reg-btn-loader .spinner {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: loginSpin 0.8s linear infinite;
}

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

.login-btn-google {
    width: 100%;
    min-height: 48px;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
    background: #fff;
    color: #2d3748;
    border: 1.5px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.login-btn-google:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
    color: #1a202c;
    text-decoration: none;
}

.login-btn-google .google-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.login-register-block {
    margin-top: 1.75rem;
    text-align: center;
}

.login-register-hint {
    margin: 0 0 0.75rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: #64748b;
}

.login-btn-register {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.05rem;
    margin-top: 0;
}

.login-btn-register:hover {
    text-decoration: none;
    color: #475569;
}

@media (prefers-reduced-motion: reduce) {
    .login-page .reg-form-group,
    .login-page .alert-message {
        animation: none;
    }
}
