/* ================================================================
   Custom Modern Table/Grid Theme
   File terpisah dari file CSS bawaan PHPMaker supaya TIDAK ikut
   ter-replace saat generate ulang project.
   Di-load lewat AddStylesheet() di header.php.
   Menata ulang tampilan tabel list (.ew-grid / .ew-table) yang
   dipakai di semua halaman list PHPMaker.
   ================================================================ */
:root{
	--tbl-border:#edeff2;
	--tbl-header-bg:#f7f8fa;
	--tbl-header-text:#5a6472;
	--tbl-row-hover:#f1f3f6;
	--tbl-accent:#e6394a;
	--tbl-radius:.75rem;
}

.ew-grid.card{
	border:1px solid var(--tbl-border);
	border-radius:var(--tbl-radius);
	box-shadow:0 1px 3px rgba(16,24,40,.06),0 1px 2px rgba(16,24,40,.04);
	overflow:hidden;
}
.ew-grid .card-header.ew-grid-upper-panel,
.ew-grid .card-footer.ew-grid-lower-panel{
	background:#fff !important;
	border-color:var(--tbl-border) !important;
	padding:.85rem 1rem !important;
}
.ew-grid .ew-pager-form .form-control,
.ew-search-panel .form-control{
	border-radius:.5rem;
	border-color:#dde1e6;
}
.ew-grid .ew-pager-form .btn,
.ew-search-panel .btn{
	border-radius:.5rem;
}

.ew-grid table.ew-table{
	margin-bottom:0 !important;
	border-collapse:separate;
	border-spacing:0;
}
.ew-grid table.ew-table>thead>tr>th,
.ew-grid table.ew-table>thead>tr>td{
	background:var(--tbl-header-bg) !important;
	color:var(--tbl-header-text) !important;
	font-size:.72rem;
	text-transform:uppercase;
	letter-spacing:.04em;
	font-weight:700 !important;
	border-bottom:2px solid var(--tbl-border) !important;
	border-right:0 !important;
	padding:.65rem .75rem !important;
	white-space:nowrap;
}
.ew-grid table.ew-table>thead>tr>th.ew-table-header-cell{cursor:pointer;}
.ew-grid table.ew-table>thead>tr>th.ew-table-header-cell:hover{color:var(--tbl-accent) !important;}

.ew-grid table.ew-table>tbody>tr>td{
	border-right:0 !important;
	border-bottom:1px solid var(--tbl-border) !important;
	padding:.6rem .75rem !important;
	vertical-align:middle;
	font-size:.8rem;
	transition:background-color .12s ease;
}
.ew-grid table.ew-table>tbody>tr.ew-table-row,
.ew-grid table.ew-table>tbody>tr.ew-table-alt-row{
	background-color:transparent !important;
}
.ew-grid table.ew-table>tbody>tr:hover>td{
	background-color:var(--tbl-row-hover) !important;
}
.ew-grid table.ew-table>tbody>tr:last-child>td{border-bottom:0 !important;}

.ew-grid input[type=checkbox]{
	width:1rem;
	height:1rem;
	accent-color:var(--tbl-accent);
	cursor:pointer;
}

/* Khusus ikon aksi (edit/copy/view/dsb) - class ew-row-link dipakai
   PHPMaker untuk link ikon di kolom aksi. Sengaja TIDAK pakai
   selector umum "a:not(.btn)" karena itu juga kena link foto
   (.ew-lightbox yang membungkus <img>), bikin foto kepaksa masuk
   kotak bulat kecil dan akhirnya meluber/overlap ke kolom lain.
   Ditambah ":not(.btn)" karena beberapa link (mis. tombol "Detail")
   pakai class gabungan "btn btn-default ew-row-link ew-detail" -
   itu tombol teks biasa, bukan ikon bulat, jadi harus dikecualikan. */
.ew-grid table.ew-table td a.ew-row-link:not(.btn){
	display:inline-flex;
	align-items:center;
	justify-content:center;
	width:1.9rem;
	height:1.9rem;
	border-radius:50%;
	color:#6b7280;
	transition:background-color .15s ease,color .15s ease;
}
.ew-grid table.ew-table td a.ew-row-link:not(.btn):hover{
	background-color:var(--tbl-row-hover);
	color:var(--tbl-accent);
	text-decoration:none;
}

/* Foto/thumbnail di kolom (link .ew-lightbox membungkus <img>) -
   dirapikan sedikit tanpa mengubah ukuran aslinya. */
.ew-grid table.ew-table td a.ew-lightbox{
	display:inline-block;
}
.ew-grid table.ew-table td img.ew-image{
	border-radius:.4rem;
}

.ew-grid .pagination{gap:.15rem;}
.ew-grid .pagination .page-link{
	border:0 !important;
	border-radius:.5rem !important;
	color:#5a6472;
	font-size:.8rem;
}
.ew-grid .pagination .page-item.active .page-link{
	background:var(--tbl-accent) !important;
	color:#fff !important;
}
.ew-grid .pagination .page-link:hover{
	background:var(--tbl-row-hover);
	color:var(--tbl-accent);
}
