=== LoginGlow ===
Contributors:      mehed
Tags:              login, login page, custom login, login customizer, login branding
Requires at least: 5.8
Tested up to:      6.9
Requires PHP:      7.4
Stable tag:        1.2.1
License:           GPLv2 or later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html

Customize your WordPress login page with custom logos, backgrounds, colors, pre-built templates, and more — no coding required.

== Description ==

**LoginGlow** is a lightweight, beginner-friendly plugin that lets you transform the default WordPress login page into a branded, professional experience — without writing a single line of CSS.

Whether you're building for a client, running a membership site, or just want your login page to match your brand, LoginGlow gives you everything you need in a clean, intuitive settings panel.

### 🎨 Core Features

* **Custom Logo** — Upload your own logo via the WordPress Media Library
* **Background Customization** — Set a background color, image, background size, and repeat mode
* **Overlay** — Add a color overlay with adjustable opacity over your background
* **Button Colors** — Customize the login button's background, text, and hover colors
* **Form Styling** — Control border radius and toggle drop shadow on the login form card
* **Link Color** — Style "Lost your password?" and other links

### 🚀 Advanced Features

* **Live Preview** — See your changes reflected in real time before you save
* **Pre-built Templates** — Three one-click styles: **Minimal**, **Dark**, and **Gradient**
* **Redirect System** — Custom redirects after login and after logout
* **Reset to Defaults** — One-click button to restore all original settings

### ⚙️ How It Works

1. Go to **Settings → LoginGlow**
2. Upload your logo, choose colors, and pick a template (optional)
3. Watch the live preview update as you make changes
4. Click **Save Settings** — and you're done!

### 🔒 Built with Security in Mind

* All inputs are sanitized on save
* All outputs are properly escaped
* Uses WordPress nonces for AJAX actions
* Follows WordPress coding standards
* No direct file access possible

### ⚡ Lightweight & Performance-Friendly

* Admin assets load **only** on the plugin's settings page
* Login styles load **only** on `wp-login.php`
* Zero external dependencies (uses WordPress built-ins: Color Picker, Media Uploader)
* No React, Vue, or heavy JavaScript frameworks

== Installation ==

= Automatic Installation =

1. Log in to your WordPress admin panel
2. Go to **Plugins → Add New**
3. Search for **"LoginGlow"**
4. Click **Install Now** and then **Activate**

= Manual Installation =

1. Download the plugin ZIP file
2. Go to **Plugins → Add New → Upload Plugin**
3. Choose the ZIP file and click **Install Now**
4. Click **Activate Plugin**

= After Activation =

1. Go to **Settings → LoginGlow**
2. Customize to your liking and hit **Save Settings**

== Frequently Asked Questions ==

= Will this break my existing login page? =

No. The plugin adds styles on top of the default WordPress login page. If you deactivate the plugin, the login page reverts to its original appearance instantly.

= Does this work with WooCommerce login? =

The plugin targets `wp-login.php` specifically. It will not automatically style WooCommerce or other custom login forms.

= Can I use this on a multisite installation? =

Yes. You'll need to network-activate or activate the plugin per-site. Settings are stored per-site.

= The live preview doesn't match the actual login page exactly — why? =

The live preview is a simplified representation to give you a real-time approximation of your changes. The actual `wp-login.php` page may have slight differences due to browser rendering and WordPress default styles.

= How do I reset everything back to default? =

Click the **Reset to Defaults** button at the bottom of the settings page and confirm. All settings will be restored to their original values.

= Which templates are available? =

Three pre-built templates are included:
* **Minimal** — Clean white background with subtle shadows
* **Dark** — Deep dark background with a frosted-glass form panel
* **Gradient** — Vibrant purple-to-pink gradient, modern and striking

Templates now populate starter values into your settings. You can override any field afterward, or select "None" to keep your current custom values unchanged.

== Screenshots ==

1. Settings page — General section (logo, redirects)
2. Settings page — Design section (colors, background, form)
3. Settings page — Live Preview panel showing real-time updates
4. Settings page — Template selector (Minimal, Dark, Gradient)
5. Frontend — Dark template applied to the login page
6. Frontend — Gradient template applied to the login page

== Changelog ==

= 1.2.1 =
* Fixed live preview logo placeholder — now shows the WordPress default "W" icon (or site icon if set) instead of a styled SVG circle

= 1.2.0 =
* Removed custom CSS textarea — all styling is now handled through structured controls only

= 1.1.0 =
* Refactored admin settings into separate classes and view templates for better maintainability
* Extracted sanitization logic into `LGLOW_Settings_Sanitizer`
* Extracted admin asset enqueueing into `LGLOW_Admin_Assets`
* Extracted login CSS generation into `LGLOW_CSS_Builder`
* Moved all HTML rendering to dedicated view files under `admin/views/`
* No changes to plugin functionality or user-facing features

= 1.0.0 =
* Initial release
* Custom logo upload via Media Library
* Background color and image with size/repeat controls
* Color overlay with opacity slider
* Login button color, text, and hover customization
* Form border radius and box shadow toggle
* Three pre-built templates: Minimal, Dark, Gradient
* Live preview in settings panel
* Redirect after login and after logout
* Reset to defaults button
* WordPress Settings API integration
* Full sanitization and escaping

== Upgrade Notice ==

= 1.2.1 =
Minor visual fix in the admin live preview — no database changes or settings migration required.

= 1.2.0 =
Custom CSS textarea removed. No database changes or settings migration required.

= 1.1.0 =
Internal code refactoring only — no database changes, no settings migration required.

= 1.0.0 =
Initial release — no upgrade steps required.
