@media print {
  html, body {
    width: 210mm;
    height: 297mm;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    color: #222 !important;
    font-size: 11pt !important;
    line-height: 1.3 !important;
    box-sizing: border-box;
  }
  body {
    padding-bottom: 70px !important;
  }
  form {
    width: 180mm;
    margin: 0 auto !important;
    padding: 10mm 8mm 65px 8mm !important; /* Chừa chỗ cho ghi chú ở chân */
    background: #fff !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    min-height: unset !important;
    max-height: 260mm; /* Để footer không tràn */
    page-break-after: avoid !important;
  }
  /* Ẩn nút bấm và input không cần thiết khi in */
  button, input[type="submit"], input[type="button"] {
    display: none !important;
  }
  /* Thu nhỏ các khoảng cách */
  h3, p, div, label, table, input, ul, ol, li {
    margin-top: 2px !important;
    margin-bottom: 2px !important;
    padding: 0 !important;
  }
  /* Table và input cho gọn */
  table {
    margin-bottom: 4px !important;
  }
  input, select {
    height: 18px !important;
    font-size: 10pt !important;
  }
  .row-flex {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.input-normal {
  flex: 1 1 220px;
  max-width: 100%;
  min-width: 120px;
  box-sizing: border-box;
}
  /* Giới hạn phần form hiển thị */
  body > *:not(form):not(.ghi-chu-footer) {
    display: none !important;
  }
  /* Ghi chú sát chân trang */
  .ghi-chu-footer {
    position: fixed;
    left: 10mm;
    bottom: 10mm;
    width: 210mm;
    font-size: 0.9em;
    color: #555;
    background: #fff;
    border-top: 1px dashed #aaa;
    padding: 8px 30px 12px 30px;
    box-sizing: border-box;
    page-break-inside: avoid;
    break-inside: avoid;
    z-index: 10;
  }
}
@page {
  size: A4 portrait;
  margin: 0;
}

@media print {
    html, body {
        width: 210mm;
        height: 297mm;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
        color: #222 !important;
        font-size: 11pt !important;
        line-height: 1.3 !important;
    }
    form {
        box-shadow: none !important;
        border-radius: 0 !important;
        padding: 8mm 10mm 6mm 10mm !important;
        background: #fff !important;
        margin: 0 !important;
    }
    /* Ẩn nút bấm và input không cần thiết khi in */
    button, input[type="submit"], input[type="button"] {
        display: none !important;
    }
    /* Thu nhỏ các khoảng cách */
    h3, p, div, label, table, input, ul, ol, li {
        margin-top: 2px !important;
        margin-bottom: 2px !important;
        padding: 0 !important;
    }
    /* Table và input cho gọn */
    table {
        margin-bottom: 4px !important;
    }
    input[type="text"],
input[type="number"],
input[type="date"],
input[type="email"],
input[type="password"],
textarea,
select {
    border: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    background: #fff !important;
    /* Giữ lại radio/checkbox */
}

    /* Giới hạn phần form hiển thị */
    body > *:not(form) {
        display: none !important;
    }
    /* Ngắt trang cuối form, tránh giữa form */
    form {
        page-break-after: avoid !important;
    }
}
@media print {
  input[type="text"],
  input[type="number"],
  input[type="date"],
  input[type="email"],
  input[type="password"],
  textarea,
  select {
      border: none !important;
      border-bottom: none !important;
      box-shadow: none !important;
      background: #fff !important;
  }
}

.square-radio {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  margin-right: 18px;
  font-size: 1em;
  user-select: none;
}

.square-radio input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin: 0 8px 0 0;
  border: 1px solid #222;
  border-radius: 0;
  background: #fff;
  position: relative;
  cursor: pointer;
  outline: none;
  vertical-align: middle;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

/* Viền dày hơn khi chọn */
.square-radio input[type="radio"]:checked {
  border: 2px solid #222;
  background: #fff;
}

/* Dấu X nằm chính giữa ô vuông */
.square-radio input[type="radio"]:checked::before, 
.square-radio input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  left: 0.6px;   /* Căn sát lề trái một chút */
  top: 4px;    /* Giữa ô chiều dọc */
  width: 10px;
  height: 0.5px;  /* Nét mảnh hơn */
  background: #555; /* Nét vừa, không đậm */
  border-radius: 0.5px;
  pointer-events: none;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

.square-radio input[type="radio"]:checked::before {
  transform: rotate(45deg);
}

.square-radio input[type="radio"]:checked::after {
  transform: rotate(-45deg);
}


.input-groups {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 28px 0 32px 0;
    gap: 8px;
}

.person-search-title {
    font-size: 1.05em;
    color: #283B5E;
    font-weight: 500;
    margin-bottom: 6px;
}

.input-group {
    width: 320px;
    display: flex;
    justify-content: center;
}

.input-text {
    width: 100%;
    padding: 8px 14px;
    font-size: 1em;
    border: 1px solid #bbb;
    border-radius: 7px;
    background: #fafbfc;
    transition: border 0.2s;
}

.input-text:focus {
    border-color: #283B5E;
    outline: none;
    background: #fff;
}

.btn-groups {
    display: flex;
    justify-content: center;
    margin-top: 8px;
}

.btn.btn-primary {
    background: #283B5E;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 22px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 6px #283b5e22;
    transition: background 0.2s;
}
.btn.btn-primary:hover {
    background: #4160b0;
}
.input-bold {
    font-weight: bold;
}
.input-normal {
	  flex: 1 1 220px;
	max-width: 100%;
	min-width: 120px;
	box-sizing: border-box;
    width: 100%;
    min-width: 80px;
    max-width: 100%;
    box-sizing: border-box;
    border-radius: 4px;
    border: 1px solid #ccc;
    padding: 2px 8px;
    font-size: 1em;
    font-family: inherit; /* Giống font ngoài */
    font-weight: normal;
    line-height: 1.4;
    transition: border 0.2s;
    /* Đảm bảo không bị overflow */
    overflow: hidden;
    text-overflow: ellipsis;
    background: #fff;
    display: inline-block;
    vertical-align: middle;
}
.input-normal:focus {
    border-color: #283b5e;
    outline: none;
}
.row-flex {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.btn-menu {
    display: flex;
    gap: 12px; /* Khoảng cách giữa các nút */
    align-items: center;
}
