/* Điểm danh bằng mã QR (app/cong-cu/diem-danh.php). Nạp ở MỌI trang → mọi lớp tiền tố dd-. Chỉ dùng token của app.css. */
[class*="dd-"][hidden] { display: none !important; }
.dd-mt { margin-top: 10px; }
.dd-mt0 { margin: 4px 0 0; }
.dd-an { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dd-an-tep { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.hang-nut label:has(+ .dd-an-tep:focus-visible) { outline: 3px solid color-mix(in srgb, var(--c) 55%, #fff); outline-offset: 2px; }
.dd-so { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .08em; color: var(--c-dam); }

/* Danh sách của tôi */
.dd-luoi { display: grid; gap: 12px; }
@media (min-width: 720px) { .dd-luoi { grid-template-columns: 1fr 1fr; } }
.dd-the { margin: 0; display: flex; flex-direction: column; }
.dd-the__ten { font-size: 1.0625rem; margin: 0 0 6px; }
.dd-the__ten a { color: var(--chu); text-decoration: none; }
.dd-the__ten a:hover { color: var(--c-dam); }
.dd-the__tt { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 6px; }
.dd-the__so { margin: 0 0 10px; flex: 1; }

/* Form danh sách */
.dd-kieu { border: 0; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
@media (min-width: 720px) { .dd-kieu { grid-template-columns: 1fr 1fr; } }
.dd-kieu legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.dd-kieu__o { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--vien); border-radius: var(--r-nho); padding: 12px; cursor: pointer; background: var(--the); }
.dd-kieu__o:has(input:checked) { border-color: var(--c); background: var(--c-nhat); }
.dd-kieu__o input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--c); }
.dd-kieu__o span { display: flex; flex-direction: column; gap: 2px; }
.dd-kieu__o small { color: var(--phu); font-size: .8125rem; }
.dd-chi-co-san .field--check, .dd-chi-tu-khai .field--check { margin-top: 12px; }
.dd-them > summary { cursor: pointer; font-weight: 700; color: var(--c-dam); padding: 4px 0 12px; }
.dd-them { margin-bottom: 12px; border-bottom: 1px solid var(--vien); }
.dd-them form { padding-bottom: 14px; }

/* Bảng */
.dd-cuon { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.dd-bang { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.dd-bang th, .dd-bang td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--vien); vertical-align: middle; }
.dd-bang thead th { font-size: .8125rem; color: var(--phu); font-weight: 700; white-space: nowrap; background: var(--bg); }
.dd-bang__nut { white-space: nowrap; text-align: right !important; }
.dd-bang__nut form + form { margin-left: 4px; }

/* Yêu cầu đổi máy */
.dd-doi { border-color: #f1c2bc; }
.dd-doi h2 { display: flex; align-items: center; gap: 8px; }

/* Trang buổi */
.dd-dk__hang { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0; }
.dd-dk__to { min-height: 52px; font-size: 1.0625rem; padding: 12px 24px; }
.dd-dk__phut { display: inline-flex; align-items: center; gap: 6px; font-size: .9375rem; color: var(--phu); }
.dd-dk__phut input { width: 76px; min-height: 42px; padding: 6px 8px; border: 1px solid #cfd6d1; border-radius: var(--r-nho); font: inherit; text-align: center; }
.dd-dk .bao { margin-bottom: 0; }
.dd-so-lieu { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 10px; margin-bottom: 12px; }
.dd-so-lieu__o { background: var(--the); border: 1px solid var(--vien); border-radius: var(--r); padding: 12px; text-align: center; }
.dd-so-lieu__o b { display: block; font-size: 1.875rem; line-height: 1.1; color: var(--c-dam); font-variant-numeric: tabular-nums; }
.dd-so-lieu__o b small { font-size: 1rem; color: var(--phu); }
.dd-so-lieu__o span { font-size: .8125rem; color: var(--phu); }
.dd-so-lieu__o--cam { background: var(--nhan-nhat); border-color: #f3d49b; }
.dd-so-lieu__o--cam b { color: var(--nhan-dam); }
.dd-so-lieu__o--do { background: var(--do-nhat); border-color: #f1c2bc; }
.dd-so-lieu__o--do b { color: var(--do); }
.dd-si-so { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.dd-si-so label { font-weight: 700; }
.dd-si-so input { width: 96px; min-height: 42px; padding: 6px 10px; border: 1px solid #cfd6d1; border-radius: var(--r-nho); font: inherit; font-size: 1.125rem; text-align: center; }
.dd-si-so__kq { flex: 1 1 100%; font-weight: 600; font-size: .9375rem; }
.dd-khop { color: var(--xanh-la); }
.dd-lech { color: var(--do); }
.dd-nhan-ds { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.dd-ds-gon .ds__muc { padding: 9px 0; align-items: center; }
.dd-tay { display: grid; gap: 10px; }
@media (min-width: 720px) { .dd-tay { grid-template-columns: 1fr 1fr auto; align-items: end; } }
.dd-nk > summary { cursor: pointer; font-weight: 700; color: var(--c-dam); }
.dd-nk[open] > summary { margin-bottom: 8px; }

/* Màn chiếu (chữ rất to, nền navy) */
.dd-chieu { min-height: calc(100vh - 48px); display: grid; grid-template-rows: auto 1fr auto; gap: 16px; }
.dd-chieu__dau { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.dd-chieu__loai { margin: 0; font-size: .875rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--nhan); }
.dd-chieu__ten { margin: 0; font-size: clamp(1.4rem, 2.6vw, 2.4rem); color: #fff; }
.dd-chieu__ten span { font-weight: 400; color: #c9d6ea; }
.dd-chieu__dem { text-align: right; line-height: 1; flex: none; }
.dd-chieu__dem b { font-size: clamp(2.4rem, 5vw, 4.5rem); font-variant-numeric: tabular-nums; color: #fff; }
.dd-chieu__dem small { font-size: clamp(1.2rem, 2.4vw, 2rem); color: #c9d6ea; font-weight: 700; }
.dd-chieu__dem span { display: block; margin-top: 6px; color: #c9d6ea; font-size: 1rem; }
.dd-chieu__than { display: grid; grid-template-columns: auto 1fr; gap: clamp(20px, 4vw, 64px); align-items: center; justify-content: center; }
.dd-chieu__qr { width: min(68vh, 46vw); aspect-ratio: 1; background: #fff; border-radius: 18px; padding: 14px; box-shadow: 0 10px 40px rgba(0,0,0,.35); }
.dd-chieu__qr svg { display: block; width: 100%; height: 100%; }
.dd-chieu__ben { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.dd-chieu__hd { margin: 0; font-size: clamp(1.2rem, 2.2vw, 2rem); font-weight: 700; color: #fff; }
.dd-chieu__nho { margin: 0; color: #c9d6ea; font-size: clamp(.95rem, 1.3vw, 1.2rem); }
.dd-dong-ho { position: relative; width: clamp(110px, 13vw, 180px); aspect-ratio: 1; }
.dd-dong-ho svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dd-dong-ho__nen { fill: none; stroke: rgba(255,255,255,.14); stroke-width: 9; }
.dd-dong-ho__vong { fill: none; stroke: var(--nhan); stroke-width: 9; stroke-linecap: round; }
.dd-dong-ho b { position: absolute; inset: 0; display: grid; place-items: center; font-size: clamp(2.4rem, 5vw, 4.2rem); color: #fff; font-variant-numeric: tabular-nums; }
.dd-chieu__ma4 { margin-top: 10px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.18); max-width: 34rem; }
.dd-chieu__ma4 p { margin: 0 0 8px; color: #dbe6f5; font-size: clamp(.95rem, 1.35vw, 1.25rem); }
.dd-chieu__ma4 b { color: #fff; }
.dd-ma4 { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: clamp(3.4rem, 8vw, 7.5rem); font-weight: 900; letter-spacing: .14em; line-height: 1;
  color: var(--nhan); font-variant-numeric: tabular-nums; }
.dd-chieu__dong { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; text-align: center; }
.dd-chieu__thong-bao { margin: 0; font-size: clamp(2rem, 5vw, 4rem); font-weight: 800; color: #fff; }
.dd-chieu__nut { min-height: 64px; padding: 14px 36px; font-size: 1.375rem; background: var(--nhan); border-color: var(--nhan); color: var(--c-dam); }
.dd-chieu__nut:hover { background: #fff; border-color: #fff; color: var(--c-dam); }
.dd-chieu__chan { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: .9375rem; }
.dd-chieu__chan a { color: #c9d6ea; }
.dd-chieu__mang { color: #ffd2cc; font-weight: 700; }
.dd-chieu__dong-nut { background: transparent; border-color: rgba(255,255,255,.4); }
.dd-chieu__dong-nut:hover { background: rgba(255,255,255,.12); border-color: #fff; }
@media (max-width: 760px) {
  .dd-chieu__than { grid-template-columns: 1fr; justify-items: center; }
  .dd-chieu__qr { width: min(88vw, 60vh); }
}

/* Người tham dự (điện thoại) */
.dd-hs__loai { margin: 4px 0 0; font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--nhan-dam); }
.dd-hs__ten { font-size: 1.5rem; color: var(--c-dam); margin: 0 0 2px; }
.dd-hs__phu { margin: 0 0 14px; }
.dd-kq { display: flex; gap: 14px; align-items: flex-start; border-radius: var(--r); padding: 18px 16px; margin-bottom: 14px; border: 2px solid; }
.dd-kq .bt { flex: none; }
.dd-kq > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dd-kq b { font-size: 1.25rem; line-height: 1.3; overflow-wrap: anywhere; }
.dd-kq span { font-size: 1rem; }
.dd-kq--ok { background: var(--xanh-la-nhat); border-color: var(--xanh-la); color: #14532a; }
.dd-kq--ok .bt { color: var(--xanh-la); }
.dd-kq--ok b { font-size: 1.4rem; }
.dd-kq--loi { background: var(--do-nhat); border-color: var(--do); color: #6f160f; }
.dd-kq--loi .bt { color: var(--do); }
.dd-kq--cho { background: var(--the); border-color: var(--vien); color: var(--chu); }
.dd-kq--cho .bt { color: var(--phu); }
.dd-hs__buoc h2 { font-size: 1.125rem; }
.dd-ma4-form label { display: block; font-weight: 700; margin: 14px 0 6px; }
.dd-ma4-form__hang { display: flex; gap: 8px; }
.dd-ma4-form__hang input { flex: 1; min-width: 0; min-height: 56px; border: 1px solid #cfd6d1; border-radius: var(--r-nho); background: #fff; }
.dd-dem-nguoc { margin: 0 0 12px; padding: 8px 12px; border-radius: var(--r-nho); background: var(--c-nhat); color: var(--c-dam); font-weight: 600; text-align: center; }
.dd-dem-nguoc b { font-variant-numeric: tabular-nums; font-size: 1.125rem; }
.dd-dem-nguoc--het { background: var(--do-nhat); color: var(--do); }
.dd-ban { font-size: 1.375rem; font-weight: 800; margin: 0 0 6px; color: var(--c-dam); }
.dd-ban small { font-size: 1rem; color: var(--phu); font-weight: 600; }
.dd-tim { display: flex; gap: 8px; }
.dd-tim input { flex: 1; min-width: 0; min-height: 50px; padding: 10px 12px; border: 1px solid #cfd6d1; border-radius: var(--r-nho); font: inherit; font-size: 1.0625rem; }
.dd-tim input:focus { border-color: var(--c); outline: 3px solid var(--c-nhat); }
.dd-ket-qua { display: grid; gap: 8px; margin: 10px 0; }
.dd-ten { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--vien); border-radius: var(--r-nho); cursor: pointer; background: #fff; min-height: 56px; }
.dd-ten:has(input:checked) { border-color: var(--c); background: var(--c-nhat); box-shadow: inset 0 0 0 1px var(--c); }
.dd-ten input { width: 22px; height: 22px; flex: none; accent-color: var(--c); margin: 0; }
.dd-ten span { display: flex; flex-direction: column; font-weight: 700; font-size: 1.0625rem; }
.dd-ten small { font-weight: 400; color: var(--phu); font-size: .875rem; }
.dd-gps { border: 1px solid var(--vien); border-radius: var(--r); padding: 14px; margin-bottom: 14px; background: var(--the); }
.dd-gps__tt { margin: 0 0 10px; font-size: .9375rem; }
.dd-gps--ok { border-color: #bfe2c9; background: var(--xanh-la-nhat); }
.dd-gps--ok .dd-gps__tt { color: #184d27; font-weight: 700; }
.dd-gps--loi { border-color: var(--do); background: var(--do-nhat); }
.dd-gps--loi .dd-gps__tt { color: #6f160f; font-weight: 600; }
.dd-nut-to { min-height: 60px !important; font-size: 1.25rem !important; }
.dd-hs__rieng { margin-top: 18px; }

/* Tổng hợp */
.dd-chu-giai { display: inline-flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; margin-left: 4px; }
.dd-o { display: inline-grid; place-items: center; min-width: 28px; height: 28px; border-radius: 7px; font-weight: 800; font-size: .875rem; }
.dd-o--c { background: var(--xanh-la-nhat); color: var(--xanh-la); }
.dd-o--m { background: var(--nhan-nhat); color: var(--nhan-dam); }
.dd-o--v { background: var(--do-nhat); color: var(--do); }
.dd-o--0 { background: transparent; }
.dd-cuon--th { background: var(--the); border: 1px solid var(--vien); border-radius: var(--r); }
.dd-th td, .dd-th th { white-space: nowrap; }
.dd-th .dd-th__ten { position: sticky; left: 0; background: var(--the); z-index: 1; font-weight: 700; }
.dd-th thead .dd-th__ten { background: var(--bg); }
.dd-th__buoi { text-align: center !important; }
.dd-th__buoi a { color: var(--c-dam); text-decoration: none; }
.dd-th__buoi small { display: block; font-weight: 400; }
.dd-th__o { text-align: center !important; }
.dd-thap { color: var(--do); }
