/* ================================================= */
/* GLOBAL STYLES & FULL BACKGROUND BODY */
/* ================================================= */

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

    /* BACKGROUND UTAMA: Gambar penuh di body (WEB: COVER) */
    background-image: url("/cas/themes/lkpp/images/backround-epicentrum.jpeg");
    background-size: cover; /* WEB: COVER */
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;

    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* main-container-login: Default layout untuk Web */
.main-container-login {
    width: 100%;
    max-width: 1200px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    position: relative;
    z-index: 10;

    /* Hapus/Nonaktifkan BG di Main Container Global */
    background-image: none;
}
/* ================================================= */
/* HERO CONTENT & LOGIN FORM (WEB DEFAULT - TIDAK DIUBAH) */
/* ================================================= */

/* Hero Content Area (Kiri Web) */
.hero-content-area {
    width: 50%;
    color: white;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 650px;
    position: relative;
    z-index: 20;
}

/* Styling konten hero web (Dipertahankan seperti sebelumnya) */
.hero-content-area .lkpp-logo-section { display: flex; align-items: center; gap: 15px; }
.hero-content-area .lkpp-logo { width: 200px; }
.hero-content-area .lkpp-tagline { font-size: 1em; line-height: 1.5; font-weight: 500; color: white; }
.hero-content-area .welcome-section h1 {
    font-size: 2.5em; margin-bottom: 15px; line-height: 1.2; color: #174F80; font-weight: bold;
}
.hero-content-area .welcome-section p { font-size: 1.1em; line-height: 1.6; opacity: 0.9; color: #174F80; }
.hero-content-area .digital-signature { font-size: 0.9em; opacity: 0.8; display: flex; align-items: center; gap: 10px; color: #174F80; }
.hero-content-area .bsre-logo { height: 35px; }
.bhineka-tunggal-ika-bg {
    position: absolute; bottom: 0; left: 0; width: 100%; height: 100%;
    background-image: url('assets/images/garuda-pancasila.png');
    background-size: 80%; background-repeat: no-repeat; background-position: center bottom -50px;
    opacity: 0.15; z-index: -1;
}

/* Login Panel Wrapper (Kanan Web) */
.login-panel-wrapper {
    width: 480px;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 450px;
    position: relative;
    z-index: 15;
}

.login-panel { padding: 0; width: 100%; text-align: center; }
.epicentrum-header { display: block; text-align: center; margin-bottom: 30px; }
.epicentrum-header .epicentrum-logo { width: 180px; }
.login-panel h3 { color: #174F80; font-size: 1.0em; margin-top: 0; margin-bottom: 30px; font-weight: 600; text-align: center; }

/* HIDE ELEMENTS WEB */
.mobile-header-logo, .digital-signature-mobile, .sidebar, .bg-pattern-corner { display: none; }

/* --- FORM ELEMENTS (Universal) - Perbaikan Kritis --- */

.form-group {
    text-align: left;
    margin-bottom: 20px;
}

/* CONTAINER UTAMA INPUT: Wajib relative untuk memposisikan icon secara absolut */
.input-icon-wrapper {
    position: relative;
    /* Hapus display:flex atau atur jika layout form-group memerlukan flex */
}

/* 1. ICON KIRI (User/Gembok) */
/* Gunakan prioritas tinggi dan posisi absolut */
.input-icon-wrapper i.fas {
    position: absolute !important; /* Paksa posisi absolut */
    left: 15px !important; /* Jarak dari tepi kiri input */
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #a7a7a7 !important;
    font-size: 1.1em !important;
    z-index: 5 !important; /* Pastikan di atas input */
    pointer-events: none;
}

/* Target SVG inline jika tidak menggunakan <i> */
.input-icon-wrapper .svg-inline--fa {
    position: absolute !important;
    left: 15px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    /* ... properti lainnya ... */
}

/* 2. INPUT FIELD: Tambah Padding Kiri untuk memberi ruang icon */
.input-icon-wrapper input.form-control {
    width: 100% !important;
    /* PENTING: Tambah padding kiri agar teks tidak menimpa ikon (minimal 45px) */
    padding: 12px 12px 12px 45px !important;
    box-sizing: border-box !important; /* Pastikan width 100% dihitung dari border ke border */
    border: 1px solid #ddd; /* Pastikan border terlihat */
    border-radius: 8px;
}

/* 2. ICON TOGGLE PASSWORD */
.input-icon-wrapper .toggle-password {
    /* Memaksa posisi absolut relatif terhadap input-icon-wrapper */
    position: absolute !important;

    /* PENTING: Pastikan tidak ada nilai 'left' */
    left: auto !important;

    /* Atur jarak dari tepi KANAN input */
    right: 15px !important;

    /* Posisikan di tengah vertikal */
    top: 50% !important;
    transform: translateY(-50%) !important;

    /* Style lainnya */
    cursor: pointer !important;
    color: #a7a7a7 !important;
    z-index: 6 !important; /* Pastikan di atas ikon kiri dan input */
}

.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper input {
    padding-right: 40px;
}

.input-icon-wrapper .toggle-password {
    position: absolute !important;
    right: 15px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    cursor: pointer !important;
    color: #a7a7a7 !important;
    z-index: 999 !important;
    pointer-events: auto !important;
}


/* 4. Perbaikan Tata Letak Pesan Error (Lihat image_1cae93.png) */
/* Mengatasi pesan error yang terlalu mepet dengan label atau input */
.form-group .invalid-feedback,
.form-group .caps-warn {
    margin-top: 5px; /* Dorong ke bawah input */
    margin-bottom: 0;
    font-size: 0.85em;
    padding-left: 0;
    text-align: left;
    display: block !important; /* Agar pesan error selalu muncul jika ada */
}

/* ================================================= */
/* FORM GROUP (Pastikan tidak ada margin/padding aneh) */
/* ================================================= */
.form-group {
    margin-bottom: 25px !important;
}

.form-group label { display: block; margin-bottom: 5px; color: #555; font-size: 0.85em; font-weight: 500; }

/* 4. Perbaikan Tata Letak Error Feedback */
/* Memastikan pesan error berada di bawah input dengan jarak yang wajar */
.invalid-feedback {
    margin-top: 5px;
    font-size: 0.8em;
    padding-left: 5px;
}

.btn-login {
    width: 100%; padding: 12px; background-color: #2a69b7;
    color: white;
    border: none;
    border-radius: 8px; font-size: 1.05em; font-weight: 700; cursor: pointer; margin-top: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.forgot-password { margin-top: 20px; font-size: 0.85em; color: #777; }
.forgot-password a { color: #2a69b7; text-decoration: none; font-weight: 600; }
.logout-info {
    margin-top: 20px; border-top: 1px solid #eee; font-size: 0.85em;
    color: #888; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px;
}
.logout-info i { color: #2a69b7; }
.footer-info { font-size: 0.85em; margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 5px; }

/* --- Card Styles (Menggantikan Bootstrap Card) --- */

.login-panel .card {
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
}

/* Card Header - Sesi Anda telah berakhir */
.login-panel .card-header {
    background-color: transparent !important; /* Hapus warna default Bootstrap */
    border-bottom: none !important;
    padding: 0 0 10px 0; /* Padding atas bawah */
    font-size: 1.1em;
    color: #444; /* Warna teks gelap */
    font-weight: 500;
}

/* Card Body - Konten Utama */
.login-panel .card-body {
    padding: 10px 0 0 0;
}

/* Judul "Logout telah berhasil" */
.login-panel .card-body .card-title {
    font-size: 1.6em;
    color: #333;
    font-weight: 600;
    margin-bottom: 25px;
}

/* Teks Utama */
.login-panel .card-body .card-text {
    font-size: 12px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 10px;
}

/* Tombol Kembali ke PORTAL */
.login-panel .card-body a.btn-primary {
    /* Style tombol yang menyerupai link biru besar */
    background: transparent !important;
    border: none !important;
    color: #2a69b7 !important;
    font-size: 1.1em;
    font-weight: 600;
    padding: 15px 0 0 0; /* Padding disesuaikan */
    text-decoration: none;
    display: inline-block;
    transition: color 0.2s;
}

.login-panel .card-body a.btn-primary:hover {
    color: #1a5398 !important;
    text-decoration: underline;
}

/* Teks otomatis redirect (Jika ada) */
.login-panel p {
    font-size: 0.9em;
    color: #777;
    margin-top: 15px;
}

/* ================================================= */
/* MOBILE STYLES (Epicentrum Header di Luar Form) */
/* ================================================= */

@media (max-width: 767px) {
    /* 1. PENYESUAIAN BODY UNTUK MOBILE */
    body {
        /* Tetap menggunakan gambar mobile dan cover */
        background-image: url("/cas/themes/lkpp/images/background-mobile.png");
        background-size: cover;
        background-position: center center;
        background-repeat: no-repeat;
        background-attachment: scroll;
    }

    /* 2. PENYESUAIAN main-container-login UNTUK MOBILE */
    .main-container-login {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        max-width: 100%;
        min-height: 90vh;
        padding: 50px 20px;
        gap: 20px; /* Jarak antara header luar dan form */

        background-image: none;
        background-color: transparent;
    }

    /* 3. SEMBUNYIKAN HERO CONTENT LKPP (Yang sebelumnya diaktifkan) */
    .hero-content-area {
        display: none; /* Sembunyikan Logo LKPP dan teks sambutan Web/Lama */
    }
    .subtitle {
        display: none;
    }

    /* 4. AKTIFKAN DAN TATA ULANG MOBILE HEADER EPICENTRUM (Di luar form) */
    .mobile-header-logo {
        display: flex; /* Aktifkan elemen ini */
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 0 10px;
        color: white; /* Teks berwarna putih agar kontras dengan latar belakang */
        max-width: 400px;
        width: 90%;
    }

    .mobile-header-logo .epicentrum-logo-mobile {
        width: 150px;
        margin-bottom: 10px;
    }
    .mobile-header-logo h2 {
        font-size: 20px;
        margin: 0;
        line-height: 1.3;
        color: #174F80;
        margin-bottom: 10px;
    }
    .mobile-header-logo .subtitle {
        font-size: 0.9em;
        margin-top: 5px;
        margin-bottom: 15px;
        opacity: 0.9;
        color: white;
    }
    .mobile-header-logo .sso-logo-mobile {
        width: 50px;
        opacity: 0.9;
        display: none;
    }

    /* 5. Atur Form Card Putih di Tengah */
    .login-panel-wrapper {
        width: 90%;
        max-width: 400px;
        min-height: auto;
        border-radius: 12px;
        padding: 25px;
        margin-top: 0; /* Pastikan tidak ada margin atas */
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
        background-color: white;
    }

    /* 6. Sembunyikan Header Epicentrum di dalam Form (Sudah ada di luar) */
    .login-panel .epicentrum-header {
        display: none;
    }

    /* 7. Atur Konten di dalam Form */
    .login-panel { padding: 0; box-shadow: none; }

    .login-panel h2 {
        display: none;
        margin-top: 10px;
    }

    /* 8. Atur Footer Bawah */
    .digital-signature-mobile {
        display: flex; font-size: 0.8em; padding-top: 15px; margin-top: 15px;
        border-top: 1px solid #eee; justify-content: center; align-items: center; gap: 8px; color: #888;
    }
    .logout-info { padding-top: 15px; margin-top: 15px; border-top: none; }
    .footer-info {
        display: flex; font-size: 0.8em; padding-top: 15px; color: #888;
        justify-content: center; align-items: center;
    }
    .digital-signature-mobile .bsre-logo { height: 25px; }
}

.submit-wrapper {
    width: 100%;
}

/* default (mobile / kecil) */
.submit-wrapper > div {
    display: block;
}

/* tablet ke atas (pengganti flex-md-row) */
@media (min-width: 768px) {
    .submit-wrapper {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
    }
}
