/* ==========================================================================
   Performalytics Portal, Login Page Styles
   A dark, minimalist login page inspired by ChatGPT/Gemini interfaces.
   ========================================================================== */

/* ---------- Full-page Background ---------- */
body.login {
    background-color: #111d29;
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(26, 43, 60, 0.8) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(204, 255, 0, 0.03) 0%, transparent 50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    font-family: 'Inter', 'Roboto', system-ui, -apple-system, sans-serif;
}

/* ---------- Login Card Container ---------- */
#login {
    width: 100%;
    max-width: 420px;
    padding: 2.5rem 2rem 2rem;
    background: rgba(26, 43, 60, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.03),
        0 20px 60px rgba(0, 0, 0, 0.4);
}

/* ---------- Logo Area ---------- */
#login h1 {
    margin-bottom: 0.25rem;
}

#login h1 a {
    /* Replace WP logo with text-based branding by default */
    background-image: none !important;
    width: auto !important;
    height: auto !important;
    text-indent: 0 !important;
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff !important;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0;
    margin: 0 auto 0.25rem;
}

/* Accent dot before the brand name */
#login h1 a::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: #ccff00;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Subtitle under the logo */
.login #login h1::after {
    content: 'Sign in to your portal';
    display: block;
    font-family: 'Roboto', sans-serif;
    font-size: 0.875rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.45);
    text-align: center;
    margin-top: 0.35rem;
    margin-bottom: 1rem;
}

/* ---------- Form Container ---------- */
#loginform,
#lostpasswordform,
#registerform {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
}

/* ---------- Labels ---------- */
#loginform label,
#lostpasswordform label,
#registerform label {
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.35rem;
    display: block;
}

/* ---------- Input Fields ---------- */
#loginform input[type="text"],
#loginform input[type="password"],
#lostpasswordform input[type="text"],
#registerform input[type="text"],
#registerform input[type="email"] {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #ffffff;
    font-family: 'Roboto', sans-serif;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    outline: none;
    margin-bottom: 0.25rem;
}

#loginform input[type="text"]:focus,
#loginform input[type="password"]:focus,
#lostpasswordform input[type="text"]:focus,
#registerform input[type="text"]:focus,
#registerform input[type="email"]:focus {
    border-color: rgba(204, 255, 0, 0.5);
    box-shadow: 0 0 0 3px rgba(204, 255, 0, 0.08);
    background: rgba(255, 255, 255, 0.08);
}

#loginform input[type="text"]::placeholder,
#loginform input[type="password"]::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

/* ---------- Remember Me Checkbox ---------- */
.forgetmenot {
    margin-top: 0.5rem !important;
}

.forgetmenot label {
    font-size: 0.8125rem !important;
    color: rgba(255, 255, 255, 0.45) !important;
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
}

.forgetmenot input[type="checkbox"] {
    accent-color: #ccff00;
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

/* ---------- Submit Button ---------- */
#wp-submit,
#loginform .button-primary,
#lostpasswordform .button-primary,
#registerform .button-primary {
    width: 100%;
    padding: 0.8rem 1.5rem;
    margin-top: 1rem;
    background-color: #ccff00;
    color: #111d29;
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-shadow: none;
    box-shadow: none;
    letter-spacing: -0.01em;
}

#wp-submit:hover,
#loginform .button-primary:hover,
#lostpasswordform .button-primary:hover,
#registerform .button-primary:hover {
    background-color: #b8e600;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(204, 255, 0, 0.25);
}

#wp-submit:active {
    transform: translateY(0);
}

/* ---------- Navigation Links (Lost Password, Back) ---------- */
#nav,
#backtoblog {
    text-align: center;
    padding: 0.35rem 0;
}

#nav a,
#backtoblog a {
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.4) !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

#nav a:hover,
#backtoblog a:hover {
    color: #ccff00 !important;
}

/* Separator between nav links */
#nav {
    margin-top: 0.75rem;
}

#backtoblog {
    margin-top: 0.25rem;
}

/* ---------- Error / Info Messages ---------- */
#login_error,
.message,
.success {
    border-radius: 10px;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

#login_error {
    background: rgba(231, 76, 60, 0.12);
    border-left: 3px solid #e74c3c;
    color: #ff8a80;
}

.message {
    background: rgba(52, 152, 219, 0.12);
    border-left: 3px solid #3498db;
    color: #90caf9;
}

.success {
    background: rgba(46, 204, 113, 0.12);
    border-left: 3px solid #2ecc71;
    color: #a5d6a7;
}

/* ---------- Login error link colours ---------- */
#login_error a {
    color: #ccff00 !important;
    text-decoration: underline;
    font-weight: 600;
}

#login_error a:hover {
    color: #b8e600 !important;
}

.message a {
    color: #90caf9 !important;
}

/* ---------- Privacy Policy Link ---------- */
.privacy-policy-page-link {
    text-align: center;
    margin-top: 1rem;
}

.privacy-policy-page-link a {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.25) !important;
}

.privacy-policy-page-link a:hover {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* ---------- Language Switcher (WP 6.x) ---------- */
.language-switcher {
    margin-top: 1rem;
}

.language-switcher label {
    color: rgba(255, 255, 255, 0.35) !important;
    font-size: 0.8125rem;
}

.language-switcher select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.6);
    padding: 0.4rem 0.6rem;
    font-size: 0.8125rem;
}

.language-switcher .button {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    padding: 0.4rem 0.8rem;
    font-size: 0.8125rem;
    cursor: pointer;
}

/* ---------- Register CTA (below the login card) ---------- */
.pf-register-cta {
    text-align: center;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.45);
}

.pf-register-cta a {
    color: #ccff00 !important;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.pf-register-cta a:hover {
    color: #b8e600 !important;
}

/* ---------- Powered-by Footer Text ---------- */
body.login::after {
    content: '© Performalytics ' attr(data-year);
    display: block;
    margin-top: 2rem;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.6875rem;
    color: rgba(255, 255, 255, 0.2);
    text-align: center;
}

/* Fallback: dynamic year via WP is preferred, but static text works too */
body.login::after {
    content: '© Performalytics';
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
    #login {
        max-width: 100%;
        margin: 1rem;
        padding: 1.5rem 1.25rem;
        border-radius: 12px;
    }
}

/* ---------- Smooth Animated Gradient Background ---------- */
@keyframes pf-bg-shift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

body.login {
    background-size: 200% 200%;
    animation: pf-bg-shift 15s ease infinite;
}

/* ---------- Hide the default WordPress dashboard icon ---------- */
.dashicons-admin-generic::before {
    display: none;
}
