:root {
  --roxo: #523ec4;
  --roxo-escuro: #40309c;
  --verde: #8bc540;
  --verde-escuro: #5c8a1f;
}

* { box-sizing: border-box; }

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  margin: 0;
  background: #f4f5f7;
  color: #1a1a1a;
}

header {
  background: var(--roxo);
  color: white;
  padding: 0.6rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header .logo {
  height: 32px;
  display: block;
}

#nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex: 1;
  margin-left: 2rem;
}

.nav-links a {
  color: white;
  text-decoration: none;
  margin-right: 1.25rem;
  font-size: 0.95rem;
}

.nav-links a:hover { text-decoration: underline; }

.nav-user {
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

main {
  max-width: 1200px;
  margin: 1.5rem auto;
  padding: 0 1.5rem;
}

.card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
}

.pagina-grid {
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  gap: 1.5rem;
  align-items: start;
}

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

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0 1.25rem;
}

.form-grid .campo {
  display: flex;
  flex-direction: column;
}

.form-grid .campo.largo {
  grid-column: 1 / -1;
}

h2 { margin-top: 0; }

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 0.75rem;
  margin-bottom: 0.25rem;
}

input, select, button {
  font-size: 0.95rem;
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid #ccc;
}

input, select { width: 100%; }

input:focus, select:focus {
  outline: none;
  border-color: var(--roxo);
  box-shadow: 0 0 0 2px rgba(82, 62, 196, 0.15);
}

button {
  background: var(--roxo);
  color: white;
  border: none;
  cursor: pointer;
  margin-top: 1rem;
  padding: 0.6rem 1.2rem;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

button:hover { background: var(--roxo-escuro); }
button:active { transform: scale(0.98); }

button.secondary {
  background: transparent;
  color: var(--roxo);
  border: 1px solid var(--roxo);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
}

th, td {
  text-align: left;
  padding: 0.5rem;
  border-bottom: 1px solid #e0e0e0;
  font-size: 0.9rem;
}

th {
  color: #666;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

tbody tr:hover { background: #f8f8fc; }

tr.clickable { cursor: pointer; }
tr.clickable:hover { background: #f2f0fb; }

.erro {
  color: #b00020;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.sucesso {
  color: var(--verde-escuro);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.resultado {
  background: #f2effc;
  border: 1px solid #ddd6f5;
  border-radius: 6px;
  padding: 1rem;
  margin-top: 1rem;
}

.resultado .linha {
  display: flex;
  justify-content: space-between;
  padding: 0.25rem 0;
  font-size: 0.95rem;
}

.resultado .linha.destaque {
  font-weight: 700;
  color: var(--verde-escuro);
  border-top: 1px solid #ddd6f5;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
}

.tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.tabs button {
  background: none;
  color: var(--roxo);
  border: none;
  margin: 0;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

.tabs button.ativo {
  border-bottom-color: var(--roxo);
  font-weight: 700;
}

.link-voltar {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--roxo);
  text-decoration: none;
  font-size: 0.9rem;
}

.subtitulo {
  color: #666;
  font-size: 0.85rem;
  margin-top: -0.5rem;
}

.colunas {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.coluna {
  flex: 1;
  min-width: 280px;
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge-pendente {
  background: #fdf1d6;
  color: #926c00;
}

.badge-realizada {
  background: #e6f4d9;
  color: var(--verde-escuro);
}

.badge-nao-realizada {
  background: #fbe0e4;
  color: #b00020;
}

.acoes-inline {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  align-items: center;
}

.acoes-inline button {
  margin-top: 0;
  padding: 0.35rem 0.7rem;
  font-size: 0.85rem;
}

.acoes-inline input {
  width: auto;
  padding: 0.35rem;
  font-size: 0.85rem;
}

.checkbox-linha {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.75rem;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 400;
  font-size: 0.9rem;
  margin: 0;
}

.checkbox-item input {
  width: auto;
}

.tela-login {
  display: flex;
  min-height: 100vh;
}

.login-visual {
  flex: 1.2;
  background-image: url('../assets/login-bg.jpg');
  background-size: cover;
  background-position: center;
  position: relative;
}

.login-visual-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(82, 62, 196, 0.88), rgba(20, 15, 50, 0.55));
  display: flex;
  align-items: flex-end;
  padding: 3rem;
}

.login-slogan {
  color: white;
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1.3;
  max-width: 460px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.login-formulario {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f4f5f7;
  padding: 2rem;
}

@media (max-width: 860px) {
  .tela-login {
    display: block;
  }
  .login-visual {
    display: none;
  }
}
