
/* Admin Panel Styles */

/* Animation for toast notification */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Skeleton loader styles */
.skeleton-loader {
  display: block;
}

.skeleton-row {
  height: 20px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4px;
  margin-bottom: 12px;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Table responsive improvements */
@media (max-width: 768px) {
  .admin-panel table {
    font-size: 0.875rem;
  }
  
  .admin-panel th,
  .admin-panel td {
    padding: 0.5rem;
  }
}

/* Button hover effects */
button:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

button:not(:disabled):active {
  transform: translateY(0);
}

/* Smooth transitions */
* {
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

/* Error banner styling */
.error-banner {
  background-color: #FEE2E2;
  border: 1px solid #FCA5A5;
  border-radius: 0.375rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.error-banner p {
  color: #DC2626;
  font-size: 0.875rem;
  margin: 0;
}

/* Success banner styling */
.success-banner {
  background-color: #D1FAE5;
  border: 1px solid #6EE7B7;
  border-radius: 0.375rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.success-banner p {
  color: #059669;
  font-size: 0.875rem;
  margin: 0;
}

/* Table cell truncation */
.truncate-cell {
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Pagination styling */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #E5E7EB;
}

.pagination-info {
  font-size: 0.875rem;
  color: #374151;
}

.pagination-controls {
  display: flex;
  gap: 0.5rem;
}

/* Loading spinner */
.spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Logout Button Styles */
.logout-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.logout-button:hover {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.logout-button:active {
  transform: translateY(0);
}

/* Logout Modal Styles */
.logout-modal {
  animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Modal Backdrop */
.fixed.inset-0.bg-black {
  animation: backdropFadeIn 0.2s ease-out;
}

@keyframes backdropFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Responsive Logout Button */
@media (max-width: 640px) {
  .logout-button {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }
  
  .logout-button i {
    font-size: 0.875rem;
  }
}

/* Notification Access Admin Styles */
.admin-panel-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 15px;
  flex-wrap: wrap;
}

.admin-search-filters {
  display: flex;
  gap: 10px;
  flex: 1;
  min-width: 300px;
}

.admin-search-input {
  flex: 1;
  min-width: 200px;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
}

.admin-filter-select {
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
  background: white;
  cursor: pointer;
}

.admin-table-container {
  overflow-x: auto;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.admin-table thead {
  background: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.admin-table th {
  padding: 15px;
  text-align: left;
  font-weight: 600;
  color: #495057;
  font-size: 14px;
}

.admin-table td {
  padding: 15px;
  border-bottom: 1px solid #dee2e6;
  font-size: 14px;
  color: #212529;
}

.admin-table tbody tr:hover {
  background: #f8f9fa;
}

.admin-notes-cell {
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  background: #e9ecef;
  color: #495057;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
}

.admin-status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.admin-status-badge.status-allow {
  background: #d4edda;
  color: #155724;
}

.admin-status-badge.status-deny {
  background: #f8d7da;
  color: #721c24;
}

.admin-action-buttons {
  display: flex;
  gap: 8px;
}

.admin-btn-icon {
  padding: 8px 12px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
  background: transparent;
}

.admin-btn-edit {
  color: #007bff;
}

.admin-btn-edit:hover {
  background: #e7f3ff;
}

.admin-btn-delete {
  color: #dc3545;
}

.admin-btn-delete:hover {
  background: #ffe6e8;
}

.admin-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
  padding: 20px;
  background: white;
  border-radius: 8px;
}

.admin-pagination-btn {
  padding: 8px 16px;
  border: 1px solid #007bff;
  background: white;
  color: #007bff;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

.admin-pagination-btn:hover:not(:disabled) {
  background: #007bff;
  color: white;
}

.admin-pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.admin-pagination-info {
  font-size: 14px;
  color: #495057;
}

.admin-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 20px;
}

.admin-modal {
  background: white;
  border-radius: 8px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.admin-modal-small {
  max-width: 400px;
}

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

.admin-modal-header h2 {
  margin: 0;
  font-size: 20px;
  color: #212529;
}

.admin-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #6c757d;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.admin-modal-close:hover {
  background: #f8f9fa;
  color: #212529;
}

.admin-modal-form {
  padding: 20px;
}

.admin-modal-content {
  padding: 20px;
}

.admin-form-group {
  margin-bottom: 20px;
}

.admin-form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #495057;
  font-size: 14px;
}

.admin-form-group input[type="text"],
.admin-form-group input[type="email"],
.admin-form-group select,
.admin-form-group textarea {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid #ced4da;
  border-radius: 5px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.admin-form-group input:focus,
.admin-form-group select:focus,
.admin-form-group textarea:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.admin-form-group input.error,
.admin-form-group select.error {
  border-color: #dc3545;
}

.admin-form-error {
  display: block;
  margin-top: 5px;
  color: #dc3545;
  font-size: 12px;
}

.admin-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: normal !important;
}

.admin-checkbox-label input[type="checkbox"] {
  width: auto;
  cursor: pointer;
}

.admin-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px;
  border-top: 1px solid #dee2e6;
}

.admin-btn-danger {
  padding: 10px 20px;
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
}

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

.admin-delete-details {
  margin-top: 15px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 5px;
  border-left: 3px solid #dc3545;
}

.admin-delete-details p {
  margin: 5px 0;
  font-size: 14px;
  color: #495057;
}

.admin-loading {
  text-align: center;
  padding: 40px;
  font-size: 16px;
  color: #6c757d;
}

.admin-error-message {
  background: #f8d7da;
  color: #721c24;
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 20px;
  border-left: 4px solid #dc3545;
}

/* Responsive styles */
@media (max-width: 768px) {
  .admin-panel-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .admin-search-filters {
    flex-direction: column;
    width: 100%;
  }
  
  .admin-search-input {
    width: 100%;
  }
  
  .admin-table {
    font-size: 12px;
  }
  
  .admin-table th,
  .admin-table td {
    padding: 10px;
  }
  
  .admin-modal {
    max-width: 100%;
    margin: 10px;
  }
}
