/* Tema "Meia-noite" (azul e turquesa). O tema "Tradicional" (preto e dourado) é o padrão do index.html. */
html[data-tema="meia-noite"] {
  --bg: #0b1428;
  --surface: #111f3d;
  --border: #24395f;
  --ink: #e9f1ff;
  --ink-soft: #9fb3d4;
  --primary: #4fd1c5;
  --primary-soft: #123d44;
  --accent: #9be8df;
  --accent-soft: #16384a;
  --good: #7fd4a0;
  --good-soft: #163326;
  --bad: #f08a7c;
  --bad-soft: #3a1f28;
}
html[data-tema="meia-noite"] header.page {
  background:
    radial-gradient(640px 340px at 10% 0%, rgba(79,209,197,.22), transparent 62%),
    radial-gradient(440px 280px at 0% 60%, rgba(155,232,223,.12), transparent 65%),
    linear-gradient(160deg, #13264a 0%, #0e1a33 55%, #0a1226 100%);
}
html[data-tema="meia-noite"] header.page .hero-sweep { background: linear-gradient(115deg, rgba(79,209,197,.16) 0%, transparent 38%); }
html[data-tema="meia-noite"] #hexStroke2 stop { stop-color: #4fd1c5; }

/* Marca "Minerva 360°" no topo: nome em Cinzel, mais alto no quadro,
   e o emblema como marca d'água ocupando a altura do quadro. */
@font-face { font-family: 'Cinzel'; src: url('/fontes/cinzel-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
header.page .marca {
  font-family: 'Cinzel', var(--font-display); font-weight: 600; font-size: 19px; letter-spacing: .14em; line-height: 1.2;
  display: inline-block; margin: -16px 0 10px 60px; padding: 5px 14px 4px; border-radius: 999px;
  color: #f6c15a; background: rgba(16,10,4,.72); border: 1px solid rgba(232,171,62,.55); box-shadow: 0 2px 10px rgba(0,0,0,.35);
}
header.page .hero-marca {
  position: absolute; z-index: 0; top: 50%; left: 0; transform: translate(-50%, -50%); height: 118%; width: auto; aspect-ratio: 1 / 1;
  opacity: .30; mix-blend-mode: screen; pointer-events: none; user-select: none;
}
html[data-tema="meia-noite"] header.page .marca { color: #7fe3d8; background: rgba(6,14,30,.72); border-color: rgba(79,209,197,.55); }
@media (max-width: 640px) { header.page .hero-marca { opacity: .26; } header.page .marca { font-size: 16px; padding: 4px 12px 3px; margin-left: 54px; } }

/* Seletor de tema (aba Conexões) */
.temas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.temas button { display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 12px; border: 2px solid var(--border); background: transparent; color: var(--ink); font: inherit; cursor: pointer; }
.temas button img { width: 40px; height: 40px; border-radius: 10px; }
.temas button.ativo { border-color: var(--primary); }

/* Safari do iPad/iPhone: impede que os campos de data e hora fiquem
   largos demais e se sobreponham ao campo ao lado. */
input[type="date"], input[type="time"], input[type="datetime-local"], input[type="month"] {
  -webkit-appearance: none; appearance: none; display: block;
  width: 100%; min-width: 0; max-width: 100%; min-height: 40px; box-sizing: border-box;
}
input[type="date"]::-webkit-date-and-time-value,
input[type="time"]::-webkit-date-and-time-value { text-align: left; margin: 0; }
.row2 > *, .row3 > *, .row-fin-cliente > *, .grid > *, .grid3 > *, .task-split > *, .fin-board > * { min-width: 0; }
.modal-panel input, .modal-panel select, .modal-panel textarea { max-width: 100%; }
