:root {
  --font-thai: 'Noto Sans Thai', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

html, body {
  font-family: var(--font-thai);
}

/* Sidebar & brand tweak */
.brand-link { font-weight: 600; }

/* Page switching helper */
.page-view.d-none { display: none !important; }

/* Dashboard label chips */
#labelPreview .label-chip {
  display: inline-flex;
  align-items: center;
  border: 1px dashed #ddd;
  border-radius: .5rem;
  padding: .25rem .5rem;
  margin: .25rem .5rem .25rem 0;
  font-size: .85rem;
}

/* Labels grid for “พิมพ์ป้ายทรัพย์สิน” */
.labels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.asset-label {
  border: 1px solid #000;
  padding: 8px;
  border-radius: 6px;
  background: #fff;
  page-break-inside: avoid;
}
.asset-label .title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 6px;
}
.asset-label .meta {
  font-size: .8rem;
  line-height: 1.2;
}

/* Table tweaks */
.table td, .table th { vertical-align: middle; }

/* Print styles for labels page
@media print {
  body { background: #fff; }
  .main-header, .main-sidebar, .main-footer { display: none !important; }
  .content-wrapper, .content, .container-fluid { margin: 0; padding: 0; }
  .card { border: none; box-shadow: none; }
  .labels-grid { grid-template-columns: repeat(3, 1fr); }
} */

/* Small utilities */
.text-ellipsis {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* thumbnails ในตาราง/โมดอล */
.thumb-img {
  width: 44px; height: 44px; object-fit: cover; border-radius: 6px; border: 1px solid #eee;
}
.thumb-preview {
  width: 160px; height: 120px; object-fit: cover; border: 1px solid #ddd; border-radius: 6px;
}















@page { size: A4; margin: 10mm; }

#labelsPrint { display: none; }

.label {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 60mm;     /* กรอบกว้างขึ้น */
  height: 70mm;    /* กรอบสูงขึ้น */
  border: 1px solid #000;
  box-sizing: border-box;
  margin: 4mm;     /* ระยะห่างแต่ละป้าย */
  text-align: center;
  vertical-align: top;
  padding-top: 5mm; 
}

.qr-box {
  width: 40mm;
  height: 40mm;
  margin-top: 6mm;   /* ดัน QR ลงมานิด */
  display: flex;
  align-items: center;
  justify-content: center;
}

.id-text {
  margin-top: auto;   /* ดันลงไปชิดล่าง */
  margin-bottom: 3mm; /* เว้นจากขอบล่าง */
  font-size: 11pt;
  font-weight: bold;
  text-align: center;
  word-break: break-all;
}

/* print mode */
@media print {
  body * { visibility: hidden !important; }
  #labelsPrint, #labelsPrint * { visibility: visible !important; }
  #labelsPrint { position: absolute; inset: 0; display: block; }
}

