.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stat-card,
.chart-card,
.ops-card {
  border: 1px solid rgba(59, 130, 246, .22);
  border-radius: var(--radius-panel);
  background: linear-gradient(180deg, rgba(8, 37, 83, .92), rgba(5, 29, 68, .78));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 14px 36px rgba(0,0,0,.16);
}

.stat-card {
  min-height: 166px;
  padding: 18px 18px 12px;
}

.stat-icon {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  margin-bottom: 9px;
  border-radius: 50%;
  border: 1px solid rgba(0, 213, 232, .48);
  background: rgba(20, 121, 255, .12);
  box-shadow: 0 0 20px rgba(0,213,232,.24);
}

.stat-icon::before {
  content: "";
  width: 13px;
  height: 13px;
  border: 2px solid var(--cyan-400);
  border-radius: 4px;
  transform: rotate(0deg);
}
.stat-icon.coin::before { border-radius: 50%; }
.stat-icon.ticket::before { transform: rotate(-34deg); border-color: #4c55ff; }
.stat-icon.profit::before { border-radius: 50%; border-right-color: transparent; }

.stat-card p,
.chart-card h2,
.ops-card h2 {
  margin: 0;
  color: rgba(247, 250, 255, .92);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.stat-card strong {
  display: block;
  margin-top: 14px;
  color: #fff;
  font-size: clamp(20px, 1.8vw, 29px);
  font-weight: 700;
  letter-spacing: -.03em;
}

.stat-card small {
  display: block;
  margin-top: 8px;
  color: #00e2c9;
  font-size: 13px;
  font-weight: 700;
}

.sparkline {
  height: 32px;
  display: flex;
  align-items: end;
  gap: 5px;
  margin-top: 10px;
}

.sparkline i {
  flex: 1;
  height: var(--line-h, 30%);
  border-radius: 999px 999px 0 0;
  background: linear-gradient(180deg, var(--blue-400), var(--cyan-500));
  clip-path: polygon(0 62%, 30% 45%, 48% 58%, 68% 28%, 100% 18%, 100% 100%, 0 100%);
  opacity: .88;
}
.sparkline i:nth-child(1) { --line-h: 34%; }
.sparkline i:nth-child(2) { --line-h: 48%; }
.sparkline i:nth-child(3) { --line-h: 40%; }
.sparkline i:nth-child(4) { --line-h: 67%; }
.sparkline i:nth-child(5) { --line-h: 54%; }
.sparkline i:nth-child(6) { --line-h: 72%; }
.sparkline i:nth-child(7) { --line-h: 90%; }
.sparkline.alt i:nth-child(1) { --line-h: 40%; }
.sparkline.alt i:nth-child(2) { --line-h: 72%; }
.sparkline.alt i:nth-child(3) { --line-h: 55%; }
.sparkline.alt i:nth-child(4) { --line-h: 36%; }
.sparkline.alt i:nth-child(5) { --line-h: 68%; }
.sparkline.alt i:nth-child(6) { --line-h: 78%; }
.sparkline.alt i:nth-child(7) { --line-h: 92%; }

.charts-row {
  display: grid;
  grid-template-columns: 1.13fr .87fr;
  gap: 14px;
  margin-top: 14px;
}

.chart-card {
  min-height: 272px;
  padding: 20px 20px 18px;
}

.chart-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chart-card header span {
  color: rgba(255,255,255,.86);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 9px;
  padding: 8px 12px;
  font-size: 13px;
  background: rgba(255,255,255,.05);
}

.bar-chart {
  height: 205px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  align-items: end;
  gap: 20px;
  padding: 28px 18px 0;
  background: linear-gradient(180deg, transparent, transparent 74%, rgba(255,255,255,.09) 75%, transparent 76%);
}

.bar-chart div {
  position: relative;
  height: var(--h);
  min-height: 48px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #00d5e8 0%, #0f63ff 100%);
  box-shadow: 0 0 24px rgba(20,121,255,.28);
}

.bar-chart b {
  position: absolute;
  left: 50%;
  bottom: -30px;
  transform: translateX(-50%);
  color: rgba(255,255,255,.84);
  font-size: 13px;
  font-weight: 500;
}

.receivable-content {
  display: grid;
  grid-template-columns: 158px 1fr;
  gap: 18px;
  align-items: center;
  margin-top: 24px;
}

.donut {
  width: 158px;
  height: 158px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(#0f83ff 0 58%, #4c55ff 58% 82%, #a454e8 82% 91%, #0f63ff 91% 100%);
}

.donut::before {
  content: "";
  position: absolute;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #061a3a;
}

.donut span {
  position: relative;
  z-index: 1;
  color: #fff;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
}

.donut small {
  display: block;
  margin-top: 4px;
  color: rgba(255,255,255,.78);
  font-size: 12px;
  font-weight: 500;
}

.receivable-card ul {
  list-style: none;
  display: grid;
  gap: 11px;
  margin: 0;
  padding: 0;
}

.receivable-card li {
  display: grid;
  grid-template-columns: 13px 1fr auto;
  gap: 10px;
  align-items: start;
  color: rgba(255,255,255,.83);
  font-size: 13px;
  line-height: 1.2;
}

.receivable-card li i {
  width: 11px;
  height: 11px;
  margin-top: 3px;
  border-radius: 50%;
}
.receivable-card .blue { background: #0f83ff; }
.receivable-card .violet { background: #4c55ff; }
.receivable-card .pink { background: #a454e8; }
.receivable-card .green { background: #0f63ff; }
.receivable-card b,
.receivable-card strong { color: #fff; font-weight: 700; }

.ops-card {
  margin-top: 14px;
  padding: 18px 20px 22px;
}

.ops-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  margin-top: 22px;
}

.ops-list span {
  min-height: 54px;
  display: flex;
  flex-direction: column-reverse;
  justify-content: center;
  gap: 6px;
  padding: 0 18px;
  border-left: 1px solid rgba(255,255,255,.08);
}

.ops-list span:first-child { border-left: 0; }
.ops-list b { color: #fff; font-size: 23px; letter-spacing: -.03em; }
.ops-list small { color: rgba(255,255,255,.74); font-size: 11px; text-transform: uppercase; }

.login-logo {
  width: 430px;
  max-width: 92%;
  margin: 0 auto 22px;
}

.auth-title h2 {
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -.035em;
  color: var(--ink);
}

.auth-title p {
  margin: 0 0 28px;
  color: #3f4e6f;
  font-size: 16px;
  line-height: 1.45;
}

.field-label {
  display: block;
  margin: 18px 0 8px;
  color: #172546;
  font-size: 14px;
  font-weight: 600;
}

.input-shell {
  height: 50px;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.input-shell:focus-within {
  border-color: rgba(15, 99, 255, .74);
  box-shadow: 0 0 0 4px rgba(15, 99, 255, .10);
}

.input-shell > svg,
.secondary-button svg,
.create-account-button svg,
.secure-seal svg,
.icon-button svg {
  width: 21px;
  height: 21px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.input-shell > svg {
  margin-left: 16px;
  color: #73809b;
}

.input-shell input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 15px;
}
.input-shell input::placeholder { color: #8792aa; }

.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-right: 4px;
  border: 0;
  border-radius: 8px;
  color: #6a7690;
  background: transparent;
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 20px 0 31px;
}

.check-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #3a4865;
  font-size: 14px;
  font-weight: 500;
}

.check-line input { display: none; }
.check-line span {
  width: 18px;
  height: 18px;
  display: inline-block;
  border: 1.6px solid #93a1bb;
  border-radius: 4px;
  background: #fff;
  transition: var(--transition);
}
.check-line input:checked + span {
  border-color: var(--blue-600);
  background: var(--blue-600);
  box-shadow: inset 0 0 0 3px #fff;
}

.text-link {
  border: 0;
  padding: 4px;
  color: #0f63ff;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
}

.primary-button {
  width: 100%;
  height: 54px;
  border: 0;
  border-radius: 7px;
  color: #fff;
  background: linear-gradient(90deg, #0b55ff 0%, #00bbd2 100%);
  box-shadow: 0 10px 26px rgba(15, 99, 255, .25);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.015em;
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
}

.primary-button:hover { filter: saturate(1.06); box-shadow: 0 14px 32px rgba(15, 99, 255, .32); }

.divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin: 26px 0 20px;
  color: #63708d;
  font-size: 14px;
}
.divider span { height: 1px; background: var(--line); }
.divider b { font-weight: 600; }

.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.secondary-button,
.create-account-button {
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #172546;
  background: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition), background var(--transition);
}

.secondary-button:hover,
.create-account-button:hover {
  border-color: rgba(15, 99, 255, .52);
  background: #fbfdff;
  box-shadow: var(--shadow-soft);
}

.create-account-block {
  margin-top: 24px;
  text-align: center;
}
.create-account-block p {
  margin: 0 0 10px;
  color: #65718c;
  font-size: 14px;
}
.create-account-button {
  width: 100%;
  color: #0f63ff;
  border-color: rgba(15, 99, 255, .42);
  background: #fff;
}

.secure-seal {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 34px;
  color: #6c7892;
  font-size: 18px;
  font-weight: 600;
}
.secure-seal svg {
  width: 24px;
  height: 24px;
  padding: 5px;
  box-sizing: content-box;
  border-radius: 50%;
  background: #eef4ff;
  color: #07173b;
}

.mobile-create-line { display: none; }

.ios-device .pressable.is-pressing {
  transform: scale(.972);
  filter: brightness(.99);
}

.ios-device .primary-button.is-pressing {
  box-shadow: 0 6px 16px rgba(15, 99, 255, .22);
}

/* AJUSTE FINO V2 — componentes mais compactos e proporcionais */
@media (min-width: 1041px) {
  .stats-grid {
    gap: 12px;
  }

  .stat-card {
    min-height: 128px;
    padding: 13px 13px 10px;
  }

  .stat-icon {
    width: 22px;
    height: 22px;
    margin-bottom: 7px;
  }

  .stat-icon::before {
    width: 10px;
    height: 10px;
    border-width: 1.6px;
  }

  .stat-card p,
  .chart-card h2,
  .ops-card h2 {
    font-size: 10px;
  }

  .stat-card strong {
    margin-top: 8px;
    font-size: clamp(17px, 1.35vw, 22px);
    line-height: 1.05;
    letter-spacing: -.035em;
  }

  .stat-card small {
    margin-top: 6px;
    font-size: 11px;
    line-height: 1.2;
  }

  .sparkline {
    height: 22px;
    gap: 4px;
    margin-top: 6px;
  }

  .charts-row {
    gap: 12px;
    margin-top: 12px;
  }

  .chart-card {
    min-height: 188px;
    padding: 14px 15px 12px;
  }

  .chart-card header span {
    padding: 6px 9px;
    font-size: 11px;
  }

  .bar-chart {
    height: 132px;
    gap: 14px;
    padding: 20px 14px 0;
  }

  .bar-chart div {
    min-height: 34px;
    border-radius: 5px 5px 0 0;
  }

  .bar-chart b {
    bottom: -22px;
    font-size: 11px;
  }

  .receivable-content {
    grid-template-columns: 118px 1fr;
    gap: 13px;
    margin-top: 16px;
  }

  .donut {
    width: 118px;
    height: 118px;
  }

  .donut::before {
    width: 72px;
    height: 72px;
  }

  .donut span {
    font-size: 15px;
  }

  .donut small {
    font-size: 10px;
  }

  .receivable-card ul {
    gap: 7px;
  }

  .receivable-card li {
    grid-template-columns: 10px 1fr auto;
    gap: 7px;
    font-size: 10px;
  }

  .receivable-card li i {
    width: 8px;
    height: 8px;
  }

  .ops-card {
    margin-top: 12px;
    padding: 13px 14px 14px;
  }

  .ops-list {
    margin-top: 14px;
  }

  .ops-list span {
    min-height: 42px;
    gap: 4px;
    padding: 0 12px;
  }

  .ops-list b {
    font-size: 17px;
  }

  .ops-list small {
    font-size: 9px;
  }

  .login-logo {
    width: min(78%, 310px);
    max-height: 74px;
    object-fit: contain;
    margin: 0 auto 18px;
  }

  .auth-title h2 {
    font-size: 26px;
    margin-bottom: 7px;
  }

  .auth-title p {
    margin-bottom: 22px;
    font-size: 14px;
  }

  .field-label {
    margin: 14px 0 7px;
    font-size: 13px;
  }

  .input-shell {
    height: 46px;
    grid-template-columns: 40px 1fr auto;
  }

  .input-shell input {
    font-size: 14px;
  }

  .form-row {
    margin: 16px 0 24px;
  }

  .check-line,
  .text-link {
    font-size: 13px;
  }

  .primary-button {
    height: 49px;
    font-size: 16px;
  }

  .divider {
    margin: 20px 0 16px;
  }

  .quick-actions {
    gap: 14px;
  }

  .secondary-button,
  .create-account-button {
    height: 42px;
    font-size: 13px;
  }

  .create-account-block {
    margin-top: 18px;
  }

  .create-account-block p {
    margin-bottom: 8px;
    font-size: 12px;
  }
}
