:root {
  --bg: #0f1115;
  --panel: #171a21;
  --panel-2: #1e222b;
  --line: #2a2f3a;
  --text: #e8eaf0;
  --muted: #99a1b3;
  --accent: #22c55e;
  --accent-2: #16a34a;
  --danger: #ef4444;
  --warn: #f59e0b;
  --radius: 12px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
a { color: var(--accent); }
.container { max-width: 960px; margin: 0 auto; padding: 24px 16px 64px; }
header.top {
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  padding: 14px 16px;
}
header.top .inner {
  max-width: 960px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { font-weight: 700; letter-spacing: .3px; text-decoration: none; color: var(--text); }
nav a { margin-left: 16px; font-size: 14px; text-decoration: none; color: var(--muted); }
nav a:hover { color: var(--text); }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
h1 { font-size: 26px; margin: 0 0 8px; }
h2 { font-size: 19px; margin: 0 0 12px; }
h3 { font-size: 15px; margin: 0 0 8px; }
.muted { color: var(--muted); font-size: 14px; }
.grid { display: grid; gap: 12px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.stat { background: var(--panel-2); border-radius: 10px; padding: 14px; }
.stat .value { font-size: 22px; font-weight: 700; }
.stat .label { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.prize { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.prize:last-child { border-bottom: 0; }
.badge {
  display: inline-block; min-width: 30px; text-align: center;
  background: var(--accent); color: #04210f; font-weight: 700;
  border-radius: 999px; padding: 2px 10px; font-size: 13px;
}
.badge.gray { background: var(--panel-2); color: var(--muted); }
.badge.warn { background: var(--warn); color: #3b2600; }
.badge.danger { background: var(--danger); color: #fff; }
label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 4px; }
input, select, textarea, button {
  font: inherit; color: var(--text);
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 8px; padding: 10px 12px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-2); }
button, .btn {
  background: var(--accent); color: #04210f; font-weight: 600;
  border: 0; cursor: pointer; width: auto; padding: 10px 18px;
  text-decoration: none; display: inline-block; border-radius: 8px;
}
button.secondary { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); }
button.danger { background: var(--danger); color: #fff; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.row > * { flex: 1 1 160px; }
.alert { border-radius: 8px; padding: 12px 14px; margin-bottom: 16px; font-size: 14px; }
.alert.error { background: #3a1717; border: 1px solid #6b2626; }
.alert.ok { background: #12331f; border: 1px solid #1f6b3a; }
.progress { height: 10px; background: var(--panel-2); border-radius: 999px; overflow: hidden; }
.progress > div { height: 100%; background: var(--accent); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.numbers { display: flex; flex-wrap: wrap; gap: 6px; }
.numbers span {
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 6px; padding: 5px 9px; font-family: ui-monospace, monospace; font-size: 13px;
}
.qr { text-align: center; }
.qr img { width: 240px; height: 240px; background: #fff; padding: 8px; border-radius: 10px; }
.pix-code {
  width: 100%; word-break: break-all; background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px; font-size: 12px;
  font-family: ui-monospace, monospace;
}
footer { color: var(--muted); font-size: 12px; text-align: center; padding: 24px 16px; }

/* Seletor de quantidade de cotas */
.qty-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
  padding: 16px;
  margin: 0 0 18px;
}
.qty-box legend { padding: 0 8px; font-size: 14px; color: var(--muted); }
.qty-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 8px;
}
.qty-option {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: 12px 8px;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  font-weight: 500;
}
.qty-option:hover { border-color: var(--accent-2); }
.qty-option.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #04210f;
}
.qty-option-n { font-size: 20px; font-weight: 700; line-height: 1.1; }
.qty-option-n::after { content: " cotas"; font-size: 11px; font-weight: 500; }
.qty-option-price { font-size: 12px; opacity: .75; }
.qty-manual { max-width: 220px; }
.qty-manual label { margin-top: 14px; }
.qty-total { margin: 14px 0 0; font-weight: 600; }

/* Fotos dos prêmios */
.prize-photo {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--panel-2);
  flex: 0 0 auto;
}
.prize-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--panel-2);
  display: block;
}
.prize-thumb.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--line);
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}
.prize-upload { display: flex; gap: 8px; align-items: center; margin: 8px 0 4px; }
.prize-upload input[type="file"] { font-size: 12px; padding: 6px; max-width: 250px; }
.prize-upload button { padding: 5px 12px; font-size: 12px; }
