.ahmcd-overlay {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  background: rgba(2,6,23,.5);
}
.ahmcd-modal {
  width: min(960px,96vw);
  max-height: 90vh;
  overflow: auto;
  background: var(--ahm-bg);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(2,6,23,.18);
}
.ahmcd-head {
  display: flex;
  align-items: center;
	background: #2563eb;
  justify-content: space-between;
  padding: 16.8px 22px;
  border: none;
}
.ahmcd-head h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
	text-transform: uppercase;
}
.ahmcd-body {
  padding: 18px 22px;
}
.ahm-grid-3x3 {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 10px;
  background: #fafafa;
  overflow: hidden;
}
.ahm-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
	border-radius: 9px;
  background: #fff;
  border: 1px solid #e2e8f0;
}
.ahm-field label {
  font-size: 15px;
  font-weight: 600;
  color: #000;
	margin-bottom: 4px;
}

.ahm-field input,
.ahm-field select,
.ahm-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fbfdff;
  transition: all .12s ease;
}
.ahm-field input:focus,
.ahm-field select:focus,
.ahm-field textarea:focus {
  outline: none;
  border-color: var(--ahm-primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.18);
}
/* Edit mode */
.ahmcd-modal.is-editing {
  border-color: var(--ahm-edit);
  box-shadow: 0 24px 80px rgba(59,130,246,.25);
}
.ahmcd-modal.is-editing .ahm-field input,
.ahmcd-modal.is-editing .ahm-field select,
.ahmcd-modal.is-editing .ahm-field textarea {
  border-color: #fda4af;
  background: #fbfdff;
}
.ahmcd-foot {
	border: none;
	padding: 2px 22px 18px;
}
.ahmcd-foot #ahmcd-close {
	background: #fff;
	color: #2563eb;
	border: 1px solid #2563eb;
}
.ahmcd-foot .button.button-primary {
	background: #2563eb;
	color: #fff;
	border: 1px solid #2563eb;
}







/* Table */
.ahmcd-wrap .ahmcd-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 10px;
  font-size: 14px;
  overflow: hidden;
}
.ahmcd-wrap .ahmcd-table thead th, td {
	border: 1px solid #e2e8f0 !important;
}
.ahmcd-wrap .ahmcd-table thead th {
  padding: 10px;
  background: #f8fafc;
  color: #1e293b;
  font-weight: 700;
  text-align: center;
  border-bottom: 1px solid #e2e8f0;
}

.ahmcd-wrap .ahmcd-table tbody td {
  padding: 4px;
  text-align: center;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
}

/* Buttons */
.ahmcd-wrap .ahmcd-actions .ahmcd-view {
  font-size: 13px;
	width: fit-content;
	height: 32px;
  font-weight: 700;
  color: #fff;
  background: #2563eb;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
.ahmcd-wrap .ahmcd-actions .ahmcd-view:hover {
  opacity: .9;
}
.ahmcd-wrap .ahmcd-actions .ahmcd-view:active {
  background: #1e40af !important;
  transform: none;
}

/* Pagination buttons */
.ahmcd-wrap #ahmcd-prev,
.ahmcd-wrap #ahmcd-next {
  padding: 7px 14px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: #2563eb;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
.ahmcd-wrap #ahmcd-prev:hover,
.ahmcd-wrap #ahmcd-next:hover {
	opacity: .9;
}
.ahmcd-wrap #ahmcd-prev:disabled,
.ahmcd-wrap #ahmcd-next:disabled {
  background: #2563eb;
  cursor: not-allowed;
  opacity: .7;
}
.ahmcd-wrap #ahmcd-page {
  margin: 0 9px;
  font-weight: 600;
  color: #000;
	font-size: 15px;
}
/* Footer */
.ahmcd-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 25px;
}
.ahmcd-footer .ahmcd-pagination {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ahmcd-footer .ahmcd-perpage {
  font-size: 14px;
  color: #334155;
}
.ahmcd-footer .ahmcd-perpage select {
  margin: 0 5px;
  padding: 4px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
}
.ahmcd-table tbody tr {
  transition: background-color 0.2s ease;
}
.ahmcd-table tbody tr:hover td {
  background-color: #eff6ff;
	cursor: pointer;
}































/* TOOLBAR (1 hàng) */
/* Thanh công cụ 1 hàng */
.toolbarcustomer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
}

/* Nhóm tìm kiếm chiếm toàn bộ phần trống bên trái */
.toolbarcustomer .tc-search{
  flex:1 1 auto;                 /* <-- cho phép giãn */
  display:flex;
  align-items:center;
  gap:10px;
}

/* Hai ô tìm kiếm tự giãn để lấp khoảng trống */
.toolbarcustomer .tc-search input{
  flex:1 1 280px;                /* basis 280px, có thể giãn đầy đủ */
  min-width: 180px;
  height:40px;
  padding:0 12px;
  border:1px solid #e5e7eb;
  border-radius:10px;
}

/* Nút trong search không bị co chữ */
.toolbarcustomer .tc-search .button{
  white-space:nowrap;
}

/* Nhóm nút bên phải giữ kích thước tự nhiên, không giãn */
.toolbarcustomer .tc-actions{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:10px;
}

/* Responsive: màn nhỏ thì cho xuống 2 hàng */
@media (max-width: 960px){
  .toolbarcustomer{ flex-wrap:wrap; }
  .toolbarcustomer .tc-search{ width:100%; order:1; }
  .toolbarcustomer .tc-actions{ order:2; }
}


.toolbarcustomer .tc-group{ display:flex; align-items:center; gap:12px; }
.toolbarcustomer .tc-title{ margin-right:8px; }
.toolbarcustomer .tc-field{ display:flex; align-items:center; gap:8px; }
.toolbarcustomer .tc-field input{
  height:40px; padding:0 12px; border:1px solid #e5e7eb; border-radius:10px; background:#fff;
}

/* MODAL tuỳ chỉnh cột */
.tc-overlay{ position:fixed; inset:0; display:none; align-items:center; justify-content:center; background:rgba(0,0,0,.45); z-index:99999;}
.tc-modal{ background:#fff; width:min(720px,96%); max-height:88vh; overflow:auto; border-radius:14px; box-shadow:0 20px 60px rgba(2,6,23,.25); }
.tc-modal__head, .tc-modal__foot{ padding:16px 20px; border-bottom:1px solid #eee; }
.tc-modal__foot{ border-top:1px solid #eee; border-bottom:0; display:flex; justify-content:flex-end; gap:10px;}
.tc-modal__body{ padding:16px 20px; }
.tc-cols-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
@media (max-width:900px){ .tc-cols-grid{ grid-template-columns:1fr 1fr; } }
@media (max-width:600px){ .tc-cols-grid{ grid-template-columns:1fr; } }

/* Ẩn cột bằng class (phòng khi dùng hide theo class) */
[data-col].is-hidden{ display:none !important; }
