.select2-container .select2-selection--single {
    height: 35px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    margin-left: -8px;
}

.desa-info-panel {
    display: none;
}

.desa-info-panel.show {
    display: block;
}

.loading-spinner {
    display: none;
}

.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading .btn-text {
    visibility: hidden;
}

.btn-loading .spinner-border {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.premium-info {
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    padding: 15px;
    border-radius: 5px;
    margin: 10px 0;
}

.kontak-form {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
}

.subscription-info {
    background: #e3f2fd;
    border: 1px solid #90caf9;
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
}

.file-upload-preview img {
    max-width: 200px;
    max-height: 200px;
    margin-top: 10px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

/* Alert Mode Perpanjangan */
.alert-perpanjangan-card {
    background: linear-gradient(135deg, #f0f7ff 0%, #e6f2ff 100%);
    border: 1px solid #b8daff;
    border-left: 5px solid #007bff;
    border-radius: 8px;
    padding: 14px 18px;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.08);
    transition: all 0.3s ease;
}

.alert-perpanjangan-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
    box-shadow: 0 3px 6px rgba(0, 123, 255, 0.25);
}

/* OTP Modal Styles */
.otp-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.otp-modal-overlay.show {
    display: flex;
}

.otp-modal {
    background: white;
    border-radius: 16px;
    padding: 30px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.otp-modal-header {
    text-align: center;
    margin-bottom: 25px;
}

.otp-modal-header .icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

.otp-modal-header .icon i {
    font-size: 30px;
    color: white;
}

.otp-modal-header h4 {
    margin: 0;
    color: #333;
    font-size: 22px;
}

.otp-modal-header p {
    color: #666;
    margin: 10px 0 0;
    font-size: 14px;
}

.otp-email-info {
    background: #f0f7ff;
    border: 1px solid #b3d4fc;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    margin-bottom: 20px;
}

.otp-email-info .email {
    font-weight: 600;
    color: #007bff;
}

.otp-input-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.otp-input {
    width: 50px;
    height: 55px;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    border: 2px solid #ddd;
    border-radius: 10px;
    transition: all 0.2s;
}

.otp-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
    outline: none;
}

.otp-input.error {
    border-color: #dc3545;
    animation: shake 0.3s;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.otp-timer {
    text-align: center;
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;
}

.otp-timer .time {
    font-weight: bold;
    color: #007bff;
}

.otp-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-otp-verify {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-otp-verify:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

.btn-otp-verify:disabled {
    background: #aaa;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-resend-otp {
    background: transparent;
    color: #007bff;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 14px;
}

.btn-resend-otp:disabled {
    color: #999;
    cursor: not-allowed;
}

.quick-access-link:hover {
    background-color: #f8f9fa;
    border-color: #dcdcdc !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.btn-cancel-otp {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #ddd;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
}

.otp-error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    text-align: center;
    display: none;
}

.otp-error-message.show {
    display: block;
}

.otp-rate-limit-message {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    text-align: center;
}

/* ============ MOBILE RESPONSIVE STYLES ============ */

/* Mobile: Stack form labels and inputs vertically */
@media (max-width: 576px) {

    /* Container padding */
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }

    /* Card adjustments */
    .card {
        border-radius: 10px;
    }

    .card-header {
        padding: 15px;
    }

    .card-header h3.card-title {
        font-size: 18px;
        display: block;
        margin-bottom: 5px;
    }

    .card-header p.float-right {
        float: none !important;
        font-size: 12px;
        margin-left: 0 !important;
    }

    .card-body {
        padding: 15px;
    }

    /* Form row adjustments - stack vertically */
    .form-group.row {
        margin-bottom: 15px;
    }

    .form-group.row>label.col-form-label {
        padding-bottom: 5px;
        font-weight: 600;
    }

    /* Input group adjustments */
    .input-group-prepend .input-group-text {
        padding: 8px 12px;
    }

    /* Select2 mobile adjustments */
    .select2-container {
        width: 100% !important;
    }

    .select2-container .select2-selection--single {
        height: 40px;
    }

    .select2-container--default .select2-selection--single .select2-selection__rendered {
        line-height: 38px;
    }

    /* File upload preview */
    .file-upload-preview img {
        max-width: 100%;
        max-height: 150px;
    }

    /* Info panels */
    .premium-info,
    .subscription-info,
    .kontak-form {
        padding: 12px;
    }

    /* Panel harga */
    #panelHarga .card-body table {
        font-size: 14px;
    }

    /* Buttons in footer */
    .card-footer .row {
        flex-direction: column;
        gap: 10px;
    }

    .card-footer button {
        width: 100%;
        margin-left: 0 !important;
    }

    /* Info box */
    .card-body ul {
        padding-left: 20px;
    }

    .card-body ul li {
        font-size: 13px;
        margin-bottom: 8px;
    }

    /* Captcha section */
    #captcha-image {
        max-width: 150px;
        height: auto;
    }

    /* Custom file input */
    .custom-file-label {
        font-size: 13px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* OTP Modal Mobile Responsive */
@media (max-width: 480px) {
    .otp-modal {
        padding: 20px;
        width: 95%;
        margin: 10px;
    }

    .otp-modal-header h4 {
        font-size: 18px;
    }

    .otp-modal-header p {
        font-size: 13px;
    }

    .otp-modal-header .icon {
        width: 55px;
        height: 55px;
    }

    .otp-modal-header .icon i {
        font-size: 24px;
    }

    /* OTP input boxes - smaller on mobile */
    .otp-input-container {
        gap: 6px;
    }

    .otp-input {
        width: 40px;
        height: 48px;
        font-size: 20px;
        border-radius: 8px;
    }

    .otp-email-info {
        padding: 10px;
        font-size: 13px;
    }

    .otp-timer {
        font-size: 13px;
    }

    .btn-otp-verify {
        padding: 12px;
        font-size: 14px;
    }

    .btn-cancel-otp {
        padding: 10px;
        font-size: 13px;
    }

    .btn-resend-otp {
        font-size: 13px;
    }
}

/* Extra small devices (very narrow phones) */
@media (max-width: 360px) {
    .otp-input {
        width: 35px;
        height: 42px;
        font-size: 18px;
    }

    .otp-input-container {
        gap: 4px;
    }

    .card-header h3.card-title {
        font-size: 16px;
    }

    .form-control,
    .form-control-plaintext {
        font-size: 14px;
    }
}

/* Tablet adjustments */
@media (min-width: 577px) and (max-width: 768px) {
    .card-header p.float-right {
        font-size: 13px;
    }

    .form-group.row>label.col-form-label {
        font-size: 14px;
    }
}

/* Touch-friendly improvements for mobile */
@media (max-width: 768px) {

    /* Larger touch targets */
    .btn,
    button {
        min-height: 44px;
    }

    .form-control {
        min-height: 44px;
        font-size: 16px;
        /* Prevents iOS zoom on focus */
    }

    select.form-control {
        min-height: 44px;
    }

    /* Radio buttons larger */
    .form-check-input {
        width: 20px;
        height: 20px;
        margin-right: 8px;
    }

    .form-check-label {
        padding-top: 2px;
    }

    /* Better spacing for form groups */
    .form-group {
        margin-bottom: 1rem;
    }

    /* Scrollable select2 dropdown */
    .select2-results__options {
        max-height: 200px !important;
    }
}

/* Wizard CSS */
.wizard-steps .nav-link {
    color: #6c757d;
    font-weight: 500;
    border-radius: 0;
    border: none;
    background: transparent;
    position: relative;
    padding: 5px;
    text-align: center;
    cursor: default;
}

.wizard-steps .nav-link.active {
    color: #007bff;
    background: transparent;
}

.wizard-steps .nav-link.active .step-number {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}

.wizard-steps .nav-link.done {
    color: #28a745;
    cursor: pointer;
}

.wizard-steps .nav-link.done .step-number {
    background-color: #28a745;
    color: #fff;
    border-color: #28a745;
}

.step-number {
    display: inline-block;
    width: 32px;
    height: 32px;
    line-height: 28px;
    border: 2px solid #ccc;
    border-radius: 50%;
    text-align: center;
    background-color: #fff;
    font-weight: bold;
    transition: all 0.3s ease;
}

.step-title {
    display: block;
    font-size: 14px;
    margin-top: 5px;
}

/* Responsive step text */
@media (max-width: 576px) {
    .step-title {
        font-size: 11px;
    }

    .wizard-footer .btn {
        font-size: 14px;
        padding: 8px 16px;
    }

    .step-number {
        width: 25px;
        height: 25px;
        line-height: 21px;
        font-size: 12px;
    }
}

/* Layout overrides for standalone checkout */
body {
    background-color: #f8f9fa !important;
}

.main-sidebar,
.main-header,
.main-footer {
    display: none !important;
}

.content-wrapper {
    margin-left: 0 !important;
    padding-top: 0 !important;
    background-color: transparent !important;
}

.checkout-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px !important;
    background: #fff;
    border-bottom: 1px solid #eee;
}

.checkout-header .logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.checkout-header .logo img {
    height: 40px;
}

.checkout-header .logo span {
    font-size: 20px;
    font-weight: 700;
    color: #1a202c;
    margin-left: 10px;
}

.checkout-header .back-link {
    color: #718096;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Horizontal Stepper matching reference */
.checkout-stepper-container {
    padding: 40px;
    background: #f8f9fa;
    max-width: 1000px;
    margin: 0 auto;
    border-bottom: 1px solid #eaeaea;
    margin-bottom: 30px;
}

.checkout-stepper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    padding: 0;
    margin: 0;
    list-style: none;
}

.checkout-stepper::before {
    content: '';
    position: absolute;
    top: 22px;
    left: 10%;
    right: 10%;
    height: 1px;
    background: #dcdcdc;
    z-index: 1;
}

.stepper-item {
    position: relative;
    z-index: 2;
    text-align: center;
    flex: 1;
}

.stepper-circle {
    width: 45px;
    height: 45px;
    background: #fff;
    border: 1px solid #dcdcdc;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 18px;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    margin: 0 auto 10px;
}

.stepper-item.active .stepper-circle {
    background: #113A9F;
    border-color: #113A9F;
    color: #fff;
    box-shadow: 0 4px 10px rgba(17, 58, 159, 0.3);
}

.stepper-item.completed .stepper-circle {
    background: #fff;
    border-color: #dcdcdc;
    color: #113A9F;
}

.stepper-item.completed .stepper-circle::after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 18px;
    position: absolute;
}

.stepper-item.completed .stepper-circle i {
    opacity: 0;
}

.stepper-title-container {
    text-align: center;
}

.stepper-title-main {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stepper-subtitle {
    display: block;
    font-size: 12px;
    color: #6c757d;
    margin-top: 2px;
}

.stepper-item.active .stepper-title-main {
    color: #113A9F;
}

.stepper-item.active .stepper-subtitle {
    color: #212529;
    font-weight: 500;
}

.checkout-stepper-progress {
    position: absolute;
    top: 22px;
    left: 10%;
    height: 1px;
    background: #113A9F;
    z-index: 1;
    transition: width 0.3s;
}

/* Two Column Layout */
.checkout-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

.checkout-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    padding: 40px;
    border: none;
}

.checkout-summary-card {
    background: #fdfdfd;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    padding: 30px;
    border: 1px solid #edf2f7;
}

/* Form Styles */
.checkout-title {
    font-size: 32px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 10px;
}

.checkout-subtitle {
    color: #718096;
    font-size: 14px;
    margin-bottom: 30px;
}

.form-group label {
    font-size: 12px;
    font-weight: 700;
    color: #1a202c;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.form-control {
    background: #fcfcfc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 12px 16px;
    height: auto;
    color: #4a5568;
    box-shadow: none !important;
}

.form-control:focus {
    border-color: #3182ce;
    background: #fff;
}

.btn-next-step {
    background: #3182ce;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.btn-back-step {
    background: transparent;
    color: #4a5568;
    border: 1px solid #cbd5e0;
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.5px;
    margin-right: 15px;
}

/* Order Summary */
.summary-title {
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 20px;
}

.summary-table {
    width: 100%;
}

.summary-table th {
    font-size: 11px;
    color: #a0aec0;
    text-transform: uppercase;
    border-bottom: 1px solid #edf2f7;
    padding-bottom: 10px;
    font-weight: 700;
}

.summary-item {
    padding: 15px 0;
    border-bottom: 1px solid #edf2f7;
    display: flex;
    justify-content: space-between;
}

.summary-item-name {
    font-weight: 600;
    color: #2d3748;
    font-size: 14px;
}

.summary-item-price {
    font-weight: 600;
    color: #2d3748;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    padding-top: 20px;
    margin-top: 10px;
    font-size: 20px;
    font-weight: 700;
    color: #1a202c;
    background: #f7fafc;
    padding: 20px;
    border-radius: 8px;
}

/* Footer Features */
.checkout-features {
    display: flex;
    justify-content: space-between;
    max-width: 1000px;
    margin: 40px auto;
    padding-top: 40px;
    border-top: 1px solid #e2e8f0;
}

.feature-box {
    display: flex;
    align-items: flex-start;
    flex: 1;
    padding: 0 15px;
}

.feature-icon {
    width: 40px;
    height: 40px;
    background: #ebf8ff;
    color: #3182ce;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-right: 15px;
    flex-shrink: 0;
}

.feature-title {
    font-size: 14px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 5px;
}

.feature-desc {
    font-size: 13px;
    color: #718096;
    line-height: 1.5;
}

/* ==========================================================================
   Filter Kategori & Pencarian Layanan (#1455)
   ========================================================================== */
.produk-filter-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 20px;
}

.produk-search-wrapper .input-group-text {
    background-color: #ffffff;
    border-color: #ced4da;
    border-radius: 6px 0 0 6px;
    color: #94a3b8;
}

.produk-search-wrapper .form-control {
    border-color: #ced4da;
    border-radius: 0 6px 6px 0;
    padding: 9px 14px;
    font-size: 14px;
    background-color: #ffffff;
}

.produk-search-wrapper .form-control:focus {
    border-color: #113A9F;
    box-shadow: 0 0 0 2px rgba(17, 58, 159, 0.15) !important;
}

.produk-search-wrapper .btn-clear-search {
    background: transparent;
    border-color: #ced4da;
    color: #94a3b8;
    border-left: none;
    border-radius: 0 6px 6px 0;
    padding: 0 12px;
}

.produk-search-wrapper .btn-clear-search:hover {
    color: #e53e3e;
    background-color: transparent;
}

.category-pills-wrapper {
    margin-top: 12px;
}

.category-pills-scroll-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
    padding-bottom: 4px;
}

.category-pills-scroll-wrapper::-webkit-scrollbar {
    height: 4px;
}

.category-pills-scroll-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.category-pills-scroll-wrapper::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.category-pills-scroll-wrapper::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.category-pills-container {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    min-width: min-content;
}

.filter-kategori-btn {
    flex-shrink: 0;
    white-space: nowrap;
    border-radius: 20px !important;
    padding: 5px 14px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    border: 1px solid #cbd5e1 !important;
    background-color: #ffffff !important;
    color: #475569 !important;
    transition: all 0.2s ease-in-out !important;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    line-height: 1.4;
}

.filter-kategori-btn:hover {
    background-color: #f1f5f9 !important;
    color: #1e293b !important;
    border-color: #94a3b8 !important;
}

.filter-kategori-btn.active {
    background-color: #113A9F !important;
    border-color: #113A9F !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(17, 58, 159, 0.25) !important;
}

.filter-kategori-btn .count-badge {
    background-color: #e2e8f0;
    color: #475569;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 5px;
    transition: all 0.2s;
}

.filter-kategori-btn.active .count-badge {
    background-color: rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
}

#badgeTotalTerpilih {
    background-color: #10b981;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.3);
    display: inline-flex;
    align-items: center;
}

.empty-produk-state {
    background-color: #ffffff;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    padding: 35px 20px;
    text-align: center;
    width: 100%;
}

.produk-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    width: 100%;
}

.produk-card-title {
    font-weight: 700;
    margin-bottom: 0;
    font-size: 14px;
    line-height: 1.35;
    flex: 1 1 auto;
    min-width: 0;
    word-break: break-word;
    padding-right: 6px;
}

.produk-card-badges {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex: 0 0 auto;
    max-width: 50%;
    gap: 4px;
}

.badge-kategori-layanan {
    background-color: #e0f2fe;
    color: #0369a1;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid #bae6fd;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    vertical-align: middle;
}