body {
  font-family: 'Segoe UI', sans-serif;
  background: #F8FAFC;
}
.app-header {
  margin-bottom: 15px;
  display: none;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: bold;
  color: #1E293B;
}
.grid-wrapper {
  border: 1px solid #DDD;
  background: white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  overflow: auto;
  /* max-height dihapus agar bisa di-set per grid */
  border-bottom: 0px solid black;
}
.grid-container {
  display: inline-block;
  min-width: 100%;
  margin-top: 7px;
}
.grid-header,
.grid-row {
  display: flex;
}
.grid-header {
  background: #F1F5F9;
  font-weight: 600;
}
.header-cell,
.grid-cell {
  border-right: 1px solid #D8D8D8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
  box-sizing: border-box;
  padding-left: 5px;
  height: 28px;
  font-size: 13px;
  border-bottom: 1px solid #CDCDCD;
  text-align: left;
}
div.grid-header div.header-cell {
  text-align: left;
  font-weight: 500;
  padding-top: 9px;
  padding-left: 9px;
  font-size: 15px;
}
div.grid-cell button.btn {
}
.grid-cell button.btn {
}
div.grid-header div.header-cell {
  padding-bottom: 26px;
}
.header-cell:last-child,
.grid-cell:last-child {
  border-right: none;
}
.resize-handle {
  position: absolute;
  right: -4px;
  top: 0;
  width: 5px;
  height: 100%;
  cursor: col-resize;
  z-index: 10;
  background: #CBD5E1;
}
.grid-cell.numeric {
  text-align: right;
}
.grid-cell.active {
  background-color: #DBEAFE;
  border: 1px solid #3B82F6;
  z-index: 2;
}
.grid-cell input,
.grid-cell select {
  width: 97%;
  height: 75%;
  border: 45px none;
  outline: none;
  background: transparent;
  font: 15px sans-serif;
  text-align: inherit;
  padding-top: 3px;
}
.grid-cell input[type="checkbox"] {
  transform: scale(1.2);
  margin: 4px 0 0;
  width: ;
  height: 16px;
}
.action-cell .btn {
  padding: 10px 8px 13px;
  font-size: 12px;
  background: #EF4444;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  border-top: 0px solid black;
  height: 21px;
}
.action-cell .btn:hover {
  opacity: 0.9;
}
.required::after {
  content: " *";
  color: red;
  font-weight: bold;
}
.readonly {
  background-color: #F5F5F5;
}
.grid-body .grid-row:nth-child(even) {
  background-color: #F4F4F4;
  /* Warna belang (biru/abu-abu sangat muda) */
}
.grid-row.new-row {
  background-color: #F0FDF4;
  /* Pastikan ini SETELAH kode zebra */
}
/* 1. Untuk Header Tetap (Sticky) */
.grid-header {
  position: sticky;
  top: 0;
  z-index: 20;
  /* Pastikan warna latar belakang tidak transparan */
  background-color: #F0F0F0;
  /* Sesuaikan dengan warna header Anda */
}
/* 3. Untuk Warna Baris Aktif (Cream Muda) */
.grid-row.active-row {
  background-color: #FFFBEB;
  /* Warna cream muda */
}
/* Pastikan sel yang aktif (biru) tetap menang */
.grid-row.active-row .grid-cell.active {
  background-color: #E0E8F7;
}
/* ... (Semua CSS Anda sebelumnya) ... */
/* --- STYLES UNTUK TAB KONTENER (BARU) --- */
.tab-container {
  background: white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  /* Beri sedikit ruang jika grid master terlalu pendek */
  min-height: 200px;
}
.tab-headers {
  display: flex;
  background: #F1F5F9;
  border-bottom: 2px solid #CBD5E1;
}
.tab-headers button {
  padding: 7px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #334155;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  /* Menutupi border-bottom container */
  display: flex;
  align-items: center;
  gap: 8px;
  border-top-right-radius: 0;
  margin-top: 2px;
}
.tab-headers button:hover {
  background: #E2E8F0;
}
.tab-headers button.active {
  background: white;
  color: #3B82F6;
  border-bottom: 3px solid #3B82F6;
}
.tab-content {
  padding: 10px;
}
/* PENTING: 
  Pastikan grid di dalam tab-panel mengisi ruang.
  Komponen <data-grid> sekarang dibungkus oleh <div>.tab-panel
*/
.tab-panel .grid-wrapper {
  /* Hapus border/shadow karena sudah ada di tab-container */
  border: none;
  box-shadow: none;
  /* Sesuaikan tinggi agar pas di dalam tab */
  height: auto !important;
  /* Hapus tinggi fix dari config */
  max-height: 400px;
  /* Beri batas max, sesuaikan jika perlu */
}
div.tab-headers button {
  /*+border-radius: 0px 15px 0px 0px;*/
  -moz-border-radius: 0px 15px 0px 0px;
  -webkit-border-radius: 0px 15px 0px 0px;
  -khtml-border-radius: 0px 15px 0px 0px;
  border-radius: 0px 15px 0px 0px;
  border: 1px solid #C4C4C4;
}
/* --- Tambahkan ini di akhir mi.css --- */
/* Untuk Tombol Dinamis di atas grid */
.grid-buttons {
  margin-bottom: 8px;
  display: flex;
  gap: 8px;
}
.grid-buttons button {
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 600;
  background: #3B82F6;
  /* Biru */
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.grid-buttons button:hover {
  opacity: 0.9;
}
.grid-buttons button:nth-child(2) {
  background: #16A34A;
  /* Hijau untuk XLS */
}
/* Untuk Indikator Sortir di Header */
.header-cell {
  cursor: pointer;
  user-select: none;
  height: 25px;
}
.sort-icon {
  color: #3B82F6;
  /* Biru */
  font-weight: bold;
  margin-left: 6px;
}
/* Untuk Grid Footer (Summary Row) */
.grid-footer {
  display: flex;
  background: #F1F5F9;
  /* Warna header */
  border-top: 2px solid #CBD5E1;
  font-weight: 600;
  position: sticky;
  bottom: 0;
  z-index: 20;
}
.footer-cell {
  padding: 6px 8px;
  border-right: 1px solid #E2E8F0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}
.footer-cell:last-child {
  border-right: none;
}
.footer-cell.numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
/* --- Batas Tambahan CSS --- */
