/* ==============================================
 * login.css
 * Styles untuk halaman Login (index.html)
 * ============================================== */

:root {
    --primary: #ec4899;
    --primary-dark: #be185d;
    --gradient-1: linear-gradient(135deg, #ec4899 0%, #8b5cf6 50%, #06b6d4 100%);
    --gradient-2: linear-gradient(135deg, #f472b6 0%, #a855f7 50%, #38bdf8 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 25%, #581c87 50%, #831843 75%, #be123c 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* ===== ANIMATED WAVE BACKGROUND ===== */
.wave-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23ec4899' fill-opacity='0.15' d='M0,160L48,176C96,192,192,224,288,213.3C384,203,480,149,576,128C672,107,768,117,864,149.3C960,181,1056,235,1152,234.7C1248,235,1344,181,1392,154.7L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E") repeat-x;
    background-size: 50% 100%;
    animation: waveMove 20s linear infinite;
    opacity: 0.6;
}

.wave:nth-child(1) {
    bottom: 0;
    animation-duration: 20s;
    opacity: 0.3;
}

.wave:nth-child(2) {
    bottom: 10%;
    animation-duration: 15s;
    animation-direction: reverse;
    opacity: 0.2;
    filter: hue-rotate(30deg);
}

.wave:nth-child(3) {
    bottom: 5%;
    animation-duration: 25s;
    opacity: 0.25;
    filter: hue-rotate(-20deg);
}

@keyframes waveMove {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* ===== FLOATING PARTICLES ===== */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    animation: floatUp 15s linear infinite;
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-10vh) scale(1);
        opacity: 0;
    }
}

/* ===== GLOWING ORB ===== */
.glow-orb {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.3) 0%, transparent 70%);
    filter: blur(60px);
    z-index: 0;
    animation: orbFloat 10s ease-in-out infinite;
}

.glow-orb.orb-1 {
    top: -200px;
    right: -200px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.4) 0%, transparent 70%);
}

.glow-orb.orb-2 {
    bottom: -300px;
    left: -200px;
    animation-delay: -5s;
}

@keyframes orbFloat {

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

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

/* ===== LOGIN CARD ===== */
.login-container {
    position: relative;
    z-index: 10;
    display: flex;
    width: 950px;
    min-height: 580px;
    height: auto;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

/* ===== LEFT PANEL (BRANDING) ===== */
.left-panel {
    flex: 1.2;
    background: url('../assets/media/cover depan.png') no-repeat center center;
    background-size: 100% 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px;
    position: relative;
    overflow: hidden;
}

.left-panel::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(30, 27, 75, 0.4), rgba(131, 24, 67, 0.4));
    z-index: 1;
}

.login-logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.login-logo-container img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.brand-title {
    font-size: 52px;
    font-weight: 800;
    color: white;
    line-height: 1.1;
    margin-bottom: 20px;
    z-index: 1;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.brand-desc {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
    max-width: 85%;
    z-index: 1;
}

.feature-list {
    margin-top: 40px;
    z-index: 1;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    margin-bottom: 12px;
}

.feature-item i {
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* ===== RIGHT PANEL (FORM) ===== */
.right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 30px 45px;
    background: rgba(255, 255, 255, 0.95);
}

.login-header {
    margin-bottom: 20px;
    text-align: center;
}

.login-header h2 {
    font-size: 28px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 8px;
}

.login-header p {
    color: #64748b;
    font-size: 14px;
}

/* Alert Error */
#alertBox {
    color: #dc2626;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
    display: none;
    border: 1px solid #fecaca;
    animation: shake 0.5s ease;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20%,
    60% {
        transform: translateX(-5px);
    }

    40%,
    80% {
        transform: translateX(5px);
    }
}

/* Form Input */
.input-group {
    margin-bottom: 12px;
}

.input-group label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper > i:not(.toggle-password) {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 18px;
    transition: 0.3s;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 12px 12px 45px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: all 0.3s;
    background: #f8fafc;
}

.input-wrapper #password {
    padding-right: 45px;
}

.input-wrapper > i.toggle-password {
    position: absolute;
    right: 16px !important;
    left: auto !important;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 18px;
    cursor: pointer;
    transition: 0.3s;
    z-index: 10;
}

.input-wrapper > i.toggle-password:hover {
    color: var(--primary);
}

.input-wrapper input:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.1);
}

.input-wrapper input:focus + i,
.input-wrapper:focus-within > i:not(.toggle-password) {
    color: var(--primary);
}

/* Login Button */
.btn-login {
    width: 100%;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-1);
    background-size: 200% 200%;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
    position: relative;
    overflow: hidden;
    padding: 0;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: 0.5s;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(236, 72, 153, 0.4);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-login.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* Footer */
.login-footer {
    margin-top: 15px;
    text-align: center;
    color: #94a3b8;
    font-size: 11px;
}

/* ===== LOADING OVERLAY ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.loading-box {
    background: white;
    padding: 30px 40px;
    border-radius: 20px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.loading-text {
    font-weight: 700;
    color: #1e293b;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 900px) {
    .login-container {
        flex-direction: column;
        width: 90%;
        max-width: 450px;
        height: auto;
    }

    .left-panel {
        height: 200px;
        padding: 40px;
    }

    .right-panel {
        padding: 40px;
    }
}
