/* ---------- ESTILO GERAL ---------- ESSE É O STYLE.CSS */
body {
  background: #f8f9fa;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: #343a40;
  transition: all 0.3s ease;
}

h4 {
  font-weight: 600;
  color: #ffffff;
}

h2 {
  font-weight: 600;
  color: #2c3e50;
}

.bi-check-circle-fill {
  color: #6c757d;
}

/* ---------- NAVBAR ---------- */
.navbar {
  background: #ea783b !important;
  border-bottom: 1px solid #d97423;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
  font-weight: 600;
  font-size: 1.3rem;
  color: #ffffff !important;
}

.navbar-brand:hover {
  color: #f8f9fa !important;
}

.navbar-nav .nav-link {
  color: #ffffff !important;
  font-weight: 500;
  transition: all 0.2s ease;
  border-radius: 6px;
  margin: 0 2px;
  padding: 8px 12px !important;
}

.navbar-nav .nav-link:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff !important;
}

.navbar-toggler {
  border-color: rgba(255, 255, 255, 0.3);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ---------- ADMIN INDICATOR ---------- */
.navbar-nav .dropdown-toggle::after {
  margin-left: 0.5rem;
}

.dropdown-header {
  color: #495057;
  font-weight: 600;
  font-size: 0.875rem;
}

.dropdown-item {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.dropdown-item i {
  width: 16px;
  text-align: center;
}

/* ---------- FORMULÁRIO ---------- */
form.card,
.card {
  border-radius: 12px;
  background: #ffffff;
  transition: 0.3s ease;
  border: 1px solid #e9ecef;
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.05);
}

form.card:hover,
.card:hover {
  box-shadow: 0px 8px 24px rgba(234, 120, 59, 0.1);
  transform: translateY(-2px);
}

.card-header {
  background: #ea783b !important;
  color: #ffffff !important;
  border-bottom: none;
  font-weight: 600;
}

form label {
  font-weight: 500;
  color: #495057;
}

.form-control,
.form-select {
  border-radius: 8px;
  border: 1px solid #dee2e6;
  transition: all 0.2s ease;
  font-size: 16px;
  /* Prevent zoom on mobile */
  background-color: #ffffff;
}

.form-control:focus,
.form-select:focus {
  border-color: #ea783b;
  box-shadow: 0 0 0 0.2rem rgba(234, 120, 59, 0.25);
  background-color: #ffffff;
}

.form-text {
  color: #6c757d;
  font-size: 0.875rem;
}

/* ---------- BOTÕES ---------- */
.btn-primary {
  background: #ea783b;
  border-color: #ea783b;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: #d97423;
  border-color: #d97423;
  transform: translateY(-1px);
}

.btn-primary:focus {
  box-shadow: 0 0 0 0.2rem rgba(234, 120, 59, 0.5);
}

.btn-success {
  background: #28a745;
  border-color: #28a745;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s ease;
}

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

.btn-info {
  background: #17a2b8;
  border-color: #17a2b8;
  border-radius: 8px;
  font-weight: 500;
}

.btn-info:hover {
  background: #138496;
  border-color: #138496;
}

.btn-warning {
  background: #ffc107;
  border-color: #ffc107;
  border-radius: 8px;
  font-weight: 500;
  color: #212529;
}

.btn-warning:hover {
  background: #e0a800;
  border-color: #e0a800;
  color: #212529;
}

.btn-danger {
  background: #dc3545;
  border-color: #dc3545;
  border-radius: 8px;
  font-weight: 500;
}

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

.btn-outline-secondary {
  color: #6c757d;
  border-color: #6c757d;
  border-radius: 8px;
  font-weight: 500;
}

.btn-outline-secondary:hover {
  background: #ea783b;
  border-color: #ea783b;
  color: #ffffff;
}

/* ---------- ESTADOS DE LOADING DOS BOTÕES ---------- */
.btn.loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn.loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin: -8px 0 0 -8px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

.btn-outline-secondary.loading::after {
  border-color: #6c757d;
  border-top-color: transparent;
}

/* ---------- TABS ---------- */
.nav-tabs {
  border-bottom: 2px solid #e9ecef;
  margin-bottom: 2rem;
}

.nav-tabs .nav-link {
  border: none;
  border-bottom: 3px solid transparent;
  color: #6c757d;
  font-weight: 500;
  padding: 1rem 1.5rem;
  transition: all 0.2s ease;
}

.nav-tabs .nav-link:hover {
  color: #ea783b;
  border-bottom-color: rgba(234, 120, 59, 0.3);
}

.nav-tabs .nav-link.active {
  color: #ea783b;
  border-bottom-color: #ea783b;
  background: none;
}

/* ---------- CARDS DE ESTATÍSTICAS ---------- */
.stat-card {
  background: linear-gradient(135deg, #ea783b 0%, #d97423 100%);
  border-radius: 16px;
  padding: 1.5rem;
  color: white;
  position: relative;
  overflow: hidden;
  border: none;
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transform: translate(30px, -30px);
}

.stat-card.blue {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}

.stat-card.green {
  background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
}

.stat-card.orange {
  background: linear-gradient(135deg, #ea783b 0%, #d97423 100%);
}

.stat-card.red {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

/* --------- Ajuste geral dos cards clicáveis --------- */
.stat-card {
  cursor: pointer;
  transition: all 0.3s ease;
}

/* --------- Destaque quando o filtro está ativo --------- */
.stat-card.filtro-ativo {
  border: 3px solid #3498db;
  box-shadow: 0 0 20px rgba(52, 152, 219, 0.6);
}


/* ---------- TABELAS ---------- */
.table {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.05);
  background: white;
  border: none;
}

.text-warning {
  color: #000000 !important;
}

.table thead {
  background: #ea783b !important;
}

.table thead th {
  color: #000000 !important;
  font-weight: 600;
  text-align: center;
  border: none;
  padding: 1rem 0.75rem;
  font-size: 0.875rem;
  white-space: nowrap;
}

.table tbody td {
  text-align: center;
  vertical-align: middle;
  padding: 0.75rem 0.5rem;
  border: none;
  border-bottom: 1px solid #f8f9fa;
  font-size: 0.875rem;
}

.table tbody tr:hover {
  background-color: rgba(234, 120, 59, 0.05);
  transition: background-color 0.2s ease;
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table th {
  user-select: none;
  position: relative;
}

.table th i {
  opacity: 0.6;
  transition: all 0.2s ease;
}

/* ---------- RESERVAS CARD VIEW ---------- */
.reserva-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
  margin-bottom: 1rem;
}

.reserva-card-header {
  align-items: flex-start !important;
  gap: 1rem;
  background: linear-gradient(135deg, #ea783b 0%, #d97423 100%);
  color: white;
  padding: 1rem;
  border-radius: 12px 12px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.reserva-card-header>div:last-child {
  margin-top: 0.3rem;
  align-self: flex-start;
}

.reserva-card-header .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
}

.reserva-card:hover {
  box-shadow: 0px 8px 20px rgba(234, 120, 59, 0.1);
  transform: translateY(-2px);
}

.reserva-card-body {
  padding: 1.5rem;
}

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

.info-item {
  display: flex;
  align-items: center;
  padding: 0.5rem;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 3px solid #ea783b;
}

.info-item i {
  color: #ea783b;
  margin-right: 0.5rem;
  width: 16px;
}

.info-label {
  font-weight: 500;
  color: #6c757d;
  font-size: 0.75rem;
  margin-right: 0.5rem;
}

.info-value {
  font-weight: 600;
  color: #343a40;
}

/* ---------- BADGES DE STATUS ---------- */
.badge {
  font-size: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 20px;
  font-weight: 500;
}

.status-pendente {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

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

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

.status-recolhido {
  background: #e2e3e5;
  color: #383d41;
  border: 1px solid #d6d8db;
}

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

/* ---------- FILTROS ---------- */
.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-buttons .btn {
  border-radius: 20px;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  border: 1px solid #dee2e6;
  background: #ffffff;
  color: #6c757d;
}

.filter-buttons .btn.active {
  background: #ea783b;
  color: white;
  border-color: #ea783b;
}

.filter-buttons .btn:hover:not(.active) {
  background: #f8f9fa;
  border-color: #ea783b;
  color: #ea783b;
}

/* ---------- CONTROLES DE TABELA ---------- */
.table-controls {
  display: flex;
  justify-content: between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.view-toggle {
  display: flex;
  background: #f8f9fa;
  border-radius: 8px;
  padding: 0.25rem;
}

.view-toggle .btn {
  border: none;
  background: transparent;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
}

.view-toggle .btn.active {
  background: #ea783b;
  color: white;
}

.sort-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sort-controls select {
  border-radius: 6px;
  border: 1px solid #dee2e6;
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

/* ---------- SEARCH BOX ---------- */
.search-box {
  min-width: 250px;
}

.search-box .input-group-text {
  background: #f8f9fa;
  border-color: #dee2e6;
  color: #6c757d;
}

.search-box .form-control {
  border-color: #dee2e6;
  font-size: 0.875rem;
}

.search-box .form-control:focus {
  border-color: #ea783b;
  box-shadow: 0 0 0 0.2rem rgba(234, 120, 59, 0.25);
}

/* ---------- CALENDÁRIO ---------- */
.calendar-container {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.05);
}

.calendar-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: #ea783b;
  color: white;
}

.calendar-day-header {
  padding: 0.8rem;
  text-align: center;
  font-weight: 600;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.calendar-day-header:last-child {
  border-right: none;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: #f8f9fa;
  gap: 1px;
  padding: 0;
}

.calendar-day {
  background: white;
  min-height: 100px;
  padding: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  border: none;
}

.calendar-day:hover {
  background: #f8f9fa;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.calendar-day.empty {
  background: #e9ecef;
  cursor: default;
}

.calendar-day.empty:hover {
  background: #e9ecef;
  transform: none;
  box-shadow: none;
}

.calendar-day.today {
  background: rgba(234, 120, 59, 0.1);
  border: 2px solid #ea783b;
  font-weight: bold;
}

.calendar-day-number {
  font-size: 1rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 6px;
}

.calendar-events {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.calendar-event {
  background: #ea783b;
  color: white;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  line-height: 1.2;
  margin-bottom: 1px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.calendar-event:hover {
  transform: scale(1.02);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

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

.calendar-event.status-entregue {
  background: #17a2b8;
  color: white;
}

.calendar-event.status-recolher {
  background: #dc3545;
  color: white;
}

.calendar-event.status-concluído {
  background: #28a745;
  color: white;
}

.calendar-event-more {
  background: #6c757d;
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.6rem;
  text-align: center;
  cursor: pointer;
}

/* ---------- MODAL STYLES ---------- */
.modal-header {
  border-bottom: none;
}


.modal-content {
  border-radius: 12px;
  overflow: hidden;
}

#modalLoginAdmin .modal-body {
  padding: 2rem 1.5rem;
}

#modalLoginAdmin .form-control {
  border-radius: 8px;
  border: 1px solid #dee2e6;
  padding: 0.75rem;
}

#modalLoginAdmin .form-control:focus {
  border-color: #ea783b;
  box-shadow: 0 0 0 0.2rem rgba(234, 120, 59, 0.25);
}

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

.info-label {
  font-weight: 500;
  color: #6c757d;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
}

.info-value {
  font-weight: 600;
  color: #343a40;
  font-size: 1rem;
}

.status-display {
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

/* ---------- DISPONIBILIDADE ---------- */
.availability-info {
  padding: 1rem;
  border-radius: 8px;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  border: 1px solid;
}

.availability-info.available {
  background: #d4edda;
  color: #155724;
  border-color: #c3e6cb;
}

.availability-info.unavailable {
  background: #f8d7da;
  color: #721c24;
  border-color: #f5c6cb;
}

.availability-info.checking {
  background: #fff3cd;
  color: #856404;
  border-color: #ffeaa7;
}

/* ---------- TOAST NOTIFICATIONS ---------- */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1050;
}

.toast {
  border-radius: 8px;
  border: none;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  background: #ffffff;
}

.toast-header {
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}

.toast-success .toast-header {
  background: #d4edda;
  color: #155724;
}

.toast-error .toast-header {
  background: #f8d7da;
  color: #721c24;
}

.toast-info .toast-header {
  background: #d1ecf1;
  color: #0c5460;
}

/* ---------- LOADING STATES ---------- */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.spinner {
  border: 2px solid #f3f3f3;
  border-top: 2px solid #ea783b;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
  display: inline-block;
  margin-right: 0.5rem;
}

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

  100% {
    transform: rotate(360deg);
  }
}

/* ---------- PROGRESS BAR ---------- */
.progress {
  background-color: #e9ecef;
  border-radius: 10px;
}

.progress-bar {
  border-radius: 10px;
  transition: width 0.6s ease;
}

.bg-success {
  background-color: #28a745 !important;
}

.bg-warning {
  background-color: #ffc107 !important;
}

.bg-danger {
  background-color: #dc3545 !important;
}

/* ---------- ALERTAS ---------- */
.alert {
  border-radius: 10px;
  border: none;
  font-weight: 500;
}

.alert-success {
  background: #d4edda;
  color: #155724;
}

.alert-danger {
  background: #f8d7da;
  color: #721c24;
}

.alert-info {
  background: #d1ecf1;
  color: #0c5460;
}

.alert-warning {
  background: #fff3cd;
  color: #856404;
}

/* ---------- CARDS ESPECIAIS ---------- */
.card-highlight {
  border-left: 4px solid #ea783b;
}

.text-primary {
  color: #ea783b !important;
}

.border-primary {
  border-color: #ea783b !important;
}

.bg-primary {
  background-color: #ea783b !important;
}

.bg-light {
  background-color: #f8f9fa !important;
}

/* ---------- FOOTER ---------- */
footer {
  background: #f8f9fa !important;
  border-top: 1px solid #e9ecef;
  color: #6c757d;
}

/* ---------- ANIMAÇÕES ---------- */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: translateX(-100%);
  }

  to {
    transform: translateX(0);
  }
}

.slide-in {
  animation: slideIn 0.3s ease;
}

/* ---------- RESPONSIVIDADE ---------- */
@media (max-width: 768px) {

  .container,
  .container-fluid {
    padding: 0 15px;
  }

  .table-responsive {
    font-size: 0.875rem;
  }

  .btn-group {
    flex-wrap: wrap;
  }

  .btn-group .btn {
    margin-bottom: 0.25rem;
  }

  .stat-card {
    margin-bottom: 1rem;
  }

  .nav-tabs .nav-link {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }

  .filter-buttons {
    justify-content: center;
  }

  .navbar-nav {
    text-align: center;
  }

  .table-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .table-controls>div {
    width: 100%;
  }

  .view-toggle {
    justify-content: center;
  }

  .search-box {
    min-width: 200px;
    width: 100%;
  }

  /* Hide table on mobile, show cards */
  .table-view {
    display: none;
  }

  .card-view {
    display: block;
  }

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

  /* Calendar mobile adjustments */
  .calendar-day {
    min-height: 80px !important;
    padding: 6px !important;
  }

  .calendar-day-number {
    font-size: 0.875rem !important;
  }

  .calendar-event {
    font-size: 0.6rem !important;
    padding: 1px 4px !important;
  }

  .calendar-day-header {
    padding: 0.5rem !important;
    font-size: 0.875rem !important;
  }
}

@media (min-width: 769px) {
  .card-view {
    display: none;
  }

  .table-view {
    display: block;
  }
}

/* ---------- LOGO STYLES ---------- */
.navbar-brand {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

.navbar-brand img {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: white;
  padding: 3px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
  .navbar-brand img {
    width: 35px;
    height: 35px;
  }

  .navbar-brand {
    font-size: 0.9rem !important;
  }
}

/* ---------- CARDS DE ESTATÍSTICAS MOBILE ---------- */
@media (max-width: 768px) {

  /* Forçar 4 colunas em uma linha */
  .row.mb-4>[class*="col-"] {
    flex: 0 0 25% !important;
    max-width: 25% !important;
    padding: 0 0.25rem !important;
    margin-bottom: 0.5rem !important;
  }

  /* Remover margin-bottom do row */
  .row.mb-4 {
    margin-bottom: 1rem !important;
    gap: 0 !important;
  }

  /* Card compacto vertical */
  .stat-card {
    padding: 0.5rem 0.25rem !important;
    min-height: 85px !important;
    border-radius: 10px !important;
  }

  .stat-card::before {
    display: none !important;
  }

  /* Mudar layout de horizontal para vertical */
  .stat-card .d-flex {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 0 !important;
  }

  .stat-card .me-3 {
    margin-right: 0 !important;
    margin-bottom: 0.15rem !important;
  }

  /* Ícone menor */
  .stat-card i.fa-2x {
    font-size: 1rem !important;
  }

  /* Número grande */
  .stat-card h3 {
    font-size: 1.6rem !important;
    font-weight: 700 !important;
    margin-bottom: 0.15rem !important;
    line-height: 1 !important;
  }

  /* Texto pequeno */
  .stat-card small {
    font-size: 0.55rem !important;
    line-height: 1.1 !important;
    font-weight: 600 !important;
    display: block !important;
    word-break: break-word !important;
  }

  /* Ajustes para telas muito pequenas */
  @media (max-width: 360px) {
    .stat-card {
      min-height: 80px !important;
      padding: 0.4rem 0.2rem !important;
    }

    .stat-card i.fa-2x {
      font-size: 0.9rem !important;
    }

    .stat-card h3 {
      font-size: 1.4rem !important;
    }

    .stat-card small {
      font-size: 0.5rem !important;
    }

    .row.mb-4>[class*="col-"] {
      padding: 0 0.15rem !important;
    }
  }

  /* Ajustes para telas médias mobile */
  @media (min-width: 400px) and (max-width: 768px) {
    .stat-card {
      min-height: 90px !important;
      padding: 0.6rem 0.3rem !important;
    }

    .stat-card i.fa-2x {
      font-size: 1.1rem !important;
    }

    .stat-card h3 {
      font-size: 1.75rem !important;
    }

    .stat-card small {
      font-size: 0.6rem !important;
    }
  }
}

/* ---------- CARDS SUPER COMPACTOS MOBILE ---------- */
@media (max-width: 768px) {
  .reserva-card {
    margin-bottom: 0.75rem;
    border-radius: 8px;
  }

  .reserva-card-header {
    padding: 0.6rem 0.8rem;
    min-height: 50px;
    border-radius: 8px 8px 0 0;
  }

  .reserva-card-header h6 {
    font-size: 0.85rem;
    margin-bottom: 0;
    line-height: 1.2;
  }

  .reserva-card-header small {
    font-size: 0.65rem;
    line-height: 1.1;
  }

  .reserva-card-body {
    padding: 0.8rem;
  }

  /* Grid 2x2 mais compacto */
  .reserva-info {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
  }

  .info-item {
    padding: 0.4rem;
    min-height: 45px;
    border-left-width: 2px;
  }

  .info-item i {
    font-size: 0.8rem;
    margin-right: 0.4rem;
  }

  .info-label {
    font-size: 0.6rem;
    margin-bottom: 0.05rem;
  }

  .info-value {
    font-size: 0.75rem;
  }

  /* Badges menores */
  .badge {
    font-size: 0.65rem;
    padding: 0.3rem 0.5rem;
  }

  /* Botões de ação mais compactos */
  .reserva-card-body>.d-flex {
    margin-top: 0.3rem;
  }

  .reserva-card-body .btn-sm {
    padding: 0.2rem 0.4rem;
    font-size: 0.7rem;
    min-width: 70px;
  }
}

@media (max-width: 375px) {
  .reserva-card-header {
    padding: 0.5rem 0.6rem;
    min-height: 45px;
  }

  .reserva-card-header h6 {
    font-size: 0.8rem;
  }

  .reserva-card-header small {
    font-size: 0.6rem;
  }

  .reserva-card-body {
    padding: 0.6rem;
  }

  .reserva-info {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .info-item {
    min-height: 40px;
    padding: 0.3rem;
  }

  .info-label {
    font-size: 0.55rem;
  }

  .info-value {
    font-size: 0.7rem;
  }
}

/*---------------LOGIN-----------------*/

.login-container {
  max-width: 800px;
  padding: 15px;
  margin: auto;
  width: 90%;
}

.login-card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  transition: all 0.3s ease;
}

.login-card:hover {
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
  transform: translateY(-2px);
}

.login-header {
  background: linear-gradient(135deg, #ea783b 0%, #d97423 100%);
  padding: 1.5rem 2rem;
  text-align: center;
  color: white;
  position: relative;
}

.login-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.login-header>* {
  position: relative;
  z-index: 1;
}

.login-header img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: white;
  padding: 8px;
  margin-bottom: 0.8rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.login-header img:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.login-header h1 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  letter-spacing: -0.5px;
}

.login-header p {
  opacity: 0.95;
  font-size: 0.95rem;
  font-weight: 300;
  margin-bottom: 0;
}

.login-body {
  padding: 2rem 2rem 1.5rem 2rem;
  background: #fafafa;
}

.login-option {
  background: #ffffff;
  border-radius: 16px;
  padding: 1.8rem 1.5rem;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 2px solid #f0f0f0;
  cursor: pointer;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.login-option::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(234, 120, 59, 0.1), transparent);
  transition: left 0.5s ease;
}

.login-option:hover::before {
  left: 100%;
}

.login-option:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(234, 120, 59, 0.15);
  border-color: #ea783b;
}

.login-option.selected {
  border-color: #ea783b;
  background: rgba(234, 120, 59, 0.05);
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(234, 120, 59, 0.2);
}

.login-option i {
  font-size: 3rem;
  color: #ea783b;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.login-option:hover i {
  transform: scale(1.1);
  color: #d97423;
}

.login-option h3 {
  color: #2c3e50;
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.login-option p {
  color: #6c757d;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.login-option .btn {
  width: 100%;
  padding: 0.75rem;
  font-weight: 600;
  border-radius: 12px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.login-option .btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease;
}

.login-option .btn:hover::before {
  width: 300px;
  height: 300px;
}

/* ---------- FORMULÁRIOS DE LOGIN ---------- */
.login-form {
  background: #ffffff;
  border-radius: 16px;
  padding: 1.5rem;
  margin-top: 1.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border: 1px solid #e9ecef;
  display: none;
}

.login-form.active {
  display: block;
  animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-form h4 {
  color: #2c3e50;
  font-weight: 600;
  margin-bottom: 1.2rem;
  text-align: center;
}

.login-form .form-group {
  margin-bottom: 1.2rem;
}

.login-form .form-label {
  font-weight: 500;
  color: #495057;
  margin-bottom: 0.4rem;
}

.login-form .form-control {
  border-radius: 10px;
  border: 2px solid #e9ecef;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.login-form .form-control:focus {
  border-color: #ea783b;
  box-shadow: 0 0 0 0.2rem rgba(234, 120, 59, 0.15);
  transform: translateY(-1px);
}

.login-form .btn {
  width: 100%;
  padding: 0.75rem;
  font-weight: 600;
  border-radius: 10px;
  margin-top: 0.8rem;
}

.login-form .test-credentials {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 0.8rem;
  margin: 0.8rem 0;
  border-left: 4px solid #ea783b;
}

.login-form .test-credentials small {
  color: #6c757d;
  font-size: 0.875rem;
}

.login-form .test-credentials strong {
  color: #ea783b;
}

/* ESTILOS PARA NAV PILLS DO LOGIN */
#loginTabs .nav-link {
  background-color: #f8f9fa;
  border: 2px solid #e9ecef;
  color: #6c757d;
  font-weight: 500;
  padding: 0.75rem 1rem;
  border-radius: 12px 12px 0 0;
  transition: all 0.3s ease;
  margin-right: 2px;
}

#loginTabs .nav-link:hover {
  background-color: #ea783b;
  border-color: #ea783b;
  color: white;
  transform: translateY(-2px);
}

#loginTabs .nav-link.active {
  background-color: #ea783b;
  border-color: #ea783b;
  color: white;
  box-shadow: 0 -4px 12px rgba(234, 120, 59, 0.2);
}

#loginTabs .nav-link i {
  font-size: 1rem;
  transition: all 0.3s ease;
}

#loginTabs .nav-link:hover i {
  transform: scale(1.1);
}

.tab-content {
  background: #ffffff;
  border-radius: 0 12px 12px 12px;
  padding: 2rem;
  border: 2px solid #e9ecef;
  border-top: none;
  min-height: 320px;
}

.tab-pane {
  width: 100%;
}

/* Layout para aba com 2 cards - FORÇADO LADO A LADO EM TODOS OS DISPOSITIVOS */
#matricula .row {
  min-height: 280px;
  align-items: stretch;
  gap: 1.5rem;
  display: flex;
  flex-wrap: nowrap; /* Impede empilhamento */
}

#matricula .col-md-6 {
  display: flex;
  flex: 1; /* Força igualdade de largura */
  min-width: 45%; /* Evita cards muito estreitos */
  max-width: 50%; /* Evita cards muito largos */
}

.tab-pane .login-option {
  width: 100%;
  margin-bottom: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Para aba com card único */
#google .tab-content-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}

#google .login-option {
  max-width: 400px;
}

/* Media Queries adicionais para layout lado a lado */
@media (min-width: 1200px) {
  #matricula .row {
    gap: 2rem; /* Mais espaço em telas grandes */
  }
}

@media (min-width: 992px) and (max-width: 1199px) {
  #matricula .row {
    gap: 1.5rem; /* Espaço médio para tablets grandes */
  }
}

/* AJUSTE DE RESPONSIVIDADE TELA DE LOGIN */
@media (max-width: 768px) {
  .login-container {
    width: 95%;
    padding: 8px;
    max-height: 90vh;
    overflow-y: auto;
  }

  .login-card {
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  }

  .login-header {
    padding: 1rem;
  }

  .login-header img {
    width: 50px;
    height: 50px;
    margin-bottom: 0.5rem;
  }

  .login-header h1 {
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
  }

  .login-header p {
    font-size: 0.85rem;
    display: none;
  }

  .login-body {
    padding: 1rem;
  }

  #loginTabs .nav-link {
    font-size: 0.8rem;
    padding: 0.5rem 0.6rem;
    border-radius: 8px 8px 0 0;
  }

  #loginTabs .nav-link i {
    font-size: 0.8rem;
  }

  .tab-content {
    padding: 1rem 0.8rem;
    min-height: 240px;
  }

  #matricula .row {
    min-height: auto;
    gap: 0.8rem;
    flex-wrap: nowrap; /* Mantém lado a lado */
  }

  #matricula .col-md-6 {
    flex: 1;
    min-width: 45%;
    max-width: 50%;
  }

  .login-option {
    padding: 1rem 0.8rem;
  }

  .login-option i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
  }

  .login-option h3 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
  }

  .login-option p {
    font-size: 0.8rem;
    margin-bottom: 0.8rem;
    line-height: 1.3;
  }

  .login-option .btn {
    padding: 0.6rem;
    font-size: 0.85rem;
  }

  #google .login-option {
    max-width: 100%;
  }

  .text-center.mt-4 {
    margin-top: 1rem !important;
  }

  .text-center.mt-4 small {
    font-size: 0.75rem;
  }
}

/* Para telas muito pequenas (menos de 480px) */
@media (max-width: 480px) {
  .login-container {
    width: 98%;
    padding: 5px;
    max-height: 95vh;
  }

  .login-header {
    padding: 0.8rem;
  }

  .login-header img {
    width: 40px;
    height: 40px;
    margin-bottom: 0.3rem;
  }

  .login-header h1 {
    font-size: 1rem;
    margin-bottom: 0.1rem;
  }

  .login-body {
    padding: 0.8rem;
  }

  #loginTabs .nav-link {
    font-size: 0.75rem;
    padding: 0.4rem 0.5rem;
  }

  #loginTabs .nav-link i {
    font-size: 0.75rem;
  }

  .tab-content {
    padding: 0.8rem 0.6rem;
    min-height: 200px;
  }

  #matricula .row {
    gap: 0.6rem;
    flex-wrap: nowrap; /* Mantém lado a lado mesmo em telas muito pequenas */
  }

  #matricula .col-md-6 {
    flex: 1;
    min-width: 45%;
    max-width: 50%;
  }

  .login-option {
    padding: 0.8rem 0.6rem;
  }

  .login-option i {
    font-size: 1.8rem;
    margin-bottom: 0.4rem;
  }

  .login-option h3 {
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
  }

  .login-option p {
    font-size: 0.75rem;
    margin-bottom: 0.6rem;
  }

  .login-option .btn {
    padding: 0.5rem;
    font-size: 0.8rem;
  }

  .text-center.mt-4 {
    margin-top: 0.8rem !important;
  }

  .text-center.mt-4 small {
    font-size: 0.7rem;
  }

  .login-form {
    padding: 1.2rem;
    margin-top: 1rem;
  }

  .login-card {
    border-radius: 16px;
  }
}

@media (max-width: 480px) {
  .login-container {
    width: 98%;
    padding: 8px;
  }

  .login-header {
    padding: 1rem 0.8rem;
  }

  .login-header h1 {
    font-size: 1.3rem;
  }

  .login-header img {
    width: 55px;
    height: 55px;
  }

  .login-body {
    padding: 1.2rem 0.8rem 0.8rem 0.8rem;
  }

  .login-option {
    padding: 1.3rem 1rem;
  }

  .login-option i {
    font-size: 2.2rem;
  }

  .login-option h3 {
    font-size: 1.1rem;
  }
}


/* Impedir seleção de texto e comportamento de input */
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  cursor: default;
}

/* Garantir que todos os elementos herdem essa propriedade */
* {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* ==================== NAVEGAÇÃO MENSAL ==================== */

.month-display h5 {
  color: #2c3e50;
  font-weight: 600;
  white-space: nowrap;
}

.month-stats .badge {
  padding: 0.6rem 1rem;
  border-radius: 20px;
}

/* Responsividade */
@media (max-width: 768px) {
  .month-display h5 {
    font-size: 0.9rem;
    margin: 0 0.5rem !important;
  }

  .month-stats .badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
  }

  .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }
}

/*------------FIM DO ARQUIVO------------*/

/* Botão Adicionar Agendamento - Tamanho reduzido */
#adicionar-agendamento {
    padding: 0.375rem 0.75rem !important;
    font-size: 0.875rem !important;
    line-height: 1.4 !important;
    min-height: auto !important;
    height: auto !important;
}

#adicionar-agendamento.btn-sm {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.8rem !important;
    line-height: 1.3 !important;
}

/* Responsividade para o botão */
@media (max-width: 768px) {
    #adicionar-agendamento {
        padding: 0.25rem 0.6rem !important;
        font-size: 0.8rem !important;
    }

    #adicionar-agendamento.btn-sm {
        padding: 0.2rem 0.4rem !important;
        font-size: 0.75rem !important;
    }
}

/* ==================== FILTRO AVANÇADO ==================== */

/* Modal de filtro avançado */
#modalFiltroAvancado .form-check-input:checked {
  background-color: #ea783b;
  border-color: #ea783b;
}

#modalFiltroAvancado .form-check-label {
  cursor: pointer;
  user-select: none;
}

#modalFiltroAvancado .form-check {
  padding: 0.5rem;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

#modalFiltroAvancado .form-check:hover {
  background-color: rgba(234, 120, 59, 0.05);
}

/* Indicador de filtro ativo */
#filtroAtivoIndicador {
  border-left: 4px solid #ea783b;
  animation: fadeIn 0.3s ease;
}

/* Animação para o badge do botão */
.btn-primary .badge.bg-light {
  animation: pulse 1.5s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }
}

/* Botão de filtro avançado ativo */
.btn-primary[data-bs-target="#modalFiltroAvancado"] {
  box-shadow: 0 0 0 0.2rem rgba(234, 120, 59, 0.25);
  position: relative;
}

/* Ajustes responsivos para o filtro avançado */
@media (max-width: 768px) {
  #modalFiltroAvancado .modal-dialog {
    margin: 0.5rem;
  }

  #modalFiltroAvancado .modal-body {
    padding: 1rem;
  }

  .btn-outline-primary.btn-sm {
    font-size: 0.75rem;
    padding: 0.35rem 0.6rem;
  }
}

/* ========================================================
   SISTEMA DE BOTÕES DE LOGIN - COR PADRÃO LARANJA #ea783b
   ======================================================== */

/* Botões primários de login com alta especificidade */
.login-container .login-btn-primary,
.modal-footer .login-btn-primary,
.login-option .login-btn-primary {
  background-color: #ea783b;
  border-color: #ea783b;
  color: white;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Estado Hover - Laranja mais escuro */
.login-container .login-btn-primary:hover,
.modal-footer .login-btn-primary:hover,
.login-option .login-btn-primary:hover {
  background-color: #d97423;
  border-color: #d97423;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Estado Focus - Com sombra laranja */
.login-container .login-btn-primary:focus,
.modal-footer .login-btn-primary:focus,
.login-option .login-btn-primary:focus {
  background-color: #ea783b;
  border-color: #ea783b;
  color: white;
  box-shadow: 0 0 0 0.2rem rgba(234, 120, 59, 0.5), 0 2px 4px rgba(0, 0, 0, 0.1);
  outline: none;
}

/* Estado Active - Laranja mais escuro e pressionado */
.login-container .login-btn-primary:active,
.modal-footer .login-btn-primary:active,
.login-option .login-btn-primary:active {
  background-color: #d97423;
  border-color: #d97423;
  color: white;
  transform: translateY(1px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Estado Disabled - Cinza claro */
.login-container .login-btn-primary:disabled,
.modal-footer .login-btn-primary:disabled,
.login-option .login-btn-primary:disabled {
  background-color: #6c757d;
  border-color: #6c757d;
  color: rgba(255, 255, 255, 0.7);
  transform: none;
  box-shadow: none;
  cursor: not-allowed;
}

/* ========================================================
   VARIAÇÕES ESPECÍFICAS DOS BOTÕES
   ======================================================== */

/* Botões Google - Manter compatibilidade com classes antigas */
.login-container .login-btn-google,
.modal-footer .login-btn-google,
.login-option .login-btn-google,
.google-login-btn,
#google-auth-btn {
  background-color: #ea783b;
  border-color: #ea783b;
  color: white;
}

.login-container .login-btn-google:hover,
.modal-footer .login-btn-google:hover,
.login-option .login-btn-google:hover,
.google-login-btn:hover,
#google-auth-btn:hover {
  background-color: #d97423;
  border-color: #d97423;
  color: white;
}

.login-container .login-btn-google:focus,
.modal-footer .login-btn-google:focus,
.login-option .login-btn-google:focus,
.google-login-btn:focus,
#google-auth-btn:focus {
  background-color: #ea783b;
  border-color: #ea783b;
  color: white;
  box-shadow: 0 0 0 0.2rem rgba(234, 120, 59, 0.5);
}

.login-container .login-btn-google:active,
.modal-footer .login-btn-google:active,
.login-option .login-btn-google:active,
.google-login-btn:active,
#google-auth-btn:active {
  background-color: #d97423;
  border-color: #d97423;
  color: white;
  transform: translateY(1px);
}

/* Botões Professor - Estilo consistente */
.login-container .login-btn-professor,
.modal-footer .login-btn-professor,
.login-option .login-btn-professor {
  background-color: #ea783b;
  border-color: #ea783b;
  color: white;
}

/* Botões Admin - Estilo consistente */
.login-container .login-btn-admin,
.modal-footer .login-btn-admin,
.login-option .login-btn-admin {
  background-color: #ea783b;
  border-color: #ea783b;
  color: white;
}

/* ========================================================
   MEDIA QUERIES - RESPONSIVIDADE
   ======================================================== */

/* Dispositivos móveis */
@media (max-width: 768px) {
  .login-container .login-btn-primary,
  .modal-footer .login-btn-primary,
  .login-option .login-btn-primary {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
  }
}

/* Dispositivos muito pequenos */
@media (max-width: 480px) {
  .login-container .login-btn-primary,
  .modal-footer .login-btn-primary,
  .login-option .login-btn-primary {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
  }
}

/* TELA DE REGISTRO GOOGLE*/

.register-name {
  color: #2c3e50;
}

/* ---------- ESTILOS PARA CONFLITOS DE AGENDAMENTOS ---------- */
.agendamento-conflito {
    border: 2px solid #dc3545 !important;
    background-color: #f8d7da !important;
    box-shadow: 0 0 15px rgba(220, 53, 69, 0.3) !important;
    animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
    0% {
        border-color: #dc3545;
        box-shadow: 0 0 15px rgba(220, 53, 69, 0.3);
    }
    50% {
        border-color: #a02622;
        box-shadow: 0 0 25px rgba(220, 53, 69, 0.5);
    }
    100% {
        border-color: #dc3545;
        box-shadow: 0 0 15px rgba(220, 53, 69, 0.3);
    }
}

.conflito-message {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    animation: fadeIn 0.3s ease-in-out;
}

.conflito-message i {
    color: #dc3545;
    font-size: 1.1rem;
    margin-right: 8px;
    flex-shrink: 0;
}

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

.agendamento-conflito .form-control:focus,
.agendamento-conflito .form-select:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.agendamento-conflito .disponibilidade-info {
    background-color: #f8d7da !important;
    border: 1px solid #dc3545 !important;
    color: #721c24 !important;
}

/* ---------- ESTILOS PARA BOTÃO DE ENVIO DESABILITADO POR CONFLITO ---------- */
#submitBtn:disabled {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    cursor: not-allowed;
    animation: pulse-disabled 1.5s infinite;
}

@keyframes pulse-disabled {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        opacity: 1;
    }
}

/* ---------- INDICADORES VISUAIS ADICIONAIS ---------- */
.agendamento-item {
    transition: all 0.3s ease;
}

.agendamento-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.conflito-indicator {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    z-index: 1000;
    animation: bounce-in 0.5s ease-out;
}

@keyframes bounce-in {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ---------- OTIMIZAÇÕES MOBILE PARA FORMULÁRIO ---------- */

/* Touch targets otimizados para mobile */
@media (max-width: 767.98px) {
    /* Inputs e selects com altura mínima de 44px para touch */
    .form-control,
    .form-select {
        min-height: 44px;
        padding: 12px;
        font-size: 16px; /* Evita zoom no iOS */
        line-height: 1.5;
    }

    /* Labels com espaçamento adequado */
    .form-label {
        margin-bottom: 6px;
        font-weight: 600;
        font-size: 14px;
        color: #495057;
    }

    /* Container de agendamento com espaçamento otimizado */
    .agendamento-item {
        padding: 16px;
        margin-bottom: 16px;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        background: #ffffff;
    }

    /* Título do agendamento destacado */
    .agendamento-item h6 {
        font-size: 16px;
        font-weight: 600;
        color: #ea783b;
        margin-bottom: 12px;
    }

    /* Botões de remover agendamento otimizados para touch */
    .remover-agendamento {
        min-width: 44px;
        min-height: 44px;
        border-radius: 6px;
        font-size: 14px;
    }

    /* Linhas do formulário com gap consistente */
    .row {
        gap: 12px;
    }

    /* Colunas sem margin-bottom negativo */
    .col-6:not(:last-child),
    .col-8:not(:last-child),
    .col-4:not(:last-child) {
        margin-bottom: 12px;
    }

    /* Botões principais com espaçamento adequado */
    .btn {
        min-height: 44px;
        padding: 12px 20px;
        font-size: 16px;
        border-radius: 6px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Seção de disponibilidade otimizada */
    .disponibilidade-info {
        padding: 12px;
        border-radius: 6px;
        font-size: 14px;
        line-height: 1.4;
        min-height: 44px;
        display: flex;
        align-items: center;
        background: #f8f9fa;
        border: 1px solid #dee2e6;
    }

    .disponibilidade-info.checking {
        color: #6c757d;
    }

    .disponibilidade-info i {
        margin-right: 6px;
        font-size: 14px;
    }
}

/* Tablets e landscape mobile */
@media (min-width: 768px) and (max-width: 991.98px) {
    .form-control,
    .form-select {
        min-height: 48px;
        padding: 12px;
    }

    .agendamento-item {
        padding: 20px;
    }
}

/* Melhorias adicionais para mobile */
@media (max-width: 576px) {
    /* Cards com padding reduzido em telas muito pequenas */
    .card-body {
        padding: 16px;
    }

    /* Header do card com espaçamento otimizado */
    .card-header {
        padding: 12px 16px;
    }

    /* Alinhamento dos campos Professor/Data em telas pequenas */
    .row.align-items-center .col-8,
    .row.align-items-center .col-4 {
        margin-bottom: 12px;
    }

    /* Botões com largura total em telas muito pequenas */
    .d-flex.justify-content-end .btn {
        flex: 1;
        margin-bottom: 8px;
    }

    .d-flex.justify-content-end .btn:not(:last-child) {
        margin-right: 8px;
    }
}

/* Focus states otimizados para acessibilidade mobile */
.form-control:focus,
.form-select:focus {
    border-color: #ea783b;
    box-shadow: 0 0 0 0.2rem rgba(234, 120, 59, 0.25);
    outline: none;
}

/* Estados hover e active otimizados para touch */
.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: #ea783b;
    border-color: #ea783b;
}

.btn-primary:hover,
.btn-primary:focus {
    background: #d9672b;
    border-color: #d9672b;
}

/* Animações sutis para feedback visual em mobile */
.form-control,
.form-select {
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

/* Esconde margin-bottom duplicado em rows com gap */
.row.gap-12 {
    gap: 12px;
}

.row.gap-12 > [class*="col-"] {
    padding-left: 0;
    padding-right: 0;
}

/* ---------- OVERRIDE PARA MANTER LADO A LADO EM TELAS MENORES (< 768px) ---------- */

/* Classes para forçar layout lado a lado */
.force-no-wrap {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

.force-no-wrap > [class*="col-"] {
    flex-shrink: 0 !important;
    min-width: 0 !important;
}

/* Breakpoint para tablets e smartphones médios (480px - 767px) */
@media (max-width: 767px) and (min-width: 480px) {
    .force-no-wrap.professor-data .col-8 {
        flex: 0 0 65% !important;
        max-width: 65% !important;
    }

    .force-no-wrap.professor-data .col-4 {
        flex: 0 0 30% !important;
        max-width: 30% !important;
    }

    .force-no-wrap .col-6 {
        flex: 0 0 48% !important;
        max-width: 48% !important;
        margin-right: 2% !important;
    }

    .force-no-wrap .col-6:last-child {
        margin-right: 0 !important;
    }
}

/* Breakpoint para smartphones pequenos (< 480px) - Moto G35 e similares */
@media (max-width: 479px) {
    .force-no-wrap.professor-data .col-8 {
        flex: 0 0 60% !important;
        max-width: 60% !important;
        min-width: 180px !important;
    }

    .force-no-wrap.professor-data .col-4 {
        flex: 0 0 35% !important;
        max-width: 35% !important;
        min-width: 100px !important;
    }

    .force-no-wrap .col-6 {
        flex: 0 0 46% !important;
        max-width: 46% !important;
        margin-right: 4% !important;
    }

    .force-no-wrap .col-6:last-child {
        margin-right: 0 !important;
    }

    /* Reduzir font sizes em telas muito pequenas */
    .form-label {
        font-size: 12px !important;
    }

    .form-control,
    .form-select {
        font-size: 14px !important;
        padding: 10px 8px !important;
    }

    /* Ajustar padding em telas muito pequenas */
    .agendamento-item {
        padding: 12px !important;
    }

    .card-body {
        padding: 12px !important;
    }
}

/* Breakpoint para smartphones ultra-pequenos (< 360px) */
@media (max-width: 359px) {
    .force-no-wrap.professor-data .col-8 {
        flex: 0 0 55% !important;
        max-width: 55% !important;
        min-width: 160px !important;
    }

    .force-no-wrap.professor-data .col-4 {
        flex: 0 0 40% !important;
        max-width: 40% !important;
        min-width: 90px !important;
    }

    .force-no-wrap .col-6 {
        flex: 0 0 47% !important;
        max-width: 47% !important;
        margin-right: 3% !important;
    }

    .force-no-wrap .col-6:last-child {
        margin-right: 0 !important;
    }

    /* Font sizes ainda menores para telas ultra-pequenas */
    .form-label {
        font-size: 11px !important;
    }

    .form-control,
    .form-select {
        font-size: 13px !important;
        padding: 8px 6px !important;
        min-height: 40px !important;
    }

    /* Reduzir espaçamentos */
    .mb-3 {
        margin-bottom: 8px !important;
    }

    .agendamento-item {
        padding: 8px !important;
        margin-bottom: 12px !important;
    }
}

/* Garantir que o scroll horizontal funcione bem */
.force-no-wrap {
    scrollbar-width: thin !important;
    scrollbar-color: #dee2e6 transparent !important;
}

.force-no-wrap::-webkit-scrollbar {
    height: 4px !important;
}

.force-no-wrap::-webkit-scrollbar-track {
    background: transparent !important;
}

.force-no-wrap::-webkit-scrollbar-thumb {
    background-color: #dee2e6 !important;
    border-radius: 2px !important;
}

.force-no-wrap::-webkit-scrollbar-thumb:hover {
    background-color: #adb5bd !important;
}

/* Manter funcionalidade do agendamento-container */
#agendamentos-container .force-no-wrap {
    margin-bottom: 16px;
}

/* Ajustes específicos para a seção de disponibilidade */
@media (max-width: 479px) {
    .disponibilidade-info {
        font-size: 12px !important;
        padding: 8px !important;
        min-height: 40px !important;
    }

    .disponibilidade-info i {
        font-size: 12px !important;
        margin-right: 4px !important;
    }
}

/* ========== ESTILOS DE VALIDAÇÃO MELHORADA ========== */

/* Estilo para agendamentos com erro */
.agendamento-item {
    transition: all 0.3s ease;
    position: relative;
}

.agendamento-item.agendamento-invalido {
    border-color: #dc3545 !important;
    border-width: 2px;
    background-color: #fff5f5;
    box-shadow: 0 0 15px rgba(220, 53, 69, 0.1);
}

.agendamento-item.agendamento-invalido::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 1px solid #dc3545;
    border-radius: 0.375rem;
    pointer-events: none;
    z-index: 1;
}

/* Animação de shake para erros */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.agendamento-item.agendamento-invalido {
    animation: shake 0.5s ease-in-out;
}

/* Títulos com erro */
.agendamento-item.agendamento-invalido h6 {
    color: #dc3545 !important;
    font-weight: 600;
}

.agendamento-item.agendamento-invalido h6 .fa-exclamation-triangle {
    color: #dc3545;
    animation: pulse 2s infinite;
}

/* Animação de pulse para ícone de erro */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Estilos para campos com validação */
.agendamento-item .form-control.is-invalid,
.agendamento-item .form-select.is-invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
    padding-right: calc(1.5em + 0.75rem);
    box-shadow: 0 0 8px rgba(220, 53, 69, 0.25);
}

.agendamento-item .form-control.is-valid,
.agendamento-item .form-select.is-valid {
    border-color: #198754;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73.676.678a.5.5 0 0 0 .707.707l1.5-1.5a.5.5 0 0 0 0-.707L3.793 5l1.147-1.146a.5.5 0 0 0-.707-.708L3 4.793 2.146 3.646a.5.5 0 0 0-.708.708L2.293 5 1.146 6.146a.5.5 0 0 0 .707.707L3 5.207l1.146 1.147a.5.5 0 0 0 .707-.707L3.207 5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
    padding-right: calc(1.5em + 0.75rem);
}

/* Foco em campos inválidos */
.agendamento-item .form-control.is-invalid:focus,
.agendamento-item .form-select.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

/* Alertas de erro dentro de agendamentos */
.erros-agendamento {
    border-radius: 0.5rem;
    border-left: 4px solid #dc3545;
    background: linear-gradient(135deg, #fff5f5 0%, #fee 100%);
    animation: slideInDown 0.3s ease-out;
}

.erros-agendamento .mb-0 {
    margin-bottom: 0 !important;
}

.erros-agendamento .mt-1 {
    margin-top: 0.5rem !important;
}

.erros-agendamento ul {
    padding-left: 1.2rem;
    margin: 0;
}

.erros-agendamento li {
    color: #721c24;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 0.25rem;
}

.erros-agendamento li:last-child {
    margin-bottom: 0;
}

/* Animação de slide-in-down */
@keyframes slideInDown {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Estados de disponibilidade melhorados */
.availability-info {
    font-weight: 500;
    border-radius: 0.5rem;
    padding: 0.75rem;
    transition: all 0.3s ease;
    border: 1px solid;
    position: relative;
    overflow: hidden;
}

.availability-info.checking {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-color: #2196f3;
    color: #1565c0;
}

.availability-info.available {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    border-color: #4caf50;
    color: #2e7d32;
}

.availability-info.unavailable {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border-color: #f44336;
    color: #c62828;
}

/* Animação de spinner para verificação */
.availability-info .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #2196f3;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 8px;
}

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

/* Efeito hover para melhor feedback */
.agendamento-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.agendamento-item.agendamento-invalido:hover {
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.15);
}

/* Melhorias em dispositivos móveis */
@media (max-width: 768px) {
    .agendamento-item {
        padding: 1rem !important;
    }

    .erros-agendamento {
        font-size: 0.85rem;
        padding: 0.75rem;
    }

    .erros-agendamento li {
        font-size: 0.8rem;
    }

    .availability-info {
        font-size: 0.85rem;
        padding: 0.6rem;
    }

    .availability-info i {
        font-size: 0.9rem;
    }
}

/* Suporte para modo de alto contraste */
@media (prefers-contrast: high) {
    .agendamento-item.agendamento-invalido {
        border-width: 3px;
    }

    .availability-info {
        border-width: 2px;
    }

    .erros-agendamento {
        border-left-width: 6px;
    }
}

/* Suporte para movimento reduzido */
@media (prefers-reduced-motion: reduce) {
    .agendamento-item,
    .availability-info,
    .erros-agendamento {
        animation: none;
        transition: none;
    }

    .agendamento-item.agendamento-invalido {
        animation: none;
    }
}

