/* Design system: limpo, leve e executivo. Branco e cinza, fonte do sistema, uma única cor de destaque. */
:root {
  --accent: #3b5b8c;
  --accent-contrast: #ffffff;
  --accent-soft: color-mix(in srgb, var(--accent) 8%, #ffffff);

  --bg: #ffffff;
  --surface: #f7f8fa;
  --surface-2: #eef0f3;
  --border: #e4e7eb;
  --border-strong: #cbd2d9;
  --text: #1f2933;
  --text-muted: #52606d;
  --text-faint: #7b8794;
  --danger: #b42318;
  --danger-soft: #fef3f2;
  --success: #067647;
  --success-soft: #ecfdf3;

  --radius: 10px;
  --radius-sm: 6px;
  --space: 16px;
  --shadow: 0 1px 2px rgba(31, 41, 51, 0.04);
  --font:
    system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  font-weight: 600;
}
h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}
h2 {
  font-size: 1.25rem;
}
h3 {
  font-size: 1.05rem;
}
p {
  margin: 0 0 1em;
}
a {
  color: var(--accent);
  text-underline-offset: 2px;
}
small,
.muted {
  color: var(--text-muted);
}
small {
  font-weight: 400;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

/* Estrutura */
.container {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}
.narrow {
  max-width: 640px;
}
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space);
  min-height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}
.brand img {
  height: 28px;
  width: auto;
  display: block;
}
.lang {
  display: flex;
  gap: 8px;
  font-size: 0.875rem;
}
.lang a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}
.lang a[aria-current="true"] {
  color: var(--text);
  background: var(--surface-2);
}

.hero {
  padding: 56px 0 32px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.hero p.lead {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 60ch;
}
.bullets {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 12px;
}
.bullets li {
  padding-left: 28px;
  position: relative;
  color: var(--text);
}
.bullets li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.65em;
  width: 10px;
  height: 2px;
  background: var(--accent);
}
.section {
  padding: 40px 0 64px;
}
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}
.site-footer a {
  color: var(--text-muted);
}

/* Cartões e formulários */
label.inline {
  display: inline;
  font-weight: 400;
  margin: 0;
}
.todo {
  background: #fff4d6;
  padding: 2px 6px;
  border-radius: 4px;
}
.legal h2 {
  margin-top: 1.75em;
}
.legal ul {
  padding-left: 1.25em;
}
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
label {
  display: block;
  font-weight: 500;
  font-size: 0.9375rem;
  margin: 18px 0 6px;
}
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="search"],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
textarea {
  min-height: 96px;
  resize: vertical;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}
fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin: 18px 0 0;
  padding: 12px 16px;
}
legend {
  padding: 0 6px;
  font-size: 0.9375rem;
  font-weight: 500;
}
.row {
  display: flex;
  gap: 12px;
}
.row > * {
  flex: 1;
  min-width: 0;
}
.consent {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-top: 20px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.9375rem;
}
.consent input {
  margin-top: 4px;
}
.consent label {
  margin: 0;
  font-weight: 400;
  color: var(--text-muted);
}

/* Campos repetíveis (habilidades) e blocos de contato */
.multi .item {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.multi .item input {
  flex: 1;
  min-width: 0;
}
.multi .item button.remove {
  padding: 8px 14px;
  line-height: 1;
}
.multi > button.secondary {
  margin-top: 10px;
}
.fieldset-hint {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}
.contacts input {
  margin-bottom: 4px;
}

/* Atalho para o Telegram (botão + QR Code) acima do formulário */
.telegram-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.telegram-box h2 {
  margin: 0 0 6px;
  font-size: 1.125rem;
}
.telegram-box p {
  margin: 0 0 14px;
  color: var(--text-muted);
}
.telegram-qr {
  flex: none;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px;
}
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 0;
  color: var(--text-faint);
  font-size: 0.875rem;
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--border);
}
/* No celular o QR não serve (a pessoa já está no aparelho): fica só o botão */
@media (max-width: 640px) {
  .telegram-qr {
    display: none;
  }
}

/* Botões */
button,
.button {
  display: inline-block;
  padding: 10px 20px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-contrast);
  font: inherit;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.15s;
}
button:hover,
.button:hover {
  filter: brightness(0.94);
}
button:disabled {
  opacity: 0.6;
  cursor: wait;
}
button.secondary,
.button.secondary {
  background: var(--bg);
  color: var(--text);
  border-color: var(--border-strong);
}
button.danger {
  background: var(--danger);
  border-color: var(--danger);
}
button.link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--accent);
  text-decoration: underline;
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}

/* Mensagens */
.alert {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin: 16px 0 0;
  background: var(--surface);
}
.alert.error {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: #fecdca;
}
.alert.success {
  color: var(--success);
  background: var(--success-soft);
  border-color: #abefc6;
}

/* Campo-armadilha para robôs: invisível para pessoas */
.hp {
  position: absolute;
  left: -10000px;
  height: 0;
  overflow: hidden;
}

/* Tabelas e etiquetas (admin) */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
th,
td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
th {
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface);
}
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  background: var(--surface-2);
  color: var(--text-muted);
}
.badge.active {
  background: var(--success-soft);
  color: var(--success);
}
.badge.disabled {
  background: var(--danger-soft);
  color: var(--danger);
}
code,
.mono {
  font-family: var(--mono);
  font-size: 0.875em;
}

/* Shell do painel */
.admin-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}
.admin-nav {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
}
.admin-nav a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
}
.admin-nav a[aria-current="page"] {
  background: var(--surface-2);
  color: var(--text);
}
.admin-main {
  padding: 32px;
  max-width: 960px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.stat {
  font-size: 1.75rem;
  font-weight: 600;
}

@media (max-width: 720px) {
  .row,
  .grid-2 {
    flex-direction: column;
    grid-template-columns: 1fr;
  }
  .admin-shell {
    grid-template-columns: 1fr;
  }
  .admin-nav {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .hero {
    padding: 36px 0 24px;
  }
  .admin-main {
    padding: 20px;
  }
}

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