* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: Arial, sans-serif; background: #f0f2f5; color: #333; display: flex; flex-direction: column; min-height: 100vh; }
.container { flex: 1; }

footer.rodape {
  background: #fff;
  border-top: 1px solid #e2e8f0;
  padding: 10px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  position: sticky;
  bottom: 0;
  z-index: 10;
}
footer.rodape .footer-text { font-size: 13px; color: #555; }
footer.rodape .footer-text strong { color: #1a3a5c; }
footer.rodape .footer-sub { font-size: 11px; color: #999; }

.navbar {
  background: #1a3a5c;
  color: white;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.navbar h1 { font-size: 18px; font-weight: 600; }
.navbar nav a {
  color: #cde;
  text-decoration: none;
  margin-left: 20px;
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.2s;
}
.navbar nav a:hover, .navbar nav a.active { background: rgba(255,255,255,0.15); color: white; }
.navbar .user-info { font-size: 13px; color: #adc; }

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

.card {
  background: white;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.page-header h2 { font-size: 20px; color: #1a3a5c; }

.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: opacity 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn:hover { opacity: 0.85; }
.btn-primary { background: #1a3a5c; color: white; }
.btn-success { background: #28a745; color: white; }
.btn-danger { background: #dc3545; color: white; }
.btn-warning { background: #ffc107; color: #333; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-secondary { background: #6c757d; color: white; }

.filters {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: flex-end;
}
.filters input, .filters select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
  min-width: 200px;
}
.filters label { font-size: 12px; color: #666; display: block; margin-bottom: 4px; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  background: #1a3a5c;
  color: white;
  padding: 8px 10px;
  text-align: left;
  font-weight: 500;
  white-space: nowrap;
  position: sticky;
  top: 0;
}
td { padding: 7px 10px; border-bottom: 1px solid #eee; vertical-align: middle; white-space: nowrap; font-size: 13px; }
td.col-nome { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
td.col-proc { white-space: normal; min-width: 90px; }
td.col-proc .obs-inline { display: block; font-size: 11px; color: #777; font-style: italic; margin-top: 3px; white-space: normal; word-break: break-word; line-height: 1.3; }
tr:hover td { background: #f8f9ff; }
.table-wrap { border-radius: 6px; border: 1px solid #e0e0e0; }
table { table-layout: fixed; width: 100%; }

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-ok { background: #d4edda; color: #155724; }
.badge-warn { background: #fff3cd; color: #856404; }
.badge-vencido { background: #f8d7da; color: #721c24; }
.badge-nao { background: #e2e3e5; color: #383d41; }
.badge-cadastrado { background: #cce5ff; color: #004085; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: #555; margin-bottom: 5px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 14px;
  transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: #1a3a5c;
  box-shadow: 0 0 0 2px rgba(26,58,92,0.1);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

.checkbox-group { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.checkbox-group input[type=checkbox] { width: auto; }

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: white;
  border-radius: 10px;
  padding: 28px;
  width: 90%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}
.modal h3 { font-size: 18px; color: #1a3a5c; margin-bottom: 20px; border-bottom: 2px solid #eee; padding-bottom: 10px; }
.modal-footer { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }

.section-title {
  font-size: 13px;
  font-weight: 700;
  color: #1a3a5c;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #e0e8f0;
  padding-bottom: 6px;
  margin: 20px 0 14px;
}

.alert {
  padding: 10px 16px;
  border-radius: 5px;
  font-size: 13px;
  margin-bottom: 16px;
}
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a3a5c 0%, #2d6a9f 100%);
}
.login-box {
  background: white;
  border-radius: 12px;
  padding: 40px;
  width: 360px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}
.login-box h2 { text-align: center; color: #1a3a5c; margin-bottom: 8px; font-size: 22px; }
.login-box p { text-align: center; color: #888; font-size: 13px; margin-bottom: 28px; }

.text-center { text-align: center; }
.text-muted { color: #888; font-size: 12px; }
.mt-8 { margin-top: 8px; }
.empty-state { padding: 40px; text-align: center; color: #999; }

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.stat-card {
  background: white;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  border-top: 3px solid #1a3a5c;
}
.stat-card.warn { border-top-color: #ffc107; }
.stat-card.danger { border-top-color: #dc3545; }
.stat-card.ok { border-top-color: #28a745; }
.stat-card .num { font-size: 28px; font-weight: 700; color: #1a3a5c; }
.stat-card.warn .num { color: #856404; }
.stat-card.danger .num { color: #721c24; }
.stat-card.ok .num { color: #155724; }
.stat-card .label { font-size: 12px; color: #666; margin-top: 4px; }
.stat-card { transition: transform 0.1s, box-shadow 0.1s; }
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.stat-card.stat-ativo { box-shadow: 0 0 0 3px currentColor; }
.stat-card.ok.stat-ativo { box-shadow: 0 0 0 3px #28a745; }
.stat-card.warn.stat-ativo { box-shadow: 0 0 0 3px #ffc107; }
.stat-card.danger.stat-ativo { box-shadow: 0 0 0 3px #dc3545; }

#toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 20px;
  border-radius: 6px;
  font-size: 14px;
  color: white;
  z-index: 9999;
  display: none;
  animation: fadeIn 0.3s;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
#toast.success { background: #28a745; }
#toast.error { background: #dc3545; }
