/* ================== KHUSUS HALAMAN LAPORAN ================== */
/* 🚫 Cegah keclap sidebar */
.sidebar-hide-temp .main-sidebar {
  visibility: hidden !important;
}

.container {
    min-height: 70vh; /* isi akan minimal setinggi 70% layar */
}

/* tata letak pagination */
.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.pagination-controls select {
    padding: 4px 8px;
    font-size: 14px;
    border-radius: 6px;
    margin: 0 5px;
}

/* ================== DETAIL CONTAINER ================== */
.detail-container {
    position: relative;
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-top: 20px;
}

.detail-header {
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: bold;
}

/* ================== INFO LIST ================== */
.info-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 40px;
    row-gap: 10px;
    margin-bottom: 20px;
}

.info-group {
    display: grid;
    grid-template-columns: 200px 20px 1fr;
    align-items: center;
}

.info-group .label {
    font-weight: bold;
}

.info-group .colon {
    text-align: right;
    padding-right: 5px;
}

.invoice-group {
    grid-template-columns: 200px 20px max-content;
}

.invoice-group .invoice-input {
    width: 180px;
    max-width: 100%;
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* ================== FORM CONTROL ================== */
select.form-control,
input.form-control {
    padding: 6px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
}

.akun-pembayaran-group .value select {
    max-width: 300px;
    min-width: 200px;
    width: 100%;
}

/* ================== TABLE ================== */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.table th,
.table td {
    border: 1px solid #dee2e6;
    padding: 8px;
    text-align: left;
}

.table th {
    background-color: #f8f9fa;
}

tr:hover {
    background-color: #f1f1f1;
}

/* ================== FORM ACTION BUTTONS ================== */
.form-action-buttons {
    margin-top: 25px;
    display: flex;
    align-items: center;
}

.btn-submit {
    padding: 10px 20px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.btn-submit:hover {
    background: #218838;
}

.btn-cancel {
    padding: 10px 20px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 10px;
}
.btn-cancel:hover {
    background: #c82333;
}

/* tombol X */
.btn-close-x {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: #333;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
.btn-close-x:hover {
    color: #dc3545;
}

/* ================== ERROR STOK ================== */
.error-stok {
    background: #ffe2e2;
    color: #b30000;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 5px;
}

/* ================== DETAIL TRANSAKSI MITRA ================== */
.detail-transaksi-container {
    min-height: 70vh; /* biar footer tidak naik */
    position: relative;
}

/* tombol print di kanan atas */
.print-btn {
    position: absolute;
    top: 5px;
    right: 15px;
    padding: 6px 10px;
    border-radius: 50%;
}

/* ================== TABLE KHUSUS LAPORAN ================== */
.my-table thead th {
    vertical-align: middle;
    text-align: center;
    background-color: #f8f9fa;
}

/* ================== TEKS STATUS & WARNA ================== */
.text-success { color: green; font-weight: bold; }
.text-danger { color: red; font-weight: bold; }
.text-warning { color: orange; font-weight: bold; }

.text-center { text-align: center; }

.status-draft {
    font-size: 13px;
    color: #ffc107;
    font-weight: bold;
}
.status-saved {
    font-size: 13px;
    color: #28a745;
    font-weight: bold;
}

.status-title {
    font-weight: bold;
    margin-top: 20px;
    margin-bottom: 10px;
}

/* ================== PENCARIAN & PAGINATION ================== */
#searchInput {
    width: 100%;
    max-width: 350px;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.pagination-wrapper {
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.pagination {
    display: flex;
    gap: 10px;
    align-items: center;
}

.pagination button {
    padding: 5px 12px;
    border: 1px solid #ccc;
    background: white;
    cursor: pointer;
    border-radius: 4px;
}

.pagination button:disabled {
    background: #eee;
    cursor: not-allowed;
}

/* ================== PRODUK ITEM ================== */
.produk-item input,
.produk-item select {
    height: 38px;
    font-size: 14px;
}

.produk-item .form-control {
    padding: 0.35rem 0.5rem;
}

/* ================== SUMMARY TABLE ================== */
.summary-table {
    border-collapse: collapse;
    margin-top: 20px;
}

.summary-table th,
.summary-table td {
    padding: 8px 16px;
    white-space: nowrap;
    border: none;
}

.summary-table th {
    text-align: left;
    width: 200px;
    position: relative;
}

.summary-table th::after {
    content: ":";
    position: absolute;
    right: 0;
}

.summary-table td {
    text-align: right;
    font-weight: bold;
    padding-left: 20px;
}

/* tombol cetak */
.btn-print {
    float: right;
    margin-bottom: 10px;
}

.btn-view { color: #28a745; }
  .btn-edit { color: #007bff; }
  .btn-delete { color: #dc3545; }
  tr:hover { background-color: #f1f1f1; }
  .status-draft { font-size: 13px; color: #ffc107; font-weight: bold; }
  .status-saved { font-size: 13px; color: #28a745; font-weight: bold; }
  .pagination-wrapper {
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
  }

/* ================== RESPONSIVE ================== */
@media (max-width: 768px) {
    .my-table th,
    .my-table td {
        font-size: 13px;
        padding: 6px;
    }
    #searchInput {
        width: 100%;
    }
    .pagination-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ================== Print ================== */
@media print {
  body * {
    visibility: hidden;
  }

  /* Hanya area print yang tampil */
  #printArea, 
  #printArea * {
    visibility: visible;
  }

  #printArea {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }

  /* Sembunyikan tombol */
  .btn, 
  .btn-back, 
  .btn-print {
    display: none !important;
  }

  /* Header tabel tetap terbaca */
  .table thead th {
    color: #000 !important;
    background-color: #f8f9fa !important;
  }
}

/* ================== Layout Umum ================== */
.detail-header h4 {
  flex: 1;
  text-align: center;
}

.detail-header {
  position: relative;
}

.btn-print {
  position: absolute;
  right: 0;
}

/* ================== Kolom Tanda Tangan ================== */
.ttd-section {
  margin-top: 60px;
  display: flex;
  justify-content: space-between;
  text-align: center;
}

.ttd-box {
  width: 30%;
}

.ttd-box p {
  margin-bottom: 80px;
}

.ttd-name {
  text-decoration: underline;
  font-weight: bold;
}

