/* =========================================================================
 * TOURNAMENT REGISTRATION — styles for the admin "Create Tournament" tab,
 * the public-site popup, and the registration page (register.html).
 * Loaded after style.css and built only from its variables (--navy,
 * --yellow, --surface, --border...), so light/dark mode just works.
 * ========================================================================= */

/* ------------------------------ admin tab ------------------------------ */

.reg-tab-intro {
  color: var(--text-muted);
  font-size: .85rem;
  line-height: 1.5;
  margin: -8px 0 18px
}

.reg-tab-intro strong {
  color: var(--text-dark)
}

.reg-events-table {
  min-width: 940px
}

.reg-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
  margin: 0 auto;
  background: var(--bg);
  border: 1px solid var(--border)
}

.reg-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--royal-light)
}

.reg-name {
  font-weight: 700;
  color: var(--text-dark);
  font-size: .92rem
}

.reg-meta {
  color: var(--text-muted);
  font-size: .78rem;
  margin-top: 2px
}

.reg-link-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px
}

.reg-link {
  font-size: .76rem;
  font-weight: 600;
  color: var(--royal-light);
  background: rgba(47, 111, 214, .08);
  padding: 3px 8px;
  border-radius: 6px;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.reg-link:hover {
  text-decoration: underline
}

.reg-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 190px
}

.reg-teams-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-dark);
  font-weight: 600;
  font-size: .8rem;
  white-space: nowrap;
  transition: border-color .2s ease, color .2s ease
}

.reg-teams-btn:hover {
  border-color: var(--royal-light);
  color: var(--royal-light)
}

.reg-teams-btn .material-icons {
  font-size: 17px
}

/* popup on/off switch */
.reg-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--text-muted)
}

.reg-switch-track {
  position: relative;
  width: 40px;
  height: 22px;
  border-radius: 100px;
  background: #c5d3e8;
  transition: background .2s ease
}

.reg-switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  transition: transform .2s ease
}

.reg-switch.on {
  color: #15803d
}

.reg-switch.on .reg-switch-track {
  background: #16a34a
}

.reg-switch.on .reg-switch-thumb {
  transform: translateX(18px)
}

.reg-switch-label {
  min-width: 22px;
  text-align: left
}

.reg-cell-note {
  font-size: .7rem;
  color: var(--text-muted);
  margin-top: 4px
}

[data-theme=dark] .reg-switch-track {
  background: rgba(255, 255, 255, .22)
}

[data-theme=dark] .reg-switch.on {
  color: #86efac
}

/* open / closed */
.reg-status-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px
}

.reg-status-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid;
  font-size: .76rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease, border-color .2s ease
}

.reg-status-btn .material-icons {
  font-size: 15px
}

.reg-status-btn.close {
  color: #b91c1c;
  border-color: rgba(185, 28, 28, .35);
  background: rgba(239, 68, 68, .06)
}

.reg-status-btn.close:hover {
  color: #fff;
  background: #b91c1c;
  border-color: #b91c1c
}

.reg-status-btn.reopen {
  color: #15803d;
  border-color: rgba(21, 128, 61, .35);
  background: rgba(34, 197, 94, .06)
}

.reg-status-btn.reopen:hover {
  color: #fff;
  background: #15803d;
  border-color: #15803d
}

[data-theme=dark] .reg-status-btn.close {
  color: #fca5a5
}

[data-theme=dark] .reg-status-btn.reopen {
  color: #86efac
}

/* create / edit modal */
.reg-form-modal {
  max-width: 760px
}

.reg-muted {
  color: var(--text-muted);
  font-weight: 400
}

.reg-drop-zone {
  min-height: 160px
}

.reg-drop-preview {
  display: block;
  max-width: calc(100% - 20px);
  max-height: 180px;
  margin: 10px auto;
  border-radius: 8px;
  object-fit: contain
}

.reg-remove-img {
  align-self: flex-start;
  color: #b91c1c;
  font-size: .78rem;
  font-weight: 600;
  padding: 2px 0
}

.reg-remove-img:hover {
  text-decoration: underline
}

.reg-hint {
  font-size: .75rem;
  color: var(--text-muted);
  line-height: 1.45
}

.reg-slug-input {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  transition: border-color .2s ease
}

.reg-slug-input:focus-within {
  border-color: var(--royal-light)
}

.reg-slug-input span {
  display: flex;
  align-items: center;
  padding: 0 2px 0 12px;
  background: var(--bg);
  color: var(--text-muted);
  font-size: .85rem;
  white-space: nowrap
}

.form-field .reg-slug-input input {
  flex: 1;
  min-width: 0;
  border: 0;
  border-radius: 0;
  padding: 10px 12px 10px 4px;
  font-weight: 600;
  background: transparent
}

.form-field .reg-slug-input input:disabled {
  color: var(--text-muted)
}

.form-field .reg-slug-input input:focus-visible {
  outline: 0
}

.btn-save:disabled {
  opacity: .6;
  cursor: not-allowed
}

.btn-save.btn-danger {
  background: #b91c1c
}

.btn-save.btn-danger:hover {
  background: #991b1b
}

/* double-confirmation dialog */
.reg-confirm-modal {
  max-width: 440px;
  text-align: center
}

.reg-confirm-modal .modal-body {
  padding: 30px 28px 24px
}

.reg-confirm-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(47, 111, 214, .1);
  color: var(--royal-light)
}

.reg-confirm-icon .material-icons {
  font-size: 28px
}

.reg-confirm-icon.danger {
  background: rgba(239, 68, 68, .12);
  color: #b91c1c
}

.reg-confirm-icon.final {
  background: rgba(255, 200, 52, .22);
  color: #8a6d00
}

.reg-confirm-step {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px
}

.reg-confirm-modal h3 {
  color: var(--text-dark);
  font-size: 1.15rem;
  margin-bottom: 8px
}

.reg-confirm-modal p {
  color: var(--text-muted);
  font-size: .88rem;
  line-height: 1.55
}

.reg-confirm-modal p strong {
  color: var(--text-dark)
}

.reg-confirm-modal .form-actions {
  justify-content: center;
  margin-top: 22px
}

/* registered teams modal */
.reg-entries-sub {
  color: var(--text-muted);
  font-size: .85rem;
  margin-top: 2px
}

.reg-entries-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px
}

.reg-entries-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px
}

.reg-summary-stat {
  color: var(--text-muted);
  font-size: .85rem;
  margin-right: 6px
}

.reg-summary-stat strong {
  color: var(--text-dark);
  font-size: 1.05rem
}

.reg-entries-actions {
  display: flex;
  gap: 8px
}

.reg-entries-actions .material-icons {
  font-size: 18px;
  vertical-align: -4px
}

.reg-entry {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 14px;
  background: var(--surface)
}

.reg-entry-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px
}

.reg-entry-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0
}

.reg-entry-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-dark)
}

.reg-entry-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: .78rem
}

.reg-entry-table {
  box-shadow: none;
  border: 1px solid var(--border)
}

.reg-entry-table th {
  padding: 8px 12px;
  font-size: .72rem
}

.reg-entry-table td {
  padding: 8px 12px;
  font-size: .85rem
}

.reg-entry-manager {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin: -2px 0 10px;
  color: var(--text-muted);
  font-size: .82rem
}

.reg-entry-manager .material-icons {
  font-size: 17px;
  margin-right: 2px
}

.reg-entry-manager strong {
  color: var(--text-dark);
  font-weight: 600
}

.reg-entry-manager a {
  color: var(--royal-light);
  font-weight: 600
}

.reg-entry-manager-none {
  font-style: italic
}

/* edit team modal */
.reg-entry-form-modal .reg-player-row .form-field {
  margin-bottom: 0
}

.reg-edit-players-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 6px 0 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border)
}

.reg-edit-players-title h4 {
  color: var(--text-dark);
  font-size: 1rem
}

.reg-edit-players-title span {
  color: var(--text-muted);
  font-size: .82rem
}

/* print out (PDF) team picker */
.reg-print-modal {
  max-width: 560px
}

.reg-print-search {
  width: 100%
}

.reg-print-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 14px 2px 8px
}

.reg-print-all {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text-dark);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer
}

.reg-print-count {
  color: var(--text-muted);
  font-size: .8rem
}

.reg-print-all input,
.reg-print-item input {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--royal-light);
  cursor: pointer
}

.reg-print-list {
  max-height: min(46vh, 380px);
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 12px
}

.reg-print-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .15s ease
}

.reg-print-item:last-child {
  border-bottom: 0
}

.reg-print-item:hover {
  background: rgba(47, 111, 214, .06)
}

.reg-print-item-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column
}

.reg-print-item-name {
  color: var(--text-dark);
  font-weight: 600;
  font-size: .9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.reg-print-item-meta {
  color: var(--text-muted);
  font-size: .76rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.reg-print-empty {
  padding: 26px 14px;
  text-align: center;
  color: var(--text-muted);
  font-size: .88rem
}

.reg-print-modal .form-actions .material-icons {
  font-size: 18px;
  vertical-align: -4px
}

/* ---------------------- public-site popup ------------------------------ */

.reg-popup-root {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1500;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  pointer-events: none
}

.reg-popup-root > * {
  pointer-events: auto
}

.reg-popup-launcher {
  position: relative;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--navy);
  box-shadow: 0 10px 28px rgba(11, 31, 58, .35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s ease
}

.reg-popup-launcher:hover {
  transform: translateY(-2px) scale(1.04)
}

.reg-popup-launcher::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  animation: regPulse 2.4s ease-out infinite
}

.reg-popup-launcher .material-icons {
  position: absolute;
  font-size: 30px;
  transition: opacity .2s ease, transform .25s ease
}

.reg-popup-ico-close {
  opacity: 0;
  transform: rotate(-90deg)
}

.reg-popup-root.open .reg-popup-ico-open {
  opacity: 0;
  transform: rotate(90deg)
}

.reg-popup-root.open .reg-popup-ico-close {
  opacity: 1;
  transform: none
}

.reg-popup-root.open .reg-popup-launcher::after {
  animation: none
}

.reg-popup-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 100px;
  border: 2px solid #fff;
  background: #dc2626;
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center
}

.reg-popup-root.open .reg-popup-badge {
  display: none
}

@keyframes regPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 200, 52, .55)
  }

  70% {
    box-shadow: 0 0 0 16px rgba(255, 200, 52, 0)
  }

  100% {
    box-shadow: 0 0 0 0 rgba(255, 200, 52, 0)
  }
}

.reg-popup-teaser {
  position: absolute;
  right: 76px;
  bottom: 13px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dark);
  box-shadow: var(--shadow-md);
  font-size: .85rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  opacity: 0;
  transform: translateX(8px);
  pointer-events: none !important;
  transition: opacity .3s ease, transform .3s ease
}

.reg-popup-teaser.show {
  opacity: 1;
  transform: none;
  pointer-events: auto !important
}

.reg-popup-panel {
  width: 360px;
  max-width: calc(100vw - 32px);
  max-height: min(580px, calc(100vh - 190px)); /* stays clear of the 72px sticky navbar */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  transform-origin: bottom right;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(.96);
  transition: opacity .22s ease, transform .22s ease, visibility .22s
}

.reg-popup-root.open .reg-popup-panel {
  opacity: 1;
  visibility: visible;
  transform: none
}

.reg-popup-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--navy);
  color: #fff;
  flex-shrink: 0
}

.reg-popup-head .crest-logo {
  width: 34px;
  height: 34px
}

.reg-popup-head-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column
}

.reg-popup-head-text strong {
  font-family: var(--font-head);
  font-size: .98rem
}

.reg-popup-head-text span {
  font-size: .75rem;
  opacity: .75
}

.reg-popup-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(255, 255, 255, .1);
  flex-shrink: 0
}

.reg-popup-close:hover {
  background: rgba(255, 255, 255, .2)
}

.reg-popup-body {
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--bg)
}

.reg-popup-card {
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0
}

.reg-popup-img {
  display: block;
  background: var(--navy)
}

.reg-popup-img img {
  width: 100%;
  /* shrinks on short screens so the Register button stays in view */
  max-height: clamp(140px, calc(100vh - 470px), 300px);
  object-fit: contain;
  margin: 0 auto
}

.reg-popup-info {
  padding: 12px 14px 14px
}

.reg-popup-info h4 {
  color: var(--text-dark);
  font-size: 1rem;
  line-height: 1.3
}

.reg-popup-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: .78rem
}

.reg-popup-meta .material-icons {
  font-size: 15px;
  color: var(--royal-light)
}

.reg-popup-cta {
  width: 100%;
  justify-content: center;
  margin-top: 10px;
  padding: 11px 16px;
  font-size: .88rem
}

@media (max-width: 600px) {
  .reg-popup-root {
    right: 16px;
    bottom: 16px
  }

  .reg-popup-launcher {
    width: 56px;
    height: 56px
  }

  .reg-popup-teaser {
    right: 68px;
    bottom: 9px;
    white-space: normal;
    width: max-content;
    max-width: 190px
  }
}

@media (prefers-reduced-motion: reduce) {
  .reg-popup-launcher::after {
    animation: none
  }

  .reg-popup-panel,
  .reg-popup-teaser {
    transition: none
  }
}

/* -------------------- registration page (register.html) ----------------- */

.reg-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column
}

.reg-page main {
  flex: 1
}

.reg-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 10px;
  color: rgba(255, 255, 255, .85);
  font-weight: 500;
  font-size: .9rem;
  transition: background .2s ease, color .2s ease
}

.reg-nav-link:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff
}

.reg-nav-link .material-icons {
  font-size: 18px
}

.reg-hero {
  padding: 46px 0 78px
}

.reg-hero h1 {
  font-size: 2.2rem;
  line-height: 1.2;
  margin: 10px auto 10px;
  max-width: 820px
}

.reg-hero-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 20px;
  color: rgba(255, 255, 255, .82);
  font-size: .92rem
}

.reg-hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px
}

.reg-hero-meta .material-icons {
  font-size: 18px;
  color: var(--yellow)
}

/* location linked to Google Maps */
.reg-hero-meta .reg-hero-map {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(255, 200, 52, .6);
  text-underline-offset: 3px
}

.reg-hero-meta .reg-hero-map:hover {
  color: #fff;
  text-decoration-color: var(--yellow)
}

.reg-map-link {
  display: flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  margin-top: 4px;
  color: var(--royal-light);
  font-size: .82rem;
  font-weight: 700
}

.reg-info-item .reg-map-link .material-icons {
  font-size: 17px
}

.reg-map-link:hover {
  text-decoration: underline
}

/* links inside the description (e.g. a WhatsApp link) */
.reg-desc a {
  color: var(--royal-light);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px
}

/* admin tournaments list: small map icon after the location */
.reg-map-icon {
  display: inline-flex;
  vertical-align: -3px;
  color: var(--royal-light)
}

.reg-map-icon .material-icons {
  font-size: 16px
}

.reg-main {
  position: relative;
  z-index: 1;
  margin-top: -44px;
  padding-bottom: 56px;
  width: 100%
}

.reg-layout {
  display: grid;
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  gap: 24px;
  align-items: start
}

.reg-layout.no-aside {
  grid-template-columns: minmax(0, 860px);
  justify-content: center
}

.reg-aside {
  display: flex;
  flex-direction: column;
  gap: 18px
}

.reg-poster {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--navy);
  box-shadow: var(--shadow-md);
  cursor: zoom-in
}

.reg-poster img {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  margin: 0 auto
}

.reg-info-list {
  display: flex;
  flex-direction: column;
  gap: 14px
}

.reg-info-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text-dark);
  font-size: .9rem;
  font-weight: 600
}

.reg-info-item .material-icons {
  font-size: 20px;
  color: var(--royal-light)
}

.reg-info-item small {
  display: block;
  margin-bottom: 2px;
  color: var(--text-muted);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase
}

.reg-info-item .category-tags {
  margin: 4px 0 0
}

.reg-desc {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: .88rem;
  line-height: 1.6;
  white-space: pre-line;
  overflow-wrap: anywhere
}

.reg-step {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px
}

.reg-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  color: var(--yellow);
  font-family: var(--font-head);
  font-size: .85rem;
  font-weight: 800
}

.reg-step h3 {
  margin: 0 !important;
  color: var(--text-dark);
  font-size: 1.05rem
}

.reg-step-aside {
  margin-left: auto;
  color: var(--text-muted);
  font-size: .8rem;
  font-weight: 600
}

.reg-divider {
  height: 1px;
  margin: 26px 0 22px;
  background: var(--border)
}

.reg-page .form-field input,
.reg-page .form-field select,
.reg-page .form-field textarea {
  background: var(--surface);
  color: var(--text-dark);
  font-size: .95rem;
  padding: 11px 12px
}

.reg-page .form-field input::placeholder {
  color: var(--text-muted);
  opacity: .65
}

.reg-req {
  color: #dc2626
}

.reg-page .form-field .reg-invalid {
  border-color: #dc2626;
  background: rgba(239, 68, 68, .05)
}

.reg-players-head,
.reg-player-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1.7fr) minmax(0, 1.25fr) 104px 34px;
  gap: 10px;
  align-items: center
}

.reg-players-head {
  padding: 0 4px 6px;
  color: var(--text-muted);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase
}

.reg-player-row {
  padding: 5px 4px;
  border-radius: 12px;
  animation: fadeUp .25s ease both
}

.reg-player-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--text-dark);
  font-size: .8rem;
  font-weight: 700
}

.reg-player-row .form-field label {
  display: none
}

.reg-player-row .icon-btn:disabled {
  opacity: .3;
  cursor: not-allowed;
  background: none
}

.reg-add-player {
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  border: 2px dashed var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--royal-light);
  font-size: .9rem;
  font-weight: 700;
  transition: border-color .2s ease, background .2s ease
}

.reg-add-player:hover {
  border-color: var(--royal-light);
  background: rgba(47, 111, 214, .05)
}

.reg-add-player:disabled {
  opacity: .45;
  cursor: not-allowed
}

.reg-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 22px;
  color: var(--text-muted);
  font-size: .85rem;
  line-height: 1.55;
  cursor: pointer
}

.reg-consent input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--navy)
}

.reg-consent.reg-invalid {
  color: #b91c1c
}

.reg-link-btn {
  padding: 0;
  color: var(--royal-light);
  font-size: inherit;
  font-weight: 600;
  text-decoration: underline
}

.reg-error {
  display: none;
  align-items: flex-start;
  gap: 8px;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(239, 68, 68, .08);
  color: #b91c1c;
  font-size: .88rem;
  font-weight: 600;
  line-height: 1.45
}

.reg-error.show {
  display: flex
}

.reg-error .material-icons {
  font-size: 20px
}

[data-theme=dark] .reg-error {
  color: #fca5a5
}

.reg-submit {
  width: 100%;
  justify-content: center;
  margin-top: 18px;
  font-size: 1rem
}

.reg-submit:disabled {
  opacity: .75;
  cursor: wait;
  transform: none
}

.reg-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden
}

.reg-state-card {
  padding: 46px 28px;
  text-align: center
}

.reg-state-icon {
  width: 74px;
  height: 74px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center
}

.reg-state-icon .material-icons {
  font-size: 40px
}

.reg-state-icon.success {
  background: rgba(34, 197, 94, .14);
  color: #15803d
}

.reg-state-icon.closed {
  background: rgba(239, 68, 68, .12);
  color: #b91c1c
}

.reg-state-icon.missing {
  background: rgba(47, 111, 214, .12);
  color: var(--royal-light)
}

.reg-state-card h2 {
  margin-bottom: 8px;
  color: var(--text-dark);
  font-size: 1.45rem
}

.reg-state-card p {
  max-width: 480px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: .92rem;
  line-height: 1.6
}

.reg-state-card p strong {
  color: var(--text-dark)
}

.reg-ref {
  display: inline-block;
  margin-top: 18px;
  padding: 9px 16px;
  border-radius: 10px;
  background: var(--bg);
  color: var(--text-dark);
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .04em
}

.reg-state-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px
}

.reg-state-actions .btn {
  padding: 12px 22px
}

.reg-btn-ghost {
  border: 1.5px solid var(--border);
  color: var(--text-dark)
}

.reg-btn-ghost:hover {
  border-color: var(--royal-light);
  color: var(--royal-light)
}

.reg-skel-hero {
  height: 30px;
  width: 60%;
  margin: 0 auto
}

.reg-privacy-body h4 {
  margin: 16px 0 6px;
  color: var(--text-dark);
  font-size: .95rem
}

.reg-privacy-body h4:first-child {
  margin-top: 0
}

.reg-privacy-body p,
.reg-privacy-body li {
  color: var(--text-muted);
  font-size: .88rem;
  line-height: 1.6
}

.reg-privacy-body ul {
  padding-left: 20px
}

.reg-privacy-body a {
  color: var(--royal-light);
  font-weight: 600
}

@media (max-width: 900px) {
  .reg-layout {
    grid-template-columns: minmax(0, 1fr)
  }

  .reg-poster img {
    max-height: 420px
  }
}

@media (max-width: 640px) {
  .reg-hero {
    padding: 34px 0 70px
  }

  .reg-hero h1 {
    font-size: 1.65rem
  }

  .reg-main .chart-card {
    padding: 20px 16px
  }

  .reg-nav-link span:not(.material-icons) {
    display: none
  }

  .reg-players-head {
    display: none
  }

  .reg-player-row {
    grid-template-columns: minmax(0, 1fr) 96px;
    grid-template-areas: "num remove" "name name" "mykid jersey";
    gap: 10px;
    margin-bottom: 10px;
    padding: 12px;
    background: var(--bg)
  }

  .reg-player-num {
    grid-area: num;
    background: var(--navy);
    color: var(--yellow)
  }

  .reg-player-row .reg-remove {
    grid-area: remove;
    justify-self: end
  }

  .reg-player-row .f-name {
    grid-area: name
  }

  .reg-player-row .f-mykid {
    grid-area: mykid
  }

  .reg-player-row .f-jersey {
    grid-area: jersey
  }

  .reg-player-row .form-field label {
    display: block
  }
}

/* QR code modal (admin) */
.icon-btn.qr:hover {
  color: var(--royal-light)
}

.reg-qr-modal {
  max-width: 720px
}

.reg-qr-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
  align-items: start
}

.reg-qr-preview {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 14px;
  overflow: hidden;
  background: var(--navy);
  box-shadow: var(--shadow-md)
}

.reg-qr-preview canvas {
  display: block;
  width: 100%;
  height: 100%
}

.reg-qr-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  color: #fff
}

.reg-qr-loading .material-icons {
  font-size: 32px
}

.reg-qr-side {
  display: flex;
  flex-direction: column;
  gap: 14px
}

.reg-qr-linkbox {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 8px 8px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--royal-light);
  font-size: .85rem;
  font-weight: 600;
  word-break: break-all
}

.reg-qr-actions {
  display: flex;
  flex-direction: column;
  gap: 10px
}

.reg-qr-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px
}

.reg-qr-actions .material-icons {
  font-size: 19px
}

@media (max-width: 600px) {
  .reg-qr-layout {
    grid-template-columns: minmax(0, 1fr)
  }

  .reg-qr-preview {
    width: 100%;
    max-width: 260px;
    margin: 0 auto
  }
}

/* ---------------- BORANG PENDAFTARAN PEMAIN (register.html) ------------- */
/* The organiser's A4 borang as a sheet of paper people type into. Sizes
   are in --pt, 1/595.3 of the sheet's width, using the measurements of the
   original PDF: on a wide screen this is the paper form scaled, spacing and
   all. Below ~560px wide it switches to a fixed readable size and the
   tables squeeze. Always black on white, in dark mode too: it's paper. */

.borang-intro {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 794px;
  margin: 0 auto 14px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--text-muted);
  font-size: .86rem;
  line-height: 1.5
}

.borang-intro strong {
  color: var(--text-dark)
}

.borang-intro .material-icons {
  font-size: 20px;
  color: var(--royal-light)
}

.borang-sheet {
  container-type: inline-size;
  max-width: 794px;
  margin: 0 auto
}

.borang-paper {
  --pt: calc(100cqw / 595.3);
  --rule: max(1px, calc(.48 * var(--pt)));
  min-height: calc(841.9 * var(--pt));
  padding: calc(35.4 * var(--pt)) calc(72 * var(--pt)) calc(56 * var(--pt));
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(11, 31, 58, .12), 0 14px 36px rgba(11, 31, 58, .16);
  color: #000;
  font-family: Arial, Arimo, 'Liberation Sans', Helvetica, sans-serif;
  font-size: calc(11 * var(--pt));
  line-height: 1.15;
  font-synthesis: none
}

.borang-paper b,
.borang-bold,
.borang-h {
  font-weight: 700
}

.borang-title {
  margin: 0;
  color: #000;
  font-family: 'Arial Black', 'Archivo Black', Arial, sans-serif;
  font-size: calc(13 * var(--pt));
  font-weight: 400;
  line-height: calc(18.36 * var(--pt));
  text-align: center;
  text-transform: uppercase;
  overflow-wrap: anywhere
}

.borang-title span {
  display: block
}

/* KATEGORI: [ ] BAWAH 8 TAHUN   [ ] BAWAH 11 TAHUN */
.borang-kategori {
  display: flex;
  align-items: flex-start;
  margin-top: calc(11.5 * var(--pt))
}

.borang-kategori-label {
  flex-shrink: 0;
  width: calc(81.58 * var(--pt));
  margin-left: calc(36 * var(--pt));
  font-weight: 700;
  line-height: calc(19.2 * var(--pt))
}

.borang-kategori-opts {
  display: flex;
  flex-wrap: wrap;
  row-gap: calc(4.8 * var(--pt));
  border-radius: 4px;
  outline: 0
}

.borang-cat {
  display: flex;
  align-items: center;
  gap: calc(2.45 * var(--pt));
  width: calc(180.6 * var(--pt));
  padding: 0;
  color: #000;
  font-family: inherit;
  font-size: inherit;
  font-weight: 700;
  text-align: left
}

/* the last box on a line only needs its own width, or it would wrap */
.borang-kategori-opts .borang-cat:nth-child(2n),
.borang-kategori-opts .borang-cat:last-child {
  width: auto
}

/* five or more categories: three to a line, starting further left */
.borang-kategori.many .borang-kategori-label {
  width: calc(68.48 * var(--pt));
  margin-left: 0
}

.borang-kategori.many .borang-cat {
  width: calc(127.6 * var(--pt));
  font-size: calc(10.5 * var(--pt))
}

.borang-kategori.many .borang-cat:nth-child(3n),
.borang-kategori.many .borang-cat:last-child {
  width: auto
}

.borang-cat-box {
  flex-shrink: 0;
  width: calc(24 * var(--pt));
  height: calc(19.2 * var(--pt));
  border: max(1px, calc(1 * var(--pt))) solid #000;
  background: #fff;
  transition: background-color .15s ease
}

.borang-cat-box svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: #000;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transition: opacity .12s ease
}

.borang-cat[aria-checked=true] .borang-cat-box svg {
  opacity: 1
}

.borang-cat:hover .borang-cat-box,
.borang-cat:focus-visible .borang-cat-box {
  background: #eef4ff
}

.borang-kategori-opts.reg-invalid .borang-cat-box {
  border-color: #dc2626;
  background: #fde8e8
}

.borang-h {
  margin-top: calc(10.44 * var(--pt))
}

.borang-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed
}

.borang-table th,
.borang-table td {
  border: var(--rule) solid #000;
  padding: 0;
  font-weight: 400;
  text-align: left;
  vertical-align: middle
}

.borang-a .c1 {
  width: 35.04%
}

.borang-a .c2 {
  width: 32.22%
}

.borang-a .c3 {
  width: 32.74%
}


.borang-a th,
.borang-a td {
  height: calc(21.5 * var(--pt))
}

.borang-a th {
  padding: 0 calc(5.16 * var(--pt))
}

.borang-a th label {
  cursor: pointer
}

.borang-inline {
  display: flex;
  align-items: center;
  height: 100%;
  padding-left: calc(5.16 * var(--pt))
}

.borang-inline label {
  flex-shrink: 0;
  margin-right: calc(3 * var(--pt));
  white-space: nowrap;
  cursor: pointer
}

.borang-inline small {
  font-size: calc(8 * var(--pt))
}

.borang-inline input {
  padding-left: calc(2 * var(--pt))
}

/* typing happens right in the cells */
.borang-paper input {
  display: block;
  width: 100%;
  height: 100%;
  min-height: calc(20 * var(--pt));
  margin: 0;
  padding: 0 calc(5.16 * var(--pt));
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: #000;
  font: inherit;
  transition: background-color .15s ease, box-shadow .15s ease
}

.borang-paper input:hover {
  background: #f6f9ff
}

.borang-paper input:focus {
  background: #eef4ff;
  box-shadow: inset 0 0 0 2px #2F6FD6
}

.borang-paper input::placeholder {
  color: #9aa6ba;
  opacity: 1
}

/* the cells stay as blank as the paper until you're typing in one */
.borang-paper input:not(:focus)::placeholder {
  color: transparent
}

.borang-paper .reg-invalid,
.borang-paper input.reg-invalid {
  background: #fde8e8;
  box-shadow: inset 0 0 0 2px #dc2626
}

.borang-players .c-bil {
  width: 7.87%
}

.borang-players .c-nama {
  width: 42.04%
}

.borang-players .c-kid {
  width: 25.02%
}

.borang-players .c-jersi {
  width: 25.07%
}


.borang-players thead th {
  height: calc(25.56 * var(--pt));
  background: #000;
  color: #fff;
  font-weight: 700;
  text-align: center;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact
}

.borang-players td {
  height: calc(22.5 * var(--pt))
}

.borang-players .borang-bil {
  text-align: center
}

.borang-players .reg-p-mykid,
.borang-players .reg-p-jersey {
  text-align: center
}

.borang-players-wrap {
  position: relative
}

/* "+ Tambah" for players 11-30. On a full-size sheet it sits in the right
   margin beside the last row, so the rest of the borang stays exactly where
   the paper has it; on narrower sheets it goes under the table. */
.borang-add-row {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin: 4px 0 2px;
  padding: 3px 7px 3px 4px;
  border: 1px dashed #9aa6ba;
  border-radius: 6px;
  color: #2F6FD6;
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap
}

.borang-add-row .material-icons {
  font-size: 15px
}

.borang-add-row:hover {
  border-color: #2F6FD6;
  background: #eef4ff
}

@container (min-width: 700px) {
  .borang-add-row {
    position: absolute;
    left: calc(100% + 6px);
    bottom: 1px;
    margin: 0
  }
}

.borang-line {
  margin: 0
}

.borang-h-c {
  margin-top: calc(12.55 * var(--pt))
}

.borang-just {
  margin: 0;
  text-align: justify;
  hyphens: manual
}

/* each line of the paper spread to the margin, its last line not */
.borang-just span {
  display: block;
  text-align-last: justify
}

.borang-just .borang-last {
  text-align-last: auto
}

/* this line is a little wider than the margins; Word squeezes its spaces
   to make it fit, browsers only stretch them, so start from narrower ones */
.borang-just .borang-tight {
  word-spacing: -.07em
}

/* Tandatangan Pengurus/Jurulatih, ( name ), No. KP — the right-hand block */
.borang-sign {
  width: calc(168.6 * var(--pt));
  margin-left: auto
}

.borang-sign-label {
  text-align: right
}

.borang-sign-pad {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: calc(159 * var(--pt));
  height: calc(37 * var(--pt));
  margin: calc(2.6 * var(--pt)) 0 0 calc(5.4 * var(--pt));
  padding: 0;
  border: 1px dashed #8fa3c4;
  border-radius: 4px;
  background: #f5f8fe;
  transition: background-color .15s ease, border-color .15s ease
}

.borang-sign-pad:hover {
  border-color: #2F6FD6;
  background: #eef4ff
}

.borang-sign-empty {
  display: flex;
  align-items: center;
  gap: 5px;
  align-self: center;
  color: #2F6FD6;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600
}

.borang-sign-empty .material-icons {
  font-size: 18px
}

.borang-sign-pad.signed {
  border-color: transparent;
  background: transparent
}

.borang-sign-pad.signed:hover {
  border-color: #c7d2e5
}

.borang-sign-pad img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  margin-bottom: calc(-2 * var(--pt))
}

.borang-sign-pad.reg-invalid {
  border: 2px solid #dc2626;
  box-shadow: none
}

.borang-sign-line {
  width: calc(159 * var(--pt));
  margin-left: calc(5.4 * var(--pt));
  border-top: max(1px, calc(.7 * var(--pt))) solid #000
}

.borang-sign-name {
  display: flex;
  gap: calc(3 * var(--pt));
  margin-top: calc(1 * var(--pt))
}

.borang-sign-name span:nth-child(2) {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap
}

.borang-sign-ic {
  display: flex;
  align-items: center;
  margin-left: calc(6.24 * var(--pt))
}

.borang-sign-ic label {
  flex-shrink: 0;
  margin-right: calc(3 * var(--pt));
  cursor: pointer
}

.borang-sign-ic input {
  height: calc(16 * var(--pt));
  min-height: 0;
  padding: 0 calc(2 * var(--pt))
}

/* UNTUK KEGUNAAN PENGANJUR */
.borang-office {
  margin: calc(.55 * var(--pt)) calc(-1.57 * var(--pt)) 0 calc(-1.44 * var(--pt));
  padding: 0 calc(1.57 * var(--pt)) 0 calc(1.44 * var(--pt));
  border-top: max(1.5px, calc(1.44 * var(--pt))) solid #000
}

.borang-office-title {
  font-size: calc(8 * var(--pt));
  font-weight: 700;
  text-align: center;
  margin-bottom: calc(12.68 * var(--pt))
}

.borang-office-row {
  display: flex
}

.borang-office-row span:first-child {
  flex-shrink: 0;
  width: calc(180.03 * var(--pt))
}

.borang-submit-card {
  max-width: 794px;
  margin: 18px auto 0
}

.borang-submit-card .reg-consent {
  margin-top: 0
}

/* phones: a fixed readable size instead of the scaled paper */
@container (max-width: 560px) {
  .borang-paper {
    --pt: 1.2px;
    min-height: 0;
    padding: 22px 12px 24px
  }

  .borang-title {
    font-size: 15px;
    line-height: 1.35
  }

  /* the paper's line breaks don't fit a phone: let the text flow */
  .borang-just span,
  .borang-just .borang-tight {
    display: inline;
    word-spacing: normal
  }

  .borang-kategori {
    flex-wrap: wrap;
    margin-top: 14px
  }

  .borang-kategori .borang-kategori-label {
    width: auto;
    margin: 0 10px 0 0
  }

  .borang-kategori .borang-kategori-opts .borang-cat {
    width: auto;
    margin-right: 16px;
    font-size: 12.5px
  }

  .borang-a th,
  .borang-a td,
  .borang-players td {
    height: 36px
  }

  .borang-a th {
    padding: 4px 5px;
    font-size: 12px;
    line-height: 1.2;
    overflow-wrap: anywhere
  }

  .borang-inline {
    flex-wrap: wrap;
    padding: 2px 0 0 5px
  }

  .borang-inline label {
    font-size: 11px
  }

  .borang-inline input {
    height: auto;
    min-height: 26px
  }

  .borang-players .c-bil {
    width: 9%
  }

  .borang-players .c-nama {
    width: 37%
  }

  .borang-players .c-kid {
    width: 37%
  }

  .borang-players .c-jersi {
    width: 17%
  }


  .borang-players thead th {
    height: 34px;
    padding: 2px;
    font-size: 10.5px;
    line-height: 1.15
  }

  .borang-players input {
    padding: 0 4px;
    font-size: 12.5px
  }

  .borang-sign {
    width: min(100%, 240px)
  }

  .borang-sign-pad,
  .borang-sign-line {
    width: calc(100% - 7px);
    margin-left: 6px
  }

  .borang-sign-pad {
    height: 56px
  }

  .borang-sign-ic input {
    height: 30px
  }

  .borang-office-row span:first-child {
    width: 52%
  }

  /* the ": ____" line is longer than a phone is wide: cut it at the edge */
  .borang-office-row span:last-child {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap
  }
}

/* signature pad */
.reg-sign-modal {
  max-width: 660px
}

.reg-sign-help {
  margin-bottom: 12px;
  color: var(--text-muted);
  font-size: .88rem;
  line-height: 1.5
}

.reg-sign-area {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff
}

.reg-sign-area canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 600 / 220;
  cursor: crosshair;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none
}

.reg-sign-guide {
  position: absolute;
  left: 7%;
  right: 7%;
  bottom: 24%;
  border-bottom: 1.5px dashed #c7d2e5;
  pointer-events: none
}

.reg-sign-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a8b5cc;
  font-size: 1rem;
  font-weight: 500;
  pointer-events: none
}

.reg-sign-error {
  min-height: 1.3em;
  margin-top: 8px;
  color: #b91c1c;
  font-size: .85rem;
  font-weight: 600
}

[data-theme=dark] .reg-sign-error {
  color: #fca5a5
}

.reg-sign-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px
}

.reg-sign-actions .btn {
  justify-content: center
}

@media (max-width: 640px) {
  .reg-sign-modal .modal-body {
    padding: 18px 16px
  }

  .reg-sign-actions .btn {
    flex: 1;
    padding-left: 10px;
    padding-right: 10px
  }

  .reg-sign-long {
    display: none
  }
}

/* ------------- BORANG in the admin dashboard (Create Tournament) -------- */

.reg-template-opts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px
}

.reg-template-opt {
  position: relative;
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease
}

.reg-template-opt:hover {
  border-color: var(--royal-light)
}

.reg-template-opt input {
  flex-shrink: 0;
  width: 17px;
  height: 17px;
  margin-top: 2px;
  accent-color: var(--royal)
}

.reg-template-opt:has(input:checked) {
  border-color: var(--royal-light);
  background: rgba(47, 111, 214, .06)
}

.reg-template-opt strong {
  display: block;
  color: var(--text-dark);
  font-size: .9rem
}

.reg-template-opt small {
  display: block;
  margin-top: 3px;
  color: var(--text-muted);
  font-size: .78rem;
  font-weight: 400;
  line-height: 1.45
}

.reg-template-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--royal);
  color: #fff;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  vertical-align: 2px
}

.reg-borang-title-preview {
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: #000;
  font-family: 'Arial Black', 'Archivo Black', Arial, sans-serif;
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
  text-transform: uppercase;
  overflow-wrap: anywhere
}

.reg-borang-title-preview span {
  display: block
}

.reg-borang-title-preview span:empty::before {
  content: '\00a0'
}

.reg-borang-preview-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  color: var(--royal-light);
  font-size: .82rem;
  font-weight: 600
}

.reg-borang-preview-btn .material-icons {
  font-size: 17px
}

.reg-borang-preview-btn:hover {
  text-decoration: underline
}

.reg-borang-preview-btn:disabled {
  opacity: .6;
  cursor: wait
}

/* tournaments table: which form the link shows */
.reg-form-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 6px;
  padding: 2px 8px 2px 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: .7rem;
  font-weight: 600
}

.reg-form-tag .material-icons {
  font-size: 14px;
  color: var(--royal-light)
}

/* registered teams: the borang's extra details */
.reg-entry-borang {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.2fr);
  gap: 8px 16px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg)
}

.reg-entry-borang small {
  display: block;
  margin-bottom: 2px;
  color: var(--text-muted);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase
}

.reg-entry-borang div {
  min-width: 0;
  color: var(--text-dark);
  font-size: .84rem;
  font-weight: 600;
  overflow-wrap: anywhere
}

.reg-entry-borang .reg-none {
  color: var(--text-muted);
  font-weight: 400
}

.reg-entry-sign img {
  display: block;
  max-width: 100%;
  height: 40px;
  padding: 3px 8px;
  border-radius: 6px;
  background: #fff;
  object-fit: contain
}

.icon-btn.pdf {
  color: var(--royal-light)
}

/* "Print Borang" on each registered team */
.reg-entry-print {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 6px;
  padding: 6px 12px 6px 10px;
  border-radius: 8px;
  background: var(--royal);
  color: #fff;
  font-size: .78rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color .15s ease
}

.reg-entry-print .material-icons {
  font-size: 17px
}

.reg-entry-print:hover {
  background: var(--navy)
}

.reg-entry-print:disabled {
  opacity: .6;
  cursor: wait
}

/* Print Out window: Download PDF next to Print */
.reg-print-modal .form-actions .btn-cancel {
  display: inline-flex;
  align-items: center;
  gap: 4px
}

.reg-print-modal .form-actions .btn-cancel:disabled {
  opacity: .55;
  cursor: not-allowed
}

/* print out: list or borang */
.reg-print-format {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px
}

.reg-print-format label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--text-dark);
  font-size: .84rem;
  font-weight: 600;
  cursor: pointer
}

.reg-print-format label:has(input:checked) {
  border-color: var(--royal-light);
  background: rgba(47, 111, 214, .06)
}

.reg-print-format input {
  accent-color: var(--royal)
}

@media (max-width: 760px) {
  .reg-entry-borang {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }
}

@media (max-width: 600px) {
  .reg-template-opts {
    grid-template-columns: minmax(0, 1fr)
  }
}

/* a category that has reached the tournament's Team Limit */
.borang-cat:disabled {
  cursor: not-allowed;
  opacity: .55
}

.borang-cat-full {
  margin-left: 4px;
  color: #b91c1c;
  font-size: .8em;
  font-weight: 700
}
