/* 1. KONTROL UKURAN HALAMAN DAN NO SCROLL */
html,
body {
    height: 100%;
    margin: 0;
    background-color: #f7f7f7;
    padding: 0;
    overflow: hidden; /* Mencegah scrolling halaman */
    font-family: "Inter", sans-serif; /* Menggunakan font yang umum dan bersih */
}

.container-fluid,
.row {
    height: 100%;
    margin: 5px;
    padding: 0;
}

/* 2. LEFT SECTION (ORANGE BACKGROUND) */
.login-left {
    background-color: #f7f7f7;
    /* border: solid 1px #ff8c00; */
    position: relative;
    height: 97vh; /* Memastikan 100% tinggi viewport */
    display: flex;
    justify-content: center;
    align-items: center;
    color: black;
    text-align: center;
    padding: 20px;
    /* Add these properties for the rounded effect */
    border-radius: 30px;
    overflow: hidden;
    top: 2;
}

.login-left svg {
    width: 100%;
    height: 100%;
}

/* Left Section Content */
.left-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
    height: 100%;
    max-height: 100%;
    padding: 0;
    box-sizing: border-box;
    gap: 0;
    margin-top: 45px;
}

.title-text {
    font-weight: 700;
}

.login-title {
    margin-bottom: 0;
    text-align: center;
}

.login-title + .dashboard-preview {
    margin-top: -45px;
}

.dashboard-preview {
    width: 100%;
    max-width: 100%;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.dashboard-preview img {
    width: 450px;
    height: 100%;
    max-width: 100%;
    max-height: 70%;
    object-fit: contain;
    object-position: center;
}

.left-text {
    text-align: center;
    width: 100%;
    max-width: 100%;
    flex-shrink: 0;
}

.left-text h2 {
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}

.left-text p {
    font-size: clamp(14px, 2vw, 16px);
    line-height: 1.6;
    opacity: 0.95;
}

/* 3. RIGHT SECTION (LOGIN FORM) */
.login-right {
    background-color: #fff;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Posisikan konten di tengah vertikal */
    align-items: center; /* Posisikan konten di tengah horizontal */
    padding: 40px;
    position: relative;
}

.login-content {
    max-width: 400px;
    width: 100%;
    text-align: left;
}

/* 4. LOGO & ADMIN PANEL TEXT */
.login-logo {
    position: absolute;
    right: 20px;
    top: 5px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.login-logo svg {
    width: 131px;
    height: 41px;
}

.login-logo .admin-text {
    color: #5b677d;
    font-size: 16px;
    font-weight: 600;
    margin-left: 10px;
}

/* 5. FORM STYLING */
.error-message {
    color: red;
    font-size: 0.9em;
}

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

.group {
    position: relative;
}

/* Icon di kiri (fa-user, fa-lock) */
.group i.fa-user,
.group i.fa-lock {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 16px;
    z-index: 2;
}

/* Icon toggle password di kanan */
.password-input-container .password-toggle-icon {
    position: absolute;
    right: 15px; /* FIXED: Changed from 50px to 15px */
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 16px;
    cursor: pointer;
    z-index: 2;
    transition: color 0.2s;
}

.password-input-container .password-toggle-icon:hover {
    color: #ff8c00;
}

/* Styling untuk input group (jika ada) */
.input-group .password-toggle-icon,
.input-group .input-group-text.password-toggle-icon {
    position: static;
    color: #999;
    z-index: 10;
    font-size: 16px;
    cursor: pointer;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.75rem;
    background: transparent;
    border-left: 0;
    border-right: 0;
}

.input-group .password-toggle-icon:hover,
.input-group-text.password-toggle-icon:hover {
    color: #ff8c00;
}

/* Form control dengan padding yang tepat */
.form-control {
    height: 50px;
    padding-left: 45px;   /* Space untuk icon kiri */
    padding-right: 45px;  /* FIXED: Changed from 60px to 45px */
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: none;
    transition: border-color 0.3s, box-shadow 0.2s;
    margin-left: 0;
}

/* Reset padding untuk input dalam input-group */
.login-right .input-group .form-control,
.input-group .form-control {
    padding-left: 12px;
    padding-right: 12px;
}

/* Validation states for Login input-group (scoped to right-side login area) */
/* Red for invalid */
.form-control.has-error {
    border-color: #dc3545;
}

.login-right .form-control.is-invalid:focus {
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Green for valid */
.login-right .form-control.is-valid {
    border-color: #28a745;
}

.login-right .form-control.is-valid:focus {
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Keep default borders on append/prepend icons in normal state */
.login-right .input-group-prepend .input-group-text,
.login-right .input-group-append .input-group-text {
    border-color: #e0e0e0;
}

.form-control:focus {
    border-color: #ff8c00; /* Border oranye saat focus */
    box-shadow: 0 0 0 0.2rem rgba(255, 140, 0, 0.25);
}

/* Error feedback positioning - Tidak menggeser icon */
.invalid-feedback {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
    position: relative;
}

/* Styling tombol login */
.btn-login {
    width: 100%;
    height: 50px;
    background-color: #ff8c00; /* Warna tombol oranye */
    color: white;
    font-weight: bold;
    border-radius: 8px;
    border: none;
    transition: background-color 0.3s;
}

.btn-login:hover {
    background-color: #e67e00;
    color: white;
}

/* Typography */
h4 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
    color: #0f172a;
}

.text-muted {
    margin-bottom: 30px;
    color: #5b677d !important;
}

/* 6. FOOTER COPYRIGHT */
.footer {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: #888;
    font-size: 13px;
    width: 100%;
}

/* ===========================
   RESPONSIVE MEDIA QUERIES
   =========================== */

@media (max-width: 1200px) {
    .dashboard-preview {
        width: 85%;
        max-width: 500px;
    }

    .left-content {
        padding: 15px;
    }
}

@media (max-width: 992px) {
    .login-title + .dashboard-preview {
        margin-top: 0;
    }

    .dashboard-preview img {
        max-height: 50vh;
    }

    .left-text h2 {
        font-size: 28px;
    }

    .left-text p {
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .login-left {
        display: none;
    }

    .login-card {
        height: auto;
        aspect-ratio: unset;
        padding: 0;
    }

    .login-right {
        border-radius: 20px;
        padding: 0px 20px 60px 20px;
        width: 100%;
    }

    .btn-login {
        height: 42px;
    }

    .login-logo {
        right: unset;
        top: 10px;
    }
    
    .form-control {
        height: 40px;
        padding-left: 38px !important;
        padding-right: 40px !important; /* FIXED: Changed from 60px to 40px */
    }

    .input-group .form-control {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
}

/* FIX: Hapus icon alert bawaan Bootstrap/AdminLTE di dalam input saat error */
.form-control.is-valid,
.form-control.is-invalid {
    background-image: none !important;
}

/* Atau lebih spesifik untuk login form saja */
.login-right .form-control.is-valid,
.login-right .form-control.is-invalid {
    background-image: none !important;
    padding-right: 45px !important;
}
