:root {
    --primary: #1e4e9d;
    --secondary: #ffc107;
    --light: #f8f9fa;
    --dark: #343a40;
    --accent: #f8f9fa;
    --sidebar-bg: #1e4e9d;
    --sidebar-hover: #2a5bb5;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
    /* Mencegah pull-to-refresh di mobile */
    overscroll-behavior: none;
    -webkit-overflow-scrolling: touch;
}

.login-container {
    display: flex;
    height: 100vh;
}

.login-left {
    width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    background-color: white;
}

.login-right {
    width: 50%;
    background: linear-gradient(135deg, var(--primary), #3a73d1);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.login-right::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/etc/img/gedung-mip.png');
    background-size: cover;
    background-position: center;
    opacity: 0.4;
    z-index: 0;
}

.login-right-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 80%;
}

.login-form {
    width: 100%;
    max-width: 400px;
}

.login-logo {
    display: flex;
    margin-bottom: 30px;
    justify-content: center;
    align-items: center;
}

.login-logo i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.login-logo h2 {
    color: var(--primary);
    font-weight: 700;
    margin: 0;
}

.nav-tabs {
    border-bottom: none;
    margin-bottom: 25px;
    width: 100%;
}

.nav-tabs .nav-link {
    color: #6c757d;
    font-weight: 600;
    border: none;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    padding: 10px 20px;
    margin-right: 15px;
}

.nav-tabs .nav-link:hover {
    border-bottom: 3px solid var(--secondary);
    color: var(--primary);
}

.nav-tabs .nav-link.active {
    color: var(--primary);
    background-color: transparent;
    border-bottom: 3px solid var(--primary);
}

.form-group {
    margin-bottom: 20px;
}

.form-control {
    border-radius: 8px;
    border: 1px solid #ddd;
    padding: 12px 15px;
    font-size: 1rem;
    height: auto;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(30, 78, 157, 0.25);
}

.input-group-text {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 8px 0 0 8px;
    color: var(--primary);
}

.btn-login {
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s;
}

.btn-login:hover {
    background-color: #2a5bb5;
    color: white;
}

.login-options {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    font-size: 0.9rem;
}

.login-options a {
    color: var(--primary);
    text-decoration: none;
}

.login-options a:hover {
    text-decoration: underline;
}

.app-info {
    margin-bottom: 30px;
}

.app-info h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.app-info p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.app-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.feature-item i {
    font-size: 1.5rem;
    margin-right: 10px;
    color: var(--secondary);
}

.divider {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.3);
    width: 80%;
    margin: 20px 0;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
    color: #6c757d;
}

.is-invalid {
    border-color: #dc3545 !important;
}

.text-danger.small {
    font-size: 0.875em;
    margin-top: 0.25rem;
    display: block;
}

.dropdown-menu {
    max-height: 200px; /* Adjust as needed */
    overflow-y: auto; /* Enables vertical scrolling when content exceeds max-height */
}

/* Media queries untuk perangkat mobile */
@media (max-width: 767px) {
    /* Untuk ponsel (portrait dan landscape) */
    .login-container {
        flex-direction: column;
    }
    
    .login-left, .login-right {
        width: 100%;
    }
    
    .login-right {
        display: none !important;
    }
    
    /* Posisi form di tengah untuk perangkat mobile */
    .login-left {
        padding: 20px;
        justify-content: center;
        /* Menggunakan flexbox untuk memposisikan form di tengah */
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        height: 100vh;
        /* Mencegah scroll pada body */
        overflow: hidden;
    }
    
    .login-form {
        width: 100%;
        max-width: 350px;
        /* Memastikan form berada di tengah */
        margin: 0 auto;
    }
    
    /* Menyesuaikan logo untuk mobile */
    .login-logo {
        margin-bottom: 20px;
    }
    
    .login-logo img {
        width: 80px !important;
    }
    
    /* Menyesuaikan ukuran font untuk mobile */
    .app-info h1 {
        font-size: 1.8rem;
    }
    
    .app-info p {
        font-size: 1rem;
    }
    
    /* Mengatur opsi login untuk mobile */
    .login-options {
        flex-direction: column;
        gap: 10px;
        align-items: center;
        margin-top: 20px;
    }
    
    /* Menyesuaikan footer untuk mobile */
    .login-footer {
        position: absolute;
        bottom: 20px;
        width: 100%;
        max-width: 350px;
    }
}

/* Media queries untuk tablet */
@media (min-width: 768px) and (max-width: 1023px) {
    /* Untuk tablet (portrait dan landscape) */
    .login-container {
        flex-direction: row;
    }
    
    .login-left, .login-right {
        width: 50%;
    }
    
    .login-right {
        display: flex !important;
    }
    
    .login-left, .login-right {
        padding: 30px;
    }
    
    .app-info h1 {
        font-size: 2.2rem;
    }
    
    .app-info p {
        font-size: 1.1rem;
    }
}

/* Media queries untuk desktop */
@media (min-width: 1024px) {
    /* Untuk desktop dan laptop */
    .login-container {
        flex-direction: row;
    }
    
    .login-left, .login-right {
        width: 50%;
    }
    
    .login-right {
        display: flex !important;
    }
    
    .app-info h1 {
        font-size: 3rem;
    }
    
    .app-info p {
        font-size: 1.2rem;
    }
}

/* Perbaikan untuk mencegah refresh dengan swipe down di Android */
@media (max-width: 767px) and (orientation: portrait) {
    html, body {
        position: fixed;
        overflow: hidden;
        width: 100%;
        height: 100%;
    }
    
    .login-container {
        height: 100vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Perbaikan untuk perangkat dengan layar kecil */
@media (max-width: 480px) {
    .login-logo img {
        width: 100px !important;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .login-form {
        max-width: 320px;
    }
    
    .app-info h1 {
        font-size: 1.5rem;
    }
    
    .app-info p {
        font-size: 0.9rem;
    }
    
    .login-footer {
        font-size: 0.8rem;
    }
}

/* Perbaikan untuk tampilan landscape di perangkat mobile */
@media (max-width: 767px) and (orientation: landscape) {
    .login-left {
        padding: 15px;
    }
    
    .login-logo {
        margin-bottom: 15px;
    }
    
    .login-logo img {
        width: 90px !important;
    }
    
    .login-form {
        max-width: 300px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    .login-options {
        margin-top: 15px;
    }
}