/* seusorteio — estilos. Pensado primeiro para celular (360–430px); telas maiores ganham colunas.
   Cores: marinho passa confiança, verde só nas ações de compra, dourado para prêmio. */

:root {
  --ink: #10233f;
  --ink-2: #1b3255;
  --muted: #5a6475;
  --line: #e6e1d8;
  --line-strong: #cfc8ba;
  --paper: #f6f4ef;
  --surface: #ffffff;
  --accent: #087a54;
  --accent-hover: #06663f;
  --accent-soft: #e3f1ea;
  --accent-ink: #064e36;
  --gold: #f2b632;
  --gold-soft: #fbefcb;
  --gold-ink: #6b4700;
  --reserved-bg: #fff6e0;
  --reserved-line: #c98a12;
  --reserved-ink: #7a4f00;
  --sold-bg: #e4e0d7;
  --sold-ink: #6b7280;
  --danger: #b42318;
  --danger-soft: #fdece7;
  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 1px 2px rgba(16, 35, 63, .06), 0 8px 24px rgba(16, 35, 63, .06);
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* Nomes antigos usados pelo painel do vendedor. */
  --forest: var(--ink);
  --forest-deep: #0b1a30;
  --lime: var(--accent-soft);
  --white: var(--surface);
  --red: var(--danger);
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
}

/* Base */
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-size: 15px; line-height: 1.45; }
button, input, textarea, select { font: inherit; color: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
a { color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 3px solid #3b82f6; outline-offset: 3px; }
[hidden] { display: none !important; }
img { max-width: 100%; }
h1, h2, h3 { letter-spacing: -.02em; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.eyebrow { font-size: 12px; font-weight: 700; color: var(--muted); }
.ui-icon { display: inline-block; flex: 0 0 18px; width: 18px; height: 18px; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.loading, .empty-state { padding: 48px 16px; text-align: center; color: var(--muted); font-size: 15px; }
.empty-state h2 { color: var(--ink); font-size: 20px; margin: 0 0 8px; }

/* Botões e campos */
.primary-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 52px; padding: 12px 18px;
  border: 0; border-radius: var(--radius-sm);
  background: var(--accent); color: #fff;
  font-size: 16px; font-weight: 800; text-decoration: none; text-align: center;
  transition: background .15s, transform .1s;
}
.primary-button:hover:not(:disabled) { background: var(--accent-hover); }
.primary-button:active:not(:disabled) { transform: scale(.99); }
.primary-button:disabled { background: #b8c4bf; color: #fff; }
.primary-button.dark { background: var(--ink); }
.primary-button.dark:hover:not(:disabled) { background: var(--ink-2); }
.secondary-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; padding: 10px 16px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink);
  font-size: 15px; font-weight: 600; text-decoration: none;
}
.secondary-button:hover:not(:disabled) { border-color: var(--ink); }
.secondary-button:disabled { opacity: .5; }
.text-link-button { min-height: 44px; border: 0; background: none; padding: 8px 4px; color: var(--muted); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.icon-button { display: grid; place-items: center; min-width: 44px; min-height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); font-size: 24px; line-height: 1; }
.icon-button:hover { background: var(--paper); }
.icon-button svg { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink); }
.field input, .field textarea, .field select {
  width: 100%; min-height: 52px; padding: 12px 14px;
  border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink);
  font-size: 16px; font-weight: 500;
}
.field textarea { min-height: 88px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px rgba(16, 35, 63, .12); }
.remember-choice, .checkbox-field { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; color: var(--muted); cursor: pointer; }
.remember-choice input, .checkbox-field input { flex: 0 0 22px; width: 22px; height: 22px; margin: 0; accent-color: var(--accent); }
.form-hint { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }

/* Topo, rodapé, avisos */
.mode-banner { padding: 8px 16px; background: var(--gold-soft); color: var(--gold-ink); font-size: 13px; font-weight: 700; text-align: center; }
.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 20px; font-weight: 900; line-height: 1; }
.brand-name { font-size: 18px; font-weight: 800; letter-spacing: -.03em; }
.header-link { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 12px; font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.header-link[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.menu-toggle { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); }
.menu-toggle:hover { background: var(--paper); }
.menu-toggle svg { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.global-message { max-width: 1120px; margin: 12px 16px 0; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--danger-soft); color: #7a271a; font-size: 14px; white-space: pre-line; }
.global-message.success { background: var(--accent-soft); color: var(--accent-ink); }
main { max-width: 1120px; margin: 0 auto; padding: 0 16px 48px; }
.site-footer { display: flex; justify-content: center; gap: 8px; padding: 20px 16px 28px; font-size: 13px; color: var(--muted); }
.site-footer a { text-decoration: none; }
body.has-buy-bar .site-footer { padding-bottom: 150px; }

/* Menu lateral */
dialog { border: 0; border-radius: var(--radius); padding: 20px; width: min(92vw, 460px); max-height: 90dvh; overflow: auto; color: var(--ink); background: var(--surface); box-shadow: 0 24px 80px rgba(16, 35, 63, .3); }
dialog::backdrop { background: rgba(16, 35, 63, .45); }
#navigation-dialog { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(86vw, 340px); height: 100dvh; max-height: 100dvh; border-radius: 24px 0 0 24px; padding: 16px; }
.menu-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.menu-heading h2 { margin: 0; font-size: 18px; }
.menu-links { display: grid; gap: 4px; }
.menu-links .nav-link, .menu-links .text-button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 12px; border: 0; border-radius: 12px; background: transparent; font-size: 16px; font-weight: 600; text-decoration: none; text-align: left; color: var(--ink); }
.menu-links .nav-link:hover, .menu-links .text-button:hover { background: var(--paper); }
.menu-links .nav-link[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); }
.menu-links .nav-link-quiet { margin-top: 12px; border-top: 1px solid var(--line); border-radius: 0; color: var(--muted); font-size: 14px; }
.notification-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
#navigation-dialog #resume-order:not([hidden]) { display: flex !important; }

/* Vitrine */
.raffle-hero { padding: 22px 0 6px; }
.raffle-hero h1 { margin: 0 0 6px; font-size: 28px; line-height: 1.1; font-weight: 800; }
.raffle-hero p { margin: 0; color: var(--muted); font-size: 15px; }
.catalog-section { margin-top: 12px; }
.catalog-filters { display: flex; gap: 8px; margin: 0 0 14px; overflow-x: auto; }
.catalog-filters button { flex: none; min-height: 44px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 700; }
.catalog-filters button.active, .catalog-filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.raffle-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.raffle-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.raffle-card.selected { box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.raffle-card.completed { box-shadow: none; border: 1px dashed var(--line-strong); }
.raffle-card-cover { position: relative; }
.raffle-card-media { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.raffle-cover-placeholder { display: grid; place-items: center; background: #dce9e2; color: #31584a; font-size: 18px; font-weight: 800; }
.raffle-badge { position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: var(--surface); font-size: 12px; font-weight: 800; }
.raffle-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.raffle-badge.done::before { background: var(--sold-ink); }
.raffle-card-body { display: flex; flex-direction: column; gap: 10px; padding: 16px; }
.raffle-card-body h3 { margin: 0; font-size: 20px; line-height: 1.2; font-weight: 800; overflow-wrap: anywhere; }
.stock-dates { margin: -4px 0 0; font-size: 13px; color: var(--muted); }
.raffle-progress-labels { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.raffle-progress-labels span { color: var(--muted); }
.raffle-progress { appearance: none; -webkit-appearance: none; display: block; width: 100%; height: 8px; border: 0; border-radius: 999px; overflow: hidden; background: #ece8e0; }
.raffle-progress::-webkit-progress-bar { background: #ece8e0; border-radius: 999px; }
.raffle-progress::-webkit-progress-value { background: var(--accent); border-radius: 999px; }
.raffle-progress::-moz-progress-bar { background: var(--accent); border-radius: 999px; }
.raffle-urgency { margin: 0; font-size: 14px; font-weight: 800; color: #9a5b00; }
.raffle-card-footer { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.raffle-card-price { display: flex; flex-direction: column; }
.raffle-card-price small { font-size: 12px; color: var(--muted); }
.raffle-card-price strong { font-size: 22px; font-weight: 800; white-space: nowrap; }
.raffle-card-action { flex: 1; }
.raffle-card.completed .raffle-card-action { background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); }
.stock-empty { grid-column: 1 / -1; margin: 0; padding: 32px 16px; border: 1px dashed var(--line-strong); border-radius: var(--radius); text-align: center; color: var(--muted); }

/* Página da rifa */
.raffle-section { margin-top: 24px; scroll-margin-top: 72px; }
.direct-stock-intro { margin: 0 -16px; }
.direct-stock-cover { display: block; width: 100%; aspect-ratio: 16 / 9; max-height: 320px; object-fit: cover; }
.direct-stock-intro ~ .raffle-section { margin-top: -28px; }
.raffle-panel { position: relative; padding: 16px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.raffle-head { display: flex; flex-direction: column; gap: 8px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.raffle-code { margin: 0; font-size: 13px; font-weight: 700; color: var(--muted); }
.raffle-title { margin: 0; font-size: 24px; line-height: 1.15; font-weight: 800; overflow-wrap: anywhere; }
.raffle-description { margin: 0; color: var(--muted); font-size: 15px; white-space: pre-line; overflow-wrap: anywhere; }
.raffle-price-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 4px; }
.raffle-price { display: flex; flex-direction: column; }
.raffle-price small { font-size: 12px; color: var(--muted); }
.raffle-price strong { font-size: 26px; font-weight: 800; line-height: 1.1; }
.raffle-left { font-size: 14px; font-weight: 700; text-align: right; }
.pick-heading { margin: 16px 0 10px; font-size: 19px; font-weight: 800; }
.stock-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
.stock-legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-swatch { width: 14px; height: 14px; border-radius: 4px; background: var(--surface); border: 1.5px solid var(--line-strong); }
.legend-swatch.selected { background: var(--accent); border-color: var(--accent); }
.legend-swatch.reserved { background: var(--reserved-bg); border: 1.5px dashed var(--reserved-line); }
.legend-swatch.sold { background: var(--sold-bg); border-color: var(--sold-bg); }
.number-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.number-button {
  min-width: 0; min-height: 48px; padding: 0;
  border: 1.5px solid var(--line-strong); border-radius: 12px;
  background: var(--surface); color: var(--ink);
  font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums;
  transition: background .12s, border-color .12s, transform .12s;
  scroll-margin-block: 80px 160px;
}
.number-button:hover:not(:disabled) { border-color: var(--ink); }
.number-button:active:not(:disabled) { transform: scale(.94); }
.number-button.selected { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 4px 12px rgba(8, 122, 84, .3); }
.number-button.reserved { background: var(--reserved-bg); border: 1.5px dashed var(--reserved-line); color: var(--reserved-ink); }
.number-button.sold { background: var(--sold-bg); border-color: var(--sold-bg); color: var(--sold-ink); }
.number-button:disabled { cursor: default; }
.number-button.has-photo, .number-button.has-title { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 4px 4px 6px; overflow: hidden; }
.number-button.has-photo { min-height: 96px; }
.number-button.has-title:not(.has-photo) { min-height: 64px; }
.item-thumbnail { display: block; width: 100%; aspect-ratio: 1; height: auto; object-fit: cover; border-radius: 8px; background: var(--paper); }
.number-button.reserved .item-thumbnail, .number-button.sold .item-thumbnail { opacity: .6; }
.item-number { font-size: 15px; line-height: 1.2; }
.item-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; max-width: 100%; font-size: 11px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.bulk-purchase-button { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; margin-top: 14px; padding: 10px 14px; border: 1.5px dashed #b9b1a2; border-radius: var(--radius-sm); background: transparent; color: var(--ink); font-size: 15px; font-weight: 700; }
.bulk-purchase-button:hover:not(:disabled) { border-color: var(--ink); }
.bulk-purchase-button:disabled { opacity: .5; }
.stock-counts { margin: 0; }
.stock-counts:empty { display: none; }

/* Dados do comprador */
.checkout-card { margin-top: 16px; padding: 16px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); scroll-margin-top: 72px; }
.checkout-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.checkout-top h2 { margin: 0; font-size: 22px; font-weight: 800; }
.checkout-count { display: grid; place-items: center; min-width: 32px; height: 32px; padding: 0 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 800; }
.bulk-badge { margin: 0 0 10px; padding: 8px 12px; border-radius: 12px; background: var(--gold-soft); color: var(--gold-ink); font-size: 14px; font-weight: 700; }
#selected-numbers { max-height: 220px; overflow-y: auto; overscroll-behavior: contain; }
.selection-empty { margin: 0 0 12px; color: var(--muted); font-size: 15px; }
.selected-numbers { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.selected-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 10px 0 12px; border: 0; border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); font-size: 16px; font-weight: 800; }
.selected-chip span:last-child { font-size: 18px; line-height: 1; opacity: .7; }
.selected-item-photo { width: 26px; height: 26px; object-fit: cover; border-radius: 6px; }
.selected-item-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 600; }
.selected-product-note { margin: 0 0 10px; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.selected-product-note strong { display: block; color: var(--ink); }
.summary-line { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 6px; font-size: 14px; color: var(--muted); }
.summary-total { margin: 10px 0 16px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--ink); font-size: 15px; font-weight: 700; }
.summary-total strong { font-size: 24px; font-weight: 800; }
.customer-form { display: grid; gap: 12px; }
.customer-form > * { min-width: 0; }
.customer-memory-note { margin: -6px 0 0; font-size: 14px; color: var(--accent-ink); }
.customer-memory-note:empty { display: none; }
.forget-customer { justify-self: start; min-height: 40px; border: 0; background: none; padding: 0; color: var(--muted); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.summary-unavailable { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--gold-soft); color: var(--gold-ink); font-size: 14px; }
.checkout-hint { display: flex; align-items: flex-start; gap: 8px; margin: 0; font-size: 13px; color: var(--muted); }
.checkout-hint .ui-icon { color: var(--accent); margin-top: 1px; flex-basis: 16px; width: 16px; height: 16px; }

/* Barra fixa de compra (celular) */
.buy-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; flex-direction: column; gap: 8px;
  padding: 10px 12px max(12px, env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--line);
  box-shadow: 0 -10px 30px rgba(16, 35, 63, .12);
}
.buy-bar-chips { display: flex; gap: 6px; overflow: hidden; }
.buy-bar-chips:empty { display: none; }
.bar-chip { flex: none; display: grid; place-items: center; min-width: 40px; height: 32px; padding: 0 8px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 800; font-size: 15px; }
.bar-chip.more { background: var(--paper); color: var(--muted); }
.buy-bar-button { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 58px; padding: 6px 18px; border: 0; border-radius: 16px; background: var(--accent); color: #fff; text-align: left; }
.buy-bar-button:hover { background: var(--accent-hover); }
.buy-bar-text { display: flex; flex-direction: column; }
.buy-bar-text strong { font-size: 17px; font-weight: 800; }
.buy-bar-text small { font-size: 12px; opacity: .9; }
.buy-bar-total { font-size: 20px; font-weight: 800; white-space: nowrap; }

/* Pagamento */
#payment-dialog { padding: 16px 18px 20px; }
.payment-top { display: flex; align-items: center; justify-content: space-between; }
.pay-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; }
.pay-amount { display: flex; flex-direction: column; }
.pay-amount small { font-size: 13px; color: var(--muted); }
.pay-amount strong { font-size: 32px; font-weight: 800; line-height: 1.05; }
.pay-timer { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 88px; padding: 8px 12px; border-radius: 16px; background: var(--accent-soft); color: var(--accent-ink); }
.pay-timer small { font-size: 11px; }
.pay-timer.ending { background: #ffedd5; color: #9a3412; }
.countdown { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.payment-heading { margin: 16px 0 8px; font-size: 22px; line-height: 1.2; font-weight: 800; }
.payment-copy { margin: 0 0 12px; color: var(--muted); font-size: 15px; }
.pay-picked { margin-bottom: 14px; }
.payment-numbers { display: flex; flex-wrap: wrap; gap: 6px; max-height: 180px; overflow-y: auto; overscroll-behavior: contain; }
.payment-number { display: grid; place-items: center; min-width: 44px; height: 38px; padding: 0 10px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 17px; font-weight: 800; }
.pay-copy { min-height: 58px; font-size: 17px; }
.payment-code { margin: 8px 0 12px; padding: 10px 12px; max-height: 64px; overflow: auto; border-radius: 12px; background: var(--paper); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.pay-steps { display: grid; gap: 8px; margin: 0 0 12px; padding: 0; list-style: none; counter-reset: step; font-size: 15px; }
.pay-steps li { display: flex; align-items: center; gap: 10px; counter-increment: step; }
.pay-steps li::before { content: counter(step); display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 13px; font-weight: 700; }
.pay-qr { margin: 0 0 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 14px; }
.pay-qr summary { display: flex; align-items: center; min-height: 50px; font-size: 14px; font-weight: 600; cursor: pointer; }
.qr-image { display: block; width: min(240px, 100%); height: auto; margin: 4px auto 14px; padding: 8px; background: #fff; }
.demo-payment { margin: 0 0 12px; padding: 14px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius-sm); text-align: center; }
.demo-payment strong { display: block; font-size: 15px; }
.demo-payment p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.status-mark { display: grid; place-items: center; width: 60px; height: 60px; margin: 12px 0 0; border-radius: 50%; background: var(--accent); color: #fff; font-size: 30px; font-weight: 800; }
.status-mark.warning { background: var(--gold-soft); color: var(--gold-ink); }
.status-mark.expired { background: var(--paper); color: var(--muted); }
.share-button { margin-bottom: 10px; background: var(--ink); }
.share-button:hover:not(:disabled) { background: var(--ink-2); }
#payment-dialog .secondary-button { width: 100%; }
.payment-order-id { margin: 14px 0 0; font-size: 12px; color: var(--muted); text-align: center; overflow-wrap: anywhere; }
.item-snapshot { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; max-height: 200px; overflow-y: auto; }
.item-snapshot > * { display: flex; align-items: center; gap: 6px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); font-size: 13px; overflow-wrap: anywhere; }
.item-snapshot img { flex: 0 0 32px; width: 32px; height: 32px; object-fit: cover; border-radius: 6px; }

/* Rifa fora do ar */
.direct-unavailable { max-width: 520px; margin: 40px auto; padding: 28px 20px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); text-align: center; color: var(--muted); }
.direct-unavailable h1 { margin: 0 0 8px; font-size: 24px; color: var(--ink); }
.direct-unavailable .primary-button { margin-top: 16px; }

/* Meus números */
.history-note { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.history-note:empty { display: none; }
.history-orders { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 14px; }
.history-order-card { min-width: 0; padding: 16px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.history-order-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.history-order-header h2 { margin: 0; font-size: 15px; color: var(--muted); font-weight: 700; }
.history-stock-info { margin: 6px 0 0; font-size: 18px; font-weight: 800; overflow-wrap: anywhere; }
.history-items { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; max-height: 320px; overflow-y: auto; }
.history-item { display: flex; align-items: center; gap: 10px; min-width: 0; }
.history-item:has(div), .history-item:has(img) { flex-basis: 100%; padding: 6px; border-radius: 12px; background: var(--paper); }
.history-item img { flex: 0 0 40px; width: 40px; height: 40px; object-fit: cover; border-radius: 8px; }
.history-number { display: grid; place-items: center; min-width: 44px; height: 38px; padding: 0 10px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); font-size: 17px; font-weight: 800; }
.history-item strong { display: block; font-size: 14px; }
.history-item p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.history-order-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.history-order-footer strong { font-size: 20px; font-weight: 800; }
.history-order-footer .primary-button { width: auto; min-height: 48px; font-size: 15px; }
.history-empty { padding: 32px 16px; border: 1px dashed var(--line-strong); border-radius: var(--radius); text-align: center; color: var(--muted); }
.history-empty h2 { margin: 0 0 6px; font-size: 20px; color: var(--ink); }
.history-empty p { margin: 0 0 16px; }
.history-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 16px; }
.reseller-label, .paused-label { display: inline-flex; padding: 4px 10px; border-radius: 999px; background: var(--gold-soft); color: var(--gold-ink); font-size: 12px; font-weight: 700; }

/* Situação de pedidos (comprador e vendedor) */
.status-label { flex: none; padding: 4px 10px; border-radius: 999px; background: #eef0f3; color: #3d4757; font-size: 12px; font-weight: 700; white-space: nowrap; }
.status-label.paid { background: var(--accent-soft); color: var(--accent-ink); }
.status-label.pending { background: var(--reserved-bg); color: var(--reserved-ink); }
.status-label.payment_review { background: var(--danger-soft); color: #7a271a; }

/* Painel do vendedor */
.admin-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 22px 0 14px; }
.admin-hero h1 { margin: 2px 0 4px; font-size: 26px; font-weight: 800; }
.admin-hero p { margin: 0; font-size: 14px; color: var(--muted); }
.admin-hero .secondary-button { flex: none; }
.admin-login { max-width: 420px; margin: 32px auto; padding: 20px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.admin-login h1 { margin: 2px 0 6px; font-size: 24px; font-weight: 800; }
.admin-login p { margin: 0; font-size: 14px; color: var(--muted); }
.admin-login form { display: grid; gap: 14px; margin-top: 18px; }
.admin-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.stat { padding: 12px; border-radius: var(--radius-sm); background: var(--ink); color: #fff; }
.stat strong { display: block; font-size: 22px; font-weight: 800; }
.stat span { font-size: 12px; color: #c9d2e0; }
.admin-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.admin-layout > * { min-width: 0; }
.admin-card { padding: 16px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.admin-card h2 { margin: 0 0 4px; font-size: 19px; font-weight: 800; }
.admin-card > p { margin: 0 0 14px; font-size: 14px; color: var(--muted); }
.admin-card form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.admin-card form > * { min-width: 0; }
.admin-lists { display: grid; gap: 4px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.admin-list-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.admin-list-meta { flex: 1 1 160px; min-width: 0; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.admin-list-meta strong { display: block; color: var(--ink); font-size: 15px; }
.stock-context { display: block; font-size: 12px; color: var(--muted); }
.admin-list-edit { min-height: 44px; padding: 8px 12px; font-size: 14px; }
.admin-share-row { display: flex; flex: 1 1 100%; flex-wrap: wrap; align-items: center; gap: 8px; }
.share-link-input { flex: 1 1 180px; min-width: 0; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--paper); font-size: 13px; }
.orders-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.orders-heading h2 { margin: 0; font-size: 20px; font-weight: 800; }
.order-card { margin-bottom: 12px; padding: 16px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.order-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.order-card h3 { margin: 0 0 2px; font-size: 16px; font-weight: 800; overflow-wrap: anywhere; }
.order-card .payment-numbers { margin: 12px 0; }
.order-card .payment-number { min-width: 40px; height: 34px; font-size: 15px; }
.order-details { margin-bottom: 10px; font-size: 13px; color: var(--muted); white-space: pre-line; overflow-wrap: anywhere; }
.order-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.order-card-bottom strong { font-size: 18px; font-weight: 800; }
.order-card-bottom select { min-height: 44px; max-width: 180px; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); font-size: 14px; }
.order-warning { margin: 10px 0 0; font-size: 13px; color: var(--danger); }
.admin-session-info { font-size: 13px; color: var(--muted); }
.mobile-only { display: initial; }

/* Editor de rifa e de cada número */
#list-editor-dialog { width: min(96vw, 920px); max-height: 92dvh; padding: 18px; }
.editor-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.editor-heading h2 { margin: 2px 0 0; font-size: 22px; font-weight: 800; overflow-wrap: anywhere; }
.editor-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.editor-section { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.editor-section h3 { margin: 0 0 12px; font-size: 17px; font-weight: 800; }
.editor-form, .editor-list-fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.editor-form > *, .editor-list-fields > * { min-width: 0; }
.editor-form input[type="file"], .editor-list-fields input[type="file"] { min-height: 48px; padding: 8px; font-size: 14px; }
.editor-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.editor-actions > button { min-height: 44px; }
.editor-actions > .primary-button { width: auto; }
.editor-number-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 12px 0 16px; }
.editor-number-button { min-width: 0; min-height: 44px; border: 1.5px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.editor-number-button:hover { border-color: var(--ink); }
.editor-number-button.selected, .editor-number-button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.editor-item-preview, .editor-cover-preview { display: block; width: 100%; max-height: 220px; object-fit: cover; border-radius: 12px; background: var(--paper); }
.editor-hint { margin: 0; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.editor-message { margin: 10px 0; padding: 10px 12px; border-radius: 12px; background: var(--danger-soft); color: #7a271a; font-size: 14px; white-space: pre-line; }
.editor-message.success { background: var(--accent-soft); color: var(--accent-ink); }

/* Telas médias */
@media (min-width: 360px) {
  .number-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (min-width: 600px) {
  main { padding: 0 24px 56px; }
  .site-header { padding: 12px 24px; }
  .raffle-hero h1 { font-size: 34px; }
  .number-grid { grid-template-columns: repeat(10, minmax(0, 1fr)); }
  .editor-number-grid { grid-template-columns: repeat(10, minmax(0, 1fr)); }
  .raffle-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .history-orders { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .direct-stock-intro { margin: 16px 0 0; }
  .direct-stock-cover { border-radius: var(--radius); }
  .direct-stock-intro ~ .raffle-section { margin-top: 16px; }
  .admin-card form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-card form .full-width { grid-column: 1 / -1; }
}

/* Celular: o pagamento sobe como uma folha a partir de baixo */
@media (max-width: 599px) {
  #payment-dialog { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 24px 24px 0 0; max-height: 94dvh; padding-bottom: max(20px, env(safe-area-inset-bottom)); }
  .header-link span { display: none; }
  .header-link { padding: 0 10px; }
}

/* Computador: grade e dados lado a lado, sem barra fixa */
@media (min-width: 960px) {
  .raffle-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .raffle-section { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
  .raffle-section > #inventory { grid-column: 1; }
  .raffle-section > .checkout-card { grid-column: 2; grid-row: 1 / span 3; position: sticky; top: 84px; margin-top: 0; }
  .buy-bar { display: none !important; }
  body.has-buy-bar .site-footer { padding-bottom: 28px; }
  .number-button { min-height: 52px; }
  .admin-layout { grid-template-columns: 340px minmax(0, 1fr); }
  .editor-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
