/* ============================================================
   Karti Modern Login — Premium Split-Screen Login Page
   ============================================================ */

/* ---------- Reset & Base ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.login {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f8f9fc;
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ---------- Hide default WP elements ---------- */
body.login #login h1,
body.login #login h1 a {
    display: none !important;
}

body.login #backtoblog,
body.login .privacy-policy-page-link {
    display: none !important;
}

/* ---------- Split Layout ---------- */
.kml-split-left {
    position: fixed;
    left: 0;
    top: 0;
    width: 50%;
    height: 100vh;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a3e 25%, #2d1b69 50%, #667eea 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 1;
}

.kml-split-right {
    position: relative;
    margin-left: 50%;
    width: 50%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f8f9fc;
    z-index: 2;
}

.kml-right-inner {
    width: 100%;
    max-width: 420px;
    padding: 40px 32px;
}

/* ---------- Left Panel Content ---------- */
.kml-left-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 40px;
    width: 100%;
    max-width: 500px;
}

/* Floating geometric shapes */
.kml-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.08;
    animation: kml-float 20s ease-in-out infinite;
}

.kml-shape-1 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    top: -100px;
    left: -50px;
    animation-delay: 0s;
}

.kml-shape-2 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, #f093fb, #f5576c);
    bottom: -60px;
    right: -30px;
    animation-delay: -5s;
}

.kml-shape-3 {
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    top: 50%;
    right: -40px;
    animation-delay: -10s;
}

.kml-shape-4 {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #43e97b, #38f9d7);
    bottom: 20%;
    left: 10%;
    animation-delay: -3s;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
}

.kml-shape-5 {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #fa709a, #fee140);
    top: 15%;
    right: 20%;
    animation-delay: -7s;
    border-radius: 63% 37% 54% 46% / 55% 48% 52% 45%;
}

@keyframes kml-float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg) scale(1);
    }
    25% {
        transform: translateY(-20px) rotate(5deg) scale(1.05);
    }
    50% {
        transform: translateY(-35px) rotate(-3deg) scale(1.1);
    }
    75% {
        transform: translateY(-15px) rotate(4deg) scale(1.03);
    }
}

/* Glass card */
.kml-glass-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    padding: 48px 40px;
    margin-bottom: 32px;
    position: relative;
    z-index: 2;
    animation: kml-fadeUp 0.8s ease-out;
}

.kml-glass-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    color: white;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.4);
}

.kml-welcome-title {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.kml-welcome-desc {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.6;
    max-width: 340px;
    margin: 0 auto;
}

/* Stats row */
.kml-stats-row {
    display: flex;
    gap: 12px;
    justify-content: center;
    animation: kml-fadeUp 0.8s ease-out 0.2s both;
}

.kml-stat-card {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.kml-stat-card:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.kml-stat-icon {
    font-size: 18px;
}

.kml-stat-text {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 500;
}

/* ---------- Right Panel — Form Styling ---------- */

/* Custom form header */
.kml-form-header {
    text-align: center;
    margin-bottom: 8px;
}

.kml-form-logo {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: white;
    margin: 0 auto 20px;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
    animation: kml-fadeDown 0.6s ease-out;
}

.kml-form-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.kml-form-subtitle {
    font-size: 14px;
    color: #8892a4;
    margin-bottom: 0;
}

/* Login form container */
body.login #login {
    width: 100% !important;
    max-width: 420px;
    padding: 0 !important;
    margin: 0 !important;
    background: none !important;
    box-shadow: none !important;
    animation: kml-fadeUp 0.6s ease-out 0.15s both;
}

body.login #loginform,
body.login #lostpasswordform,
body.login #registerform {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 20px;
    padding: 32px 28px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.04);
    margin-top: 0;
    transition: box-shadow 0.3s ease;
}

body.login #loginform:hover,
body.login #lostpasswordform:hover,
body.login #registerform:hover {
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
}

/* Labels */
body.login #loginform label,
body.login #lostpasswordform label,
body.login #registerform label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    letter-spacing: 0.01em;
    margin-bottom: 6px;
    display: block;
}

body.login #loginform label[for="user_login"]::before {
    content: '📧 ';
    font-size: 14px;
}

body.login #loginform label[for="user_pass"]::before {
    content: '🔑 ';
    font-size: 14px;
}

/* Input fields */
body.login input[type="text"],
body.login input[type="password"],
body.login input[type="email"] {
    width: 100%;
    height: 48px;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    color: #1a1a2e;
    background: #f9fafb;
    transition: all 0.3s ease;
    outline: none;
    box-shadow: none;
    margin-bottom: 4px;
}

body.login input[type="text"]:focus,
body.login input[type="password"]:focus,
body.login input[type="email"]:focus {
    border-color: #667eea;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.12);
}

body.login input[type="text"]::placeholder,
body.login input[type="password"]::placeholder,
body.login input[type="email"]::placeholder {
    color: #9ca3af;
}

/* Password toggle */
body.login .wp-pwd {
    position: relative;
}

body.login .wp-pwd .dashicons {
    color: #9ca3af;
    transition: color 0.2s ease;
}

body.login .wp-pwd .dashicons:hover {
    color: #667eea;
}

body.login .wp-pwd button.wp-hide-pw {
    background: none;
    border: none;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    cursor: pointer;
    height: 40px;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hide the form logo square */
.kml-form-logo {
    display: none !important;
}

/* Remember me */
body.login .forgetmenot {
    margin-top: 4px;
    margin-bottom: 8px;
}

body.login .forgetmenot label {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #6b7280 !important;
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px;
    cursor: pointer;
    line-height: 1;
}

body.login input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    background: #f9fafb;
    margin: 0 !important;
    padding: 0 !important;
    vertical-align: middle;
}

body.login input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #667eea;
}

body.login input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: 700;
}

body.login input[type="checkbox"]:focus {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
    outline: none;
}

/* Submit button */
body.login .submit {
    margin-top: 8px;
}

body.login #wp-submit,
body.login .button-primary {
    width: 100%;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    border-radius: 12px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    font-family: 'Inter', sans-serif !important;
    color: #ffffff !important;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: none !important;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.35) !important;
    letter-spacing: 0.02em;
    position: relative;
    overflow: hidden;
}

body.login #wp-submit:hover,
body.login .button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(102, 126, 234, 0.45) !important;
}

body.login #wp-submit:active,
body.login .button-primary:active {
    transform: translateY(0);
}

/* Button shimmer effect */
body.login #wp-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s ease;
}

body.login #wp-submit:hover::before {
    left: 100%;
}

/* Links (lost password, back to site) */
body.login #nav {
    text-align: center;
    margin-top: 20px !important;
    padding: 0 !important;
}

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

body.login #nav a:hover,
body.login #backtoblog a:hover {
    color: #764ba2 !important;
}

/* Messages */
body.login .message,
body.login .success {
    border-left: 4px solid #667eea;
    background: rgba(102, 126, 234, 0.06);
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 13px;
    color: #374151;
    margin-bottom: 20px;
    box-shadow: none;
}

body.login #login_error {
    border-left: 4px solid #ef4444;
    background: rgba(239, 68, 68, 0.06);
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 13px;
    color: #dc2626;
    margin-bottom: 20px;
    box-shadow: none;
}

body.login #login_error a {
    color: #667eea;
}

/* Footer */
.kml-footer-text {
    padding: 20px;
    font-size: 12px;
    color: #9ca3af;
    text-align: center;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

/* ---------- Animations ---------- */
@keyframes kml-fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes kml-fadeDown {
    from {
        opacity: 0;
        transform: translateY(-16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .kml-split-left {
        display: none;
    }

    .kml-split-right {
        margin-left: 0;
        width: 100%;
        background: linear-gradient(135deg, #0f0f23 0%, #1a1a3e 40%, #2d1b69 70%, #667eea 100%);
        min-height: 100vh;
        padding: 20px;
    }

    .kml-right-inner {
        padding: 24px 20px;
    }

    .kml-form-header {
        color: white;
    }

    .kml-form-title {
        color: #ffffff;
    }

    .kml-form-subtitle {
        color: rgba(255, 255, 255, 0.65);
    }

    body.login #loginform,
    body.login #lostpasswordform,
    body.login #registerform {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }

    body.login #nav a {
        color: rgba(255, 255, 255, 0.8) !important;
    }

    body.login #nav a:hover {
        color: #ffffff !important;
    }

    .kml-footer-text {
        color: rgba(255, 255, 255, 0.5);
    }
}

@media (max-width: 480px) {
    .kml-right-inner {
        padding: 16px 12px;
    }

    body.login #loginform,
    body.login #lostpasswordform,
    body.login #registerform {
        padding: 24px 20px;
        border-radius: 16px;
    }

    .kml-form-title {
        font-size: 24px;
    }

    .kml-form-logo {
        width: 48px;
        height: 48px;
        font-size: 20px;
        border-radius: 14px;
    }

    body.login #wp-submit,
    body.login .button-primary {
        height: 46px;
        font-size: 14px !important;
    }
}

/* ---------- Misc WP overrides ---------- */
body.login .language-switcher {
    display: none;
}

body.login #login {
    padding-top: 0 !important;
}

body.login .login .button.wp-hide-pw {
    right: 0;
    margin-top: 0;
}

/* Smooth transitions on page load */
body.login {
    animation: kml-pageLoad 0.5s ease-out;
}

@keyframes kml-pageLoad {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Override WP default p margin in forms */
body.login #loginform p,
body.login #lostpasswordform p,
body.login #registerform p {
    margin-bottom: 16px;
}

body.login #loginform .submit,
body.login #lostpasswordform .submit {
    padding-top: 0;
}

/* Input group layout fix */
body.login .user-pass-wrap,
body.login .user-login-wrap {
    margin-bottom: 16px;
}

body.login .input {
    margin-bottom: 0 !important;
}

/* ---------- Shortcode Mode ---------- */
.kml-shortcode-wrap {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f8f9fc;
    display: flex;
    min-height: 100vh;
    width: 100%;
    overflow: hidden;
    position: relative;
}

.kml-shortcode-wrap .kml-split-left {
    position: relative;
    left: auto;
    top: auto;
    width: 50%;
    min-height: 100vh;
    height: auto;
    flex: 0 0 50%;
}

.kml-shortcode-wrap .kml-split-right {
    margin-left: 0;
    width: 50%;
    min-height: 100vh;
    flex: 0 0 50%;
}

.kml-shortcode-wrap .kml-right-inner {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.kml-shortcode-wrap #login {
    width: 100%;
    max-width: 420px;
    padding: 0;
    margin: 0;
    background: none;
    box-shadow: none;
    animation: kml-fadeUp 0.6s ease-out 0.15s both;
}

.kml-shortcode-wrap #loginform {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 20px;
    padding: 32px 28px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.04);
    margin-top: 0;
    transition: box-shadow 0.3s ease;
}

.kml-shortcode-wrap #loginform:hover {
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
}

.kml-shortcode-wrap #loginform p {
    margin-bottom: 16px;
}

.kml-shortcode-wrap #loginform .submit {
    padding-top: 0;
    margin-top: 8px;
}

.kml-shortcode-wrap .user-pass-wrap,
.kml-shortcode-wrap .user-login-wrap {
    margin-bottom: 16px;
}

.kml-shortcode-wrap #loginform label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    letter-spacing: 0.01em;
    margin-bottom: 6px;
    display: block;
}

.kml-shortcode-wrap #loginform input[type="text"],
.kml-shortcode-wrap #loginform input[type="password"],
.kml-shortcode-wrap #loginform input[type="email"] {
    width: 100%;
    height: 48px;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    color: #1a1a2e;
    background: #f9fafb;
    transition: all 0.3s ease;
    outline: none;
    box-shadow: none;
    margin-bottom: 4px;
}

.kml-shortcode-wrap #loginform input[type="text"]:focus,
.kml-shortcode-wrap #loginform input[type="password"]:focus,
.kml-shortcode-wrap #loginform input[type="email"]:focus {
    border-color: #667eea;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.12);
}

.kml-shortcode-wrap #loginform input::placeholder {
    color: #9ca3af;
}

.kml-shortcode-wrap .wp-pwd {
    position: relative;
}

.kml-shortcode-wrap .forgetmenot {
    margin-top: 4px;
    margin-bottom: 8px;
}

.kml-shortcode-wrap .forgetmenot label {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #6b7280 !important;
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px;
    cursor: pointer;
    line-height: 1;
}

.kml-shortcode-wrap input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    background: #f9fafb;
    margin: 0 !important;
    padding: 0 !important;
    vertical-align: middle;
}

.kml-shortcode-wrap input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #667eea;
}

.kml-shortcode-wrap input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: 700;
}

.kml-shortcode-wrap #wp-submit,
.kml-shortcode-wrap .button-primary {
    width: 100%;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    border-radius: 12px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    font-family: 'Inter', sans-serif !important;
    color: #ffffff !important;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: none !important;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.35) !important;
    letter-spacing: 0.02em;
    position: relative;
    overflow: hidden;
}

.kml-shortcode-wrap #wp-submit:hover,
.kml-shortcode-wrap .button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(102, 126, 234, 0.45) !important;
}

.kml-shortcode-wrap #wp-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s ease;
}

.kml-shortcode-wrap #wp-submit:hover::before {
    left: 100%;
}

.kml-shortcode-wrap #nav,
.kml-shortcode-wrap #backtoblog {
    text-align: center;
    margin-top: 20px;
    padding: 0;
}

.kml-shortcode-wrap #nav a,
.kml-shortcode-wrap #backtoblog a {
    color: #667eea !important;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.kml-shortcode-wrap #nav a:hover,
.kml-shortcode-wrap #backtoblog a:hover {
    color: #764ba2 !important;
}

.kml-shortcode-wrap .message,
.kml-shortcode-wrap .success {
    border-left: 4px solid #667eea;
    background: rgba(102, 126, 234, 0.06);
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 13px;
    color: #374151;
    margin-bottom: 20px;
    box-shadow: none;
}

.kml-shortcode-wrap #login_error {
    border-left: 4px solid #ef4444;
    background: rgba(239, 68, 68, 0.06);
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 13px;
    color: #dc2626;
    margin-bottom: 20px;
    box-shadow: none;
}

@media (max-width: 960px) {
    .kml-shortcode-wrap {
        display: block;
    }

    .kml-shortcode-wrap .kml-split-left {
        display: none;
    }

    .kml-shortcode-wrap .kml-split-right {
        width: 100%;
        min-height: 100vh;
        background: linear-gradient(135deg, #0f0f23 0%, #1a1a3e 40%, #2d1b69 70%, #667eea 100%);
        padding: 20px;
    }

    .kml-shortcode-wrap .kml-right-inner {
        padding: 24px 20px;
    }

    .kml-shortcode-wrap .kml-form-title {
        color: #ffffff;
    }

    .kml-shortcode-wrap .kml-form-subtitle {
        color: rgba(255, 255, 255, 0.65);
    }

    .kml-shortcode-wrap #loginform {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }

    .kml-shortcode-wrap #nav a,
    .kml-shortcode-wrap #backtoblog a {
        color: rgba(255, 255, 255, 0.85) !important;
    }

    .kml-shortcode-wrap .kml-footer-text {
        color: rgba(255, 255, 255, 0.5);
    }
}

@media (max-width: 480px) {
    .kml-shortcode-wrap .kml-right-inner {
        padding: 16px 12px;
    }

    .kml-shortcode-wrap #loginform {
        padding: 24px 20px;
        border-radius: 16px;
    }

    .kml-shortcode-wrap .kml-form-title {
        font-size: 24px;
    }

    .kml-shortcode-wrap #wp-submit,
    .kml-shortcode-wrap .button-primary {
        height: 46px;
        font-size: 14px !important;
    }
}
