/* ================================================
   E-STERILIZE - INSPEÇÕES REFATORADAS
   Design moderno e responsivo para página de inspeções
   ================================================ */

/* Variáveis de Cores */
:root {
  --insp-bg-body: #f8f9fa;
  --insp-bg-card: #ffffff;
  --insp-shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
  --insp-shadow-md: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.15);
  --insp-shadow-lg: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  --insp-border-radius: 0.375rem;
  --insp-transition: all 0.2s ease;
}

/* Container Principal */
.e-sterilize-inspecoes-refactored {
  background-color: var(--insp-bg-body);
  min-height: 100vh;
}

/* Container com padding lateral para desktop */
.e-sterilize-inspecoes-refactored > div {
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Margem lateral em telas maiores */
@media (min-width: 768px) {
  .e-sterilize-inspecoes-refactored > div {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

@media (min-width: 992px) {
  .e-sterilize-inspecoes-refactored > div {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

@media (min-width: 1200px) {
  .e-sterilize-inspecoes-refactored > div {
    max-width: 1600px;
  }
}

/* Header Sticky */
.e-sterilize-inspecoes-refactored .insp-header {
  background-color: var(--insp-bg-card);
  box-shadow: var(--insp-shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 1rem;
}

.e-sterilize-inspecoes-refactored .insp-header__title {
  font-size: 1.25rem;
  margin: 0;
  font-weight: 600;
}

/* Alertas de Inspeções Expiradas */
.e-sterilize-inspecoes-refactored .expired-alerts {
  background-color: #fff5f5;
  border-bottom: 2px solid #dc3545;
}

.e-sterilize-inspecoes-refactored .expired-alerts .alert {
  margin-bottom: 0;
}

/* Botões de Ação */
.e-sterilize-inspecoes-refactored .insp-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.e-sterilize-inspecoes-refactored .insp-actions .btn {
  font-size: 0.875rem;
  padding: 0.375rem 0.75rem;
}

/* Filtro de Unidades */
.e-sterilize-inspecoes-refactored .insp-filter {
  margin-bottom: 1rem;
}

.e-sterilize-inspecoes-refactored .insp-filter .form-label {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

/* Cards de Inspeção */
.e-sterilize-inspecoes-refactored .card {
  transition: var(--insp-transition);
  border-radius: var(--insp-border-radius);
  border: 1px solid #dee2e6;
}

.e-sterilize-inspecoes-refactored .card:hover {
  box-shadow: var(--insp-shadow-md) !important;
  transform: translateY(-2px);
}

.e-sterilize-inspecoes-refactored .card-body {
  padding: 1rem;
}

/* Estados dos Cards */
.e-sterilize-inspecoes-refactored .card-warning {
  border-color: #ffc107;
  background-color: rgba(255, 193, 7, 0.1);
}

.e-sterilize-inspecoes-refactored .card-danger {
  border-color: #dc3545;
  background-color: rgba(220, 53, 69, 0.1);
}

.e-sterilize-inspecoes-refactored .card-active {
  border-color: #198754;
  background-color: rgba(25, 135, 84, 0.1);
}

.e-sterilize-inspecoes-refactored .card-secondary {
  border-color: #6c757d;
  background-color: rgba(108, 117, 125, 0.05);
}

/* Ícones de Informação */
.e-sterilize-inspecoes-refactored .insp-icon {
  font-size: 1.2rem;
  margin-right: 0.5rem;
  flex-shrink: 0;
}

/* Grid de Inspeções */
.e-sterilize-inspecoes-refactored .inspections-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

/* Inspeção Ativa Expandida */
.e-sterilize-inspecoes-refactored .active-inspection-sticky {
  position: sticky;
  top: 75px;
  z-index: 10;
  margin-bottom: 1rem;
}

.e-sterilize-inspecoes-refactored .active-inspection-sticky .card {
  border-width: 2px;
  box-shadow: var(--insp-shadow-lg);
}

.e-sterilize-inspecoes-refactored .active-inspection-sticky .card-header {
  background-color: #0d6efd !important;
  color: white;
  padding: 0.5rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.e-sterilize-inspecoes-refactored .active-inspection-sticky .card-header h6 {
  margin: 0;
  font-size: 1rem;
}

.e-sterilize-inspecoes-refactored .inspection-info-highlight {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: var(--insp-border-radius);
  padding: 0.75rem;
  margin-bottom: 1rem;
}

/* Botões dentro dos Cards */
.e-sterilize-inspecoes-refactored .card .btn-sm {
  font-size: 0.875rem;
  padding: 0.375rem 0.75rem;
}

/* Badges e Tags */
.e-sterilize-inspecoes-refactored .badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
}

/* Loading Spinner */
.e-sterilize-inspecoes-refactored .loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  padding: 2rem;
}

.e-sterilize-inspecoes-refactored .loading-spinner .spinner-border {
  width: 3rem;
  height: 3rem;
}

/* Timer Display */
.e-sterilize-inspecoes-refactored .timer-display {
  font-family: 'Courier New', monospace;
  font-size: 1.1rem;
  font-weight: bold;
  color: #0d6efd;
}

/* Alertas Inline */
.e-sterilize-inspecoes-refactored .alert-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

/* Divisores */
.e-sterilize-inspecoes-refactored .border-top {
  border-top: 1px solid #dee2e6 !important;
}

/* Texto Muted */
.e-sterilize-inspecoes-refactored .text-muted {
  color: #6c757d !important;
}

/* Responsividade - Mobile First */
@media (max-width: 576px) {
  .e-sterilize-inspecoes-refactored {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  
  .e-sterilize-inspecoes-refactored .insp-header {
    padding: 0.75rem;
  }
  
  .e-sterilize-inspecoes-refactored .insp-header__title {
    font-size: 1.1rem;
  }
  
  .e-sterilize-inspecoes-refactored .card-body {
    padding: 0.75rem;
  }
  
  .e-sterilize-inspecoes-refactored .insp-actions .btn {
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
  }
  
  .e-sterilize-inspecoes-refactored .active-inspection-sticky {
    top: 65px;
  }
}

/* Tablets */
@media (min-width: 768px) {
  .e-sterilize-inspecoes-refactored .inspections-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop */
@media (min-width: 992px) {
  .e-sterilize-inspecoes-refactored .inspections-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Animações */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.e-sterilize-inspecoes-refactored .card {
  animation: fadeIn 0.3s ease-in-out;
}

/* Print Styles */
@media print {
  .e-sterilize-inspecoes-refactored .insp-actions,
  .e-sterilize-inspecoes-refactored .insp-filter {
    display: none;
  }
  
  .e-sterilize-inspecoes-refactored .card {
    break-inside: avoid;
  }
}

/* Acessibilidade */
.e-sterilize-inspecoes-refactored .btn:focus,
.e-sterilize-inspecoes-refactored .form-select:focus {
  outline: 2px solid #0d6efd;
  outline-offset: 2px;
}

/* Estados de Hover */
.e-sterilize-inspecoes-refactored .btn:hover {
  transform: translateY(-1px);
  transition: var(--insp-transition);
}

.e-sterilize-inspecoes-refactored .btn:active {
  transform: translateY(0);
}

/* Mensagens Vazias */
.e-sterilize-inspecoes-refactored .empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #6c757d;
}

.e-sterilize-inspecoes-refactored .empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}
