:root {
  --bg: #f7f8fa;
  --text: #20242a;
  --muted: #5d6876;
  --line: #d8dde5;
  --brand: #116149;
  --brand-dark: #0b3f30;
  --surface: #ffffff;
  --danger: #b3261e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 32px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

header a {
  color: var(--brand-dark);
  font-weight: 700;
  text-decoration: none;
}

nav {
  display: flex;
  gap: 16px;
}

main {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 32px;
}

h1 {
  margin: 0 0 16px;
  font-size: 32px;
}

p {
  color: var(--muted);
}

a.button,
button {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--brand);
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}

form {
  display: grid;
  gap: 14px;
  max-width: 720px;
}

td form {
  display: flex;
  align-items: center;
  gap: 10px;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

textarea {
  resize: vertical;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 14px;
}

output {
  min-height: 24px;
  color: var(--danger);
}

.intro {
  padding: 48px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.logo {
  height: 32px;
  width: auto;
}

.about p {
  max-width: 68ch;
}

.actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.actions form {
  display: inline;
}

/* "complete o seu cadastro" prompt on the painel — a nudge, not an error */
.aviso {
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--brand-dark);
  background: rgba(0, 0, 0, 0.04);
  border-radius: 4px;
}

.action-link {
  display: inline;
  min-height: 0;
  padding: 0;
  border: none;
  background: none;
  color: var(--brand-dark);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

@media (max-width: 720px) {
  header,
  nav,
  td form {
    align-items: stretch;
    flex-direction: column;
  }

  main {
    padding: 24px 16px;
  }

  table {
    display: block;
    overflow-x: auto;
  }
}


/* --- Certificado (Fase G): página imprimível --- */
.certificado {
  border: 6px double #116149;
  border-radius: 8px;
  padding: 3rem 2.5rem;
  text-align: center;
  max-width: 52rem;
  margin: 2rem auto;
  background: #fff;
}
.certificado .logo { height: 64px; margin-bottom: 1rem; }

@media print {
  @page { size: A4 landscape; margin: 12mm; }
  body { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .no-print, header, nav, footer { display: none !important; }
  .certificado { margin: 0 auto; border-color: #116149; }
}

/* multiselect (Fase H): one option per line */
/* checkboxes/radios must not stretch to 100% and must sit inline with their
   label (the required toggle in the form builder, multiselect options, etc.) */
input[type="checkbox"],
input[type="radio"] {
  width: auto;
  margin: 0;
  flex: none;
}

.check-row,
label.form-group:has(> input[type="checkbox"]),
label.form-group:has(> input[type="radio"]) {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  font-weight: 400;
  margin: 0.25rem 0;
}

/* hour:minute selects side by side */
.time-control {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.time-control select { width: auto; }
