* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.container {
  width: 100%;
  max-width: 900px;
  background: white;
  border-radius: 15px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  padding: 40px;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.header {
  text-align: center;
  margin-bottom: 30px;
}

.header .logo {
  max-width: 350px;
  height: auto;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.header .logo-small {
  max-width: 150px;
  height: auto;
  margin-bottom: 15px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.header h1 {
  color: #667eea;
  font-size: 2em;
  margin-bottom: 10px;
}

.header p {
  color: #666;
  font-size: 1em;
}

/* Formulários */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #333;
  font-weight: 600;
}

.form-group input,
.form-group select,
select.form-select {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
select.form-select:focus {
  outline: none;
  border-color: #667eea;
}

/* Botões */
.btn {
  padding: 12px 30px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  width: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-success {
  background: #28a745;
  color: white;
  width: 100%;
}

.btn-success:hover {
  background: #218838;
  transform: translateY(-2px);
}

.btn-disabled {
  background: #6c757d;
  color: white;
  width: 100%;
  cursor: not-allowed;
  opacity: 0.6;
}

.btn-disabled:hover {
  background: #6c757d;
  transform: none;
}

.btn-danger {
  background: #dc3545;
  color: white;
}

.btn-danger:hover {
  background: #c82333;
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background: #5a6268;
}

/* Busca */
.search-box {
  position: relative;
  margin-bottom: 30px;
}

.search-box input {
  width: 100%;
  padding: 15px 50px 15px 20px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 18px;
}

.search-box button {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: #667eea;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
}

/* Resultados */
.results-list {
  margin-top: 20px;
}

.result-item {
  background: #f8f9fa;
  padding: 15px;
  margin-bottom: 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  border-left: 4px solid #667eea;
}

.result-item:hover {
  background: #e9ecef;
  transform: translateX(5px);
}

.result-item-inabilitado {
  border-left-color: #dc3545 !important;
  opacity: 0.8;
  background: #fff3f3;
}

.result-item-inabilitado:hover {
  background: #ffe6e6;
}

.result-item h3 {
  color: #333;
  margin-bottom: 5px;
}

.result-item p {
  color: #666;
  font-size: 14px;
  margin: 3px 0;
}

/* Card da família */
.familia-card {
  background: #f8f9fa;
  padding: 25px;
  border-radius: 10px;
  margin-bottom: 20px;
}

.familia-card h2 {
  color: #667eea;
  margin-bottom: 15px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.membros-list {
  margin-top: 15px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 15px;
  background: #f9f9f9;
}

.membro-item {
  padding: 10px;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 10px;
}

.membro-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.membro-item strong {
  color: #667eea;
  font-size: 16px;
}

.membro-item small {
  color: #666;
  font-size: 13px;
}

.info-item {
  background: white;
  padding: 12px;
  border-radius: 6px;
}

.info-item label {
  display: block;
  font-size: 12px;
  color: #666;
  margin-bottom: 5px;
  text-transform: uppercase;
  font-weight: 600;
}

.info-item span {
  display: block;
  font-size: 16px;
  color: #333;
}

.info-item span.highlight {
  color: #667eea;
  font-weight: bold;
  font-size: 20px;
}

.info-card {
  background: #f8f9fa;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px;
  margin-top: 20px;
}

.info-card h3 {
  color: #667eea;
  margin-bottom: 15px;
  font-size: 18px;
}

/* Status badges */
.status-badge {
  display: inline-block;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-left: 10px;
}

.status-pendente {
  background: #ffc107;
  color: #000;
}

.status-concluido {
  background: #28a745;
  color: white;
}

.status-inabilitado {
  background: #dc3545;
  color: white;
}

/* Voucher input */
.voucher-input {
  background: white;
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  margin: 20px 0;
}

.voucher-input input {
  font-size: 32px;
  text-align: center;
  font-weight: bold;
  letter-spacing: 3px;
  padding: 20px;
}

/* Alertas */
.alert {
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-weight: 500;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.text-error {
  color: #dc3545 !important;
  font-weight: bold;
}

.alert-info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* Loading spinner */
.loading {
  text-align: center;
  padding: 40px;
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsividade */
@media (max-width: 768px) {
  .container {
    padding: 20px;
  }

  .header h1 {
    font-size: 1.5em;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .voucher-input input {
    font-size: 24px;
  }
}

/* Utilitários */
.text-center {
  text-align: center;
}

.mt-20 {
  margin-top: 20px;
}

.mb-20 {
  margin-bottom: 20px;
}

.hidden {
  display: none;
}

/* Relatórios */
.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
}

.stat-card h3 {
  font-size: 14px;
  margin-bottom: 10px;
  opacity: 0.9;
}

.stat-number {
  font-size: 36px;
  font-weight: bold;
  margin: 0;
}

.filter-container {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 30px;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.filter-grid label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  color: #333;
}

.filter-grid input,
.filter-grid select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
}

.section {
  margin-bottom: 30px;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  border-radius: 8px;
  overflow: hidden;
}

.report-table thead {
  background: #667eea;
  color: white;
}

.report-table th,
.report-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
}

.report-table th {
  font-weight: 600;
}

.report-table tbody tr:hover {
  background: #f5f5f5;
}

.table-actions {
  margin-bottom: 15px;
  display: flex;
  gap: 10px;
}


.flex-center {
  display: flex;
  justify-content: center;
  gap: 10px;
}

/* Logout */
.user-info {
  background: #f8f9fa;
  padding: 10px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.user-info span {
  color: #333;
  font-weight: 600;
}

.btn-logout {
  background: #dc3545;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
}

.btn-logout:hover {
  background: #c82333;
}
