/* Neusharp: única fonte do sistema (o arquivo disponível é o peso Bold; ele atende todos os pesos). */
@font-face {
  font-family: "Neusharp";
  src: url("/fonts/Neusharp-Bold.otf") format("opentype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Identidade Singular */
  --green: #009b3a;
  --green-dark: #0b7340;
  --green-mid: #00813c;
  --green-bright: #00a94f;
  --forest: #0b3d22;
  --ink: #050a07;
  --green-soft: #e6f4ea;
  --green-line: #c9e6d2;
  --text: #1f2a24;
  --muted: #5b6b62;
  --bg: #ffffff;
  --surface: #f6faf7;
  --warn-bg: #fff6dd;
  --warn-text: #7a5600;
  --danger: #c62828;
  --danger-bg: #fdecec;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(11, 115, 64, 0.08);
  --brand-gradient: linear-gradient(100deg, var(--ink) 0%, #07170e 55%, var(--forest) 100%);
  --font: "Neusharp", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body > main { flex: 1 0 auto; position: relative; z-index: 1; }

/* Marca d'água com o símbolo Singular */
body.watermark::before {
  content: "";
  position: fixed;
  right: -60px;
  bottom: -40px;
  width: 280px;
  height: 300px;
  background: url("/img/singular-simbolo.png") no-repeat center / contain;
  opacity: 0.06;
  pointer-events: none;
  z-index: 0;
}

a { color: var(--green-dark); }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; letter-spacing: 0; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }
button, input, select, textarea { font-family: var(--font); }

/* Cabeçalho com a marca */
.topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 70px;
  padding: 12px 16px;
  background: var(--brand-gradient);
  overflow: hidden;
}
.topbar::after {
  /* faixa diagonal verde, como nas peças da Singular */
  content: "";
  position: absolute;
  top: 0;
  right: 64px;
  width: 26px;
  height: 100%;
  background: linear-gradient(180deg, var(--green-bright), var(--green-dark));
  transform: skewX(-28deg);
  opacity: 0.85;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; position: relative; z-index: 1; }
.brand-symbol { height: 42px; width: auto; display: block; }
.brand-word { height: 20px; width: auto; display: block; }
.brand-tag {
  position: relative;
  z-index: 1;
  color: #fff;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  padding: 4px 12px;
  margin-right: 0;
  background: rgba(0, 0, 0, 0.35);
}

/* Rodapé com a marca */
.site-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 18px 16px;
  background: var(--brand-gradient);
  color: #fff;
  font-size: 0.9rem;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.site-footer img { height: 34px; width: auto; }
.site-footer .divider { width: 2px; align-self: stretch; background: var(--green); }

.container { width: 100%; max-width: 560px; margin: 0 auto; padding: 22px 16px 40px; }
.container-wide { max-width: 1760px; }
@media (min-width: 1100px) { .container-wide { padding-left: 32px; padding-right: 32px; } }

.center { text-align: center; }
.small { font-size: 0.86rem; }
.muted { color: var(--muted); }
.mt { margin-top: 1rem; }
.mb0 { margin-bottom: 0; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row > * { flex: 1 1 auto; }

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 12px 22px;
  border-radius: 12px;
  border: 2px solid transparent;
  font: inherit;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s, opacity 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-mid); }
.btn-dark { background: var(--forest); color: #fff; }
.btn-dark:hover { background: var(--ink); }
.btn-outline { background: #fff; color: var(--green-dark); border-color: var(--green); }
.btn-outline:hover { background: var(--green-soft); }
.btn-ghost { background: transparent; color: var(--green-dark); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger-outline { background: #fff; color: var(--danger); border-color: var(--danger); }
.btn-block { display: flex; width: 100%; }
.btn-sm { min-height: 40px; padding: 8px 14px; font-size: 0.88rem; border-radius: 10px; }
.btn-lg { min-height: 60px; font-size: 1.1rem; }

/* Formulários */
.field { margin-bottom: 16px; }
label { display: block; margin-bottom: 6px; }
input[type="text"], input[type="password"], input[type="number"], input[type="search"],
input[type="url"], input[type="datetime-local"], select, textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  font: inherit;
  color: var(--text);
  background: #fff;
  border: 2px solid var(--green-line);
  border-radius: 12px;
  outline: none;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(0, 155, 58, 0.15); }
.input-prefix { position: relative; }
.input-prefix span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input-prefix input { padding-left: 34px; }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.check input { width: 24px; height: 24px; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--green); }
.ig-chip { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 14px; border-radius: 12px; background: var(--green-soft); color: var(--green-dark); }
.ig-chip b { font-weight: inherit; }
.link-btn { background: none; border: 0; padding: 4px 0; font: inherit; font-size: 0.9rem; color: var(--green-dark); text-decoration: underline; cursor: pointer; }
.hint { font-size: 0.82rem; color: var(--muted); margin-top: 4px; }
.form-error { background: var(--danger-bg); color: var(--danger); padding: 12px 14px; border-radius: 10px; margin-bottom: 14px; }

/* Cards */
.card { position: relative; background: #fff; border: 1px solid var(--green-line); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; box-shadow: var(--shadow); }
.card-soft { background: var(--surface); box-shadow: none; }
.section-title { display: flex; align-items: center; gap: 10px; margin: 28px 0 12px; font-size: 1.15rem; color: var(--forest); }
.section-title::before { content: ""; flex: 0 0 auto; width: 22px; height: 24px; background: url("/img/singular-simbolo.png") no-repeat center / contain; }

.notice { padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; }
.notice-warn { background: var(--warn-bg); color: var(--warn-text); }
.notice-info { background: var(--green-soft); color: var(--green-dark); }

/* Início */
.hero { text-align: center; padding: 4px 0 4px; }
.hero-logo { width: min(62vw, 230px); height: auto; margin: 4px auto 14px; display: block; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem; color: var(--green); margin-bottom: 6px; }
.hl { color: var(--green); }
.lead { font-size: 1rem; color: var(--muted); }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 20px 0 24px; }
.steps li { counter-increment: s; position: relative; padding: 14px 14px 14px 62px; margin-bottom: 10px; background: var(--surface); border-radius: 12px; border-left: 4px solid var(--green); }
.steps li::before { content: counter(s); position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 50%; background: var(--forest); color: #fff; display: flex; align-items: center; justify-content: center; }

/* Saldo */
.balance-card { background: var(--brand-gradient); color: #fff; border: 0; text-align: center; overflow: hidden; }
.balance-card::after { content: ""; position: absolute; right: -18px; bottom: -14px; width: 120px; height: 130px; background: url("/img/singular-simbolo.png") no-repeat center / contain; opacity: 0.22; pointer-events: none; }
.balance-card > * { position: relative; z-index: 1; }
.balance-card .label { opacity: 0.9; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.85rem; }
.balance-value { font-size: 3.2rem; line-height: 1; margin: 8px 0; }
.balance-value small { font-size: 1rem; opacity: 0.9; }
.balance-card .btn { margin-top: 12px; background: var(--green); color: #fff; }
.balance-card .sub { font-size: 0.9rem; opacity: 0.95; margin: 8px 0 0; }

/* Gatilhos */
.trigger-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.trigger-head h3 { margin: 0; }
.coins-pill { flex: 0 0 auto; background: var(--green-soft); color: var(--green-dark); border-radius: 999px; padding: 4px 12px; font-size: 0.9rem; white-space: nowrap; }
.trigger p { margin: 8px 0 10px; color: var(--muted); }
.trigger-status { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.trigger-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.trigger-actions .btn { flex: 1 1 140px; }
.trigger.status-validado { border-color: var(--green); background: #f7fcf8; }
.reason { font-size: 0.88rem; color: var(--danger); width: 100%; }
.tag-lucky { font-size: 0.82rem; color: var(--green-dark); }

.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 0.78rem; white-space: nowrap; }
.badge-disponivel { background: #eef1ef; color: #44524a; }
.badge-pendente { background: var(--warn-bg); color: var(--warn-text); }
.badge-validado { background: var(--green); color: #fff; }
.badge-recusado { background: var(--danger-bg); color: var(--danger); }
.badge-a_retirar { background: var(--warn-bg); color: var(--warn-text); }
.badge-retirado { background: var(--green-soft); color: var(--green-dark); }

.lucky-box { display: flex; align-items: center; gap: 16px; }
.lucky-box img { height: 54px; width: auto; flex: 0 0 auto; }
.lucky { font-size: 1.9rem; letter-spacing: 0.12em; color: var(--forest); background: var(--green-soft); border: 2px dashed var(--green); padding: 6px 16px; border-radius: 12px; }

.prize-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.prize-item .code { font-size: 1.5rem; letter-spacing: 0.2em; color: var(--forest); }

/* Roleta */
.wheel-wrap { position: relative; width: min(88vw, 380px); margin: 18px auto 10px; }
.wheel-wrap canvas { display: block; width: 100%; height: auto; }
.wheel-pointer { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 18px solid transparent; border-right: 18px solid transparent; border-top: 34px solid var(--ink); filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.25)); z-index: 2; }
.wheel-info { text-align: center; margin-bottom: 14px; }
.wheel-info strong { font-size: 1.5rem; color: var(--green-dark); }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(5, 10, 7, 0.6); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.modal { position: relative; background: #fff; border-radius: 20px; padding: 26px 20px; width: 100%; max-width: 420px; text-align: center; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); animation: pop 0.35s ease-out; border-top: 6px solid var(--green); }
.modal-logo { height: 56px; width: auto; margin: 0 auto 10px; display: block; }
.modal h2 { color: var(--forest); }
.prize-name { font-size: 1.5rem; color: var(--green); margin: 4px 0; }
.pickup-code { font-size: 3rem; letter-spacing: 0.3em; padding: 10px 10px 10px calc(10px + 0.3em); background: var(--green-soft); border: 3px dashed var(--green); border-radius: 14px; margin: 14px 0; color: var(--forest); }
@keyframes pop { from { transform: scale(0.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 160%); max-width: calc(100vw - 32px); width: max-content; background: var(--ink); color: #fff; padding: 14px 18px; border-radius: 12px; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25); transition: transform 0.25s ease; z-index: 100; }
.toast.show { transform: translate(-50%, 0); }
.toast-error { background: var(--danger); }
.toast-success { background: var(--forest); }

/* Regulamento */
.prose h1 { font-size: 1.4rem; color: var(--forest); }
.prose h2 { font-size: 1.12rem; margin-top: 1.4em; color: var(--forest); }
.prose li { margin-bottom: 6px; }

.footer-links { text-align: center; margin-top: 28px; font-size: 0.9rem; display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; }

/* Admin */
.admin-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.admin-tabs button { min-height: 42px; padding: 8px 14px; border-radius: 10px; border: 2px solid var(--green-line); background: #fff; color: var(--green-dark); font: inherit; font-size: 0.9rem; cursor: pointer; }
.admin-tabs button.active { background: var(--forest); border-color: var(--forest); color: #fff; }
.admin-tabs .count { display: inline-block; min-width: 22px; padding: 0 6px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 0.78rem; margin-left: 4px; }
.admin-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 14px; }
.claim-card { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
.claim-card .meta { font-size: 0.86rem; color: var(--muted); }
.claim-card .actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px) {
  .claim-card { grid-template-columns: 1fr; }
  .claim-card .actions { justify-content: stretch; }
  .claim-card .actions .btn { flex: 1; }
}
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--green-line); border-radius: 12px; margin-bottom: 14px; background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid #e8efe9; vertical-align: middle; }
th { background: var(--forest); color: #fff; white-space: nowrap; font-weight: inherit; }
td.num, th.num { text-align: right; }
td.nowrap, td.nowrap .btn { white-space: nowrap; }
td.col-tags { min-width: 170px; }
.container-wide th, .container-wide td { padding: 8px 7px; }
td.actions .row { flex-direction: column; align-items: stretch; gap: 6px; }
td.actions .btn-sm { min-height: 34px; padding: 5px 12px; }
.tag { display: inline-block; margin: 2px 4px 2px 0; padding: 2px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--green-line); font-size: 0.8rem; white-space: nowrap; }
@media (min-width: 1100px) {
  #claimsList { display: grid; grid-template-columns: repeat(auto-fill, minmax(520px, 1fr)); gap: 12px; align-items: start; }
  #claimsList > .card { margin: 0; }
  #claimsList > .card-soft { grid-column: 1 / -1; }
}
tr:last-child td { border-bottom: 0; }
tr.selected td { background: #fff4f4; }
td input[type="checkbox"], th input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--danger); }
.stock-input { display: flex; gap: 6px; min-width: 330px; }
.stock-input input { min-height: 40px; padding: 6px 10px; border-radius: 10px; }
.stock-input input[type="number"] { width: 90px; flex: 0 0 90px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.stat { font-size: 2rem; color: var(--forest); }
dialog { border: 0; border-radius: 16px; padding: 22px; width: min(92vw, 460px); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); font-family: var(--font); color: var(--text); }
dialog::backdrop { background: rgba(5, 10, 7, 0.55); }
dialog menu { display: flex; gap: 10px; justify-content: flex-end; padding: 0; margin: 14px 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { border: 1px solid var(--green-line); background: var(--surface); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 0.82rem; cursor: pointer; }
.danger-zone { border-color: #f1c4c4; }

/* Telão do sorteio */
.screen { position: relative; min-height: 100vh; background: radial-gradient(circle at 50% 35%, var(--green-dark) 0%, var(--forest) 45%, var(--ink) 100%); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px 16px; overflow: hidden; }
.screen::before { content: ""; position: absolute; left: -8vw; bottom: -6vw; width: 42vw; height: 46vw; background: url("/img/singular-simbolo.png") no-repeat center / contain; opacity: 0.08; pointer-events: none; }
.screen::after { content: ""; position: absolute; top: 0; right: 9vw; width: 4vw; height: 100%; background: linear-gradient(180deg, var(--green-bright), transparent); transform: skewX(-28deg); opacity: 0.35; pointer-events: none; }
.screen > * { position: relative; z-index: 1; }
.screen-brand { display: flex; align-items: center; gap: 18px; margin-bottom: 28px; }
.screen-brand .sym { height: clamp(56px, 9vw, 110px); width: auto; }
.screen-brand .word { height: clamp(26px, 4vw, 52px); width: auto; }
.screen h1 { font-size: clamp(1.8rem, 5vw, 3.4rem); margin-bottom: 0.2em; }
.screen .sub { font-size: clamp(1rem, 2.4vw, 1.6rem); opacity: 0.92; }
.draw-count { font-size: clamp(3rem, 12vw, 8rem); line-height: 1; margin: 18px 0 6px; }
.draw-number { font-size: clamp(4rem, 17vw, 11rem); letter-spacing: 0.08em; line-height: 1; background: #fff; color: var(--forest); border-radius: 24px; padding: 0.12em 0.3em; margin: 18px 0; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35); border-bottom: 10px solid var(--green); }
.draw-number.rolling { opacity: 0.85; }
.winner-name { font-size: clamp(1.8rem, 6vw, 4.2rem); }
.winner-ig { font-size: clamp(1.2rem, 3.6vw, 2.4rem); opacity: 0.95; color: #7be3a4; }
.alternates { margin-top: 14px; display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.alternates .alt { background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 14px; padding: 12px 18px; font-size: clamp(1rem, 2.2vw, 1.4rem); }
.alternates .alt b { letter-spacing: 0.1em; font-weight: inherit; }
.screen-tagline { position: absolute; bottom: 18px; right: 24px; text-transform: uppercase; letter-spacing: 0.1em; font-size: clamp(0.8rem, 1.4vw, 1.1rem); opacity: 0.85; text-align: right; line-height: 1.2; }
.reveal { animation: reveal 0.8s ease-out both; }
@keyframes reveal { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }

@media (max-width: 380px) {
  .brand-word { display: none; }
}
@media (min-width: 720px) {
  h1 { font-size: 1.9rem; }
  .topbar { padding: 12px 28px; }
  .topbar::after { right: 120px; }
}
