:root {
  --page-gutter: clamp(16px, 4vw, 22px);
  --bg: #f6f7fb;
  --panel: #ffffff;
  --card: #ffffff;
  --muted: #4b5563;
  --text: #0f172a;
  --accent: #0ea5e9;
  --accent-2: #f97316;
  --border: #d5d9e1;
  --success: #16a34a;
  --danger: #dc2626;
  --shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
  --bg-gradient: radial-gradient(circle at 20% 20%, rgba(14, 165, 233, 0.16), transparent 30%),
    radial-gradient(circle at 80% 0%, rgba(249, 115, 22, 0.18), transparent 25%),
    linear-gradient(180deg, #f7f9fc 0%, #e9eef6 100%);
  --card-bg: rgba(255, 255, 255, 0.92);
  --input-bg: #f3f5f9;
  --ghost-bg: rgba(0, 0, 0, 0.04);
  --badge-soft-bg: rgba(0, 0, 0, 0.04);
  --badge-soft-text: #4b5563;
  --logo-bg: rgba(0, 0, 0, 0.04);
  --callout-bg: rgba(14, 165, 233, 0.08);
  --callout-border: rgba(14, 165, 233, 0.25);
  --result-bg: rgba(0, 0, 0, 0.03);
  --toast-bg: #ffffff;
}

.theme-dark {
  --bg: #0f172a;
  --panel: #0b1224;
  --card: #111a2f;
  --muted: #9ca3af;
  --text: #e5e7eb;
  --accent: #0ea5e9;
  --accent-2: #f97316;
  --border: #1f2937;
  --success: #22c55e;
  --danger: #ef4444;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  --bg-gradient: radial-gradient(circle at 20% 20%, rgba(14, 165, 233, 0.14), transparent 30%),
    radial-gradient(circle at 80% 0%, rgba(249, 115, 22, 0.2), transparent 25%),
    linear-gradient(180deg, #0b1224 0%, #0f172a 100%);
  --card-bg: rgba(255, 255, 255, 0.03);
  --input-bg: #0b1224;
  --ghost-bg: rgba(255, 255, 255, 0.04);
  --badge-soft-bg: rgba(255, 255, 255, 0.06);
  --badge-soft-text: #9ca3af;
  --logo-bg: rgba(255, 255, 255, 0.04);
  --callout-bg: rgba(14, 165, 233, 0.08);
  --callout-border: rgba(14, 165, 233, 0.25);
  --result-bg: rgba(255, 255, 255, 0.02);
  --toast-bg: #0f172a;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Poppins", "Segoe UI", sans-serif;
  background: var(--bg-gradient);
  color: var(--text);
  min-height: 100vh;
  padding: 24px var(--page-gutter);
  overflow-x: hidden;
}

a,
a:hover,
a:focus,
a:active {
  text-decoration: none;
}

html {
  overflow-x: hidden;
  width: 100%;
}

@media (max-width: 900px) {
  body {
    padding: 16px var(--page-gutter);
  }
  .page {
    max-width: 100%;
  }
}

.page {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto 48px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-sizing: border-box;
}

.topbar {
  width: 100%;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto 16px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  position: sticky;
  top: 10px;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 10px;
  background: var(--logo-bg);
  padding: 6px;
}

.brand-name {
  font-weight: 700;
  color: #0f172a;
}

.brand-tag {
  font-size: 12px;
  color: #334155;
}

.theme-dark .brand-name {
  color: #e2e8f0;
}

.theme-dark .brand-tag {
  color: var(--muted);
}

.top-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.nav-link:hover {
  color: var(--accent);
}

.theme-dark .nav-link {
  color: #cbd5e1;
}

.small {
  padding: 10px 14px;
  font-size: 14px;
}

.hero {
  width: 100%;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.22), rgba(14, 165, 233, 0.08));
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow: var(--shadow);
}

.hero-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  align-items: center;
}

.hero-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.logo-glow {
  width: 220px;
  height: 220px;
  border-radius: 22px;
  background: radial-gradient(circle at 30% 30%, rgba(14, 165, 233, 0.2), transparent 40%),
    radial-gradient(circle at 70% 70%, rgba(249, 115, 22, 0.22), transparent 45%),
    var(--panel);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
}

.logo-glow img {
  width: 150px;
  height: 150px;
  object-fit: contain;
  max-width: 100%;
}

.mode-wrapper {
  min-width: 220px;
  display: grid;
  gap: 6px;
  justify-items: end;
}

.mode-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.mode-toggle {
  border: 1px solid rgba(14, 165, 233, 0.5);
  background: rgba(14, 165, 233, 0.12);
  color: var(--text);
  border-radius: 14px;
  padding: 10px 12px;
  font-weight: 700;
  cursor: pointer;
  min-width: 150px;
}

.mode-toggle.real {
  background: linear-gradient(135deg, #f97316, #fb923c);
  border: none;
  color: #0f172a;
}

.theme-dark .mode-toggle {
  color: #e0f2fe;
}

.theme-toggle {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.theme-toggle-track {
  width: 58px;
  height: 30px;
  border-radius: 20px;
  background: var(--border);
  border: 2px solid var(--border);
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 2px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.theme-toggle-thumb {
  width: 24px;
  height: 24px;
  background: #ffffff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: absolute;
  left: 2px;
  transition: transform 0.25s ease, background 0.2s ease;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.theme-toggle-icon {
  font-size: 14px;
  line-height: 1;
}

.theme-toggle-icon.moon {
  display: none;
}

.theme-dark .theme-toggle-track {
  background: #1f2937;
  border-color: #1f2937;
}

.theme-dark .theme-toggle-thumb {
  transform: translateX(28px);
  background: #2563eb;
  color: #e5e7eb;
}

.theme-dark .theme-toggle-icon.sun {
  display: none;
}

.theme-dark .theme-toggle-icon.moon {
  display: inline;
  color: #e5e7eb;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 6px;
}

h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

h2 {
  margin: 0;
  font-size: 20px;
}

h3 {
  margin: 0 0 6px;
}

.lede {
  margin: 0;
  color: var(--muted);
  max-width: 720px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 12px;
  background: rgba(14, 165, 233, 0.12);
  color: #67e8f9;
}

.badge.soft {
  background: var(--badge-soft-bg);
  color: var(--badge-soft-text);
}

.badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.card {
  width: 100%;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px 16px 16px;
  box-shadow: var(--shadow);
}

.card.grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 14px;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-head.small {
  margin-bottom: 10px;
}

.section-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.hint {
  color: var(--muted);
  font-size: 13px;
}

.mobile-participants-label {
  display: none;
  font-weight: 700;
  color: var(--text);
  margin: 8px 0 6px;
}

.hidden-mobile-desktop {
  display: none;
}

@media (max-width: 780px) {
  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .section-head .hint {
    width: 100%;
  }

  .section-actions {
    align-items: flex-start;
    width: 100%;
  }

  #exclusions .collapse-btn {
    width: 100%;
  }

  .mobile-participants-label {
    display: block;
  }
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 12px;
  align-items: end;
}

.form-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: end;
}

label span {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
  color: var(--muted);
}

input,
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(14, 165, 233, 0.35);
  border-color: rgba(14, 165, 233, 0.7);
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--ghost-bg);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  justify-self: start;
  position: relative;
}

.check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: auto;
  height: auto;
}

.check-text {
  color: var(--text);
  font-weight: 600;
  order: 0;
}

.check-switch {
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: var(--border);
  position: relative;
  transition: background 0.15s ease;
  order: 1;
}

.check-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s ease;
}

.check input:checked + .check-switch {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

.check input:checked + .check-switch::after {
  transform: translateX(18px);
}

.check input:disabled + .check-switch {
  background: var(--border);
  opacity: 0.4;
}

#admin-wrapper {
  justify-content: space-between;
  width: auto;
  max-width: 100%;
  grid-column: auto;
  justify-self: start;
}

#admin-wrapper .check-text {
  font-weight: 700;
  color: var(--text);
}

@media (max-width: 780px) {
  #admin-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 8px 0 4px 0;
    grid-column: 1 / -1;
  }
  .check {
    width: 100%;
    justify-content: space-between;
    justify-self: stretch;
  }
}

@media (min-width: 781px) {
  #admin-wrapper {
    width: 100%;
    max-width: none;
  }
}

@media (min-width: 901px) {
  #participant-form.form-grid {
    grid-template-columns: 1fr 1fr 1fr 1fr;
    align-items: center;
  }
  #admin-wrapper {
    align-self: center;
    width: 100%;
    margin-top: 22px; /* alinea con los labels de los campos */
  }
  .check {
    min-height: 42px;
    height: 42px;
    padding: 0 12px;
    width: 100%;
    justify-content: space-between;
    align-items: center;
  }
  #participant-form .button.primary {
    width: 100%;
    height: 42px;
    margin-top: 22px; /* alinea con los labels de los campos */
  }
}

.theme-dark .check-text {
  color: var(--text);
}

.block {
  display: block;
  margin-top: 12px;
}

.button {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--button-bg, var(--input-bg));
  color: var(--text);
  text-decoration: none;
  border-radius: 12px;
  padding: 10px 16px;
  min-height: 42px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.button.primary {
  background: linear-gradient(135deg, #0ea5e9, #06b6d4);
  color: #f8fafc;
  border: none;
}

.button.ghost {
  background: var(--ghost-bg);
}

.collapse-btn {
  padding: 8px 12px;
  min-height: 38px;
}

.exclusions-summary {
  margin: -2px 0 8px;
  color: var(--muted);
}

.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.buttons {
  display: flex;
  gap: 10px;
}

.table-wrap {
  overflow-x: auto;
  overflow-y: visible;
  margin-top: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  min-width: 0;
}

th {
  color: var(--muted);
  font-weight: 500;
  font-size: 13px;
}

.table-actions {
  display: flex;
  justify-content: flex-end;
  min-width: 70px;
  position: relative;
  gap: 8px;
  align-items: center;
}

.badge-admin {
  padding: 4px 8px;
  border-radius: 10px;
  background: rgba(14, 165, 233, 0.18);
  color: #67e8f9;
  font-size: 12px;
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.remove {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.empty {
  color: var(--muted);
  font-size: 14px;
  margin-top: 8px;
}

.alert {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #fca5a5;
  background: rgba(220, 38, 38, 0.08);
  color: #7f1d1d;
  font-weight: 600;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.chip {
  background: var(--ghost-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 6px 10px;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-size: 13px;
}

.chip .remove {
  color: #fca5a5;
}

.chip.error {
  background: rgba(220, 38, 38, 0.1);
  border-color: #fca5a5;
  color: #7f1d1d;
}

.participant-info {
  display: grid;
  gap: 2px;
}

.participant-name {
  font-weight: 600;
  color: var(--text);
}

.participant-email {
  font-size: 13px;
  color: var(--muted);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.participant-email-mobile {
  display: none;
}

.action-menu-wrap {
  position: relative;
  display: none;
  justify-content: flex-end;
}

.menu-btn {
  border: 1px solid var(--border);
  background: var(--ghost-bg);
  color: var(--text);
  border-radius: 10px;
  padding: 6px 10px;
  font-weight: 700;
  cursor: pointer;
  font-size: 14px;
}

.menu-btn:focus {
  outline: 2px solid rgba(14, 165, 233, 0.4);
  outline-offset: 2px;
}

.action-menu {
  position: absolute;
  right: 0;
  top: 36px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
  display: grid;
  gap: 4px;
  min-width: 130px;
  z-index: 30;
}

.action-menu button {
  border: none;
  background: transparent;
  text-align: left;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--text);
  font-weight: 600;
}

.action-menu button:hover {
  background: var(--ghost-bg);
}

.action-menu .danger {
  color: #991b1b;
}

.admin-cell {
  text-align: left;
  min-width: 80px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding-left: 0;
}
.admin-cell input[type="radio"] {
  margin: 0;
  transform: translateY(2px);
}

.participants-table th:first-child,
.participants-table td.admin-cell {
  width: 110px;
  min-width: 110px;
  padding-left: 0;
}
.admin-cell input[type="radio"] {
  margin: 0;
  transform: translateY(2px);
}

.admin-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.admin-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.admin-label {
  color: var(--muted);
  font-weight: 600;
}

.admin-switch {
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: var(--border);
  position: relative;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.admin-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s ease;
}

.admin-toggle input:checked + .admin-switch {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

.admin-toggle input:checked + .admin-switch::after {
  transform: translateX(18px);
}

.admin-toggle input:disabled + .admin-switch {
  opacity: 0.4;
}

.name-cell {
  min-width: 150px;
}

.table-btn {
  border: 1px solid var(--border);
  background: var(--ghost-bg);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.table-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.table-btn.ghost {
  background: var(--input-bg);
}

.table-btn.danger {
  background: rgba(220, 38, 38, 0.08);
  color: #991b1b;
  border-color: rgba(220, 38, 38, 0.3);
}

.theme-dark .table-btn.danger {
  background: rgba(239, 68, 68, 0.15);
  color: #fecdd3;
  border-color: rgba(239, 68, 68, 0.4);
}

.table-btn.icon {
  display: none;
}

@media (max-width: 960px) {
  .table-wrap {
    overflow-x: hidden;
  }
  table {
    display: block;
    width: 100%;
  }
  thead {
    display: none;
  }
  tbody {
    display: block;
    width: 100%;
  }
  tr {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--input-bg);
  }
  td {
    display: block;
    align-items: center;
    border-bottom: none;
    padding: 4px 0;
  }
  td:last-child {
    padding-bottom: 0;
  }
  .admin-cell,
  .name-cell,
  .table-actions {
    min-width: 0;
  }
  .admin-cell {
    order: 1;
    padding-right: 6px;
    padding-left: 0;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    width: 100%;
  }
  .name-cell {
    order: 2;
    width: 100%;
    text-align: left;
  }
  .email-cell {
    display: none;
  }
  .participant-email {
    display: none;
  }
  .participant-email-mobile {
    display: block;
    max-width: 100%;
    white-space: normal;
    margin: 0;
  }
  .participant-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: flex-start;
    width: 100%;
  }
  .participant-name {
    margin: 0;
    font-weight: 700;
    color: var(--text);
  }
  .table-actions {
    order: 3;
    min-width: 96px;
    margin-left: 0px;
    gap: 8px;
    justify-content: flex-start;
    width: auto;    padding-right: 0;
  }
  .table-btn {
    display: none;
  }
  .table-btn.icon {
    display: inline-flex;
    width: 32px;
    height: 32px;
    padding: 0;
    align-items: center;
    justify-content: center;
    font-size: 14px;
  }
  .table-btn.icon.danger {
    background: rgba(220, 38, 38, 0.12);
    border-color: rgba(220, 38, 38, 0.3);
  }
  .action-menu-wrap,
  .menu-btn,
  .action-menu {
    display: none !important;
  }
  th,
  td {
    padding: 6px 4px;
  }
}

.callout {
  background: var(--callout-bg);
  border: 1px solid var(--callout-border);
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--text);
}

.callout .mini {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.result {
  background: var(--result-bg);
  border: 1px dashed var(--border);
  border-radius: 14px;
  padding: 12px;
  min-height: 60px;
}

.result-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.result-card {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
}

.hidden {
  display: none !important;
}

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 12px 14px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: #f8fafc;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  max-width: 340px;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.error {
  background: #b91c1c;
  border-color: #7f1d1d;
  color: #fff;
}

.toast.success {
  background: #166534;
  border-color: #14532d;
  color: #f0fdf4;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 50;
}

.modal.hidden {
  display: none !important;
}

.modal-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 16px 12px;
  max-width: 420px;
  width: min(92vw, 420px);
  box-shadow: var(--shadow);
}

.modal-text {
  margin: 8px 0 12px;
  color: var(--text);
  line-height: 1.4;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

@media (max-width: 520px) {
  .modal-card {
    width: 94vw;
    padding: 14px 14px 12px;
  }
  .modal-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .modal-actions .button {
    width: 100%;
    justify-content: center;
  }
}

.mini {
  font-size: 12px;
  color: var(--muted);
}

.callout strong {
  color: var(--text);
}

.field-error {
  margin-top: 6px;
  font-size: 13px;
  color: var(--danger);
}

.input-error {
  border-color: var(--danger);
  background: rgba(239, 68, 68, 0.06);
}

.buttons .button {
  min-width: 140px;
}

.footer {
  max-width: 1280px;
  margin: 24px auto 12px;
  padding: 14px 12px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.footer-left .brand-name {
  font-weight: 700;
  color: var(--text);
}

.footer-left .brand-tag {
  font-size: 12px;
  color: var(--muted);
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.footer-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.footer-link:hover {
  text-decoration: none;
}

.footer-siglas {
  font-weight: 700;
  color: var(--text);
}

.send-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(3px);
  display: grid;
  place-items: center;
  z-index: 50;
}

.send-overlay.hidden {
  display: none;
}

.send-overlay-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 16px 20px;
  min-width: 260px;
  display: grid;
  gap: 10px;
  justify-items: center;
  box-shadow: var(--shadow);
}

.send-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.send-check {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(22, 163, 74, 0.12);
  border: 1px solid rgba(22, 163, 74, 0.35);
  display: grid;
  place-items: center;
  box-shadow: 0 12px 28px rgba(22, 163, 74, 0.25);
  animation: pop-in 0.35s ease;
}

.send-check-icon {
  width: 24px;
  height: 24px;
  stroke: #16a34a;
}

.send-overlay-text {
  font-weight: 700;
  color: var(--text);
  text-align: center;
}

.send-overlay-sub {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

#send-overlay-ok {
  width: 100%;
}

.button.loading {
  opacity: 0.7;
  cursor: not-allowed;
}

.button.sm {
  padding: 8px 12px;
  font-size: 14px;
  border-radius: 10px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pop-in {
  0% {
    transform: scale(0.7);
    opacity: 0;
  }
  70% {
    transform: scale(1.08);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@media (max-width: 780px) {
  body {
    padding: 16px var(--page-gutter);
  }
  .topbar {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: 8px;
  }
  .top-links {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
  }
  .hero-row {
    flex-direction: column;
  }
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .card.grid,
  .form-row {
    grid-template-columns: 1fr;
  }
  .actions {
    flex-direction: column;
    align-items: flex-start;
  }
  .buttons {
    width: 100%;
  }
  .buttons .button {
    flex: 1;
    text-align: center;
  }

  .nav-link {
    display: none;
  }

  .hero-visual {
    display: none;
  }

  .mode-toggle {
    width: auto;
    min-width: 130px;
    padding: 8px 10px;
    font-size: 12px;
  }

  .theme-toggle {
    width: auto;
    text-align: center;
    padding: 0;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-right {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}
.table-container {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color, #e5e7eb);
  text-align: left;
}

.data-table th {
  color: var(--muted, #6b7280);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.flex-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.actions-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.divider {
  height: 1px;
  width: 100%;
  background: var(--border-color, #e5e7eb);
  margin: 12px 0;
}

.panel {
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 12px;
  padding: 14px;
  margin-top: 14px;
  background: var(--card-bg, #fff);
}

.panel-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.inline-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted, #6b7280);
}

.input.sm {
  padding: 8px 10px;
  min-width: 220px;
}

.admin-card {
  max-width: 1100px;
  margin: 24px auto;
  padding: 20px;
}

.admin-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.page-title {
  margin: 4px 0 6px;
}

.pill {
  padding: 8px 12px;
  background: var(--pill-bg, #eef2ff);
  color: var(--pill-text, #3730a3);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border-color, #e5e7eb);
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  background: var(--pill-bg, #eef2ff);
  color: var(--pill-text, #3730a3);
  border-radius: 999px;
  font-size: 12px;
  margin-left: 8px;
}

.participant-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.participant-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 12px;
  background: var(--card-bg, #fff);
}

.participant-info .name {
  font-weight: 600;
  font-size: 15px;
}

.participant-info .email {
  font-size: 13px;
}

.participant-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-left: auto;
}

.action-buttons {
  display: inline-flex;
  gap: 8px;
}

.actions-row.wrap {
  flex-wrap: wrap;
  margin: 12px 0;
  gap: 10px;
}

/* Landing */
.landing-page {
  gap: 22px;
}

.landing .topbar {
  position: sticky;
}

.landing-hero,
.landing-section,
.landing-cta {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.landing-hero {
  position: relative;
  overflow: hidden;
}

.landing-hero::before,
.landing-hero::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  filter: blur(0);
  opacity: 0.4;
  pointer-events: none;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.35), transparent 70%);
  animation: hero-float 12s ease-in-out infinite;
}

.landing-hero::before {
  top: -80px;
  left: -60px;
}

.landing-hero::after {
  bottom: -90px;
  right: -70px;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.3), transparent 70%);
  animation-delay: 2s;
}

.landing-hero.is-visible,
.landing-section.is-visible,
.landing-cta.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.landing-grid {
  display: grid;
  grid-template-columns: 1.25fr minmax(300px, 380px);
  gap: clamp(18px, 2.5vw, 32px);
  align-items: start;
}

.landing-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.landing-preview {
  display: flex;
  justify-content: flex-end;
  align-self: start;
  margin-top: 18px;
}

.preview-card {
  width: min(100%, 360px);
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  padding: 18px;
  box-shadow: var(--shadow);
  animation: float 4s ease-in-out infinite;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.preview-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.18);
}

.preview-card h3 {
  margin: 12px 0 8px;
}

.preview-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.preview-top {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mini-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: var(--input-bg);
}

.preview-check {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.preview-check::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 0 5px rgba(56, 189, 248, 0.24);
}

.landing-section {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card-bg);
  box-shadow: var(--shadow);
  padding: 20px;
}

.landing-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.landing-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.landing-card,
.step-card,
.seo-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--input-bg);
  padding: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.landing-card:hover,
.step-card:hover,
.seo-card:hover {
  transform: translateY(-4px);
  border-color: rgba(14, 165, 233, 0.35);
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.12);
}

.landing-card h3,
.step-card h3,
.seo-card h3 {
  margin: 0 0 8px;
}

.landing-card p,
.step-card p,
.seo-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.step-number {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  font-weight: 700;
  margin-bottom: 10px;
  background: rgba(14, 165, 233, 0.12);
  color: #0284c7;
}

.seo-card {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(249, 115, 22, 0.1));
}

.seo-card code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  background: var(--panel);
  border-radius: 6px;
  padding: 2px 6px;
}

.landing-cta {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(120deg, rgba(14, 165, 233, 0.18), rgba(249, 115, 22, 0.14));
  padding: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow);
}

.landing-cta h2 {
  margin-bottom: 8px;
}

.landing-cta p {
  margin: 0;
  color: var(--muted);
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes hero-float {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(14px, 12px, 0) scale(1.05);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .landing-grid {
    grid-template-columns: 1fr;
  }

  .landing-preview {
    justify-content: center;
    margin-top: 0;
  }

  .landing-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .landing-hero,
  .landing-section,
  .landing-cta,
  .preview-card {
    transition: none;
    animation: none;
  }

  .landing-hero::before,
  .landing-hero::after {
    animation: none;
  }
}

@media (max-width: 780px) {
  .landing-cards,
  .steps-grid {
    grid-template-columns: 1fr;
  }

  .landing-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .landing-cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .landing-app-link {
    min-height: 34px;
    padding: 8px 10px;
  }
}
