:root {
  --primary: #5b3df5;
  --primary-dark: #462bd1;
  --text: #171927;
  --muted: #6d7186;
  --line: #e7e8ef;
  --good: #14804a;
  --bad: #b53131;
  --warning: #8a5400;
  --shadow: 0 18px 50px rgba(35, 28, 80, 0.1);
}
* {
  box-sizing: border-box;
}
html {
  background: #f5f6fa;
}
body {
  margin: 0;
  background: linear-gradient(180deg, #eeebff 0, #f5f6fa 300px);
  font-family:
    Inter,
    system-ui,
    -apple-system,
    'Segoe UI',
    sans-serif;
  color: var(--text);
  min-height: 100vh;
}
button,
input,
select {
  font: inherit;
}
.app {
  width: min(100%, 800px);
  margin: auto;
  padding: 24px 16px calc(54px + env(safe-area-inset-bottom));
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 2px 25px;
}
.logo {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: var(--primary);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 24px;
  font-weight: 950;
  box-shadow: 0 10px 25px rgba(91, 61, 245, 0.3);
}
.brand h1 {
  margin: 0;
  font-size: 19px;
}
.brand p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.install {
  margin-left: auto;
  border: 1px solid #dcd8ff;
  background: #fff;
  color: var(--primary);
  padding: 9px 12px;
  border-radius: 12px;
  font-weight: 850;
  cursor: pointer;
}
.card {
  background: #fff;
  border: 0;
  border-radius: 24px;
  padding: 26px;
  box-shadow: var(--shadow);
}
.eyebrow {
  display: block;
  width: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    'Segoe UI',
    sans-serif;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary);
}
h2 {
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin: 8px 0;
}
.intro {
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 25px;
}
.field {
  margin-bottom: 21px;
}
.label {
  display: block;
  font-weight: 850;
  margin-bottom: 9px;
}
.money {
  position: relative;
}
.prefix {
  position: absolute;
  left: 17px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 850;
  color: #4c5064;
}
.big-input {
  width: 100%;
  height: 61px;
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 0 17px 0 53px;
  font-size: 23px;
  font-weight: 900;
  outline: none;
}
.big-input:focus,
.small-input:focus,
.small-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(91, 61, 245, 0.09);
}
.help {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  margin-top: 7px;
}
.platforms {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.platform {
  border: 2px solid var(--line);
  border-radius: 16px;
  background: #fff;
  min-height: 86px;
  padding: 10px 8px;
  cursor: pointer;
  font-weight: 850;
  color: #4c5064;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.platform img {
  width: 58px;
  height: 32px;
  object-fit: contain;
}
.package-box,
.manual-box {
  background: #f7f7fb;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 21px;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.small-label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  margin-bottom: 6px;
}
.small-input,
.small-select {
  width: 100%;
  height: 44px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 0 12px;
  outline: none;
  color: var(--text);
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 14px;
  font-size: 13px;
  color: #4f5365;
  line-height: 1.4;
}
.check input {
  margin-top: 3px;
}
.calc-info {
  margin-top: 12px;
  padding: 11px 12px;
  border-radius: 12px;
  background: #eef4ff;
  color: #385a8f;
  font-size: 12px;
  line-height: 1.45;
}
.calculate {
  width: 100%;
  border: 0;
  border-radius: 17px;
  background: var(--primary);
  color: #fff;
  padding: 18px;
  font-size: 17px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 25px rgba(91, 61, 245, 0.25);
}
.calculate:hover {
  background: var(--primary-dark);
}
.error {
  background: #fff0f0;
  color: #a62e2e;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 16px;
  font-weight: 750;
}
.results {
  margin-top: 22px;
}
.result-title {
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 13px;
}
.result-grid {
  display: grid;
  gap: 12px;
}
.result-card {
  border: 2px solid var(--line);
  border-radius: 18px;
  padding: 18px;
}
.result-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}
.platform-name {
  font-weight: 950;
  display: flex;
  align-items: center;
  gap: 8px;
}
.platform-name img {
  width: 42px;
  height: 28px;
  object-fit: contain;
}
.platform-subtitle {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}
.receive-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  text-align: right;
}
.receive {
  font-size: 28px;
  font-weight: 950;
  letter-spacing: -0.04em;
  text-align: right;
  color: var(--good);
}
.fee-line {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}
.fee-line strong {
  color: var(--text);
}
.profit {
  margin-top: 9px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #edf9f2;
  color: var(--good);
  font-size: 13px;
  font-weight: 850;
}
.profit.negative {
  background: #fff0f0;
  color: var(--bad);
}
.details-toggle {
  margin-top: 13px;
  border: 0;
  background: none;
  padding: 0;
  color: var(--primary);
  font-weight: 850;
  cursor: pointer;
}
.details {
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding-top: 10px;
}
.row {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 5px 0;
  color: var(--muted);
  font-size: 14px;
}
.row strong {
  color: var(--text);
  text-align: right;
}
.notice {
  margin-top: 14px;
  background: #fff4df;
  color: var(--warning);
  padding: 13px 14px;
  border-radius: 14px;
  font-size: 12px;
  line-height: 1.45;
}
.settings {
  margin-top: 17px;
}
.settings summary {
  cursor: pointer;
  font-weight: 850;
  color: #53576b;
  padding: 8px 0;
  list-style: none;
}
.settings summary::-webkit-details-marker {
  display: none;
}
.settings summary::after {
  content: '＋';
  float: right;
}
.settings[open] summary::after {
  content: '−';
}
.settings-box {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 8px;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}
.heading {
  grid-column: 1/-1;
  font-weight: 950;
  margin-top: 8px;
}
.settings-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 14px;
}
.reset {
  border: 0;
  background: #f0eff7;
  color: #4e456f;
  padding: 10px 13px;
  border-radius: 10px;
  font-weight: 800;
  cursor: pointer;
}
.save-status {
  font-size: 12px;
  color: var(--good);
  font-weight: 800;
  transition: 0.2s;
}
.footer {
  display: block;
  background: transparent;
  border: 0;
  padding: 0;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  margin-top: 19px;
}
@media (max-width: 620px) {
  .app {
    padding: 14px 11px 40px;
  }
  .card {
    padding: 21px 16px;
  }
  h2 {
    font-size: 26px;
  }
  .platforms {
    grid-template-columns: 1fr;
  }
  .platform {
    min-height: 61px;
    flex-direction: row;
  }
  .grid-4,
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .result-top {
    display: block;
  }
  .receive-label,
  .receive {
    text-align: left;
  }
  .receive {
    margin-top: 9px;
    font-size: 25px;
  }
  .install {
    font-size: 12px;
    padding: 8px;
  }
}

/* Garante que elementos controlados pelo Tailwind permaneçam ocultos. */
.hidden {
  display: none !important;
}

/* Ajustes de compatibilidade visual */
.card h2 {
  font-size: 24px !important;
  line-height: 1.12 !important;
  letter-spacing: -0.03em !important;
}
.platform img {
  display: block !important;
  width: 52px !important;
  height: 30px !important;
  max-width: 52px !important;
  max-height: 30px !important;
  object-fit: contain !important;
  flex: 0 0 auto !important;
}
.platform-name img {
  display: block !important;
  width: 38px !important;
  height: 25px !important;
  max-width: 38px !important;
  max-height: 25px !important;
  object-fit: contain !important;
  flex: 0 0 auto !important;
}
.heading img,
.settings-brand-logo {
  display: inline-block !important;
  max-width: 30px !important;
  max-height: 22px !important;
  object-fit: contain !important;
  vertical-align: middle !important;
  flex: 0 0 auto !important;
}
.settings-grid input,
.settings-grid select {
  width: 100% !important;
  height: 44px !important;
  border: 1.5px solid var(--line) !important;
  border-radius: 12px !important;
  background: #fff !important;
  padding: 0 12px !important;
  outline: none !important;
  color: var(--text) !important;
  box-sizing: border-box !important;
}
.settings-grid input:focus,
.settings-grid select:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 4px rgba(91, 61, 245, 0.09) !important;
}
.settings-grid label {
  display: block !important;
  min-width: 0 !important;
}
.heading {
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  min-height: 28px !important;
  overflow: hidden !important;
}
@media (max-width: 620px) {
  .card h2 {
    font-size: 22px !important;
  }
  .platform img {
    width: 46px !important;
    height: 27px !important;
    max-width: 46px !important;
    max-height: 27px !important;
  }
}

.platform {
  position: relative;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}
.platform[data-selected='true'] {
  border-color: #5b3df5 !important;
  background: #f3f0ff !important;
  color: #5b3df5 !important;
  box-shadow:
    0 0 0 3px rgba(91, 61, 245, 0.12),
    0 8px 20px rgba(91, 61, 245, 0.1);
  transform: translateY(-1px);
}
.platform[data-selected='false'] {
  border-color: #e7e8ef !important;
  background: #fff !important;
  color: #4c5064 !important;
  box-shadow: none;
  transform: none;
}
