:root {
  color-scheme: light;
  --fb-green: #36da02;
  --fb-green-strong: #2fbe08;
  --fb-green-soft: #eaffdf;
  --fb-black: #201c1d;
  --fb-black-2: #161416;
  --fb-ink: #252125;
  --fb-muted: #6f6a6d;
  --fb-border: #e5e3e4;
  --fb-border-strong: #d5d1d3;
  --fb-bg: #f7f8f6;
  --fb-surface: #ffffff;
  --fb-danger: #b42318;
  --fb-danger-bg: #fef3f2;
  --fb-warning: #8a5300;
  --fb-warning-bg: #fff7df;
  --fb-info: #2459a6;
  --fb-info-bg: #eef6ff;
  --shadow-sm: 0 2px 10px rgba(32, 28, 29, .06);
  --shadow-md: 0 18px 50px rgba(32, 28, 29, .10);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--fb-ink);
  background: var(--fb-bg);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--fb-bg); }
body { margin: 0; min-height: 100vh; background: var(--fb-bg); color: var(--fb-ink); }
button, input, select, textarea { font: inherit; }
a { color: inherit; }
img { max-width: 100%; display: block; }

/* Cabecalho / ambiente escuro */
.topbar {
  min-height: 76px;
  background: var(--fb-black-2);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 0 30px;
  border-bottom: 3px solid var(--fb-green);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .12);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 180px;
  text-decoration: none;
}
.brand img { width: 154px; height: auto; }

.topbar nav {
  display: flex;
  align-items: stretch;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.topbar nav a {
  display: inline-flex;
  align-items: center;
  min-height: 73px;
  padding: 0 14px;
  color: #d9d6d7;
  text-decoration: none;
  font-weight: 650;
  font-size: .94rem;
  border-bottom: 3px solid transparent;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.topbar nav a:hover,
.topbar nav a.active {
  color: #fff;
  background: rgba(255, 255, 255, .055);
  border-bottom-color: var(--fb-green);
}

.topbar-actions { display: flex; align-items: center; gap: 14px; }
.user-chip {
  display: grid;
  gap: 1px;
  text-align: right;
  font-size: .82rem;
  color: #d7d3d5;
}
.user-chip strong { color: #fff; font-size: .88rem; }

.link-button {
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.07);
  color: #fff;
  border-radius: 10px;
  padding: 9px 12px;
  cursor: pointer;
  font-weight: 650;
}
.link-button:hover { border-color: var(--fb-green); color: var(--fb-green); }

.container { max-width: 1320px; margin: 0 auto; padding: 34px 26px 60px; }

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}
.page-head h1, h1 { margin: 0 0 6px; font-size: clamp(1.65rem, 2vw, 2.15rem); line-height: 1.18; letter-spacing: -.025em; }
.page-head p, h1 + p { margin: 0; color: var(--fb-muted); }
h2 { margin-top: 32px; font-size: 1.3rem; }

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--fb-green-strong);
  font-size: .76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 8px;
}
.section-kicker::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--fb-green); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid var(--fb-border-strong);
  background: #fff;
  border-radius: 11px;
  padding: 9px 15px;
  text-decoration: none;
  color: var(--fb-black);
  cursor: pointer;
  font-weight: 700;
  transition: transform .12s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
}
.button:hover { border-color: #bcb7ba; box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.button.primary { background: var(--fb-green); color: var(--fb-black); border-color: var(--fb-green); }
.button.primary:hover { background: #43e512; border-color: #43e512; }
.button.dark { background: var(--fb-black); color: #fff; border-color: var(--fb-black); }
.button.small { min-height: 34px; padding: 6px 10px; border-radius: 9px; font-size: .88rem; }
.button:focus-visible, input:focus-visible, select:focus-visible, .password-toggle:focus-visible, a:focus-visible {
  outline: 3px solid rgba(54,218,2,.32);
  outline-offset: 2px;
}

.actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.actions a:not(.button) { color: #3e393b; font-weight: 650; text-decoration-color: #bbb5b8; text-underline-offset: 3px; }
.actions a:not(.button):hover { color: var(--fb-green-strong); text-decoration-color: var(--fb-green); }

.card {
  background: var(--fb-surface);
  border: 1px solid var(--fb-border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px 20px; }
.form-grid label, .stack label { display: grid; gap: 7px; color: #3d383b; font-weight: 700; font-size: .92rem; }
.form-grid input, .form-grid select, .stack input, .stack select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--fb-border-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--fb-ink);
  font-weight: 500;
}
.form-grid input:hover, .form-grid select:hover, .stack input:hover { border-color: #b9b4b6; }
.form-grid input:focus, .form-grid select:focus, .stack input:focus { border-color: var(--fb-green-strong); box-shadow: 0 0 0 4px rgba(54,218,2,.10); outline: none; }
.form-actions { grid-column: 1 / -1; display: flex; gap: 10px; align-items: center; margin-top: 3px; }
.help-text { color: var(--fb-muted); font-size: .82rem; font-weight: 500; }

.password-field { position: relative; width: 100%; }
.password-field input { padding-right: 48px; }
.password-toggle {
  position: absolute;
  top: 50%;
  right: 5px;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  display: inline-grid;
  place-items: center;
  color: #6f696c;
  cursor: pointer;
}
.password-toggle:hover { background: #f0f1ef; color: var(--fb-black); }
.password-toggle svg { width: 20px; height: 20px; }
.password-toggle [hidden] { display: none !important; }

.table-wrap { overflow: auto; background: #fff; border: 1px solid var(--fb-border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid #efedef; vertical-align: middle; }
th { background: #fbfcfa; font-size: .75rem; text-transform: uppercase; letter-spacing: .055em; color: #767074; font-weight: 800; }
tbody tr:hover { background: #fbfdf9; }
tbody tr:last-child td { border-bottom: 0; }
td strong { color: var(--fb-black); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 25px;
  border-radius: 999px;
  background: #f0eeee;
  color: #5a5558;
  padding: 3px 9px;
  font-size: .76rem;
  font-weight: 800;
  white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.success, .badge.active { background: var(--fb-green-soft); color: #237b08; }
.badge.error, .badge.failed { background: var(--fb-danger-bg); color: var(--fb-danger); }
.badge.warning, .badge.pending, .badge.running { background: var(--fb-warning-bg); color: var(--fb-warning); }
.badge.neutral { background: #f0eeee; color: #625d60; }

.muted { color: var(--fb-muted); font-size: .82rem; }
.empty-state { padding: 28px; text-align: center; color: var(--fb-muted); }

.stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
.stat {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--fb-border);
  border-radius: var(--radius-md);
  padding: 21px;
  display: grid;
  gap: 8px;
  box-shadow: var(--shadow-sm);
}
.stat::after { content: ""; position: absolute; width: 70px; height: 70px; border-radius: 50%; right: -26px; top: -28px; background: var(--fb-green-soft); }
.stat span { color: var(--fb-muted); font-size: .88rem; font-weight: 650; }
.stat strong { color: var(--fb-black); font-size: clamp(1.8rem,3vw,2.25rem); line-height: 1; }

.alert { padding: 13px 15px; border-radius: 11px; background: var(--fb-info-bg); color: var(--fb-info); border: 1px solid #d8e9fc; margin: 14px 0 20px; font-weight: 600; }
.alert.error { background: var(--fb-danger-bg); color: var(--fb-danger); border-color: #fecdca; }
.alert.success { background: var(--fb-green-soft); color: #237b08; border-color: #ccefc0; }

.meta { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 20px; margin: 0; }
.meta dt { font-size: .72rem; color: var(--fb-muted); text-transform: uppercase; letter-spacing: .055em; font-weight: 800; }
.meta dd { margin: 6px 0 0; color: var(--fb-black); font-weight: 650; overflow-wrap: anywhere; }

/* Login / ambiente claro: usa logo preta */
.auth-body {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(480px, 1.05fr);
  background: #fff;
}
.auth-brand-panel {
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 15%, rgba(54,218,2,.24), transparent 28%),
    linear-gradient(145deg, #171416 0%, #252125 72%, #1d191b 100%);
  color: #fff;
  padding: clamp(32px, 5vw, 72px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
}
.auth-brand-panel::after {
  content: "";
  width: 360px;
  height: 360px;
  border: 70px solid rgba(54,218,2,.09);
  border-radius: 50%;
  position: absolute;
  right: -170px;
  bottom: -140px;
}
.auth-brand-panel .dark-logo { width: min(310px, 72%); position: relative; z-index: 1; }
.auth-brand-copy { max-width: 560px; position: relative; z-index: 1; }
.auth-brand-copy h2 { font-size: clamp(2rem,4vw,3.25rem); line-height: 1.04; letter-spacing: -.04em; margin: 0 0 18px; }
.auth-brand-copy h2 span { color: var(--fb-green); }
.auth-brand-copy p { color: #cbc6c8; max-width: 500px; font-size: 1.02rem; }
.auth-brand-footer { color: #8f898c; font-size: .78rem; position: relative; z-index: 1; }
.auth-main { min-height: 100vh; display: grid; place-items: center; background: #fbfcfa; padding: 30px; }
.auth-card { width: min(450px, 100%); background: #fff; border: 1px solid var(--fb-border); border-radius: var(--radius-lg); padding: clamp(26px,4vw,42px); box-shadow: var(--shadow-md); }
.auth-light-logo { width: 190px; margin-bottom: 34px; }
.auth-card h1 { margin-bottom: 7px; }
.auth-card > p { margin: 0 0 26px; color: var(--fb-muted); }
.auth-card .button.primary { width: 100%; min-height: 48px; margin-top: 2px; }
.stack { display: grid; gap: 18px; }

.app-footer { margin-top: 42px; padding-top: 20px; border-top: 1px solid var(--fb-border); color: #8a8588; font-size: .78rem; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

@media (max-width: 980px) {
  .user-chip { display: none; }
  .stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .meta { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .auth-body { grid-template-columns: 1fr; background: #fbfcfa; }
  .auth-brand-panel { display: none; }
  .auth-main { padding: 26px 18px; }
  .auth-card { max-width: 500px; }
}

@media (max-width: 760px) {
  :root { font-size: 16px; }
  .topbar { position: static; align-items: center; flex-wrap: wrap; gap: 12px; padding: 14px 16px 0; }
  .brand { min-width: 0; flex: 1; }
  .brand img { width: 140px; }
  .topbar-actions { margin-left: auto; }
  .topbar nav { order: 3; width: calc(100% + 32px); margin: 0 -16px; padding: 0 10px; overflow-x: auto; scrollbar-width: none; border-top: 1px solid rgba(255,255,255,.08); }
  .topbar nav::-webkit-scrollbar { display: none; }
  .topbar nav a { min-height: 50px; padding: 0 11px; white-space: nowrap; font-size: .88rem; }
  .container { padding: 24px 14px 44px; }
  .page-head { flex-direction: column; gap: 15px; }
  .page-head .actions, .page-head > .button { width: 100%; }
  .page-head .actions .button { flex: 1 1 160px; }
  .form-grid, .stats, .meta { grid-template-columns: 1fr; }
  .card { padding: 18px; }
  th, td { padding: 12px; }
  .auth-card { border-radius: 18px; padding: 26px 22px; }
  .auth-light-logo { width: 168px; margin-bottom: 28px; }
}

.actions-inline{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.badge.success{background:#eafbe4;color:#176b08;border-color:#bcefac}

/* Eventos Sympla - catalogo ativo do cliente */
.alert.warning { background: var(--fb-warning-bg); color: var(--fb-warning); border-color: #f1ddb0; }
.alert a { font-weight: 800; text-underline-offset: 3px; }
.events-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 230px));
  gap: 12px;
  margin: 0 0 18px;
}
.summary-card {
  background: #fff;
  border: 1px solid var(--fb-border);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 2px;
}
.summary-card span { color: var(--fb-muted); font-size: .78rem; font-weight: 700; }
.summary-card strong { color: var(--fb-black); font-size: 1.55rem; line-height: 1.1; }
.events-table { min-width: 1060px; }
.event-name-cell { display: flex; align-items: center; gap: 12px; min-width: 250px; }
.event-thumb {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--fb-border);
  background: #f1f1ef;
  flex: 0 0 58px;
}
.event-id, .event-date-end { display: block; margin-top: 3px; }
.event-actions { min-width: 190px; }
.inline-form { display: inline; margin: 0; }
.secondary-section { margin-top: 34px; }
.section-title-row { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 14px; }
.section-title-row h2 { margin: 0; }

@media (max-width: 760px) {
  .events-summary { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .summary-card { padding: 12px 13px; }
  .event-thumb { width: 48px; height: 48px; flex-basis: 48px; }
}

/* Eventos Sympla compartilhados */
.shared-event-card { margin: 18px 0; display: grid; gap: 18px; }
.shared-event-copy h2 { margin: 4px 0 8px; font-size: 1.15rem; }
.shared-event-copy p { margin: 0; color: var(--fb-muted); max-width: 900px; line-height: 1.55; }
.shared-event-form { display: grid; grid-template-columns: minmax(220px,.8fr) minmax(280px,1.2fr) auto; gap: 14px; align-items: end; }
.shared-event-form label { display: grid; gap: 7px; color: #3d383b; font-weight: 700; font-size: .92rem; }
.shared-event-form input, .shared-event-form select { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--fb-border-strong); border-radius: 10px; background: #fff; color: var(--fb-ink); }
.shared-event-action { display: flex; align-items: end; }
.shared-event-note { padding: 12px 14px; border-radius: 10px; background: #f7f8f6; color: var(--fb-muted); font-size: .86rem; line-height: 1.5; }
.shared-event-note a { color: var(--fb-black); font-weight: 800; }
.event-access-warning { display: block; margin-top: 3px; color: #9a6700; }
@media (max-width: 900px) {
  .shared-event-form { grid-template-columns: 1fr; }
  .shared-event-action .button { width: 100%; }
}


/* Participantes - detalhes da inscricao */
.participant-detail-card { margin-top: 18px; }
.detail-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.detail-section-head h2 { margin: 0 0 5px; font-size: 1.2rem; }
.detail-section-head p { margin: 0; color: var(--fb-muted); }
.detail-grid { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0; border: 1px solid var(--fb-border); border-radius: 12px; overflow: hidden; }
.detail-grid > div { min-width: 0; padding: 15px 17px; border-bottom: 1px solid var(--fb-border); background: #fff; }
.detail-grid > div:nth-child(odd) { border-right: 1px solid var(--fb-border); }
.detail-grid > div:nth-last-child(-n+2) { border-bottom: 0; }
.detail-grid dt { margin: 0 0 6px; color: var(--fb-muted); font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .045em; }
.detail-grid dd { margin: 0; color: var(--fb-ink); font-weight: 650; overflow-wrap: anywhere; }
.custom-fields-grid dd { white-space: normal; font-weight: 600; }
.detail-empty { border: 1px dashed var(--fb-border-strong); border-radius: 12px; background: #fbfcfa; }
@media (max-width: 720px) {
  .detail-grid { grid-template-columns: 1fr; }
  .detail-grid > div:nth-child(odd) { border-right: 0; }
  .detail-grid > div:nth-last-child(-n+2) { border-bottom: 1px solid var(--fb-border); }
  .detail-grid > div:last-child { border-bottom: 0; }
}

/* Acoes por icone - listagem de eventos */
.icon-button {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--fb-border-strong);
  border-radius: 10px;
  background: #fff;
  color: #4a4548;
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease, color .15s ease;
}
.icon-button:hover {
  background: var(--fb-green-soft);
  border-color: var(--fb-green);
  color: #237b08;
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.icon-button:focus-visible {
  outline: 3px solid rgba(54,218,2,.32);
  outline-offset: 2px;
}
.icon-button .action-svg {
  width: 20px;
  height: 20px;
  display: block;
  pointer-events: none;
}
.event-actions {
  gap: 8px;
  flex-wrap: nowrap;
}
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Paginacao - participantes */
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -4px 0 12px;
  color: var(--fb-muted);
  font-size: .88rem;
}
.table-toolbar strong { color: var(--fb-ink); }
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
}
.pagination-pages { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.pagination-link,
.pagination-page {
  min-width: 38px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 11px;
  border: 1px solid var(--fb-border-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--fb-ink);
  text-decoration: none;
  font-size: .86rem;
  font-weight: 750;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.pagination-link svg { width: 17px; height: 17px; }
.pagination-link:hover,
.pagination-page:hover { background: var(--fb-green-soft); border-color: var(--fb-green); color: #237b08; }
.pagination-page.active { background: var(--fb-black); border-color: var(--fb-black); color: #fff; }
.pagination-link.disabled { opacity: .45; pointer-events: none; }
.pagination-ellipsis { min-width: 24px; text-align: center; color: var(--fb-muted); }
@media (max-width: 640px) {
  .pagination { align-items: stretch; flex-wrap: wrap; }
  .pagination-pages { order: 3; width: 100%; }
  .pagination-link { flex: 1; }
}
