/* ========================================= */
/* PENGAJUAN BARANG PAGE - SPECIFIC STYLES */
/* ========================================= */

/* Container Utama */
.pengajuan-container {
    padding: 0;
    max-width: 100%;
    margin: 0;
}

/* Judul Halaman */
.pengajuan-title {
    font-size: 36px;
    font-weight: 700;
    color: #1e40af;
    margin: 30px 0;
    text-align: center;
}

/* ========================================= */
/* SECTION FILTER & SEARCH */
/* ========================================= */

/* Container Filter Section */
.pengajuan-filter-section {
    display: flex;
    gap: 8px;
    margin: 0 auto 40px auto;
    max-width: 1200px;
    align-items: center;
}

/* ========================================= */
/* ICON KERANJANG (KIRI) */
/* ========================================= */

.pengajuan-cart-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border: 2px solid #3b82f6;
    border-radius: 50%;
    color: #3b82f6;
    transition: all 0.3s;
    text-decoration: none;
    flex-shrink: 0;
}

.add-to-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
}

.pengajuan-cart-icon:hover {
    border-color: #1e40af;
    color: #1e40af;
    transform: scale(1.05);
}

/* Badge Counter Keranjang */
.pengajuan-cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

/* ========================================= */
/* DROPDOWN FILTER (KATEGORI & SIFAT) */
/* ========================================= */

.pengajuan-filter-select {
    min-width: 120px;
    max-width: 150px;
    border: 1px solid #6060603f;
    color: #1e40af;
    font-weight: bold;
    font-size: 14px;
    height: 45px;
    padding: 0 12px;
    display: flex;
    align-items: center;
}

.pengajuan-filter-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

/* ========================================= */
/* SEARCH BAR (KANAN) */
/* ========================================= */

.pengajuan-search-wrapper {
    position: relative;
    flex: 1;
    margin-left: auto;
}

.pengajuan-search-input {
    width: 100%;
    padding: 0 18px;
    border: none;
    border-bottom: 2px solid #3b82f6;
    font-size: 15px;
    background: transparent;
    outline: none;
    transition: border-color 0.3s;
    height: 45px;
    display: flex;
    align-items: center;
}

.pengajuan-search-input:focus {
    border-bottom-color: #1e40af;
}

.pengajuan-search-input::placeholder {
    color: #94a3b8;
}

/* ========================================= */
/* SUGGESTION BOX (AUTOCOMPLETE) */
/* ========================================= */

.pengajuan-suggestion-box {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #3b82f6;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.15);
}

.pengajuan-suggestion-item {
    padding: 12px 18px;
    cursor: pointer;
    display: flex;
    gap: 12px;
    align-items: center;
    transition: background 0.2s;
}

.pengajuan-suggestion-item:hover {
    background: #dbeafe;
}

.pengajuan-suggestion-code {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 600;
    min-width: 80px;
}

.pengajuan-suggestion-name {
    font-size: 14px;
    color: #1e293b;
    font-weight: 500;
}

/* ========================================= */
/* GRID LAYOUT CARDS */
/* ========================================= */

.pengajuan-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 0 40px 40px 40px;
}

/* ========================================= */
/* CARD BARANG (LANDSCAPE STYLE) */
/* ========================================= */

.card-pengajuan {
    display: flex;
    flex-direction: row;
    height: 200px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.1);
    transition: 0.2s ease-in-out;
    overflow: hidden;
    border-left: 4px solid #3b82f6;
}

.card-pengajuan:hover {
    cursor: pointer;
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.25);
}

.card-pengajuan .img {
    width: 170px;
    height: 200px;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-right: 1px solid #e2e8f0;
}

.card-pengajuan .img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-pengajuan .error-text {
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
    text-align: center;
}

/* Konten Kanan */
.card-pengajuan .text {
    flex: 1;
    padding: 15px 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-pengajuan .item-code {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
}

.card-pengajuan .text .h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    line-height: 1.3;
}

.card-pengajuan .item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    margin: 10px 0;
}

.card-pengajuan .item-meta .merek {
    color: #64748b;
    font-weight: 500;
}

.card-pengajuan .item-meta .stock {
    font-weight: 600;
    font-size: 13px;
    color: #1e40af;
}

.card-pengajuan .icon-box {
    padding: 5px 12px;
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    border-radius: 6px;
    display: inline-flex;
    width: fit-content;
}

.card-pengajuan .icon-box .span {
    font-size: 11px;
    font-weight: 600;
    color: #1e40af;
}

/* ========================================= */
/* TAMPILAN KETIKA DATA KOSONG */
/* ========================================= */

.pengajuan-no-data {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

.pengajuan-no-data p {
    font-size: 18px;
    color: #64748b;
    font-weight: 500;
}

/* ========================================= */
/* RESPONSIVE DESIGN */
/* ========================================= */

@media (max-width: 1024px) {
    .pengajuan-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 30px 30px 30px;
    }
}

@media (max-width: 768px) {
    .pengajuan-filter-section {
        flex-wrap: wrap;
        margin: 0 20px 30px 20px;
    }

    .pengajuan-search-wrapper {
        width: 100%;
        margin-left: 0;
        order: 1;
    }

    .pengajuan-cart-icon {
        order: 2;
    }

    .pengajuan-filter-select {
        order: 3;
    }

    .pengajuan-cards-grid {
        grid-template-columns: 1fr;
        padding: 0 20px 30px 20px;
    }
}

/* ========================================= */
/* ALERT STOK */
/* ========================================= */

.alert-stok-hampir-habis {
    background: #fef3c7;
    color: #b45309;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    margin: 8px 0;
    display: flex;
    align-items: center;
}

.alert-stok-habis {
    background: #fee2e2;
    color: #991b1b;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    margin: 8px 0;
    display: flex;
    align-items: center;
}

/* Stock Badge Warna Merah Jika <= 5 */
.stock-low {
    color: #dc2626 !important;
    font-weight: 700;
}

/* ========================================= */
/* HISTORY PENGAJUAN SECTION (SIMPLE STYLE) */
/* ========================================= */

.history-pengajuan-wrapper {
    margin: 0 40px 20px 40px;
}

.history-pengajuan-wrapper h6 {
    color: #000;
    font-size: 14px;
}

.table-history-pengajuan {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 14px;
}

.table-history-pengajuan thead {
    background-color: #f6f8fb;
    font-weight: 600;
    color: #000;
}

.table-history-pengajuan th,
.table-history-pengajuan td {
    padding: 12px 14px;
    font-size: 14px;
    text-align: center;
}

.table-history-pengajuan tbody tr {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s ease;
}

.table-history-pengajuan tbody tr:hover {
    background-color: #f2f6fc;
}

/* HR Pembatas */
hr.my-4 {
    margin: 20px 40px;
    border-top: 2px solid #e2e8f0;
}

/* ========================================= */
/* RIWAYAT PENGAJUAN BOX STYLE */
/* ========================================= */

.riwayat-box {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border-left: 5px solid #1c3f77;
}

.riwayat-header {
    background: linear-gradient(135deg, #f6f8fb 0%, #e9ecef 100%);
    padding: 20px 25px;
    border-bottom: 2px solid #dee2e6;
}

.riwayat-header h5 {
    color: #1c3f77;
    font-size: 18px;
    margin: 0;
}

.riwayat-section {
    padding: 20px 25px;
    border-bottom: 1px solid #f0f0f0;
}

.riwayat-section:last-child {
    border-bottom: none;
}

.section-title {
    color: #1c3f77;
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.riwayat-section label {
    font-weight: 600;
    color: #495057;
    font-size: 13px;
    margin-bottom: 5px;
}

.riwayat-section p {
    color: #212529;
    margin-bottom: 10px;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .riwayat-header,
    .riwayat-section {
        padding: 15px 20px;
    }

    .riwayat-header h5 {
        font-size: 16px;
    }
}

/* Responsive History */
@media (max-width: 1024px) {
    .history-pengajuan-wrapper {
        margin: 0 30px 20px 30px;
    }

    hr.my-4 {
        margin: 20px 30px;
    }
}

@media (max-width: 768px) {
    .history-pengajuan-wrapper {
        margin: 0 20px 20px 20px;
    }

    .table-history-pengajuan {
        font-size: 12px;
    }

    .table-history-pengajuan th,
    .table-history-pengajuan td {
        padding: 10px 8px;
        font-size: 12px;
    }

    hr.my-4 {
        margin: 20px 20px;
    }
}
