:root {
  --bg: #eef5ff;
  --panel: #ffffff;
  --panel-soft: #f6f9ff;
  --text: #10233f;
  --text-soft: #4f6787;
  --accent: #1565ff;
  --accent-2: #0e4dd0;
  --accent-soft: #dbe8ff;
  --danger: #c62828;
  --border: #d3e2ff;
  --shadow-soft: 0 8px 24px rgba(16, 65, 150, .10);
  --shadow-strong: 0 14px 34px rgba(21, 101, 255, .26);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Manrope", "IBM Plex Sans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 10%, #dbe9ff 0%, rgba(219, 233, 255, 0) 42%),
    radial-gradient(circle at 88% 0%, #c8dcff 0%, rgba(200, 220, 255, 0) 36%),
    linear-gradient(160deg, #f4f8ff 0%, var(--bg) 45%, #f9fcff 100%);
}

.container {
  width: min(1080px, 92vw);
  margin: 2rem auto;
}

h1,h2,h3 { margin-top: 0; }
h1 {
  letter-spacing: -.02em;
  font-weight: 800;
}
h2 {
  color: #123f8a;
  font-size: 1.05rem;
  font-weight: 800;
}
section {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.1rem;
  margin-bottom: 1.1rem;
  box-shadow: 0 14px 36px rgba(22, 59, 123, 0.08);
}

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1253cb 0%, #2674ff 52%, #5c97ff 100%);
  color: #fff;
  border: 0;
  box-shadow: 0 18px 36px rgba(17, 74, 171, .28);
}

.hero::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  right: -80px;
  top: -80px;
  background: rgba(255, 255, 255, .18);
}

.hero-kicker {
  margin: 0 0 .35rem 0;
  font-size: .86rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .11em;
  opacity: .92;
}

.hero-subtitle {
  margin: .35rem 0 0 0;
  opacity: .95;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.hero-logo {
  width: min(260px, 34vw);
  height: auto;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.form-section {
  animation: fadeUp .45s ease both;
}

.form-section:nth-of-type(2) { animation-delay: .03s; }
.form-section:nth-of-type(3) { animation-delay: .08s; }
.form-section:nth-of-type(4) { animation-delay: .13s; }

.section-head {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: .8rem;
}

.section-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #61a2ff 0%, #1565ff 100%);
  box-shadow: 0 0 0 5px rgba(21, 101, 255, .12);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .8rem;
}

label {
  display: flex;
  flex-direction: column;
  gap: .38rem;
  font-size: .92rem;
  color: var(--text-soft);
  font-weight: 700;
  letter-spacing: .01em;
}

input, select, textarea, button {
  font: inherit;
  padding: .72rem .86rem;
  border-radius: 12px;
  border: 1px solid #bfd4ff;
}

input, select, textarea {
  background: #ffffff;
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 1px 2px rgba(16, 65, 150, .04);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease, transform .05s ease;
}

input:focus, select:focus, textarea:focus {
  outline: 0;
  border-color: #3f7df7;
  box-shadow: 0 0 0 4px rgba(21, 101, 255, .15), 0 6px 14px rgba(16, 66, 158, .10);
  background: #fff;
  transform: translateY(-1px);
}

/* Telefone (intl-tel-input) */
.iti {
  width: 100%;
}

.iti input[type="tel"] {
  width: 100%;
  min-height: 46px;
  border-radius: 12px;
  border: 1px solid #bfd4ff;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding-left: 52px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 2px 8px rgba(17, 71, 170, .05);
}

.iti input[type="tel"]:focus {
  border-color: #3f7df7;
  box-shadow: 0 0 0 4px rgba(21, 101, 255, .15), 0 8px 18px rgba(16, 66, 158, .10);
}

.iti__selected-country {
  border-radius: 10px;
}

.iti__country-list {
  border: 1px solid #c6daff;
  border-radius: 12px;
  box-shadow: 0 16px 34px rgba(20, 69, 159, .16);
  overflow: auto;
}

.iti__country.iti__highlight {
  background: #edf4ff;
}

button {
  background: linear-gradient(180deg, #2d78ff 0%, #1565ff 100%);
  color: #fff;
  border: 0;
  cursor: pointer;
  font-weight: 800;
  letter-spacing: .01em;
  min-height: 44px;
  padding-inline: 1rem;
  box-shadow: var(--shadow-strong);
  transition: transform .12s ease, filter .12s ease, box-shadow .12s ease;
}

button:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
}
button:active {
  transform: translateY(0);
}
.actions { margin-top: 1rem; display: flex; gap: .6rem; }
.actions {
  padding: 1rem;
  border: 1px solid #cddfff;
  border-radius: 16px;
  background: linear-gradient(180deg, #f7faff 0%, #edf4ff 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 10px 24px rgba(15, 69, 168, .10);
}
.actions button {
  flex: 1;
}
.error { color: var(--danger); font-weight: 600; }
.hidden { display: none; }

.occupant-card {
  border: 1px solid #cfe0ff;
  background: linear-gradient(180deg, #fbfdff 0%, var(--panel-soft) 100%);
  border-radius: 14px;
  padding: .95rem;
  margin-bottom: .85rem;
  box-shadow: var(--shadow-soft);
}

.occupant-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .6rem;
}

#add-occupant {
  background: linear-gradient(180deg, #3d8bff 0%, #1d67f2 100%);
}

#generate-payment-link {
  background: linear-gradient(180deg, #f5f9ff 0%, #e5efff 100%);
  color: #14489f;
  border: 1px solid #bcd4ff;
  box-shadow: 0 8px 18px rgba(18, 73, 170, .13);
}

#generate-payment-link:hover {
  background: linear-gradient(180deg, #ebf3ff 0%, #dce9ff 100%);
}

.btn-primary {
  background: linear-gradient(180deg, #2d78ff 0%, #1565ff 100%);
}

.btn-secondary {
  background: linear-gradient(180deg, #f5f9ff 0%, #e5efff 100%);
  color: #14489f;
  border: 1px solid #bcd4ff;
  box-shadow: 0 8px 18px rgba(18, 73, 170, .13);
}

.btn-secondary:hover {
  background: linear-gradient(180deg, #ebf3ff 0%, #dce9ff 100%);
}

.remove-occupant {
  background: #e8f0ff;
  color: #184a9a;
  box-shadow: none;
  border: 1px solid #c4d9ff;
}

.remove-occupant:hover {
  background: #dce9ff;
  transform: translateY(-1px);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .6rem;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: .8rem;
  box-shadow: 0 10px 26px rgba(16, 65, 150, .08);
}

.charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: .8rem;
  margin-bottom: 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}

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

thead th {
  background: #ecf3ff;
  color: #1b4ea6;
}

@media (max-width: 760px) {
  .container { width: 94vw; margin: 1rem auto; }
  .hero-content {
    flex-direction: column;
    align-items: flex-start;
  }
  .hero-logo {
    width: min(240px, 70vw);
  }
}

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