/* Admin Custom Styles - ProActivIT V2 */

/* Global Search Overlay */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.search-overlay.active {
  opacity: 1;
}

.search-modal {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 600px;
  width: 90%;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  animation: slideDown 0.3s ease;
}

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

.search-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1.125rem;
  padding: 0.5rem;
}

.search-input::placeholder {
  color: #9ca3af;
}

.search-body {
  overflow-y: auto;
  max-height: calc(70vh - 100px);
  padding: 1rem;
}

.search-results-header {
  padding: 0.5rem 1rem;
  margin-bottom: 1rem;
}

.search-section {
  margin-bottom: 1.5rem;
}

.search-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #6b7280;
  padding: 0.5rem 1rem;
  margin-bottom: 0.5rem;
}

.search-section-items {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s ease;
}

.search-item:hover {
  background: #f3f4f6;
}

.search-item-content {
  flex: 1;
}

.search-item-title {
  font-weight: 500;
  color: #111827;
  margin-bottom: 0.25rem;
}

.search-item-subtitle {
  font-size: 0.875rem;
  color: #6b7280;
}

.search-empty {
  text-align: center;
  padding: 3rem 2rem;
  color: #9ca3af;
}

.search-empty i {
  display: block;
  margin-bottom: 1rem;
}

.search-error {
  text-align: center;
  padding: 2rem;
  color: #ef4444;
}

/* Status Badges for Monitoring */
.status-healthy {
  background-color: #10b981;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-degraded {
  background-color: #f59e0b;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-critical,
.status-down {
  background-color: #ef4444;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Counter Animation */
.counter-updated {
  animation: pulse 0.5s ease-in-out;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* Card Hover Effects */
.card {
  transition: all 0.2s ease;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* ApexCharts Customization */
.apexcharts-tooltip {
  background: rgba(255, 255, 255, 0.95) !important;
  border: 1px solid #e0e0e0 !important;
}

/* Modern Dashboard Grid */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .search-modal {
    width: 95%;
    max-height: 80vh;
  }
}

/* Loading States */
.spinner-border-sm {
  width: 1rem;
  height: 1rem;
  border-width: 0.2em;
}

/* Responsive Tables */
@media (max-width: 768px) {
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Alert Badges */
.alert-modern {
  border-radius: 8px;
  border: none;
  padding: 1rem;
}

.alert-warning {
  background: #fef3c7;
  color: #92400e;
}

.alert-error {
  background: #fee2e2;
  color: #991b1b;
}

.alert-success {
  background: #d1fae5;
  color: #065f46;
}

.alert-info {
  background: #dbeafe;
  color: #1e40af;
}

/* Card Modern Styles */
.card-modern {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  border: 1px solid #e5e7eb;
  transition: all 0.2s ease;
}

.card-modern:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

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

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.25rem;
}

.card-subtitle {
  font-size: 0.875rem;
  color: #6b7280;
}

.card-value {
  font-size: 2rem;
  font-weight: 700;
  color: #111827;
}

/* Button Modern */
.btn-modern {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-modern:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-modern.btn-primary {
  background: #696cff;
  color: white;
}

.btn-modern.btn-secondary {
  background: #f3f4f6;
  color: #374151;
}

.btn-modern.btn-ghost {
  background: transparent;
  border: 1px solid #e5e7eb;
}

/* Utility Classes */
.text-primary { color: #696cff; }
.text-secondary { color: #6b7280; }
.text-tertiary { color: #9ca3af; }
.text-success { color: #10b981; }
.text-warning { color: #f59e0b; }
.text-danger { color: #ef4444; }
.text-info { color: #3b82f6; }

.bg-primary { background-color: #696cff; }
.bg-success { background-color: #10b981; }
.bg-warning { background-color: #f59e0b; }
.bg-danger { background-color: #ef4444; }
.bg-info { background-color: #3b82f6; }

/* Pulse Animation for Real-time Indicators */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
