/* Font chu Lao (chi ap dung cho ky tu Lao nho unicode-range; chu Latin va chu so dung font he thong): uu tien Phetsarath OT (chuan cua co quan, cai tren may nguoi dung
   hoac dat file vao public/fonts/PhetsarathOT.ttf), du phong Noto Sans Lao di kem. */
@font-face { font-family: 'Phetsarath OT'; src: local('Phetsarath OT'), url('../fonts/PhetsarathOT.ttf') format('truetype'); font-weight: 400; unicode-range: U+0E80-0EFF, U+200C-200D; }
@font-face { font-family: 'Phetsarath OT'; src: local('Phetsarath OT Bold'), local('Phetsarath OT'), url('../fonts/PhetsarathOT_Bold.ttf') format('truetype'), url('../fonts/PhetsarathOT.ttf') format('truetype'); font-weight: 600 700; unicode-range: U+0E80-0EFF, U+200C-200D; }
@font-face { font-family: 'Noto Sans Lao'; src: url('../fonts/noto-sans-lao-lao-400-normal.woff2') format('woff2'); font-weight: 400; unicode-range: U+0E80-0EFF, U+200C-200D; }
@font-face { font-family: 'Noto Sans Lao'; src: url('../fonts/noto-sans-lao-lao-600-normal.woff2') format('woff2'); font-weight: 600; unicode-range: U+0E80-0EFF, U+200C-200D; }
@font-face { font-family: 'Noto Sans Lao'; src: url('../fonts/noto-sans-lao-lao-700-normal.woff2') format('woff2'); font-weight: 700; unicode-range: U+0E80-0EFF, U+200C-200D; }

:root { --bs-body-font-family: 'Phetsarath OT', 'Noto Sans Lao', 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif; --apdams-primary: #1f4e79; }
body { background: #f4f6f9; }
.navbar-apdams { background: var(--apdams-primary); }
.navbar-apdams .navbar-brand { font-weight: 700; letter-spacing: .5px; }
.page-title { font-size: 1.35rem; font-weight: 600; margin: 0; }
.card { border: 0; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.stat-card .stat-value { font-size: 1.9rem; font-weight: 700; line-height: 1.1; }
.stat-card .stat-icon { font-size: 1.8rem; opacity: .35; }
.table > :not(caption) > * > * { vertical-align: middle; }
.table thead th { background: #eef2f7; font-weight: 600; white-space: nowrap; }
.code-cell { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; white-space: nowrap; }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1f4e79 0%, #2e75b6 100%); }
.login-card { width: 100%; max-width: 420px; }
.required::after { content: ' *'; color: #dc3545; }
.author-row { padding: 2px 4px; border-radius: 4px; }
.author-row:hover { background: #eef2f7; }
.nav-tabs .nav-link { color: #495057; }
.dropzone { border: 2px dashed #9fb3c8; border-radius: 8px; padding: 18px; text-align: center; color: #5b6b7c; background: #fafcff; cursor: pointer; }
.dropzone.dragover { background: #e7f1ff; border-color: #0d6efd; }
.file-preview { width: 100%; height: 75vh; border: 1px solid #dee2e6; border-radius: 6px; background: #fff; }
.digitize-none { background: #e9ecef; color: #495057; }
dl.meta dt { font-weight: 600; color: #5b6b7c; font-size: .85rem; }
dl.meta dd { margin-bottom: .6rem; }
mark { background: #fff3a3; padding: 0 1px; }
.report-table th { background: #eef2f7; }
@media print {
    @page { size: A4 landscape; margin: 12mm; }
    body { background: #fff; font-size: 11pt; }
    nav.navbar, .alert { display: none !important; }
    main { padding: 0 !important; }
    .card { box-shadow: none !important; }
    .report-sheet .card-body { padding: 0; }
    .report-table th { background: #eef2f7 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .table-responsive { overflow: visible !important; }
}

.navbar-logo { height: 34px; width: auto; background: #fff; border-radius: 50%; padding: 2px; }
.tree-toggle { width: 22px; display: inline-block; }
.tree-btn { --bs-btn-padding-y: .1rem; --bs-btn-padding-x: .4rem; --bs-btn-font-size: .8rem; }
.author-row { padding: 3px 6px; border-bottom: 1px solid #f1f3f5; }
.author-hit > .author-row { background: #fff3cd; }
.camera-box { border: 2px dashed #9ad1b0; border-radius: 8px; padding: 12px; background: #f6fcf8; }
.cam-pages { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.cam-page { position: relative; width: 110px; text-align: center; }
.cam-page img { width: 110px; height: 150px; object-fit: cover; border: 1px solid #ced4da; border-radius: 4px; background: #fff; }
.cam-del { position: absolute; top: 2px; right: 2px; --bs-btn-padding-y: 0; --bs-btn-padding-x: .3rem; }
