/* ── Login Pages ── */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&display=swap');

.login-page {
    font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
    direction: rtl;
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    padding: 24px 16px 0;
    background: linear-gradient(135deg, #003d10 0%, #006b1a 45%, #0a8c28 100%);
}

.login-wrapper {
    width: 100%;
    max-width: 420px;
    margin: auto;
}

.login-card {
    background: #fff;
    border-radius: 20px;
    padding: 36px 32px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.login-logo {
    display: block;
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin: 0 auto 20px;
    background: #f5f3f0;
    border-radius: 50%;
    padding: 8px;
}

.login-card h2 {
    text-align: center;
    font-size: 1.35rem;
    font-weight: 800;
    color: #004e14;
    margin: 0 0 6px;
}

.login-card .login-subtitle {
    text-align: center;
    font-size: 0.88rem;
    color: #6b7b6b;
    margin: 0 0 28px;
}

.login-field {
    margin-bottom: 18px;
}

.login-field label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a2e1a;
    margin-bottom: 6px;
}

.login-field input {
    width: 100%;
    padding: 12px 14px;
    font-size: 1rem;
    font-family: inherit;
    border: 1.5px solid #dde5dd;
    border-radius: 12px;
    background: #fafaf8;
    color: #1a2e1a;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.login-field input:focus {
    outline: none;
    border-color: #006b1a;
    box-shadow: 0 0 0 3px rgba(0, 107, 26, 0.15);
    background: #fff;
}

.login-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    cursor: pointer;
    user-select: none;
}

.login-remember input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #006b1a;
    cursor: pointer;
    flex-shrink: 0;
}

.login-remember span {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a2e1a;
}

.login-alert {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.88rem;
    margin-bottom: 18px;
    background: #fde8e8;
    color: #9b1c1c;
    border: 1px solid #f5c6c6;
}

.login-btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 24px;
    margin-top: 8px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    color: #fff;
    background: linear-gradient(135deg, #004e14, #006b1a);
    box-shadow: 0 4px 16px rgba(0, 78, 20, 0.35);
    cursor: pointer;
    transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}

.login-btn-primary:hover {
    background: linear-gradient(135deg, #003d10, #005515);
    box-shadow: 0 6px 20px rgba(0, 78, 20, 0.45);
    transform: translateY(-1px);
}

.login-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #eef2ee;
    gap: 12px;
}

.login-btn-secondary {
    flex: 1;
    padding: 10px 16px;
    border: 1.5px solid #dde5dd;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    color: #5a6b5a;
    background: #fafaf8;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.login-btn-secondary:hover {
    background: #f0f2f0;
    border-color: #c8d4c8;
}

.login-link-back {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    color: #006b1a;
    text-decoration: none;
    background: #e8f5e9;
    transition: background 0.2s ease;
}

.login-link-back:hover {
    background: #c8e6c9;
    color: #004e14;
    text-decoration: none;
}

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

    .login-actions {
        flex-direction: column;
    }

    .login-btn-secondary,
    .login-link-back {
        width: 100%;
    }
}

.login-page .app-site-footer {
    width: 100%;
    margin-top: 16px;
    padding: 14px 16px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
    background: rgba(0, 0, 0, 0.12);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.login-page .app-site-footer p {
    margin: 0;
}

/* ── إظهار / إخفاء كلمة المرور ── */
.password-toggle-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    border: 1.5px solid #dde5dd;
    border-radius: 12px;
    background: #fafaf8;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.password-toggle-wrap:focus-within {
    border-color: #006b1a;
    box-shadow: 0 0 0 3px rgba(0, 107, 26, 0.15);
    background: #fff;
}

.login-field .password-toggle-wrap input {
    width: 100%;
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    padding: 12px 44px 12px 14px;
    box-shadow: none;
}

.login-field .password-toggle-wrap input:focus {
    outline: none;
    border: none;
    box-shadow: none;
    background: transparent;
}

.password-toggle-btn {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #6b7b6b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 1;
    transition: color 0.2s ease, background 0.2s ease;
}

.password-toggle-btn:hover {
    color: #006b1a;
    background: rgba(0, 107, 26, 0.1);
}

.password-toggle-btn:focus {
    outline: none;
    box-shadow: none;
    background: rgba(0, 107, 26, 0.12);
}
