:root {
  --ink: #0b1a2a;
  --muted: #4a5a70;
  --accent: #2456f6;
  --accent-dark: #1a43c9;
  --sea: #1f6feb;
  --sand: #f1f5ff;
  --panel: #ffffff;
  --border: #d9e2f3;
  --shadow: 0 18px 40px rgba(11, 26, 42, 0.12);
  --color-primary: var(--accent);
  --color-primary-hover: var(--accent-dark);
  --color-primary-active: #1537a6;
  --color-bg: #f3f6ff;
  --color-surface: var(--panel);
  --color-border: var(--border);
  --color-text: var(--ink);
  --color-danger: #d62828;
  --color-success: #1b8f3a;
  --color-warning: #ffb703;
  --radius-btn: 12px;
  --shadow-btn: 0 12px 24px rgba(11, 26, 42, 0.14);
  --focus-ring: 0 0 0 3px rgba(36, 86, 246, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top left, #e3e9ff 0%, #f3f6ff 35%, #edf2ff 70%, #dbe7ff 100%);
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 30px;
  text-decoration: none;
}

.brand-logo img {
  width: 70px;
  height: 70px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
  background: #fff;
}

.brand a {
  font-family: "Fraunces", serif;
  font-size: 20px;
  font-weight: 600;
}

.brand-text {
  font-family: "Mea Culpa", "Playwrite NZ Basic Guides", "Fraunces", serif;
  font-size: 40px;
  font-weight: 400;
  letter-spacing: 0.9px;
  color: var(--ink);
}

.brand .tag {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--panel);
  font-family: inherit;
}

.nav {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.container {
  padding: 32px;
  max-width: 1200px;
  margin: 0 auto;
}

.card {
  background: var(--panel);
  padding: 24px;
  border-radius: 18px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.section-gap {
  margin-top: 24px;
}

.card.narrow {
  max-width: 480px;
  margin: 24px auto;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.hero h1 {
  font-family: "Fraunces", serif;
  font-size: 32px;
  margin: 0;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.grid.three {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.evento-endereco {
  grid-column: 1 / -1;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-6px);
  transition: max-height 0.35s ease, opacity 0.25s ease, transform 0.25s ease, margin 0.35s ease;
  margin-top: 0;
  pointer-events: none;
}

.evento-endereco.is-expanded {
  max-height: 1200px;
  opacity: 1;
  transform: translateY(0);
  margin-top: 8px;
  pointer-events: auto;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
}

.field.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

.input {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 14px;
  background: #fff;
  min-height: 44px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input.textarea {
  min-height: 220px;
  resize: vertical;
}

.input:hover {
  border-color: #b6c5e0;
}

.input.is-error {
  border-color: #d62828;
  box-shadow: 0 0 0 2px rgba(214, 40, 40, 0.12);
}

.btn,
.btn-primary,
.btn-secondary,
.btn-ghost,
.btn-danger,
.btn-success,
.btn-link,
.btn-warning,
.btn.primary,
.btn.secondary,
.btn.ghost,
.btn.danger,
.btn.warning,
.btn.success {
  --btn-bg: var(--color-surface);
  --btn-color: var(--color-text);
  --btn-border: var(--color-border);
  --btn-hover: #eef2ff;
  --btn-active: #e6ebff;
  --btn-spinner: currentColor;
  --btn-height: 44px;
  --btn-padding-x: 16px;
  background: var(--btn-bg);
  color: var(--btn-color);
  border: 1px solid var(--btn-border);
  padding: 0 var(--btn-padding-x);
  min-height: var(--btn-height);
  border-radius: var(--radius-btn);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  text-decoration: none;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.08s ease, color 0.18s ease;
  position: relative;
}

.btn:hover,
.btn-primary:hover,
.btn-secondary:hover,
.btn-ghost:hover,
.btn-danger:hover,
.btn-success:hover,
.btn-warning:hover,
.btn.primary:hover,
.btn.secondary:hover,
.btn.ghost:hover,
.btn.danger:hover,
.btn.warning:hover,
.btn.success:hover {
  background: var(--btn-hover);
}

.btn:active,
.btn-primary:active,
.btn-secondary:active,
.btn-ghost:active,
.btn-danger:active,
.btn-success:active,
.btn-warning:active,
.btn.primary:active,
.btn.secondary:active,
.btn.ghost:active,
.btn.danger:active,
.btn.warning:active,
.btn.success:active {
  background: var(--btn-active);
  transform: translateY(1px);
}

.btn:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.btn-ghost:focus-visible,
.btn-danger:focus-visible,
.btn-success:focus-visible,
.btn-warning:focus-visible,
.btn-link:focus-visible,
.btn.primary:focus-visible,
.btn.secondary:focus-visible,
.btn.ghost:focus-visible,
.btn.danger:focus-visible,
.btn.warning:focus-visible,
.btn.success:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.btn-primary,
.btn.primary {
  --btn-bg: var(--color-primary);
  --btn-color: #fff;
  --btn-border: transparent;
  --btn-hover: var(--color-primary-hover);
  --btn-active: var(--color-primary-active);
  --btn-spinner: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-btn);
}

.btn-secondary,
.btn.secondary {
  --btn-bg: #eef2ff;
  --btn-color: var(--color-text);
  --btn-border: #d7e1f5;
  --btn-hover: #e4ecff;
  --btn-active: #d9e4ff;
}

.btn-ghost,
.btn.ghost {
  --btn-bg: transparent;
  --btn-color: var(--color-text);
  --btn-border: transparent;
  --btn-hover: rgba(36, 86, 246, 0.08);
  --btn-active: rgba(36, 86, 246, 0.14);
  box-shadow: none;
}

.btn-danger,
.btn.danger {
  --btn-bg: var(--color-danger);
  --btn-color: #fff;
  --btn-border: transparent;
  --btn-hover: #b91f1f;
  --btn-active: #9b1b1b;
  --btn-spinner: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-btn);
}

.btn-success,
.btn.success {
  --btn-bg: var(--color-success);
  --btn-color: #fff;
  --btn-border: transparent;
  --btn-hover: #157233;
  --btn-active: #0f5a28;
  --btn-spinner: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-btn);
}

.btn-warning,
.btn.warning {
  --btn-bg: var(--color-warning);
  --btn-color: #1b1b1b;
  --btn-border: transparent;
  --btn-hover: #f1a300;
  --btn-active: #d48e00;
}

.btn-link,
.link-button {
  background: none;
  border: none;
  padding: 0;
  min-height: auto;
  font-weight: 600;
  color: var(--color-text);
  box-shadow: none;
}

.btn-link:hover,
.link-button:hover {
  color: var(--color-primary);
}

.btn-sm,
.btn.small {
  --btn-height: 32px;
  --btn-padding-x: 12px;
  font-size: 12px;
}

.btn-md {
  --btn-height: 44px;
  --btn-padding-x: 16px;
  font-size: 14px;
}

.btn-lg {
  --btn-height: 52px;
  --btn-padding-x: 18px;
  font-size: 15px;
}

.btn-with-icon {
  gap: 8px;
}

.btn-block {
  width: 100%;
}

.btn[disabled],
.btn:disabled,
.btn.is-disabled,
.btn-primary[disabled],
.btn-secondary[disabled],
.btn-danger[disabled],
.btn-success[disabled],
.btn-ghost[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
  transform: none;
}

.btn[aria-pressed="true"],
.btn.is-pressed {
  box-shadow: inset 0 0 0 2px rgba(15, 23, 42, 0.12);
  background: var(--btn-active);
}

.inline {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

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

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

.table-details {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.table-details summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(245, 247, 250, 0.9));
}

.table-details summary::-webkit-details-marker {
  display: none;
}

.table-details summary::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 7px solid var(--muted);
  transition: transform 0.2s ease;
}

.table-details[open] summary::after {
  transform: rotate(180deg);
}

.table-details summary .hint {
  font-weight: 500;
  color: var(--muted);
}

.table-details .details-body {
  padding: 12px 14px 14px;
  border-top: 1px dashed var(--border);
  background: rgba(255, 255, 255, 0.7);
}

.table-details .details-body .table {
  font-size: 13px;
}

.table-details .details-body .table th,
.table-details .details-body .table td {
  padding: 8px;
}

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

.birthday-section {
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 32px 24px 28px;
  background: radial-gradient(
      120% 120% at 50% 0%,
      rgba(255, 255, 255, 0.98) 0%,
      rgba(244, 247, 250, 0.95) 55%,
      rgba(235, 240, 246, 0.92) 100%
    ),
    var(--panel);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.birthday-section::before {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  left: -120px;
  top: -140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(120, 157, 255, 0.18), transparent 70%);
  pointer-events: none;
}

.birthday-section::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -100px;
  bottom: -120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(46, 130, 255, 0.12), transparent 70%);
  pointer-events: none;
}

.birthday-title {
  margin-bottom: 6px;
  font-size: 22px;
  font-weight: 600;
}

.birthday-subtitle {
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 26px;
}

.birthday-carousel {
  --main-w: 300px;
  --main-h: 380px;
  --side-w: 220px;
  --side-h: 320px;
  --offset: 200px;
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --slide-duration: 450ms;
  --slide-ease: cubic-bezier(0.42, 0, 0.58, 1);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  padding: 12px 0;
  max-width: calc(var(--main-w) + var(--offset) * 2 + 140px);
  perspective: 1000px;
  isolation: isolate;
}

.birthday-carousel:focus-visible {
  outline: 2px solid rgba(15, 23, 42, 0.25);
  outline-offset: 6px;
}

.birthday-track {
  position: relative;
  width: calc(var(--main-w) + var(--offset) * 2);
  height: var(--main-h);
}

.birthday-slide {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(241, 243, 245, 0.95);
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.12);
  --flip-x: 0px;
  --flip-y: 0px;
  --flip-sx: 1;
  --flip-sy: 1;
  will-change: transform, opacity, filter;
  transition: transform var(--slide-duration) var(--slide-ease),
    opacity var(--slide-duration) var(--slide-ease),
    box-shadow var(--slide-duration) var(--slide-ease),
    filter var(--slide-duration) var(--slide-ease);
  transform-style: preserve-3d;
}

.birthday-carousel.is-resetting .birthday-slide {
  transition: none;
}

.birthday-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(0, 0, 0, 0.12));
  opacity: 0.4;
  pointer-events: none;
}

.birthday-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.birthday-slide--current {
  width: var(--main-w);
  height: var(--main-h);
  transform: translate(var(--flip-x), var(--flip-y)) scale(var(--flip-sx), var(--flip-sy)) translate(-50%, -50%)
    scale(1) rotateX(var(--tilt-y)) rotateY(var(--tilt-x));
  opacity: 1;
  z-index: 3;
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.22);
  border-color: rgba(15, 23, 42, 0.12);
  filter: saturate(1.05);
}

.birthday-slide--current::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  pointer-events: none;
}

.birthday-slide--prev,
.birthday-slide--next {
  width: var(--side-w);
  height: var(--side-h);
  opacity: 0.55;
  z-index: 2;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  filter: saturate(0.85);
}

.birthday-slide--prev {
  transform: translate(var(--flip-x), var(--flip-y)) scale(var(--flip-sx), var(--flip-sy)) translate(-50%, -50%)
    translateX(calc(var(--offset) * -1)) scale(0.88) rotateY(12deg);
}

.birthday-slide--next {
  transform: translate(var(--flip-x), var(--flip-y)) scale(var(--flip-sx), var(--flip-sy)) translate(-50%, -50%)
    translateX(var(--offset)) scale(0.88) rotateY(-12deg);
}

.birthday-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  backdrop-filter: blur(8px);
}

.birthday-control.prev {
  left: 8px;
}

.birthday-control.next {
  right: 8px;
}

.birthday-control:hover {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.18);
  transform: translateY(-50%) scale(1.04);
}

.birthday-control:focus-visible {
  outline: 2px solid rgba(15, 23, 42, 0.25);
  outline-offset: 3px;
}

.birthday-name {
  margin-top: 10px;
  font-size: 18px;
  font-weight: 600;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.3px;
  transition: opacity var(--slide-duration) var(--slide-ease), transform var(--slide-duration) var(--slide-ease);
  min-height: 24px;
}

.birthday-name.is-fading {
  opacity: 0;
  transform: translateY(6px);
}

.birthday-name.is-updating {
  opacity: 1;
  transform: translateY(-2px);
}

.birthday-carousel.is-sliding[data-direction="next"] .birthday-slide--current {
  transform: translate(-50%, -50%) translateX(calc(var(--offset) * -1)) scale(0.88) rotateY(12deg);
  opacity: 0.6;
  z-index: 2;
}

.birthday-carousel.is-sliding[data-direction="next"] .birthday-slide--next {
  transform: translate(-50%, -50%) scale(1) rotateX(var(--tilt-y)) rotateY(var(--tilt-x));
  opacity: 1;
  z-index: 3;
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.22);
  border-color: rgba(15, 23, 42, 0.12);
  filter: saturate(1.05);
}

.birthday-carousel.is-sliding[data-direction="next"] .birthday-slide--prev {
  transform: translate(-50%, -50%) translateX(calc(var(--offset) * -2)) scale(0.82) rotateY(18deg);
  opacity: 0.15;
  z-index: 1;
}

.birthday-carousel.is-sliding[data-direction="prev"] .birthday-slide--current {
  transform: translate(-50%, -50%) translateX(var(--offset)) scale(0.88) rotateY(-12deg);
  opacity: 0.6;
  z-index: 2;
}

.birthday-carousel.is-sliding[data-direction="prev"] .birthday-slide--prev {
  transform: translate(-50%, -50%) scale(1) rotateX(var(--tilt-y)) rotateY(var(--tilt-x));
  opacity: 1;
  z-index: 3;
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.22);
  border-color: rgba(15, 23, 42, 0.12);
  filter: saturate(1.05);
}

.birthday-carousel.is-sliding[data-direction="prev"] .birthday-slide--next {
  transform: translate(-50%, -50%) translateX(calc(var(--offset) * 2)) scale(0.82) rotateY(-18deg);
  opacity: 0.15;
  z-index: 1;
}

.birthday-empty {
  border: 1px dashed rgba(15, 23, 42, 0.18);
  border-radius: 18px;
  padding: 28px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.8);
}

@media (max-width: 900px) {
  .birthday-carousel {
    --main-w: 260px;
    --main-h: 340px;
    --side-w: 200px;
    --side-h: 280px;
    --offset: 160px;
  }
}

@media (max-width: 640px) {
  .birthday-carousel {
    --main-w: 220px;
    --main-h: 300px;
    --side-w: 160px;
    --side-h: 230px;
    --offset: 110px;
  }
  .birthday-control {
    width: 34px;
    height: 34px;
  }
  .birthday-slide--prev,
  .birthday-slide--next {
    opacity: 0.5;
  }
}

@media (prefers-reduced-motion: reduce) {
  .birthday-slide {
    transition: none;
  }
  .birthday-control {
    transition: none;
  }
  .birthday-name {
    transition: none;
  }
  .birthday-carousel.is-sliding .birthday-slide--current {
    transform: translate(-50%, -50%) scale(1) rotateX(0deg) rotateY(0deg);
  }
}

.stat {
  background: var(--panel);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

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

.stat strong {
  display: block;
  font-size: 26px;
  margin-top: 6px;
}

.badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: #e9ecef;
  color: var(--ink);
}

.badge.success {
  background: #d8f3dc;
  color: #1b4332;
}

.badge.danger {
  background: #f8d7da;
  color: #842029;
}

.profile {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 16px;
  object-fit: cover;
  border: 2px solid var(--border);
}

.avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: #e9ecff;
}

.table-person {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toast-container {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.toast {
  padding: 12px 16px;
  border-radius: 12px;
  background: #f3f4f6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.toast.success {
  background: #d8f3dc;
}

.toast.info {
  background: #d9edf7;
}

.toast.warning {
  background: #fff3cd;
}

.toast.danger {
  background: #f8d7da;
}

.link-box {
  display: flex;
  gap: 8px;
  align-items: center;
}

.qr {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px dashed var(--border);
  padding: 16px;
}

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

.hint.error {
  color: #d62828;
}

.modal {
  --radius: 16px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  --border: rgba(0, 0, 0, 0.08);
  --muted: rgba(0, 0, 0, 0.55);
  --surface: #ffffff;
  --bg-overlay: rgba(0, 0, 0, 0.55);
  --focus: 0 0 0 3px rgba(59, 130, 246, 0.35);
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal.open {
  opacity: 1;
  pointer-events: auto;
}

.modal[data-confirm-modal-root] {
  z-index: 60;
}

.modal[data-presence-list-modal-root] {
  z-index: 70;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(6px);
}

.modal-card {
  position: relative;
  background: var(--surface);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: min(980px, calc(100vw - 32px));
  max-width: 640px;
  max-height: calc(100vh - 32px);
  z-index: 51;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transform: translateY(8px) scale(0.98);
  transition: transform 0.2s ease, max-height 0.35s ease;
}

.modal.open .modal-card {
  transform: translateY(0) scale(1);
}

.modal-card.size-sm {
  max-width: 480px;
}

.modal-card.size-md {
  max-width: 640px;
}

.modal-card.size-lg {
  max-width: 840px;
}

.modal-card.size-xl {
  max-width: 980px;
}

.modal-card.evento-modal-compacto {
  max-height: 70vh;
}

.modal-card.evento-modal-expandido {
  max-height: calc(100vh - 32px);
}

.presence-card {
  max-width: 520px;
}

.presence-titlebar {
  margin-bottom: 4px;
}

.presence-subtitle {
  margin: 0;
}

.presence-input {
  font-size: 16px;
  letter-spacing: 0.03em;
}

.presence-status {
  min-height: 18px;
  font-size: 13px;
  color: var(--muted);
  margin: -4px 0 6px;
}

.presence-status.error {
  color: #d62828;
}

.presence-actions {
  justify-content: space-between;
}

.btn.is-loading {
  opacity: 0.85;
  cursor: progress;
  pointer-events: none;
}

.btn.is-loading::after {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid var(--btn-spinner);
  border-top-color: transparent;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  animation: spin 0.8s linear infinite;
}

.btn.is-loading {
  padding-right: calc(var(--btn-padding-x) + 20px);
}

.btn.is-loading[data-spinner-position="left"] {
  padding-right: var(--btn-padding-x);
  padding-left: calc(var(--btn-padding-x) + 20px);
}

.btn.is-loading::after {
  right: 12px;
}

.btn.is-loading[data-spinner-position="left"]::after {
  left: 12px;
  right: auto;
}

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

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

.modal-titlebar h3 {
  margin: 0;
  font-size: 20px;
}

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

.modal-body {
  display: grid;
  gap: 20px;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 4px;
  flex: 1;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.event-modal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 20px;
  width: 100%;
  min-width: 0;
}

.event-modal-left,
.event-modal-right {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.event-modal-header {
  display: grid;
  gap: 12px;
}

.event-header-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.event-title {
  margin: 0;
  font-size: 24px;
}

.event-header-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.event-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.event-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f6f8ff;
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 999px;
}

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

.event-meta-value {
  font-size: 13px;
  color: var(--ink);
  font-weight: 600;
}

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

.event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.event-desc {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.event-card {
  background: #fdfdff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  display: grid;
  gap: 12px;
  box-shadow: 0 12px 26px rgba(11, 26, 42, 0.08);
  min-width: 0;
}

.event-card-row {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.event-card-row .event-card {
  height: 100%;
}

.event-card-row > .event-card:only-child {
  grid-column: 1 / -1;
}

.event-card-title {
  margin: 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.event-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.event-card-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
}

.event-card-item {
  display: grid;
  gap: 4px;
}

.event-card-label {
  font-size: 12px;
  color: var(--muted);
}

.event-card-value {
  font-size: 14px;
  color: var(--ink);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.event-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.event-copy-button {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.event-copy-feedback {
  font-size: 12px;
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.event-copy-feedback.is-visible {
  opacity: 1;
}

.modal-card.integrante-edit-modal {
  --edit-radius: 22px;
  --edit-border: rgba(11, 26, 42, 0.08);
  --edit-shadow: 0 24px 52px rgba(11, 26, 42, 0.16);
  --edit-muted: rgba(11, 26, 42, 0.58);
  --edit-soft: #f4f6fb;
  --edit-field-border: #d6e0f0;
  --edit-field-readonly: #f2f5fb;
  padding: 0;
  max-width: 980px;
  display: flex;
  flex-direction: column;
  max-height: min(90vh, calc(100vh - 32px));
  border-radius: var(--edit-radius);
  border: 1px solid var(--edit-border);
  box-shadow: var(--edit-shadow);
  overflow: hidden;
}

.modal-card.integrante-detail-modal {
  --detail-radius: 22px;
  --detail-shadow: 0 26px 56px rgba(11, 26, 42, 0.16);
  --detail-border: rgba(11, 26, 42, 0.08);
  --detail-soft: #f5f7fb;
  --detail-muted: rgba(11, 26, 42, 0.55);
  max-width: 980px;
  max-height: min(90vh, calc(100vh - 32px));
  padding: 20px 22px 18px;
  border-radius: var(--detail-radius);
  border-color: var(--detail-border);
  box-shadow: var(--detail-shadow);
}

.modal-card.integrante-detail-modal .modal-titlebar {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--detail-border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, #ffffff 100%);
}

.modal-card.integrante-detail-modal .modal-titlebar h3 {
  font-size: 18px;
}

.modal-card.integrante-detail-modal .modal-actions .btn.ghost {
  border: 1px solid var(--detail-border);
  background: #fff;
  border-radius: 999px;
  padding: 8px 14px;
}

.modal-card.integrante-detail-modal .modal-actions .icon-button {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--detail-border);
  background: #fff;
  transition: background 0.2s ease, transform 0.2s ease;
}

.modal-card.integrante-detail-modal .modal-actions .icon-button:hover {
  background: var(--detail-soft);
  transform: translateY(-1px);
}

.modal-card.integrante-detail-modal .modal-body {
  gap: 18px;
  padding-right: 8px;
}

.integrante-detail {
  display: grid;
  gap: 18px;
}

.integrante-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 18px;
  align-items: start;
}

.integrante-summary {
  background: linear-gradient(180deg, #ffffff 0%, #f7f9ff 100%);
  border: 1px solid var(--detail-border);
  border-radius: 20px;
  padding: 20px;
  display: grid;
  gap: 16px;
  box-shadow: 0 16px 30px rgba(11, 26, 42, 0.08);
}

.integrante-summary-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.integrante-avatar-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.integrante-avatar {
  width: 96px;
  height: 96px;
  border-radius: 20px;
  border: 2px solid rgba(11, 26, 42, 0.08);
  object-fit: cover;
}

.integrante-avatar.placeholder {
  background: #eef2ff;
  color: rgba(11, 26, 42, 0.6);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.integrante-summary-text {
  display: grid;
  gap: 8px;
  min-width: 0;
}

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

.integrante-name {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.integrante-role {
  display: grid;
  gap: 4px;
}

.integrante-role-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--detail-muted);
}

.integrante-role-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.integrante-info {
  display: grid;
  gap: 10px;
}

.integrante-info-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "label action"
    "value action";
  gap: 4px 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.03);
  border: 1px solid rgba(15, 23, 42, 0.08);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.integrante-info-row:hover {
  border-color: rgba(36, 86, 246, 0.2);
  box-shadow: 0 14px 26px rgba(11, 26, 42, 0.12);
  transform: translateY(-1px);
}

.integrante-info-label {
  grid-area: label;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--detail-muted);
}

.integrante-info-value {
  grid-area: value;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.integrante-info-actions {
  grid-area: action;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

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

.integrante-detail-cards {
  display: grid;
  gap: 16px;
}

.integrante-card {
  background: #ffffff;
  border-color: var(--detail-border);
  border-radius: 18px;
  box-shadow: 0 16px 30px rgba(11, 26, 42, 0.08);
}

.integrante-card .event-card-title {
  letter-spacing: 0.16em;
}

.integrante-card-actions {
  position: relative;
}

.integrante-doc-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.integrante-chip-row .event-card-value {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.integrante-address {
  display: grid;
  gap: 10px;
}

.integrante-address-line {
  display: grid;
  gap: 4px;
}

.integrante-address-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.integrante-address-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--detail-muted);
}

.integrante-address-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.integrante-detail .integrante-copy-button {
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.integrante-detail .integrante-copy-button:hover {
  background: #eef2ff;
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(11, 26, 42, 0.12);
}

.integrante-detail .integrante-copy-feedback {
  top: auto;
  bottom: calc(100% + 8px);
  right: 0;
  background: rgba(11, 26, 42, 0.92);
  box-shadow: 0 10px 20px rgba(11, 26, 42, 0.18);
}

.integrante-desistencia {
  display: grid;
  gap: 12px;
  border-top: 1px dashed var(--detail-border);
  padding-top: 16px;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.integrante-desistencia.is-open {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 900px) {
  .integrante-info-row {
    grid-template-columns: 120px minmax(0, 1fr) auto;
    grid-template-areas: "label value action";
    align-items: center;
  }
}

.modal-card.integrante-edit-modal .modal-titlebar {
  display: none;
}

.modal-card.integrante-edit-modal .modal-body {
  padding: 0;
}

.modal-card.integrante-edit-modal .integrante-edit-header {
  position: sticky;
  top: 0;
  z-index: 4;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, #ffffff 100%);
  border-bottom: 1px solid transparent;
}

.modal-card.integrante-edit-modal .integrante-edit-header.is-scrolled {
  border-bottom-color: var(--edit-border);
  box-shadow: 0 10px 22px rgba(11, 26, 42, 0.12);
}

.modal-card.integrante-edit-modal .integrante-edit-content {
  padding-bottom: 44px;
}

.modal-card.integrante-edit-modal .integrante-edit-footer {
  position: sticky;
  bottom: 0;
  z-index: 4;
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid var(--edit-border);
  box-shadow: 0 -12px 24px rgba(11, 26, 42, 0.12);
  padding: 14px 28px 18px;
}

.integrante-edit {
  display: grid;
  gap: 20px;
}

.integrante-edit-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 28px 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, #ffffff 100%);
}

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

.integrante-edit-title {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.01em;
}

.integrante-edit-hint {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
  max-width: 420px;
}

.integrante-edit-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.integrante-edit-actions .btn.secondary {
  border-radius: 999px;
  border-color: #d7e1f5;
  background: #f2f6ff;
}

.integrante-edit-actions .btn.secondary:hover {
  background: #e6efff;
}

.integrante-edit-close {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 999px;
  font-weight: 600;
}

.integrante-edit-content {
  display: grid;
  gap: 18px;
  padding: 0 28px 28px;
}

.integrante-edit-editable {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.integrante-edit-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 14px 26px rgba(11, 26, 42, 0.08);
  display: grid;
  gap: 16px;
}

.integrante-edit-card-primary {
  background: linear-gradient(180deg, #f8faff 0%, #f1f5ff 100%);
  border-color: #d7e3ff;
}

.integrante-edit-card-muted {
  background: #f9fbff;
  border-color: #e0e8f7;
}

.integrante-edit-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.integrante-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.integrante-edit-grid .span-2 {
  grid-column: 1 / -1;
}

.integrante-edit .field label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.field-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.integrante-edit .input {
  border-radius: 12px;
  border-color: #d6e0f0;
  background: #fff;
}

.integrante-edit .input:focus-visible {
  box-shadow: 0 0 0 3px rgba(36, 86, 246, 0.28);
  border-color: #8ea7f4;
}

.integrante-edit-header {
  position: sticky;
  top: 0;
  z-index: 4;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, #ffffff 100%);
  border-bottom: 1px solid transparent;
}

.modal-card.integrante-edit-modal .integrante-edit-header.is-scrolled {
  border-bottom-color: var(--edit-border);
  box-shadow: 0 10px 22px rgba(11, 26, 42, 0.12);
}

.integrante-edit-eyebrow {
  letter-spacing: 0.22em;
}

.integrante-edit-title {
  font-family: "Fraunces", serif;
}

.integrante-edit-hint {
  max-width: 520px;
}

.integrante-edit-actions .btn.secondary {
  border-radius: 999px;
  border: 1px solid var(--edit-border);
  background: transparent;
}

.integrante-edit-actions .btn.secondary:hover {
  background: var(--edit-soft);
}

.integrante-edit-close {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--edit-border);
  background: #fff;
}

.integrante-edit-content {
  padding: 0 28px 32px;
  display: grid;
  gap: 18px;
}

.integrante-edit-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.integrante-edit-card {
  background: #ffffff;
  border: 1px solid var(--edit-border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 14px 28px rgba(11, 26, 42, 0.08);
  display: grid;
  gap: 16px;
}

.integrante-edit-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.integrante-edit-card-title {
  letter-spacing: 0.18em;
}

.integrante-edit-card-desc {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--edit-muted);
}

.integrante-edit-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--edit-muted);
  border: 1px solid var(--edit-border);
  background: var(--edit-soft);
  margin-left: auto;
}

.integrante-edit-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.integrante-edit-grid {
  gap: 14px;
}

.integrante-edit .field label {
  color: var(--edit-muted);
}

.integrante-edit .input {
  min-height: 42px;
  border-radius: 12px;
  border-color: var(--edit-field-border);
  background: #fff;
  width: 100%;
}

.integrante-edit .input:focus-visible {
  box-shadow: 0 0 0 3px rgba(36, 86, 246, 0.2);
  border-color: #8ea7f4;
}

.integrante-edit .input.readonly {
  background: var(--edit-field-readonly);
  color: var(--ink);
  cursor: text;
}

.integrante-edit .input.readonly:focus-visible {
  box-shadow: 0 0 0 2px rgba(11, 26, 42, 0.12);
  border-color: var(--edit-field-border);
}

.readonly-input {
  position: relative;
  width: 100%;
}

.readonly-input .input {
  padding-right: 54px;
  width: 100%;
}

.readonly-input.has-copy .input {
  padding-right: 92px;
}

.readonly-icons {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  z-index: 2;
}

.readonly-icons .integrante-copy-button {
  width: 28px;
  height: 28px;
}

.lock-indicator {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--edit-border);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: help;
}

.lock-tooltip {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: rgba(11, 26, 42, 0.92);
  color: #fff;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  white-space: nowrap;
  z-index: 3;
}

.lock-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.integrante-edit .readonly-icons .integrante-copy-feedback {
  top: auto;
  bottom: calc(100% + 6px);
  right: 32px;
}

.integrante-edit-footer {
  position: sticky;
  bottom: 0;
  z-index: 4;
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid var(--edit-border);
  box-shadow: 0 -12px 24px rgba(11, 26, 42, 0.12);
  padding: 14px 28px 18px;
}

.integrante-edit-footer .btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.integrante-readonly-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.integrante-readonly-section {
  border: 1px solid #dee7f7;
  border-radius: 16px;
  padding: 16px 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f7f9ff 100%);
  display: grid;
  gap: 12px;
}

.integrante-readonly-title {
  margin: 0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.integrante-readonly-grid {
  display: grid;
  gap: 12px;
}

.integrante-readonly-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(11, 26, 42, 0.08);
}

.integrante-readonly-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.integrante-readonly-main {
  display: grid;
  gap: 4px;
}

.integrante-readonly-actions {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.integrante-readonly-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.integrante-readonly-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.integrante-edit-footer {
  padding: 12px 28px 28px;
  border-top: 1px solid transparent;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.integrante-edit-footer .btn.ghost {
  border: 1px solid var(--border);
}

.integrante-edit-footer .btn.primary {
  box-shadow: 0 12px 24px rgba(36, 86, 246, 0.22);
}

.integrante-copy-button {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.integrante-copy-feedback {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 2;
  font-size: 11px;
  color: #fff;
  background: rgba(11, 26, 42, 0.92);
  padding: 4px 8px;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(11, 26, 42, 0.18);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  white-space: nowrap;
}

.integrante-copy-feedback.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.presence-badge {
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.presence-badge:hover {
  filter: brightness(0.96);
}

.presence-list-card {
  max-width: 720px;
}

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

.presence-search {
  display: grid;
  gap: 8px;
  flex: 1;
  min-width: 220px;
}

.presence-toolbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

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

.presence-status.error {
  color: #d62828;
}

.presence-list {
  display: grid;
  gap: 10px;
}

.presence-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #ffffff;
}

.presence-info {
  display: grid;
  gap: 4px;
}

.presence-name {
  font-weight: 600;
  color: var(--ink);
}

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

.presence-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.presence-copy-button {
  width: 30px;
  height: 30px;
  padding: 0;
}

.presence-copy-feedback {
  font-size: 12px;
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.presence-copy-feedback.is-visible {
  opacity: 1;
}

.presence-copy-all-feedback {
  font-size: 12px;
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.presence-copy-all-feedback.is-visible {
  opacity: 1;
}

.presence-empty {
  text-align: center;
  padding: 16px;
  border-radius: 14px;
  border: 1px dashed var(--border);
  color: var(--muted);
}

.event-notes {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.event-notes.is-collapsed {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.event-notes-toggle {
  align-self: flex-start;
}

.event-presenca {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  display: grid;
  gap: 10px;
}

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

.input-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.input.readonly {
  background: #f8fafc;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

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

.qr-card {
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 4px);
  padding: 16px;
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
  background: #fdfdfd;
}

.event-qr-card {
  justify-items: center;
  align-content: start;
  padding: 14px;
  gap: 10px;
  max-width: 100%;
}

.qr-frame {
  width: min(320px, 100%);
  aspect-ratio: 1 / 1;
  padding: 12px;
  border-radius: 12px;
  border: 1px dashed var(--border);
  display: grid;
  place-items: center;
  background: #ffffff;
  max-width: 100%;
}

.event-qr-card .qr-frame {
  width: min(220px, 100%);
  padding: 8px;
}

.qr-frame img {
  width: min(300px, 100%);
  height: auto;
  display: block;
  max-width: 100%;
}

.event-qr-card .qr-frame img {
  width: 100%;
}

.chip {
  background: #e8edff;
  color: #1f3fb6;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.btn-icon,
.icon-button {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: var(--radius-btn);
  padding: 6px 10px;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 32px;
  min-height: 32px;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.08s ease;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 999px;
}

.btn-icon:hover,
.icon-button:hover {
  background: #eef2ff;
}

.btn-icon:active,
.icon-button:active {
  transform: translateY(1px);
}

[data-tooltip] {
  position: relative;
}

.btn-tooltip {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: rgba(11, 26, 42, 0.92);
  color: #fff;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  white-space: nowrap;
  z-index: 5;
}

.btn-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.icon-button:focus-visible,
.btn:focus-visible,
.btn-icon:focus-visible,
.input:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.badge.info {
  background: #e8edff;
  color: #1f3fb6;
}

body.no-scroll {
  overflow: hidden;
}

@media (max-width: 768px) {
  .modal-card {
    padding: 16px;
  }

  .modal-card.integrante-detail-modal {
    padding: 16px;
  }

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

  .modal-actions {
    width: 100%;
    justify-content: space-between;
  }

  .event-modal-grid {
    grid-template-columns: 1fr;
  }

  .event-header-main {
    align-items: flex-start;
  }

  .input-group {
    grid-template-columns: 1fr;
  }

  .event-card-row {
    grid-template-columns: 1fr;
  }

  .integrante-edit-header {
    padding: 16px;
    flex-direction: column;
    align-items: flex-start;
  }

  .integrante-edit-content {
    padding: 0 16px 20px;
  }

  .integrante-edit-cards {
    grid-template-columns: 1fr;
  }

  .integrante-edit-card {
    padding: 16px;
  }

  .integrante-edit-grid {
    grid-template-columns: 1fr;
  }

  .integrante-readonly-grid {
    grid-template-columns: 1fr;
  }

  .integrante-readonly-sections {
    grid-template-columns: 1fr;
  }

  .integrante-edit-editable {
    grid-template-columns: 1fr;
  }

  .integrante-readonly-item {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .integrante-readonly-actions {
    justify-self: flex-start;
  }

  .integrante-detail-grid {
    grid-template-columns: 1fr;
  }

  .integrante-summary {
    padding: 16px;
  }

  .integrante-summary-header {
    grid-template-columns: 1fr;
  }

  .integrante-address-meta {
    grid-template-columns: 1fr;
  }

  .integrante-data-grid {
    grid-template-columns: 1fr;
  }

  .integrante-edit-footer {
    padding: 0 16px 20px;
  }

  .modal-card.integrante-edit-modal .integrante-edit-footer {
    padding: 12px 16px 16px;
  }

  .modal-card.integrante-edit-modal .integrante-edit-content {
    padding-bottom: 64px;
  }

  .btn,
  .btn.primary,
  .btn.secondary,
  .btn.ghost,
  .btn.danger,
  .btn-primary,
  .btn-secondary,
  .btn-ghost,
  .btn-danger,
  .btn-success,
  .btn-warning {
    width: 100%;
  }

  .presence-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .qr-frame {
    width: min(240px, 100%);
  }

  .qr-frame img {
    width: min(220px, 100%);
  }

  .event-qr-card .qr-frame {
    width: min(200px, 100%);
  }

  .event-qr-card .qr-frame img {
    width: min(180px, 100%);
  }

  .register-header h1 {
    font-size: 24px;
  }

  .form-section {
    padding: 14px;
  }

  .terms-body {
    max-height: 50vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .modal,
  .modal-card,
  .evento-endereco,
  .integrante-info-row,
  .integrante-detail .integrante-copy-button,
  .integrante-desistencia,
  .modal-card.integrante-detail-modal .modal-actions .icon-button,
  .lock-tooltip,
  .btn,
  .btn-icon,
  .icon-button,
  .btn-tooltip {
    transition: none;
  }
}

.skeleton {
  background: linear-gradient(90deg, #f3f4f6 0%, #e9ecef 50%, #f3f4f6 100%);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
  color: var(--muted);
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  0% { opacity: 0.7; }
  50% { opacity: 1; }
  100% { opacity: 0.7; }
}

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

.form-links {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
}

.register-card {
  max-width: 980px;
  margin: 24px auto;
}

.register-header {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}

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

.register-header h1 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: 30px;
}

.register-header .hint {
  margin: 0;
}

.register-form {
  display: grid;
  gap: 20px;
}

.form-section {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #f8faff;
  display: grid;
  gap: 12px;
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

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

.register-card .btn.primary {
  min-height: 48px;
  padding: 12px 22px;
}

.term-field {
  margin: 0;
}

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

.checkbox-input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.checkbox-input:disabled {
  opacity: 0.6;
}

.field.checkbox label {
  cursor: pointer;
}

.file-input {
  padding: 6px 10px;
}

.file-input::file-selector-button {
  margin-right: 12px;
  border: 1px solid var(--border);
  background: #edf2ff;
  border-radius: 8px;
  padding: 6px 10px;
  font-family: inherit;
  cursor: pointer;
}

.cep-status {
  min-height: 18px;
  display: block;
}

.cep-status.loading::before {
  content: "";
  width: 10px;
  height: 10px;
  border: 2px solid #cbd5e1;
  border-top-color: var(--accent);
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}

.terms-card {
  max-width: 760px;
}

.terms-body {
  max-height: min(60vh, 420px);
  overflow: auto;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
}

.terms-body:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.terms-content {
  line-height: 1.6;
  color: var(--ink);
}

.terms-title {
  margin: 0 0 6px;
  font-size: 22px;
}

.terms-meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}

.terms-summary {
  background: #f1f5ff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 16px;
  white-space: pre-wrap;
}

.terms-body-content {
  line-height: 1.7;
}

.terms-body-content h1,
.terms-body-content h2,
.terms-body-content h3,
.terms-body-content h4 {
  margin: 16px 0 8px;
  font-family: "Fraunces", serif;
}

.terms-body-content p {
  margin: 0 0 12px;
}

.terms-body-content ul,
.terms-body-content ol {
  margin: 0 0 12px;
  padding-left: 22px;
}

.terms-body-content li {
  margin-bottom: 6px;
}

.terms-body-content a {
  color: var(--accent);
  text-decoration: underline;
}

.editor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.wysiwyg-editor {
  min-height: 240px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
}

.wysiwyg-hidden {
  display: none;
}

.ql-toolbar.ql-snow {
  border-radius: 12px 12px 0 0;
  border-color: var(--border);
  font-family: inherit;
}

.ql-container.ql-snow {
  border-radius: 0 0 12px 12px;
  border-color: var(--border);
  font-family: inherit;
  min-height: 220px;
}

.ql-editor {
  font-family: inherit;
  font-size: 14px;
  line-height: 1.7;
}

@media (max-width: 900px) {
  .topbar {
    flex-wrap: wrap;
    gap: 12px;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    background: #fff;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
  }

  .nav.open {
    display: flex;
  }

  .container {
    padding: 20px;
  }

  .form-actions {
    align-items: stretch;
  }

  .integrante-detail-grid {
    grid-template-columns: 1fr;
  }

  .integrante-summary-header {
    grid-template-columns: 1fr;
  }

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