.badge-design-layout { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(280px,.9fr); gap: 1rem; align-items: start; }
.badge-card { --badge-accent:#75541c; --badge-rule:#d4ad56; position:relative; isolation:isolate; overflow:hidden; width: min(100%,340px); aspect-ratio:9/13; border:1px solid #d1c8b7; border-top:9px solid var(--badge-rule); border-bottom:6px solid var(--badge-rule); border-radius:8px; background:#fff; color:#24211e; box-shadow:0 10px 28px #29251f15; margin:1rem auto; }
.badge-theme-red { --badge-accent:#842b35; --badge-rule:#d07476; }
.badge-theme-graphite { --badge-accent:#292929; --badge-rule:#888; }
.badge-background { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:-1; }
.badge-front-content { height:100%; padding:16px 12px; display:grid; grid-template-rows:19% 22% 23% 36%; text-align:center; }
.badge-top { font-size:12px; overflow-wrap:anywhere; line-height:1.25; }
.badge-top p { margin:5px 0; }
.badge-logos { display:flex; justify-content:space-around; align-items:center; gap:10px; height:43px; }
.badge-logos img { max-width:42%; max-height:43px; object-fit:contain; }
.badge-event { grid-row:2; margin:0; align-self:center; color:var(--badge-accent); font:700 17px/1.2 Georgia,serif; overflow-wrap:anywhere; background:#fffffff0; border-radius:5px; padding:6px; }
.badge-identity { grid-row:3; display:flex; flex-direction:column; justify-content:center; gap:7px; padding:8px 5px; background:#fffffff2; border-radius:5px; }
.badge-identity strong { font-size:clamp(16px,2vw,22px); line-height:1.15; overflow-wrap:anywhere; }
.badge-identity span { color:var(--badge-accent); text-transform:uppercase; font-weight:750; font-size:12px; letter-spacing:.04em; }
.badge-credential { grid-row:4; display:flex; flex-direction:column; align-items:center; justify-content:end; gap:1px; background:#fffffff2; border-radius:5px; width:155px; max-width:100%; justify-self:center; padding:0 5px 3px; }
.badge-credential img { width:auto; max-width:100%; height:min(116px,80%); object-fit:contain; }
.badge-credential strong { font-size:12px; letter-spacing:.07em; }
.badge-document { display:flex; justify-content:center; flex-wrap:wrap; gap:2rem; align-items:start; }
.badge-document > div { width:340px; max-width:100%; }
.badge-back { width:340px; max-width:100%; min-height:470px; border:1px solid #d1c8b7; padding:18px; background:#fff; }
.badge-back h2 { color:#75541c; text-align:center; font-size:1.1rem; }
.badge-back h3 { font-size:.9rem; text-align:center; }
.badge-back table { border-collapse:collapse; width:100%; font-size:.62rem; }
.badge-back td { border-bottom:1px solid #ddd; padding:5px 3px; vertical-align:top; overflow-wrap:anywhere; }
.badge-back td:first-child { width:27%; }
.badge-back td small { display:block; }
.badge-back > p { font-size:.7rem; }
[data-attendance-reader] form { display:flex; gap:12px; align-items:end; flex-wrap:wrap; margin-bottom:1rem; }
[data-attendance-reader] form label { flex:1; min-width:210px; display:grid; gap:5px; }
[data-camera-video] { display:block; width:min(100%,580px); max-height:55vh; margin:1rem auto; border-radius:10px; background:#222; }
[data-camera-video][hidden] { display:none; }
[data-scan-result] { white-space:pre-line; font-size:1.2rem; font-weight:700; padding:12px; border-radius:8px; }
[data-scan-result].is-ok { color:#165d43; background:#e7f7ef; }
[data-scan-result].is-error { color:#942932; background:#fff0f0; }
.activity-attendance-table { min-width:850px; }
.activity-attendance-table form { display:grid; gap:5px; }
.activity-attendance-table input { min-width:150px; }
@media(max-width:760px) { .badge-design-layout { grid-template-columns:1fr; } }

.badge-name-long strong { font-size:13px; }
.badge-top p { font-size:10px; }
