/* Admin Dashboard Styles */
.admin-dashboard {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto",
    sans-serif;
}

.admin-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 30px;
  border-radius: 12px;
  margin-bottom: 30px;
  text-align: center;
}

.admin-header h2 {
  margin: 0 0 10px 0;
  font-size: 2rem;
  font-weight: 600;
}

.admin-header i {
  margin-right: 10px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.stat-number {
  font-size: 2.5rem;
  font-weight: bold;
  color: #667eea;
  margin-bottom: 8px;
}

.stat-label {
  color: #6b7280;
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-section {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 30px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.admin-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 10px;
}

.admin-section i {
  margin-right: 8px;
  color: #667eea;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.comment-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px;
  transition: border-color 0.2s ease;
}

.comment-card:hover {
  border-color: #667eea;
}

.comment-header {
  display: flex;
  justify-content: between;
  align-items: flex-start;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 10px;
}

.comment-author {
  flex: 1;
  min-width: 200px;
}

.comment-author strong {
  color: #1f2937;
  font-weight: 600;
}

.comment-email {
  color: #6b7280;
  font-size: 0.875rem;
  margin-left: 8px;
}

.comment-date {
  color: #6b7280;
  font-size: 0.875rem;
  white-space: nowrap;
}

.comment-post {
  margin-bottom: 12px;
}

.comment-post .text-muted {
  color: #6b7280;
  font-size: 0.875rem;
  font-style: italic;
}

.comment-content {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 16px;
  line-height: 1.6;
  color: #374151;
}

.comment-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8125rem;
}

.btn-success {
  background-color: #10b981;
  color: white;
}

.btn-success:hover {
  background-color: #059669;
  transform: translateY(-1px);
}

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

.btn-danger:hover {
  background-color: #dc2626;
  transform: translateY(-1px);
}

.alert {
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-weight: 500;
}

.alert-info {
  background-color: #dbeafe;
  border: 1px solid #93c5fd;
  color: #1e40af;
}

.alert-danger {
  background-color: #fecaca;
  border: 1px solid #f87171;
  color: #dc2626;
}

.alert-success {
  background-color: #d1fae5;
  border: 1px solid #6ee7b7;
  color: #065f46;
}

.loading {
  text-align: center;
  padding: 40px;
  color: #6b7280;
  font-style: italic;
}

/* Notification styles */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 16px 24px;
  border-radius: 8px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  animation: slideIn 0.3s ease;
}

.notification-success {
  background-color: #10b981;
  color: white;
}

.notification-error {
  background-color: #ef4444;
  color: white;
}

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

/* Admin Navigation */
.admin-navigation {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 15px;
}

.nav-btn {
  padding: 12px 20px;
  border: none;
  background: transparent;
  color: #6b7280;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-btn:hover {
  background-color: #f3f4f6;
  color: #374151;
}

.nav-btn.active {
  background-color: #667eea;
  color: white;
}

.nav-btn i {
  font-size: 0.875rem;
}

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

/* Posts List */
.post-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
  transition: border-color 0.2s ease;
}

.post-card:hover {
  border-color: #667eea;
}

.post-header {
  display: flex;
  justify-content: between;
  align-items: center;
  margin-bottom: 15px;
}

.post-header h4 {
  margin: 0;
  color: #1f2937;
  font-size: 1.125rem;
}

.post-date {
  color: #6b7280;
  font-size: 0.875rem;
}

.post-details {
  margin-bottom: 15px;
}

.post-details p {
  margin: 5px 0;
  font-size: 0.875rem;
  color: #374151;
}

.post-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Users Table */
.users-table {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.table th,
.table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.table td {
  color: #1f2937;
}

.table th {
  background-color: #f9fafb;
  font-weight: 600;
  color: #374151;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.table .inactive-user {
  opacity: 0.6;
}

.role-badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.role-user {
  background-color: #dbeafe;
  color: #1e40af;
}

.role-moderator {
  background-color: #fef3c7;
  color: #92400e;
}

.role-admin {
  background-color: #fecaca;
  color: #dc2626;
}

.status-badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-badge.active {
  background-color: #d1fae5;
  color: #065f46;
}

.status-badge.inactive {
  background-color: #fee2e2;
  color: #dc2626;
}

/* Users Filters */
.users-filters {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.users-filters select,
.users-filters input {
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.875rem;
}

.users-filters input {
  flex: 1;
  min-width: 250px;
}

/* Detailed Stats */
.stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.stat-card-large {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-card-large h4 {
  margin: 0 0 20px 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #1f2937;
  display: flex;
  align-items: center;
  gap: 8px;
}

.stat-card-large i {
  color: #667eea;
}

.stat-details {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.stat-item {
  display: flex;
  justify-content: between;
  align-items: center;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: bold;
  color: #667eea;
}

.stat-desc {
  color: #6b7280;
  font-size: 0.875rem;
}

.btn-info {
  background-color: #3b82f6;
  color: white;
}

.btn-info:hover {
  background-color: #2563eb;
  transform: translateY(-1px);
}

.btn-warning {
  background-color: #f59e0b;
  color: white;
}

.btn-warning:hover {
  background-color: #d97706;
  transform: translateY(-1px);
}

/* Responsive design */
@media (max-width: 768px) {
  .admin-dashboard {
    padding: 15px;
  }

  .admin-header {
    padding: 20px;
  }

  .admin-header h2 {
    font-size: 1.5rem;
  }

  .admin-navigation {
    flex-wrap: wrap;
    gap: 5px;
  }

  .nav-btn {
    padding: 10px 15px;
    font-size: 0.875rem;
  }

  .comment-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .comment-author {
    min-width: auto;
  }

  .stat-number {
    font-size: 2rem;
  }

  .post-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .stats-cards {
    grid-template-columns: 1fr;
  }

  .users-filters {
    flex-direction: column;
  }

  .users-filters input {
    min-width: auto;
  }

  .table {
    font-size: 0.875rem;
  }

  .table th,
  .table td {
    padding: 8px 10px;
  }
}

/* Subscription Management Styles */
.subscriptions-filters {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.subscriptions-filters select,
.subscriptions-filters input {
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.875rem;
  min-width: 200px;
}

.subscriptions-filters input {
  flex: 1;
}

.subscriptions-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.subscription-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

.subscription-user strong {
  font-size: 1.1rem;
  color: #1f2937;
}

.subscription-email {
  color: #6b7280;
  font-size: 0.875rem;
  margin-left: 8px;
}

.subscription-status {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
}

.subscription-status.status-pending {
  background: #fef3c7;
  color: #92400e;
}

.subscription-status.status-active {
  background: #d1fae5;
  color: #065f46;
}

.subscription-status.status-expired {
  background: #fee2e2;
  color: #991b1b;
}

.subscription-status.status-cancelled {
  background: #f3f4f6;
  color: #4b5563;
}

.subscription-details {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 15px;
}

.subscription-info {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  color: #6b7280;
  font-size: 0.875rem;
}

.subscription-info span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.subscription-info i {
  color: #9ca3af;
}

.subscription-cities,
.subscription-notes {
  background: #f9fafb;
  padding: 10px;
  border-radius: 6px;
  font-size: 0.875rem;
  color: #4b5563;
}

.subscription-cities i,
.subscription-notes i {
  margin-right: 8px;
  color: #6b7280;
}

.subscription-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 15px;
  border-top: 1px solid #e5e7eb;
}

.subscription-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

@media (max-width: 768px) {
  .subscriptions-filters {
    flex-direction: column;
  }

  .subscriptions-filters select,
  .subscriptions-filters input {
    min-width: 100%;
  }

  .subscription-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .subscription-info {
    flex-direction: column;
    gap: 8px;
  }

  .subscription-actions {
    justify-content: stretch;
  }

  .subscription-actions .btn {
    flex: 1;
  }
}

/* Cemetery Management Styles */
#cemeteries-tab h3 {
  color: #1f2937;
  margin-bottom: 20px;
}

#cemeteries-tab .btn-primary {
  background: #059669;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  margin-bottom: 20px;
}

#cemeteries-tab .btn-primary:hover {
  background: #047857;
}

#cemeteries-tab .admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

#cemeteries-tab .admin-table thead {
  background: #f3f4f6;
}

#cemeteries-tab .admin-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #374151;
  border-bottom: 2px solid #e5e7eb;
}

#cemeteries-tab .admin-table td {
  padding: 12px;
  color: #1f2937;
  border-bottom: 1px solid #e5e7eb;
}

#cemeteries-tab .admin-table tbody tr:hover {
  background: #f9fafb;
}

#cemeteries-tab .alert-info {
  background: #e0f2fe;
  color: #075985;
  padding: 12px 16px;
  border-radius: 6px;
  margin-top: 20px;
}

#cemeteries-list {
  margin-top: 20px;
}

.cemeteries-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.cemeteries-table thead {
  background: #f3f4f6;
}

.cemeteries-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #374151;
  border-bottom: 2px solid #e5e7eb;
}

.cemeteries-table td {
  padding: 12px;
  color: #1f2937;
  border-bottom: 1px solid #e5e7eb;
}

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

.cemeteries-table .btn-edit {
  background: #3b82f6;
  color: white;
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-right: 8px;
  font-size: 0.875rem;
}

.cemeteries-table .btn-edit:hover {
  background: #2563eb;
}

.cemeteries-table .btn-delete {
  background: #ef4444;
  color: white;
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
}

.cemeteries-table .btn-delete:hover {
  background: #dc2626;
}
