/* v1.1 */
.hfe-nav-menu { display: -webkit-box !important; }
/* Margins */
.mt-1 { margin-top: 0.35rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }
.my-4 { margin-top: 1.5rem !important; margin-bottom: 1.5rem !important; }
.ms-1 { margin-left: 5px !important; }
.me-1 { margin-right: 0.35rem !important; }
/* Padding */
.px-4 { padding-left: 20px !important; padding-right: 20px !important; }
.py-2 { padding-top: 10px !important; padding-bottom: 10px !important; }
.p-0 { padding: 0 !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 1rem !important; }
/* --- Positioning Utilities --- */
.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }
.top-0 { top: 0 !important; }
.start-100 { left: 100% !important; }
.translate-middle { transform: translate(-50%, -50%) !important; }
.justify-content-center { justify-content: center !important; }
/* Alignment */
.align-items-start { align-items: flex-start !important; }
.align-items-center { align-items: center !important; }
.align-items-baseline { align-items: baseline !important; }
.text-wrap {
    white-space: normal !important;
    word-wrap: break-word !important;
}
.text-center { text-align: center !important; }
.rounded { border-radius: 0.375rem !important; }
/* 1. Bentuk Kapsul & Spacing */
.rounded-pill { border-radius: 50px !important; }
.rounded-pill:hover {
    transform: translateY(-2px);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12) !important;
}
.rounded-circle { border-radius: 50% !important; }
/* Display */
.d-inline-block { display: inline-block !important; }
.d-flex { display: flex !important; }
.d-none { display: none !important; }
.gap-2 { gap: 0.75rem !important; }
.shadow-sm { box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important; }
/* 2. Warna & Border */
.bg-white { background-color: #ffffff !important; }
.bg-soft-success { background-color: #f6fff9; }
.bg-soft-danger {
    background-color: #fef2f2 !important;
    border: 1px solid #fecaca !important;
    color: #991b1b !important;
}
.bg-soft-danger .fa-skull-crossbones {
    color: #dc2626;
    font-size: 1.1rem;
    margin-top: 2px;
}
.border { border: 1px solid #e0e0e0 !important; }
/* Warna Spesifik */
.border-warning { border-color: #f8b526 !important; }
.border-primary { border-color: #0274be !important; }
.text-warning { color: #f8b526 !important; }
.text-primary { color: #0274be !important; }
.text-dark {
    color: #333 !important;
    font-size: 0.95rem;
}
/* 3. Link Style */
.text-decoration-none { text-decoration: none !important; }
.fw-bold { font-weight: 700 !important; }
/* WRAPPER UTAMA */
.franchise-listing-form-wrapper {
    max-width: 850px;
    margin: 0 auto;
    font-family: 'DM Sans', sans-serif;
    color: #333;
}

/* TABS STYLING */
.registration-tabs-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 40px;
    width: 100%;
}
.registration-tabs {
    background: #f1f1f1;
    padding: 5px;
    border-radius: 50px;
    display: inline-flex;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.05);
}
.tab-btn {
    border: none;
    background: transparent;
    padding: 12px 30px;
    border-radius: 40px;
    font-size: 1rem;
    font-weight: 600;
    color: #777;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tab-btn i {
    margin-right: 8px;
    font-size: 1.1rem;
}
.tab-btn.active {
    background: #fff;
    color: #f8b526; /* Kuning Brand */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.tab-btn:hover:not(.active) {
    color: #333;
}

/* Helper Class */
.text-center { text-align: center !important; }
.mw-800 { max-width: 800px; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* 1. Step Indicator (Bulatan Angka) */
.step-indicator-wrapper {
    max-width: 700px;
    margin: 0 auto;
}
.step-indicator {
    display: flex;
    justify-content: space-between;
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
    z-index: 1;
}
.step-item {
    text-align: center;
    width: 20%;
    position: relative;
}
.step-circle {
    width: 35px;
    height: 35px;
    background-color: #e9ecef;
    border-radius: 50%;
    margin: 0 auto 5px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #6c757d;
    border: 2px solid #dee2e6;
    transition: all 0.3s;
}
.step-text {
    font-size: 0.75rem;
    color: #6c757d;
    font-weight: 500;
}

/* Active State */
.step-item.active .step-circle {
    background-color: #f8b526; /* Kuning Brand */
    border-color: #f8b526;
    color: #fff;
    box-shadow: 0 0 0 3px rgba(248, 181, 38, 0.2);
}
.step-item.active .step-text {
    color: #333;
    font-weight: 700;
}
.step-item.completed .step-circle {
    background-color: #28a745;
    border-color: #28a745;
    color: #fff;
}

/* 2. Form Step Logic (Show/Hide) */
.form-step {
    display: none; /* Default hidden */
    animation: fadeIn 0.5s;
}
.form-step.active {
    display: block; /* Show active */
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 3. Navigation Buttons */
.btn-prev {
    background-color: #e2e6ea;
    border: none;
    color: #555;
    font-weight: 600;
}
.btn-prev:hover {
    background-color: #dbe0e5;
    color: #333;
}

/* Buttons */
.btn-danger {
    background-color: #dc3545 !important;
    border: 1px solid #dc3545 !important;
    color: white !important;
    cursor: pointer;
    transition: background-color 0.2s;
}
.btn-danger:hover {
    background-color: #bb2d3b !important;
}
/* CARD STYLE */
.form-section-card {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 25px 30px; /* Padding lebih lega */
    margin-bottom: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
}

.section-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #222;
    border-bottom: 2px solid #f8b526;
    padding-bottom: 12px;
    margin-bottom: 25px;
}

/* HORIZONTAL FORM LAYOUT (Label Kiri - Input Kanan) */
.form-group-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start; /* Align top */
    border-bottom: 1px dashed #f0f0f0; /* Garis pemisah tipis biar rapi */
    padding-bottom: 4px;
    margin-bottom: 4px;
}
.form-group-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
/* 1. Valid (Hijau) */
.form-control.is-valid, .form-select.is-valid {
    border-color: #198754 !important;
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* 2. Invalid (Merah) */
.form-control.is-invalid, .form-select.is-invalid {
    border-color: #dc3545 !important;
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 2l8 8m0-8L2 10'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* 3. Pesan Error Text */
.validation-error-msg {
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.8em;
    color: #dc3545;
    font-weight: 500;
    display: block;
}

.is-invalid-logic {
    border-color: #dc2626 !important;
    background-color: #fff5f5 !important;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1) !important;
    transition: all 0.2s ease-in-out;
}

/* Fix untuk Input Group agar icon tidak tertutup */
.input-group .form-control.is-valid,
.input-group .form-control.is-invalid {
    z-index: 3; 
}

/* --- 2. PHONE INPUT STYLES (Country Code) --- */
.phone-input-group {
    display: flex !important;
    width: 100%;
}
.country-select {
    max-width: 100px;
    flex: 0 0 auto;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-right: 0 !important; /* Gabung dengan input kanan */
    background-color: #f8f9fa;
    font-weight: 500;
}
.phone-number-input {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-left: 1px solid #dcdcdc; /* Garis tipis pemisah */
}
.label-col {
    flex: 0 0 35%; /* Lebar Label 35% */
    max-width: 35%;
    padding-right: 20px;
    padding-top: 10px; /* Supaya sejajar dengan text input */
}

.input-col {
    flex: 0 0 65%; /* Lebar Input 65% */
    max-width: 65%;
}
.input-group {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    width: 100% !important;
}
.input-group .input-group-text {
    display: flex;
    align-items: center;
    white-space: nowrap;
    width: auto !important;
    flex: 0 0 auto;
}
.input-group .form-control {
    flex: 1 1 auto !important;
    width: 25%;
    margin-bottom: 0 !important;
}
/* 1. Atur "Rp" (Jika di Kiri) */
.input-group .input-group-text:first-child {
    margin-right: 5px !important;
    border-top-right-radius: 6px !important;
    border-bottom-right-radius: 6px !important;
}
/* 2. Atur "%" (Jika di Kanan) */
.input-group .input-group-text:last-child {
    margin-left: 5px !important;
    border-top-left-radius: 6px !important;
    border-bottom-left-radius: 6px !important;
}
.input-group .input-group-text:not(:first-child):not(:last-child) {
    margin: 0 5px !important;
    border-radius: 6px !important;
    z-index: 5;
}
/* Agar sudut kirinya melengkung */
.input-group > .form-select:not(:first-child),
.input-group > .form-control:not(:first-child) {
    border-top-left-radius: 6px !important;
    border-bottom-left-radius: 6px !important;
}
/* Agar sudut kanannya melengkung */
.input-group > .form-select:not(:last-child),
.input-group > .form-control:not(:last-child) {
    border-top-right-radius: 6px !important;
    border-bottom-right-radius: 6px !important;
}
.input-group .form-select {
    border-radius: 0;
    font-size: 0.9rem;
}
.input-group .form-select:last-child {
    border-top-right-radius: 6px !important;
    border-bottom-right-radius: 6px !important;
}

.form-label {
    font-weight: 600;
    font-size: 0.95rem;
    color: #444;
    margin-bottom: 0;
}

/* INPUT STYLING */
.form-control, .form-select {
    width: 100%;
    padding: 10px 15px;
    border-radius: 6px;
    border: 1px solid #dcdcdc;
    font-size: 0.95rem;
    background-color: #fafafa;
    transition: all 0.2s;
}
.form-control:focus, .form-select:focus {
    background-color: #fff;
    border-color: #f8b526;
    box-shadow: 0 0 0 3px rgba(248, 181, 38, 0.1);
}

/* HELPER TEXT (DI BAWAH INPUT) */
.helper-text-bottom {
    display: block;
    margin-top: 5px;
    font-size: 0.8rem;
    color: #777;
    line-height: 1.3;
}

/* JENIS PAKET (2 KOLOM GRID) */
.outlet-grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2 Kolom */
    gap: 12px;
}

.card-radio-box {
    position: relative;
    cursor: pointer;
}
.card-radio-box input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}
.radio-content {
    display: flex;
    flex-direction: column;
    background: #fdfdfd;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px 15px;
    transition: all 0.2s;
    height: 100%;
}
.radio-content strong {
    font-size: 0.95rem;
    color: #333;
    display: block;
}
.radio-content small {
    font-size: 0.8rem;
    color: #888;
}
/* Style saat dipilih */
.card-radio-box input:checked + .radio-content {
    background: #fff8e1; /* Kuning muda */
    border-color: #f8b526;
    box-shadow: 0 2px 5px rgba(248, 181, 38, 0.2);
}
.card-radio-box input:checked + .radio-content strong {
    color: #d39e00;
}

/* TOTAL MODAL BOX */
.total-box {
    background: #fdfbe8;
    border: 1px dashed #f8b526;
    border-radius: 8px;
    padding: 15px 20px;
}
.total-input {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    font-weight: 800;
    color: #333;
    width: 150px;
    text-align: right;
    outline: none;
}

/* SUPPORT GRID & HAKI */
.support-grid, .radio-group-vertical {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.check-custom, .radio-custom {
    font-size: 0.9rem;
    background: #f9f9f9;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid #eee;
    cursor: pointer;
}
.check-custom input, .radio-custom input {
    margin-right: 5px;
}

/* 1. Style untuk HPP & Profit */
.custom-grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Membagi 2 kolom sama rata */
    gap: 15px; /* Jarak antar kolom */
    width: 100%;
}

/* 2. Style untuk Dashboard Result */
.dashboard-flex-wrapper {
    display: flex;
    width: 100%;
    flex-direction: row;
}

.dashboard-col {
    flex: 1; /* Masing-masing ambil 50% space */
    width: 50%;
    position: relative;
    padding: 30px 0 30px;
}

/* Garis Pemisah Dashboard */
.dashed-border-right {
    border-right: 2px dashed #e0e0e0;
}
.fw-800 {
    font-weight: 800;
}

/* Dashboard Result Style */
.result-dashboard {
    background: #ffffff;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    overflow: hidden; /* Supaya border radius works */
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}
#bep_years_display {
    text-align: center;
    color: #8898aa;
    line-height: 1;
}
/* --- CITY AUTOCOMPLETE STYLES --- */
.autocomplete-wrapper {
    position: relative; /* Anchor untuk dropdown */
}

.city-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #dcdcdc;
    border-top: none;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    z-index: 1000;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: none; /* Default hidden */
}

.city-suggestion-item {
    padding: 10px 15px;
    cursor: pointer;
    font-size: 0.9rem;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.city-suggestion-item:last-child {
    border-bottom: none;
}

.city-suggestion-item:hover, .city-suggestion-item.active {
    background-color: #fdfbe8; /* Kuning muda */
    color: #333;
    font-weight: 500;
}

/* Scrollbar cantik */
.city-suggestions::-webkit-scrollbar {
    width: 6px;
}
.city-suggestions::-webkit-scrollbar-track {
    background: #f1f1f1;
}
.city-suggestions::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}
.alert {
    position: relative;
    border: 1px solid transparent;
    border-radius: 0.5rem !important;
    width: 100%;
}
.alert-primary {
    color: #0c5460 !important; /* Warna teks biru tua gelap (agar kontras) */
    background-color: #d1ecf1 !important; /* Background biru muda segar */
    border-color: #bee5eb !important; /* Border biru halus */
}
.text-primary {
    color: #007bff !important; /* Biru standar untuk Icon & Link */
}
.alert-primary a {
    color: #0056b3 !important;
    text-decoration: underline;
}

input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
input[type=number] {
-moz-appearance: textfield;
}

/* RESPONSIVE (MOBILE) */
@media (max-width: 768px) {
    .form-group-row {
        flex-direction: column; /* Stack vertikal di HP */
        border-bottom: none;
    }
    .label-col, .input-col {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .label-col {
        padding-bottom: 5px;
        padding-top: 0;
    }
    .outlet-grid-container {
        grid-template-columns: 1fr; /* 1 Kolom di HP */
    }
    .form-section-card {
        padding: 20px;
    }
    .result-card {
        border-bottom: 1px solid #f0f0f0;
    }
    .custom-grid-2-col {
        grid-template-columns: 1fr; /* Stack jadi 1 kolom di HP */
    }
    
    .dashboard-flex-wrapper {
        flex-direction: column; /* Stack vertikal di HP */
    }
    .dashboard-col {
        width: 100%; /* Full width di HP */
    }
    .dashed-border-right {
        border-right: none;
        border-bottom: 2px dashed #e0e0e0; /* Ganti border samping jadi bawah */
    }
}

/* Garis pemisah tengah (Hanya di Desktop) */
@media (min-width: 768px) {
    .border-end-md {
        border-right: 2px dashed #e0e0e0;
    }
}