* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100dvh; /* ✅ PERBAIKAN */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    position: relative;
    overflow: hidden; /* ✅ tambahkan ini juga */
}

/* Background Gedung Sekolah dengan Overlay Biru */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/bg-login.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.15;
    z-index: 0;
}

/* Animated Background Pattern */
body::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: moveBackground 20s linear infinite;
    z-index: 0;
}

@keyframes moveBackground {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.login-container {
    display: flex;
    max-width: 1200px;
    width: 100%;
    background: white;
    border-radius: 25px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    position: relative;
    z-index: 1;
    animation: fadeIn 0.8s ease-out;
    flex-direction: column;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Login Box - Bagian Atas */
.login-box {
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: white;
    position: relative;
    width: 100%;
}

.logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: block;
    border-radius: 50%;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    padding: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 12px 35px rgba(102, 126, 234, 0.5);
    }
}

h2 {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 30px;
    letter-spacing: 1px;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 18px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    justify-content: left;
}

.checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    margin-right: 8px;
    accent-color: #667eea;
}

.checkbox-group label {
    font-size: 14px;
    color: #666;
    cursor: pointer;
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.6);
}

.error-message {
    background: #fff3cd;
    color: #856404;
    padding: 10px 15px;
    border-radius: 10px;
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    border-left: 4px solid #ffc107;
}

/* Login Illustration - Bagian Bawah */
.login-illustration {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px 20px;
    position: relative;
    width: 100%;
}

.login-illustration img {
    max-width: 90%;
    height: auto;
    max-height: 250px;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
    margin-bottom: 20px;
}

.illustration-text {
    color: white;
    text-align: center;
}

.illustration-text h3 {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.illustration-text p {
    font-size: 14px;
    line-height: 1.5;
    opacity: 0.95;
}

/* DESKTOP & LAPTOP (>= 969px) */
@media (min-width: 969px) {
    .login-container {
        flex-direction: row;
        border-radius: 25px;
    }

    .login-box {
        padding: 60px 50px;
        width: 50%;
    }

    .login-illustration {
        width: 50%;
        padding: 60px 40px;
    }

    .logo {
        width: 100px;
        height: 100px;
        margin-bottom: 30px;
    }

    h2 {
        font-size: 32px;
        margin-bottom: 40px;
    }

    .login-illustration img {
        max-height: 400px;
        max-width: 100%;
    }

    .illustration-text h3 {
        font-size: 28px;
    }

    .illustration-text p {
        font-size: 16px;
    }
}

/* TABLET (768px - 968px) */
@media (min-width: 768px) and (max-width: 968px) {
    .login-box {
        padding: 50px 40px;
    }

    .logo {
        width: 90px;
        height: 90px;
    }

    h2 {
        font-size: 28px;
    }

    .login-illustration img {
        max-height: 300px;
    }
}

/* HP & CHROMEBOOK KECIL (< 768px) */
@media (max-width: 767px) {
    body {
        padding: 5px;
    }

    .login-container {
        border-radius: 15px;
    }

    .login-box {
        padding: 30px 20px;
    }

    .logo {
        width: 70px;
        height: 70px;
        margin-bottom: 15px;
    }

    h2 {
        font-size: 20px;
        margin-bottom: 25px;
    }

    .input-group input {
        padding: 10px 12px;
        font-size: 14px;
    }

    .login-btn {
        padding: 12px;
        font-size: 14px;
    }

    .login-illustration {
        padding: 20px 15px;
    }

    .login-illustration img {
        max-height: 200px;
    }

    .illustration-text h3 {
        font-size: 18px;
    }

    .illustration-text p {
        font-size: 13px;
    }
}

/* TV 72 INCH & LARGE SCREENS (>= 1920px) */
@media (min-width: 1920px) {
    .login-container {
        max-width: 1400px;
        border-radius: 30px;
    }

    .login-box {
        padding: 80px 70px;
    }

    .logo {
        width: 130px;
        height: 130px;
        margin-bottom: 40px;
    }

    h2 {
        font-size: 40px;
        margin-bottom: 50px;
    }

    .input-group input {
        padding: 18px 25px;
        font-size: 18px;
    }

    .login-btn {
        padding: 20px;
        font-size: 20px;
    }

    .login-illustration {
        padding: 80px 60px;
    }

    .login-illustration img {
        max-height: 500px;
    }

    .illustration-text h3 {
        font-size: 36px;
    }

    .illustration-text p {
        font-size: 18px;
    }
    
    html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}
}