/* ── Form element base styles (admin) ── */
.admin-form label,
.admin-form-grid label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #111827;
}

.admin-form input[type="text"],
.admin-form input[type="email"],
.admin-form input[type="number"],
.admin-form input[type="password"],
.admin-form input[type="url"],
.admin-form input[type="date"],
.admin-form input[type="search"],
.admin-form input[type="tel"],
.admin-form input,
.admin-form select,
.admin-form textarea,
.admin-form-grid input,
.admin-form-grid select,
.admin-form-grid textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
  font: 700 14px/1.5 inherit;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
}

.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus,
.admin-form-grid input:focus,
.admin-form-grid select:focus,
.admin-form-grid textarea:focus {
  outline: none;
  border-color: var(--brand, #d4a420);
  box-shadow: 0 0 0 3px rgba(212, 164, 32, .18);
}

.admin-form select,
.admin-form-grid select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.admin-form textarea,
.admin-form-grid textarea {
  min-height: 100px;
  resize: vertical;
}

.admin-form .field-hint,
.admin-form-grid .field-hint {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
  margin-top: 4px;
}

/* ── Label.check (checkbox labels) ── */
label.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13.5px;
}

label.check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--brand, #d4a420);
}

/* ── Table wrapper ── */
.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: var(--r-sm, 8px);
  background: #ffffff;
  -webkit-overflow-scrolling: touch;
}

.admin-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.admin-table-wrap th,
.admin-table-wrap td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13.5px;
  color: #111827;
}

.admin-table-wrap th {
  background: #f8fafc;
  font-weight: 700;
  white-space: nowrap;
  color: #334155;
}

/* ── Compact admin grid (games, leaders) ── */
.compact-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.compact-manage-card {
  position: relative;
}

.compact-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.compact-card-head h3,
.compact-card-head strong {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.compact-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.compact-prices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 13px;
}

.compact-prices span {
  color: #475569;
}

.compact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

/* ── Mini admin card ── */
.mini-admin-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--r-sm, 8px);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mini-admin-card .thumb {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--r-xs, 6px);
  object-fit: cover;
  background: #f1f5f9;
}

.mini-admin-card .thumb.contain {
  object-fit: contain;
  background: transparent;
}

.mini-admin-card strong {
  font-size: 14px;
  color: #111827;
}

/* ── Admin avatar (leaders) ── */
.admin-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(212, 164, 32, .15), rgba(232, 56, 79, .12));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: #d4a420;
  flex-shrink: 0;
}

.leader-admin-summary {
  display: flex;
  align-items: center;
  gap: 14px;
}

.leader-admin-summary .leader-info {
  flex: 1;
  min-width: 0;
}

.admin-quote-preview {
  font-size: 13px;
  color: #64748b;
  font-style: italic;
  margin-top: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Inline edit (hidden by default via [hidden] attribute) ── */
.admin-inline-edit {
  margin-top: 10px;
  padding: 10px;
  background: #f8fafc;
  border-radius: var(--r-xs, 6px);
}

.admin-inline-edit[hidden] {
  display: none;
}

.admin-inline-edit.is-open {
  display: block;
}

.admin-inline-edit input,
.admin-inline-edit textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: var(--r-xs, 6px);
  background: #ffffff;
  color: #111827;
  font: inherit;
  font-size: 13px;
}

/* ── Game admin thumb ── */
.game-admin-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--r-xs, 6px);
  object-fit: cover;
}

/* ── Sponsor admin form ── */
.sponsor-admin-form {
  max-width: 520px;
}

/* ── Admin gallery ── */
.admin-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.admin-gallery-card {
  position: relative;
  border-radius: var(--r-sm, 8px);
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: #ffffff;
}

/* ── Prize pool admin ── */
.prize-admin-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}

.prize-admin-panel {
  padding: 0;
}

.prize-admin-form {
  padding: 20px;
}

.prize-admin-preview {
  position: sticky;
  top: calc(var(--nav-h, 72px) + 20px);
}

.prize-admin-preview-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--r, 14px);
  padding: 20px;
}

.preview-copy {
  font-size: 13px;
  color: #475569;
  line-height: 1.6;
  white-space: pre-wrap;
}

/* ── Admin form grid ── */
.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 15px;
  align-items: end;
}

/* ── Tiny button ── */
.tiny-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  min-height: 30px;
  padding: 4px 8px;
  border: 1px solid #e2e8f0;
  border-radius: var(--r-xs, 6px);
  background: #ffffff;
  color: #475569;
  font-size: 13px;
  cursor: pointer;
  transition: background .2s, color .2s;
}

.tiny-btn:hover {
  background: #f1f5f9;
  color: #111827;
}

.tiny-btn.danger {
  color: #e8384f;
  border-color: rgba(232, 56, 79, .3);
}

.tiny-btn.danger:hover {
  background: rgba(232, 56, 79, .08);
}

/* ── Badge color variants ── */
.badge.green {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.badge.red {
  background: #ffe5e7;
  color: #a32132;
  border: 1px solid #f0a3a8;
}

.badge.cyan {
  background: #cffafe;
  color: #0e7490;
  border: 1px solid #67e8f9;
}

.badge.amber {
  background: #fff3bf;
  color: #92400e;
  border: 1px solid #f0d68a;
}

/* ── Registration view page ── */
.pro-view-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
}

.pro-view-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--r-sm, 8px);
  padding: 20px;
}

.pro-view-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 12px;
  color: #111827;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
}

.pro-detail-list {
  display: grid;
  gap: 8px;
}

.pro-detail-list dt {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #64748b;
  margin: 0;
}

.pro-detail-list dd {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

.pro-member-list {
  display: grid;
  gap: 6px;
}

.pro-member-list .member-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #f8fafc;
  border-radius: 6px;
  font-size: 13px;
}

.ticket-qr-roster {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.proof-preview {
  border-radius: var(--r-sm, 8px);
  overflow: hidden;
  max-width: 280px;
}

.proof-preview img {
  width: 100%;
  display: block;
}

/* ── Registration proof page ── */
.proof-view-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--r, 14px);
  padding: 24px;
}

.proof-view-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.proof-image-frame {
  border-radius: var(--r-sm, 8px);
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.proof-image-frame img {
  width: 100%;
  display: block;
}

.proof-details {
  display: grid;
  gap: 12px;
}

.proof-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

/* ── Registration view / ticket panel ── */
.registration-view-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--r, 14px);
  padding: 24px;
}

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

.pro-ticket-view {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--r, 14px);
  overflow: hidden;
}

.pro-ticket-hero {
  padding: 24px;
  background: linear-gradient(135deg, #f8fafc, #ffffff);
  border-bottom: 1px solid #e2e8f0;
}

.pro-ticket-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.pro-ticket-side {
  padding: 20px;
}

.pro-ticket-qr {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* ── Stat grid (dashboard) ── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.stat-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--r-sm, 8px);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  background: rgba(212, 164, 32, .12);
  color: #d4a420;
}

.stat-icon.cyan {
  background: rgba(6, 182, 212, .12);
  color: #06b6d4;
}

.stat-icon.amber {
  background: rgba(245, 158, 11, .12);
  color: #f59e0b;
}

.stat-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-text strong {
  font-size: 22px;
  font-weight: 700;
  color: #111827;
}

.stat-text span {
  font-size: 12px;
  color: #64748b;
}

/* ── Bar list (dashboard recent activity) ── */
.bar-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #f8fafc;
  border-radius: var(--r-xs, 6px);
  font-size: 13px;
}

/* ── Field group header ── */
.field-group-header {
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin: 16px 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e2e8f0;
}

/* ── Form two-col ── */
.form-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-three-col {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}

@media (max-width: 768px) {

  .form-two-col,
  .form-three-col {
    grid-template-columns: 1fr;
  }
}

.compact-manage-card .form-two-col,
.compact-manage-card .form-three-col {
  grid-template-columns: 1fr;
}

/* ── Permission grid (roles) ── */
.permission-section {
  margin-bottom: 16px;
}

.permission-section h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}

.permission-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #f8fafc;
  border-radius: var(--r-xs, 6px);
  font-size: 13px;
  cursor: pointer;
}

/* ── Game registration rows (NOT flex on tr — use table styling) ── */
.game-registration-row {
  padding: 12px 14px;
  transition: background .15s;
}

.game-registration-row:hover {
  background: var(--surface-2, #f1f5f9);
}

/* ── Game panel heading (keep flex) ── */
.game-panel-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 600;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line, #e2e8f0);
}

/* ── Registration edit form ── */
.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.registration-edit-form .admin-form {
  max-width: 760px;
}