/* Estilos exclusivos da página de indicação; a identidade base vem de styles.css. */
.referral-page .referral-main {
  width: 100%;
  max-width: none;
  min-height: 0;
  flex: 1 0 auto;
  margin: 0;
  padding: 48px 28px 64px;
}

.referral-page .referral-shell {
  display: block;
  width: min(100%, 760px);
  max-width: 760px;
  margin: 0 auto;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.referral-content { display: block; width: 100%; }
.referral-page .referral-content[hidden] { display: none !important; }
.referral-intro { margin: 0 0 24px; padding: 0; }
.referral-intro .eyebrow { margin-bottom: 16px; }
.referral-intro h1 {
  max-width: 760px;
  margin: 0 0 16px;
  color: var(--navy);
  font-size: clamp(2.25rem, 4.4vw, 3.25rem);
  line-height: 1.12;
  letter-spacing: -.045em;
}
.referral-intro > p:not(.eyebrow) {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.referral-entry {
  width: 100%;
  margin: 0;
  padding: 32px;
  border: 1px solid #e0e5e9;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(25, 40, 60, .05);
}
.referral-entry h2 {
  margin: 0 0 22px;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--line);
  color: var(--navy);
  font: 700 1.25rem/1.3 Manrope, sans-serif;
  letter-spacing: -.025em;
}
.referral-form { display: grid; gap: 16px; }
.referral-form label {
  display: grid;
  min-width: 0;
  gap: 7px;
  color: var(--ink);
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: 0;
}
.referral-form label span small { color: var(--muted); font-size: .8em; font-weight: 500; }
.referral-form input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid #cfdcdb;
  border-radius: 7px;
  color: var(--ink);
  background: #fff;
  font: 400 1rem/1.4 "DM Sans", sans-serif;
  transition: border-color .2s, box-shadow .2s;
}
.referral-form input::placeholder { color: #8a9698; opacity: 1; }
.referral-form input:focus {
  border-color: var(--blue);
  outline: 0;
  box-shadow: 0 0 0 4px rgba(5, 117, 250, .1);
}
.referral-form input[aria-invalid="true"] {
  border-color: #d94b4b;
  background: #fff9f9;
}
.referral-form input[aria-invalid="true"]:focus {
  border-color: #d94b4b;
  outline: 2px solid rgba(217, 75, 75, .2);
  box-shadow: none;
}
.referral-form button[type="submit"] {
  width: 100%;
  min-height: 54px;
  margin-top: 4px;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  font-size: .95rem;
}
.referral-form button:disabled { opacity: .6; cursor: wait; }
.referral-form-note {
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
  font-size: .75rem;
}
.referral-error { margin: 0; color: #b42318; font-size: .875rem; }

.referral-result[hidden],
.referral-share-confirmation[hidden] { display: none !important; }
.referral-link { display: flex; gap: 10px; margin-top: 22px; }
.referral-link input {
  flex: 1;
  min-width: 0;
  min-height: 52px;
  padding: 12px 14px;
  overflow: hidden;
  border: 1px solid #cfdcdb;
  border-radius: 7px;
  color: var(--ink);
  background: #fff;
  font: 600 .9rem/1.4 "DM Sans", sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.referral-link button { min-height: 52px; padding: 14px 20px; border: 0; cursor: pointer; font: 700 1rem/1.4 "DM Sans", sans-serif; }
.referral-actions { grid-template-columns: 1fr; margin-top: 14px; }
.referral-actions .button { width: 100%; min-height: 52px; }
.referral-actions #share-referral { color: #fff; background: #25d366; box-shadow: 0 8px 18px rgba(37, 211, 102, .2); }
.referral-actions #share-referral:hover { background: #1fb85a; }
.referral-actions .confirmation-edit { cursor: pointer; }
.referral-share-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; }
.referral-share-actions .button { width: 100%; min-height: 52px; }
.referral-share-actions .confirmation-secondary { color: var(--navy); background: #edf1f5; border: 1px solid #dce5e4; }
.referral-share-actions .referral-share-action { color: #fff; background: #25d366; box-shadow: 0 8px 18px rgba(37, 211, 102, .2); }
.referral-share-actions .referral-share-action:hover { color: #fff; background: #1fb85a; }
@media (max-width: 600px) {
  .referral-share-actions { grid-template-columns: 1fr; }
  .referral-share-actions .confirmation-secondary,
  .referral-share-actions .referral-share-action { width: 100%; }
}

@media (min-width: 901px) {
  .referral-page .referral-main { padding: 48px 28px 88px; }
  .referral-page .referral-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 28px;
    width: min(100%, 1184px);
    max-width: 1184px;
  }
  .referral-page .referral-content { display: contents; }
  .referral-intro { grid-column: 1 / -1; grid-row: 1; margin-bottom: 0; }
  .referral-entry {
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    padding: 32px;
    border-top: 0;
  }
  .referral-form { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
  .referral-form > label:first-of-type,
  .referral-form > label:last-of-type,
  .referral-form > button,
  .referral-form > .referral-form-note { grid-column: 1 / -1; }
  .referral-side {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    min-width: 0;
    margin: 0;
  }
  .referral-result,
  .referral-share-confirmation { grid-column: 1 / -1; grid-row: 2; }
}

.referral-side h2 { margin: 0 0 16px; color: #fff; }
.referral-side-break { display: none; }
.referral-side-list { display: grid; gap: 12px; margin: 22px 0 0; padding: 0; list-style: none; color: #d5dede; font-size: .875rem; }
.referral-side-list li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: center; }
.referral-side-list li span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: var(--navy); background: var(--orange); font-size: .68rem; font-weight: 700; }

@media (max-width: 900px) {
  .referral-page .referral-shell { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .referral-page .referral-content { display: contents; }
  .referral-intro { grid-row: 1; }
  .referral-entry { grid-row: 2; }
  .referral-side { grid-row: 3; margin: 0; }
  .referral-side h2 { margin-bottom: 12px; }
  .referral-result, .referral-share-confirmation { grid-row: 2; }
}

@media (max-width: 900px) {
  .referral-page .referral-main { padding: 36px 24px 48px; }
}
@media (max-width: 600px) {
  .referral-page .referral-main { padding: 30px 20px 36px; }
  .referral-intro { margin-bottom: 20px; }
  .referral-intro .eyebrow { margin-bottom: 12px; }
  .referral-intro h1 { margin-bottom: 12px; font-size: clamp(1.85rem, 8vw, 2.5rem); }
  .referral-intro > p:not(.eyebrow) { font-size: .95rem; }
  .referral-entry { padding: 24px 20px; }
  .referral-entry h2 { margin-bottom: 18px; padding-bottom: 15px; font-size: 1.15rem; }
  .referral-form { gap: 14px; }
  .referral-link { flex-direction: column; }
  .referral-link button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .referral-page .referral-entry.visible { animation: none; }
}

@media (min-width: 1241px) { .referral-side-break { display: inline; } }
