/* Estilos gerais */
body {
  font-family: Arial, sans-serif;
  text-align: center;
  margin: 0;
  background-color: #f9f9f9;
  padding: 0;
}

h1 {
  color: #00008b;
  font-weight: bold;
  text-align: center;
  margin: 0;
  margin-top: 15px;
}

h2 {
  color: #00008b;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  margin-top: 1px !important;
  margin-bottom: 1px !important;
}

.tituloContainer {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.bloco-container {
  width: 75%;
  text-align: left;
}

.bloco-header {
  color: #00008b;
  font-weight: bold;
  margin-top: 10px;
  margin-bottom: 0;
  padding: 15px;
  background-color: #e7e7ff;
  border: 1px solid #ddd;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bloco-header_reserva {
  color: #00008b;
  font-weight: bold;
  margin-top: 10px;
  margin-bottom: 0;
  padding: 15px;
  background-color: #e7e7ff;
  border: 1px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bloco-header:hover {
  background-color: #d8d8ff;
}

.bloco-header::after {
  content: "\002B";
  font-size: 20px;
  font-weight: bold;
  color: #00008b;
  transition: transform 0.2s;
}

.bloco-header.active::after {
  content: "\2212";
}

.content {
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-in-out;
  background-color: white;
  border: 1px solid #ddd;
  border-top: none;
}

/* Ajuste Técnico: Permite expansão total sem cortes */
.content.show {
  max-height: none;
}

/* Remove o scroll horizontal e ajusta largura */
.table-scroll-wrapper {
  overflow-x: hidden;
  width: 100%;
}

table {
  display: block;
  width: 100%;
}

/* Esconde o cabeçalho original da tabela (TH) */
thead {
  display: none;
}

tbody,
tr,
td {
  display: block;
  width: 100%;
}

/* Cada linha vira um Card */
tbody tr {
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  padding: 8px 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Estilização das "Células" - Estratégia de Empilhamento Total */
td {
  display: block !important;
  width: 100% !important;
  box-sizing: border-box;
  border: none !important;
  padding: 10px 15px !important;
  text-align: left !important;
  background-color: white;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* O "Rótulo" (Bloco, Local, etc) */
td::before {
  content: attr(data-label);
  display: block;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 10px;
  color: #888;
  margin-bottom: 2px;
  letter-spacing: 0.5px;
}

/* O "Conteúdo" (o dado em si) */
td {
  color: #00008b;
  font-weight: bold;
  font-size: 15px;
  line-height: 1.4;
}

/* Linha divisória entre as informações dentro do Card */
td:not(:last-child) {
  border-bottom: 1px solid #f0f0f0 !important;
}

/* Força o container e a tabela a nunca passarem da largura da tela */
html,
body {
  overflow-x: hidden;
  width: 100%;
  padding: 0 15px 40px 15px;
  box-sizing: border-box;
}

.bloco-container,
.table-scroll-wrapper,
table,
tbody,
tr {
  width: 100% !important;
  max-width: 100% !important;
  display: block !important;
  box-sizing: border-box;
}

tbody tr:hover {
  background-color: transparent;
}

.bloco-container,
.table-scroll-wrapper,
table {
  max-width: 100vw;
  box-sizing: border-box;
}

/* Ajuste do Accordion */
.bloco-container {
  width: 95%;
  margin: 10px auto;
}

.bloco-header {
  font-size: 16px;
  padding: 12px;
  border-radius: 5px;
}

.input-hidden {
  display: none;
}

.custom-file-upload {
  display: inline-block;
  padding: 10px 20px;
  cursor: pointer;
  background-color: #00008b;
  color: white;
  border-radius: 8px;
  font-weight: bold;
  transition: background 0.3s ease;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.custom-file-upload:hover {
  background-color: #1d4ed8;
}

.custom-file-upload:active {
  transform: scale(0.98);
}

#file-name {
  margin-left: 10px;
  font-size: 14px;
  color: #666;
  font-style: italic;
}

.btn-delete {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background-color: #fee2e2;
  color: #dc2626;
  border: 1px solid #fecaca;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-delete:hover {
  background-color: #dc2626;
  color: white;
  border-color: #dc2626;
  box-shadow: 0 4px 6px -1px rgba(220, 38, 38, 0.2);
}

.btn-delete:active {
  transform: scale(0.95);
}

.icon-trash {
  width: 12px;
  height: 14px;
  border: 2px solid currentColor;
  border-top: none;
  position: relative;
  border-radius: 0 0 2px 2px;
}

.icon-trash::before {
  content: "";
  position: absolute;
  top: -3px;
  left: -2px;
  width: 16px;
  height: 2px;
  background-color: currentColor;
}

.icon-trash::after {
  content: "";
  position: absolute;
  top: -5px;
  left: 3px;
  width: 6px;
  height: 2px;
  border: 2px solid currentColor;
  border-bottom: none;
  border-radius: 2px 2px 0 0;
}

.actions-container {
  display: flex;
  justify-content: center;
  padding: 5px 0;
  width: 100%;
}

.btn-save {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-left: 9px;
  padding: 14px 32px;
  background-color: #ecfdf5;
  color: #059669;
  border: 2px solid #a7f3d0;
  border-radius: 10px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(5, 150, 105, 0.1);
}

.btn-save:hover {
  background-color: #059669;
  color: white;
  border-color: #059669;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(5, 150, 105, 0.3);
}

.btn-save:active {
  transform: translateY(0) scale(0.96);
}

.icon-save {
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  position: relative;
  border-radius: 3px;
}

.icon-save::before {
  content: "";
  position: absolute;
  top: 0;
  left: 4px;
  width: 6px;
  height: 5px;
  border: 1.5px solid currentColor;
  border-top: none;
}

.button-group {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 20px 0;
  flex-wrap: wrap;
}

button {
  background-color: #2c3e50;
  color: white;
  border: none;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

button:hover {
  background-color: #34495e;
  transform: translateY(-2px);
}

button:active {
  transform: scale(0.98);
}

.btn-add {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background-color: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-add:hover {
  background-color: #2563eb;
  color: white;
  border-color: #2563eb;
  box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.btn-add:active {
  transform: scale(0.95);
}

.icon-plus {
  width: 14px;
  height: 14px;
  position: relative;
  display: inline-block;
}

.icon-plus::before,
.icon-plus::after {
  content: "";
  position: absolute;
  background-color: currentColor;
  border-radius: 2px;
}

.icon-plus::before {
  top: 6px;
  left: 0;
  width: 14px;
  height: 2px;
}

.icon-plus::after {
  top: 0;
  left: 6px;
  width: 2px;
  height: 14px;
}

.header-edicao {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 10px;
  border-bottom: 2px solid #eee;
}

.header-edicao h2 {
  margin: 0;
}

.btn-back {
  background-color: #95a5a6;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  font-size: 0.9rem;
  transition: background 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-back:hover {
  background-color: #7f8c8d;
}

.btn-back i {
  font-size: 0.8rem;
}

.btn-editar {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-left: 9px;
  padding: 14px 32px;
  background-color: #ecfdf5;
  color: white;
  border: 2px solid #2563eb;
  border-radius: 10px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(7, 25, 131, 0.1);
}

.btn-editar:hover {
  background-color: #0d2049;
  color: white;
  border-color: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(7, 25, 131, 0.1);
}

.btn-editar:active {
  transform: translateY(0) scale(0.96);
}

.section-label {
  width: 100%;
  display: flex;
  align-items: center;
  margin: 20px 0 10px 0;
  color: #7f8c8d;
  font-size: 0.75rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e0e0e0;
  margin-left: 15px;
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.header-edicao-fixo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 1px solid #dee2e6;
  position: sticky;
  top: 10px;
  z-index: 100;
}

.acoes-edicao {
  display: flex;
  gap: 15px;
}

.btn-save-edit {
  background-color: #27ae60;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.btn-save-edit:hover {
  background-color: #219150;
  transform: scale(1.05);
}

.btn-back {
  background-color: #e74c3c;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
}

.btn-clear {
  background-color: #34495e;
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 10px;
}

.btn-clear:hover {
  background-color: #c0392b;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-clear i {
  font-size: 0.85rem;
}

.row-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #3498db;
  border-radius: 4px;
  background-color: #fff;
  cursor: pointer;
  display: inline-block;
  position: relative;
  transition: all 0.2s ease;
  vertical-align: middle;
}

.row-checkbox:hover {
  border-color: #2980b9;
  background-color: #f7f9f9;
}

.row-checkbox:checked {
  background-color: #3498db;
  border-color: #3498db;
}

.row-checkbox:checked::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.tabela-body td:first-child,
thead th:first-child {
  text-align: center;
  width: 50px;
}

.btn-delete-mass {
  background-color: #e74c3c;
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-left: 10px;
}

.btn-delete-mass:hover {
  background-color: #c0392b;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.btn-delete-mass:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-delete-mass:disabled {
  background-color: #fab1a0;
  cursor: not-allowed;
  opacity: 0.7;
}

.btn-delete-mass::before {
  content: "\f2ed";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
}

/* ==========================================
   ESTILOS DE FILTROS E SEÇÕES POR DIA
   ========================================== */
.filtros-visualizacao {
  width: 95%;
  max-width: 900px;
  margin: 20px auto 10px auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}

#inputBusca {
  flex: 1 1 280px;
  padding: 12px 15px;
  font-size: 15px;
  color: #00008b;
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-sizing: border-box;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#inputBusca:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

#filtroData {
  flex: 0 1 190px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: bold;
  color: #00008b;
  background-color: #e7e7ff;
  border: 1px solid #c7c7ff;
  border-radius: 8px;
  cursor: pointer;
  box-sizing: border-box;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

#filtroData:focus {
  outline: none;
  border-color: #00008b;
}

.secao-dia {
  margin-top: 24px;
  padding-top: 12px;
  border-top: 2px dashed #d8d8ff;
}

.secao-dia:first-of-type {
  border-top: none;
  padding-top: 0;
}

.secao-dia .tituloDia {
  display: inline-block;
  background-color: #e7e7ff;
  color: #00008b;
  padding: 8px 18px;
  border-radius: 8px;
  border: 1px solid #c7c7ff;
  font-size: 18px;
  margin: 8px auto 12px auto !important;
}