/* =========================================
   1. GLOBAL & BACKGROUND POLA TITIK
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght=400;600;700;800;900&display=swap');

body {
    font-family: 'Nunito', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #ffffff;
    /* Efek Pola Titik (Dotted Background) */
    background-image: radial-gradient(#d1d5db 1px, transparent 1px);
    background-size: 25px 25px;
    color: #333;
    margin: 0;
    padding: 20px; 
}

h2 { 
    color: #2d6a4f; 
}

/* =========================================
   2. NAVBAR CUSTOM (PILL-SHAPE) - UPDATED
   ========================================= */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #ffffff;
    padding: 10px 25px;
    border-radius: 60px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    max-width: 1200px;
    position: sticky;      /* Membuat navbar menempel */
    top: 20px;            /* Memberikan jarak dari atas layar saat melayang */
    z-index: 1000;         /* Memastikan navbar di atas elemen lain */
    margin: 0 auto 20px;   /* Margin otomatis ke tengah dan jarak bawah */
}

.nav-logo img {
    height: 40px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 25px;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-links li a {
    text-decoration: none;
    color: #4a5568; 
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.nav-links li a:hover {
    color: #ed8805; /* Warna hover menyesuaikan tema HeyaCamp */
}

.nav-links li a i {
    font-size: 18px;
}

.text-stack {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    font-size: 14px;
    text-align: center;
}

/* =========================================
   3. LAYOUT CONTAINER & CARD
   ========================================= */
.container { 
    max-width: 1100px; 
    margin: 40px auto; 
    padding: 0 20px; 
    box-sizing: border-box;
}

.card {
    background: white;
    padding: 30px;
    border-radius: 24px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.03);
    border: 1px solid #e2e8f0;
}

.card h2 {
    font-size: 24px;
    font-weight: 900;
    color: #1e293b;
    margin-top: 0;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card h2 i { color: #ea580c; }

/* =========================================
   4. KATALOG GRID & ITEMS (PREMIUM CARD)
   ========================================= */
.grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); 
    gap: 25px; 
}

.item { 
    border: 1px solid #f1f5f9; 
    border-radius: 20px; 
    padding: 15px; 
    text-align: center; 
    background: #fff; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
}

.item img { 
    width: 100%; 
    border-radius: 12px; 
    height: 160px; 
    object-fit: cover; 
}

/* =========================================
   5. BUTTONS & COUNTER (HEYACAMP THEME)
   ========================================= */
.btn { 
    background: #ed8805; /* Warna Oranye utama */
    color: white; 
    border: none; 
    padding: 12px; 
    border-radius: 10px; 
    cursor: pointer; 
    width: 100%; 
    margin-top: 10px; 
    font-size: 14px; 
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(237, 136, 5, 0.2);
    transition: 0.2s;
}

.btn:hover { 
    background: #ea580c; 
    transform: translateY(-1px);
}

.counter-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 12px 0;
}

.btn-qty {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    color: #475569;
    transition: 0.2s;
}

.btn-qty:hover {
    background: #ed8805;
    color: white;
    border-color: #ed8805;
}

.qty-val {
    font-weight: 800;
    font-size: 16px;
    min-width: 20px;
    color: #1e293b;
}

.btn-hapus {
    background: #fee2e2;
    color: #ef4444;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}
.btn-hapus:hover { background: #fca5a5; }

/* =========================================
   6. TABLES & STATUS (DESKTOP)
   ========================================= */
.table-responsive {
    width: 100%;
    background: white;
    border-radius: 20px;
}

table { 
    width: 100%; 
    border-collapse: collapse; 
}

th, td { 
    padding: 16px; 
    text-align: left; 
    border-bottom: 1px solid #f1f5f9; 
    font-size: 15px;
    white-space: nowrap; 
}

th { 
    background: #f8fafc; 
    color: #1e293b; 
    font-weight: 800;
}

.status, .status-badge { 
    padding: 6px 14px; 
    border-radius: 50px; 
    font-size: 12px; 
    font-weight: 700;
    display: inline-block;
}
.status { background: #fef3c7; color: #d97706; }
.status-konfirmasi { background: #fef3c7; color: #92400e; }
.status-selesai { background: #dcfce7; color: #166534; }

/* =========================================
   7. RESPONSIVE MOBILE (PERBAIKAN TOTAL)
   ========================================= */
@media (max-width: 768px) {
    .navbar { display: none !important; }

    body { padding: 10px; padding-bottom: 100px !important; }

    .container { margin: 20px auto; padding: 0 10px; }

    .card { padding: 20px 15px; border-radius: 20px; }
    .card h2 { font-size: 20px; margin-bottom: 20px; }

    /* Katalog di HP jadi 2 kolom */
    .grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px;
    }
    .item { padding: 10px; border-radius: 15px; }
    .item img { height: 120px; }
    .btn { padding: 10px; font-size: 13px; }

    /* --- TRICK MERUBAH TABEL MENJADI STRUKTUR KARTU --- */
    .table-responsive {
        overflow-x: visible; 
        border: none;
        box-shadow: none;
    }

    /* Paksa elemen tabel berperilaku seperti block biasa (menumpuk vertikal) */
    table, thead, tbody, th, td, tr { 
        display: block; 
    }

    /* Sembunyikan header kolom asli */
    thead { display: none; }

    /* Ubah baris pesanan (tr) menjadi box kartu mandiri */
    tbody tr {
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 16px;
        padding: 15px;
        margin-bottom: 15px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.01);
    }

    /* Khusus untuk baris tulisan "Belum ada pesanan masuk" */
    tbody tr:has(td[colspan]) {
        text-align: center !important;
        background: transparent;
        border: 1px dashed #cbd5e1;
        box-shadow: none;
        padding: 40px 10px;
    }

    tbody tr td[colspan] {
        text-align: center !important;
        color: #64748b;
        font-size: 15px;
        white-space: normal;
        border: none;
    }

    /* Atur kolom data di dalam kartu */
    tbody tr td {
        padding: 10px 0;
        border-bottom: 1px dashed #f1f5f9;
        white-space: normal; /* Supaya teks otomatis turun jika panjang */
        text-align: left;
    }

    /* Sembunyikan pembatas di data terakhir (Aksi/Tombol) */
    tbody tr td:last-child {
        border-bottom: none;
        padding-bottom: 0;
        display: flex;
        justify-content: flex-end; /* Tombol sampah geser ke kanan */
    }

    /* Tambahkan teks panduan otomatis di atas data */
    tbody tr td:nth-child(2)::before {
        content: "Alat disewa:";
        display: block;
        font-size: 11px;
        color: #94a3b8;
        font-weight: 800;
        text-transform: uppercase;
        margin-bottom: 2px;
    }

    tbody tr td:nth-child(3)::before {
        content: "Tanggal Sewa:";
        display: block;
        font-size: 11px;
        color: #94a3b8;
        font-weight: 800;
        text-transform: uppercase;
        margin-bottom: 2px;
    }

    .btn-hapus {
        padding: 8px 20px;
        font-size: 13px;
    }

    /* Tampilkan Navigasi Bawah Mobile */
    .mobile-nav {
        display: flex !important;
        position: fixed;
        bottom: 0; left: 0; right: 0;
        height: 75px;
        background: white;
        justify-content: space-around;
        align-items: center;
        box-shadow: 0 -5px 20px rgba(0,0,0,0.05);
        z-index: 9999;
        border-radius: 25px 25px 0 0;
    }
}

/* Utility Menu Mobile */
.mobile-nav { display: none; }
.mobile-nav-item { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: #94a3b8; font-size: 11px; font-weight: 700; gap: 5px; }
.mobile-nav-item.active { color: #ed8805; }
.mobile-nav-item i { font-size: 22px; }
    /* Gaya tambahan khusus elemen tabel booking */
        .status-badge {
            padding: 6px 14px;
            border-radius: 50px;
            font-size: 12px;
            font-weight: 700;
            background: #e2e8f0;
            display: inline-block;
        }
        .status-konfirmasi { background: #fef3c7; color: #92400e; }
        .status-selesai { background: #dcfce7; color: #166534; }
        
        .card {
            background: white;
            padding: 30px;
            border-radius: 24px;
            box-shadow: 0 10px 25px rgba(0,0,0,0.03);
            border: 1px solid #e2e8f0;
        }
        
        .card h2 {
            font-size: 24px;
            font-weight: 900;
            color: #1e293b;
            margin-top: 0;
            margin-bottom: 25px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .card h2 i { color: #ea580c; }

        table { width: 100%; border-collapse: collapse; }
        th, td { text-align: left; padding: 16px; border-bottom: 1px solid #f1f5f9; font-size: 15px; white-space: nowrap; }
        th { background-color: #f8fafc; color: #1e293b; font-weight: 800; }
        
        .btn-hapus {
            background: #fee2e2;
            color: #ef4444;
            border: none;
            padding: 8px 14px;
            border-radius: 8px;
            cursor: pointer;
            transition: 0.2s;
        }
        .btn-hapus:hover { background: #fca5a5; }