/* Admin Dashboard Custom Styles */

/* Base Styles */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Sidebar Navigation */
.nav-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: #9ca3af;
  text-decoration: none;
  border-radius: 0.5rem;
  transition: all 0.15s ease;
  font-weight: 500;
  gap: 0.75rem;
}

.nav-item:hover {
  background-color: #1a1f2e;
  color: #fff;
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(76, 201, 240, 0.1), rgba(67, 97, 238, 0.1));
  color: #4cc9f0;
  border-left: 3px solid #4cc9f0;
  padding-left: calc(1rem - 3px);
}

/* Stats Cards */
.stats-card {
  background-color: #121622;
  border: 1px solid #1f2937;
  border-radius: 0.75rem;
  padding: 1.5rem;
  transition: all 0.2s ease;
}

.stats-card:hover {
  border-color: #374151;
  transform: translateY(-2px);
}

/* Content Card */
.content-card {
  background-color: #121622;
  border: 1px solid #1f2937;
  border-radius: 0.75rem;
  padding: 1.5rem;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  background: linear-gradient(135deg, #4cc9f0, #4361ee);
  color: #020617;
  border: none;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(67, 97, 238, 0.25);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  background: transparent;
  color: #4cc9f0;
  border: 1px solid #4cc9f0;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-secondary:hover {
  background: rgba(76, 201, 240, 0.1);
}

/* Search Input */
.search-input {
  position: relative;
  width: 100%;
  max-width: 24rem;
}

.search-input input {
  width: 100%;
  padding: 0.625rem 1rem 0.625rem 2.5rem;
  background-color: #0b0d12;
  border: 1px solid #374151;
  border-radius: 0.5rem;
  color: #e5e7eb;
  font-size: 0.875rem;
  outline: none;
  transition: all 0.15s ease;
}

.search-input input:focus {
  border-color: #4cc9f0;
  box-shadow: 0 0 0 3px rgba(76, 201, 240, 0.1);
}

.search-input .search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.25rem;
  height: 1.25rem;
  color: #6b7280;
  pointer-events: none;
}

/* Table */
.table-container {
  overflow-x: auto;
  border-radius: 0.5rem;
  border: 1px solid #1f2937;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table thead {
  background-color: #0b0d12;
  border-bottom: 1px solid #1f2937;
}

.data-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.data-table tbody tr {
  border-bottom: 1px solid #1f2937;
  transition: background-color 0.15s ease;
}

.data-table tbody tr:hover {
  background-color: #0b0d12;
}

.data-table tbody tr:last-child {
  border-bottom: none;
}

.data-table td {
  padding: 1rem;
  color: #e5e7eb;
}

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

.pagination-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: #121622;
  border: 1px solid #374151;
  border-radius: 0.5rem;
  color: #e5e7eb;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pagination-btn:hover:not(:disabled) {
  background-color: #1a1f2e;
  border-color: #4cc9f0;
}

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

.pagination-number {
  padding: 0.5rem 0.75rem;
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: 0.375rem;
  color: #9ca3af;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pagination-number:hover {
  background-color: #1a1f2e;
  color: #e5e7eb;
}

.pagination-number.active {
  background-color: #4cc9f0;
  color: #020617;
  border-color: #4cc9f0;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 3rem;
  height: 1.75rem;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #374151;
  transition: 0.3s;
  border-radius: 1.75rem;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 1.25rem;
  width: 1.25rem;
  left: 0.25rem;
  bottom: 0.25rem;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background: linear-gradient(135deg, #4cc9f0, #4361ee);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(1.25rem);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.75);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(4px);
}

.modal-overlay.hidden {
  display: none;
}

.modal-container {
  background-color: #121622;
  border: 1px solid #1f2937;
  border-radius: 0.75rem;
  width: 100%;
  max-width: 32rem;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalSlideIn 0.2s ease;
}

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

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

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1.5rem;
  border-top: 1px solid #1f2937;
}

.modal-footer.hidden {
  display: none;
}

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

/* Loading State */
#loadingState {
  transition: opacity 0.3s ease;
}

/* Page Content */
.page-content {
  display: block;
}

.page-content.hidden {
  display: none;
}

/* Responsive */
@media (max-width: 1024px) {
  #sidebar {
    transform: translateX(-100%);
  }
  
  #sidebar.open {
    transform: translateX(0);
  }
}

/* Sidebar overlay for mobile */
@media (max-width: 1024px) {
  #sidebar.open::before {
    content: '';
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: -1;
  }
}

/* Utility Classes */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-success {
  background-color: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.badge-warning {
  background-color: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.badge-danger {
  background-color: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.badge-info {
  background-color: rgba(76, 201, 240, 0.1);
  color: #4cc9f0;
}

/* Smooth Transitions */
* {
  transition-property: color, background-color, border-color;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

/* Prevent transition on page load */
.no-transition * {
  transition: none !important;
}
