/* ============================================
   ilmCode Smart Parking — Premium Login Page
   Dark Glassmorphism Design
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* === Full Page === */
/* Override WordPress theme body/wrapper when login page is active */
body:has(.spl-page),
html:has(.spl-page) {
    background: #0B0F1A !important;
    margin: 0 !important;
    padding: 0 !important;
}

body:has(.spl-page) #page,
body:has(.spl-page) #content,
body:has(.spl-page) .site-content,
body:has(.spl-page) .entry-content,
body:has(.spl-page) .page-content,
body:has(.spl-page) main,
body:has(.spl-page) article,
body:has(.spl-page) .wp-block-post-content {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    background: transparent !important;
}

body:has(.spl-page) header,
body:has(.spl-page) footer,
body:has(.spl-page) .site-header,
body:has(.spl-page) .site-footer,
body:has(.spl-page) nav,
body:has(.spl-page) .wp-site-blocks>header,
body:has(.spl-page) .wp-site-blocks>footer {
    display: none !important;
}

.spl-page {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #0B0F1A;
    overflow: hidden;
    margin: -20px -20px 0 -20px;
    width: calc(100% + 40px);
}

/* === Animated Background Orbs === */
.spl-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.spl-bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: orbFloat 15s ease-in-out infinite;
}

.spl-orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #6366F1, transparent 70%);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.spl-orb-2 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, #8B5CF6, transparent 70%);
    bottom: -80px;
    left: -80px;
    animation-delay: -5s;
}

.spl-orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #06B6D4, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
    opacity: 0.2;
}

@keyframes orbFloat {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(30px, -40px) scale(1.1);
    }

    50% {
        transform: translate(-20px, 20px) scale(0.95);
    }

    75% {
        transform: translate(40px, 30px) scale(1.05);
    }
}

/* === Login Card === */
.spl-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    background: rgba(17, 24, 39, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 25px 50px rgba(0, 0, 0, 0.4),
        0 0 100px rgba(99, 102, 241, 0.08);
    animation: cardIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* === Brand Section === */
.spl-brand {
    text-align: center;
    margin-bottom: 40px;
}

.spl-logo {
    display: inline-block;
    margin-bottom: 16px;
    animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {

    0%,
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.3));
    }

    50% {
        transform: scale(1.04);
        filter: drop-shadow(0 0 16px rgba(99, 102, 241, 0.5));
    }
}

.spl-logo svg {
    display: block;
}

.spl-title {
    margin: 0 0 6px 0;
    font-size: 26px;
    font-weight: 800;
    color: #F1F5F9;
    letter-spacing: -0.5px;
}

.spl-subtitle {
    margin: 0;
    font-size: 14px;
    font-weight: 400;
    color: #64748B;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* === Messages === */
.spl-error,
.spl-success {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 24px;
    animation: msgIn 0.3s ease;
}

@keyframes msgIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.spl-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #FCA5A5;
}

.spl-error svg {
    flex-shrink: 0;
    margin-top: 1px;
}

.spl-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #6EE7B7;
}

.spl-success svg {
    flex-shrink: 0;
    margin-top: 1px;
}

/* === Form Fields === */
.spl-field {
    margin-bottom: 20px;
}

.spl-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #94A3B8;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.spl-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.spl-input-icon {
    position: absolute;
    left: 14px;
    color: #475569;
    pointer-events: none;
    transition: color 0.2s;
    z-index: 1;
}

.spl-input-wrap input {
    width: 100%;
    padding: 14px 14px 14px 44px;
    background: rgba(15, 23, 42, 0.6);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: #E2E8F0;
    font-size: 15px;
    font-family: inherit;
    font-weight: 400;
    transition: all 0.25s ease;
    box-sizing: border-box;
    outline: none;
}

.spl-input-wrap input::placeholder {
    color: #475569;
}

.spl-input-wrap input:focus {
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1), 0 0 20px rgba(99, 102, 241, 0.05);
}

.spl-input-wrap input:focus~.spl-input-icon,
.spl-input-wrap:focus-within .spl-input-icon {
    color: #818CF8;
}

/* Password toggle eye */
.spl-eye {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #475569;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    border-radius: 8px;
    transition: color 0.2s;
}

.spl-eye:hover {
    color: #94A3B8;
}

/* === Remember Me === */
.spl-options {
    margin-bottom: 24px;
}

.spl-check {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #94A3B8;
    cursor: pointer;
    user-select: none;
}

.spl-check input {
    display: none;
}

.spl-checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 5px;
    position: relative;
    transition: all 0.2s;
    flex-shrink: 0;
}

.spl-check input:checked+.spl-checkmark {
    background: #6366F1;
    border-color: #6366F1;
}

.spl-check input:checked+.spl-checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* === Submit Button === */
.spl-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, #A855F7 100%);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

.spl-submit::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.5s;
}

.spl-submit:hover::before {
    transform: translateX(100%);
}

.spl-submit:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 25px rgba(99, 102, 241, 0.35),
        0 0 40px rgba(139, 92, 246, 0.15);
}

.spl-submit:active {
    transform: translateY(0);
}

.spl-submit:disabled {
    opacity: 0.75;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.spl-btn-loader {
    display: flex;
    align-items: center;
    gap: 8px;
}

.spl-spinner {
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* === Footer === */
.spl-footer {
    text-align: center;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.spl-footer p {
    margin: 0;
    font-size: 12px;
    color: #475569;
}

.spl-footer strong {
    color: #6366F1;
    font-weight: 700;
}

/* === Responsive === */
@media (max-width: 480px) {
    .spl-card {
        padding: 36px 24px;
        border-radius: 20px;
    }

    .spl-title {
        font-size: 22px;
    }

    .spl-orb-1,
    .spl-orb-2,
    .spl-orb-3 {
        width: 200px;
        height: 200px;
    }
}

/* === Override WordPress theme styles === */
.spl-page * {
    box-sizing: border-box;
}

.spl-page input:focus {
    outline: none !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1), 0 0 20px rgba(99, 102, 241, 0.05) !important;
}