:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --panel-soft: #f9faf3;
  --text: #1f2933;
  --muted: #667085;
  --line: #d8dee8;
  --brand: #b78518;
  --brand-2: #0f766e;
  --red: #c24130;
  --green: #15803d;
  --blue: #2563eb;
  --shadow: 0 12px 30px rgba(31, 41, 51, .08);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
}
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
.topbar {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 10px;
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  min-width: 0;
  flex: 0 0 auto;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: #fff;
  font-weight: 900;
  flex: 0 0 auto;
}
.brand-logo {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  flex: 0 0 auto;
}
.brand strong { font-size: 13px; line-height: 1.05; }
.brand small { display: block; color: var(--muted); font-size: 10px; margin-top: 1px; line-height: 1.1; }
.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  overflow: visible;
  white-space: normal;
}
.nav::-webkit-scrollbar { display: none; }
.nav a,
.nav-menu-button {
  color: var(--muted);
  min-height: 34px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #e4e9f2;
  background: #f8fafc;
  font-weight: 800;
  font-size: 12px;
  line-height: 1;
  flex: 0 0 auto;
}
.nav-menu-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  font-family: inherit;
}
.nav-menu-button::after {
  content: "";
  width: 6px;
  height: 6px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
  margin-top: -3px;
}
.nav-group {
  position: relative;
  flex: 0 0 auto;
}
.nav-submenu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 35;
  display: none;
  min-width: 210px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}
.nav-submenu a {
  display: block;
  border: 0;
  background: transparent;
  min-height: 32px;
  padding: 8px 10px;
  white-space: nowrap;
}
.nav-group:hover .nav-submenu,
.nav-group:focus-within .nav-submenu {
  display: block;
}
.nav a.active, .nav a:hover, .nav-menu-button:hover, .nav-group.active > .nav-menu-button, .nav-group:focus-within > .nav-menu-button {
  background: #fff4d7;
  border-color: #f3d48a;
  color: #7c5608;
  text-decoration: none;
}
.nav a.danger { color: var(--red); }
.wrap { max-width: 1240px; margin: 0 auto; padding: 28px 18px; }
.wrap.admin-wrap { max-width: 1760px; padding-left: 24px; padding-right: 24px; }
.footer { text-align: center; color: var(--muted); padding: 24px; font-size: 13px; }
.portal-home-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.portal-home {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 20px 16px 28px;
}
.portal-home-card {
  width: min(560px, 100%);
  display: grid;
  gap: 22px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.96);
  box-shadow: var(--shadow);
}
.portal-home-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}
.portal-home-logo {
  width: 68px;
  height: 68px;
  border-radius: 14px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  flex: 0 0 auto;
}
.portal-home-logo-fallback {
  width: 68px;
  height: 68px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: #fff;
  font-weight: 900;
  font-size: 28px;
  flex: 0 0 auto;
}
.portal-home-kicker {
  margin: 0 0 2px;
  font-size: 12px;
  font-weight: 900;
  color: var(--brand-2);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.portal-home-brand h1 {
  margin: 0;
  font-size: clamp(26px, 5vw, 34px);
  line-height: 1.05;
}
.portal-home-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
}
.portal-home-actions {
  display: grid;
  gap: 12px;
}
.portal-home-button {
  min-height: 90px;
  padding: 18px 18px;
  border-radius: 12px;
  border: 1px solid #d9e2ef;
  background: #fff;
  color: var(--text);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(31, 41, 51, .05);
}
.portal-home-button:hover { text-decoration: none; border-color: #f1cb74; background: #fffdf6; }
.portal-home-button span {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: .02em;
}
.portal-home-button small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.portal-home-button.primary {
  background: linear-gradient(135deg, #b78518, #d6a93d);
  color: #fff;
  border-color: #bf8e22;
}
.portal-home-button.primary small { color: rgba(255,255,255,.88); }
@media (max-width: 520px) {
  .portal-home-card { padding: 18px; }
  .portal-home-brand { align-items: flex-start; }
  .portal-home-button { min-height: 84px; }
  .portal-home-button span { font-size: 17px; }
}
.page-title { display: flex; justify-content: flex-end; align-items: center; gap: 18px; margin-bottom: 12px; }
.page-title > div:first-child { display: none; }
.page-title:not(:has(> a, > .actions, > form, > button)) { display: none; }
.page-title h1 { margin: 0; font-size: 28px; letter-spacing: 0; }
.page-title p { margin: 4px 0 0; color: var(--muted); }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.card.soft { background: var(--panel-soft); }
.card-title { font-weight: 800; margin: 0 0 14px; font-size: 16px; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat strong { font-size: 30px; line-height: 1; }
.stat span { color: var(--muted); font-size: 13px; }
label { display: block; font-size: 13px; font-weight: 750; margin-bottom: 6px; color: #394150; }
.checkline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 0;
}
.checkline input {
  width: auto;
  min-height: auto;
}
.registration-row-check {
  width: 14px;
  height: 14px;
  min-height: auto;
  padding: 0;
}
input, select, textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  background: #fff;
  color: var(--text);
  font: inherit;
}
textarea { min-height: 84px; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(15, 118, 110, .16); border-color: var(--brand-2); }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-row-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}
.check-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 700;
}
.check-option input {
  width: auto;
  margin: 0;
}
.check-option.compact {
  min-height: 32px;
  padding: 5px 9px;
  font-size: 12px;
}
.report-preview-head {
  justify-content: space-between;
  margin-bottom: 12px;
}
.report-copy-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.report-group {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.report-group:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.report-group h3 {
  margin: 0 0 10px;
  font-size: 18px;
}
.report-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.report-group-head h3 {
  margin: 0;
}
.report-copy-button {
  flex: 0 0 auto;
}
.report-group h3 small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 14px;
  border: 0;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
  background: #e8edf5;
  color: var(--text);
  text-decoration: none;
}
.btn:hover { text-decoration: none; filter: brightness(.98); }
.btn:disabled { cursor: not-allowed; opacity: .58; filter: grayscale(.2); }
.btn.primary { background: var(--brand); color: #fff; }
.btn.green { background: var(--green); color: #fff; }
.btn.blue { background: var(--blue); color: #fff; }
.btn.red { background: var(--red); color: #fff; }
.btn.small { min-height: 30px; padding: 5px 9px; font-size: 12px; }
.alert { border-radius: 8px; padding: 12px 14px; margin-bottom: 16px; border: 1px solid var(--line); background: #fff; }
.alert-ok { border-color: #86efac; background: #f0fdf4; color: #14532d; }
.alert-error { border-color: #fecaca; background: #fff1f2; color: #7f1d1d; }
.alert-info { border-color: #bfdbfe; background: #eff6ff; color: #1e3a8a; }
.result-warning-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(31, 41, 51, .46);
}
.result-warning-backdrop[hidden] { display: none; }
.result-warning-box {
  width: min(420px, 100%);
  text-align: center;
  background: #fff;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 24px 70px rgba(31, 41, 51, .28);
}
.result-warning-box img {
  width: 88px;
  height: 88px;
  object-fit: contain;
}
.result-warning-box h2 {
  margin: 10px 0 6px;
  color: #92400e;
}
.result-warning-box p {
  margin: 0 0 18px;
  color: var(--muted);
}
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { border-bottom: 1px solid var(--line); padding: 10px 9px; text-align: left; vertical-align: middle; }
th { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; background: #fbfcfe; }
tr:hover td { background: #fffdf7; }
.schedule-conflict-row td { background: #fff1f2; }
.schedule-warning-row td { background: #fffbeb; }
.schedule-managed-row td { background: #eff6ff; }
.schedule-conflict-row:hover td { background: #ffe4e6; }
.schedule-warning-row:hover td { background: #fef3c7; }
.schedule-managed-row:hover td { background: #dbeafe; }
.schedule-check-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, .65fr);
  gap: 16px;
  align-items: start;
}
.schedule-stage-block {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}
.schedule-stage-block h3 {
  margin: 0;
  padding: 9px 11px;
  border: 1px solid var(--line);
  background: #f8fafc;
  border-radius: 8px;
  font-size: 16px;
}
.schedule-check-card,
.conflict-check-card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 9px;
}
.schedule-check-card.schedule-conflict-row,
.conflict-check-card:has(.badge.red) { background: #fff1f2; border-color: #fecdd3; }
.schedule-check-card.schedule-warning-row,
.conflict-check-card:has(.badge.gold) { background: #fffbeb; border-color: #fde68a; }
.schedule-check-card.schedule-managed-row,
.conflict-check-card:has(.badge.blue) { background: #eff6ff; border-color: #bfdbfe; }
.schedule-check-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.schedule-check-head div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.schedule-event-title {
  font-weight: 900;
  font-size: 17px;
}
.schedule-check-meta,
.schedule-check-remarks {
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}
.schedule-participants {
  display: grid;
  gap: 7px;
}
.schedule-participant-row {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.72);
  border-radius: 7px;
  padding: 8px;
  display: grid;
  gap: 3px;
}
.schedule-participant-row div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: baseline;
}
.schedule-participant-row small {
  color: var(--muted);
  font-weight: 700;
}
.schedule-conflict-panel {
  position: sticky;
  top: 64px;
  max-height: calc(100vh - 90px);
  overflow: auto;
}
.conflict-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.conflict-two-col > div {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.78);
  border-radius: 7px;
  padding: 8px;
  display: grid;
  gap: 3px;
}
.conflict-two-col span,
.conflict-two-col small {
  color: var(--muted);
  font-weight: 700;
}
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2f7;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
}
.badge.gold { background: #fff4d7; color: #7c5608; }
.badge.green { background: #dcfce7; color: #166534; }
.badge.blue { background: #dbeafe; color: #1e40af; }
.badge.red { background: #fee2e2; color: #991b1b; }
.login-shell { min-height: calc(100vh - 90px); display: grid; place-items: center; }
.login-card { width: min(420px, 100%); }
.result-builder { align-items: stretch; }
.prize-card { display: flex; flex-direction: column; gap: 12px; }
.prize-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.winner-row {
  border: 1px solid var(--line);
  background: #fbfcfe;
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 10px;
}
.uid-input {
  font-weight: 800;
}
.grade-radios { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.grade-radios label {
  margin: 0;
  display: grid;
  place-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
}
.grade-radios input { display: none; }
.grade-radios label:has(input:checked) { border-color: var(--brand-2); background: #e7f7f4; color: #0f766e; }
.winner-details {
  border-radius: 8px;
  border: 1px dashed var(--line);
  background: #fff;
  padding: 10px;
  min-height: 74px;
  color: var(--muted);
}
.winner-person { display: grid; grid-template-columns: 70px 1fr; gap: 10px; align-items: center; }
.winner-person img { width: 70px; height: 90px; aspect-ratio: 7 / 9; border-radius: 8px; object-fit: cover; background: #edf0f5; }
.points-preview { color: var(--brand-2); font-weight: 800; margin-top: 5px; }
.winner-event-list { margin-top: 10px; }
.winner-event-list table { font-size: 12px; margin-top: 6px; }
.winner-event-list th, .winner-event-list td { padding: 5px 4px; }
.error-text { color: var(--red); font-size: 13px; font-weight: 700; }
.inline-status {
  display: block;
  min-height: 20px;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 800;
}
.inline-status.ok { color: var(--green); }
.inline-status.error { color: var(--red); }
.inline-status.warning { color: #a15c07; }
.filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: end; }
.champion-row:first-child td { background: #fff9e8; }
.settings-logo-preview {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 4px;
}
.public-results-page {
  background: #eef3f8;
}
.public-results-wrap {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 14px;
}
.public-result-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 82px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.public-result-header img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}
.public-result-header h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: 0;
  text-align: center;
}
.result-category-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 12px 0 8px;
}
.result-category-column {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 8px;
  min-width: 0;
}
.result-main-tab {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px 8px;
  border: 1px solid var(--brand);
  border-radius: 8px;
  background: #fff;
  color: #7c5608;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(31, 41, 51, .06);
}
.result-category-column.active .result-main-tab,
.result-main-tab:hover {
  background: var(--brand);
  color: #fff;
  text-decoration: none;
}
.result-subtab-list {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 8px;
  min-height: 152px;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}
.result-subtab-list a {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-weight: 850;
  font-size: 13px;
  line-height: 1.2;
}
.result-subtab-list a.active,
.result-subtab-list a:hover {
  background: var(--brand-2);
  border-color: var(--brand-2);
  color: #fff;
  text-decoration: none;
}
.result-filter-row {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 520px);
  gap: 14px;
  align-items: end;
  padding: 14px 0;
}
.result-filter-row h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0;
}
.result-filter-row p {
  margin: 4px 0 0;
  color: var(--muted);
}
.result-search div {
  display: flex;
  gap: 8px;
}
.result-search input {
  min-width: 0;
}
.result-table-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.public-result-table {
  min-width: 980px;
}
.public-result-table th {
  position: sticky;
  top: 54px;
  z-index: 5;
}
.public-result-table th:first-child,
.public-result-table td:first-child {
  width: 30%;
}
.public-result-table th:not(:first-child),
.public-result-table td:not(:first-child) {
  width: 23.333%;
}
.result-event-cell strong {
  display: block;
  margin-bottom: 7px;
  font-size: 15px;
}
.result-winner-list {
  display: grid;
  gap: 8px;
}
.result-winner {
  display: grid;
  gap: 2px;
  padding: 8px;
  border: 1px solid #e6ebf2;
  border-radius: 8px;
  background: #fbfcfe;
}
.result-winner strong {
  font-size: 13px;
}
.result-winner span,
.result-winner small,
.result-pending {
  color: var(--muted);
}
.result-winner small {
  font-weight: 750;
}
.result-update-pending {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  width: 100%;
  padding: 8px;
  border: 1px solid #f2c94c;
  border-radius: 8px;
  background: #fff8db;
  color: #7c5608;
  font-weight: 850;
  text-align: center;
}
.public-result-footer {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 18px 12px 28px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}
.public-model-page,
.public-model-page label,
.public-model-page p,
.public-model-page a,
.public-model-page h1,
.public-model-page div,
.public-model-page table {
  font-family: "Ubuntu", Inter, "Segoe UI", system-ui, sans-serif;
}
.public-model-page {
  background: #f4f7fb;
  padding: 18px 14px 0;
}
.public-model-wrap {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 0 0 22px;
}
.public-model-title {
  display: none;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  min-height: 130px;
  font-size: 35px;
  background: #054d8a;
  color: white;
  padding: 20px 6% 76px;
  margin: 0 0 0;
  font-weight: 800;
  letter-spacing: 0;
  text-align: center;
  border-radius: 8px;
}
.public-title-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  padding: 4px;
}
.public-model-tabs {
  width: min(980px, 94%);
  margin: 16px auto 24px;
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  z-index: 2;
}
.public-model-tabs a {
  min-height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #0b72b5;
  color: #fff;
  font-weight: 900;
  font-size: 1.08rem;
  line-height: 1.15;
  text-transform: uppercase;
  border: 2px solid #e7f6ff;
  border-bottom: 6px solid #ffeb3b;
  border-radius: 8px;
  padding: 14px 10px;
  box-shadow: 0 12px 24px rgba(5, 77, 138, .18);
}
.public-model-tabs a.active {
  background: #053f72;
  border-color: #ffeb3b;
  color: #fff;
  text-decoration: none;
  box-shadow: inset 0 -7px 0 #ffeb3b, 0 14px 28px rgba(5, 77, 138, .28);
}
.public-model-tabs a:hover {
  background: #053f72;
  border-color: #ffeb3b;
  color: #fff;
  text-decoration: none;
}
.public-model-slide {
  display: none;
}
.public-model-filter {
  width: min(900px, 94%);
  margin: 0 auto 22px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 16px;
  align-items: center;
}
.public-model-filter strong {
  display: block;
  font-size: 22px;
  color: var(--text);
}
.public-model-filter span {
  color: var(--muted);
}
.public-model-filter form {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
}
.public-model-filter input {
  width: 280px;
  min-width: 0;
}
.public-model-content {
  width: min(1040px, 94%);
  margin: 0 auto;
  display: grid;
  gap: 28px;
}
.public-model-table {
  border: 1px solid #ccc;
  border-collapse: collapse;
  margin: 0;
  padding: 0;
  width: 100%;
  table-layout: fixed;
  background: #fff;
  box-shadow: var(--shadow);
}
.public-model-table caption {
  font-size: 1.5em;
  margin: 0.5em 0 0.75em;
  color: var(--text);
  font-weight: 800;
  text-align: left;
}
.public-model-table tr {
  background-color: #f8f8f8;
  border: 1px solid #ddd;
}
.public-model-table th,
.public-model-table td {
  padding: 0.625em;
  text-align: center;
  vertical-align: top;
}
.public-model-table th {
  font-size: 0.85em;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.public-model-table td:first-child {
  text-align: left;
}
.public-model-table td:first-child strong {
  display: block;
  margin-bottom: 7px;
}
.public-model-table td.public-event-cell {
  --event-accent: #0b72b5;
  --event-bg: #e9f5ff;
  background: var(--event-bg);
  border-left: 6px solid var(--event-accent);
}
.public-model-table tbody tr:nth-child(4n+2) td.public-event-cell {
  --event-accent: #0f766e;
  --event-bg: #e7f7f4;
}
.public-model-table tbody tr:nth-child(4n+3) td.public-event-cell {
  --event-accent: #b78518;
  --event-bg: #fff4d7;
}
.public-model-table tbody tr:nth-child(4n+4) td.public-event-cell {
  --event-accent: #c24130;
  --event-bg: #fff1f2;
}
.public-event-title {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  margin-bottom: 8px;
}
.public-event-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  min-height: 30px;
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--event-accent);
  color: #fff;
  font-weight: 900;
  line-height: 1;
}
.public-event-name {
  color: #172033;
  font-size: 15px;
  line-height: 1.24;
}
.public-model-table .result-winner {
  background: #fff;
}
.public-feature-wrap {
  max-width: 1180px;
}
.public-lookup-card {
  margin-bottom: 20px;
}
.admit-lookup-form {
  grid-template-columns: 1fr 1fr auto;
}
.admit-mode-tabs {
  grid-column: 1 / -1;
}
.admit-output {
  display: grid;
  justify-items: center;
  gap: 16px;
}
.admit-card-viewport {
  width: min(430px, 100%);
  overflow: hidden;
  margin: 0 auto;
}
.admit-card-scaler {
  width: 1080px;
  height: 1920px;
  transform-origin: top left;
}
.admit-card {
  position: relative;
  width: 1080px;
  height: 1920px;
  overflow: hidden;
  background: #ffffff;
  color: #18212f;
  border: 0;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
}
.admit-card-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, #0f766e 0 370px, transparent 370px),
    radial-gradient(circle at 88% 9%, rgba(255,244,215,.9) 0 150px, transparent 151px),
    linear-gradient(180deg, #ffffff, #f4f7fb);
}
.admit-card::after {
  content: "";
  position: absolute;
  left: -120px;
  right: -120px;
  bottom: -230px;
  height: 520px;
  background: #fff4d7;
  transform: rotate(-6deg);
}
.admit-card-header,
.admit-person,
.admit-info-grid,
.admit-events-panel,
.admit-card-footer {
  position: relative;
  z-index: 1;
}
.admit-card-header {
  height: 250px;
  padding: 72px 72px 30px;
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 28px;
  align-items: center;
  color: #fff;
}
.admit-logo-box {
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(0,0,0,.18);
}
.admit-logo-box img {
  width: 110px;
  height: 110px;
  object-fit: contain;
}
.admit-logo-box span {
  color: var(--brand);
  font-size: 70px;
  font-weight: 900;
}
.admit-card-header p {
  margin: 0 0 8px;
  font-size: 38px;
  line-height: 1;
  font-weight: 900;
}
.admit-card-header h2 {
  margin: 0;
  font-size: 64px;
  line-height: 1;
  letter-spacing: 0;
}
.admit-person {
  margin: 40px 72px 0;
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 42px;
  align-items: center;
}
.admit-photo-frame {
  width: 350px;
  height: 450px;
  border-radius: 28px;
  overflow: hidden;
  background: #e7edf5;
  border: 10px solid #fff;
  box-shadow: 0 18px 42px rgba(31,41,51,.18);
}
.admit-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.admit-photo-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #667085;
  font-size: 44px;
  font-weight: 900;
}
.admit-person-main {
  min-width: 0;
}
.admit-kicker {
  display: block;
  color: #0f766e;
  font-size: 30px;
  font-weight: 900;
  text-transform: uppercase;
}
.admit-person-main > strong {
  display: block;
  margin: 8px 0 24px;
  color: #b78518;
  font-size: 86px;
  line-height: .95;
  font-weight: 950;
}
.admit-person-main h1 {
  margin: 0;
  font-size: 54px;
  line-height: 1.04;
  letter-spacing: 0;
  text-transform: uppercase;
}
.admit-info-grid {
  margin: 46px 72px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.admit-info-grid div {
  min-height: 112px;
  padding: 20px 24px;
  border-radius: 20px;
  background: #f8fafc;
  border: 2px solid #d8dee8;
}
.admit-info-grid div:first-child {
  grid-column: 1 / -1;
}
.admit-info-grid span,
.admit-card-footer span {
  display: block;
  color: #667085;
  font-size: 26px;
  font-weight: 900;
  text-transform: uppercase;
}
.admit-info-grid strong,
.admit-card-footer strong {
  display: block;
  margin-top: 8px;
  font-size: 36px;
  line-height: 1.12;
}
.admit-events-panel {
  margin: 38px 72px 0;
  min-height: 360px;
  padding: 28px;
  border-radius: 24px;
  background: #ffffff;
  border: 3px solid #f1cb74;
  box-shadow: 0 12px 34px rgba(31,41,51,.08);
}
.admit-events-panel h3 {
  margin: 0 0 18px;
  color: #7c5608;
  font-size: 38px;
  line-height: 1;
}
.admit-event-list {
  display: grid;
  gap: 12px;
  font-size: 30px;
  line-height: 1.15;
  font-weight: 800;
}
.admit-event-list div {
  padding: 12px 16px;
  border-radius: 14px;
  background: #f8fafc;
}
.admit-card-footer {
  position: absolute;
  left: 72px;
  right: 72px;
  bottom: 76px;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 26px;
  align-items: center;
  padding: 30px;
  border-radius: 26px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 18px 44px rgba(31,41,51,.14);
}
.admit-qr {
  width: 248px;
  height: 248px;
  display: grid;
  place-items: center;
  padding: 10px;
  border-radius: 18px;
  background: #fff;
  border: 2px solid #d8dee8;
}
.admit-qr img,
.admit-qr canvas {
  width: 228px !important;
  height: 228px !important;
}
.admit-download-actions {
  justify-content: center;
}
.admit-card-v2 {
  width: 1080px;
  height: 1920px;
  position: relative;
  display: block;
  padding: 0;
  overflow: hidden;
  background: linear-gradient(180deg, #00796b 0 285px, #effaf7 285px 100%);
  color: #10201d;
  border: 0;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
}
.admit-v2-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 190px;
  z-index: 1;
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) 118px;
  gap: 22px;
  align-items: center;
  padding: 50px 58px 28px;
  background: #00796b;
  color: #fff;
}
.admit-v2-logo {
  width: 116px;
  height: 116px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: #fff;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,.72);
}
.admit-v2-logo img {
  max-width: 94px;
  max-height: 94px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.admit-v2-logo span {
  color: #00796b;
  font-size: 64px;
  font-weight: 950;
}
.admit-v2-title {
  min-width: 0;
  text-align: center;
}
.admit-v2-title strong {
  display: block;
  font-size: 48px;
  line-height: 1.05;
  font-weight: 950;
}
.admit-v2-title span {
  display: block;
  margin-top: 8px;
  color: #ffd966;
  font-size: 34px;
  line-height: 1.08;
  font-weight: 950;
}
.admit-v2-person {
  position: absolute;
  top: 190px;
  left: 54px;
  right: 54px;
  height: 570px;
  z-index: 2;
  display: grid;
  grid-template-columns: 392px 1fr;
  gap: 88px;
  align-items: center;
  box-sizing: border-box;
  margin: 0;
  padding: 38px;
  border-radius: 30px;
  background: #fff;
  border: 2px solid #a8dcd5;
  box-shadow: 0 18px 36px rgba(0, 69, 61, .08);
}
.admit-v2-photo {
  width: 392px;
  height: 504px;
  border-radius: 28px;
  overflow: hidden;
  background: #e7f0f4;
  border: 2px solid #a8dcd5;
}
.admit-v2-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.admit-v2-info {
  position: absolute;
  top: 775px;
  left: 0;
  right: 0;
  height: 392px;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 23px;
  padding: 35px 60px 0;
}
.admit-v2-info > div:not(.admit-v2-meta),
.admit-v2-meta > div {
  min-width: 0;
  padding: 22px 28px;
  border-radius: 22px;
  background: #fff;
  border: 2px solid #a8dcd5;
}
.admit-v2-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 60px;
}
.admit-v2-info span {
  display: block;
  color: #57716d;
  font-size: 21px;
  line-height: 1;
  font-weight: 950;
  text-transform: uppercase;
}
.admit-v2-info strong {
  display: block;
  margin-top: 12px;
  color: #10201d;
  font-size: 34px;
  line-height: 1.08;
  font-weight: 950;
  overflow-wrap: anywhere;
}
.admit-v2-name strong {
  font-size: 38px;
  text-transform: uppercase;
}
.admit-v2-events {
  position: absolute;
  top: 1212px;
  left: 60px;
  right: 60px;
  height: 408px;
  z-index: 1;
  min-height: 0;
  box-sizing: border-box;
  margin: 0;
  padding: 28px 30px;
  border-radius: 28px;
  background: #fff;
  border: 4px solid #00796b;
  overflow: hidden;
}
.admit-v2-events h3 {
  margin: 0 0 18px;
  color: #00796b;
  font-size: 30px;
  line-height: 1;
  text-transform: uppercase;
}
.admit-v2-event-list {
  display: grid;
  gap: 8px;
  max-height: 100%;
  overflow: hidden;
}
.admit-v2-event-list div {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #10201d;
  font-size: 34px;
  line-height: 1.22;
  font-weight: 950;
  overflow-wrap: anywhere;
}
.admit-v2-events.compact .admit-v2-event-list {
  gap: 7px;
}
.admit-v2-events.compact .admit-v2-event-list div {
  padding: 0;
  font-size: 31px;
}
.admit-v2-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 260px;
  box-sizing: border-box;
  display: grid;
  grid-template-rows: 44px 154px 34px;
  gap: 0;
  align-items: center;
  justify-items: center;
  padding: 6px 60px 12px;
  background: #003b36;
  color: #fff;
  text-align: center;
}
.admit-v2-footer span {
  color: #fff4d7;
  font-size: 34px;
  font-weight: 950;
  line-height: 1;
}
.admit-v2-footer strong {
  display: block;
  color: #ffd966;
  font-size: 140px;
  line-height: .96;
  font-weight: 950;
}
.admit-v2-footer small {
  color: rgba(255,255,255,.5);
  font-size: 24px;
  line-height: 1;
  font-weight: 950;
}
.admit-v2-qr {
  width: 386px;
  height: 386px;
  display: grid;
  place-items: center;
  padding: 26px;
  border-radius: 28px;
  background: #fff;
  border: 4px solid #00796b;
}
.admit-v2-qr-panel {
  display: grid;
  justify-items: center;
  gap: 26px;
}
.admit-v2-qr-panel > strong {
  color: #00796b;
  font-size: 28px;
  line-height: 1;
  font-weight: 950;
  text-align: center;
}
.admit-v2-qr img,
.admit-v2-qr canvas {
  width: 334px !important;
  height: 334px !important;
}
.attendance-layout {
  align-items: start;
}
.attendance-standalone-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #eef3f8;
}
.attendance-scan-shell {
  flex: 1;
  width: 100%;
  display: grid;
  justify-items: center;
  align-items: start;
  padding: 14px;
}
.attendance-scan-card {
  width: min(560px, 100%);
  display: grid;
  gap: 16px;
  padding: 16px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.attendance-scan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #0f766e;
  color: #fff;
}
.attendance-scan-head span {
  font-weight: 900;
  font-size: 15px;
}
.attendance-scan-head strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
  color: #0f766e;
  font-weight: 950;
}
.attendance-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.attendance-mode-tabs button {
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}
.attendance-mode-tabs button.active {
  border-color: var(--brand-2);
  background: #e7f7f4;
  color: #0f766e;
}
.attendance-scan-button,
.attendance-cancel-scan,
.attendance-mark-button {
  width: 100%;
  min-height: 58px;
  border-radius: 12px;
  font-size: 16px;
}
.attendance-cancel-scan {
  background: #fff1f2;
  color: #991b1b;
}
.attendance-qr-reader {
  width: min(360px, 100%);
  min-height: 320px;
  margin: 0 auto;
  align-self: center;
  justify-self: center;
  outline: none;
}
.attendance-uid-block label {
  font-size: 14px;
}
.attendance-uid-block input {
  min-height: 58px;
  border-radius: 12px;
  font-size: 24px;
  font-weight: 950;
  letter-spacing: .04em;
  text-align: center;
}
.attendance-preview-card {
  min-width: 0;
}
.attendance-active-note {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #e7f7f4;
  color: #0f766e;
  font-weight: 900;
  text-align: center;
}
.attendance-day-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.attendance-day-options label {
  margin: 0;
}
.attendance-day-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.attendance-day-options span {
  display: grid;
  place-items: center;
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 850;
  cursor: pointer;
}
.attendance-day-options input:checked + span {
  background: #e7f7f4;
  border-color: var(--brand-2);
  color: #0f766e;
}
.qr-reader {
  margin-top: 14px;
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #111827;
}
.attendance-participant-empty {
  min-height: 260px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}
.attendance-participant-card {
  display: grid;
  gap: 14px;
}
.attendance-person {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  align-items: center;
}
.attendance-photo {
  width: 120px;
  height: 154px;
  border-radius: 8px;
  overflow: hidden;
  background: #edf0f5;
  border: 1px solid var(--line);
}
.attendance-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.attendance-photo-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 900;
}
.attendance-person h3 {
  margin: 8px 0 2px;
  font-size: 22px;
  line-height: 1.1;
}
.attendance-person p {
  margin: 2px 0;
  color: var(--muted);
  font-weight: 700;
}
.attendance-events {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfe;
}
.attendance-events p {
  margin: 6px 0 0;
}
.attendance-status-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.attendance-status-row span {
  min-height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #fff8db;
  color: #7c5608;
  font-weight: 850;
  border: 1px solid #f2c94c;
}
.attendance-status-row span.present {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}
.attendance-view-filters {
  grid-template-columns: repeat(5, minmax(0, 1fr)) auto auto;
}
.attendance-search-card {
  margin-bottom: 16px;
}
.attendance-uid-search {
  display: grid;
  gap: 14px;
  max-width: 560px;
}
.attendance-uid-search input {
  min-height: 54px;
  border-radius: 12px;
  font-size: 22px;
  font-weight: 950;
  letter-spacing: .04em;
  text-align: center;
}
.attendance-table {
  min-width: 1120px;
}
.attendance-table td:nth-child(5) {
  min-width: 260px;
  font-size: 13px;
}
.attendance-bottom-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding-top: 4px;
}
.attendance-bottom-actions .btn {
  min-height: 54px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 950;
}
.attendance-result-cards {
  display: grid;
  gap: 12px;
}
.attendance-table-card {
  display: none;
}
.attendance-result-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.attendance-result-main {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  color: var(--text);
  font-size: 15px;
  line-height: 1.3;
}
.attendance-result-days {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.attendance-result-days span {
  min-height: 38px;
  display: grid;
  place-items: center;
  padding: 6px;
  border-radius: 10px;
  background: #fff1f2;
  color: #991b1b;
  border: 1px solid #fecdd3;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}
.attendance-result-days span.present {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}
.attendance-result-details {
  display: grid;
  gap: 10px;
  margin: 0;
}
.attendance-result-details div {
  min-width: 0;
  padding: 10px;
  border-radius: 10px;
  background: #f8fafc;
}
.attendance-result-details dt {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}
.attendance-result-details dd {
  margin: 0;
  color: var(--text);
  font-weight: 800;
  overflow-wrap: anywhere;
}
@media (min-width: 760px) {
  .attendance-result-cards {
    display: none;
  }
  .attendance-table-card {
    display: block;
  }
}
@media (max-width: 920px) {
  .grid-2, .grid-3, .grid-4, .form-row, .form-row-3, .filters { grid-template-columns: 1fr; }
  .page-title { align-items: flex-start; flex-direction: column; }
  .topbar { padding: 5px 8px; }
  .brand strong { font-size: 12px; }
  .brand small { font-size: 9px; }
  .nav-submenu {
    position: absolute;
    min-width: min(260px, calc(100vw - 36px));
    margin-top: 4px;
    box-shadow: none;
  }
  .nav-group:hover .nav-submenu,
  .nav-group:focus-within .nav-submenu { display: block; }
  .result-filter-row { grid-template-columns: 1fr; }
  .result-search div { flex-wrap: wrap; }
  .result-search input { flex: 1 1 220px; }
  .public-result-table { min-width: 760px; }
  .public-result-header { justify-content: flex-start; }
  .public-result-header h1 { text-align: left; font-size: 22px; }
  .result-category-board {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    overflow-x: auto;
  }
  .result-subtab-list { min-height: 142px; }
  .public-model-title {
    padding: 28px 16px 100px;
    font-size: 27px;
  }
  .public-model-tabs {
    width: 94%;
    margin: 12px auto 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .public-model-tabs a {
    min-height: 70px;
    font-size: .94rem;
    padding: 11px 8px;
  }
  .public-model-filter,
  .public-model-content {
    width: 92%;
  }
  .public-model-filter {
    grid-template-columns: 1fr;
  }
  .public-model-filter form {
    justify-content: flex-start;
  }
  .public-model-filter input {
    width: min(280px, 100%);
    flex: 0 1 280px;
  }
  .admit-lookup-form,
  .attendance-view-filters {
    grid-template-columns: 1fr;
  }
  .attendance-day-options,
  .attendance-status-row {
    grid-template-columns: 1fr;
  }
  .attendance-person {
    grid-template-columns: 96px 1fr;
  }
  .attendance-photo {
    width: 96px;
    height: 123px;
  }
  .schedule-check-grid,
  .conflict-two-col {
    grid-template-columns: 1fr;
  }
  .schedule-conflict-panel {
    position: static;
    max-height: none;
  }
}
@media (max-width: 560px) {
  .brand small { display: none; }
  .nav a,
  .nav-menu-button {
    padding: 7px 9px;
    font-size: 11px;
  }
  .brand strong { font-size: 11.5px; }
}
@media (max-width: 420px) {
  .public-model-page {
    padding: 10px 8px 0;
  }
  .public-model-title {
    font-size: 22px;
  }
  .public-title-logo {
    width: 50px;
    height: 50px;
  }
  .public-model-tabs a {
    min-height: 66px;
    font-size: .82rem;
  }
  .public-model-filter form {
    width: 100%;
  }
  .public-model-filter input {
    width: auto;
    flex: 1 1 auto;
  }
  .public-model-filter .btn {
    flex: 0 0 auto;
    padding-left: 12px;
    padding-right: 12px;
  }
}
@media screen and (max-width: 600px) {
  .public-model-table {
    border: 0;
    box-shadow: none;
  }
  .public-model-table caption {
    font-size: 1.3em;
  }
  .public-model-table thead {
    border: none;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
  }
  .public-model-table tr {
    border-bottom: 3px solid #ddd;
    display: block;
    margin-bottom: 0.625em;
  }
  .public-model-table td {
    border-bottom: 1px solid #ddd;
    display: block;
    font-size: 0.86em;
    text-align: right;
  }
  .public-model-table td:first-child {
    text-align: right;
  }
  .public-event-title {
    grid-template-columns: 1fr;
    justify-items: end;
  }
  .public-model-table td::before {
    content: attr(data-label);
    float: left;
    font-weight: bold;
    text-transform: uppercase;
  }
  .public-model-table td:last-child {
    border-bottom: 0;
  }
}
@media print {
  .topbar, .footer, .btn, .filters { display: none !important; }
  .result-category-board, .result-search, .public-model-tabs, .public-model-filter { display: none !important; }
  body { background: #fff; }
  .wrap { max-width: none; padding: 0; }
  .card { box-shadow: none; break-inside: avoid; }
  .schedule-check-grid {
    grid-template-columns: 1fr;
  }
  .schedule-conflict-panel {
    position: static;
    max-height: none;
    overflow: visible;
  }
  .public-results-wrap { padding: 0; }
  .result-table-panel { box-shadow: none; border: 0; }
  .public-result-table { min-width: 0; }
  .public-model-title {
    background: #fff;
    color: #000;
    padding: 0 0 12px;
    min-height: auto;
  }
  .public-model-content { width: 100%; }
}


/* v1.1.1 layout policy: public + attendance pages are mobile first; admin/internal pages stay Full HD desktop. */
body.admin-page {
  min-width: 1920px;
  overflow-x: auto;
}
body.admin-page .topbar {
  min-width: 1920px;
  position: sticky;
}
body.admin-page .wrap.admin-wrap {
  width: 1840px;
  max-width: 1840px;
}
@media (max-width: 920px) {
  body.admin-page .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.admin-page .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body.admin-page .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  body.admin-page .form-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.admin-page .form-row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body.admin-page .filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  body.admin-page .page-title { align-items: center; flex-direction: row; }
  body.admin-page .topbar { padding: 5px 10px; }
  body.admin-page .brand strong { font-size: 13px; }
  body.admin-page .brand small { font-size: 10px; display: block; }
  body.admin-page .nav a,
  body.admin-page .nav-menu-button { padding: 8px 10px; font-size: 12px; }
  body.admin-page .schedule-check-grid { grid-template-columns: minmax(0, 1.35fr) minmax(360px, .65fr); }
  body.admin-page .conflict-two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.admin-page .schedule-conflict-panel { position: sticky; max-height: calc(100vh - 90px); }
}

/* v1.1.1 attendance view: mobile-first card UI + wider desktop table */
body.attendance-view-page {
  background: #eef3f8;
}
.attendance-view-wrap {
  width: 100%;
  max-width: 100%;
  padding: 14px 10px 24px;
}
.attendance-view-title {
  gap: 12px;
  margin-bottom: 14px;
  padding: 4px 2px 0;
}
.attendance-view-title h1 {
  margin-bottom: 2px;
  font-size: clamp(24px, 7vw, 34px);
  line-height: 1.05;
}
.attendance-view-title p {
  margin: 0;
  color: var(--muted);
  font-weight: 750;
}
.attendance-view-title .actions {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.attendance-view-title .btn {
  min-height: 44px;
  justify-content: center;
}
.attendance-search-card {
  padding: 12px;
  border-radius: 16px;
}
.attendance-uid-search {
  max-width: none;
  width: 100%;
  gap: 12px;
}
.attendance-uid-field label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.attendance-view-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.attendance-view-actions .btn {
  width: 100%;
  min-height: 52px;
  justify-content: center;
  border-radius: 12px;
  font-weight: 950;
}
.attendance-result-card {
  border-radius: 16px;
  padding: 14px;
}
.attendance-result-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  font-size: 18px;
}
.attendance-result-main > span:not(.attendance-result-uid) {
  display: none;
}
.attendance-result-uid {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e7f7f4;
  color: #0f766e;
  font-size: 13px;
  font-weight: 950;
  line-height: 1;
}
.attendance-result-days {
  gap: 7px;
}
.attendance-result-days span {
  min-height: 44px;
  border-radius: 12px;
  font-size: 12px;
}
.attendance-result-details {
  gap: 8px;
}
.attendance-result-details div {
  padding: 11px;
  border-radius: 12px;
}
.attendance-events-detail dd {
  white-space: normal;
  line-height: 1.45;
}

@media (min-width: 640px) {
  .attendance-view-wrap {
    padding: 22px 18px 30px;
  }
  .attendance-view-title {
    align-items: center;
    flex-direction: row;
  }
  .attendance-view-title .actions {
    width: auto;
    display: flex;
  }
  .attendance-search-card {
    padding: 16px;
  }
  .attendance-uid-search {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
  .attendance-mode-tabs {
    grid-column: 1 / -1;
  }
  .attendance-view-actions {
    width: 230px;
  }
  .attendance-result-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .attendance-events-detail {
    grid-column: 1 / -1;
  }
}

@media (min-width: 960px) {
  .attendance-view-wrap {
    max-width: min(1720px, calc(100vw - 48px));
    padding-left: 0;
    padding-right: 0;
  }
  .attendance-search-card {
    max-width: 940px;
  }
  .attendance-uid-search {
    grid-template-columns: minmax(280px, 420px) minmax(300px, 1fr) auto;
  }
  .attendance-mode-tabs {
    grid-column: auto;
  }
  .attendance-view-actions {
    width: 250px;
  }
  .attendance-table-card {
    border-radius: 16px;
    padding: 16px;
  }
  .attendance-table {
    width: 100%;
    min-width: 1480px;
  }
  .attendance-table th,
  .attendance-table td {
    padding: 13px 14px;
    vertical-align: top;
  }
  .attendance-table td:nth-child(3) {
    min-width: 220px;
  }
  .attendance-table td:nth-child(4) {
    min-width: 180px;
  }
  .attendance-table td:nth-child(5) {
    min-width: 420px;
    max-width: 620px;
    font-size: 14px;
    line-height: 1.45;
  }
}

@media (min-width: 1500px) {
  .attendance-view-wrap {
    max-width: 1840px;
  }
  .attendance-search-card {
    max-width: 1080px;
  }
  .attendance-table {
    min-width: 1640px;
  }
}

/* v1.1.1 result update: selected event registered UID helper at bottom above footer. */
.result-registered-uids-card {
  margin-top: 18px;
  margin-bottom: 0;
}
.result-registered-uids-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}
.result-registered-uids-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-weight: 700;
}
.result-registered-uids-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: #fbfcfe;
}
.result-registered-uid {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #cfe1f7;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .04em;
  line-height: 1;
}
.muted {
  color: var(--muted);
}

/* Admit card redesign v3: fixed zones for long names, SUPER SENIOR WOMEN, and up to 6 events. */
.admit-card-v3 {
  width: 1080px;
  height: 1920px;
  position: relative;
  display: block;
  overflow: hidden;
  background:
    radial-gradient(circle at 88px 132px, rgba(255, 217, 102, .18) 0 72px, transparent 74px),
    linear-gradient(180deg, #073f39 0 205px, #effaf7 205px 100%);
  color: #10201d;
  border: 0;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
}
.admit-card-v3::before {
  content: "";
  position: absolute;
  top: 136px;
  left: -80px;
  right: -80px;
  height: 106px;
  z-index: 0;
  background: #ffd966;
  border-radius: 0 0 50% 50%;
  transform: rotate(-2deg);
}
.admit-card-v3::after {
  content: "";
  position: absolute;
  top: 150px;
  left: -80px;
  right: -80px;
  height: 118px;
  z-index: 0;
  background: #effaf7;
  border-radius: 0 0 50% 50%;
  transform: rotate(-2deg);
}
.admit-v3-header,
.admit-v3-hero,
.admit-v3-info,
.admit-v3-events,
.admit-v3-footer {
  position: absolute;
  z-index: 2;
  box-sizing: border-box;
}
.admit-v3-header {
  top: 0;
  left: 0;
  right: 0;
  height: 205px;
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr) 86px;
  gap: 26px;
  align-items: center;
  padding: 40px 58px 42px;
  color: #fff;
}
.admit-v3-logo {
  width: 118px;
  height: 118px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 16px 34px rgba(0,0,0,.18);
}
.admit-v3-logo img {
  max-width: 96px;
  max-height: 96px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.admit-v3-logo span {
  color: #00796b;
  font-size: 64px;
  font-weight: 950;
}
.admit-v3-title {
  min-width: 0;
  text-align: center;
}
.admit-v3-title strong {
  display: block;
  font-size: 50px;
  line-height: 1.02;
  letter-spacing: .02em;
  font-weight: 950;
  color: #fff;
}
.admit-v3-title span {
  display: block;
  margin-top: 10px;
  color: #ffd966;
  font-size: 36px;
  line-height: 1.05;
  font-weight: 950;
}
.admit-v3-mini-badge {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border: 4px solid rgba(255,217,102,.92);
  border-radius: 50%;
  color: #ffd966;
  font-size: 28px;
  font-weight: 950;
  letter-spacing: .04em;
}
.admit-v3-hero {
  top: 205px;
  left: 48px;
  right: 48px;
  height: 550px;
  display: grid;
  grid-template-columns: 392px minmax(0, 1fr);
  gap: 82px;
  align-items: center;
  padding: 31px 36px;
  border-radius: 28px;
  background: #fff;
  border: 2px solid #9fd6ce;
  box-shadow: 0 18px 38px rgba(0, 69, 61, .1);
}
.admit-v3-photo {
  width: 392px;
  height: 504px;
  border-radius: 26px;
  overflow: hidden;
  background: #e7f0f4;
  border: 2px solid #9fd6ce;
}
.admit-v3-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.admit-v3-qr-panel {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 22px;
  min-width: 0;
}
.admit-v3-qr {
  width: 414px;
  height: 414px;
  display: grid;
  place-items: center;
  padding: 30px;
  box-sizing: border-box;
  border-radius: 28px;
  background: #fff;
  border: 5px solid #073f39;
}
.admit-v3-qr img,
.admit-v3-qr canvas {
  width: 350px !important;
  height: 350px !important;
}
.admit-v3-qr-panel > strong {
  display: block;
  width: 414px;
  padding: 12px 18px;
  box-sizing: border-box;
  border-radius: 12px;
  background: #073f39;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  font-weight: 950;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.admit-v3-info {
  top: 790px;
  left: 54px;
  right: 54px;
  height: 390px;
  display: grid;
  grid-template-rows: 128px 112px 112px;
  gap: 19px;
}
.admit-v3-field {
  min-width: 0;
  padding: 20px 28px;
  box-sizing: border-box;
  border-radius: 18px;
  background: rgba(255,255,255,.98);
  border: 2px solid #9fd6ce;
  box-shadow: 0 7px 18px rgba(0, 69, 61, .04);
}
.admit-v3-field span {
  display: block;
  margin-bottom: 10px;
  color: #315b55;
  font-size: 19px;
  line-height: 1;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.admit-v3-field strong {
  display: block;
  color: #10201d;
  font-size: 34px;
  line-height: 1.08;
  font-weight: 950;
  text-transform: uppercase;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.admit-v3-name strong {
  min-height: 76px;
  font-size: 36px;
  line-height: 1.08;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.admit-v3-association strong {
  font-size: 33px;
  line-height: 1.06;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.admit-v3-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 42px;
  min-width: 0;
}
.admit-v3-category strong,
.admit-v3-whatsapp strong {
  font-size: 31px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.admit-v3-events {
  top: 1218px;
  left: 54px;
  right: 54px;
  height: 410px;
  padding: 26px 30px 28px;
  border-radius: 28px;
  background: #fff;
  border: 4px solid #00796b;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(0, 69, 61, .08);
}
.admit-v3-events h3 {
  margin: 0 0 18px;
  color: #00796b;
  font-size: 30px;
  line-height: 1;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.admit-v3-event-list {
  display: grid;
  gap: 9px;
  min-height: 0;
}
.admit-v3-event-list div {
  min-width: 0;
  min-height: 42px;
  color: #10201d;
  font-size: 30px;
  line-height: 1.16;
  font-weight: 950;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admit-v3-events.compact .admit-v3-event-list {
  gap: 8px;
}
.admit-v3-events.compact .admit-v3-event-list div {
  min-height: 39px;
  font-size: 28px;
  line-height: 1.12;
}
.admit-v3-footer {
  left: 0;
  right: 0;
  bottom: 0;
  height: 260px;
  display: grid;
  grid-template-rows: 40px 150px 34px;
  gap: 0;
  align-items: center;
  justify-items: center;
  padding: 16px 60px 12px;
  background:
    radial-gradient(circle at 12% 108%, rgba(255,217,102,.34) 0 82px, transparent 84px),
    radial-gradient(circle at 88% -10%, rgba(255,217,102,.26) 0 96px, transparent 98px),
    #073f39;
  color: #fff;
  text-align: center;
}
.admit-v3-footer span {
  color: #fff;
  font-size: 32px;
  line-height: 1;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .07em;
}
.admit-v3-footer strong {
  display: block;
  color: #ffd966;
  font-size: 138px;
  line-height: .92;
  font-weight: 950;
  letter-spacing: .02em;
}
.admit-v3-footer small {
  color: rgba(255,255,255,.72);
  font-size: 24px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: .03em;
}

/* v1.1.2 schedule capacity, conflict UID side panel, and manual builder. */
.schedule-capacity-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 14px 0;
}
.schedule-capacity-card {
  display: grid;
  gap: 6px;
  min-height: 118px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}
.schedule-capacity-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.schedule-capacity-card strong {
  font-size: 32px;
  line-height: 1;
  font-weight: 950;
}
.schedule-capacity-card small {
  color: var(--muted);
  font-weight: 750;
  line-height: 1.35;
}
.schedule-capacity-card.primary {
  background: #0f766e;
  color: #fff;
  border-color: #0f766e;
}
.schedule-capacity-card.primary span,
.schedule-capacity-card.primary small {
  color: rgba(255,255,255,.84);
}
.schedule-capacity-card.ok {
  border-color: #86efac;
  background: #f0fdf4;
}
.schedule-capacity-card.warning {
  border-color: #f2c94c;
  background: #fffbeb;
}
.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-weight: 850;
}
.inline-check input {
  width: auto;
  min-height: auto;
}
.schedule-output-grid {
  display: grid;
  gap: 16px;
}
.schedule-output-grid.with-panel {
  grid-template-columns: minmax(0, 1fr) 390px;
  align-items: start;
}
.schedule-side-panel {
  order: 2;
  position: sticky;
  top: 86px;
  max-height: calc(100vh - 110px);
  overflow: auto;
  margin: 0;
}
.schedule-side-panel h3 {
  margin: 0 0 4px;
  font-size: 18px;
}
.schedule-side-panel p {
  margin: 0 0 12px;
  color: var(--muted);
  font-weight: 750;
}
.schedule-side-item {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  margin-bottom: 10px;
}
.schedule-side-item strong {
  line-height: 1.25;
}
.schedule-side-item small {
  color: var(--muted);
  font-weight: 750;
}
.schedule-side-item.conflict {
  border-color: #fecaca;
  background: #fff7f7;
}
.schedule-side-item.chance-to-conflict {
  border-color: #f2c94c;
  background: #fffbeb;
}
.schedule-side-item.conflict-managed {
  border-color: #bae6fd;
  background: #f0f9ff;
}
.schedule-uid-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.schedule-uid-chips span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}
.manual-schedule-form select,
.manual-schedule-form input {
  min-height: 44px;
}

/* v1.1.2 mobile-only attendance scanner. */
.attendance-desktop-blocker {
  display: none;
}
.mobile-only-attendance-page {
  background: radial-gradient(circle at top, #e7f7f4 0, #f8fafc 48%, #eef3f8 100%);
}
.mobile-only-attendance-page .attendance-scan-shell {
  padding: max(12px, env(safe-area-inset-top)) 10px max(16px, env(safe-area-inset-bottom));
}
.mobile-only-attendance-page .attendance-scan-card {
  width: min(430px, 100%);
  min-height: calc(100dvh - 28px);
  gap: 12px;
  padding: 12px;
  border-radius: 24px;
  border: 1px solid rgba(15,118,110,.18);
  box-shadow: 0 18px 38px rgba(15, 23, 42, .14);
}
.mobile-only-attendance-page .attendance-scan-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  padding: 14px;
  border-radius: 20px;
  background: linear-gradient(135deg, #064e3b, #0f766e);
}
.mobile-only-attendance-page .attendance-scan-head span {
  font-size: 17px;
  line-height: 1.1;
}
.mobile-only-attendance-page .attendance-scan-head strong {
  grid-row: span 2;
  min-height: 44px;
  padding: 8px 14px;
  font-size: 16px;
}
.mobile-only-attendance-page .attendance-scan-head small {
  color: rgba(255,255,255,.82);
  font-weight: 850;
}
.mobile-only-attendance-page .attendance-mode-tabs {
  gap: 6px;
}
.mobile-only-attendance-page .attendance-mode-tabs button {
  min-height: 44px;
  border-radius: 14px;
  font-size: 12px;
}
.mobile-only-attendance-page .attendance-scan-button,
.mobile-only-attendance-page .attendance-mark-button {
  min-height: 60px;
  border-radius: 18px;
  font-size: 17px;
  letter-spacing: .02em;
}
.mobile-only-attendance-page .attendance-cancel-scan {
  min-height: 48px;
  border-radius: 16px;
}
.mobile-only-attendance-page .attendance-qr-reader {
  width: 100%;
  min-height: min(360px, calc(100vw - 42px));
  border-radius: 20px;
  overflow: hidden;
}
.mobile-only-attendance-page .attendance-uid-block input {
  min-height: 62px;
  border-radius: 18px;
  font-size: 28px;
  background: #fff;
}
.mobile-only-attendance-page .attendance-preview-card {
  min-height: 0;
}
.mobile-only-attendance-page .attendance-participant-empty {
  min-height: 150px;
  border-radius: 18px;
}
.mobile-only-attendance-page .attendance-participant-card {
  gap: 10px;
}
.mobile-only-attendance-page .attendance-person {
  grid-template-columns: 84px 1fr;
  gap: 10px;
  align-items: center;
}
.mobile-only-attendance-page .attendance-photo {
  width: 84px;
  height: 108px;
  border-radius: 14px;
}
.mobile-only-attendance-page .attendance-person h3 {
  margin: 5px 0 3px;
  font-size: 20px;
  line-height: 1.05;
}
.mobile-only-attendance-page .attendance-person p {
  font-size: 12px;
  line-height: 1.25;
}
.mobile-only-attendance-page .attendance-events {
  padding: 10px;
  border-radius: 14px;
}
.mobile-only-attendance-page .attendance-events p {
  max-height: 88px;
  overflow: auto;
  font-size: 13px;
  line-height: 1.35;
}
.mobile-only-attendance-page .attendance-status-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.mobile-only-attendance-page .attendance-status-row span {
  min-height: 38px;
  border-radius: 12px;
  font-size: 11px;
  text-align: center;
}
.mobile-only-attendance-page .attendance-active-note {
  border-radius: 14px;
}
.mobile-only-attendance-page .attendance-bottom-actions {
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: auto;
}
.mobile-only-attendance-page .footer {
  display: none;
}
@media (min-width: 821px) {
  .mobile-only-attendance-page .attendance-scan-shell {
    min-height: 100vh;
    padding: 32px;
    align-items: center;
  }
  .mobile-only-attendance-page .attendance-scan-card {
    display: none;
  }
  .mobile-only-attendance-page .attendance-desktop-blocker {
    width: min(560px, 100%);
    display: grid;
    gap: 12px;
    padding: 28px;
    border-radius: 24px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    text-align: center;
  }
  .attendance-desktop-blocker strong {
    color: #0f766e;
    font-size: 28px;
    line-height: 1.1;
  }
  .attendance-desktop-blocker p {
    margin: 0;
    color: var(--muted);
    font-weight: 800;
  }
}

/* WhatsApp Message Center - v1.1.3 */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.whatsapp-layout { align-items: start; }
.whatsapp-template-form textarea,
.whatsapp-settings-form textarea { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.whatsapp-variable-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.whatsapp-variable-list code,
.whatsapp-recipient-table code,
.whatsapp-log-table code {
  display: inline-block;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 12px;
}
.checkline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 700;
}
.checkline input { width: auto; min-height: auto; }
.whatsapp-message-preview,
.whatsapp-response-preview {
  max-width: 520px;
  max-height: 280px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: #182230;
  font-size: 12px;
  line-height: 1.45;
}
.whatsapp-message-preview.small,
.whatsapp-response-preview.small {
  max-width: 360px;
  max-height: 160px;
  font-size: 11px;
}
.whatsapp-filters { align-items: end; }
.whatsapp-recipient-table th,
.whatsapp-recipient-table td,
.whatsapp-log-table th,
.whatsapp-log-table td { vertical-align: top; }
.whatsapp-settings-form .card { min-height: 100%; }

/* v1.1.4 registration verification workflow */
.soft-card {
  background: rgba(248, 250, 252, 0.72);
  border-style: dashed;
}
.workflow-note {
  min-height: 96px;
}
.btn.gold {
  background: #b7791f;
  color: #fff;
}

/* v1.1.5 hotfix: live submitted-result warning */
.result-live-submitted-warning {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #fecaca;
  border-left: 5px solid #dc2626;
  border-radius: 12px;
  background: #fef2f2;
  color: #7f1d1d;
}
.result-live-submitted-warning[hidden] { display: none; }
.result-live-submitted-warning strong { color: #991b1b; }
.result-live-submitted-warning .btn { margin-left: auto; }

/* v1.1.8 navigation/header visibility refinements. */
.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #eefbf7;
  color: #0f766e;
  border: 1px solid #b9e7dd;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}
.footer {
  display: grid;
  gap: 5px;
  justify-items: center;
}
.portal-version {
  display: block;
  color: #8a98a8;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .03em;
}
.admit-v3-title span {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 20px 9px;
  border-radius: 999px;
  background: #fff7dd;
  color: #073f39;
  border: 2px solid rgba(255,255,255,.78);
  box-shadow: 0 8px 22px rgba(0,0,0,.15);
}
.admit-page .public-feature-wrap,
.admit-page .wrap {
  max-width: min(1600px, calc(100vw - 42px));
}
@media (min-width: 960px) {
  .admit-page .admit-output {
    grid-template-columns: minmax(0, 760px) minmax(280px, 360px);
    align-items: start;
    justify-content: center;
    column-gap: 30px;
  }
  .admit-page .admit-card-viewport {
    width: min(720px, 100%);
    padding: 12px;
    border-radius: 26px;
    background: #ffffff;
    border: 1px solid #dfe7ef;
    box-shadow: 0 20px 54px rgba(15,23,42,.14);
  }
  .admit-page .admit-download-actions {
    position: sticky;
    top: 92px;
    width: 100%;
    padding: 18px;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid #dfe7ef;
    box-shadow: 0 14px 34px rgba(15,23,42,.1);
  }
  .admit-page .admit-download-actions::before {
    content: "Desktop preview";
    display: block;
    margin-bottom: 10px;
    color: #0f766e;
    font-size: 13px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .06em;
  }
  .admit-page .admit-download-actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 52px;
  }
}
@media (min-width: 1500px) {
  .admit-page .admit-card-viewport {
    width: 780px;
  }
}
@media (min-width: 1180px) {
  body.attendance-view-page {
    background: linear-gradient(135deg, #edf7f5 0%, #f7fafc 48%, #eef3f8 100%);
  }
  .attendance-view-wrap {
    max-width: min(1880px, calc(100vw - 52px));
  }
  .attendance-view-title {
    padding: 20px 24px;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid #d9e7e4;
    box-shadow: 0 14px 34px rgba(15,23,42,.08);
  }
  .attendance-search-card,
  .attendance-edit-card,
  .attendance-table-card,
  .attendance-result-card {
    border-radius: 22px;
    border-color: #d9e7e4;
    box-shadow: 0 16px 38px rgba(15,23,42,.08);
  }
  .attendance-result-card {
    display: grid;
    grid-template-columns: minmax(260px, .85fr) minmax(360px, 1.15fr) minmax(460px, 2fr);
    gap: 18px;
    align-items: stretch;
  }
  .attendance-result-main {
    align-content: center;
  }
  .attendance-result-days {
    align-content: center;
  }
  .attendance-result-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .attendance-events-detail {
    grid-column: 1 / -1;
  }
  .attendance-table-card .table-wrap {
    max-height: calc(100vh - 340px);
    overflow: auto;
  }
  .attendance-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f8fafc;
  }
  .attendance-table {
    min-width: 1760px;
  }
  .attendance-table td:nth-child(5) {
    min-width: 560px;
    max-width: 760px;
  }
}

/* v1.1.9 attendance view UI refresh + master-only edit visibility */
body.attendance-view-page {
  background:
    radial-gradient(circle at top left, rgba(15,118,110,.16), transparent 34%),
    linear-gradient(135deg, #f0fdfa 0%, #f8fafc 44%, #eef2ff 100%);
  min-height: 100vh;
}
.attendance-view-page .footer {
  margin-top: 28px;
}
.attendance-view-hero {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(135deg, #064e3b 0%, #0f766e 54%, #fbbf24 54%, #f59e0b 100%);
  color: #fff;
  box-shadow: 0 22px 46px rgba(15,23,42,.18);
  overflow: hidden;
  position: relative;
}
.attendance-view-hero::after {
  content: '';
  position: absolute;
  right: -80px;
  bottom: -120px;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
}
.attendance-view-hero-copy,
.attendance-view-hero-actions {
  position: relative;
  z-index: 1;
}
.attendance-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  color: #0f766e;
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.attendance-view-hero .attendance-kicker {
  color: #fef3c7;
}
.attendance-view-hero h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(30px, 9vw, 52px);
  line-height: .95;
  letter-spacing: -.045em;
}
.attendance-view-hero p {
  max-width: 740px;
  margin: 10px 0 0;
  color: rgba(255,255,255,.9);
  font-weight: 760;
  line-height: 1.5;
}
.attendance-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.attendance-hero-badges span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.32);
  color: #fff;
  font-size: 12px;
  font-weight: 950;
}
.attendance-view-hero-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-self: end;
}
.attendance-view-hero-actions .btn {
  min-height: 48px;
  justify-content: center;
  border-radius: 14px;
  font-weight: 1000;
}
.attendance-search-head,
.attendance-table-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.attendance-search-head h2,
.attendance-table-head h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -.02em;
}
.attendance-edit-lock-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  font-size: 11px;
  font-weight: 1000;
  text-transform: uppercase;
  white-space: nowrap;
}
.attendance-edit-lock-badge.open {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}
.attendance-view-page .attendance-search-card,
.attendance-view-page .attendance-edit-card,
.attendance-view-page .attendance-table-card,
.attendance-view-page .attendance-result-card {
  border: 1px solid rgba(15,118,110,.16);
  box-shadow: 0 18px 38px rgba(15,23,42,.08);
}
.attendance-section-label {
  color: #334155;
  font-size: 13px;
  font-weight: 1000;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.attendance-result-card-hero {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}
.attendance-result-card-hero .attendance-result-main strong {
  font-size: clamp(20px, 6vw, 34px);
  line-height: 1.05;
  letter-spacing: -.03em;
}
.attendance-result-card-hero .attendance-result-days span {
  position: relative;
  min-height: 48px;
  padding-left: 18px;
  box-shadow: inset 0 -1px 0 rgba(255,255,255,.5);
}
.attendance-result-card-hero .attendance-result-days span::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -3.5px;
  border-radius: 999px;
  background: currentColor;
}
.attendance-result-details div {
  border: 1px solid rgba(15,118,110,.12);
  background: #ffffff;
}
.attendance-edit-locked-card {
  background: linear-gradient(135deg, #fffbeb 0%, #fff 80%);
  border-color: #fde68a !important;
}
.attendance-master-edit-card {
  background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 80%);
}
.attendance-view-table-scroll {
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #fff;
}
.attendance-view-page .attendance-table th {
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.attendance-view-page .attendance-table tbody tr:hover {
  background: #f0fdfa;
}

@media (max-width: 639px) {
  .attendance-view-wrap {
    padding: 10px 8px 22px;
  }
  .attendance-view-hero {
    padding: 16px;
    border-radius: 20px;
  }
  .attendance-view-hero-actions {
    grid-template-columns: 1fr 1fr;
  }
  .attendance-search-head,
  .attendance-table-head {
    flex-direction: column;
    align-items: stretch;
  }
  .attendance-edit-lock-badge,
  .attendance-table-head .badge {
    width: fit-content;
  }
}

@media (min-width: 960px) {
  .attendance-view-hero {
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: end;
    min-height: 210px;
    padding: 30px;
  }
  .attendance-view-hero-actions {
    grid-template-columns: 1fr;
  }
  .attendance-view-page .attendance-search-card {
    max-width: none;
  }
  .attendance-view-page .attendance-uid-search {
    grid-template-columns: 360px minmax(280px, 1fr) 260px;
  }
  .attendance-result-card-hero {
    grid-template-columns: minmax(280px, .8fr) minmax(340px, .85fr) minmax(520px, 1.35fr);
    min-height: 160px;
  }
  .attendance-master-edit-card form.grid-4 {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }
  .attendance-view-table-scroll {
    max-height: calc(100vh - 360px);
  }
}

@media (min-width: 1500px) {
  .attendance-view-wrap {
    max-width: min(1900px, calc(100vw - 36px));
  }
  .attendance-view-hero {
    min-height: 230px;
  }
  .attendance-view-page .attendance-table {
    min-width: 1760px;
  }
}
