/* Base Styles */
body {
  background-color: #f3f4f6;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
}

/* Tab & Content Styles */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Animation Styles */
.loading {
  animation: spin 1s linear infinite;
}

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

.alert {
  animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Modal Styles */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 50;
}

.modal {
  background-color: white !important;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  max-width: 90%;
  width: 800px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid #e5e7eb;
}

.modal-body {
  padding: 1rem;
}

.modal-footer {
  padding: 1rem;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: flex-end;
}

/* Action Type Pills */
.action-pill {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.action-validation {
  background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%) !important;
  color: white !important;
}

.action-creation {
  background: linear-gradient(135deg, #c084fc 0%, #8b5cf6 100%) !important;
  color: white !important;
}

.action-update {
  background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%) !important;
  color: white !important;
}

.action-revocation {
  background: linear-gradient(135deg, #f87171 0%, #ef4444 100%) !important;
  color: white !important;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem;
  background-color: #f9fafb;
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.filter-group {
  display: flex;
  align-items: center;
}

.filter-label {
  margin-right: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #4b5563;
}

.filter-input {
  padding: 0.375rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 0.875rem;
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease-in-out;
}

.btn-primary {
  background-color: #4f46e5;
  color: white;
}

.btn-primary:hover {
  background-color: #4338ca;
}

.btn-danger {
  background-color: #ef4444;
  color: white;
}

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

.btn-secondary {
  background-color: #9ca3af;
  color: white;
}

.btn-secondary:hover {
  background-color: #6b7280;
}

/* Table Styles */
.table-responsive {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #6b7280;
  background-color: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.table td {
  padding: 0.75rem 1rem;
  vertical-align: middle;
  border-bottom: 1px solid #e5e7eb;
}

.table tbody tr:hover {
  background-color: #f9fafb;
}

/* Table Sorting */
.table-sort {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #4b5563;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.table-sort:focus {
  outline: none;
}

.table-sort .sort-icon {
  color: #9ca3af;
  font-size: 0.85rem;
}

/* JSON Formatting */
.json-data {
  font-family: monospace;
  white-space: pre-wrap;
  background-color: #f9fafb;
  padding: 1rem;
  border-radius: 0.375rem;
  border: 1px solid #e5e7eb;
}

.json-data.border-red-300 {
  border: 1px solid rgba(229, 62, 62, 0.4);
  background-color: rgba(255, 245, 245, 0.7);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #6b7280;
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: #d1d5db;
}

.empty-state-text {
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

/* Invalid License Attempt Styles */
.invalid-attempt-row {
  background-color: rgba(255, 200, 200, 0.3) !important;
  border-left: 4px solid #e53e3e !important;
}

.invalid-attempt-row:hover {
  background-color: rgba(255, 200, 200, 0.5) !important;
}

.invalid-attempt-row::before {
  display: none;
}

.invalid-key {
  color: #e53e3e;
  font-weight: 500;
}

/* Valid License Attempt Styles */
.valid-attempt-row {
  background-color: rgba(200, 255, 200, 0.3) !important;
  border-left: 4px solid #22c55e !important;
}

.valid-attempt-row:hover {
  background-color: rgba(200, 255, 200, 0.5) !important;
}

.valid-key {
  color: #16a34a;
  font-weight: 500;
}

.json-data.border-green-300 {
  border: 1px solid rgba(34, 197, 94, 0.4);
  background-color: rgba(245, 255, 245, 0.7);
}
