:root {
  --font-body: "Manrope", "Segoe UI", sans-serif;
  --font-heading: "Space Grotesk", "Segoe UI", sans-serif;
  --bg-1: #151d2e;
  --surface-1: #232e46;
  --border-soft: rgba(255, 255, 255, 0.08);
  --text-strong: #f6f8fc;
  --text-muted: #b6bfcd;
  --accent: #f28c1b;
  --accent-strong: #ff9d2e;
  --shadow-soft: 0 10px 26px rgba(0, 0, 0, 0.28);
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

body.saude-page {
  margin: 0;
  background: var(--bg-1);
  color: var(--text-strong);
  font-family: var(--font-body);
}

body.saude-page [hidden] {
  display: none !important;
}

.saude-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.video-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.video-bg iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 100vh;
  min-width: 177.78vh;
  min-height: 56.25vw;
  transform: translate(-50%, -50%) scale(1.08);
  transform-origin: center;
}

.video-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 10, 18, 0.35) 0%, rgba(8, 12, 20, 0.6) 50%, rgba(8, 12, 20, 0.8) 100%);
  z-index: 1;
  pointer-events: none;
}

.video-fade {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 28vh;
  background: linear-gradient(to bottom, rgba(8, 12, 20, 0) 0%, rgba(8, 12, 20, 0.6) 55%, rgba(8, 12, 20, 0.95) 100%);
  z-index: 2;
  pointer-events: none;
}

.saude-header {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 18px 0;
  background: rgba(10, 15, 24, 0.85);
  border-bottom: 1px solid var(--border-soft);
  backdrop-filter: blur(12px);
}

.saude-header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.saude-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: brightness(1.7) contrast(1.25) saturate(0.2);
}

.saude-brand {
  font-size: 15px;
  letter-spacing: 0.28em;
  font-weight: 600;
  color: var(--text-strong);
}

body.saude-page h1,
body.saude-page h2,
body.saude-page h3,
body.saude-page h4,
body.saude-page h5,
body.saude-page h6 {
  font-family: var(--font-heading);
  color: var(--accent-strong);
  margin: 0 0 0.5rem;
}

body.saude-page p {
  margin: 0 0 1rem;
}

body.saude-page button,
body.saude-page input,
body.saude-page select,
body.saude-page textarea {
  font-family: inherit;
  color: inherit;
}

.main.page-wrap {
  position: relative;
  z-index: 3;
  padding: 24px 0 48px;
}

.section {
  padding: 0;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-header {
  margin-bottom: 18px;
}

.section-header h2 {
  font-size: 32px;
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}

.section-header p {
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 15px;
}

.card {
  position: relative;
  overflow: hidden;
  width: 100%;
  background: linear-gradient(160deg, rgba(26, 34, 52, 0.86) 0%, rgba(17, 24, 39, 0.78) 65%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
  color: var(--text-strong);
  backdrop-filter: blur(6px);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 120% at 100% 0%, rgba(240, 179, 90, 0.16), transparent 55%);
  pointer-events: none;
}

.card > * {
  position: relative;
  z-index: 1;
}

.p-4 {
  padding: 24px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: -12px;
}

.g-4 > [class^="col-"] {
  padding: 12px;
}

.g-3 > [class^="col-"] {
  padding: 10px;
}

.col-12 {
  width: 100%;
}

@media (min-width: 992px) {
  .col-lg-4 {
    width: 42%;
  }
  .col-lg-8 {
    width: 58%;
  }
}

.text-muted {
  color: var(--text-muted) !important;
}

.small {
  font-size: 12px;
}

.mb-2 {
  margin-bottom: 8px;
}

.list-group,
.form-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.list-group-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-soft);
  color: var(--text-strong);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  width: 100%;
  text-align: left;
}

.list-group-item-action {
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.list-group-item-action:hover,
.list-group-item-action:focus {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-strong);
}

.list-group-item.active {
  background: linear-gradient(135deg, rgba(240, 179, 90, 0.22), rgba(240, 179, 90, 0.08));
  border-color: rgba(240, 179, 90, 0.45);
  color: var(--text-strong);
}

.form-participant-card {
  margin-bottom: 10px;
}

.form-participant-card:last-child {
  margin-bottom: 0;
}

.form-participant-card .list-group-item {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-participant-card:not(.is-ready) .list-group-item-action {
  cursor: not-allowed;
}

.form-participant-card:not(.is-ready) .list-group-item {
  opacity: 0.85;
}

.saude-inline-fields {
  display: grid;
  gap: 10px;
}

.saude-inline-field {
  display: flex;
  flex-direction: column;
}

.saude-item-action {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.form-participant-card:not(.is-ready) .saude-item-action {
  color: var(--text-muted);
}

.form-participant-card.is-ready .list-group-item-action::after {
  content: "›";
  font-size: 20px;
  color: var(--accent-strong);
  margin-left: auto;
  display: inline-block;
}

.form-participant-card.is-ready .list-group-item-action {
  box-shadow: inset 0 0 0 1px rgba(240, 179, 90, 0.18);
}

.form-list .list-group-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-soft);
  color: var(--text-strong);
  border-radius: var(--radius-md);
}

.form-event-title {
  color: #ffffff;
  font-weight: 700;
}

.form-event-date {
  color: var(--accent-strong);
  font-weight: 700;
}

.saude-side-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-strong);
  margin-bottom: 8px;
}

.saude-side-card {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 16px;
  background: rgba(10, 14, 24, 0.45);
}

.saude-purchase-card {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 14px;
  background: rgba(255, 255, 255, 0.02);
  margin-top: 12px;
}

.saude-count-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.saude-count-label {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(109, 214, 198, 0.14);
  border: 1px solid rgba(109, 214, 198, 0.3);
  color: #b8f3e8;
}

.badge.muted {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-soft);
  color: var(--text-muted);
}

.badge.danger {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fecaca;
}

.form-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.saude-panel {
  display: none;
}

.saude-panel.is-active {
  display: block;
}

.saude-panel .col-12 {
  margin-bottom: 14px;
}

.saude-panel .col-12:last-child {
  margin-bottom: 0;
}

.saude-empty {
  border: 1px dashed var(--border-soft);
  border-radius: var(--radius-md);
  padding: 24px;
  color: var(--text-muted);
  text-align: center;
  font-size: 0.95rem;
}

.saude-empty-actions {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.saude-submit-bar {
  display: none;
  margin-top: 24px;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.submit-guard {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.submit-guard .btn {
  position: relative;
  z-index: 1;
}

.submit-guard .btn:disabled {
  pointer-events: none;
}

.submit-guard-overlay {
  position: absolute;
  inset: 0;
  display: none;
  cursor: not-allowed;
  z-index: 2;
}

.submit-guard .btn:disabled + .submit-guard-overlay {
  display: block;
}

.saude-submit-bar .form-footnote {
  text-align: center;
  margin-top: 0;
}

.form-label {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: block;
}

.form-control,
.form-select {
  width: 100%;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background-color: rgba(25, 34, 54, 0.9);
  color: var(--text-strong);
  padding: 0.75rem 1rem;
  font-size: 1rem;
}

.form-select-sm {
  width: 120px;
  padding: 0.55rem 0.75rem;
  font-size: 0.95rem;
}

.form-control:focus,
.form-select:focus {
  outline: none;
  border-color: rgba(240, 179, 90, 0.7);
  box-shadow: 0 0 0 3px rgba(240, 179, 90, 0.25);
}

.form-textarea {
  border-radius: 18px;
  min-height: 140px;
  resize: vertical;
}

.btn {
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.3px;
  padding: 0.7rem 1.8rem;
  cursor: pointer;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  border: 0;
  color: #17171d;
  box-shadow: 0 12px 24px rgba(240, 179, 90, 0.28);
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  color: #111218;
}

.form-alert {
  padding: 0.9rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
}

.form-alert-success {
  background: rgba(16, 140, 80, 0.18);
  border: 1px solid rgba(16, 140, 80, 0.45);
  color: #c8f3dd;
}

.form-alert-error {
  background: rgba(176, 43, 43, 0.2);
  border: 1px solid rgba(200, 60, 60, 0.5);
  color: #ffd5d5;
}

.form-footnote {
  font-size: 12px;
  color: var(--text-muted);
  text-align: left;
  margin-top: 10px;
}

.form-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
  padding: 1.5rem;
}

.form-modal[hidden] {
  display: none;
}

.form-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 10, 18, 0.6);
  backdrop-filter: blur(6px);
}

.form-modal-card {
  position: relative;
  z-index: 1;
  max-width: 420px;
  width: 100%;
  background: rgba(18, 26, 40, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 2rem 2rem 1.75rem;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
  text-align: center;
}

.form-modal-icon {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  margin: 0 auto 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-modal-icon-svg {
  width: 32px;
  height: 32px;
}

.form-modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.55rem;
}

.form-modal-message {
  font-size: 1rem;
  color: var(--text-strong);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.form-modal-close {
  width: 100%;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.8rem 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: transparent;
  color: var(--text-strong);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.form-modal-close:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.35);
}

.form-modal.is-success .form-modal-icon {
  background: rgba(16, 140, 80, 0.18);
  color: #c8f3dd;
}

.form-modal.is-error .form-modal-icon {
  background: rgba(176, 43, 43, 0.2);
  color: #ffd5d5;
}

.form-modal .icon-success,
.form-modal .icon-error {
  display: none;
}

.form-modal.is-success .icon-success {
  display: block;
}

.form-modal.is-error .icon-error {
  display: block;
}

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

.saude-item-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.saude-item-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

@media (max-width: 991px) {
  .row {
    margin: -10px;
  }
  .g-4 > [class^="col-"] {
    padding: 10px;
  }
}

body.wizard-open {
  overflow: hidden;
}

.wizard-modal {
  position: fixed !important;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1.5rem;
  width: 100vw;
  height: 100vh;
  background: rgba(6, 10, 18, 0.45);
  transform: translateZ(0);
}

.wizard-modal[hidden] {
  display: none;
}

.wizard-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 10, 18, 0.7);
  backdrop-filter: blur(8px);
}

.wizard-card {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  background: rgba(12, 18, 30, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-md);
  padding: 1.75rem 1.5rem;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
}

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

.wizard-step {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

.wizard-cancel {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: var(--text-strong);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.wizard-cancel:hover {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.08);
}

.wizard-title {
  margin: 0 0 14px;
  font-size: 1.2rem;
  color: var(--accent-strong);
}

.wizard-body {
  min-height: 180px;
}

.wizard-body .saude-panel {
  display: block;
}

.wizard-body .saude-section-title {
  display: none;
}

.wizard-step-hidden {
  display: none !important;
}

.wizard-nav {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.wizard-error {
  margin: 10px 0 0;
  color: #ffd5d5;
  font-size: 0.9rem;
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: var(--text-strong);
  box-shadow: none;
}

.btn-ghost:hover,
.btn-ghost:focus {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 900px) {
  .form-panel {
    min-height: 1px;
  }
}

@supports (height: 100dvh) {
  .wizard-modal {
    height: 100dvh;
  }
}

@media (max-width: 1024px) {
  .saude-shell {
    overflow: visible;
  }

  .main.page-wrap {
    padding-bottom: 110px;
  }

  .saude-side-title {
    display: none;
  }

  .saude-side-card,
  .saude-purchase-card {
    border: 0;
    background: transparent;
    padding: 0;
  }

  .saude-purchase-card {
    margin-top: 8px;
  }

  .mobile-submit-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    display: block;
    z-index: 25;
    padding: 12px 20px 16px;
    background: linear-gradient(180deg, rgba(10, 14, 24, 0) 0%, rgba(10, 14, 24, 0.75) 35%, rgba(10, 14, 24, 0.95) 100%);
    backdrop-filter: blur(6px);
  }

  .mobile-submit-bar .btn {
    width: 100%;
  }

  .mobile-submit-bar .submit-guard {
    width: 100%;
  }

  .saude-empty-actions {
    display: flex;
  }
}

.mobile-submit-bar {
  display: none;
}

@media (min-width: 1025px) {
  .saude-empty-actions {
    display: none;
  }

  .saude-submit-bar {
    display: flex;
  }

  .saude-submit-inline {
    display: none;
  }
}

body.wizard-open .saude-shell {
  overflow: visible;
}

body.wizard-open .mobile-submit-bar {
  display: none;
}

.form-modal-actions {
  display: flex;
  gap: 12px;
}

.form-modal-actions .btn {
  flex: 1;
}
