/* VISUAL: cores, tipografia, componentes e regras para celular/impressão. */
/* Altere as cores principais nas variáveis de :root abaixo. */

:root {
  color-scheme:dark;
  --bg:#07162e;
  --panel:#0d2344;
  --line:#263e60;
  --muted:#9eafc8;
  --orange:#ff8a00;
}

* {
  box-sizing:border-box;
}

body {
  margin:0;
  background:var(--bg);
  color:#f5f7ff;
  font:15px/1.55 Arial,sans-serif;
}

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

.nav,main,footer {
  max-width:1220px;
  margin:auto;
}

.brand {
  display:inline-flex;
  align-items:center;
  gap:10px;
  font-size:26px;
  font-weight:800;
  letter-spacing:-1px;
  white-space:nowrap;
}

.brand strong {
  color:var(--orange);
}

.brand .brand-label {
  font-size:inherit;
}

.logo img {
  display:block;
  width:48px;
  height:auto;
  object-fit:contain;
}

footer .logo img {
  width:40px;
}

.web {
  margin-left:auto;
  font-size:10px;
  letter-spacing:1.5px;
  border:1px solid var(--line);
  padding:6px 10px;
  border-radius:5px;
  color:var(--muted);
}

main {
  padding:52px 26px 0;
}

.intro {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:30px;
}

.eyebrow {
  font-size:10px;
  font-weight:700;
  letter-spacing:1.8px;
  color:var(--muted);
  display:flex;
  align-items:center;
  gap:9px;
}

.eyebrow span {
  height:6px;
  width:6px;
  border-radius:50%;
  background:var(--orange);
}

h1 {
  font-size:46px;
  line-height:1.13;
  letter-spacing:-1.8px;
  margin:20px 0;
}

h1 em {
  font-style:normal;
  color:var(--orange);
}

.intro p {
  color:var(--muted);
  max-width:590px;
  font-size:14px;
}

.intro-note {
  display:flex;
  align-items:center;
  gap:20px;
  border-left:1px solid var(--line);
  padding:20px 0 20px 35px;
  font-size:13px;
}

.intro-note p {
  font-size:12px;
  margin:6px 0;
}

.calendar {
  width:64px;
  min-width:64px;
  text-align:center;
  border:1px solid #765325;
  border-radius:12px;
  font-size:28px;
  color:#ffb458;
  padding:4px;
  background:#342b25;
}

.calendar small {
  display:block;
  font-size:10px;
  border-top:1px solid #765325;
  letter-spacing:3px;
  padding-top:3px;
}

.steps {
  display:flex;
  gap:48px;
  margin:35px 0 24px;
  padding:17px 0;
  border-block:1px solid var(--line);
  font-size:12px;
  color:var(--muted);
}

.steps b {
  color:var(--orange);
  margin-right:9px;
  font-size:11px;
}

.workspace {
  display:grid;
  grid-template-columns:370px 1fr;
  gap:25px;
  align-items:start;
}

.panel {
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:14px;
  padding:25px;
}

.panel-title {
  display:flex;
  gap:13px;
  align-items:center;
  margin-bottom:24px;
}

h2 {
  margin:0;
  font-size:20px;
  letter-spacing:-.5px;
}

.panel-title p {
  margin:2px 0 0;
  color:var(--muted);
  font-size:12px;
}

.square {
  background:#3d3027;
  color:var(--orange);
  padding:5px 12px;
  border-radius:8px;
  font-size:22px;
}

label {
  display:block;
  font-size:12px;
  font-weight:600;
  margin:19px 0 8px;
}

label small {
  font-weight:400;
  color:var(--muted);
  margin-left:5px;
}

label span {
  float:right;
  color:var(--orange);
  font-size:10px;
}

input,textarea {
  width:100%;
  border:1px solid #31527f;
  background:#091b3a;
  color:#f5f7ff;
  border-radius:7px;
  padding:12px;
  font:13px Arial,sans-serif;
  line-height:1.5;
}

input::placeholder,textarea::placeholder {
  color:#8296b3;
}

input:focus,textarea:focus {
  outline:2px solid var(--orange);
  outline-offset:2px;
}

textarea {
  resize:vertical;
}

.presets {
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  margin-top:9px;
}

/* BOTÕES: padrão do site principal DNA DEV. */
button {
  font-family:Arial,Helvetica,sans-serif;
  font-size:13px;
  font-weight:bold;
  line-height:1.4;
  cursor:pointer;
  border:1px solid #31527F;
  border-radius:6px;
  color:#fff;
  background:transparent;
  padding:15px 28px;
  transition:background-color .3s,color .3s,border-color .3s,transform .3s,box-shadow .3s;
}

button:hover:not(:disabled) {
  border-color:#FF8A00;
  color:#FF8A00;
}

button:focus-visible,a:focus-visible {
  outline:2px solid var(--orange);
  outline-offset:3px;
}

button:disabled {
  opacity:.4;
  cursor:not-allowed;
}

.presets button {
  padding:5px 8px;
  font-size:10px;
  color:#fff;
  background:transparent;
}

.primary {
  background:#FF8A00;
  color:#fff;
  border:1px solid transparent;
  font-size:13px;
  font-weight:bold;
  padding:15px 28px;
}

.primary:hover:not(:disabled) {
  color:#fff;
  border-color:transparent;
  transform:translateY(-3px);
  box-shadow:0 10px 30px rgba(255,138,0,.30);
}

.setup .primary {
  width:100%;
  margin-top:18px;
  display:flex;
  justify-content:space-between;
}

.hint,.local {
  font-size:11px;
  color:var(--muted);
  line-height:1.5;
}

.local {
  text-align:center;
  margin:13px 0 0;
  font-size:10px;
}

.dedup {
  font-size:11px;
  color:#ffbc6e;
}

.board-head {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:15px;
  padding:5px 0 20px;
}

.board-head h2 {
  margin-top:7px;
}

#total {
  font-size:11px;
  background:#183151;
  padding:4px 8px;
  border-radius:5px;
  margin-left:5px;
  color:#bdcbe0;
}

.secondary {
  font-size:13px;
  color:#fff;
  background:transparent;
  border:1px solid #31527F;
}

.rule {
  font-size:11px;
  background:#10223a;
  border:1px solid var(--line);
  color:#a8bbd3;
  padding:13px 16px;
  border-radius:8px;
}

#empty {
  text-align:center;
  border:1px dashed #2b4264;
  border-radius:12px;
  margin-top:20px;
  padding:70px 15px 80px;
}

#empty p {
  font-size:13px;
  color:var(--muted);
}

#empty h3 {
  font-size:17px;
  margin-top:20px;
}

.empty-icon {
  margin:auto;
  width:62px;
  height:62px;
  background:#122b49;
  border-radius:18px;
  color:#7595bd;
  font-size:40px;
}

.example {
  font-size:10px;
  color:#96a9c4;
  background:#10233d;
  border-radius:30px;
  display:inline-block;
  padding:7px 14px;
  margin-top:13px;
}

.contest {
  border:1px solid var(--line);
  border-radius:12px;
  background:#0c203d;
  padding:21px;
  margin-top:18px;
}

.contest-top {
  display:flex;
  gap:10px;
  justify-content:space-between;
}

.contest h3 {
  margin:0;
  font-size:17px;
}

.meta {
  font-size:12px;
  color:var(--muted);
  margin-top:4px;
}

.badge {
  font-size:9px;
  letter-spacing:1px;
  color:#ffb45c;
}

.draw {
  margin-top:17px;
  width:100%;
}

.chips {
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:16px;
}

.chip {
  font-size:11px;
  border:1px solid var(--line);
  border-radius:5px;
  padding:4px 9px;
}

.remove {
  background:transparent;
  color:var(--muted);
  padding:0 6px;
  border:none;
  font-size:20px;
  align-self:start;
}

.ranking {
  padding-left:26px;
  font-size:13px;
}

.ranking li {
  padding:7px 5px;
  border-bottom:1px solid #213954;
  overflow-wrap:anywhere;
}

.ranking li:first-child {
  color:#ffb45c;
  font-weight:bold;
}

.record {
  font-size:10px;
  color:var(--muted);
}

.bottom-note {
  margin:38px 0;
  display:flex;
  justify-content:space-between;
  gap:20px;
  font-size:11px;
  color:var(--muted);
  padding-top:20px;
  border-top:1px solid var(--line);
}

.bottom-note b {
  color:#d1dcec;
}

footer {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:24px 26px;
  border-top:1px solid var(--line);
  color:var(--muted);
  font-size:11px;
}

footer .brand {
  font-size:20px;
}

dialog {
  background:#0d2344;
  color:#fff;
  border:1px solid #426087;
  border-radius:18px;
  padding:40px;
  max-width:480px;
  width:90%;
  text-align:center;
}

dialog::backdrop {
  background:#020a19cc;
  backdrop-filter:blur(5px);
}

dialog .eyebrow {
  justify-content:center;
}

.trophy {
  font-size:60px;
  color:var(--orange);
  margin:10px;
}

dialog h2 {
  font-size:28px;
}

dialog p {
  color:var(--muted);
  font-size:13px;
}

#winner {
  font-size:30px;
  font-weight:700;
  color:var(--orange);
  padding:15px;
  overflow-wrap:anywhere;
}

dialog .primary {
  width:100%;
  margin-top:15px;
}

.close:not(.primary) {
  position:absolute;
  right:13px;
  top:8px;
  background:none;
  border:0;
  font-size:25px;
}

#notice {
  font-size:12px;
  color:#ffb45c;
  padding-top:10px;
}

@media(max-width:900px) {
  .intro-note,.web {
    display:none;
  }

  .workspace {
    grid-template-columns:330px 1fr;
  }

  .steps {
    gap:25px;
  }

  .bottom-note {
    flex-direction:column;
    gap:5px;
  }

}

@media(max-width:700px) {
  main {
    padding:30px 18px 0;
  }

  h1 {
    font-size:36px;
  }

  .steps {
    gap:10px;
    font-size:10px;
    justify-content:space-between;
  }

  .steps b {
    display:block;
  }

  .workspace {
    grid-template-columns:1fr;
  }

  .board {
    margin-top:10px;
  }

  .panel {
    padding:22px;
  }

  #empty {
    padding:40px 12px;
  }

  footer span {
    display:none;
  }

  .bottom-note {
    margin-top:28px;
  }

}

@media print {
  body {
    background:white;
    color:black;
  }

  header,.intro,.steps,.setup,.rule,.remove,.draw,.bottom-note,footer,.secondary,#empty,#notice,dialog {
    display:none!important;
  }

  main {
    padding:0;
    max-width:none;
  }

  .workspace {
    display:block;
  }

  .contest {
    background:white;
    border:1px solid #aaa;
    break-inside:avoid;
  }

  .meta,.record,.badge,.eyebrow {
    color:#333;
  }

  .ranking li:first-child {
    color:black;
  }

  .board-head:before {
    content:'DNA DEV — Registro de sorteio';
    font-weight:bold;
  }

  .board-head {
    display:block;
  }

  .chips {
    color:black;
  }

  .ranking li {
    border-color:#ddd;
  }

}

html {
  scroll-behavior:smooth;
}

.confirm-actions {
  display:flex;
  gap:12px;
  align-items:center;
  margin-top:24px;
}

.confirm-actions button {
  flex:1;
}

.confirm-actions .primary {
  margin:0;
}

#confirm-action h2 {
  margin-top:18px;
}

@media(max-width:480px) {
  .confirm-actions {
    flex-direction:column;
  }

  .confirm-actions button {
    width:100%;
  }

}

/* Papel timbrado A4: usa assets/papel-timbrado-dna (imagem original). */
.print-letterhead {
  display:none;
}

@page {
  size:A4 portrait;
  margin:32mm 15mm 22mm;
}

@media print {
  html,body {
    background:transparent!important;
    -webkit-print-color-adjust:exact;
    print-color-adjust:exact;
  }

  .print-letterhead {
    display:block!important;
    position:fixed;
    top:-32mm;
    left:-15mm;
    width:210mm;
    height:297mm;
    z-index:0;
    pointer-events:none;
  }

  main {
    position:relative;
    z-index:1;
  }

  .board-head:before {
    content:none;
  }

  .contest {
    background:transparent!important;
  }

  .contest h3,.chips,.ranking {
    color:#111;
  }

  .confirm-actions,#confirm-action {
    display:none!important;
  }

}


/* AÇÕES DO PAINEL: impressão e nova disputa. */
.board-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 480px) {
  .board-head {
    flex-wrap: wrap;
  }
  .board-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

@media print {
  .board-actions {
    display: none !important;
  }
}

@media print { #pdf-status, #letterhead-file { display:none!important; } }
#pdf-status:not(:empty) { padding:12px 0; font-size:14px; }

/* BOTÃO DO GUIA: abre o PDF que está na mesma pasta do index.html. */
.guide-access { margin:0 0 24px; }
.guide-button { display:inline-flex; align-items:center; justify-content:center; padding:15px 28px; border:1px solid #31527F; border-radius:6px; background:transparent; color:#fff; font:700 13px/1.4 Arial,Helvetica,sans-serif; text-decoration:none; transition:color .3s,border-color .3s; }
.guide-button:hover { border-color:#FF8A00; color:#FF8A00; }
.guide-button:focus-visible { outline:2px solid var(--orange); outline-offset:3px; }
@media print { .guide-access { display:none!important; } }

@media (max-width:480px) {
  .board-actions > button { width:100%; }
  .guide-button { width:100%; }
}
@media (prefers-reduced-motion:reduce) {
  button,.guide-button { transition:none; }
  .primary:hover:not(:disabled) { transform:none; }
}

/* CABEÇALHO COMPARTILHADO COM A PÁGINA PRINCIPAL
   Estrutura idêntica ao index principal. O arquivo ../assets/dna-global.css,
   carregado depois deste CSS, aplica o padrão atualizado da marca.
   Base abaixo reproduz o style.css principal, com seletores só do cabeçalho. */
body { padding-top:85px; }
.header {
  position:fixed;
  top:0;
  left:0;
  width:100%;
  z-index:1000;
  background:rgba(2,11,31,.92);
  backdrop-filter:blur(12px);
  border-bottom:1px solid rgba(255,255,255,.08);
}
.nav-container {
  width:90%;
  max-width:1200px;
  height:85px;
  margin:auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.header .logo { display:inline-flex; align-items:center; gap:14px; color:#fff; text-decoration:none; }
.header .logo img { display:block; width:48px; height:48px; object-fit:contain; }
.header .brand-label { font:800 24px/1 Arial,Helvetica,sans-serif; letter-spacing:1px; white-space:nowrap; }
.header .brand-label strong { color:#FF8A00; }
.header nav { display:flex; gap:35px; }
.header nav a { color:white; text-decoration:none; font-family:Arial,Helvetica,sans-serif; font-size:14px; font-weight:700; transition:.3s; white-space:nowrap; }
.header nav a:hover { color:#FF8A00; }
@media (max-width:760px) {
  body { padding-top:120px; }
  .header .nav-container { height:120px; padding:12px 0; flex-wrap:wrap; justify-content:center; gap:12px; }
  .header nav { width:100%; justify-content:center; gap:clamp(10px,3vw,24px); }
  .header nav a { font-size:12px; }
}
@media print {
  body { padding-top:0!important; }
  .header { display:none!important; }
}
