/**
 * Webmaster Manager - Modern Custom Login Screen
 * High-end Glassmorphic Login Portal for WordPress
 */

/* ==========================================================================
   GLOBAL LOGIN PAGE BACKGROUND & RESET
   ========================================================================== */

html, body.login {
    height: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    -webkit-font-smoothing: antialiased;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

/* --------------------------------------------------------------------------
   DARK THEME LOGIN BACKGROUND (Default / Cyber Slate Mesh)
   -------------------------------------------------------------------------- */
body.login.wm-login-dark,
body.login.wm-login-auto {
    background: #090d16 !important;
    background: radial-gradient(circle at 15% 20%, rgba(2, 132, 199, 0.22) 0%, transparent 40%),
                radial-gradient(circle at 85% 75%, rgba(99, 102, 241, 0.20) 0%, transparent 45%),
                radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 1) 0%, #060911 100%) !important;
    color: #f1f5f9;
}

/* Aurora Background Mode */
body.login.wm-login-bg-aurora {
    background: #05070e !important;
    background: radial-gradient(circle at 20% 10%, rgba(16, 185, 129, 0.22) 0%, transparent 45%),
                radial-gradient(circle at 80% 20%, rgba(56, 189, 248, 0.22) 0%, transparent 40%),
                radial-gradient(circle at 50% 90%, rgba(139, 92, 246, 0.25) 0%, #05070e 100%) !important;
}

/* Minimal Solid Slate Mode */
body.login.wm-login-bg-minimal {
    background: #0b0f19 !important;
}

/* --------------------------------------------------------------------------
   LIGHT THEME LOGIN BACKGROUND (Clean Neo-Light)
   -------------------------------------------------------------------------- */
body.login.wm-login-light {
    background: #f8fafc !important;
    background: radial-gradient(circle at 10% 20%, rgba(2, 132, 199, 0.12) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(99, 102, 241, 0.10) 0%, transparent 40%),
                radial-gradient(circle at 50% 50%, #ffffff 0%, #f1f5f9 100%) !important;
    color: #0f172a;
}

/* Ambient Animated Glow Mesh Layer */
body.login::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.02'/%3E%3C/svg%3E");
    opacity: 0.8;
    z-index: 0;
}

/* ==========================================================================
   LOGIN CONTAINER & CARD WRAPPER (#login)
   ========================================================================== */

#login {
    width: 100%;
    max-width: 440px;
    padding: 24px 20px;
    margin: auto;
    position: relative;
    z-index: 10;
}

/* Login Card (Form element) */
body.login.wm-login-dark #loginform,
body.login.wm-login-dark #lostpasswordform,
body.login.wm-login-dark #resetpassform,
body.login.wm-login-auto #loginform,
body.login.wm-login-auto #lostpasswordform,
body.login.wm-login-auto #resetpassform {
    background: rgba(17, 24, 39, 0.82) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.65), 0 0 30px rgba(56, 189, 248, 0.1) !important;
    padding: 32px 30px !important;
}

body.login.wm-login-light #loginform,
body.login.wm-login-light #lostpasswordform,
body.login.wm-login-light #resetpassform {
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.12), 0 0 30px rgba(2, 132, 199, 0.08) !important;
    padding: 32px 30px !important;
}

/* ==========================================================================
   LOGO & BRANDING (#login h1 a)
   ========================================================================== */

#login h1 {
    margin-bottom: 20px;
    text-align: center;
}

#login h1 a {
    width: 220px !important;
    height: 60px !important;
    background-size: contain !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    margin: 0 auto !important;
    padding: 0;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#login h1 a:hover {
    transform: scale(1.03);
}

/* Custom Welcome Header inside Login Form */
.wm-login-header {
    text-align: center;
    margin-bottom: 24px;
}

.wm-login-header h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 6px 0;
    letter-spacing: -0.02em;
}

body.login.wm-login-dark .wm-login-header h2,
body.login.wm-login-auto .wm-login-header h2 {
    color: #f8fafc;
}

body.login.wm-login-light .wm-login-header h2 {
    color: #0f172a;
}

.wm-login-header p {
    font-size: 13px;
    margin: 0;
    line-height: 1.5;
}

body.login.wm-login-dark .wm-login-header p,
body.login.wm-login-auto .wm-login-header p {
    color: #94a3b8;
}

body.login.wm-login-light .wm-login-header p {
    color: #64748b;
}

/* ==========================================================================
   INPUT FIELDS & LABELS
   ========================================================================== */

#login form label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
}

body.login.wm-login-dark #login form label,
body.login.wm-login-auto #login form label {
    color: #cbd5e1;
}

body.login.wm-login-light #login form label {
    color: #334155;
}

/* Form Inputs */
#login form p,
#login form .user-pass-wrap {
    margin-bottom: 16px !important;
}

body.login input[type="text"],
body.login input[type="password"],
body.login .input,
body.login .password-input {
    margin: 0 !important;
    box-sizing: border-box !important;
    width: 100% !important;
    height: 44px !important;
    min-height: 44px !important;
    line-height: normal !important;
}

body.login.wm-login-dark input[type="text"],
body.login.wm-login-dark input[type="password"],
body.login.wm-login-auto input[type="text"],
body.login.wm-login-auto input[type="password"] {
    background: #090d16 !important;
    border: 1px solid #1e293b !important;
    border-radius: 8px !important;
    color: #f8fafc !important;
    font-size: 15px !important;
    padding: 10px 14px !important;
    height: 44px !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

body.login.wm-login-light input[type="text"],
body.login.wm-login-light input[type="password"] {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    color: #0f172a !important;
    font-size: 15px !important;
    padding: 10px 14px !important;
    height: 44px !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Input Focus Glow */
body.login.wm-login-dark input[type="text"]:focus,
body.login.wm-login-dark input[type="password"]:focus,
body.login.wm-login-auto input[type="text"]:focus,
body.login.wm-login-auto input[type="password"]:focus {
    border-color: #38bdf8 !important;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25) !important;
    outline: none !important;
}

body.login.wm-login-light input[type="text"]:focus,
body.login.wm-login-light input[type="password"]:focus {
    border-color: #0284c7 !important;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.20) !important;
    outline: none !important;
}

/* Password Toggle Wrapper & Eye Button */
.user-pass-wrap {
    margin-bottom: 16px !important;
}

.user-pass-wrap .wp-pwd,
.wm-pwd-wrapper {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.user-pass-wrap .wp-pwd input[type="password"],
.user-pass-wrap .wp-pwd input[type="text"],
.wm-pwd-wrapper input[type="password"],
.wm-pwd-wrapper input[type="text"] {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding-left: 14px !important;
    padding-right: 44px !important;
    box-sizing: border-box !important;
}

/* Center-Right Eye Toggle Button */
body.login .user-pass-wrap .wp-pwd button.wp-hide-pw,
body.login .wp-pwd button.button,
body.login .wm-pwd-toggle-btn {
    position: absolute !important;
    top: 50% !important;
    right: 8px !important;
    bottom: auto !important;
    left: auto !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    outline: none !important;
    cursor: pointer !important;
    transition: color 0.2s ease, background-color 0.2s ease !important;
    z-index: 10 !important;
    line-height: 1 !important;
}

body.login.wm-login-dark .user-pass-wrap .wp-pwd button.wp-hide-pw,
body.login.wm-login-dark .wp-pwd button.button,
body.login.wm-login-dark .wm-pwd-toggle-btn,
body.login.wm-login-auto .user-pass-wrap .wp-pwd button.wp-hide-pw,
body.login.wm-login-auto .wp-pwd button.button,
body.login.wm-login-auto .wm-pwd-toggle-btn {
    color: #94a3b8 !important;
}

body.login.wm-login-dark .user-pass-wrap .wp-pwd button.wp-hide-pw:hover,
body.login.wm-login-dark .user-pass-wrap .wp-pwd button.wp-hide-pw:focus,
body.login.wm-login-dark .wp-pwd button.button:hover,
body.login.wm-login-dark .wp-pwd button.button:focus,
body.login.wm-login-dark .wm-pwd-toggle-btn:hover,
body.login.wm-login-dark .wm-pwd-toggle-btn:focus,
body.login.wm-login-auto .user-pass-wrap .wp-pwd button.wp-hide-pw:hover,
body.login.wm-login-auto .user-pass-wrap .wp-pwd button.wp-hide-pw:focus,
body.login.wm-login-auto .wp-pwd button.button:hover,
body.login.wm-login-auto .wp-pwd button.button:focus,
body.login.wm-login-auto .wm-pwd-toggle-btn:hover,
body.login.wm-login-auto .wm-pwd-toggle-btn:focus {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #38bdf8 !important;
}

body.login.wm-login-light .user-pass-wrap .wp-pwd button.wp-hide-pw,
body.login.wm-login-light .wp-pwd button.button,
body.login.wm-login-light .wm-pwd-toggle-btn {
    color: #64748b !important;
}

body.login.wm-login-light .user-pass-wrap .wp-pwd button.wp-hide-pw:hover,
body.login.wm-login-light .user-pass-wrap .wp-pwd button.wp-hide-pw:focus,
body.login.wm-login-light .wp-pwd button.button:hover,
body.login.wm-login-light .wp-pwd button.button:focus,
body.login.wm-login-light .wm-pwd-toggle-btn:hover,
body.login.wm-login-light .wm-pwd-toggle-btn:focus {
    background: rgba(0, 0, 0, 0.05) !important;
    color: #0284c7 !important;
}

body.login .user-pass-wrap .wp-pwd button.wp-hide-pw .dashicons,
body.login .wp-pwd button.button .dashicons,
body.login .wm-pwd-toggle-btn .dashicons {
    font-size: 20px !important;
    width: 20px !important;
    height: 20px !important;
    line-height: 20px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    color: inherit !important;
    vertical-align: middle !important;
}

body.login .user-pass-wrap .wp-pwd button.wp-hide-pw .dashicons::before,
body.login .wp-pwd button.button .dashicons::before,
body.login .wm-pwd-toggle-btn .dashicons::before {
    font-size: 20px !important;
    line-height: 20px !important;
    width: 20px !important;
    height: 20px !important;
    display: block !important;
    text-align: center !important;
    margin: 0 !important;
}

/* ==========================================================================
   REMEMBER ME & SUBMIT BUTTON
   ========================================================================== */

#login form .forgetmenot {
    float: left;
    margin-top: 4px;
    margin-bottom: 12px;
}

#login form .forgetmenot label {
    font-weight: 500;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

/* Custom Checkbox */
body.login.wm-login-dark input[type="checkbox"],
body.login.wm-login-auto input[type="checkbox"] {
    background: #090d16 !important;
    border: 1px solid #1e293b !important;
    border-radius: 4px !important;
    width: 16px !important;
    height: 16px !important;
}

/* Submit Button */
#login form p.submit {
    margin-top: 14px;
    clear: both;
}

#login form .button-primary {
    width: 100% !important;
    background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%) !important;
    border: none !important;
    color: #ffffff !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    height: 44px !important;
    line-height: 44px !important;
    text-shadow: none !important;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35) !important;
    cursor: pointer !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    float: none !important;
    display: block !important;
    text-align: center !important;
}

#login form .button-primary:hover {
    filter: brightness(1.12);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(2, 132, 199, 0.45) !important;
}

#login form .button-primary:active {
    transform: translateY(0);
}

/* ==========================================================================
   NOTICES, ERRORS & MESSAGES
   ========================================================================== */

body.login #login_error,
body.login .message,
body.login .success {
    border-radius: 10px !important;
    padding: 12px 16px !important;
    font-size: 13px !important;
    margin-bottom: 20px !important;
    backdrop-filter: blur(10px);
}

body.login.wm-login-dark #login_error,
body.login.wm-login-auto #login_error {
    background: rgba(239, 68, 68, 0.15) !important;
    border: 1px solid rgba(239, 68, 68, 0.35) !important;
    border-left: 4px solid #ef4444 !important;
    color: #fecaca !important;
}

body.login.wm-login-dark .message,
body.login.wm-login-auto .message {
    background: rgba(2, 132, 199, 0.15) !important;
    border: 1px solid rgba(2, 132, 199, 0.35) !important;
    border-left: 4px solid #38bdf8 !important;
    color: #bae6fd !important;
}

body.login.wm-login-light #login_error {
    background: #fef2f2 !important;
    border: 1px solid #fecaca !important;
    border-left: 4px solid #ef4444 !important;
    color: #991b1b !important;
}

body.login.wm-login-light .message {
    background: #f0f9ff !important;
    border: 1px solid #bae6fd !important;
    border-left: 4px solid #0284c7 !important;
    color: #0369a1 !important;
}

/* ==========================================================================
   NAVIGATION LINKS & FOOTER (#nav, #backtoblog)
   ========================================================================== */

#login #nav,
#login #backtoblog {
    text-align: center;
    padding: 0;
    margin: 14px 0 0 0;
}

#login #nav a,
#login #backtoblog a {
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

body.login.wm-login-dark #login #nav a,
body.login.wm-login-dark #login #backtoblog a,
body.login.wm-login-auto #login #nav a,
body.login.wm-login-auto #login #backtoblog a {
    color: #94a3b8;
}

body.login.wm-login-dark #login #nav a:hover,
body.login.wm-login-dark #login #backtoblog a:hover,
body.login.wm-login-auto #login #nav a:hover,
body.login.wm-login-auto #login #backtoblog a:hover {
    color: #38bdf8;
}

body.login.wm-login-light #login #nav a,
body.login.wm-login-light #login #backtoblog a {
    color: #64748b;
}

body.login.wm-login-light #login #nav a:hover,
body.login.wm-login-light #login #backtoblog a:hover {
    color: #0284c7;
}

/* ==========================================================================
   SECURITY & SSL ENCRYPTION BADGE
   ========================================================================== */

.wm-login-security-badge {
    margin-top: 14px !important;
    margin-bottom: 16px !important;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
    clear: both;
    width: 100%;
}

body.login.wm-login-dark .wm-login-security-badge,
body.login.wm-login-auto .wm-login-security-badge {
    color: #94a3b8;
}

body.login.wm-login-light .wm-login-security-badge {
    color: #64748b;
}

.wm-login-security-badge .wm-pulse-dot {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10b981;
    animation: wmPulse 2s infinite ease-in-out;
}

@keyframes wmPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

/* Responsive adjustments */
@media screen and (max-width: 480px) {
    #login {
        padding: 16px;
    }
    body.login #loginform {
        padding: 24px 20px !important;
    }
}
