/* ============================================================
   VISITOR REGISTRATION — "Earth Green" theme
   Palette: forest #1B4332, moss #40704A, sand #F1EBDD,
            clay #B5794A, ink #22301F
   ============================================================ */

/* Fonts are self-hosted via the system stack below (no external CDN call).
   This keeps every page's Content-Security-Policy free of third-party
   font-src/style-src exceptions and avoids leaking visitor IPs to Google
   Fonts on every page load. */

:root{
  --forest: #1B4332;
  --forest-deep: #12291F;
  --moss: #40704A;
  --moss-light: #6B9071;
  --sand: #F1EBDD;
  --sand-light: #FAF7F0;
  --clay: #B5794A;
  --clay-dark: #96602F;
  --ink: #22301F;
  --line: #D9D0BC;
  --white: #FFFFFF;
  --danger: #B3452B;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(27, 67, 50, 0.12);
  --font-display: Georgia, 'Iowan Old Style', 'Palatino Linotype', 'URW Palladio L', P052, serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

*{ box-sizing: border-box; }

html,body{
  margin:0; padding:0;
  background: var(--sand);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body{
  min-height:100vh;
  background-image:
    radial-gradient(circle at 10% 0%, rgba(64,112,74,0.10), transparent 40%),
    radial-gradient(circle at 90% 100%, rgba(181,121,74,0.10), transparent 40%);
}

a{ color: var(--moss); }

h1,h2,h3{
  font-family: var(--font-display);
  color: var(--forest-deep);
  margin: 0 0 8px 0;
  letter-spacing: -0.01em;
}

.wrap{
  max-width: 560px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

.wrap.wide{ max-width: 1320px; }

/* ---------- Top bar / brand ---------- */
.brand{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom: 22px;
}
.brand .leaf{
  width:40px;height:40px;
  background: var(--forest);
  border-radius: 10px;
  display:flex;align-items:center;justify-content:center;
  color:var(--sand-light);
  flex-shrink:0;
}
.brand .logo{
  height:42px;
  width:auto;
  flex-shrink:0;
  object-fit:contain;
}
.topbar .brand .logo{
  height:34px;
  background: var(--sand-light);
  padding:4px 8px;
  border-radius:8px;
}
.brand .name{
  font-family: var(--font-display);
  font-weight:600;
  font-size: 1.15rem;
  color: var(--forest-deep);
}
.brand .tag{
  font-size: 0.78rem;
  color: var(--moss);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ---------- Card ---------- */
.card{
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.eyebrow{
  font-size: 0.72rem;
  font-weight:700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--clay-dark);
  margin-bottom: 6px;
  display:block;
}

.subtitle{
  color:#5B6B54;
  font-size: 0.95rem;
  margin-bottom: 24px;
}

/* ---------- Form ---------- */
label{
  display:block;
  font-weight:600;
  font-size: 0.85rem;
  color: var(--forest-deep);
  margin: 16px 0 6px;
}
label:first-of-type{ margin-top:0; }

input[type=text],
input[type=tel],
input[type=email],
input[type=number],
input[type=password],
input[type=date],
input[type=time],
textarea,
select{
  width:100%;
  padding: 13px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--sand-light);
  color: var(--ink);
  transition: border-color .15s, background .15s;
}
textarea{ resize: vertical; }
input:focus, select:focus, textarea:focus{
  outline:none;
  border-color: var(--moss);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(64,112,74,0.15);
}

select{ appearance:none; -webkit-appearance:none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%2340704A' stroke-width='2' fill='none' fill-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.hint{ font-size:0.78rem; color:#7C8A73; margin-top:4px; }
.time-box{
  display:inline-block; font-size:0.78rem; font-weight:700; color:var(--moss);
  background:#EFF3EA; border:1px solid var(--line); border-radius:8px; padding:4px 8px;
}

.form-row{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:16px;
}
.form-row > div{ min-width:0; }
.form-row input{ width:100%; box-sizing:border-box; }
.form-row label{ margin-top:16px; }
@media (max-width: 560px){
  .form-row{ grid-template-columns: 1fr; }
}

code{
  background: var(--sand);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85em;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  width:100%;
  padding: 14px 20px;
  margin-top: 26px;
  border:none;
  border-radius: 10px;
  background: var(--forest);
  color: var(--sand-light);
  font-family: var(--font-body);
  font-weight:700;
  font-size: 1rem;
  cursor:pointer;
  transition: background .15s, transform .1s;
}
.btn:hover{ background: var(--forest-deep); }
.btn:active{ transform: scale(0.99); }
.btn.secondary{
  background: transparent;
  color: var(--forest);
  border: 1.5px solid var(--forest);
}
.btn.secondary:hover{ background: rgba(27,67,50,0.06); }
.btn.clay{ background: var(--clay); }
.btn.clay:hover{ background: var(--clay-dark); }
.btn.danger{ background: var(--danger); }
.btn.small{ width:auto; padding:9px 16px; margin-top:0; font-size:0.85rem; }

.error-box{
  background: #FBEAE3;
  border: 1px solid #E9B7A3;
  color: var(--danger);
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.88rem;
  margin-bottom: 18px;
}

.success-box{
  background: #E8F0E4;
  border: 1px solid #B7CFAE;
  color: var(--forest-deep);
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.88rem;
  margin-bottom: 18px;
}

/* ---------- Confirmation / thank you ---------- */
.confirm{
  text-align:center;
  padding: 20px 0 6px;
}
.confirm .stamp{
  width:76px;height:76px;
  border-radius:50%;
  background: var(--moss);
  color:var(--white);
  display:flex;align-items:center;justify-content:center;
  margin: 0 auto 18px;
}
.confirm h2{ margin-bottom: 6px; }
.confirm p{ color:#5B6B54; }
.confirm .meta{
  text-align:left;
  background: var(--sand-light);
  border:1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
  margin-top: 22px;
}
.confirm .meta div{ display:flex; justify-content:space-between; padding:6px 0; font-size:0.92rem; border-bottom:1px dashed var(--line); }
.confirm .meta div:last-child{ border-bottom:none; }
.confirm .meta span:first-child{ color:#7C8A73; }
.confirm .meta span:last-child{ font-weight:700; color:var(--forest-deep); }

/* ---------- QR page ---------- */
.qr-card{ text-align:center; }
.qr-card img{
  width: 260px; height:260px;
  padding: 16px;
  background: var(--white);
  border: 2px solid var(--forest);
  border-radius: var(--radius);
}
.qr-card .url{
  margin-top:14px;
  font-size: 0.82rem;
  color: var(--moss);
  word-break: break-all;
}

/* ---------- Admin dashboard ---------- */
.topbar{
  display:flex; align-items:center; justify-content:space-between;
  padding: 16px 28px;
  background: var(--forest);
  color: var(--sand-light);
  flex-wrap:wrap;
  gap:10px;
}
.topbar .brand .name, .topbar .brand .tag{ color: var(--sand-light); }
.topbar .brand .leaf{ background: rgba(255,255,255,0.15); }
.topbar nav a{
  color: var(--sand-light);
  text-decoration:none;
  font-size:0.88rem;
  font-weight:600;
  opacity:0.85;
  margin-left: 18px;
}
.topbar nav a:hover{ opacity:1; text-decoration:underline; }

.topbar nav{ display:flex; align-items:center; flex-wrap:wrap; }

.nav-dropdown{
  position:relative;
  margin-left: 18px;
  display:inline-flex;
  align-items:center;
}
.nav-dropdown summary{
  cursor:pointer;
  list-style:none;
  user-select:none;
  display:flex;
  align-items:center;
  justify-content:center;
  height: 32px;
  width: 32px;
  border-radius: 8px;
  opacity:0.85;
  transition: opacity .15s, background .15s;
}
.nav-dropdown summary::-webkit-details-marker{ display:none; }
.nav-dropdown summary::marker{ content:''; }
.nav-dropdown summary:hover{ opacity:1; background: rgba(255,255,255,0.12); }
.nav-dropdown[open] summary{ opacity:1; background: rgba(255,255,255,0.18); }

.hamburger-lines{
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:4px;
  width:20px;
}
.hamburger-lines span{
  display:block;
  height:2px;
  width:100%;
  background: var(--sand-light);
  border-radius:2px;
}

.nav-dropdown-menu{
  position:absolute;
  top:100%;
  right:0;
  margin-top:10px;
  background: var(--white);
  border:1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width:190px;
  padding:6px;
  z-index:30;
}
.nav-dropdown-menu a{
  display:block;
  color: var(--forest-deep) !important;
  opacity:1 !important;
  font-size:0.88rem;
  font-weight:600;
  margin-left:0 !important;
  padding:9px 12px;
  border-radius:8px;
  text-decoration:none !important;
}
.nav-dropdown-menu a:hover{ background: var(--sand-light); }

.stats-row{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(160px,1fr));
  gap:16px;
  margin: 24px 0;
}
.stat{
  background:var(--white);
  border:1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.stat .num{ font-family: var(--font-display); font-size:2rem; color:var(--forest-deep); font-weight:600; }
.stat .lbl{ font-size:0.8rem; color:#7C8A73; text-transform:uppercase; letter-spacing:0.06em; }

.summary-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
  gap:24px;
}
.summary-chart{
  text-align:center;
}
.summary-chart canvas{
  max-height:200px;
  margin:0 auto;
}
.summary-chart-title{
  font-family: var(--font-display);
  color: var(--forest-deep);
  font-weight:600;
  margin-top:12px;
}
.summary-legend{
  display:flex;
  justify-content:center;
  gap:16px;
  flex-wrap:wrap;
  margin-top:6px;
  font-size:0.85rem;
  color: var(--ink);
}
.summary-legend .dot{
  display:inline-block;
  width:10px; height:10px;
  border-radius:50%;
  margin-right:6px;
}
.summary-legend .dot-1{ background: var(--forest); }
.summary-legend .dot-2{ background: var(--clay); }

.toolbar{
  display:flex; gap:10px; align-items:center; flex-wrap:wrap;
  margin-bottom: 16px;
}
.toolbar input[type=text]{ max-width: 260px; }

table{
  width:100%;
  border-collapse: collapse;
  background: var(--white);
}
thead th{
  background: var(--moss);
  color: var(--white);
  text-align:left;
  font-size:0.76rem;
  text-transform:uppercase;
  letter-spacing:0.05em;
  padding: 12px 14px;
}
tbody td{
  padding: 12px 14px;
  border-bottom:1px solid var(--line);
  font-size:0.88rem;
}
tbody tr:hover{ background: var(--sand-light); }
tbody tr:last-child td{ border-bottom:none; }

.badge{
  display:inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size:0.72rem;
  font-weight:700;
}
.badge.in{ background:#E8F0E4; color:var(--forest); }
.badge.out{ background:#EFE9DC; color:var(--clay-dark); }
.badge.expected{ background:#F3E9D2; color:var(--clay-dark); }

.duration-badge.duration-green{ background:#E8F0E4; color:var(--forest); }
.duration-badge.duration-red{ background:#FBEAE3; color:var(--danger); }

.table-scroll{
  overflow-x:auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Denser table used on the gate pass page — more columns, less room to
   spare, so we trim padding/font-size, wrap long content instead of
   forcing it onto one line, and give each column a fixed share of the
   table's width so nothing can push the table wider than the page. */
.table-compact{ table-layout: fixed; }
.table-compact th, .table-compact td{ word-wrap:break-word; overflow-wrap:break-word; min-width:0; }
.table-compact thead th{ padding: 10px 10px; font-size:0.7rem; }
.table-compact tbody td{ padding: 10px 10px; font-size:0.82rem; }
.table-compact .hint{ font-size:0.72rem; }
.table-compact .badge{ padding:2px 8px; font-size:0.68rem; }
.table-compact .actions-cell{ flex-direction:row; flex-wrap:wrap; align-items:stretch; gap:5px; min-width:0; }
.table-compact td .btn{ width:auto; text-align:center; box-sizing:border-box; min-width:0; }
.table-compact td .btn.small{ padding:6px 4px; font-size:0.68rem; white-space:normal; line-height:1.2; }
.table-compact .actions-cell .btn{ flex:1 1 0; min-width:0; padding:6px 2px; }

#gatepassTable th:nth-child(1),  #gatepassTable td:nth-child(1) { width:15%; }
#gatepassTable th:nth-child(2),  #gatepassTable td:nth-child(2) { width:8%; }
#gatepassTable th:nth-child(3),  #gatepassTable td:nth-child(3) { width:9%; }
#gatepassTable th:nth-child(4),  #gatepassTable td:nth-child(4) { width:9%; }
#gatepassTable th:nth-child(5),  #gatepassTable td:nth-child(5) { width:10%; }
#gatepassTable th:nth-child(6),  #gatepassTable td:nth-child(6) { width:9%; }
#gatepassTable th:nth-child(7),  #gatepassTable td:nth-child(7) { width:13%; }
#gatepassTable th:nth-child(8),  #gatepassTable td:nth-child(8) { width:7%; }
#gatepassTable th:nth-child(9),  #gatepassTable td:nth-child(9) { width:9%; }
#gatepassTable th:nth-child(10), #gatepassTable td:nth-child(10){ width:11%; }

#gatepassSummaryTable th:nth-child(1), #gatepassSummaryTable td:nth-child(1){ width:18%; }
#gatepassSummaryTable th:nth-child(2), #gatepassSummaryTable td:nth-child(2){ width:15%; }
#gatepassSummaryTable th:nth-child(3), #gatepassSummaryTable td:nth-child(3){ width:20%; }
#gatepassSummaryTable th:nth-child(4), #gatepassSummaryTable td:nth-child(4){ width:20%; }
#gatepassSummaryTable th:nth-child(5), #gatepassSummaryTable td:nth-child(5){ width:12%; }
#gatepassSummaryTable th:nth-child(6), #gatepassSummaryTable td:nth-child(6){ width:15%; }

.pagination-row{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:16px;
  margin: 18px 0 8px;
}
.pagination-info{
  font-size:0.85rem;
  color:#7C8A73;
  font-weight:600;
}
.pagination-row button:disabled{
  opacity:0.45;
  cursor:not-allowed;
}

.actions-cell{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.actions-cell form{ margin:0; }

.login-wrap{
  min-height:100vh;
  display:flex; align-items:center; justify-content:center;
}

footer.foot{
  text-align:center;
  color:#8B9583;
  font-size:0.78rem;
  margin-top: 30px;
}

@media (max-width: 640px){
  .wrap{ padding: 18px 14px 40px; }
  .card{ padding: 20px; }
  .topbar{ padding: 14px 16px; }
}

/* ---------- Utility classes (replace one-off inline style="" attributes
   so the Content-Security-Policy's style-src can stay 'self' only) ---------- */
.mt-0{ margin-top:0; }
.mt-10{ margin-top:10px; }
.mt-14{ margin-top:14px; }
.mt-16{ margin-top:16px; }
.mt-32{ margin-top:32px; }
.mb-0{ margin-bottom:0; }
.mb-14{ margin-bottom:14px; }
.mb-16{ margin-bottom:16px; }
.mb-24{ margin-bottom:24px; }
.pt-0{ padding-top:0; }
.text-center{ text-align:center; }
.text-muted{ color:#7C8A73; }
.pad-30{ padding:30px; }
.no-underline{ text-decoration:none; }
.welcome-sound-btn{ margin:10px 0 4px; }
.w-auto{ width:auto; }
.justify-center{ justify-content:center; }
.justify-between{ justify-content:space-between; }
.checkbox-label{
  display:flex; align-items:center; gap:10px;
  margin-top:18px; font-weight:500;
}
.checkbox-label input{
  width:20px;
  height:20px;
  flex-shrink:0;
  accent-color: var(--forest);
  cursor:pointer;
}
.inline-form{ display:flex; gap:10px; align-items:center; margin:0; }
.inline-form label{ margin:0; font-size:0.85rem; }
.stamp-out{ background: var(--clay); }
.cta-link{ text-decoration:none; display:inline-flex; margin-top:22px; }
.no-margin{ margin:0; }

/* ---------- Gate Pass ---------- */
.radio-group{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:8px;
}
.radio-option{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:500;
  margin:0;
  padding:12px 14px;
  border:1.5px solid var(--line);
  border-radius:10px;
  background: var(--sand-light);
  cursor:pointer;
}
.radio-option input{ width:auto; }

.button-row{
  display:flex;
  gap:12px;
  margin-top:10px;
}
.button-row form{ flex:1; margin:0; }
.button-row .btn{ margin-top:0; }

/* Standalone version of the confirm-page "meta" list, for pages that show
   gate pass details outside of a .confirm wrapper (e.g. the HOD review page). */
.meta{
  text-align:left;
  background: var(--sand-light);
  border:1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
  margin-top: 18px;
}
.meta div{ display:flex; justify-content:space-between; padding:6px 0; font-size:0.92rem; border-bottom:1px dashed var(--line); }
.meta div:last-child{ border-bottom:none; }
.meta span:first-child{ color:#7C8A73; }
.meta span:last-child{ font-weight:700; color:var(--forest-deep); text-align:right; }

.badge.gp-pending{ background:#F3E9D2; color:var(--clay-dark); }
.badge.gp-approved{ background:#E8F0E4; color:var(--forest); }
.badge.gp-rejected{ background:#FBEAE3; color:var(--danger); }
.badge.gp-expired{ background:#E7E2D8; color:#7C8A73; }

.status-symbol{ display:inline-block; font-size:1.15rem; font-weight:700; line-height:1; }
.status-symbol.approved{ color:#2E7D32; }
.status-symbol.pending{ color:#C9A227; }
.status-symbol.rejected{ color:#C0392B; }

.tabs{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.tab-link{
  display:inline-block;
  padding:8px 14px;
  border-radius:999px;
  font-size:0.85rem;
  font-weight:600;
  text-decoration:none;
  color: var(--forest);
  background: var(--sand-light);
  border:1.5px solid var(--line);
}
.tab-link.active{
  background: var(--forest);
  color: var(--sand-light);
  border-color: var(--forest);
}
.tab-link:hover{ text-decoration:none; }
.hidden{ display:none; }
.check-out-method{ font-size:0.7rem; }
.check-in-method{ font-size:0.7rem; }
.print-actions{ margin-top:22px; display:flex; gap:10px; justify-content:center; }
.hint-spaced{ margin-top:18px; }

/* month-by-month bar chart (reports.php) */
.bar-row{ display:flex; align-items:center; gap:14px; margin-bottom:10px; }
.bar-row .bar-label{ width:120px; font-size:0.85rem; font-weight:600; color:var(--forest-deep); }
.bar-row .bar-track{ flex:1; background:var(--sand); border-radius:6px; overflow:hidden; height:22px; }
.bar-row .bar-fill{ width:4%; background:var(--moss); height:100%; }
.bar-row .bar-count{ width:40px; text-align:right; font-weight:700; color:var(--forest-deep); }
.bar-row .btn{ white-space:nowrap; }

.host-row{ display:flex; justify-content:space-between; padding:8px 0; border-bottom:1px dashed var(--line); font-size:0.9rem; }
.host-row .host-count{ font-weight:700; color:var(--forest-deep); }

@media print {
  .topbar, .toolbar-print { display:none !important; }
  body { background:#fff; }
}

/* Onsite Visitor list (admin/onsite_visitor.php + public_onsite.php) */
.onsite-count{
  display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px;
  background: var(--forest); color: var(--sand-light);
  border-radius: var(--radius); padding: 18px 20px; margin-bottom:18px;
  box-shadow: var(--shadow);
}
.onsite-count .onsite-stats-row{
  display:flex; flex-wrap:nowrap; gap:10px; flex:1 1 auto; min-width:0;
}
.onsite-count .onsite-stat{
  background: var(--white); border-radius:14px; padding:12px 14px;
  flex:1 1 0; min-width:0; box-sizing:border-box;
}
.onsite-count .onsite-stat .num{
  font-family:var(--font-display); font-size:clamp(1.4rem, 6vw, 2.4rem);
  font-weight:800; line-height:1; color:var(--forest); white-space:nowrap;
}
.onsite-count .onsite-stat .lbl{
  font-size:0.62rem; text-transform:uppercase; letter-spacing:0.04em;
  color:#7C8A73; margin-top:4px; line-height:1.25;
}
.onsite-count .updated{ font-size:0.72rem; opacity:0.75; text-align:right; }
@media (max-width: 480px){
  .onsite-count{ flex-wrap:wrap; gap:10px; }
  .onsite-count .onsite-stats-row{ width:100%; }
  .onsite-count .updated{ text-align:left; }
}
.onsite-list{ display:flex; flex-direction:column; gap:12px; }
.onsite-card{
  background: var(--white); border:1px solid var(--line); border-radius: var(--radius);
  padding:16px 18px; box-shadow: var(--shadow);
}
.onsite-card .row1{ display:flex; align-items:flex-start; justify-content:flex-end; gap:10px; }
.onsite-card .meta{ margin-top:8px; display:grid; grid-template-columns: 1fr 1fr; gap:6px 14px; font-size:0.85rem; color:#5B6B54; }
.onsite-card .meta div span{ display:block; font-size:0.7rem; text-transform:uppercase; letter-spacing:0.05em; color:#9AA68F; }
.onsite-card .meta .meta-name{ grid-column: 1 / -1; }
.onsite-card .meta .meta-name strong{ font-family:var(--font-display); font-size:1.05rem; font-weight:700; color:var(--forest-deep); }
.onsite-card .checkin{
  margin-top:10px; display:inline-block; font-size:0.78rem; color:var(--moss); font-weight:700;
  background:#EFF3EA; border:1px solid var(--line); border-radius:8px; padding:5px 10px;
}
.onsite-card .meta a.phone-link{ color:var(--moss); font-weight:700; text-decoration:underline; }
.onsite-card .row1{ flex-wrap:wrap; }
.group-names-toggle{ width:auto; margin:0; }
.group-names-panel{
  margin-top:10px; padding:10px 12px; background:#F7F5EE; border:1px solid var(--line);
  border-radius:8px;
}
.group-names-title{ font-size:0.7rem; text-transform:uppercase; letter-spacing:0.05em; color:#9AA68F; margin-bottom:6px; }
.group-names-list{ margin:0; padding-left:18px; font-size:0.85rem; color:#3D4A38; }
.group-names-list li{ padding:2px 0; }
.empty-state{ text-align:center; padding:50px 20px; color:#7C8A73; }

/* Live check-in page (admin/live.php) */
.live-sound-banner{
  display:flex; align-items:center; justify-content:space-between; gap:14px;
  background:#FBEAE3; border:1px solid #E7C7B8; border-radius:var(--radius);
  padding:14px 18px; margin-bottom:16px;
}
.live-sound-banner strong{ color:var(--danger); }
.live-sound-on{ display:flex; align-items:center; gap:10px; margin-bottom:16px; }
.live-sound-on .btn{ margin-top:0; }
@media (max-width: 560px){
  .live-sound-banner{ flex-direction:column; align-items:flex-start; }
}
.live-sound-tag{
  display:inline-block; margin-left:8px; font-size:0.72rem; font-weight:700;
  color:var(--clay-dark); background:#F3E9D2; border-radius:8px; padding:3px 8px;
}
.live-card.just-in{
  animation: liveJustIn 2.4s ease-out;
  border-color: var(--moss);
}
@keyframes liveJustIn{
  0%{ box-shadow: 0 0 0 4px rgba(64,112,74,0.35); background:#EAF3E8; }
  100%{ box-shadow: none; background: var(--white); }
}

/* Department / Staff Directory "Live Check-In Sound" column */
.audio-cell{ min-width:190px; }
.audio-cell audio{ width:100%; max-width:220px; height:34px; display:block; }
.audio-upload-form{ display:flex; flex-direction:column; gap:6px; align-items:flex-start; }
.audio-upload-form input[type=file]{ font-size:0.78rem; max-width:220px; }

@media (max-width: 480px){
  .onsite-card .meta{ grid-template-columns: 1fr; }
}

/* Site-wide copyright line, shown at the very bottom of every page */
.copyright{
  text-align:center;
  font-size:0.7rem;
  color:#9AA68F;
  margin-top:18px;
  padding-top:12px;
}

/* ---------- PDPA Consent Modal ---------- */
body.modal-open{ overflow: hidden; }

.modal-overlay{
  position: fixed;
  inset: 0;
  background: rgba(18, 41, 31, 0.55);
  overflow-y: auto;
  padding: 24px 16px;
  z-index: 1000;
}
.modal-overlay.hidden{ display:none; }

.modal-box{
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.modal-head{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom: 14px;
  flex-shrink: 0;
}
.modal-logo{
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}
.modal-head-text h2{
  font-size: 1.15rem;
  margin: 0;
}
.modal-ref{
  font-size: 0.75rem;
  color: var(--moss);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}

.modal-scroll{
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  background: var(--sand-light);
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--ink);
  flex-shrink: 0;
  /* Fixed (viewport-aware) height rather than flex-grow, so the modal's
     total height is predictable and the overlay above can scroll to
     reach the checkbox/buttons below on short mobile screens. */
  height: min(46vh, 320px);
  height: min(46svh, 320px);
}
.modal-scroll p{ margin: 0 0 12px 0; }
.modal-scroll .modal-end-marker{
  text-align: center;
  color: #9AA68F;
  font-size: 0.78rem;
  margin-top: 18px;
  margin-bottom: 0;
}

.pdpa-list{
  margin: 0 0 12px 0;
  padding-left: 20px;
}
.pdpa-list > li{ margin-bottom: 10px; }
.pdpa-sublist{
  margin-top: 8px;
  padding-left: 20px;
}
.pdpa-sublist > li{ margin-bottom: 6px; }

.modal-scroll-hint{
  text-align: center;
  font-size: 0.78rem;
  color: var(--clay-dark);
  font-weight: 600;
  margin-top: 10px;
  flex-shrink: 0;
}
.modal-scroll-hint.done{ color: var(--moss); }

.modal-pdf-link{
  display: block;
  text-align: center;
  font-size: 0.78rem;
  margin-top: 6px;
  flex-shrink: 0;
}

.modal-agree-label{
  margin-top: 16px;
  flex-shrink: 0;
}

.modal-actions{
  display: flex;
  gap: 10px;
  margin-top: 8px;
  flex-shrink: 0;
}
.modal-actions .btn{
  margin-top: 0;
  width: auto;
  flex: 1 1 0;
  min-width: 0;
  padding: 13px 8px;
  white-space: normal;
}

@media (max-width: 480px){
  .modal-overlay{ padding: 14px 10px; }
  .modal-box{ padding: 16px; }
  .modal-head{ gap: 8px; margin-bottom: 10px; }
  .modal-logo{ width: 32px; height: 32px; }
  .modal-head-text h2{ font-size: 1rem; }
  .modal-ref{ font-size: 0.7rem; }
  .modal-scroll{ padding: 12px; font-size: 0.85rem; height: min(38vh, 240px); height: min(38svh, 240px); }
  .modal-scroll-hint{ font-size: 0.72rem; margin-top: 8px; }
  .modal-agree-label{ margin-top: 12px; font-size: 0.82rem; }
  .modal-actions{ flex-direction: column; gap: 8px; }
  .modal-actions .btn{ width: 100%; font-size: 0.92rem; padding: 13px 16px; }
}

/* Honeypot anti-bot field (register.php) — moved off-screen rather than
   display:none/visibility:hidden, which some bots specifically detect and
   skip. A sighted user tabbing through the form also never lands on it
   (tabindex="-1" on the input itself, on top of this). */
.hp-field{
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
