:root {
  --bg: #efe5cf;
  --bg-soft: #fbf6ea;
  --card: rgba(255, 251, 243, 0.94);
  --ink: #162117;
  --muted: #5f6d62;
  --line: #ddd0b5;
  --line-strong: #c9b98d;
  --brand: #2f7f3a;
  --brand-dark: #145324;
  --brand-soft: #dff3e1;
  --gold: #e0bd57;
  --gold-strong: #c59817;
  --gold-soft: #fff1b7;
  --danger: #c73b2f;
  --danger-soft: #ffe0dc;
  --warning: #9d6b00;
  --warning-soft: #fff0bf;
  --success: #0f6d2e;
  --success-soft: #d9f6df;
  --shadow: 0 24px 50px rgba(73, 64, 34, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(245, 208, 92, 0.28), transparent 28%),
    radial-gradient(circle at top right, rgba(70, 145, 79, 0.22), transparent 26%),
    linear-gradient(180deg, #fbf5e8 0%, var(--bg) 100%);
  color: var(--ink);
}

.page {
  max-width: 1140px;
  margin: 0 auto;
  padding: 28px 18px 44px;
}

.hero {
  display: grid;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 22px;
}

.hero-public {
  grid-template-columns: 1fr;
}

.hero-admin {
  grid-template-columns: 1fr;
}

.hero-copy,
.hero-panel,
.card {
  background: var(--card);
  border: 1px solid rgba(201, 185, 141, 0.62);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 28px;
}

.hero-copy-brand {
  background:
    radial-gradient(circle at left top, rgba(255, 241, 183, 0.7), transparent 28%),
    linear-gradient(180deg, rgba(255, 252, 245, 0.96), rgba(255, 249, 237, 0.88));
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding: 12px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(224, 189, 87, 0.45);
}

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(180deg, #3d9a4d, #1f6b2c);
  color: #fff8dc;
  font-size: 28px;
  box-shadow: 0 10px 20px rgba(37, 117, 49, 0.26);
}

.brand-name {
  display: block;
  font-size: 22px;
  line-height: 1.1;
}

.eyebrow,
.section-tag,
h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 0.98;
}

h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
}

.subtitle,
.helper,
.card-note {
  color: var(--muted);
}

.subtitle {
  max-width: 36rem;
  line-height: 1.6;
  font-size: 17px;
}

.card {
  padding: 22px;
}

.search-card,
.admin-login {
  margin-bottom: 18px;
}

.login-tip-box {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(223, 243, 225, 0.85), rgba(244, 251, 244, 0.92));
  border: 1px solid rgba(47, 127, 58, 0.16);
}

.login-tip-box strong {
  color: var(--brand-dark);
}

.login-tip-box span {
  color: var(--muted);
  line-height: 1.5;
}

.prize-banner-section {
  margin: 0 0 18px;
}

.search-card-first {
  background:
    radial-gradient(circle at top right, rgba(255, 237, 170, 0.55), transparent 30%),
    linear-gradient(180deg, rgba(255, 251, 244, 0.98), rgba(255, 249, 239, 0.94));
}

.current-game-card {
  background:
    linear-gradient(180deg, rgba(255, 252, 247, 0.96), rgba(255, 249, 240, 0.92)),
    radial-gradient(circle at left bottom, rgba(223, 243, 225, 0.5), transparent 30%);
}

.rules-card {
  background:
    linear-gradient(180deg, rgba(255, 251, 244, 0.97), rgba(255, 248, 237, 0.93)),
    radial-gradient(circle at right top, rgba(223, 243, 225, 0.48), transparent 28%);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.field-label {
  display: inline-block;
  margin-bottom: 10px;
  font-weight: 700;
}

.search-row,
.action-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.automation-panel {
  display: grid;
  gap: 14px;
  margin-top: 14px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.backup-panel {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(164, 127, 44, 0.28);
  border-radius: 8px;
  background: rgba(255, 252, 244, 0.78);
}

.backup-panel .subsection-title {
  margin-top: 0;
}

.signature-action-bar {
  margin-top: 6px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(201, 185, 141, 0.45);
}

.admin-primary-actions {
  margin-top: 4px;
  margin-bottom: 18px;
}

.automation-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.automation-summary div {
  min-width: 0;
  padding: 12px;
  border-radius: 14px;
  background: rgba(223, 243, 225, 0.42);
  border: 1px solid rgba(47, 127, 58, 0.12);
}

.automation-summary dt {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.automation-summary dd {
  margin: 0;
  font-weight: 800;
  color: var(--brand-dark);
}

input,
button,
select,
textarea {
  font: inherit;
}

input,
select,
textarea {
  min-width: 260px;
  flex: 1;
  padding: 16px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--ink);
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(47, 127, 58, 0.14);
  border-color: var(--brand);
}

textarea {
  min-height: 110px;
  resize: vertical;
}

button {
  border: 0;
  border-radius: 16px;
  padding: 16px 20px;
  background: linear-gradient(180deg, var(--brand), var(--brand-dark));
  color: white;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(47, 127, 58, 0.24);
}

button:hover {
  filter: brightness(1.05);
}

button:disabled {
  opacity: 0.58;
  cursor: not-allowed;
  box-shadow: none;
  filter: none;
}

.button-small {
  padding: 12px 16px;
  min-width: 96px;
}

.secondary-button {
  background: linear-gradient(180deg, #a78e47, #7f6728);
  box-shadow: 0 12px 26px rgba(127, 103, 40, 0.24);
}

.danger-button {
  background: linear-gradient(180deg, #c73b2f, #91271f);
  box-shadow: 0 12px 26px rgba(199, 59, 47, 0.2);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.participant-action-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: -2px 0 18px;
}

.participant-action-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--brand-dark);
  border: 1px solid rgba(47, 127, 58, 0.18);
  box-shadow: 0 10px 22px rgba(58, 48, 27, 0.08);
  line-height: 1.15;
  text-decoration: none;
}

.participant-action-button.is-active {
  background: linear-gradient(180deg, var(--brand), var(--brand-dark));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 12px 26px rgba(47, 127, 58, 0.24);
}

.participant-action-logout {
  color: #5f4521;
  border-color: rgba(127, 103, 40, 0.22);
}

.participant-group-shortcut {
  background: #1f9d55;
  color: #fff;
  border-color: transparent;
}

.participant-action-icon,
.participant-action-icon svg {
  width: 20px;
  height: 20px;
}

.participant-action-icon {
  display: inline-flex;
  flex: 0 0 auto;
}

.participant-action-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-badge {
  position: absolute;
  top: -7px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 2px solid #fff;
  background: #c6382e;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.participant-summary-card.hidden + .payment-card,
.portal-grid-lower .current-game-card,
.portal-grid-lower .participant-panel {
  grid-column: 1 / -1;
}

.participant-panel .notification-list {
  margin-bottom: 0;
}

.participant-panel .group-invite {
  margin-bottom: 16px;
}

.app-updates-list {
  display: grid;
  gap: 12px;
}

.app-update-item {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(201, 185, 141, 0.42);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
}

.app-update-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.app-update-heading strong {
  color: var(--brand-dark);
}

.app-update-heading span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.app-update-item ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: #4f5d6a;
  line-height: 1.45;
}

.profile-card .participant-details {
  margin-bottom: 18px;
}

.panel-subtitle {
  margin: 4px 0 10px;
  color: var(--brand-dark);
  font-size: 17px;
}

.deposit-note-cell {
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.details {
  display: grid;
  gap: 10px;
}

.details div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid #ebdfca;
}

.details-strong dd,
.participant-details dd {
  font-weight: 800;
}

dt {
  font-weight: 800;
}

dd {
  margin: 0;
  text-align: right;
}

.participant-card {
  position: relative;
  overflow: hidden;
}

.participant-login-card {
  margin-bottom: 18px;
}

.participant-card::before {
  content: "";
  position: absolute;
  inset: auto -60px -60px auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 231, 149, 0.32), transparent 70%);
  pointer-events: none;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 116px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
}

.status-ok {
  background: linear-gradient(180deg, #dcf8e2, #b8efc3);
  color: var(--success);
  border: 1px solid rgba(15, 109, 46, 0.22);
}

.status-warning {
  background: linear-gradient(180deg, #fff5d0, #ffe394);
  color: var(--warning);
  border: 1px solid rgba(157, 107, 0, 0.25);
}

.status-danger {
  background: linear-gradient(180deg, #ffe3de, #ffbfb4);
  color: var(--danger);
  border: 1px solid rgba(199, 59, 47, 0.25);
}

.status-neutral {
  background: linear-gradient(180deg, #eef3ec, #d8e3d4);
  color: #4c6550;
  border: 1px solid rgba(76, 101, 80, 0.18);
}

.result-spotlight {
  margin-bottom: 20px;
  padding: 22px;
  border: 1px solid rgba(197, 152, 23, 0.55);
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(255, 250, 221, 0.98), transparent 38%),
    radial-gradient(circle at bottom left, rgba(255, 220, 108, 0.25), transparent 32%),
    linear-gradient(180deg, #fff6d2 0%, #ffe7a1 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 18px 34px rgba(184, 144, 31, 0.18);
}

.quota-id-highlight {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 18px;
  padding: 14px 18px;
  border-radius: 20px;
  border: 1px solid rgba(47, 127, 58, 0.2);
  background:
    radial-gradient(circle at right top, rgba(255, 241, 183, 0.6), transparent 45%),
    linear-gradient(180deg, rgba(223, 243, 225, 0.9), rgba(244, 251, 244, 0.98));
}

.quota-id-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-dark);
}

.quota-id-highlight strong {
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1;
  color: var(--brand-dark);
}

.participant-identity-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.participant-identity-strip div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(47, 127, 58, 0.16);
  background: rgba(223, 243, 225, 0.5);
}

.participant-identity-strip span {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--brand-dark);
}

.participant-identity-strip strong {
  min-width: 0;
  color: var(--brand-dark);
  font-size: 22px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.participant-quota-box {
  display: grid;
  gap: 12px;
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid rgba(47, 127, 58, 0.16);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.74);
}

.participant-quota-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.participant-quota-box-header strong,
.participant-quota-box-header span {
  display: block;
}

.participant-quota-box-header strong {
  color: var(--brand-dark);
}

.participant-quota-box-header span {
  color: var(--muted);
  font-size: 14px;
}

.participant-quota-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.participant-quota-card {
  display: grid;
  grid-template-columns: 0.75fr 1.1fr 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdfa;
}

.participant-quota-card.is-current {
  border-color: rgba(47, 127, 58, 0.35);
  background: #eff8e8;
}

.participant-quota-card span {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.participant-quota-card strong {
  color: var(--brand-dark);
  font-size: 15px;
  overflow-wrap: anywhere;
}

.spotlight-label,
.spotlight-note,
.spotlight-text {
  display: block;
}

.spotlight-label {
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7a5d12;
}

.spotlight-value {
  display: block;
  font-size: clamp(26px, 4.2vw, 42px);
  line-height: 1.05;
  margin-bottom: 10px;
  color: #3e2f00;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.45);
  overflow-wrap: anywhere;
}

.spotlight-text {
  margin-bottom: 10px;
  font-size: 17px;
  font-weight: 800;
  color: #5d4700;
}

.spotlight-note {
  color: #6b6146;
  line-height: 1.45;
}

.prize-bubble-wrap {
  margin: 0 0 20px;
}

.prize-bubble-wide {
  margin: 0;
}

.prize-bubble {
  position: relative;
  width: 100%;
  padding: 16px 18px;
  border-radius: 20px;
  text-align: center;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fffef6;
  background: linear-gradient(135deg, #27843a 0%, #d8a51a 50%, #1d6a2b 100%);
  background-size: 200% 200%;
  border: 1px solid rgba(255, 245, 196, 0.72);
  box-shadow:
    0 0 0 1px rgba(255, 243, 192, 0.15) inset,
    0 10px 26px rgba(33, 104, 43, 0.25),
    0 0 24px rgba(216, 165, 26, 0.35);
  animation: pulsePrize 1.6s ease-in-out infinite, shiftPrize 3.6s linear infinite;
}

.prize-bubble::before {
  content: "☘";
  display: inline-block;
  margin-right: 10px;
  color: #fff8d1;
  text-shadow: 0 0 12px rgba(255, 244, 181, 0.55);
}

@keyframes pulsePrize {
  0%,
  100% {
    transform: scale(1);
    box-shadow:
      0 0 0 1px rgba(255, 243, 192, 0.15) inset,
      0 10px 26px rgba(33, 104, 43, 0.25),
      0 0 24px rgba(216, 165, 26, 0.35);
  }
  50% {
    transform: scale(1.015);
    box-shadow:
      0 0 0 1px rgba(255, 243, 192, 0.22) inset,
      0 14px 34px rgba(33, 104, 43, 0.32),
      0 0 34px rgba(216, 165, 26, 0.52);
  }
}

@keyframes shiftPrize {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.rules-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.6;
}

.prize-bubble {
  padding: 18px 20px;
  border-radius: 12px;
  font-size: 19px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: none;
  color: var(--brand-dark);
  background: #fffef9;
  background-size: auto;
  border: 1px solid rgba(47, 127, 58, 0.2);
  box-shadow: 0 10px 24px rgba(58, 48, 27, 0.1);
  animation: prizeTextPulse 1.8s ease-in-out infinite;
}

.prize-bubble::before {
  content: none;
}

@keyframes prizeTextPulse {
  0%,
  100% {
    color: var(--brand-dark);
  }
  50% {
    color: #b8860b;
  }
}

.rules-list li + li {
  margin-top: 10px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.admin-grid label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

.checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.checkbox-label input[type="checkbox"] {
  min-width: 0;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.admin-grid input,
.admin-grid select,
.admin-grid textarea {
  min-width: 0;
  width: 100%;
}

.participant-suggestions {
  display: grid;
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid rgba(47, 127, 58, 0.28);
  border-radius: 8px;
  background: #fffef9;
  box-shadow: 0 18px 34px rgba(58, 48, 27, 0.16);
}

.participant-suggestion-option {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(234, 223, 200, 0.95);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  text-align: left;
  box-shadow: none;
}

.participant-suggestion-option strong {
  font-size: 15px;
}

.participant-suggestion-option span,
.participant-suggestion-empty {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.participant-suggestion-option:hover,
.participant-suggestion-option:focus-visible {
  border-color: rgba(47, 127, 58, 0.46);
  background: rgba(223, 243, 225, 0.78);
}

.participant-suggestion-empty {
  padding: 12px;
}

.admin-eyebrow {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand);
}

.admin-toolbar {
  margin-bottom: 18px;
}

.admin-toolbar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.admin-toolbar-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tab-button {
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(223, 243, 225, 0.75);
  color: var(--brand-dark);
  box-shadow: none;
}

.tab-button.active {
  background: linear-gradient(180deg, var(--brand), var(--brand-dark));
  color: #fff;
  box-shadow: 0 12px 26px rgba(47, 127, 58, 0.24);
}

input[readonly] {
  background: rgba(244, 247, 241, 0.96);
  color: #44604a;
}

.admin-section {
  margin-bottom: 18px;
}

.subsection-title {
  margin: 22px 0 14px;
  font-size: 20px;
}

.admin-grid-wide {
  grid-column: 1 / -1;
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.mini-stat {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
}

.mini-stat span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 14px;
}

.mini-stat strong {
  font-size: 22px;
}

.mini-stat small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.mini-stat-highlight {
  border-color: rgba(47, 127, 58, 0.45);
  background: #eff8e8;
}

.mini-stat-highlight strong {
  color: var(--brand-dark);
  font-size: 26px;
}

.table-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.admin-table {
  width: max-content;
  border-collapse: collapse;
  min-width: 860px;
}

.admin-table th,
.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #eadfc8;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

.admin-table th {
  background: rgba(223, 243, 225, 0.82);
  color: var(--brand-dark);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-table th {
  line-height: 1.25;
}

.admin-table td:nth-child(3),
.admin-table th:nth-child(3) {
  min-width: 150px;
}

.admin-table td:nth-child(4),
.admin-table th:nth-child(4) {
  min-width: 130px;
}

#participantsTable {
  width: 1040px;
  min-width: 1040px;
  table-layout: fixed;
}

#participantsTable th {
  white-space: nowrap;
  line-height: 1.2;
  font-size: 12px;
  padding: 10px 10px;
}

#participantsTable th:nth-child(1),
#participantsTable td:nth-child(1) {
  width: 56px;
}

#participantsTable th:nth-child(2),
#participantsTable td:nth-child(2) {
  width: 230px;
}

#participantsTable th:nth-child(3),
#participantsTable td:nth-child(3) {
  width: 120px;
  text-align: center;
}

#participantsTable th:nth-child(4),
#participantsTable td:nth-child(4) {
  width: 130px;
  text-align: center;
}

#participantsTable th:nth-child(5),
#participantsTable td:nth-child(5),
#participantsTable th:nth-child(6),
#participantsTable td:nth-child(6),
#participantsTable th:nth-child(7),
#participantsTable td:nth-child(7) {
  width: 150px;
}

#participantsTable th:nth-child(5),
#participantsTable td:nth-child(5),
#participantsTable th:nth-child(6),
#participantsTable td:nth-child(6),
#participantsTable th:nth-child(7),
#participantsTable td:nth-child(7) {
  text-align: right;
}

.quota-reservation-summary {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid #d8c7a8;
  border-radius: 999px;
  color: #5d4c2d;
  background: #fffaf1;
  font-size: 13px;
  font-weight: 800;
}

.quota-reservation-summary.is-complete {
  color: var(--brand-dark);
  border-color: rgba(47, 127, 58, 0.36);
  background: #eff8e8;
}

.quota-reservation-summary.is-warning {
  color: #8b2f22;
  border-color: rgba(176, 44, 32, 0.32);
  background: #fff3ec;
}

.quota-type-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 94px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #eef1ef;
  color: #43504a;
  font-size: 12px;
  font-weight: 800;
}

.quota-type-system {
  background: #fff2c7;
  color: #7b5700;
  font-style: italic;
}

.field-helper {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.quota-link-summary {
  color: var(--brand-dark);
  font-weight: 800;
}

.system-quota-row {
  background: rgba(255, 242, 199, 0.28);
}

.participant-admin-extract {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.8);
}

.participant-extract-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 12px 0;
}

.compact-table-wrap {
  margin-top: 12px;
}

.participant-extract-table {
  min-width: 900px;
}

.participant-extract-table th,
.participant-extract-table td {
  white-space: normal;
}

.participant-extract-table th:nth-child(1),
.participant-extract-table td:nth-child(1) {
  width: 180px;
}

.participant-extract-table th:nth-child(2),
.participant-extract-table td:nth-child(2),
.participant-extract-table th:nth-child(3),
.participant-extract-table td:nth-child(3),
.participant-extract-table th:nth-child(4),
.participant-extract-table td:nth-child(4) {
  width: 120px;
  text-align: right;
  white-space: nowrap;
}

.participant-extract-table th:nth-child(5),
.participant-extract-table td:nth-child(5) {
  min-width: 220px;
}

.participant-extract-table th:nth-child(6),
.participant-extract-table td:nth-child(6) {
  width: 150px;
  white-space: nowrap;
}

.signature-preview-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.signature-preview-card {
  display: grid;
  gap: 8px;
  align-items: center;
  padding: 12px;
  border: 1px solid #eadfc8;
  border-radius: 12px;
  background: #fffdf8;
}

.signature-preview-card img {
  width: 100%;
  height: 90px;
  object-fit: contain;
  background: #fff;
  border: 1px dashed #d9c9a8;
  border-radius: 8px;
}

.signature-preview-card span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-table tbody tr {
  cursor: pointer;
}

.admin-table tbody tr:hover {
  background: rgba(255, 243, 192, 0.22);
}

.table-actions {
  display: grid;
  gap: 8px;
  min-width: 170px;
}

.table-actions .button-small {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
}

#whatsappQueueTable .table-actions {
  min-width: 0;
}

#whatsappQueueTable {
  min-width: 900px;
  table-layout: fixed;
}

#whatsappQueueTable tbody tr {
  cursor: default;
}

#whatsappQueueTable th:nth-child(1),
#whatsappQueueTable td:nth-child(1) {
  width: 145px;
}

#whatsappQueueTable th:nth-child(2),
#whatsappQueueTable td:nth-child(2) {
  width: 70px;
  min-width: 70px;
}

#whatsappQueueTable th:nth-child(3),
#whatsappQueueTable td:nth-child(3) {
  width: 180px;
  min-width: 160px;
}

#whatsappQueueTable th:nth-child(4),
#whatsappQueueTable td:nth-child(4) {
  width: 130px;
  min-width: 130px;
}

#whatsappQueueTable th:nth-child(5),
#whatsappQueueTable td:nth-child(5) {
  width: 170px;
}

#whatsappQueueTable th:nth-child(6),
#whatsappQueueTable td:nth-child(6) {
  width: 120px;
}

#whatsappQueueTable th:nth-child(7),
#whatsappQueueTable td:nth-child(7) {
  width: 110px;
}

.whatsapp-name-cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.whatsapp-stats {
  margin-bottom: 8px;
}

.whatsapp-archive-note {
  margin: 0 0 16px;
}

.whatsapp-select-cell {
  width: 44px;
  min-width: 44px !important;
  text-align: center !important;
}

.whatsapp-select-cell input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.whatsapp-message-cell {
  min-width: 340px;
  white-space: normal !important;
}

.whatsapp-open-button {
  background: linear-gradient(180deg, #2f7f3a, #1f5d2b);
  box-shadow: 0 12px 26px rgba(47, 127, 58, 0.24);
}

.whatsapp-message-preview {
  width: 100%;
  min-height: 144px;
  resize: vertical;
  font: inherit;
  line-height: 1.45;
  white-space: pre-wrap;
}

.template-badge {
  display: inline-grid;
  gap: 2px;
  min-width: 118px;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid rgba(47, 127, 58, 0.18);
  font-size: 12px;
  line-height: 1.2;
}

.template-badge strong,
.template-badge small {
  display: block;
}

.template-badge strong {
  font-size: 12px;
  text-transform: uppercase;
}

.template-badge small {
  color: inherit;
}

.template-badge-ok {
  background: #dff3e1;
  color: var(--brand-dark);
}

.template-badge-warn {
  background: #fff2c7;
  color: #7b5700;
}

.template-badge-danger {
  background: #f4d4cc;
  color: #8b2f22;
}

.template-badge-neutral {
  background: #eef1ef;
  color: #43504a;
}

.whatsapp-report-box {
  display: grid;
  gap: 12px;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid rgba(201, 185, 141, 0.62);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.82);
}

.compact-header {
  margin-bottom: 0;
}

.compact-header h3 {
  margin: 0;
  font-size: 20px;
}

.group-report-message {
  min-height: 118px;
}

.queue-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

button.queue-status {
  border: 0;
  box-shadow: none;
  cursor: pointer;
}

.queue-status-pending {
  background: #fff2c7;
  color: #7b5700;
}

.queue-status-opened {
  background: #dff3e1;
  color: var(--brand-dark);
}

.queue-status-sent {
  background: #d8eefc;
  color: #12527c;
}

.queue-status-skipped {
  background: #f4d4cc;
  color: #8b2f22;
}

.participant-history-table {
  min-width: 0;
}

.participant-history-table tbody tr {
  cursor: default;
}

.participant-history-table tbody tr:hover {
  background: transparent;
}

.wallet-alert {
  margin-bottom: 18px;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff6d0, #ffe1a2);
  border: 1px solid rgba(197, 152, 23, 0.55);
  color: #6a4f00;
}

.wallet-alert strong,
.wallet-alert span {
  display: block;
}

.wallet-alert span {
  margin-top: 6px;
}

.notification-list {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(223, 243, 225, 0.72);
  border: 1px solid rgba(47, 127, 58, 0.18);
}

.notification-list h3 {
  margin: 0;
  font-size: 17px;
}

.group-invite,
.receipt-box {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid rgba(47, 127, 58, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.receipt-box {
  margin: 18px 0 0;
}

.group-invite strong,
.receipt-box strong {
  color: var(--brand-dark);
}

.group-invite span,
.receipt-box span {
  color: var(--muted);
  line-height: 1.45;
}

.group-invite a,
.receipt-box a {
  width: fit-content;
  color: var(--brand-dark);
  font-weight: 800;
  text-decoration: underline;
}

.participant-group-callout {
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  margin: 4px 0 18px;
  padding: 16px;
  border-color: rgba(37, 142, 70, 0.32);
  background: linear-gradient(135deg, rgba(232, 248, 235, 0.96), rgba(255, 255, 255, 0.92));
  box-shadow: 0 12px 28px rgba(28, 95, 46, 0.12);
}

.participant-group-callout strong {
  display: block;
  margin-bottom: 3px;
  font-size: 17px;
}

.participant-group-callout a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}

.receipt-history {
  display: grid;
  gap: 8px;
  padding-top: 4px;
}

.receipt-history-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.receipt-history-links a {
  font-size: 13px;
  font-weight: 700;
}

.notification-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(201, 185, 141, 0.42);
}

.notification-item strong {
  color: var(--brand-dark);
}

.notification-item span {
  color: var(--ink);
  line-height: 1.45;
}

.notification-item small {
  color: var(--muted);
}

.terms-box {
  display: grid;
  gap: 10px;
  margin: 10px 0 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
}

.terms-box h3 {
  margin: 0;
}

.terms-content {
  margin: 0;
  padding: 12px;
  white-space: pre-wrap;
  word-break: break-word;
  border: 1px solid #e9dcc2;
  border-radius: 12px;
  background: #fffdf8;
  color: #4f5d6a;
  font-family: inherit;
  line-height: 1.5;
  max-height: 240px;
  overflow: auto;
}

.terms-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.terms-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
}

.payment-card {
  display: grid;
  gap: 18px;
}

.pix-box {
  display: grid;
  gap: 10px;
}

.pix-instructions {
  margin: 4px 0 8px;
  color: #4f5d6a;
  line-height: 1.45;
}

.payment-card .action-bar {
  align-items: stretch;
}

.payment-card .action-bar button {
  min-width: 0;
  flex: 1 1 220px;
}

.payment-balance-highlight {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(47, 127, 58, 0.2);
  background:
    radial-gradient(circle at right top, rgba(255, 241, 183, 0.6), transparent 45%),
    linear-gradient(180deg, rgba(223, 243, 225, 0.9), rgba(244, 251, 244, 0.98));
}

.payment-balance-highlight span {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-dark);
}

.payment-balance-highlight strong {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1;
  color: var(--brand-dark);
}

.pix-box,
.pix-qr-card {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.pix-copy-area {
  min-height: 92px;
}

.pix-copy-area.is-empty {
  background: rgba(245, 248, 250, 0.9);
  color: #7b8794;
}

.pix-beneficiary,
.pix-key {
  margin: 0 0 10px;
  font-weight: 700;
}

.pix-qr-card {
  display: flex;
  justify-content: center;
}

.pix-qr-image {
  width: min(100%, 280px);
  border-radius: 18px;
  border: 1px solid var(--line);
  background: white;
  padding: 12px;
}

.portal-grid-lower {
  margin-bottom: 18px;
  align-items: start;
}

.profile-top {
  margin-bottom: 16px;
  display: flex;
  justify-content: center;
}

.profile-photo,
.profile-photo-fallback {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 3px solid rgba(224, 189, 87, 0.55);
  background: rgba(255, 255, 255, 0.85);
}

.profile-photo {
  object-fit: cover;
}

.profile-photo-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-weight: 700;
}

.hidden {
  display: none;
}

.profile-card .admin-grid {
  grid-template-columns: 1fr;
}

@media (max-width: 920px) {
  .hero-public,
  .grid,
  .admin-grid,
  .mini-stats,
  .automation-summary,
  .participant-identity-strip {
    grid-template-columns: 1fr;
  }

  .participant-quota-box-header,
  .participant-quota-card {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

@media (max-width: 720px) {
  .page {
    padding: 16px 12px 34px;
  }

  .hero-copy,
  .hero-panel,
  .card {
    padding: 18px 16px;
    border-radius: 22px;
  }

  .participant-group-callout {
    grid-template-columns: 1fr;
  }

  .participant-group-callout a {
    width: 100%;
  }

  .brand-mark {
    width: 100%;
    justify-content: flex-start;
    padding: 12px;
  }

  .brand-icon {
    width: 46px;
    height: 46px;
    font-size: 24px;
  }

  .brand-name {
    font-size: 18px;
  }

  h1 {
    font-size: 38px;
  }

  h2 {
    font-size: 24px;
  }

  .search-row,
  .action-bar,
  .card-header,
  .app-update-heading {
    flex-direction: column;
  }

  .app-update-heading span {
    flex: 1 1 auto;
  }

  input,
  button {
    width: 100%;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .details div {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  dd {
    text-align: left;
  }

  .status-pill {
    min-width: 0;
  }

  .spotlight-value {
    font-size: 30px;
  }

  .spotlight-text {
    font-size: 15px;
  }

  .prize-bubble {
    font-size: 15px;
    line-height: 1.4;
    padding: 14px 16px;
  }

  .participant-action-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
  }

  .participant-action-button {
    width: 100%;
    padding: 11px 10px;
    font-size: 14px;
  }

  .participant-action-logout {
    grid-column: 1 / -1;
  }

  .payment-card .action-bar button {
    min-width: 0;
    flex: 1 1 100%;
  }
}
