:root {
  --bg: #f5f5f5;
  --text: #111111;
  --muted: #555555;
  --soft: #666666;
  --line: rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 0, 0, 0.14);
  --accent: #bfba87;
  --accent-ink: #6d6230;
  --white: #ffffff;
  --shadow: 0 8px 25px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Unbounded, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}

img { display: block; max-width: 100%; }
button, input, select, textarea { font-family: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.page-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: #f7f7f7;
  background-image:
    linear-gradient(rgba(247, 247, 247, 0.78), rgba(247, 247, 247, 0.84)),
    url("https://cipherplague.com.br/cdn/shop/files/pc-1920x3000.png?v=1785846426&width=2400");
  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
}

.page, .gate { position: relative; z-index: 1; }

.gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 20px;
}

.boot-lite {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--soft);
}

.gate-card {
  width: min(460px, 100%);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
  padding: 36px 28px 28px;
  backdrop-filter: blur(12px);
  text-align: center;
}

.logo {
  width: 84px;
  margin: 0 auto 22px;
  filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.08));
}

.badge, .kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

.badge {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  margin-bottom: 16px;
}

.gate h1, .page-title {
  font-weight: 800;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  line-height: 1.05;
}

.gate h1 {
  font-size: 30px;
  margin-bottom: 10px;
}

.lead, .page-sub, .help, .empty p, .footnote {
  color: var(--soft);
  font-size: 13px;
  line-height: 1.65;
}

.lead { margin-bottom: 22px; }

.stack { display: grid; gap: 14px; text-align: left; }

.field { display: flex; flex-direction: column; gap: 8px; }

label, .facts dt, .stat span, .sale-meta, .chart-col span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #444;
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 16px;
  padding: 15px 16px;
  font-size: 14px;
  outline: none;
}

input[name="cupom"], input[name="order"] { text-transform: uppercase; }

textarea { min-height: 90px; resize: vertical; }

input:focus, select:focus, textarea:focus {
  border-color: #111;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid #111;
  background: #111;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: transform 0.2s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-ghost {
  background: #fff;
  color: #111;
}

.btn-block { width: 100%; }

.btn-small {
  min-height: 40px;
  padding: 0 16px;
  font-size: 11px;
}

.btn-tiny {
  min-height: 34px;
  padding: 0 12px;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.link-row {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.link-row button, .text-btn {
  border: 0;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.form-error {
  color: #9d1c1c;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.top {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px 10px;
  background: linear-gradient(180deg, rgba(245, 245, 245, 0.94) 55%, rgba(245, 245, 245, 0));
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand img { width: 36px; }

.top-actions { display: flex; align-items: center; gap: 8px; }

.who {
  display: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  gap: 6px;
  padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.92);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.nav-btn {
  flex: 1;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #666;
}

.nav-btn.is-active {
  background: #111;
  color: #fff;
}

.main {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 8px 0 112px;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 18px;
}

.page-title { font-size: clamp(28px, 5vw, 42px); }

.page-sub { margin-top: 8px; max-width: 460px; }

.month-pick {
  width: auto;
  min-width: 168px;
  border-radius: 999px;
  padding: 12px 16px;
  background: #fff;
}

.notes { display: grid; gap: 10px; margin-bottom: 14px; }

.banner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-size: 13px;
  line-height: 1.6;
  color: #333;
}

.banner button {
  border: 0;
  background: transparent;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  flex: none;
}

.hero {
  display: grid;
  gap: 12px;
}

.coupon, .commission, .card, .stat {
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.coupon {
  background: #111;
  color: #fff;
  padding: 26px 24px 22px;
}

.coupon .kicker { color: var(--accent); }

.code {
  margin: 14px 0 8px;
  font-size: clamp(32px, 8vw, 62px);
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 0.95;
  word-break: break-word;
  user-select: all;
}

.coupon p { color: #cfcfcf; font-size: 13px; line-height: 1.6; max-width: 420px; }

.coupon-actions, .inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.coupon .btn { background: #fff; color: #111; border-color: #fff; }
.coupon .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.28); }
.coupon .btn-ghost:hover, .coupon .btn:hover { transform: translateY(-1px); }

.commission {
  background: rgba(255, 255, 255, 0.82);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  backdrop-filter: blur(10px);
}

.amount, .stat strong, .sale strong, .level em {
  font-family: "DM Sans", sans-serif;
  font-variant-numeric: tabular-nums slashed-zero;
}

.amount {
  display: block;
  margin-top: 8px;
  font-size: clamp(34px, 6vw, 52px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.pending-line { margin-top: 10px; color: var(--accent-ink); font-size: 12px; font-weight: 600; }

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.stat {
  background: rgba(255, 255, 255, 0.8);
  padding: 16px;
  backdrop-filter: blur(8px);
}

.stat strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.block {
  margin-top: 22px;
}

.block-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}

.block-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.card {
  background: rgba(255, 255, 255, 0.8);
  padding: 20px;
  backdrop-filter: blur(10px);
}

.goal-copy { margin: 8px 0 14px; font-size: 14px; line-height: 1.6; }

.bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  background: #111;
  border-radius: inherit;
}

.bar-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #666;
}

.levels {
  list-style: none;
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.level {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.level-index {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
}

.level.is-done .level-index { background: #111; color: #fff; border-color: #111; }
.level.is-current .level-index { background: var(--accent); border-color: var(--accent); color: #111; }
.level.is-locked { opacity: 0.55; }

.level strong { display: block; font-size: 14px; text-transform: uppercase; }
.level p { font-size: 12px; color: var(--muted); line-height: 1.45; margin-top: 3px; }
.level em { font-style: normal; font-size: 12px; font-weight: 700; }

.chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 8px;
  padding-bottom: 4px;
}

.chart-col {
  min-width: 36px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.chart-plot {
  height: 88px;
  width: 100%;
  display: flex;
  align-items: flex-end;
}

.chart-bar {
  width: 100%;
  max-width: 28px;
  margin: 0 auto;
  background: #111;
  border-radius: 8px 8px 2px 2px;
  min-height: 6px;
}

.sale {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 16px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.sale-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; font-size: 12px; color: #666; }
.sale-product { font-size: 13px; font-weight: 700; line-height: 1.4; }
.sale-meta { margin-top: 4px; color: #777; letter-spacing: 0.04em; }
.sale strong { font-size: 15px; letter-spacing: -0.03em; text-align: right; }
.sale.is-cancel { opacity: 0.5; }

.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tag-confirmada, .tag-ativo { background: #111; color: #fff; }
.tag-pendente, .tag-analise { background: #f4f0e2; color: var(--accent-ink); }
.tag-cancelada { background: #f1f1f1; color: #777; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }

.chip {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  min-height: 36px;
  padding: 0 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chip.is-on { background: #111; color: #fff; border-color: #111; }

.empty { padding: 12px 0 4px; }
.empty p + p { margin-top: 4px; }

.facts { display: grid; gap: 10px; }
.facts div, .profile-card {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.facts dd { margin-top: 4px; font-weight: 700; font-size: 14px; word-break: break-word; }
.facts .wide { grid-column: 1 / -1; }

.profile-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.help { margin-top: 14px; }

.table-wrap { overflow-x: auto; }

.brand-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.brand-table th {
  text-align: left;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #666;
  padding: 0 8px 10px 0;
  font-weight: 700;
}

.brand-table td {
  padding: 10px 8px 10px 0;
  border-top: 1px solid var(--line);
  vertical-align: middle;
}

.brand-table select { min-width: 130px; padding: 8px 10px; border-radius: 12px; }

.form-grid { display: grid; gap: 12px; }

.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

.marca-search { margin: 4px 0 14px; }

.roster { display: grid; gap: 12px; }

.person {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.person.is-close { border-color: rgba(191, 186, 135, 0.9); }

.person-top, .person-foot, .person-side {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.person-side { align-items: center; flex-wrap: wrap; justify-content: flex-end; }

.person-name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  line-height: 1.15;
}

.person-code {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.person-meta, .person-foot span { color: #666; font-size: 12px; line-height: 1.45; }

.person-nums {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.person-nums span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #666;
}

.person-nums strong {
  display: block;
  margin-top: 4px;
  font-family: "DM Sans", sans-serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.person .goal-copy { margin: 12px 0 8px; font-size: 13px; }

.person-foot { align-items: center; margin-top: 12px; }

.person-ficha { margin-top: 14px; padding-top: 4px; }

.person-orders { margin-top: 8px; }

.status-select {
  width: auto;
  min-width: 132px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
}

@media (min-width: 980px) {
  .roster { grid-template-columns: 1fr 1fr; }
  .person.is-open { grid-column: 1 / -1; }
}

.footnote { margin-top: 18px; }

.toast {
  position: fixed;
  left: 50%;
  top: auto;
  bottom: calc(78px + env(safe-area-inset-bottom));
  max-width: calc(100% - 32px);
  transform: translateX(-50%) translateY(8px);
  z-index: 70;
  background: #111;
  color: #fff;
  border-radius: 999px;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }

:focus-visible { outline: 2px solid #111; outline-offset: 3px; }

@media (min-width: 760px) {
  .facts { grid-template-columns: 1fr 1fr; }
  .form-grid.cols-2 { grid-template-columns: 1fr 1fr; }
  .who { display: block; }
}

@media (min-width: 880px) {
  .hero { grid-template-columns: 1.4fr 0.8fr; align-items: stretch; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .nav {
    position: sticky;
    top: 64px;
    max-width: 560px;
    margin: 0 auto;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow);
  }
  .main { padding-bottom: 48px; }
  .toast { bottom: 24px; }
}

@media (max-width: 759px) {
  .page-head {
    flex-direction: column;
    align-items: stretch;
  }

  .month-pick { width: 100%; }

  .page-bg {
    background-image:
      linear-gradient(rgba(247, 247, 247, 0.78), rgba(247, 247, 247, 0.86)),
      url("https://cipherplague.com.br/cdn/shop/files/mobile-1080x1920_744e551e-7193-41f9-a9e1-118c790afce8.png?v=1785846412&width=1080");
  }
  .gate-card { padding: 28px 18px 22px; }
  .level { grid-template-columns: 42px 1fr; }
  .level em { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
