/* ==================== ADMIN WRAPPER ==================== */

.admin-wrapper {
  display: flex;
  min-height: 100vh;
}

/* Admin Sidebar */
.admin-sidebar {
  width: 250px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #fff;
  padding: 1.5rem 0;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
  padding: 0 1.5rem 2rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #fff;
}

.sidebar-menu {
  list-style: none;
  margin: 0;
  padding: 1rem 0;
}

.sidebar-menu li {
  margin: 0;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.menu-item.active {
  background: rgba(0, 122, 204, 0.2);
  color: #00d9ff;
  border-left-color: #00d9ff;
}

.menu-item .icon {
  font-size: 1.2rem;
}

.menu-item .label {
  font-weight: 500;
}

.sidebar-actions {
  padding: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: auto;
}

.btn-block {
  width: 100%;
  text-align: center;
}

/* Admin Main Content */
.admin-main-content {
  flex: 1;
  margin-left: 250px;
  padding: 2rem;
  background: #f5f5f5;
}

/* Admin Container */
.admin-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Admin Header */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 2rem;
  background: #fff;
  padding: 2rem;
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.header-left h1 {
  margin: 0 0 0.5rem 0;
  font-size: 1.8rem;
  color: #20232a;
}

.header-left .subtitle {
  margin: 0;
  color: #777;
  font-size: 0.95rem;
}

/* Header Buttons */
.header-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ==================== BUTTONS ==================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: 0.25rem;
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn .icon {
  font-size: 1rem;
}

/* Button Sizes */
.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.9rem;
}

/* Button Variants */
.btn-primary {
  background: #007acc;
  color: #fff;
}

.btn-primary:hover {
  background: #005a9e;
  transform: translateY(-2px);
}

.btn-secondary {
  background: #6c757d;
  color: #fff;
}

.btn-secondary:hover {
  background: #5a6268;
}

.btn-info {
  background: #17a2b8;
  color: #fff;
}

.btn-info:hover {
  background: #138496;
}

.btn-edit {
  background: #28a745;
  color: #fff;
}

.btn-edit:hover {
  background: #218838;
}

.btn-delete {
  background: #dc3545;
  color: #fff;
}

.btn-delete:hover {
  background: #c82333;
}

/* ==================== ALERTS ==================== */

.alert {
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid;
}

.alert-success {
  background: #d4edda;
  border-left-color: #28a745;
  color: #155724;
}

.alert-error {
  background: #f8d7da;
  border-left-color: #dc3545;
  color: #721c24;
}

.alert p {
  margin: 0;
}

/* ==================== SECTIONS ==================== */

.admin-section {
  background: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  margin-bottom: 2rem;
}

.dashboard-section {
  margin-bottom: 2rem;
}

.section-title {
  margin: 0 0 1.5rem 0;
  font-size: 1.3rem;
  color: #20232a;
  font-weight: 700;
}

/* ==================== EMPTY STATE ==================== */

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #666;
  background: #fff;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.empty-state h3 {
  margin: 0 0 0.5rem 0;
  color: #333;
  font-size: 1.3rem;
}

.empty-state p {
  margin: 0 0 1.5rem 0;
  color: #777;
}

/* ==================== DASHBOARD STATS ==================== */

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: #fff;
  border-radius: 0.5rem;
  padding: 1.5rem;
  display: flex;
  gap: 1.5rem;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.stat-icon {
  font-size: 2.5rem;
  width: 60px;
  text-align: center;
}

.stat-content {
  flex: 1;
}

.stat-number {
  margin: 0;
  font-size: 1.8rem;
  color: #007acc;
  font-weight: 700;
}

.stat-label {
  margin: 0.25rem 0 0.75rem 0;
  color: #666;
  font-size: 0.95rem;
}

.stat-link {
  color: #007acc;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.stat-link:hover {
  text-decoration: underline;
}

/* ==================== QUICK ACTIONS ==================== */

.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.action-card {
  background: #fff;
  border: 2px solid #e0e0e0;
  border-radius: 0.5rem;
  padding: 1.5rem;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

.action-card:hover {
  border-color: #007acc;
  box-shadow: 0 4px 12px rgba(0, 122, 204, 0.15);
  transform: translateY(-2px);
}

.action-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.action-card h3 {
  margin: 0 0 0.5rem 0;
  color: #20232a;
  font-size: 1rem;
}

.action-card p {
  margin: 0;
  color: #777;
  font-size: 0.9rem;
}

/* ==================== RECENT VIDEOS ==================== */

.recent-videos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.video-card-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.video-card-header h3 {
  margin: 0;
  color: #20232a;
  font-size: 1rem;
  flex: 1;
}

.video-card-desc {
  margin: 0 0 1rem 0;
  color: #666;
  font-size: 0.9rem;
  line-height: 1.5;
}

.video-card-footer {
  display: flex;
  gap: 0.5rem;
}

.video-card-footer .btn {
  flex: 1;
  text-align: center;
  justify-content: center;
}

/* ==================== PAGINATION ==================== */

.pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-top: 1px solid #dee2e6;
  background: #fff;
  border-radius: 0 0 0.5rem 0.5rem;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.pagination-info {
  flex: 1;
  min-width: 200px;
}

.pagination-info p {
  margin: 0;
  color: #666;
  font-size: 0.95rem;
}

.pagination-info strong {
  color: #20232a;
  font-weight: 700;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 0.5rem;
  background: #007acc;
  color: #fff;
  text-decoration: none;
  border-radius: 0.25rem;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.pagination-btn:hover {
  background: #005a9e;
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0, 122, 204, 0.3);
}

.pagination-btn.disabled {
  background: #e0e0e0;
  color: #999;
  cursor: not-allowed;
  transform: none;
}

.pagination-btn.disabled:hover {
  background: #e0e0e0;
  transform: none;
  box-shadow: none;
}

/* Page Numbers */
.page-numbers {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.page-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 0.5rem;
  background: #f0f0f0;
  color: #333;
  text-decoration: none;
  border-radius: 0.25rem;
  border: 1px solid #dee2e6;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.page-number:hover {
  background: #007acc;
  color: #fff;
  border-color: #007acc;
  transform: translateY(-2px);
}

.page-number.active {
  background: #007acc;
  color: #fff;
  border-color: #007acc;
  cursor: default;
  font-weight: 700;
}

.page-number.active:hover {
  transform: none;
}

.page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  color: #999;
  font-weight: 600;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 1024px) {
  .admin-sidebar {
    width: 220px;
  }

  .admin-main-content {
    margin-left: 220px;
    padding: 1.5rem;
  }

  .admin-header {
    flex-direction: column;
  }

  .header-buttons {
    width: 100%;
    justify-content: flex-start;
  }

  .dashboard-stats {
    grid-template-columns: 1fr;
  }

  .quick-actions {
    grid-template-columns: repeat(2, 1fr);
  }

  .recent-videos {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

@media (max-width: 768px) {
  .admin-sidebar {
    width: 100%;
    position: static;
    height: auto;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    overflow-y: visible;
  }

  .admin-main-content {
    margin-left: 0;
    padding: 1rem;
  }

  .admin-header {
    padding: 1rem;
    flex-direction: column;
  }

  .header-buttons {
    width: 100%;
    flex-direction: column;
  }

  .header-buttons .btn {
    width: 100%;
    justify-content: center;
  }

  .sidebar-menu {
    display: flex;
    padding: 0;
    justify-content: space-around;
  }

  .sidebar-menu li {
    flex: 1;
  }

  .menu-item {
    padding: 0.5rem 0.75rem;
    justify-content: center;
    flex-direction: column;
    border-left: none;
    border-bottom: 3px solid transparent;
  }

  .menu-item.active {
    border-left: none;
    border-bottom-color: #00d9ff;
  }

  .sidebar-actions {
    padding: 0.75rem;
    margin-top: 0;
    border-top: none;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
  }

  .dashboard-stats {
    grid-template-columns: 1fr;
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }

  .recent-videos {
    grid-template-columns: 1fr;
  }

  .stat-card {
    flex-direction: column;
    text-align: center;
  }

  .action-card h3 {
    font-size: 0.95rem;
  }

  .action-card p {
    font-size: 0.85rem;
  }

  /* Pagination Responsive */
  .pagination-container {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .pagination-info {
    min-width: unset;
    text-align: center;
  }

  .pagination-controls {
    justify-content: center;
    flex-wrap: wrap;
  }

  .pagination-btn,
  .page-number {
    min-width: 32px;
    height: 32px;
    font-size: 0.85rem;
  }

  .page-numbers {
    gap: 0.15rem;
  }

  .page-ellipsis {
    min-width: 32px;
    height: 32px;
  }
}

  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
  }
