@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');

/* ================================
   RESET
================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "DM Sans", sans-serif;
    background: linear-gradient(180deg,
            #f5f8f6 0%,
            #eef7f2 55%,
            #ffffff 100%);
    color: #333;
    font-size: 13px;
}

/* ================================
   CONTAINER
================================ */
.container {
    width: 90%;
    max-width: 1050px;
    margin: 28px auto 45px;
}

/* ================================
   HEADER
================================ */
.header {
    position: relative;
    text-align: center;
    margin-bottom: 22px;
}

.header h1 {
    font-family: "Playfair Display", serif;
    font-size: 25px;
    color: #123c2d;
    margin-top: 8px;
}

.btn-kembali {
    position: absolute;
    left: 0;
    top: 2px;

    display: inline-block;
    padding: 8px 13px;

    background: #e8f5ec;
    color: #087443;
    text-decoration: none;

    border-radius: 7px;
    font-size: 11px;
    font-weight: 600;

    transition: 0.2s ease;
}

.btn-kembali:hover {
    background: #087443;
    color: #ffffff;
}

/* ================================
   CARD
================================ */
.card {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px 22px;
    margin-bottom: 20px;

    box-shadow: 0 5px 18px rgba(25, 80, 60, 0.07);
    border: 1px solid #edf2ef;
}

.card h2 {
    color: #123c2d;
    font-size: 17px;
    margin-bottom: 17px;
    font-weight: 700;
}

/* ================================
   FORM
================================ */
.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;

    color: #38574b;
    font-size: 12px;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 9px 11px;

    border: 1px solid #d6e2dc;
    border-radius: 7px;

    background: #fbfdfc;
    color: #333;

    font-family: "DM Sans", sans-serif;
    font-size: 12px;

    outline: none;
    transition: 0.2s ease;
}

.form-group input,
.form-group select {
    height: 38px;
}

.form-group textarea {
    min-height: 105px;
    resize: vertical;
    line-height: 1.6;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #087443;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(8, 116, 67, 0.08);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #a3b1aa;
}

/* ================================
   INPUT FILE
================================ */
.form-group input[type="file"] {
    height: auto;
    padding: 8px;
    background: #f5f8f6;
    cursor: pointer;
}

.info-file {
    margin-top: 7px;
    padding: 8px 10px;

    background: #eef7f2;
    border-left: 3px solid #087443;

    border-radius: 5px;
    color: #64776f;

    font-size: 10px;
    line-height: 1.6;
}

#nama-file {
    margin-top: 7px;
    color: #7b8c85;
    font-size: 10px;
    font-style: italic;
}

/* ================================
   PREVIEW GAMBAR
================================ */
.preview-gambar {
    display: none;

    margin-top: 12px;
    width: 180px;
    height: 125px;

    border-radius: 8px;
    overflow: hidden;

    border: 1px solid #dce8e2;
    background: #f5f8f6;
}

.preview-gambar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ================================
   TOMBOL SIMPAN
================================ */
.aksi {
    margin-top: 18px;
    text-align: right;
}

.btn-simpan {
    border: none;
    padding: 9px 17px;

    background: #087443;
    color: #ffffff;

    border-radius: 7px;
    font-family: "DM Sans", sans-serif;

    font-size: 12px;
    font-weight: 600;

    cursor: pointer;
    transition: 0.2s ease;
}

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

/* ================================
   HEADER TABEL
================================ */
.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;
    margin-bottom: 15px;
}

.table-header h2 {
    margin-bottom: 0;
}

#cariProduk {
    width: 220px;
    height: 35px;

    padding: 8px 11px;

    border: 1px solid #d6e2dc;
    border-radius: 7px;

    background: #fbfdfc;
    font-family: "DM Sans", sans-serif;
    font-size: 11px;

    outline: none;
}

#cariProduk:focus {
    border-color: #087443;
    box-shadow: 0 0 0 3px rgba(8, 116, 67, 0.08);
}

/* ================================
   TABLE
================================ */
.table-card {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 850px;
}

thead {
    background: #123c2d;
}

thead th {
    padding: 10px 9px;

    color: #ffffff;
    font-size: 11px;
    font-weight: 600;

    text-align: center;
    white-space: nowrap;
}

tbody td {
    padding: 9px 8px;

    border-bottom: 1px solid #edf1ee;

    color: #56665f;
    font-size: 11px;

    vertical-align: middle;
}

tbody tr:hover {
    background: #f7faf8;
}

/* ================================
   FOTO PRODUK
================================ */
.foto-produk {
    width: 58px;
    height: 48px;

    object-fit: cover;

    border-radius: 6px;
    border: 1px solid #dce8e2;
}

.foto-kosong {
    width: 58px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #eef7f2;
    color: #087443;

    border-radius: 6px;
    font-size: 19px;
}

/* ================================
   NAMA PRODUK & HARGA
================================ */
tbody td strong {
    color: #123c2d;
    font-size: 12px;
    font-weight: 700;
}

.harga {
    display: inline-block;
    margin-top: 3px;

    color: #087443;
    font-size: 11px;
    font-weight: 700;
}

/* ================================
   KATEGORI
================================ */
.kategori {
    display: inline-block;

    padding: 4px 8px;

    background: #e8f5ec;
    color: #087443;

    border-radius: 20px;

    font-size: 10px;
    font-weight: 600;

    white-space: nowrap;
}

/* ================================
   WHATSAPP
================================ */
.wa-link {
    color: #087443;
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
}

.wa-link:hover {
    text-decoration: underline;
}

/* ================================
   TOMBOL AKSI
================================ */
.aksi-table {
    text-align: center;
    white-space: nowrap;
}

.btn-edit,
.btn-hapus {
    display: inline-block;

    padding: 6px 9px;
    margin: 2px;

    border-radius: 6px;

    text-decoration: none;
    font-size: 10px;
    font-weight: 600;

    transition: 0.2s ease;
}

.btn-edit {
    background: #e8f5ec;
    color: #087443;
}

.btn-edit:hover {
    background: #087443;
    color: #ffffff;
}

.btn-hapus {
    background: #fff0f0;
    color: #c0392b;
}

.btn-hapus:hover {
    background: #c0392b;
    color: #ffffff;
}

/* ================================
   DATA KOSONG
================================ */
.data-kosong {
    padding: 25px !important;

    text-align: center;
    color: #8a9891 !important;
    font-size: 11px !important;
}

/* ================================
   SCROLLBAR TABLE
================================ */
.table-card::-webkit-scrollbar {
    height: 6px;
}

.table-card::-webkit-scrollbar-track {
    background: #eef3f0;
    border-radius: 10px;
}

.table-card::-webkit-scrollbar-thumb {
    background: #b8cec2;
    border-radius: 10px;
}

.table-card::-webkit-scrollbar-thumb:hover {
    background: #087443;
}

/* ================================
   RESPONSIVE
================================ */
@media (max-width: 750px) {

    .container {
        width: 94%;
        margin-top: 20px;
    }

    .header {
        text-align: left;
        padding-top: 43px;
    }

    .header h1 {
        font-size: 21px;
    }

    .btn-kembali {
        top: 0;
    }

    .card {
        padding: 17px;
    }

    .table-header {
        flex-direction: column;
        align-items: stretch;
    }

    #cariProduk {
        width: 100%;
    }
}

@media (max-width: 480px) {

    body {
        font-size: 12px;
    }

    .container {
        width: 94%;
    }

    .header h1 {
        font-size: 19px;
    }

    .card h2 {
        font-size: 15px;
    }

    .btn-simpan {
        width: 100%;
    }

    .preview-gambar {
        width: 160px;
        height: 110px;
    }
}