/* Versi 3.25 */

body {
  background-color: #f8f9fa;
  font-family: 'Poppins', sans-serif;
}

/* --- GAYA BARU UNTUK HALAMAN LOGIN & FORMULIR --- */
.login-body {
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #e0eafc 0%, #cfdef3 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-container-new {
    width: 100%;
    padding: 1rem;
    display: flex;
    justify-content: center;
}

.login-card {
    background-color: #ffffff;
    padding: 2rem 2.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 450px;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header img {
    max-width: 90px;
    margin-bottom: 1rem;
}

.login-header .form-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.login-header .form-subtitle {
    color: #6c757d;
}

.input-group-icon {
    position: relative;
}

.input-group-icon .form-control {
    padding-left: 2.75rem;
}

.input-group-icon .input-icon {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    color: #ced4da;
    pointer-events: none;
    transition: color 0.2s ease-in-out;
}

.form-control {
    border-radius: 8px;
    padding: 0.75rem 1.25rem;
    border: 1px solid #ced4da;
    transition: all 0.2s ease-in-out;
    height: auto;
}

.form-control:focus {
    border-color: #ffc107;
    box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.25);
}
.form-control:focus ~ .input-icon {
    color: #004c99;
}

.password-wrapper {
    position: relative;
}

.password-toggle-icon {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    cursor: pointer;
    color: #6c757d;
}

.btn-login {
  background: linear-gradient(135deg, #0056b3, #00416a);
  border: none;
  color: white;
  font-weight: 600;
  padding: 0.85rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 65, 106, 0.3);
  width: 100%;
}

.btn-login:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 86, 179, 0.4);
  color: white;
}

.register-link {
    text-align: center;
    margin-top: 1.5rem;
    color: #6c757d;
}

.register-link a {
    color: #ff8c00;
    font-weight: 600;
    text-decoration: none;
}

/* Tampilan Mobile untuk Kartu Login */
@media (max-width: 767px) {
    .login-body {
        align-items: flex-start;
        background: #ffffff;
    }
    .login-container-new {
        padding: 0;
    }
    .login-card {
        box-shadow: none;
        border-radius: 0;
        padding: 2rem 1.5rem;
        min-height: 100vh;
        width: 100vw;
        max-width: 100vw;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}


/* --- GAYA HALAMAN SUKSES & VERIFIKASI --- */
.success-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 100vh;
    padding: 2rem;
}

.success-card {
    background-color: #ffffff;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 550px;
}

.success-icon {
    font-size: 3rem;
    color: #fff;
    background: linear-gradient(135deg, #ffc94b, #ff9a44);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
}

.success-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

.success-message {
    color: #6c757d;
    line-height: 1.8;
}

/* --- GAYA DASHBOARD --- */
.brand-header {
  background-color: #004c99;
  color: #fff;
  padding: 15px;
  border-bottom: 4px solid #ff8000;
  display: flex;
  align-items: center;
}
.brand-header img {
  height: 40px;
  margin-right: 15px;
}
.brand-header h1 {
  font-size: 1.5rem;
  margin: 0;
}

.card-menu {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.card-menu::before {
    content: "";
    position: absolute;
    top: 5px;
    right: 5px;
    width: 90px;
    height: 90px;
    background-image: var(--bg-icon);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 65%;
    opacity: 0.12;
    z-index: 1;
    transition: transform 0.3s ease;
}

.card-menu:hover::before {
    transform: scale(1.1) rotate(5deg);
}

.card-menu strong, .card-menu .small {
    position: relative;
    z-index: 2;
}

.card-menu-deposits::before { --bg-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23004c99' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 12V8H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v4Z'/%3E%3Cpath d='M4 20V10a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v10a2 2 0 0 1-2-2H6a2 2 0 0 1-2-2Z'/%3E%3Cpath d='M16 16h2'/%3E%3C/svg%3E"); }
.card-menu-financings::before { --bg-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23004c99' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='16' y1='13' x2='8' y2='13'/%3E%3Cline x1='16' y1='17' x2='8' y2='17'/%3E%3Cline x1='10' y1='9' x2='8' y2='9'/%3E%3C/svg%3E"); }
.card-menu-term-deposits::before { --bg-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23004c99' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E"); }
.card-menu-transfer::before { --bg-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23004c99' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='17 1 21 5 17 9'/%3E%3Cpath d='M3 11V9a4 4 0 0 1 4-4h14'/%3E%3Cpolyline points='7 23 3 19 7 15'/%3E%3Cpath d='M21 13v2a4 4 0 0 1-4 4H3'/%3E%3C/svg%3E"); }
.card-menu-ziswaf::before { --bg-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23004c99' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'/%3E%3C/svg%3E"); }
.card-menu-ppob::before { --bg-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23004c99' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='21' r='1'/%3E%3Ccircle cx='20' cy='21' r='1'/%3E%3Cpath d='M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6'/%3E%3C/svg%3E"); }

.card-menu-active {
  background: linear-gradient(135deg, #ffc94b, #ff9a44);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  border: none;
}
.card-menu-active strong { color: #492a00; }
.card-menu-active .small { color: #8c5300; font-weight: bold; }
.card-menu-active:hover { transform: translateY(-3px); box-shadow: 0 4px 8px rgba(0,0,0,0.15); }

.card-menu-inactive {
  background-color: #e9ecef;
  border-color: #dee2e6;
  cursor: not-allowed;
}
.card-menu-inactive strong { color: #6c757d; }

.summary-box {
  background: linear-gradient(to right, #e0eafc, #cfdef3);
  border: none;
  border-radius: 8px;
  padding: 1.25rem;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  color: #345;
  line-height: 1.2;
}

.summary-row { display: flex; align-items: flex-start; margin-bottom: 0.5rem; }
.summary-row:last-child { margin-bottom: 0; }
.summary-row strong { color: #003366; width: 110px; flex-shrink: 0; font-weight: 600; }
.summary-row span { color: #555; flex-grow: 1; }

.btn-primary { background-color: #0056b3; border-color: #0056b3; }
.btn-primary:hover { background-color: #ff6600; border-color: #ff6600; }

#welcomeName { display: inline; font-weight: bold; margin-left: 0.5rem; }

@media (max-width: 576px) {
    #welcomeText { display: block; font-size: 1.1rem; font-weight: 300; }
    #welcomeName { display: block; margin-left: 0; font-size: 1.4rem; }
}

/* --- GAYA BARU UNTUK KARTU DI DALAM MODAL --- */
.account-card {
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.account-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-left: 4px solid #0056b3;
}
.account-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f1f1f1;
}
.account-card-title {
    font-weight: 600;
    color: #343a40;
    margin-bottom: 0.1rem;
}
.account-card-subtitle {
    font-size: 0.85rem;
    color: #6c757d;
}
.account-card-balance {
    font-size: 1.2rem;
    font-weight: 600;
    color: #28a745;
}
.account-card-body {
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
}
.account-card-detail {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}
.account-card-detail:last-child { margin-bottom: 0; }
.account-card-detail span { color: #6c757d; }
.account-card-detail strong { color: #495057; }
.account-card-detail .badge-secondary {
    color: #212529; /* Diperbaiki agar lebih kontras */
    background-color: #e2e6ea;
}

.notification-box {
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-left-width: 5px;
    border-left-style: solid;
}
.notification-box-content { flex-grow: 1; }
.notification-box-content strong { display: block; font-size: 1.1rem; margin-bottom: 0.25rem; }
.notification-box-content p { margin: 0; line-height: 1.5; }
.notification-box-actions { margin-left: 1.5rem; flex-shrink: 0; }

.notification-box-danger { background-color: #f8d7da; border-color: #dc3545; color: #721c24; }
.notification-box-danger .btn { background-color: #dc3545; color: white; }
.notification-box-warning { background-color: #fff3cd; border-color: #ffc107; color: #856404; }
.notification-box-warning .btn { background-color: #ffc107; color: #212529; }
.notification-box-warning a:not(.btn) { color: #856404; font-weight: bold; text-decoration: underline; }
.notification-box-info { background-color: #d1ecf1; border-color: #bee5eb; color: #0c5460; }
.notification-box-info a:not(.btn) { color: #0c5460; font-weight: bold; text-decoration: underline; }
.notification-box-info .btn { color: white !important; font-weight: bold; }

.last-login-footer {
    text-align: right;
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 2rem;
    padding-right: 1rem;
}

/* --- GAYA FORM AKTIVASI --- */
.form-step { margin-bottom: 2.5rem; }
.form-step-header { display: flex; align-items: center; margin-bottom: 1.5rem; padding-bottom: 0.5rem; border-bottom: 1px solid #e9ecef; }
.form-step-number { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; background-color: #004c99; color: white; font-weight: bold; border-radius: 50%; margin-right: 1rem; }
.form-step-title { margin: 0; color: #004c99; }
#my_camera { aspect-ratio: 3 / 4; background-color: #000; max-width: 100%; overflow: hidden; position: relative; border: 1px solid #ddd; border-radius: 8px; margin: 0 auto; }
#my_camera video { width: 100%; height: 100%; object-fit: cover; }
#selfie-preview { display: block; margin: 0 auto; max-width: 100%; height: auto; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }

/* PENAMBAHAN BARU: Gaya untuk Overlay Deteksi Wajah */
#face-detection-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    pointer-events: none; /* Agar tidak menghalangi video */
}
#face-outline {
    width: 70%;
    /* Menggunakan padding-top untuk menjaga rasio aspek oval */
    padding-top: 90%; 
    height: 0;
    border: 4px dashed rgba(255, 255, 255, 0.5);
    border-radius: 50%; /* Membuat bentuk oval */
    transition: border-color 0.3s ease-in-out, border-style 0.3s ease;
}
#face-outline.detected {
    border-color: #28a745; /* Hijau */
    border-style: solid;
}
#face-outline.not-detected {
    border-color: #dc3545; /* Merah */
}
#face-status-message {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border-radius: 8px;
    font-weight: 500;
}
/* AKHIR PENAMBAHAN */


/* --- GAYA LAIN-LAIN --- */
.arrears-card { background-color: #fff3cd; border: 1px solid #ffeeba; border-left: 5px solid #ffc107; border-radius: 8px; margin-bottom: 1.5rem; color: #856404; }
.arrears-header { padding: 0.75rem 1.25rem; font-weight: bold; border-bottom: 1px solid #ffeeba; }
.arrears-header i { margin-right: 0.5rem; }
.arrears-body { display: flex; justify-content: space-around; padding: 1.25rem; text-align: center; }
.arrears-body > div { flex: 1; }
.arrears-body small { display: block; font-size: 0.85rem; margin-bottom: 0.25rem; }
.arrears-body strong { font-size: 1.4rem; display: block; }
.input-nominal { font-size: 1.5rem !important; font-weight: 600 !important; }

/* Admin Dashboard Styles */
.table-hover tbody tr[data-cif] {
    cursor: pointer;
}
.table-hover tbody tr[data-cif]:hover {
    background-color: #f1f8ff;
}
.action-column {
    min-width: 250px;
}
.action-column .btn {
    white-space: nowrap;
}
.action-column .delete-user-btn {
    padding-left: 0.6rem;
    padding-right: 0.6rem;
}
.action-column-wide { min-width: 120px; text-align: center; }
.nav-tabs .nav-link.active { border-bottom-width: 3px; border-color: #007bff #007bff #fff; }
.stat-card .display-4 { font-weight: 500; }
#supervisorInfo { font-size: 1.2rem; font-weight: 400; color: #6c757d; }
.stat-card-clickable { cursor: pointer; transition: transform 0.2s ease-in-out; }
.stat-card-clickable:hover { transform: translateY(-5px); }


/* PERBAIKAN: Gaya untuk gambar verifikasi di modal admin */
.verification-image-container {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 0.5rem;
    margin-bottom: 1rem;
    text-align: center; /* Menengahkan gambar */
}
.verification-image-container img {
    max-width: 100%;
    width: auto;
    border-radius: 4px;
    display: block; /* Agar margin auto berfungsi */
    margin: 0 auto; /* Menengahkan gambar secara horizontal */
}

/* PENAMBAHAN BARU: Gaya untuk perbandingan data verifikasi */
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}
.comparison-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden; /* agar header tidak tumpah */
}
.comparison-card .card-header {
    background-color: #f8f9fa;
    font-weight: bold;
    padding: 0.75rem 1.25rem;
}
.comparison-card .list-group-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.comparison-card .list-group-item span {
    color: #6c757d;
}
.comparison-card .match {
    color: #28a745; /* Hijau */
    font-weight: bold;
}
.comparison-card .mismatch {
    color: #dc3545; /* Merah */
    font-weight: bold;
}

/* PENYESUAIAN MODAL DETAIL PENGGUNA ADMIN (v3 - Final) */
#userDetailsModal .modal-content {
    height: 90vh;
    display: flex;
    flex-direction: column;
}

#userDetailsModal .modal-header,
#userDetailsModal .modal-footer {
    flex-shrink: 0;
}

#userDetailsModal .modal-body {
    flex-grow: 1;
    overflow-y: hidden;
    display: flex;
    flex-direction: row;
}

#userDetailsModal .modal-body .row {
    width: 100%;
    display: flex;
}

#userDetailsModal .modal-body .col-md-8 {
    display: flex;
    flex-direction: column;
    max-height: 100%; /* Important: constrain the height of this column */
}

#userDetailsModal #userProductsContainer {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow: hidden; /* Prevent this container from scrolling */
}

#userDetailsModal #userProductsContainer h6,
#userDetailsModal #userProductsContainer .nav-tabs {
    flex-shrink: 0;
}

#userDetailsModal #productTabContent {
    flex-grow: 1;
    overflow-y: auto; /* This is the only element that should scroll */
}