/* Login page – dark, split layout with customizable logo + background image */

body.cpn-login-theme {
    background-color: #020617;
    background-image: radial-gradient(circle at top, #111827 0, #020617 40%, #000 100%);
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    padding: 0 6vw;
    position: relative;
    overflow: hidden;
}

/* Left login column */
body.cpn-login-theme #login {
    width: 100%;
    max-width: 420px;
    margin: 0;
    padding: 3rem 2.5rem 2.5rem;
    background:
        radial-gradient(circle at top left, rgba(51,65,85,0.98), rgba(15,23,42,0.99));
    border-radius: 20px;
    box-shadow:
        0 26px 80px rgba(15,23,42,0.95),
        0 0 0 1px rgba(148,163,184,0.28),
        0 0 60px rgba(56,189,248,0.14);
    position: relative;
    z-index: 1;
}

/* Logo */
body.cpn-login-theme #login h1 {
    margin-bottom: 2rem;
    text-align: center;
}
body.cpn-login-theme #login h1 a {
    width: 180px;
    height: 64px;
    margin: 0 auto;
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
}

/* Input & labels */
body.cpn-login-theme #loginform {
    margin-top: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    border: none;
}

body.cpn-login-theme #loginform label {
    font-size: 13px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: 4px;
}

body.cpn-login-theme #loginform .input,
body.cpn-login-theme #loginform input[type="text"],
body.cpn-login-theme #loginform input[type="password"] {
    background: rgba(15,23,42,0.95);
    border-radius: 10px;
    border: 1px solid #1f2937;
    color: #e5e7eb;
    box-shadow: inset 0 0 0 1px rgba(15,23,42,0.9);
    padding: 10px 12px;
    font-size: 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

body.cpn-login-theme #loginform .input:focus {
    border-color: #38bdf8;
    box-shadow:
        0 0 0 1px rgba(56,189,248,0.6),
        0 0 20px rgba(56,189,248,0.4);
    background: #020617;
    outline: none;
}

body.cpn-login-theme #loginform .forgetmenot {
    margin-top: 0.75rem;
}

/* Primary button */
body.cpn-login-theme #loginform .button-primary {
    width: 100%;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #0ea5e9, #6366f1);
    color: #f9fafb;
    font-weight: 600;
    font-size: 14px;
    padding: 9px 16px;
    box-shadow: none;
    text-shadow: none;
    filter: drop-shadow(0 10px 22px rgba(15,23,42,0.9));
    transition: transform 0.12s ease, filter 0.12s ease;
}

body.cpn-login-theme #loginform .button-primary:hover {
    transform: translateY(-1px);
    filter: drop-shadow(0 14px 26px rgba(15,23,42,0.95)) brightness(1.05);
}

body.cpn-login-theme #loginform .button-primary:active {
    transform: translateY(0);
    filter: drop-shadow(0 8px 18px rgba(15,23,42,0.85)) brightness(0.98);
}

/* Checkbox + secondary links */
body.cpn-login-theme #loginform .forgetmenot label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    text-transform: none;
    letter-spacing: 0;
    color: #9ca3af;
}

body.cpn-login-theme #loginform input[type="checkbox"] {
    border-radius: 6px;
    border-color: #1f2937;
    background: #020617;
}

/* Nav & back links */
body.cpn-login-theme #nav,
body.cpn-login-theme #backtoblog {
    text-align: left;
    width: 100%;
    margin: 10px 0 0;
}

body.cpn-login-theme #nav a,
body.cpn-login-theme #backtoblog a {
    color: #9ca3af;
    font-size: 12px;
    text-decoration: none;
}
body.cpn-login-theme #nav a:hover,
body.cpn-login-theme #backtoblog a:hover {
    color: #e5e7eb;
}

/* Messages / errors */
body.cpn-login-theme .message,
body.cpn-login-theme #login_error {
    background: rgba(15,23,42,0.95);
    border-radius: 12px;
    border: 1px solid #1e293b;
    color: #e5e7eb;
    box-shadow:
        0 12px 36px rgba(15,23,42,0.85),
        0 0 0 1px rgba(30,64,175,0.6);
}

/* Right panel hint (base, actual background image is injected inline from PHP) */
body.cpn-login-theme::before {
    content: "";
    position: fixed;
    inset: 0;
    left: 55%;
    background: radial-gradient(circle at top, rgba(15,23,42,0.1), rgba(15,23,42,0.85));
    opacity: 0.7;
    pointer-events: none;
}

/* Responsive tweaks */
@media (max-width: 960px) {
    body.cpn-login-theme {
        padding: 4vh 1.5rem;
        justify-content: center;
    }

    body.cpn-login-theme #login {
        max-width: 420px;
        padding: 2.5rem 2rem 2rem;
    }

    body.cpn-login-theme::before {
        left: 0;
        opacity: 0.35;
    }
}

@media (max-width: 480px) {
    body.cpn-login-theme #login {
        padding: 2rem 1.5rem 1.75rem;
        border-radius: 14px;
    }

    body.cpn-login-theme #login h1 a {
        width: 150px;
        height: 52px;
    }
}
