/* ---------- Khai báo tạm trú ---------- */
.kbtt-topbar, .kbtt-card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.kbtt-topbar { margin-bottom: 14px; }
.kbtt-topbar .spacer, .kbtt-card-head .spacer { flex: 1; }
.kbtt-total { font-size: 16px; font-weight: 700; }
.kbtt-total b { color: #3b8c10; }
.kbtt-pager { display: flex; gap: 6px; }
.kbtt-page { min-width: 32px; height: 32px; border: 1px solid #dfe2ea; background: #fff; border-radius: 6px; cursor: pointer; color: #555; }
.kbtt-page.active { background: #3b8c10; border-color: #3b8c10; color: #fff; font-weight: 700; }
.kbtt-page:disabled { opacity: .4; cursor: default; }
.kbtt-btn-green { background: #4d9a1f; border-color: #4d9a1f; color: #fff; font-weight: 600; }
.kbtt-btn-green:hover { background: #3b8c10; border-color: #3b8c10; color: #fff; }
.kbtt-btn-blue { background: #1677d2; border-color: #1677d2; color: #fff; font-weight: 600; }
.kbtt-btn-blue:hover { background: #0f63b3; border-color: #0f63b3; color: #fff; }
.kbtt-btn-dark { background: #54585f; border-color: #54585f; color: #fff; font-weight: 600; }
.kbtt-btn-dark:hover { background: #3e4146; border-color: #3e4146; color: #fff; }
.kbtt-card { background: #fff; border-radius: 10px; padding: 16px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(20, 30, 60, .06); }
.kbtt-card-head h3 { margin: 0; font-size: 16px; }
.kbtt-card-head input[type="text"] { min-width: 210px; }
.kbtt-body { display: grid; grid-template-columns: minmax(260px, 1fr) 2fr; gap: 16px; margin-top: 14px; }
.kbtt-left { background: #f6f7fa; border-radius: 8px; padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 12px; align-self: start; }
.kbtt-note { width: 100%; background: #fff3c4; border: 1px solid #f0b429; border-radius: 6px; padding: 8px 10px; font-size: 13.5px; }
.kbtt-image { width: 100%; max-width: 330px; }
.kbtt-image img, .kbtt-image svg { width: 100%; display: block; border-radius: 6px; }
.kbtt-image img { max-height: 260px; object-fit: contain; background: #e9ecf2; }
.kbtt-scan-btns { display: flex; gap: 8px; width: 100%; max-width: 370px; }
.kbtt-scan-btns .btn { flex: 1; justify-content: center; text-align: center; padding: 9px 12px; }
.kbtt-scan-btn:disabled, label.kbtt-scan-btn[disabled] { opacity: .6; pointer-events: none; }
.kbtt-scan-status { width: 100%; font-size: 13px; }
.kbtt-scan-status:empty { display: none; }
.kbtt-scan-status.ok { color: #2f7a0c; }
.kbtt-scan-status.warn { color: #b45309; }
.kbtt-mrz { margin-top: 6px; font: 11px/1.5 Consolas, "Courier New", monospace; background: #fff; border: 1px solid #e3e5eb; border-radius: 6px; padding: 5px 7px; overflow-x: auto; white-space: nowrap; color: #334155; }
.kbtt-tip { font-size: 11.5px; width: 100%; }
.kbtt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 16px; }
.kbtt-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.kbtt-field > label { font-size: 13.5px; font-weight: 600; }
.kbtt-field small { font-weight: 400; font-size: 11.5px; }
.kbtt-field input, .kbtt-field select { width: 100%; }
.kbtt-field-btn .btn { justify-content: center; padding: 9px 12px; }
.kbtt-label-row { display: flex; justify-content: space-between; gap: 6px; flex-wrap: wrap; }
.kbtt-radios { display: inline-flex; gap: 12px; font-weight: 400; font-size: 11.5px; }
.kbtt-radios label { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.kbtt-radios-lg { font-size: 14px; margin: 6px 0 10px; }
.req { color: #e0282e; }
.kbtt-info { display: inline-flex; width: 15px; height: 15px; border-radius: 50%; background: #f5a524; color: #fff; font-size: 10px; font-weight: 700; align-items: center; justify-content: center; cursor: help; }
.kbtt-hr { border: 0; border-top: 1px solid #e3e5eb; margin: 18px 0 12px; }
.kbtt-sub { font-weight: 700; font-size: 15px; }
.kbtt-child { display: grid; grid-template-columns: 2fr 1fr 110px auto; gap: 8px; margin-bottom: 8px; }
.kbtt-commit { display: flex; align-items: center; gap: 8px; background: #eff7e6; border-radius: 8px; padding: 12px 14px; margin-top: 16px; font-weight: 600; font-size: 13.5px; cursor: pointer; }
.kbtt-commit input { accent-color: #3b8c10; width: 16px; height: 16px; }
.kbtt-camera-modal { max-width: 760px; }
.kbtt-camera-wrap { position: relative; background: #000; border-radius: 8px; overflow: hidden; }
.kbtt-camera-wrap video { width: 100%; display: block; }
.kbtt-camera-guide { position: absolute; inset: 8% 6%; border: 2px dashed rgba(255, 255, 255, .85); border-radius: 10px; display: flex; align-items: flex-end; }
.kbtt-camera-guide span { width: 100%; height: 26%; border-top: 2px solid #f0b429; background: rgba(240, 180, 41, .15); color: #fff; font-size: 12.5px; display: flex; align-items: center; justify-content: center; text-align: center; }
@media (max-width: 1000px) {
  .kbtt-body { grid-template-columns: 1fr; }
  .kbtt-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .kbtt-grid { grid-template-columns: 1fr; }
  .kbtt-child { grid-template-columns: 1fr 1fr; }
}
.kbtt-thumb { border: 1px solid #dfe2ea; background: #f3f5f8; border-radius: 4px; padding: 0; width: 64px; height: 44px; cursor: zoom-in; overflow: hidden; display: block; }
.kbtt-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kbtt-tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.kbtt-tag.new { background: #fff3c4; color: #92400e; }
.kbtt-tag.done { background: #e7f5dc; color: #2f7a0c; }
.kbtt-only-new { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; cursor: pointer; }
.kbtt-image-modal { max-width: 900px; }
.kbtt-image-modal img { width: 100%; max-height: 70vh; object-fit: contain; background: #0f172a; border-radius: 8px; display: block; }
.kbtt-drive-files { margin: 6px 0 10px; padding-left: 18px; font-size: 13px; word-break: break-all; }
.kbtt-sync { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; background: #fff; border: 1px solid #dfe2ea; border-left: 4px solid #94a3b8; border-radius: 8px; padding: 8px 12px; margin-bottom: 14px; font-size: 13px; }
.kbtt-sync.ok { border-left-color: #3b8c10; }
.kbtt-sync.busy { border-left-color: #1677d2; }
.kbtt-sync.warn { border-left-color: #f59e0b; background: #fffbeb; }
.kbtt-sync.error { border-left-color: #dc2626; background: #fef2f2; }
.kbtt-sync-icon { font-size: 16px; }
.kbtt-sync.busy .kbtt-sync-icon { display: inline-block; animation: kbtt-spin 1s linear infinite; }
.kbtt-sync-text { flex: 1; min-width: 200px; }
.kbtt-sync-actions { display: flex; flex-wrap: wrap; gap: 6px; }
@keyframes kbtt-spin { to { transform: rotate(360deg); } }
.kbtt-howto { margin: 12px 0; font-size: 13px; }
.kbtt-howto summary { cursor: pointer; font-weight: 600; color: #1677d2; }
.kbtt-howto ol { padding-left: 18px; margin: 8px 0 0; }
.kbtt-howto li { margin-bottom: 4px; }
.kbtt-howto code { background: #f1f5f9; padding: 1px 5px; border-radius: 4px; word-break: break-all; }
.kbtt-login-btn { display: flex; justify-content: center; min-height: 44px; margin-top: 8px; }
