:root {
  --bg: #fff8f7;
  --surface: #ffffff;
  --surface-soft: #f8eeed;
  --ink: #24191d;
  --muted: #705f65;
  --berry: #8a1f45;
  --berry-dark: #671833;
  --rose: #d96c8e;
  --champagne: #f5d7a1;
  --teal: #126b68;
  --charcoal: #27252a;
  --line: #ead8da;
  --danger: #b42318;
  --success: #12715b;
  --shadow: 0 24px 70px rgba(60, 22, 34, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body,
button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  flex: 0 0 auto;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  align-items: center;
  background: rgba(255, 248, 247, 0.92);
  border-bottom: 1px solid rgba(234, 216, 218, 0.9);
  display: flex;
  height: 72px;
  justify-content: space-between;
  padding: 0 clamp(18px, 5vw, 72px);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
}

.brand {
  align-items: center;
  display: inline-flex;
  font-weight: 800;
  gap: 10px;
  letter-spacing: 0;
}

.brand-mark {
  align-items: center;
  background: var(--charcoal);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: white;
  display: inline-flex;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.topnav {
  align-items: center;
  display: flex;
  gap: 8px;
}

.topnav a,
.side-nav a,
.link-button {
  color: var(--muted);
  font-weight: 700;
  padding: 10px 12px;
}

.topnav a:hover,
.side-nav a:hover,
.side-nav a.active,
.link-button:hover {
  color: var(--berry);
}

.link-button {
  align-items: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  gap: 8px;
}

.icon-button {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.nav-toggle {
  display: none;
}

.hero {
  min-height: calc(100vh - 72px);
  overflow: hidden;
  position: relative;
}

.hero-image,
.hero-overlay {
  height: 100%;
  inset: 0;
  position: absolute;
  width: 100%;
}

.hero-image {
  object-fit: cover;
  object-position: 62% center;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(31, 20, 24, 0.82) 0%, rgba(31, 20, 24, 0.52) 38%, rgba(31, 20, 24, 0.18) 72%),
    linear-gradient(0deg, rgba(31, 20, 24, 0.28), transparent 34%);
}

.hero-content {
  color: white;
  max-width: 680px;
  padding: clamp(72px, 12vw, 150px) clamp(20px, 7vw, 92px) 96px;
  position: relative;
  z-index: 1;
}

.eyebrow {
  color: var(--rose);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.hero h1,
.auth-copy h1,
.dashboard-hero h1,
.notice-panel h1 {
  font-size: clamp(2.2rem, 7vw, 5.4rem);
  line-height: 0.96;
  margin: 0;
}

.hero-copy {
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1rem, 2.6vw, 1.22rem);
  line-height: 1.7;
  margin: 24px 0 0;
  max-width: 620px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  align-items: center;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  gap: 9px;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.72;
  transform: none;
}

.button.primary {
  background: var(--berry);
  box-shadow: 0 14px 34px rgba(138, 31, 69, 0.28);
  color: white;
}

.button.primary:hover {
  background: var(--berry-dark);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
}

.button.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
}

.button.full {
  width: 100%;
}

.button.small {
  font-size: 0.88rem;
  min-height: 38px;
  padding: 9px 12px;
}

.button.light {
  border-color: rgba(255, 255, 255, 0.32);
  color: white;
}

.section {
  padding: clamp(56px, 8vw, 104px) clamp(20px, 7vw, 92px);
}

.section-heading {
  max-width: 780px;
}

.section-heading h2,
.compact-heading h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.08;
  margin: 0;
}

.section-heading p {
  color: var(--muted);
  line-height: 1.7;
}

.steps-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 34px;
}

.step-card,
.metric-card,
.panel-section,
.notice-panel,
.auth-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.step-card {
  min-height: 212px;
  padding: 22px;
}

.step-card h3 {
  font-size: 1.05rem;
  margin: 22px 0 10px;
}

.step-card p {
  color: var(--muted);
  line-height: 1.58;
  margin: 0;
}

.step-number {
  align-items: center;
  background: var(--surface-soft);
  color: var(--berry);
  display: inline-flex;
  font-weight: 800;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.trust-band {
  align-items: center;
  background: var(--charcoal);
  color: white;
  display: flex;
  gap: 24px;
  justify-content: space-between;
}

.trust-band h2 {
  margin: 0;
  max-width: 760px;
}

.trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.trust-list span,
.status-list span {
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
  padding: 10px 12px;
}

.auth-page {
  align-items: center;
  display: flex;
  min-height: calc(100vh - 72px);
  padding: clamp(24px, 7vw, 80px);
}

.legal-page {
  padding: 34px clamp(18px, 5vw, 72px);
}

.legal-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: grid;
  gap: 18px;
  margin: 0 auto;
  max-width: 920px;
  padding: clamp(24px, 5vw, 48px);
}

.legal-panel h1 {
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1;
  margin: 0;
}

.legal-panel article {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.legal-panel h2 {
  margin: 0 0 8px;
}

.legal-panel p {
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

.legal-warning {
  background: #fff7e8;
  border: 1px solid rgba(245, 215, 161, 0.85);
  color: #84530d !important;
  font-weight: 800;
  padding: 14px;
}

.auth-panel {
  display: grid;
  gap: 34px;
  grid-template-columns: 0.92fr 1.08fr;
  margin: 0 auto;
  max-width: 1040px;
  padding: clamp(22px, 5vw, 48px);
  width: 100%;
}

.auth-panel.compact {
  max-width: 860px;
}

.auth-copy {
  align-self: center;
}

.auth-copy h1 {
  font-size: clamp(2rem, 5vw, 3.8rem);
}

.auth-copy p {
  color: var(--muted);
  line-height: 1.7;
}

.form {
  display: grid;
  gap: 15px;
}

.field {
  display: grid;
  gap: 7px;
}

.field span,
.checkbox-row {
  color: var(--charcoal);
  font-weight: 800;
}

.field input,
.field select,
.field textarea {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  min-height: 48px;
  outline: none;
  padding: 12px 13px;
  width: 100%;
}

.field textarea {
  min-height: 118px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--berry);
  box-shadow: 0 0 0 4px rgba(138, 31, 69, 0.1);
}

.field small {
  color: var(--danger);
  min-height: 18px;
}

.checkbox-row {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  line-height: 1.4;
}

.checkbox-row input {
  accent-color: var(--berry);
  height: 18px;
  margin-top: 2px;
  width: 18px;
}

.form-message {
  color: var(--muted);
  font-weight: 700;
  min-height: 22px;
}

.form-message[data-type="error"] {
  color: var(--danger);
}

.form-message[data-type="success"] {
  color: var(--success);
}

.form-link,
.recover-link {
  color: var(--muted);
  margin: 0;
  text-align: center;
}

.form-link a,
.recover-link {
  color: var(--berry);
  font-weight: 800;
}

.recover-link {
  justify-self: flex-start;
  text-align: left;
}

.dashboard-shell {
  background: #fbf5f4;
  display: grid;
  grid-template-columns: 284px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: #221b20;
  color: white;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 22px;
}

.dashboard-brand .brand-mark {
  background: var(--berry);
}

.side-nav {
  display: grid;
  gap: 6px;
}

.side-nav a {
  border: 1px solid transparent;
  color: rgba(255, 255, 255, 0.74);
}

.side-nav a.active,
.side-nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
  color: white;
}

.logout-button {
  margin-top: auto;
}

.dashboard-main {
  min-width: 0;
}

.dashboard-topbar {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 14px;
  min-height: 76px;
  padding: 16px clamp(18px, 4vw, 44px);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
}

.dashboard-topbar strong {
  display: block;
  font-size: 1.05rem;
}

.dashboard-topbar .eyebrow {
  margin-bottom: 2px;
}

.dashboard-content {
  display: grid;
  gap: 22px;
  padding: clamp(18px, 4vw, 44px);
}

.dashboard-hero {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(138, 31, 69, 0.96), rgba(18, 107, 104, 0.9)),
    var(--berry);
  color: white;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: clamp(24px, 5vw, 44px);
}

.dashboard-hero.admin-hero {
  background:
    linear-gradient(135deg, rgba(39, 37, 42, 0.98), rgba(138, 31, 69, 0.88)),
    var(--charcoal);
}

.dashboard-hero h1 {
  font-size: clamp(2rem, 4vw, 4rem);
}

.dashboard-hero p {
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.7;
  margin: 14px 0 0;
  max-width: 720px;
}

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

.admin-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.admin-section-nav {
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  position: sticky;
  top: 0;
  z-index: 5;
}

.admin-section-nav a,
.admin-section-nav button {
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 800;
  font-family: inherit;
  padding: 8px 10px;
}

.admin-section-nav a:hover,
.admin-section-nav button:hover {
  color: var(--berry);
}

.admin-filter-bar {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5, minmax(150px, 1fr)) auto auto;
  margin-bottom: 18px;
}

.admin-filter-bar .field {
  gap: 6px;
}

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

.admin-client-card,
.report-card {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  display: grid;
  gap: 12px;
  padding: 16px;
}

.admin-client-card p,
.muted-text {
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.mini-metrics,
.detail-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-metrics span,
.detail-stack span {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 7px 9px;
}

.admin-client-card summary {
  color: var(--berry);
  cursor: pointer;
  font-weight: 900;
}

.admin-kit-form {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  margin-bottom: 18px;
  padding: 18px;
}

.segmented-control {
  align-items: center;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.segmented-control button {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  font-weight: 900;
  min-height: 40px;
  padding: 8px 12px;
}

.segmented-control button.active {
  background: var(--berry);
  border-color: var(--berry);
  color: #fff;
}

.report-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 16px;
}

.report-card h3 {
  margin: 0;
}

.compact-table {
  max-height: 320px;
  overflow: auto;
}

.status-danger {
  background: #fff1f0;
  color: var(--danger);
}

.danger-action {
  color: var(--danger);
}

.metric-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 132px;
  padding: 20px;
}

.metric-card span {
  color: var(--muted);
  display: block;
  font-weight: 800;
  line-height: 1.35;
}

.metric-card strong {
  display: block;
  font-size: clamp(1.55rem, 2.6vw, 2.55rem);
  line-height: 1.05;
  margin-top: 16px;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.metric-card strong.metric-value-compact {
  font-size: clamp(1.05rem, 1.55vw, 1.45rem);
  line-height: 1.18;
  text-transform: none;
}

.status-card-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 18px;
}

.status-info-card {
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid;
  gap: 14px;
  min-height: 96px;
  padding: 16px;
}

.status-info-card span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.3;
}

.status-info-value {
  align-self: end;
  border: 1px solid transparent;
  display: inline-flex;
  font-size: 0.98rem;
  font-weight: 900;
  justify-self: start;
  line-height: 1.1;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 8px 10px;
}

.status-info-neutral {
  background: #f7f2f1;
  color: var(--charcoal);
}

.status-info-success {
  background: #ecfdf7;
  color: var(--success);
}

.status-info-warning {
  background: #fff7e8;
  color: #84530d;
}

.status-info-danger {
  background: #fff1f0;
  color: var(--danger);
}

.panel-section {
  overflow: hidden;
  padding: 22px;
}

.compact-heading h2 {
  font-size: 1.45rem;
}

.compact-heading p {
  margin-bottom: 0;
}

.table-wrap {
  margin-top: 18px;
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  min-width: 720px;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 14px 10px;
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.status-pill {
  background: var(--surface-soft);
  color: var(--berry);
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 7px 9px;
  white-space: nowrap;
}

.status-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.status-list span {
  background: var(--surface-soft);
  border-color: var(--line);
  color: var(--berry-dark);
}

.form-panel {
  overflow: visible;
}

.form-grid {
  display: grid;
  gap: 15px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.raffle-form {
  gap: 18px;
}

.kit-preview {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  display: grid;
  gap: 18px;
  grid-template-columns: 180px minmax(0, 1fr);
  padding: 14px;
}

.kit-preview img {
  aspect-ratio: 4 / 3;
  height: auto;
  object-fit: cover;
  width: 100%;
}

.kit-preview h3,
.empty-state h3 {
  margin: 0 0 8px;
}

.kit-preview p,
.empty-state p {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

.rules-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.rules-list span {
  background: white;
  border: 1px solid var(--line);
  color: var(--berry-dark);
  font-size: 0.84rem;
  font-weight: 800;
  padding: 8px 10px;
}

.calculation-box,
.share-box,
.inline-warning,
.empty-state {
  border: 1px solid var(--line);
  padding: 16px;
}

.calculation-box {
  background: #fff;
  display: grid;
  gap: 5px;
}

.calculation-box span,
.calculation-box small {
  color: var(--muted);
  font-weight: 700;
}

.calculation-box strong {
  color: var(--berry);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1;
}

.inline-warning {
  background: #fff4df;
  color: #7a4d05;
  font-weight: 800;
}

.inline-success {
  background: #ecfdf7;
  border: 1px solid rgba(18, 113, 91, 0.22);
  color: var(--success);
  font-weight: 800;
  padding: 16px;
}

.action-row,
.card-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.raffle-cards {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.raffle-cards.compact-list {
  grid-template-columns: 1fr;
  margin-top: 18px;
}

.raffle-card {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  overflow: hidden;
}

.raffle-card > img {
  height: 100%;
  min-height: 178px;
  object-fit: cover;
  width: 100%;
}

.raffle-card-body {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.card-title-row {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.card-title-row h3 {
  font-size: 1.12rem;
  margin: 0;
}

.raffle-card-body p {
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.progress-track {
  background: var(--surface-soft);
  height: 10px;
  overflow: hidden;
  width: 100%;
}

.progress-track span {
  background: linear-gradient(90deg, var(--berry), var(--teal));
  display: block;
  height: 100%;
}

.progress-track.large {
  height: 16px;
  margin-top: 16px;
}

.detail-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.raffle-detail-hero {
  align-items: flex-end;
}

.status-header {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.status-header h2 {
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  margin: 0;
}

.status-header strong {
  color: var(--berry);
  font-size: 1.4rem;
}

.share-box {
  align-items: center;
  background: var(--surface-soft);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  margin-top: 18px;
}

.share-box span {
  color: var(--muted);
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.number-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  margin-top: 18px;
}

.number-chip {
  background: white;
  border: 1px solid var(--line);
  color: var(--ink);
  display: grid;
  gap: 4px;
  min-height: 58px;
  padding: 8px;
}

.number-chip:not(:disabled) {
  cursor: pointer;
}

.number-chip:disabled {
  cursor: not-allowed;
}

.number-chip strong {
  font-size: 1rem;
}

.number-chip span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.number-chip.public-number.selected {
  border-color: var(--berry);
  box-shadow: 0 0 0 3px rgba(138, 31, 69, 0.14);
  color: var(--berry);
}

.number-chip.disponivel {
  background: white;
}

.number-chip.pago {
  background: #ecfdf7;
  border-color: rgba(18, 113, 91, 0.24);
  color: var(--success);
}

.number-chip.reservado,
.number-chip.aguardando-pagamento {
  background: #fff7e8;
  border-color: rgba(245, 215, 161, 0.8);
  color: #84530d;
}

.number-chip.cancelado,
.number-chip.bloqueada {
  background: #fff1f0;
  border-color: rgba(180, 35, 24, 0.22);
  color: var(--danger);
}

.number-chip.sorteado {
  background: #eef8f8;
  border-color: rgba(18, 107, 104, 0.24);
  color: var(--teal);
}

.empty-state {
  background: var(--surface);
  grid-column: 1 / -1;
}

.public-raffle {
  min-height: 100vh;
}

.public-hero {
  background: var(--charcoal);
  color: white;
  display: grid;
  gap: clamp(20px, 5vw, 54px);
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  padding: clamp(24px, 7vw, 84px);
}

.public-hero img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}

.public-hero h1 {
  font-size: clamp(2.3rem, 6vw, 5rem);
  line-height: 0.98;
  margin: 0;
}

.public-hero p {
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
}

.public-rules span {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.16);
  color: white;
}

.public-section {
  padding-top: 42px;
}

.public-layout {
  align-items: start;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) 360px;
}

.public-progress {
  background: var(--surface);
  border: 1px solid var(--line);
  margin-top: 20px;
  padding: 16px;
}

.public-progress .status-header strong {
  color: var(--berry);
  font-size: 1rem;
}

.public-progress .status-header span {
  color: var(--muted);
  font-weight: 800;
}

.number-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.number-legend span {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  display: inline-flex;
  font-size: 0.86rem;
  font-weight: 800;
  gap: 7px;
  padding: 8px 10px;
}

.legend-dot {
  display: inline-block;
  height: 10px;
  width: 10px;
}

.legend-dot.disponivel {
  background: white;
  border: 1px solid var(--line);
}

.legend-dot.reservado {
  background: #fff7e8;
  border: 1px solid rgba(245, 215, 161, 0.8);
}

.legend-dot.aguardando {
  background: #fff7e8;
  border: 1px solid #84530d;
}

.legend-dot.pago {
  background: #ecfdf7;
  border: 1px solid rgba(18, 113, 91, 0.24);
}

.selection-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: grid;
  gap: 18px;
  padding: 20px;
  position: sticky;
  top: 92px;
}

.selection-panel h2 {
  margin: 0;
}

.selection-panel p {
  color: var(--muted);
  line-height: 1.55;
}

.selected-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 0;
}

.selected-list.visible,
.selected-list:not(:empty) {
  margin-top: 10px;
}

.selected-list span {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--berry);
  font-weight: 800;
  padding: 7px 9px;
}

.selection-total {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding-top: 14px;
}

.selection-total span {
  color: var(--muted);
  font-weight: 800;
}

.selection-total strong {
  color: var(--berry);
  font-size: 1.35rem;
}

.participant-form {
  gap: 14px;
}

.countdown {
  color: var(--muted);
  font-weight: 800;
  margin-bottom: 0;
}

.countdown strong {
  color: var(--berry);
}

.helper-text {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

.public-info-section {
  padding-top: 0;
}

.info-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.info-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 22px;
}

.info-panel h2 {
  margin: 0 0 10px;
}

.info-panel p {
  color: var(--muted);
  line-height: 1.6;
}

.confirmation-panel {
  max-width: 720px;
}

.confirmation-summary {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  display: grid;
  gap: 8px;
  margin: 22px 0;
  padding: 18px;
  text-align: left;
}

.confirmation-summary > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.confirmation-summary > strong {
  color: var(--ink);
  font-size: 1.08rem;
}

.kit-payment-panel {
  display: grid;
  gap: 18px;
}

.kit-congrats {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  padding: 18px;
}

.kit-congrats h2 {
  font-size: clamp(1.55rem, 4vw, 2.5rem);
  line-height: 1.08;
  margin: 0;
}

.kit-congrats p:last-child {
  color: var(--muted);
  line-height: 1.6;
}

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

.history-list {
  display: grid;
  gap: 10px;
}

.history-list h3 {
  margin: 0;
}

.history-list article {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  padding: 14px;
}

.history-list article p {
  color: var(--muted);
  line-height: 1.5;
  margin: 6px 0;
}

.history-list article span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.admin-action-stack {
  display: grid;
  gap: 8px;
  min-width: 180px;
}

.inline-input {
  border: 1px solid var(--line);
  min-height: 38px;
  padding: 8px 10px;
  width: 100%;
}

.kit-pagamento_do_kit_em_análise,
.kit-aguardando_pagamento_do_kit {
  background: #fff7e8;
  color: #84530d;
}

.kit-kit_pago,
.kit-kit_liberado {
  background: #ecfdf7;
  color: var(--success);
}

.draw-panel {
  display: grid;
  gap: 18px;
}

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

.draw-action-box,
.draw-result-box,
.technical-record,
.result-public-callout {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  display: grid;
  gap: 14px;
  padding: 18px;
}

.draw-action-box,
.draw-result-box,
.result-public-callout {
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto;
}

.draw-action-box p,
.draw-result-box p {
  color: var(--muted);
  line-height: 1.5;
  margin: 6px 0 0;
}

.draw-result-box h2 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1;
  margin: 0;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
}

.technical-record h3 {
  margin: 0;
}

.technical-record dl {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.technical-record div {
  background: #fff;
  border: 1px solid var(--line);
  padding: 12px;
}

.technical-record dt {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.technical-record dd {
  color: var(--ink);
  font-weight: 800;
  margin: 6px 0 0;
  overflow-wrap: anywhere;
}

.number-chip.sorteado {
  background: #fff4d7;
  border-color: #f0be4d;
  color: #7a5200;
}

.result-page .public-section {
  display: grid;
  gap: 18px;
}

.result-hero .result-winner-box {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.8);
  display: inline-grid;
  gap: 6px;
  margin-top: 18px;
  padding: 16px 20px;
}

.result-winner-box span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.result-winner-box strong {
  color: var(--berry);
  font-size: clamp(2.8rem, 10vw, 5rem);
  line-height: 0.95;
}

.compact-public-section {
  padding-bottom: 0;
}

.dev-payment-box {
  background: #fff7e8;
  border: 1px solid rgba(245, 215, 161, 0.8);
  display: grid;
  gap: 12px;
  margin: 20px 0;
  padding: 18px;
  text-align: left;
}

.dev-payment-box h2 {
  margin: 0;
}

.dev-payment-box p {
  margin: 0;
}

.payment-page {
  background: linear-gradient(180deg, #fff8fb 0%, #f7fbfb 100%);
  min-height: calc(100vh - 72px);
  padding: 42px 20px;
}

.payment-shell {
  display: grid;
  gap: 22px;
  margin: 0 auto;
  max-width: 1120px;
}

.payment-header {
  max-width: 720px;
}

.payment-header h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  margin: 6px 0 10px;
}

.payment-header p {
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

.payment-layout {
  align-items: stretch;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
}

.payment-summary-box,
.pix-box,
.payment-proof-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  padding: 24px;
}

.order-code {
  background: #f5e7f0;
  color: var(--berry);
  display: inline-flex;
  font-weight: 800;
  margin-bottom: 12px;
  padding: 8px 10px;
}

.pix-countdown {
  margin-top: 16px;
}

.pix-countdown .expiring {
  color: var(--danger);
}

.pix-box {
  display: grid;
  gap: 16px;
}

.checkout-box {
  align-content: start;
}

.pix-box h2 {
  margin: 0;
}

.pix-qr-image,
.pix-qr-pdf,
.pix-qr-placeholder {
  aspect-ratio: 1 / 1;
  background: #ffffff;
  border: 1px solid var(--line);
  display: block;
  width: 100%;
}

.pix-qr-image {
  object-fit: contain;
  padding: 12px;
}

.pix-qr-placeholder {
  align-items: center;
  color: var(--muted);
  display: grid;
  justify-items: center;
  padding: 22px;
  text-align: center;
}

.pix-key-box,
.receiver-box {
  background: var(--surface-soft);
  display: grid;
  gap: 8px;
  overflow-wrap: anywhere;
  padding: 14px;
}

.pix-key-box span,
.receiver-box span {
  color: var(--muted);
  font-size: 0.9rem;
}

.payment-proof-panel summary {
  cursor: pointer;
  font-weight: 800;
}

.admin-payments-table td {
  vertical-align: top;
}

.admin-pix-form {
  margin-bottom: 18px;
}

.pix-history {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.payment-aguardando_pagamento,
.payment-pagamento_informado,
.payment-em_analise,
.payment-pendente,
.payment-processando {
  background: #fff7e8;
  color: #84530d;
}

.payment-pago {
  background: #ecfdf7;
  color: var(--success);
}

.payment-recusado,
.payment-pagamento_divergente,
.payment-webhook_sem_correspondencia,
.payment-falhou,
.payment-expirado,
.payment-cancelado {
  background: #fff1f0;
  color: var(--danger);
}

.payment-estornado {
  background: #eef8f8;
  color: var(--teal);
}

.notice-panel {
  margin: auto;
  max-width: 560px;
  padding: 34px;
  text-align: center;
}

.notice-icon {
  align-items: center;
  background: var(--surface-soft);
  color: var(--berry);
  display: inline-flex;
  height: 56px;
  justify-content: center;
  margin-bottom: 18px;
  width: 56px;
}

.notice-panel p {
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 1020px) {
  .steps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metrics-grid,
  .admin-grid,
  .detail-grid,
  .finance-grid,
  .draw-summary-grid,
  .result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trust-band,
  .dashboard-hero,
  .public-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .public-hero {
    display: grid;
    grid-template-columns: 1fr;
  }

  .trust-list {
    justify-content: flex-start;
  }

  .raffle-cards {
    grid-template-columns: 1fr;
  }

  .public-layout,
  .payment-layout,
  .info-grid,
  .admin-client-grid,
  .report-grid {
    grid-template-columns: 1fr;
  }

  .admin-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .selection-panel {
    position: static;
  }

  .share-box {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .topbar {
    height: 66px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .topnav {
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: none;
    flex-direction: column;
    min-width: 210px;
    padding: 10px;
    position: absolute;
    right: 18px;
    top: 74px;
  }

  .topnav.open {
    display: flex;
  }

  .topnav a,
  .topnav .link-button {
    justify-content: flex-start;
    width: 100%;
  }

  .hero {
    min-height: calc(100vh - 66px);
  }

  .hero-overlay {
    background:
      linear-gradient(90deg, rgba(31, 20, 24, 0.9), rgba(31, 20, 24, 0.58)),
      linear-gradient(0deg, rgba(31, 20, 24, 0.32), transparent 30%);
  }

  .hero-content {
    padding-top: 74px;
  }

  .steps-grid,
  .metrics-grid,
  .admin-grid,
  .detail-grid,
  .finance-grid,
  .draw-summary-grid,
  .result-grid,
  .technical-record dl {
    grid-template-columns: 1fr;
  }

  .draw-action-box,
  .draw-result-box,
  .result-public-callout {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .admin-filter-bar {
    grid-template-columns: 1fr;
  }

  .admin-section-nav {
    position: static;
  }

  .auth-panel,
  .form-grid,
  .kit-preview,
  .raffle-card {
    grid-template-columns: 1fr;
  }

  .raffle-card > img {
    aspect-ratio: 16 / 9;
    min-height: 0;
  }

  .dashboard-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    bottom: 0;
    left: 0;
    max-width: 300px;
    position: fixed;
    top: 0;
    transform: translateX(-102%);
    transition: transform 0.2s ease;
    width: 86vw;
    z-index: 30;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .dashboard-topbar .nav-toggle {
    display: inline-flex;
  }

  .dashboard-hero .button,
  .dashboard-hero .detail-actions,
  .detail-actions .button,
  .action-row .button,
  .card-actions .button,
  .selection-panel .button {
    width: 100%;
  }

  .status-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .public-hero,
  .public-section,
  .public-info-section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .number-grid {
    grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
  }
}

@media (max-width: 520px) {
  .brand span:last-child {
    max-width: 150px;
  }

  .hero-actions,
  .hero-actions .button {
    width: 100%;
  }

  .section,
  .auth-page,
  .payment-page,
  .dashboard-content {
    padding-left: 16px;
    padding-right: 16px;
  }

  .auth-panel,
  .notice-panel,
  .panel-section,
  .payment-summary-box,
  .pix-box,
  .payment-proof-panel,
  .dashboard-hero {
    padding: 20px;
  }

  .metric-card {
    min-height: 116px;
  }
}
