:root {
    --primary: #4f46e5;
    --primary-light: #818cf8;
    --primary-bg: #eef2ff;
    --secondary: #0ea5e9;
    --bg-body: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-light: #e2e8f0;
    --danger: #ef4444;
    --danger-bg: #fef2f2;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
    min-height: 100vh;
    background-color: var(--bg-body);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
    position: relative;
}

/* --- BACKGROUND DECORATION --- */
.bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.5;
    animation: float 15s infinite alternate ease-in-out;
}

.shape-1 {
    top: -10%;
    left: -5%;
    width: 40vw;
    height: 40vw;
    background: var(--primary-bg);
}

.shape-2 {
    bottom: -10%;
    right: -5%;
    width: 35vw;
    height: 35vw;
    background: #e0f2fe;
    animation-delay: -5s;
}

/* --- MAIN CONTAINER --- */
.split-container {
    display: flex;
    width: 100%;
    max-width: 1100px;
    background: var(--card-bg);
    border-radius: 30px;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(15, 23, 42, 0.02);
    overflow: hidden;
    min-height: 600px;
    opacity: 0;
    animation: scaleIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* --- LEFT SIDE (HERO / 3D IMAGE) --- */
.login-left {
    flex: 1.2;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    color: white;
    overflow: hidden;
}

.left-content {
    position: relative;
    z-index: 2;
    text-align: center;
    animation: slideRight 1s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.2s;
    opacity: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.img-3d-wrapper {
    margin-bottom: 40px;
    perspective: 1200px;
    display: flex;
    justify-content: center;
    width: 100%;
}

.img-3d {
    width: 100%;
    max-width: 380px;
    animation: float3DMax 5s infinite cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 25px 35px rgba(0, 0, 0, 0.3));
    transform-style: preserve-3d;
    will-change: transform;
}

.left-content h2 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 15px;
    letter-spacing: -1px;
    line-height: 1.2;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.left-content p {
    font-size: 17px;
    font-weight: 500;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.95);
    max-width: 400px;
    margin: 0 auto;
}

/* Ornamen Lingkaran di Kiri */
.circle-ornament {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    z-index: 1;
}

.circle-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    left: -100px;
    animation: pulseRing 8s infinite;
}

.circle-2 {
    width: 200px;
    height: 200px;
    bottom: -50px;
    right: -50px;
    animation: pulseRing 6s infinite reverse;
}

/* --- RIGHT SIDE (FORM LOGIN) --- */
.login-right {
    flex: 1;
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--card-bg);
    position: relative;
}

.right-content {
    max-width: 380px;
    width: 100%;
    margin: 0 auto;
}

.login-header {
    margin-bottom: 35px;
    animation: slideUp 0.8s forwards 0.4s;
    opacity: 0;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 28px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
    margin-bottom: 10px;
}

.logo i {
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 10px;
    border-radius: 12px;
    font-size: 20px;
    box-shadow: 0 10px 20px -5px rgba(79, 70, 229, 0.4);
    animation: bounceIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.8s;
    opacity: 0;
}

.logo span {
    color: var(--primary);
}

.login-header p {
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 500;
}

/* --- INPUT GROUPS --- */
.input-group {
    margin-bottom: 22px;
    position: relative;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-main);
    font-weight: 700;
    font-size: 13px;
    transition: color 0.3s;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i.icon-left {
    position: absolute;
    left: 18px;
    color: #94a3b8;
    font-size: 16px;
    transition: all 0.3s ease;
    z-index: 2;
}

.input-wrapper input {
    width: 100%;
    padding: 15px 16px 15px 50px;
    background: #f8fafc;
    border: 1.5px solid var(--border-light);
    border-radius: 16px;
    font-size: 15px;
    color: var(--text-main);
    transition: all 0.3s ease;
    font-weight: 500;
}

.input-wrapper input:focus {
    outline: none;
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-bg), 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.input-wrapper input:focus+i.icon-left,
.input-wrapper input:not(:placeholder-shown)+i.icon-left {
    color: var(--primary);
    transform: scale(1.1);
}

.input-wrapper input::placeholder {
    color: #cbd5e1;
    font-weight: 400;
}

.toggle-password {
    position: absolute;
    right: 18px;
    cursor: pointer;
    color: #94a3b8;
    font-size: 16px;
    transition: all 0.2s;
    padding: 5px;
    z-index: 2;
}

.toggle-password:hover {
    color: var(--primary);
}

/* --- BUTTON --- */
.btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary) 0%, #3730a3 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 20px -5px rgba(79, 70, 229, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-login::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: skewX(-20deg);
    transition: 0.5s ease;
}

.btn-login:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px -5px rgba(79, 70, 229, 0.5);
}

.btn-login:hover::after {
    left: 150%;
}

.btn-login:active {
    transform: translateY(1px);
}

.btn-login i {
    transition: transform 0.3s;
}

.btn-login:hover i {
    transform: translateX(5px);
}

/* --- ALERTS --- */
.alert {
    background-color: var(--danger-bg);
    color: #b91c1c;
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 25px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #fecaca;
    animation: shake 0.5s ease-in-out forwards;
}

.alert i {
    font-size: 18px;
}

.login-footer {
    text-align: center;
    margin-top: 40px;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

/* --- STAGGERED ANIMATION CLASSES --- */
.stagger-1 {
    animation: slideUp 0.6s forwards 0.5s;
    opacity: 0;
}

.stagger-2 {
    animation: slideUp 0.6s forwards 0.6s;
    opacity: 0;
}

.stagger-3 {
    animation: slideUp 0.6s forwards 0.7s;
    opacity: 0;
}

.stagger-4 {
    animation: slideUp 0.6s forwards 0.8s;
    opacity: 0;
}

/* --- KEYFRAMES --- */
@keyframes scaleIn {
    0% {
        transform: scale(0.95) translateY(20px);
        opacity: 0;
    }

    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

@keyframes slideUp {
    0% {
        transform: translateY(30px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideRight {
    0% {
        transform: translateX(-50px);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes float {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(30px, 30px);
    }
}

@keyframes float3DMax {

    0%,
    100% {
        transform: translateY(0) rotateX(0) rotateY(0);
    }

    25% {
        transform: translateY(-20px) rotateX(6deg) rotateY(10deg);
    }

    50% {
        transform: translateY(-35px) rotateX(0) rotateY(18deg);
    }

    75% {
        transform: translateY(-20px) rotateX(-6deg) rotateY(10deg);
    }
}

@keyframes pulseRing {
    0% {
        transform: scale(1);
        opacity: 0.1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.2;
    }

    100% {
        transform: scale(1);
        opacity: 0.1;
    }
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    50% {
        transform: translateX(5px);
    }

    75% {
        transform: translateX(-5px);
    }
}