:root {
  --primario: #007BFF;
  --secundario: #090cbe;
  --verde: #28a745;
  --vermelho: #dc3545;
  --amarelo: #ffc107;
  --cinza-claro: #f8f9fa;
  --cinza: #dee2e6;
  --fundo: #ffffff;
  --texto: #212529;
  --azul-suave: #e3f2fd;
}
#lista-productos .producto-adicional {
  margin-top: 10px;
}



#lista-productos select,
#lista-productos input[type="number"] {
  width: 100%;
}

/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Corpo da página */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--cinza-claro);
  color: var(--texto);

}

/* Cabeçalhos */
h1, h2, h3, h4, h5 {
  color: var(--primario);
}

/* Botões */
.btn {
  border-radius: 8px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn-primary {
  background-color: var(--primario);
  color: #fff;
}

.btn-success {
  background-color: var(--verde);
  color: #fff;
}

.btn-warning {
  background-color: var(--amarelo);
  color: #000;
}

.btn-danger {
  background-color: var(--vermelho);
  color: #fff;
}

.btn-outline-secondary {
  border-radius: 8px;
  background: transparent;
  border: 2px solid var(--secundario);
  color: var(--secundario);
}

.btn-outline-secondary:hover {
  background: var(--primario);
  color: #fff;
}

/* Formulários */
input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
  border-radius: 6px;
  border: 1px solid var(--cinza);
  padding: 8px;
  width: 100%;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
  border-color: var(--primario);
}

/* Cartões e alertas */
.card {
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  background: #fff;
  border: none;
}

/* Tabelas */
.table {
  border-radius: 8px;
  overflow: hidden;
  background-color: #fff;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.table th, .table td {
  vertical-align: middle;
  text-align: center;
  font-size: 0.95rem;
  padding: 8px;
}

.table-primary {
  background-color: var(--azul-suave);
}

.table-danger {
  background-color: #f8d7da;
}

.table-warning {
  background-color: #fff3cd;
}

.table-info {
  background-color: #e3f2fd;
}

.table-hover tbody tr:hover {
  background-color: #e6f3f3;
}

.table-dark th {
  background-color: #007b83;
  color: #fff;
}

.table td .btn-sm {
  font-size: 0.9rem;
  padding: 6px 14px;
  border-radius: 6px;
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Container centralizado para páginas */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 15px;
}

/* Footer opcional */
footer {
  text-align: center;
  padding: 10px;
  color: var(--secundario);
  font-size: 0.9em;
}

/* ======== MENU DE RELATÓRIOS ======== */
.menu-reportes {
  background-color: #fff;
  padding: 30px;
  margin-top: 50px;
  border-radius: 16px;
  box-shadow: 0 5px 20px rgba(0, 123, 255, 0.05);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.menu-reportes h4 {
  font-size: 1.8rem;
  color: var(--primario);
  margin-bottom: 25px;
  font-weight: bold;
  text-align: center;
}

.menu-reportes .list-group {
  border-radius: 10px;
  overflow: hidden;
}

.menu-reportes .list-group-item {
  background-color: #f9f9f9;
  border: none;
  border-bottom: 1px solid #eee;
  font-size: 1.1rem;
  padding: 15px 20px;
  transition: background-color 0.2s;
}

.menu-reportes .list-group-item:last-child {
  border-bottom: none;
}

.menu-reportes .list-group-item a {
  text-decoration: none;
  color: #333;
  display: block;
}

.menu-reportes .list-group-item:hover {
  background-color: var(--azul-suave);
}

.menu-reportes .list-group-item:hover a {
  color: var(--primario);
  font-weight: 500;
}

.menu-reportes .btn {
  width: 100%;
  font-weight: 500;
}

/* === AJUSTE DE PRECIOS === */
form .form-control {
  border-radius: 8px;
}

.precio-actual {
  font-weight: bold;
  color: #333;
}

.precio-nuevo {
  font-weight: bold;
  color: #007bff;
}

input[type="checkbox"] {
  transform: scale(1.2);
  cursor: pointer;
}

input[type="number"] {
  text-align: right;
}

/* Mensagens e alertas */
.alert {
  border-radius: 10px;
  padding: 10px 15px;
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
  margin-bottom: 15px;
}

/* === SIDEBAR FARMACIA === */
.layout {
  display: flex;
}

.sidebar {
  width: 240px;
  background-color: #007bff;
  color: #fff;
  min-height: 100vh;
  padding: 30px 20px;
  flex-shrink: 0;
}

.sidebar h5 {
  text-align: center;
  color: #fff;
  font-weight: bold;
  margin-bottom: 30px;
}

.sidebar a {
  display: block;
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
  text-decoration: none;
  padding: 12px 16px;
  margin-bottom: 12px;
  border-radius: 8px;
  font-size: 1rem;
  transition: background 0.2s, transform 0.2s;
  font-weight: 500;
}

.sidebar a:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.02);
}

.sidebar a i {
  margin-right: 8px;
}

.contenido {
  flex: 1;
  padding: 30px;
  background-color: #f5f7fa;
  min-height: 100vh;
}

/* Responsivo */
@media (max-width: 768px) {
  .layout {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    min-height: auto;
    padding: 20px 10px;
  }
  .contenido {
    margin-left: 0;
    padding: 20px;
  }
  .container-fluid {
    margin-left: 0;
    padding: 20px;
  }
}

/* === CONTAINER FLUID PRINCIPAL === */
.container-fluid {
  padding: 30px;
  background-color: #f5f7fa;
  min-height: 100vh;
  margin-left: 240px;
}

.container-fluid h1, 
.container-fluid h2, 
.container-fluid h3, 
.container-fluid h4 {
  color: #007bff;
  margin-bottom: 20px;
}

.container-fluid .card {
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  border: none;
  background-color: #fff;
}

.container-fluid .btn {
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 500;
}

/* Layout horizontal do botão e campo de busca */
.cliente-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.cliente-header .btn {
  white-space: nowrap;
}

.cliente-header form {
  flex: 1;
  min-width: 250px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cliente-header input[type="text"] {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ced4da;
}

/* Cabeçalho com título e botão (lado a lado) */
.cliente-topo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.cliente-topo h4 {
  font-weight: bold;
  color: #007b83;
  margin: 0;
}

.cliente-topo .btn {
  white-space: nowrap;
  padding: 10px 18px;
  font-size: 0.95rem;
}

/* Campo de busca */
.cliente-busqueda input[type="text"] {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.95rem;
  border-radius: 6px;
  border: 1px solid #ced4da;
  margin-bottom: 20px;
}

.btn-outline-primary {
  border: 2px solid #007bff;
  background-color: transparent;
  color: #007bff;
  font-weight: 500;
  padding: 10px 20px;
  font-size: 0.95rem;
  border-radius: 8px;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(0, 123, 255, 0.1);
}

.btn-outline-primary:hover {
  background-color: #007bff;
  color: #fff;
  text-decoration: none;
}

/* Utilitários flex */
.d-flex {
  display: flex;
}

.justify-content-between {
  justify-content: space-between;
}

.align-items-center {
  align-items: center;
}

/* Bloco superior */
.cliente-top-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Título e botão lado a lado */
.titulo-botao {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.titulo-botao h4 {
  font-weight: bold;
  margin: 0;
  color: #007b83;
}

.titulo-botao .btn {
  font-size: 0.95rem;
  padding: 8px 16px;
  white-space: nowrap;
  border-radius: 8px;
}

/* Botões em tabela */
.btn-info {
  background-color: #17a2b8;
  border: none;
  color: #fff;
}

.btn-warning {
  background-color: #ffc107;
  border: none;
  color: #212529;
}

.btn-danger {
  background-color: #dc3545;
  border: none;
  color: #fff;
}

/* Estilo para os campos de pagamento e troco */
#total, #pagado, #cambio {
  font-size: 1.1rem;
  font-weight: bold;
  padding: 8px 12px;
  border-radius: 6px;
  display: inline-block;
}

#total {
  background-color: #e3f2fd;
  color: #0d47a1;
}

#pagado {
  background-color: #fffde7;
  color: #f57f17;
}

#cambio {
  background-color: #e8f5e9;
  color: #1b5e20;
}

/* Labels mais visíveis */
label.form-label {
  font-weight: 600;
  color: #333;
}

/* Espaçamento entre colunas */
.row .col-md-4 {
  padding-right: 12px;
  padding-left: 12px;
}

/* Estilo geral para o contêiner */
label {
  font-weight: bold;
  color: #333;
  font-size: 15px;
  margin-bottom: 5px;
  display: block;
}

/* Estilo para o select */
#select-producto.form-select {
  background-color: #f8f9fa;
  border: 2px solid #28a745;
  border-radius: 8px;
  padding: 10px;
  font-size: 15px;
  color: #333;
  transition: border-color 0.3s, box-shadow 0.3s;
}

#select-producto.form-select:focus {
  border-color: #218838;
  box-shadow: 0 0 5px rgba(40, 167, 69, 0.5);
  outline: none;
}

/* Estilo das opções */
#select-producto option {
  padding: 8px;
  font-size: 14px;
  color: #000;
}

/* Placeholder desabilitado */
#select-producto option[disabled] {
  color: #999;
}
/* 📱 Ajustes suaves para celular (sem mudar estrutura) */
@media (max-width: 576px) {
  body {
    font-size: 15px;
  }

  .table {
    font-size: 13px;
  }

  .form-control {
    font-size: 15px;
    padding: 10px;
  }

  .btn {
    font-size: 14px;
    padding: 8px 12px;
  }

  .card-body p,
  .card-body li {
    font-size: 14px;
  }

  .sidebar {
    font-size: 14px;
    padding: 20px 12px;
  }

  .sidebar a {
    font-size: 14px;
    padding: 10px 14px;
  }

  .card-header h4,
  .card-header h5 {
    font-size: 1.1rem;
  }

  h3, h4, h5 {
    font-size: 1.2rem;
  }

  .alert {
    font-size: 14px;
  }

  .btn-group .btn {
    margin-bottom: 6px;
  }

  /* Tabela rolável horizontal se necessário */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}
/* Responsividade para tablets */
@media (max-width: 768px) {
  .container {
    padding: 15px;
  }

  h4.mb-3 {
    font-size: 1.3rem;
    text-align: center;
  }

  .btn-outline-secondary {
    display: block;
    width: 100%;
    text-align: center;
  }

  form.row.g-3.mb-4 {
    gap: 10px;
  }

  form.row .form-control,
  form.row .btn {
    width: 100%;
  }

  .table {
    font-size: 0.9rem;
  }
}

/* Responsividade para celulares */
@media (max-width: 480px) {
  .container {
    padding: 10px;
  }

  h4.mb-3 {
    font-size: 1.1rem;
  }

  .table thead {
    font-size: 0.8rem;
  }

  .table td,
  .table th {
    padding: 6px;
  }

  .btn {
    font-size: 0.9rem;
  }
}
