:root {
  --primary-color: #67e8bb;
  --primary-dark: #13714e;
  --text-color: #2d3748;
  --light-bg: #f8fafc;
  --border-color: #e2e8f0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #f8f9fa;
  font-family:
    "Segoe UI",
    system-ui,
    -apple-system,
    sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-dark)
  );
  color: white;
  padding: 20px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header h1 {
  margin: 0;
  font-weight: 600;
  font-size: 1.8rem;
}

.main-content {
  flex: 1;
  padding: 30px 0;
}

.container-custom {
  width: 100%;
  max-width: 1800px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.btn-primary-custom {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-dark)
  );
  color: white;
  border: none;
  border-radius: 10px;
  padding: 12px 24px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-primary-custom:hover,
.btn-secondary-custom:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(103, 232, 187, 0.3);
}

.btn-secondary-custom {
  background: white;
  color: #2d3748;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 24px;
  font-weight: 500;
  transition: all 0.3s ease;
  outline: none;
}

.btn-secondary-custom:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  color: #1a202c;
}

.btn-secondary-custom:focus {
  outline: 2px solid #94a3b8;
  outline-offset: 2px;
}

.btn-secondary-custom i {
  color: #64748b;
  transition: color 0.3s ease;
}

.btn-secondary-custom:hover i {
  color: #475569;
}
.page-title {
  color: var(--primary-dark);
  font-weight: 600;
  margin: 0;
}

.filter-section {
  background: white;
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 25px;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.form-control,
.form-select {
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(103, 232, 187, 0.1);
}

.table-container {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-color);
}

.table {
  margin: 0;
  font-size: 0.85rem;
  border-collapse: collapse;
}

.table thead th {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  color: var(--primary-dark);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 16px 12px;
  border-bottom: 2px solid var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table tbody td {
  padding: 14px 12px;
  vertical-align: middle;
  border-bottom: 1px solid #f1f3f4;
  transition: background-color 0.2s ease;
}

.table tbody tr:hover {
  background-color: rgba(103, 232, 187, 0.05);
}

.badge {
  font-size: 0.75rem;
  padding: 6px 10px;
  border-radius: 8px;
  font-weight: 500;
}

.action-btn {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-dark)
  );
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 0.8rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(103, 232, 187, 0.3);
}

.page-info {
  font-size: 0.9rem;
  color: #6c757d;
  font-weight: 500;
  padding: 15px 20px;
  background: var(--light-bg);
  border-bottom: 1px solid var(--border-color);
}

.pagination .page-link {
  border: none;
  border-radius: 8px;
  margin: 0 4px;
  color: var(--text-color);
  transition: all 0.3s ease;
}

.pagination .page-link:hover {
  background-color: var(--primary-color);
  color: white;
}

.pagination .page-item.active .page-link {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-dark)
  );
  border: none;
}

.footer {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-dark)
  );
  color: white;
  padding: 20px 0;
  text-align: center;
  margin-top: auto;
}

/* Modal Customizado */
.modal-custom .modal-header {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-dark)
  );
  color: white;
  border-bottom: none;
  padding: 20px 25px;
}

.modal-custom .modal-title {
  font-weight: 600;
  font-size: 1.2rem;
}

.modal-custom .btn-close {
  filter: invert(1);
  opacity: 0.8;
}

.modal-custom .btn-close:hover {
  opacity: 1;
}

.modal-custom .modal-body {
  padding: 25px;
}

.linha-cuidado-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 15px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.linha-cuidado-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.linha-cuidado-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.linha-cuidado-title {
  font-weight: 600;
  color: var(--primary-dark);
  margin: 0;
  font-size: 1.1rem;
}

.linha-cuidado-status {
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 500;
}

.status-ativa {
  background: #d1edff;
  color: #055160;
}

.status-concluida {
  background: #d4edda;
  color: #155724;
}

.status-pendente {
  background: #fff3cd;
  color: #856404;
}

.linha-cuidado-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 15px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.detail-label {
  font-weight: 600;
  color: var(--text-color);
  font-size: 0.8rem;
}

.detail-value {
  color: #6c757d;
  font-size: 0.9rem;
}

.linha-cuidado-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 15px;
  border-top: 1px solid var(--border-color);
}

.btn-sm-custom {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: 6px;
  border: none;
  transition: all 0.3s ease;
}

.btn-sm-custom:hover {
  transform: translateY(-1px);
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #6c757d;
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 15px;
  color: var(--border-color);
}

/* Colunas responsivas */
.col-codigo {
  min-width: 120px;
  max-width: 140px;
  width: 10%;
}
.col-nome {
  min-width: 220px;
  max-width: 320px;
  width: 25%;
}
.col-mae {
  min-width: 200px;
  max-width: 280px;
  width: 22%;
}
.col-cns {
  min-width: 150px;
  max-width: 180px;
  width: 15%;
}
.col-cpf {
  min-width: 140px;
  max-width: 160px;
  width: 14%;
}
.col-nascimento {
  min-width: 120px;
  max-width: 140px;
  width: 10%;
}
.col-status {
  min-width: 100px;
  max-width: 120px;
  width: 8%;
  text-align: center;
}
.col-acao {
  min-width: 160px;
  max-width: 180px;
  width: 12%;
  text-align: center;
}

/* Status da Linha de Cuidado */
.linha-cuidado-status {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-em-andamento {
  background-color: #e3f2fd;
  color: #0d6efd;
  border: 1px solid #b8daff;
}

.status-finalizado {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.status-removido {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Melhorias no card */
.linha-cuidado-card {
  border-left: 4px solid #0d6efd;
}

.linha-cuidado-card .linha-cuidado-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.linha-cuidado-title {
  font-size: 1rem;
  font-weight: 600;
  color: #2c3e50;
  margin: 0;
  display: flex;
  align-items: center;
}

.linha-cuidado-title i {
  color: #0d6efd;
}

/* Responsividade */
@media (max-width: 1400px) {
  .container-custom {
    padding: 0 16px;
  }
}

@media (max-width: 1200px) {
  .col-cpf,
  .col-cns {
    display: none;
  }
}

@media (max-width: 992px) {
  .col-cpf,
  .col-cns,
  .col-mae {
    display: none;
  }
}

@media (max-width: 768px) {
  .main-content {
    padding: 20px 0;
  }

  .container-custom {
    padding: 0 12px;
  }

  .page-actions {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }

  .filter-section {
    padding: 20px;
  }

  .table thead {
    display: none;
  }

  .table,
  .table tbody,
  .table tr,
  .table td {
    display: block;
    width: 100%;
  }

  .table tr {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 12px;
    padding: 16px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  }

  .table td {
    padding: 10px 8px;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .table td::before {
    content: attr(data-label);
    font-weight: 600;
    margin-right: 8px;
    color: var(--primary-dark);
    flex: 0 0 40%;
    font-size: 0.8rem;
  }

  .table td span {
    flex: 1 1 auto;
    text-align: right;
  }

  .action-btn {
    width: 100%;
    justify-content: center;
  }

  .linha-cuidado-details {
    grid-template-columns: 1fr;
  }

  .linha-cuidado-actions {
    flex-direction: column;
  }
}
