/* Revenue Dashboard - Custom Styles */

/* Smooth transitions */
.expand-btn svg {
  transition: transform 0.2s ease;
}

.detail-row {
  animation: slideDown 0.2s ease;
}

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

/* Table row hover effects */
tbody tr:not(.detail-row):hover td {
  background-color: rgba(249, 250, 251, 0.8);
}

/* Sort indicators */
th[data-sort] {
  position: relative;
  user-select: none;
}

th[data-sort]::after {
  content: '';
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  opacity: 0.3;
}

th[data-sort]:hover::after {
  border-top: 4px solid currentColor;
  opacity: 0.6;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}

/* Loading spinner */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Card hover effects */
.bg-white.rounded-lg.shadow {
  transition: box-shadow 0.2s ease;
}

.bg-white.rounded-lg.shadow:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Badge/chip styling */
.inline-flex.items-center.px-2.py-0\\.5.rounded {
  transition: all 0.15s ease;
}

/* Modal transitions */
#ticketModal {
  transition: opacity 0.2s ease;
}

#ticketModal > div {
  transition: transform 0.2s ease;
}

/* Filter dropdowns */
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
}

/* Search input styling */
input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  height: 1em;
  width: 1em;
  border-radius: 50%;
  background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3e%3cpath d='M6 18L18 6M6 6l12 12'/%3e%3c/svg%3e") no-repeat center center;
  background-size: contain;
  cursor: pointer;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .max-w-7xl {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  table {
    font-size: 0.875rem;
  }

  th, td {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

/* Print styles */
@media print {
  header,
  #refreshBtn,
  #logoutBtn,
  .bg-white.rounded-lg.shadow.p-4.mb-6 {
    display: none !important;
  }

  body {
    background: white;
  }

  .shadow {
    box-shadow: none !important;
    border: 1px solid #e5e7eb;
  }
}

/* Age category colors */
.text-green-600 {
  color: #059669;
}

.text-yellow-600 {
  color: #d97706;
}

.text-red-600 {
  color: #dc2626;
}

/* Empty state styling */
#emptyState {
  background: linear-gradient(to bottom, #f9fafb, #ffffff);
}
