:root {
  --ink: #15221f;
  --paper: #f5f6f3;
  --card: #ffffff;
  --petrol: #0e3a34;
  --petrol-2: #155247;
  --gold: #c9a227;
  --gold-soft: #f4ebd0;
  --red: #b3401e;
  --red-soft: #fbe9e2;
  --green: #2e6e4e;
  --green-soft: #e2f0e8;
  --line: #dde1db;
  --muted: #5e6b66;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--paper);
  color: var(--ink);
}

h1, h2 {
  font-family: "Archivo", "Inter", system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem;
}

/* --- cabeçalho institucional (Tela 1-3) --- */

.page-header {
  background: linear-gradient(120deg, var(--petrol) 0%, var(--petrol-2) 70%);
  color: #fff;
  padding: 1.5rem 1rem;
  margin-bottom: 1rem;
}

.page-header-inner {
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
}

.eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--gold-soft);
  text-transform: uppercase;
}

.page-header h1 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  color: #fff;
}

.page-header .subtitle {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
}

/* --- aviso de documentos obrigatórios --- */

.docs-notice {
  background: var(--gold-soft);
  border: 1px solid var(--gold);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.docs-notice h2 {
  margin: 0 0 0.6rem;
  font-size: 1rem;
  color: var(--petrol);
}

.docs-list {
  margin: 0;
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.docs-list li {
  font-size: 0.9rem;
}

.docs-list strong {
  display: block;
  color: var(--ink);
}

.docs-list span {
  color: var(--muted);
  font-size: 0.85rem;
}

.subtitle {
  margin-top: 0;
  color: var(--muted);
}

/* --- Tela 1: abas por dia + grade de horários --- */

.day-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  margin: 1rem 0;
}

.day-tab {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0.5rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  font-family: "Archivo", sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
}

.day-tab--active {
  background: var(--petrol);
  color: #fff;
  border-color: var(--petrol);
}

.slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 0.5rem;
}

.slots-grid form button {
  width: 100%;
  min-height: 44px;
  border: 1.5px solid var(--petrol);
  border-radius: 10px;
  background: var(--card);
  color: var(--petrol);
  font-family: "Archivo", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
}

.slots-grid form button:active {
  background: var(--petrol);
  color: #fff;
}

.empty,
.empty-global {
  color: var(--muted);
  text-align: center;
  padding: 2rem 0;
}

/* --- Tela 2: banners e formulário --- */

.hold-banner {
  position: sticky;
  top: 0;
  z-index: 10;
  margin-bottom: 1rem;
  padding: 0.75rem;
  border-radius: 10px;
  background: var(--green-soft);
  border: 1px solid var(--green);
  color: var(--petrol);
  font-family: "Archivo", sans-serif;
  font-weight: 700;
  text-align: center;
}

.hold-banner--warning {
  background: var(--gold-soft);
  border-color: var(--gold);
}

.banner {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.92rem;
}

.banner--error {
  background: var(--red-soft);
  border: 1px solid var(--red);
  color: var(--red);
}

.banner--warning {
  background: var(--gold-soft);
  border: 1px solid var(--gold);
  color: #5a4b12;
}

.privacy-notice {
  font-size: 0.85rem;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.75rem 1rem;
}

.selected-slot {
  font-family: "Archivo", sans-serif;
  font-weight: 700;
  color: var(--petrol);
}

#registration-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1rem;
}

#registration-form label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
}

/* CPF/nascimento/telefone e secretaria/andar lado a lado em tela de computador;
   colapsa pra 1 por linha em tablet/celular (RNF08, mobile-first). */
.form-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}

.form-row--2 {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

#registration-form input,
#registration-form select {
  min-height: 44px;
  padding: 0.55rem 0.7rem;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  font-size: 1rem;
  font-weight: normal;
  font-family: "Inter", sans-serif;
}

#registration-form input:focus,
#registration-form select:focus {
  outline: 2px solid var(--gold);
  border-color: var(--gold);
}

#registration-form button[type="submit"] {
  min-height: 46px;
  border: none;
  border-radius: 10px;
  background: var(--gold);
  color: #2a2107;
  font-family: "Archivo", sans-serif;
  font-size: 1rem;
  font-weight: 700;
}

.field-error {
  color: var(--red);
  font-size: 0.82rem;
  font-weight: normal;
  min-height: 1.1em;
  display: block;
}

.prompt-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.6rem;
  flex-wrap: wrap;
}

.prompt-actions button {
  min-height: 44px;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  border: 1.5px solid var(--petrol);
  background: var(--card);
  color: var(--petrol);
}

/* --- Tela 3: confirmação --- */

.confirmation-details {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1.25rem;
  background: var(--green-soft);
  border-radius: 12px;
  padding: 1.1rem;
}

.confirmation-details dt {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.85rem;
}

.confirmation-details dd {
  margin: 0;
  color: var(--ink);
}

.confirmation-code {
  font-family: monospace;
  font-size: 1.15rem;
  letter-spacing: 0.12em;
  color: var(--petrol);
  font-weight: 700;
}

.confirmation-note {
  color: var(--muted);
}

/* --- admin --- */

.admin-header {
  background: linear-gradient(120deg, var(--petrol) 0%, var(--petrol-2) 70%);
  color: #fff;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
}

.admin-header-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.admin-nav {
  display: flex;
  gap: 1.25rem;
}

.admin-nav a {
  color: var(--gold-soft);
  font-family: "Archivo", sans-serif;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.9rem;
}

.admin-logout {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
}

.admin-user {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-right: 0.5rem;
  padding-right: 1rem;
  border-right: 1px solid rgba(255, 255, 255, 0.25);
}

.admin-user svg,
.admin-icon-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.admin-logout form { margin: 0; }

.admin-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  min-height: 36px;
  height: 36px;
  padding: 0;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  background: transparent;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}

.admin-icon-btn:hover { background: rgba(255, 255, 255, 0.15); }

.admin-logout form button.admin-icon-btn { background: #c62828; border-color: #c62828; }
.admin-logout form button.admin-icon-btn:hover { background: #a91f1f; border-color: #a91f1f; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  margin-bottom: 1rem;
}

.filters label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--muted);
  min-width: 0;
  flex: 1 1 160px;
}

.filters input,
.filters select {
  min-height: 42px;
  width: 100%;
  max-width: 100%;
  padding: 0.45rem 0.6rem;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-size: 1rem;
  font-weight: normal;
  color: var(--ink);
}

.filters button,
.button-link {
  min-height: 42px;
  padding: 0.45rem 1.1rem;
  border-radius: 10px;
  border: none;
  background: var(--gold);
  color: #2a2107;
  font-family: "Archivo", sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.admin-table th,
.admin-table td {
  padding: 0.55rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  font-size: 0.9rem;
}

.admin-table th {
  background: #eef0ec;
  font-family: "Archivo", sans-serif;
  color: var(--petrol);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.inline-form {
  display: flex;
  gap: 0.25rem;
}

.inline-form input[type="number"] {
  width: 70px;
  min-height: 36px;
  padding: 0.25rem 0.5rem;
  border: 1.5px solid var(--line);
  border-radius: 8px;
}

.inline-form button,
.admin-table button {
  min-height: 36px;
  padding: 0.3rem 0.7rem;
  border-radius: 8px;
  border: 1.5px solid var(--petrol);
  background: var(--card);
  color: var(--petrol);
  font-weight: 600;
  font-size: 0.85rem;
}

button.btn-attend {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

button.btn-attended {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green);
}

button.btn-cancel {
  border-color: var(--red);
  color: var(--red);
}

@media (max-width: 720px) {
  .admin-table-wrap {
    overflow-x: visible;
  }

  .admin-table thead {
    display: none;
  }

  .admin-table,
  .admin-table tbody {
    display: block;
    border: none;
    background: none;
  }

  .admin-table tr {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.75rem 0.9rem;
    margin-bottom: 0.75rem;
  }

  .admin-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    white-space: normal;
    border-bottom: none;
    padding: 0.35rem 0;
  }

  .admin-table td::before {
    content: attr(data-label);
    font-family: "Archivo", sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--muted);
  }

  /* Mesma ordem da tabela (Presença primeiro, pra confirmar sem rolar) */
  .admin-table td[data-label="Presença"] {
    order: 1;
    padding-bottom: 0.5rem;
    margin-bottom: 0.35rem;
    border-bottom: 1px solid var(--line);
  }

  .admin-table td[data-label="Data/Hora"] {
    order: 2;
  }

  .admin-table td[data-label="CPF"] {
    order: 3;
  }

  .admin-table td[data-label="Nome"] {
    order: 4;
    font-weight: 700;
  }

  .admin-table td[data-label="Status"] {
    order: 5;
  }

  .admin-table td[data-label="Secretaria"] {
    order: 6;
  }

  .admin-table td[data-label="Ações"] {
    order: 7;
  }

  .admin-table td .inline-form {
    width: 100%;
    justify-content: flex-end;
  }

  .admin-table td .inline-form form {
    width: 100%;
  }

  .admin-table td[data-label="Presença"] button {
    width: 100%;
    min-height: 44px;
    font-size: 0.95rem;
  }
}

.status-badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: #eee;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.status-badge--confirmed,
.status-badge--active {
  background: var(--green-soft);
  color: var(--green);
}

.status-badge--cancelled,
.status-badge--closed {
  background: #eee;
  color: var(--muted);
}

.status-badge--cpf_conflict {
  background: var(--red-soft);
  color: var(--red);
}

.pagination {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.pagination a {
  color: var(--petrol);
  font-weight: 600;
  text-decoration: none;
}

.new-slot {
  margin-bottom: 1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
}

.new-slot summary {
  cursor: pointer;
  font-family: "Archivo", sans-serif;
  font-weight: 700;
  color: var(--petrol);
}

.new-slot form {
  margin-top: 0.75rem;
}

/* --- login admin: overlay cheio, cartão centralizado (Tela 5) --- */

.login-wrap {
  position: fixed;
  inset: 0;
  background: linear-gradient(120deg, var(--petrol) 0%, var(--petrol-2) 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  z-index: 100;
}

.login-card {
  background: var(--card);
  border-radius: 14px;
  padding: 2rem 1.75rem;
  width: 360px;
  max-width: 100%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.login-card h1 {
  font-size: 1.15rem;
  color: var(--petrol);
  margin: 0 0 0.25rem;
}

.login-card .login-sub {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 1.25rem;
}

.login-card form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.login-card label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--muted);
}

.login-card input {
  min-height: 44px;
  padding: 0.55rem 0.7rem;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-size: 1rem;
  color: var(--ink);
}

.login-card input:focus {
  outline: 2px solid var(--gold);
  border-color: var(--gold);
}

.login-card button {
  min-height: 46px;
  border: none;
  border-radius: 10px;
  background: var(--gold);
  color: #2a2107;
  font-family: "Archivo", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 0.25rem;
}

.login-card .banner--error {
  margin: 0 0 1rem;
}

/* --- botões avulsos (fora de formulários já estilizados) --- */

.btn-primary {
  min-height: 46px;
  padding: 0.6rem 1.3rem;
  margin-top: 0.75rem;
  border: none;
  border-radius: 10px;
  background: var(--gold);
  color: #2a2107;
  font-family: "Archivo", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
}

.btn-secondary {
  min-height: 44px;
  padding: 0.5rem 1.1rem;
  margin-top: 0.75rem;
  border-radius: 10px;
  border: 1.5px solid var(--petrol);
  background: var(--card);
  color: var(--petrol);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
}

.attendance-stats {
  color: var(--muted);
  margin-top: -0.5rem;
}

.attendance-stats strong {
  color: var(--petrol);
}

/* --- Tela de indicadores --- */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.kpi-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--petrol);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.kpi-card--confirmed { border-left-color: var(--green); }
.kpi-card--cancelled { border-left-color: var(--muted); }
.kpi-card--conflict { border-left-color: var(--red); }

.kpi-value {
  font-family: "Archivo", sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--ink);
  line-height: 1.1;
}

.kpi-label {
  font-size: 0.8rem;
  color: var(--muted);
}

.indicators-section {
  margin-bottom: 2rem;
}

.indicators-section-title {
  margin: 0 0 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--gold);
  font-size: 1.1rem;
  color: var(--petrol);
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}

.legend-dot--confirmed { background: var(--green); }
.legend-dot--cancelled { background: var(--muted); }
.legend-dot--conflict { background: var(--red); }

.chart-section {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin-bottom: 1.25rem;
  overflow-x: auto;
}

.chart-section h3 {
  margin: 0 0 0.85rem;
  font-size: 0.92rem;
  color: var(--petrol);
}

.bar-chart {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(120px, 220px) 1fr auto;
  align-items: center;
  gap: 0.65rem;
}

.bar-label {
  font-size: 0.82rem;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-track {
  display: flex;
  height: 20px;
  background: var(--paper);
  border-radius: 4px;
  overflow: hidden;
}

.bar-segment {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.bar-segment--confirmed { background: var(--green); }
.bar-segment--cancelled { background: var(--muted); }
.bar-segment--conflict { background: var(--red); }

.bar-segment-value {
  font-size: 0.68rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.bar-total {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--petrol);
  min-width: 2ch;
  text-align: right;
}

@media (max-width: 640px) {
  .bar-row {
    grid-template-columns: 90px 1fr auto;
  }
}

.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 720px) {
  .heatmap-grid {
    grid-template-columns: 1fr;
  }
}

.heatmap-grid .chart-section {
  margin-bottom: 0;
}

.heatmap-wrap {
  overflow-x: auto;
}

.heatmap-table {
  border-collapse: collapse;
  font-size: 0.78rem;
}

.heatmap-table th,
.heatmap-table td {
  padding: 0.3rem 0.5rem;
  text-align: center;
  white-space: nowrap;
}

.heatmap-table thead th {
  color: var(--muted);
  font-weight: 700;
}

.heatmap-table tbody th {
  color: var(--muted);
  font-weight: 600;
  text-align: right;
  padding-right: 0.75rem;
}

.heatmap-cell {
  border-radius: 4px;
  min-width: 40px;
  color: var(--ink);
}

.heatmap-cell--empty {
  background: var(--paper);
  color: var(--line);
}

.heatmap-count--light {
  color: #fff;
}

.heatmap-total-row th,
.heatmap-total-row td {
  border-top: 2px solid var(--line);
  font-weight: 700;
}

.heatmap-total-cell {
  background: var(--paper);
  border-radius: 4px;
}

.heatmap-note {
  color: var(--muted);
  font-size: 0.78rem;
  margin: -0.25rem 0 0.75rem;
}

/* --- admin: edição da página e usuários --- */

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

.banner--ok {
  background: var(--green-soft);
  border: 1px solid var(--green);
  color: var(--green);
  border-radius: 10px;
  padding: 0.6rem 0.9rem;
}

.banner ul { margin: 0; padding-left: 1.1rem; }

.admin-form .full { flex: 1 1 100%; }

.doc-editor {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 1rem 1rem;
  background: var(--card);
}

.doc-editor legend {
  font-family: "Archivo", sans-serif;
  font-weight: 700;
  color: var(--petrol);
  padding: 0 0.4rem;
}

.doc-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.75rem; }

.doc-row input,
.doc-row textarea {
  flex: 1 1 100%;
  padding: 0.45rem 0.6rem;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font: inherit;
}

.doc-editor button {
  min-height: 36px;
  padding: 0.3rem 0.7rem;
  border-radius: 8px;
  border: 1.5px solid var(--petrol);
  background: var(--card);
  color: var(--petrol);
  font-weight: 600;
  cursor: pointer;
}

.button-link--ghost {
  background: transparent;
  border: 1.5px solid var(--petrol);
  color: var(--petrol);
  margin-left: 0.5rem;
}

.button-link--icon {
  min-height: 36px;
  padding: 0.3rem 0.7rem;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-left: 0;
}

.btn-icon {
  width: 1em;
  height: 1em;
  margin-right: 0.4em;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.inline-form button.btn-danger,
.admin-table button.btn-danger {
  display: inline-flex;
  align-items: center;
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}
.inline-form select,
.inline-form input[type="password"] {
  min-height: 36px;
  padding: 0.25rem 0.5rem;
  border: 1.5px solid var(--line);
  border-radius: 8px;
}

.admin-header-right { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }

.event-switch label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
}

.event-switch select {
  min-height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 0.2rem 0.5rem;
  max-width: 220px;
}

.weekdays { border: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.weekdays legend { font-weight: 600; font-size: 0.85rem; color: var(--muted); padding: 0; margin-bottom: 0.25rem; }
.weekdays label { flex: 0 0 auto; flex-direction: row; align-items: center; gap: 0.3rem; color: var(--ink); }
.weekdays input { width: auto; min-height: 0; }

/* lista de órgãos do evento (admin/evento_form.html) */
.inline-form input[type="text"] {
  flex: 1;
  min-width: 0;
  min-height: 36px;
  padding: 0.25rem 0.5rem;
  border: 1.5px solid var(--line);
  border-radius: 8px;
}

.org-editor { margin-top: 2rem; }
.org-editor textarea { width: 100%; }
.org-inactive td { color: var(--muted); }
.checkbox-label { display: flex; align-items: center; gap: 0.5rem; }
.checkbox-label input { width: auto; }

.org-table td[data-label="Nome"] { width: 100%; }
.org-table td[data-label="Registros"],
.org-table td[data-label="Situação"] { text-align: center; }
.org-actions { display: flex; flex-wrap: nowrap; gap: 0.4rem; justify-content: flex-end; }
.org-actions form { margin: 0; }
.org-table .inline-form button { white-space: nowrap; }

/* modal de confirmação (app.js) */
.confirm-dialog {
  border: 0;
  border-radius: 14px;
  padding: 1.25rem 1.4rem;
  max-width: min(440px, calc(100vw - 2rem));
  box-shadow: 0 18px 50px rgba(14, 58, 52, 0.28);
  color: var(--ink);
}
.confirm-dialog::backdrop { background: rgba(21, 34, 31, 0.5); }
.confirm-dialog-message { margin: 0 0 1.1rem; font-size: 1rem; line-height: 1.45; }
.confirm-dialog-actions { display: flex; gap: 0.5rem; justify-content: flex-end; flex-wrap: wrap; }
.confirm-dialog .confirm-dialog-actions button {
  box-sizing: border-box;
  min-width: 108px;
  height: 44px;
  min-height: 0;
  margin: 0;
  padding: 0 1.1rem;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}
.confirm-dialog-actions .btn-secondary { border: 1.5px solid var(--petrol); background: var(--card); color: var(--petrol); }
.confirm-dialog-actions .btn-danger { border: 1.5px solid var(--red); background: var(--red); color: #fff; }

/* seletor de órgãos (evento_form.html) */
.org-add { margin-top: 1.5rem; padding: 1rem 1.1rem; background: var(--card); border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 0.9rem; }
.org-add h3 { margin: 0; }
.org-add label { display: grid; gap: 0.3rem; font-weight: 600; }
.org-add input[type="search"], .org-add input[type="text"] { width: 100%; min-height: 40px; padding: 0.4rem 0.7rem; border: 1.5px solid var(--line); border-radius: 8px; font: inherit; }
.org-picker-bar { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; align-items: center; margin: 0.4rem 0; font-size: 0.9rem; }
.btn-link { background: none; border: 0; padding: 0; color: var(--petrol); text-decoration: underline; cursor: pointer; font: inherit; font-size: 0.9rem; }
.org-picker-list { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow-y: auto; border: 1.5px solid var(--line); border-radius: 8px; }
.org-picker-list li { border-bottom: 1px solid var(--line); }
.org-picker-list li:last-child { border-bottom: 0; }
.org-picker-list li[hidden] { display: none; }
.org-picker-list label { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.75rem; font-weight: 400; cursor: pointer; }
.org-picker-list label:hover { background: #eef0ec; }
.org-picker-list input { width: auto; flex: none; }
.org-add > button[type="submit"] { justify-self: start; }

/* botões de ação com ícone e cor por significado (lista de órgãos, modal) */
.org-table .inline-form button,
.confirm-dialog-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.admin-table button.btn-edit { border-color: var(--petrol); color: var(--petrol); }
.admin-table button.btn-warn { border-color: #b8891a; background: #fbf3dc; color: #7a5800; }
.admin-table button.btn-ok { border-color: var(--green); background: var(--green-soft); color: var(--green); }
.admin-table button.btn-outline-danger { border-color: var(--red); background: var(--red-soft); color: var(--red); }
.admin-table button.btn-edit:hover { background: #eef0ec; }
.admin-table button.btn-warn:hover { background: #f6e8bd; }
.admin-table button.btn-ok:hover { background: #cfe6d8; }
.admin-table button.btn-outline-danger:hover { background: #f6d6c9; }

.org-table input[readonly] { background: #f1f2ef; color: var(--muted); cursor: not-allowed; }

/* botão primário (dourado) fora de .filters, e opção de andar */
button.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.45rem 1.1rem;
  border: none;
  border-radius: 10px;
  background: var(--gold);
  color: #2a2107;
  font-family: "Archivo", sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}
button.btn-primary:hover { filter: brightness(0.95); }
.floor-option { margin-top: 1.25rem; padding: 0.9rem 1.1rem; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.floor-option p { margin: 0.35rem 0 0 1.9rem; font-size: 0.88rem; }
.checkbox-row { display: flex; flex-direction: row; align-items: center; gap: 0.6rem; font-weight: 600; cursor: pointer; }
.checkbox-row input { width: 1.15rem; height: 1.15rem; margin: 0; flex: none; accent-color: var(--petrol); }
