* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

:root {
    --primary-color: #007bff;
    --primary-hover: #0056b3;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
}

body {
    background: rgb(242,246,255);
    background: linear-gradient(0deg, rgba(242,246,255,1) 46%, rgba(255,255,255,1) 85%);
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.container {
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2),
                0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 100%;
    max-width: 1100px;
    min-height: 600px;
    display: flex;
    overflow: hidden;
}

/* Slider Section */
.slider-section {
    flex: 1;
    display: none;
    position: relative;
}

.slider-wrapper {
    height: 100%;
    position: relative;
}

.slider {
    height: 100%;
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;  /* untuk IE dan Edge */
}

.slider::-webkit-scrollbar {
    display: none;
}

.slider img {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    scroll-snap-align: start;
    scroll-snap-stop: always;  /* memastikan scroll berhenti tepat pada gambar */
}

.slider-nav {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: 0.3s ease;
}

.dot.active {
    background: white;
    transform: scale(1.2);
}

/* Auth Section */
.auth-section {
    flex: 1;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 3.5rem;
}

.brand img {
    width: 35px;
    height: 35px;
    cursor: pointer;
}

.brand h1 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-hover);
}

.auth-container {
    max-width: 400px;
    width: 100%;
    margin: 0 auto;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

#adminLogin {
    position: absolute;
    top: 131px;  
    left: 0;
    right: 0;
    margin: 0 auto;
    max-width: 400px;
    width: 100%;
    transform: translateX(-100%);
    opacity: 0;
    padding: 0 0.5rem;
}

h2 {
    font-size: 1.6rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.subtitle {
    color: var(--text-light);
    margin-bottom: 2rem;
}

.divider {
    text-align: left;
    position: relative;
    color: var(--text-dark);
    font-size: 1.15rem;
    font-weight: 550;
    margin: 2.25rem 0 30px;
}

.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    outline: none;
    font-size: 1rem;
    transition: 0.3s ease;
}

.input-group label {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    transition: 0.3s ease;
    pointer-events: none;
    background: white;
    padding: 0 0.25rem;
}

.input-group input:focus,
.input-group input:valid {
    border-color: var(--primary-color);
}

.input-group input:focus + label,
.input-group input:valid + label {
    top: 0;
    font-size: 0.875rem;
    color: var(--primary-color);
}

.input-group input:focus + label,
.input-group input:valid + label {  
    top: 0;
    font-size: 0.875rem;
    color: var(--primary-color);
}

.login-btn {
    width: 100%;
    padding: 0.75rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.3s ease;
    margin-top: 1.2rem;
}

.login-btn:hover {
    background: var(--primary-hover);
}

.error-message {
    color: #ff0000;
    font-size: 14px;
}

.success-message {
    color: #28a745;
    font-size: 14px;
}

.error-message,
.success-message {
    font-weight: 500;
    margin-top: -15px;
    margin-bottom: 25px;
    text-align: center;
}

.admin-mode #userLogin {
    transform: translateX(100%);
    opacity: 0;
}

.admin-mode #adminLogin {
    transform: translateX(0);
    opacity: 1;
}

@media (min-width: 885px) {
    .slider-section {
        display: block;
    }
}

@media screen and (max-width: 476px) {
    #adminLogin {
        padding: 0 2.5rem;
    }
}

@media screen and (max-width: 376px) {
    body {
        padding: 10px;
    }

    .auth-section {
        padding: 2rem;
    }

    #adminLogin {
        top: 84px;
        margin-top: 30px;
        padding: 0 2rem;
    }

    #adminLogin .login-form {
        margin-top: 20px;
    }

    #adminLogin .input-group {
        margin-bottom: 28px;
    }

    #adminLogin .input-group input {
        width: 100%;
        padding: 12px;
        font-size: 14px;
    }

    #adminLogin .login-btn {
        width: 100%;
        padding: 12px;
        font-size: 14px;
    }
}

/* Spinner Animation */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
    vertical-align: middle;
}

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

.login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-btn:disabled {
    background: var(--primary-hover);
    cursor: not-allowed;
}