/* ========================================================
   CSS KHUSUS HALAMAN RIWAYAT TRANSAKSI (UI/UX INDUSTRI)
   ======================================================== */
.history-wrapper {
    width: 100%;
    max-width: 1500px;
    margin: 0;
    padding: 1rem 0;
}

/* Header & Filter */
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.history-title {
    font-family: 'Instrument Serif', serif;
    font-size: 2rem;
    color: #14213D;
    margin: 0 0 0.5rem 0;
}

.history-subtitle {
    font-family: 'Inter', sans-serif;
    color: #64748B;
    font-size: 0.95rem;
    margin: 0;
}

.filter-select {
    padding: 0.6rem 1rem;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: #1E293B;
    background-color: #FFFFFF;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}

.filter-select:focus {
    border-color: #14213D;
}

/* Card List Container */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Individual Transaction Card */
.history-card {
    background-color: #FFFFFF;
    border: 1px solid #F1F5F9;
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    transition: transform 0.2s, box-shadow 0.2s;
}

.history-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* Kiri: Ikon & Detail */
.hc-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.hc-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.25rem;
}

.hc-icon-out {
    background-color: #FEF2F2;
    color: #EF4444;
    /* Merah untuk pengeluaran */
}

.hc-icon-in {
    background-color: #F0FDF4;
    color: #22C55E;
    /* Hijau untuk pemasukan */
}

.hc-icon-pending {
    background-color: #FFFBEB;
    color: #F59E0B;
    /* Kuning untuk pending */
}

.hc-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.hc-title {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #1E293B;
    margin: 0;
}

.hc-ref {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: #64748B;
}

.hc-sn {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: #14213D;
    background-color: #F1F5F9;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
    width: fit-content;
    margin-top: 0.25rem;
}

/* Kanan: Nominal & Status */
.hc-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
}

.hc-amount {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
}

.text-danger {
    color: #EF4444;
}

.text-success {
    color: #22C55E;
}

.text-dark {
    color: #1E293B;
}

.hc-badge {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hc-icon-badge {
    background-color: #b1b3b723;
}

.badge-success {
    background-color: #DCFCE7;
    color: #166534;
}

.badge-warning {
    background-color: #FEF3C7;
    color: #92400E;
}

.badge-failed {
    background-color: #FEE2E2;
    color: #991B1B;
}

.badge-processing {
    background-color: #DBEAFE;
    color: #1E40AF;
}

.hc-date {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: #94A3B8;
}

.btn-pay-now {
    margin-top: 0.5rem;
    background-color: #14213D;
    color: white;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-pay-now:hover {
    background-color: #FCA311;
    color: #14213D;
}

/* Styling Utama Pemicu Dropdown */
.dropdown-trigger {
    background: #ffffff;
    border: 1px solid #eef2f5 !important;
    border-radius: 16px !important;
    padding: 8px 20px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-trigger:hover,
.dropdown-trigger:focus {
    background: #ffffff !important;
    border-color: #3b82f6 !important;
    /* Efek border warna biru modern */
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.08);
}

/* Lingkaran Ikon Filter */
.icon-wrapper {
    background: #f1f5f9;
    color: #475569;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.dropdown-trigger:hover .icon-wrapper {
    background: #eff6ff;
    color: #3b82f6;
}

/* Animasi Panah Berputar */
.arrow-icon {
    transition: transform 0.3s ease;
}

.show .arrow-icon {
    transform: rotate(180deg);
    color: #3b82f6 !important;
}

/* Menu List Dropdown Yang Mewah */
.custom-dropdown-menu {
    background: #ffffff;
    border-radius: 16px !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08) !important;
    transform: translateY(10px);
    opacity: 0;
    display: block;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Item di dalam Dropdown */
.custom-dropdown-menu .dropdown-item {
    padding: 12px 16px !important;
    border-radius: 12px !important;
    color: #64748b;
    font-weight: 500;
    transition: all 0.2s ease;
}

.custom-dropdown-menu .dropdown-item:hover {
    background-color: #f8fafc !important;
    color: #1e293b !important;
}

/* Item aktif/terpilih */
.custom-dropdown-menu .dropdown-item.active {
    background-color: #eff6ff !important;
    color: #3b82f6 !important;
}

.op-7 {
    opacity: 0.7;
}

.fs-7 {
    font-size: 0.85rem;
}

/* Responsif untuk Mobile */
@media (max-width: 768px) {

    /* Sidebar off-canvas */
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar--open {
        transform: translateX(0);
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.3);
    }

    .custom-dropdown {
        max-width: 76vw;
        /* background-color: red; */
    }

    .dropdown-trigger {
        padding: 4px 12px !important;
    }

    .history-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .hc-right {
        align-items: flex-start;
        width: 100%;
        border-top: 1px dashed #E2E8F0;
        padding-top: 1rem;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
    }

    .btn-pay-now {
        width: 100%;
        margin-top: 0;
    }

    .hc-badge{
        margin-left: 50px;
    }
}