:root {
  --cor-primaria: #1d4ed8;
  --cor-primaria-escura: #1e3a8a;
  --cor-fundo: #f5f7fb;
  --cor-texto: #1f2937;
  --cor-muted: #6b7280;
  --cor-borda: #e5e7eb;
  --cor-sucesso: #16a34a;
  --cor-erro: #dc2626;
  --cor-pendente: #d97706;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--cor-fundo);
  color: var(--cor-texto);
}

.container { max-width: 960px; margin: 0 auto; padding: 24px 16px; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: white;
  border-bottom: 1px solid var(--cor-borda);
  padding: 12px 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.topbar-brand { font-weight: 700; }
.topbar-nav { display: flex; gap: 16px; flex-wrap: wrap; }
.topbar-nav a { color: var(--cor-texto); text-decoration: none; }
.topbar-nav a:hover { color: var(--cor-primaria); }
.topbar-user { display: flex; align-items: center; gap: 12px; }

.link-button {
  background: none; border: none; color: var(--cor-primaria); cursor: pointer; font: inherit; padding: 0;
}

.badge {
  background: var(--cor-erro); color: white; border-radius: 999px;
  padding: 0 6px; font-size: 12px; margin-left: 4px;
}

.card {
  background: white; border: 1px solid var(--cor-borda); border-radius: 10px;
  padding: 20px; margin-bottom: 16px;
}
.card-link { display: block; text-decoration: none; color: inherit; transition: box-shadow .15s; }
.card-link:hover { box-shadow: 0 2px 10px rgba(0,0,0,.06); }

.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }

label { display: block; margin-bottom: 12px; font-weight: 600; font-size: 14px; }
input, select, textarea {
  display: block; width: 100%; margin-top: 4px; padding: 8px 10px;
  border: 1px solid var(--cor-borda); border-radius: 6px; font: inherit;
}
button {
  background: var(--cor-primaria); color: white; border: none; border-radius: 6px;
  padding: 10px 18px; font: inherit; font-weight: 600; cursor: pointer;
}
button:hover { background: var(--cor-primaria-escura); }
button:disabled { opacity: .6; cursor: not-allowed; }

.inline-form { display: flex; gap: 8px; align-items: flex-end; }
.inline-form input { margin-top: 0; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; align-items: end; }
.grid-form button { grid-column: 1 / -1; justify-self: start; }

.muted { color: var(--cor-muted); font-size: 14px; }
.erro { color: var(--cor-erro); font-weight: 600; }
.sucesso { color: var(--cor-sucesso); font-weight: 600; }

.tabela { width: 100%; border-collapse: collapse; background: white; border-radius: 10px; overflow: hidden; }
.tabela th, .tabela td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--cor-borda); font-size: 14px; }
.tabela th { background: #f9fafb; }

.status { padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.status-pendente { background: #fef3c7; color: var(--cor-pendente); }
.status-confirmada { background: #dcfce7; color: var(--cor-sucesso); }
.status-cancelada { background: #fee2e2; color: var(--cor-erro); }

.notificacao.nao-lida { border-left: 4px solid var(--cor-primaria); }
.notificacao.lida { opacity: .75; }

.login-box { max-width: 380px; margin: 60px auto; text-align: center; }
.login-box .card { text-align: left; }

.admin-nav { display: flex; gap: 16px; margin-top: 8px; }
.admin-nav a { color: var(--cor-primaria); text-decoration: none; font-weight: 600; }
