/* =============================
    CUSTOM CSS: Card, Form & UI
    ============================= */

/* ====== Sidebar Menu Toko ====== */
.card-menu-toko {
    border: 1px solid #e4e6ef;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.card-menu-toko .card-header {
    background: #25d366;
    color: #fff;
    font-weight: 600;
    padding: 15px 20px;
    font-size: 16px;
}

.card-menu-toko .card-header h4 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: #fff;
}

.menu-list-stisla {
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu-list-stisla li {
    border-bottom: 1px solid #f1f1f1;
}

.menu-list-stisla li:last-child {
    border-bottom: none;
}

.menu-list-stisla li a {
    display: block;
    padding: 12px 18px;
    color: #444;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

.menu-list-stisla li.active a,
.menu-list-stisla li a:hover {
    background: #fdf7e7;
    color: #25d366;
    font-weight: 600;
}

/* ====== Custom Card (Form Section) ====== */
.custom-card {
    border: 1px solid #e4e6ef;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: 30px;
}

.custom-card-header {
    padding: 18px 22px;
    border-bottom: 1px solid #e4e6ef;
    background: #25d366;
    color: #fff;
}

.custom-card-header h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: #fff;
}

.custom-card-body {
    padding: 25px;
}

/* ====== Form Styling ====== */
.custom-form-control,
.form-control {
    border-radius: 8px;
    border: 1px solid #ddd;
    padding: 10px 14px;
    font-size: 15px;
    width: 100%;
    transition: border-color 0.2s ease-in-out;
    /* margin-bottom: 20px; */
}

.custom-form-control:focus,
.form-control:focus {
    border-color: #25d366;
    outline: none;
    box-shadow: 0 0 0 2px rgba(200, 162, 67, 0.2);
}

textarea.custom-form-control {
    height: auto;
    padding-top: 10px;
    resize: vertical;
}

.form-group label {
    font-weight: 600;
    color: #1c1c1c;
    margin-bottom: 8px;
    display: block;
}
.input-group-text i {
  font-size: 1em; /* atau sesuaikan, misalnya 0.9em */
  vertical-align: middle; /* agar rata vertikal */
}

/* ====== Buttons ====== */
/* Styling tombol umum */
.toko-btn {
    background: #25d366;
    color: #fff;
    border: none;
    padding: 8px 20px;
    /* lebih kecil */
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease-in-out;
}

.toko-btn:hover {
    background: #b4913b;
}

/* Variasi tombol danger */
.toko-btn-danger {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 8px 20px;
    /* lebih kecil */
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    /* bisa ditambahkan jika perlu */
    transition: all 0.3s ease-in-out;
}

.toko-btn-danger:hover {
    background: #a71d2a;
}

/* Variasi tombol success */
.toko-btn-success {
    background: #1ba500;
    color: #fff;
    border: none;
    padding: 8px 20px;
    /* lebih kecil */
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    /* bisa ditambahkan jika perlu */
    transition: all 0.3s ease-in-out;
}

.toko-btn-success:hover {
    background: #00a56e;
}

.primary-btn-outline {
    background: transparent;
    border: 2px solid #25d366;
    color: #25d366;
    padding: 11px 26px;
    border-radius: 8px;
    font-weight: 600;
    margin-left: 10px;
    transition: all 0.3s ease-in-out;
}

.primary-btn-outline:hover {
    background: #25d366;
    color: #fff;
}

/* ====== Upload Preview Box ====== */
.image-preview {
    width: 250px;
    height: 250px;
    border: 2px dashed #009b39;
    border-radius: 8px;
    background: #f8f8f8;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    margin-top: 10px;
    overflow: hidden;
}

.image-preview input {
    line-height: 200px;
    font-size: 200px;
    position: absolute;
    opacity: 0;
    z-index: 10;
}

.image-preview label {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    text-align: center;
    background: rgb(2 93 6 / 78%);
    color: #fff;
    font-weight: bold;
    padding: 5px;
    cursor: pointer;
}

/* ====== Select2 Custom Styling ====== */
.select2-container--default .select2-selection--single {
    border: 2px solid #25d366;
    height: 45px;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 14px;
    color: #333;
    display: flex;
    align-items: center;
}

.select2-container--default .select2-selection--single:focus,
.select2-container--default .select2-selection--single:active {
    border-color: #25d366 !important;
    box-shadow: 0 0 0 0.2rem rgba(200, 162, 67, .25);
    outline: none;
}

.select2-container--default .select2-selection__arrow b {
    border-color: #25d366 transparent transparent transparent !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #25d366;
    color: #fff;
}

.select2-container--default .select2-selection__placeholder {
    color: #999;
}

/* =============================
    DATATABLES CUSTOM STYLING
    ============================= */

/* Table wrapper */
.dataTables_wrapper {
    width: 100%;
    overflow-x: auto;
    padding: 15px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* Table */
table.dataTable {
    border-collapse: collapse !important;
    width: 100% !important;
}

table.dataTable thead th {
    background: #cecece;
    color: #000000;
    font-weight: 600;
    font-size: small;
    text-align: center;
    /* padding: 12px 15px; */
}

table.dataTable tbody td {
    /* padding: 10px 15px;
    vertical-align: middle; */
    font-size: small;
}

table.dataTable thead>tr>th.sorting,
table.dataTable thead>tr>th.sorting_asc,
table.dataTable thead>tr>th.sorting_desc,
table.dataTable thead>tr>th.sorting_asc_disabled,
table.dataTable thead>tr>th.sorting_desc_disabled,
table.dataTable thead>tr>td.sorting,
table.dataTable thead>tr>td.sorting_asc,
table.dataTable thead>tr>td.sorting_desc,
table.dataTable thead>tr>td.sorting_asc_disabled,
table.dataTable thead>tr>td.sorting_desc_disabled {
    cursor: pointer;
    position: relative;
    padding-right: 0px;
}
table.dataTable tbody td .btn .btn-warning .btn-danger .btn-sm {
    /* padding: 10px 15px;
    vertical-align: middle; */
    /* Padding sangat kecil untuk tombol aksi */
        padding: 3px 6px !important; 
        /* Ukuran font sangat kecil */
        font-size: 10px !important; 
        /* Margin antar tombol dikurangi agar rapat */
        margin: 1px 0;
}

/* Hover effect */
table.dataTable tbody tr:hover {
    background: #fdf7e7 !important;
}

/* Tombol Export */
div.dt-buttons .dt-button {
    background-color: #25d366 !important;
    border: none !important;
    color: #fff !important;
    padding: 7px 18px !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    margin: 2px !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease-in-out;
}

div.dt-buttons .dt-button:hover {
    background-color: #25d366 !important;
}

/* Search input */
.dataTables_filter input {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 6px 12px;
    margin-left: 8px;
    outline: none;
    transition: 0.3s;
}

.dataTables_filter input:focus {
    border-color: #25d366;
    box-shadow: 0 0 0 2px rgba(200, 162, 67, 0.2);
}

/* Length menu */
.dataTables_length select {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 5px 10px;
    outline: none;
}

.dataTables_length select:focus {
    border-color: #25d366;
}

/* Info text */
.dataTables_info {
    font-size: 14px;
    color: #555;
    margin-top: 8px;
}

/* Pagination */

/* ====================================
    RESPONSIVE STYLING FOR MOBILE VIEW
    ==================================== */
@media (max-width: 768px) {
    /* Mengurangi padding dan ukuran dasar wrapper DataTables */
    .dataTables_wrapper {
        padding: 10px;
        font-size: 13px;
    }

    /* Mengurangi padding header tabel */
    table.dataTable thead th {
        padding: 8px 10px;
        font-size: 12px;
    }

    /* Mengurangi padding cell data */
    table.dataTable tbody td {
        padding: 5px 8px;
        font-size: 12px;
    }

    /* Mengurangi ukuran tombol export DataTables */
    div.dt-buttons .dt-button {
        padding: 4px 10px !important; /* Padding lebih kecil */
        font-size: 11px !important; /* Font lebih kecil */
        margin: 1px !important;
    }

    /* Mengurangi ukuran input pencarian dan length menu */
    .dataTables_filter input,
    .dataTables_length select {
        padding: 4px 8px;
        font-size: 12px;
    }

    /* Mengurangi ukuran info text dan pagination */
    .dataTables_info,
    .dataTables_paginate {
        font-size: 11px;
    }
    
    /* PENYESUAIAN TAMBAHAN UNTUK TOMBOL AKSI DI DALAM TABEL */
    /* Menargetkan semua tombol dengan kelas .btn-sm di dalam body tabel */
    table.dataTable tbody td .btn-sm {
        /* Padding sangat kecil untuk tombol aksi */
        padding: 3px 6px !important; 
        /* Ukuran font sangat kecil */
        font-size: 10px !important; 
        /* Margin antar tombol dikurangi agar rapat */
        margin: 1px 0;
        /* Membuat tombol menjadi inline-block (jika ingin berjejer) */
        display: inline-block;
    }
}