/* Admin CSS - Portal Berita */

/* ===== VARIABLES ===== */
:root {
  --primary-color: #4f46e5;
  --primary-darker: #4338ca;
  --primary-lighter: #818cf8;
  --secondary-color: #475569;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --info-color: #3b82f6;
  --light-color: #f3f4f6;
  --dark-color: #1e293b;
  --border-color: #e2e8f0;
  --body-bg: #f8fafc;
  --sidebar-bg: #1e1b4b;
  --sidebar-width: 260px;
  --header-height: 60px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --transition: all 0.3s ease;
  --border-radius: 8px;
  --border-radius-lg: 12px;
  --border-radius-sm: 4px;
}

/* 
 * Ini adalah stylesheet khusus untuk panel admin portal berita
 * Menyediakan styling untuk semua halaman admin termasuk dashboard, 
 * pengelolaan artikel, kategori, dan pengguna.
 */

/* ===== RESET UNTUK ADMIN ===== */
.admin-container h1, 
.admin-container h2, 
.admin-container h3, 
.admin-container h4, 
.admin-container h5, 
.admin-container h6,
.admin-container p,
.admin-container ul,
.admin-container ol {
  margin-top: 0;
}

.admin-container a {
  text-decoration: none;
}

.admin-container img {
  max-width: 100%;
  height: auto;
}

/* ===== GENERAL STYLES ===== */
body {
  font-family: 'Inter', sans-serif;
  background-color: var(--body-bg);
  margin: 0;
  padding: 0;
  color: var(--dark-color);
  font-size: 0.95rem;
  line-height: 1.5;
}

* {
  box-sizing: border-box;
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: var(--transition);
}

a:hover {
  color: var(--primary-darker);
}

/* ===== LAYOUT ===== */
.admin-container {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: var(--sidebar-width);
  background-color: var(--sidebar-bg);
  color: #fff;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1000;
  transition: var(--transition);
  overflow-y: auto;
}

.admin-main {
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  transition: var(--transition);
}

.admin-content {
  padding: 20px;
  min-height: calc(100vh - var(--header-height));
}

/* ===== SIDEBAR ===== */
.sidebar-header {
  padding: 20px 15px 20px 15px !important;
  background: linear-gradient(to right, var(--primary-darker), var(--primary-color));
}

.sidebar-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  letter-spacing: 0.5px;
}

.sidebar-header h2 i {
  margin-right: 10px;
  background-color: rgba(255, 255, 255, 0.2);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.sidebar-menu {
  padding: 15px 0;
}

.sidebar-title {
  padding: 10px 20px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 600;
  margin-top: 10px;
}

.sidebar-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-menu ul li {
  margin-bottom: 2px;
}

.sidebar-menu ul li a {
  display: block;
  padding: 12px 20px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: var(--transition);
  border-radius: 0 30px 30px 0;
  margin-right: 10px;
}

.sidebar-menu ul li a i {
  width: 20px;
  margin-right: 10px;
  text-align: center;
}

.sidebar-menu ul li a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-left-color: var(--primary-lighter);
}

.sidebar-menu ul li a.active {
  background-color: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-left-color: var(--primary-lighter);
  font-weight: 600;
}

.sidebar-footer {
  padding: 15px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 15px;
  width: 100%;
}

.sidebar-footer a {
  display: flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.8);
  padding: 10px 15px;
  font-weight: 500;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.sidebar-footer a i {
  margin-right: 10px;
}

.sidebar-footer a:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.1);
}

.sidebar-footer .version {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 10px;
  text-align: center;
}

/* ===== NAVBAR ===== */
.admin-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* height: var(--header-height); */
  padding: 10px 25px 10px 25px !important;
  background-color: #fff;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 999;
  transition: var(--transition);
  border-bottom: 1px solid var(--border-color);
}

.navbar-start, .navbar-end {
  display: flex;
  align-items: center;
}

.menu-toggle {
  background: none;
  border: none;
  color: var(--secondary-color);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: var(--transition);
  /* background-color: var(--light-color); */
}

.menu-toggle:hover {
  background-color: var(--primary-lighter);
  color: #fff;
}

.menu-toggle:focus {
  outline: none;
}

.navbar-dropdown {
  position: relative;
}

.navbar-dropdown-toggle {
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 15px;
  cursor: pointer;
  color: var(--dark-color);
  border-radius: 30px;
  transition: var(--transition);
}

.navbar-dropdown-toggle:hover {
  background-color: var(--light-color);
}

.navbar-dropdown-toggle span {
  font-weight: 500;
  font-size: 0.95rem;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-darker));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  font-size: 1.2rem;
}

.navbar-title {
  margin-left: 15px;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--dark-color);
  display: flex;
  align-items: center;
}

.navbar-title i {
  margin-right: 10px;
  color: var(--primary-color);
}

/* Navbar dropdown menu */
.navbar-dropdown-menu {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  width: 200px;
  background-color: #fff;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  z-index: 1000;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: all 0.3s ease;
}

.navbar-dropdown-menu.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.navbar-dropdown-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.navbar-dropdown-menu ul li a {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  color: var(--dark-color);
  font-size: 0.95rem;
  transition: var(--transition);
}

.navbar-dropdown-menu ul li a:hover {
  background-color: var(--light-color);
  color: var(--primary-color);
}

.navbar-dropdown-menu ul li a i {
  margin-right: 10px;
  width: 18px;
  text-align: center;
}

.navbar-dropdown-menu .dropdown-divider {
  height: 1px;
  background-color: var(--border-color);
  margin: 5px 0;
}

.admin-navbar .nav-link {
  display: flex;
  align-items: center;
  padding: 8px 15px;
  color: var(--secondary-color);
  font-weight: 500;
  border-radius: 30px;
  transition: var(--transition);
  margin-right: 5px;
}

.admin-navbar .nav-link:hover {
  background-color: var(--light-color);
  color: var(--primary-color);
}

.admin-navbar .nav-link.active {
  background-color: rgba(79, 70, 229, 0.1);
  color: var(--primary-color);
}

.admin-navbar .nav-link i {
  margin-right: 8px;
}

/* ===== BREADCRUMB STYLES ===== */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  padding: 1rem 1.25rem;
  background: #fff;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
  border: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.breadcrumb::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: linear-gradient(to bottom, var(--primary-color), var(--primary-lighter));
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  color: var(--secondary-color);
  font-weight: 500;
  position: relative;
  margin: 0;
  padding: 0;
}

.breadcrumb-item a {
  color: var(--primary-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: var(--transition);
  padding: 0.25rem 0.5rem;
  border-radius: var(--border-radius-sm);
}

.breadcrumb-item a:hover {
  background-color: rgba(79, 70, 229, 0.08);
  color: var(--primary-darker);
  transform: translateY(-1px);
}

.breadcrumb-item i {
  margin-right: 0.5rem;
  font-size: 0.9rem;
}

.breadcrumb-item.active {
  color: var(--dark-color);
  font-weight: 600;
  padding: 0.25rem 0.5rem;
}

.breadcrumb-item.active i {
  margin-right: 0.5rem;
  color: var(--primary-color);
}

.breadcrumb-item + .breadcrumb-item {
  padding-left: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
  display: inline-block;
  padding: 0 0.75rem;
  color: var(--secondary-color);
  content: "\f054";
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  font-size: 0.7rem;
  opacity: 0.5;
}

/* Hover effects */
.breadcrumb-item a:hover i {
  transform: scale(1.2);
  transition: transform 0.3s ease;
}

/* Responsive styles */
@media (max-width: 768px) {
  .breadcrumb {
    padding: 0.75rem 1rem;
  }
  
  .breadcrumb-item + .breadcrumb-item::before {
    padding: 0 0.5rem;
  }
}

/* ===== DASHBOARD ===== */
.welcome-message {
  margin-bottom: 30px;
  color: var(--dark-color);
  font-size: 1.5rem;
  font-weight: 600;
  background: linear-gradient(to right, var(--primary-color), var(--info-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-fill-color: transparent;
}

.dashboard-stats {
  margin-bottom: 30px;
}

.stat-card {
  background-color: #fff;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.stat-card-body {
  display: flex;
  padding: 25px;
}

.stat-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-right: 20px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.stat-icon::after {
  content: '';
  position: absolute;
  bottom: -10px;
  right: -10px;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
}

.stat-card.published .stat-icon {
  background: linear-gradient(135deg, var(--success-color), #34d399);
}

.stat-card.draft .stat-icon {
  background: linear-gradient(135deg, var(--warning-color), #fbbf24);
}

.stat-card.category .stat-icon {
  background: linear-gradient(135deg, var(--info-color), #93c5fd);
}

.stat-card.user .stat-icon {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-lighter));
}

.stat-content h3 {
  margin: 0 0 10px 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--secondary-color);
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  line-height: 1;
  background: linear-gradient(to right, var(--dark-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-fill-color: transparent;
}

.stat-footer {
  border-top: 1px solid var(--border-color);
  padding: 12px 25px;
  text-align: right;
  background-color: #F2F2F2 !important;
}

.stat-footer a {
  color: var(--primary-color);
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
}

.stat-footer a i {
  margin-left: 8px;
  transition: var(--transition);
}

.stat-footer a:hover {
  color: var(--primary-darker);
}

.stat-footer a:hover i {
  transform: translateX(3px);
}

/* ===== CONTENT CARDS ===== */
.content-card {
  background-color: #fff;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 25px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.card-header {
  padding: 20px 25px;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-header h4 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--dark-color);
  display: flex;
  align-items: center;
}

.card-header h4 i {
  margin-right: 10px;
  color: var(--primary-color);
}

.card-body {
  padding: 25px;
}

/* Form dalam card */
.content-card .form-group {
  margin-bottom: 22px;
}

.content-card .form-label {
  margin-bottom: 8px;
  font-weight: 500;
  display: flex;
  align-items: center;
}

.content-card .form-label i {
  margin-right: 8px;
  color: var(--primary-color);
}

.content-card .form-label.required:after {
  content: " *";
  color: var(--danger-color);
}

.content-card .form-control {
  border-radius: 8px;
  transition: all 0.3s;
  background-color: var(--light-color);
  border: none;
  box-shadow: var(--shadow-sm);
}

.content-card .form-control:focus {
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
  transform: translateY(-2px);
}

.content-card .custom-file-upload {
  position: relative;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  background-color: var(--light-color);
}

.content-card .custom-file-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 10;
}

.content-card .custom-file-label {
  margin: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 12px 16px;
  transition: all 0.3s;
  border: none;
  box-shadow: var(--shadow-sm);
  border-radius: 8px;
}

.content-card .custom-file-label i {
  margin-right: 10px;
  color: var(--primary-color);
}

.content-card .form-actions {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.content-card .form-actions .btn {
  padding: 12px 25px;
  font-size: 1rem;
}

.content-card .editor-container {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.content-card .ck.ck-editor__editable:not(.ck-editor__nested-editable) {
  min-height: 426px !important;
}

/* Responsive styles for content-card */
@media (max-width: 767.98px) {
  .content-card {
    margin-bottom: 20px;
  }
  
  .card-header {
    padding: 15px 20px;
  }
  
  .card-body {
    padding: 20px;
  }
  
  .content-card .form-actions {
    flex-direction: column;
    gap: 8px;
  }
  
  .content-card .form-actions .btn {
    width: 100%;
  }
}

/* ===== TABLES ===== */
.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  margin-bottom: 0;
}

.admin-table th {
  text-align: left;
  padding: 14px 18px;
  border-bottom: 2px solid var(--border-color);
  font-weight: 600;
  color: var(--secondary-color);
  background-color: #f8fafc;
  white-space: nowrap;
  position: relative;
  vertical-align: middle;
}

.admin-table th:after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, var(--primary-color), var(--primary-lighter));
  opacity: 0.5;
}

.admin-table th:last-child {
  text-align: center;
}

.admin-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
  min-height: 60px;
  box-sizing: border-box;
  font-size: 0.95rem;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table tbody tr {
  transition: var(--transition);
  background-color: #fff;
}

.admin-table tbody tr:hover {
  background-color: rgba(79, 70, 229, 0.05);
}

.admin-table tr:nth-child(even) {
  background-color: #f9fafc;
}

.admin-table .title-cell {
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
  color: var(--dark-color);
}

.table-responsive {
  overflow-x: auto;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
}

/* Style untuk tombol aksi di tabel */
.admin-table td.actions {
  width: 140px;
  text-align: center;
  white-space: nowrap;
}

.action-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.admin-table .date {
  font-size: 0.85rem;
  color: var(--secondary-color);
  display: flex;
  align-items: center;
  gap: 5px;
}

.admin-table .date i {
  color: var(--primary-color);
  opacity: 0.7;
}

/* Status Badges */
.status-badge {
  padding: 6px 12px;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}

.status-badge.published,
.status-badge.approved {
  background-color: rgba(16, 185, 129, 0.15);
  color: var(--success-color);
}

.status-badge.draft,
.status-badge.pending {
  background-color: rgba(245, 158, 11, 0.15);
  color: var(--warning-color);
}

.status-badge.rejected {
  background-color: rgba(239, 68, 68, 0.15);
  color: var(--danger-color);
}

/* Category Badge */
.category-badge {
  padding: 6px 12px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 500;
  background-color: rgba(59, 130, 246, 0.15);
  color: var(--primary-color);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}

/* Counter Badge */
.count-badge,
.view-count {
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background-color: rgba(79, 70, 229, 0.08);
  color: var(--primary-color);
}

.count-badge i,
.view-count i {
  font-size: 0.9rem;
  color: var(--primary-color);
}

/* Button Styles Improvements */
.btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
  border-radius: 20px;
  min-height: 32px;
  min-width: 32px;
}

/* Style for Action Buttons */
.action-buttons .btn-sm {
  width: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  margin: 0 2px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
}

.action-buttons .btn-sm i {
  font-size: 0.9rem;
  display: block;
  line-height: 1;
}

.btn-view {
  background-color: rgba(16, 185, 129, 0.15);
  color: var(--success-color);
}

.btn-view:hover {
  background-color: rgba(16, 185, 129, 0.25);
  transform: translateY(-1px);
}

.btn-edit {
  background-color: rgba(59, 130, 246, 0.15);
  color: var(--primary-color);
}

.btn-edit:hover {
  background-color: rgba(59, 130, 246, 0.25);
  transform: translateY(-1px);
}

.btn-delete {
  background-color: rgba(239, 68, 68, 0.15);
  color: var(--danger-color);
}

.btn-delete:hover {
  background-color: rgba(239, 68, 68, 0.25);
  transform: translateY(-1px);
}

.btn-disabled {
  background-color: rgba(156, 163, 175, 0.15);
  color: #9ca3af;
  cursor: not-allowed;
}

/* Empty state */
.empty-state {
  padding: 50px 20px;
  text-align: center;
  background-color: #fff;
  border-radius: var(--border-radius);
  box-shadow: none;
  border: 1px dashed var(--border-color);
}

.empty-icon {
  font-size: 5rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--primary-color), var(--info-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-fill-color: transparent;
  opacity: 0.5;
}

/* Responsif untuk tabel */
@media (max-width: 991.98px) {
  .admin-table th, 
  .admin-table td {
    padding: 12px 14px;
  }
  
  .admin-table td.actions,
  .admin-table th:last-child {
    padding: 8px !important;
  }
  
  .status-badge,
  .category-badge {
    padding: 5px 10px;
    font-size: 0.75rem;
  }
}

@media (max-width: 767.98px) {
  .admin-table th, 
  .admin-table td {
    padding: 10px 12px;
    font-size: 0.9rem;
  }
  
  .admin-table td.actions {
    width: 120px;
  }
  
  .action-buttons .btn-sm {
    width: 32px !important;
    height: 32px !important;
  }
  
  .status-badge,
  .category-badge,
  .count-badge,
  .view-count {
    padding: 4px 8px;
    font-size: 0.75rem;
  }
}

@media (max-width: 575.98px) {
  .admin-table th, 
  .admin-table td {
    padding: 8px 10px;
    font-size: 0.85rem;
  }
  
  .admin-table td.actions {
    width: 100px;
  }
  
  .action-buttons {
    gap: 2px;
    flex-wrap: wrap;
  }
  
  .action-buttons .btn-sm {
    width: 28px !important;
    height: 28px !important;
    font-size: 0.8rem;
  }
}

/* ===== FILTER TABS ===== */
.filter-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 25px;
  background-color: #f8f9fa;
  border-radius: var(--border-radius);
  padding: 5px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  position: relative;
}

.filter-tab {
  display: inline-flex;
  align-items: center;
  padding: 12px 20px;
  margin: 5px;
  color: var(--secondary-color);
  font-weight: 500;
  border-radius: 30px;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
  background: #fff;
  box-shadow: var(--shadow-sm);
  z-index: 1;
  text-decoration: none;
}

.filter-tab .counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  margin-left: 8px;
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 30px;
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.filter-tab:hover {
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: rgba(79, 70, 229, 0.1);
}

.filter-tab:hover .counter {
  background-color: rgba(79, 70, 229, 0.15);
  color: var(--primary-color);
}

.filter-tab.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-darker));
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.25);
  border-color: transparent;
}

.filter-tab.active .counter {
  background-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.filter-tab.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.filter-tab.active:hover::before {
  opacity: 1;
}

.filter-tab i {
  margin-right: 8px;
  font-size: 0.9rem;
  transition: transform 0.3s ease;
}

.filter-tab:hover i {
  transform: scale(1.2);
}

.filter-tab:first-child {
  margin-left: 5px;
}

.filter-tab.active i {
  animation: pulse 1.5s infinite;
}

/* Variasi tab untuk jenis status komentar */
.filter-tab.pending:hover {
  color: var(--warning-color);
  border-color: rgba(245, 158, 11, 0.1);
}

.filter-tab.approved:hover {
  color: var(--success-color);
  border-color: rgba(16, 185, 129, 0.1);
}

.filter-tab.rejected:hover {
  color: var(--danger-color);
  border-color: rgba(239, 68, 68, 0.1);
}

.filter-tab.pending.active:hover {
  color: #fff;
}

.filter-tab.approved.active:hover {
  color: #fff;
}

.filter-tab.rejected.active:hover {
  color: #fff;
}

.filter-tab.pending.active {
  background: linear-gradient(135deg, var(--warning-color), #d97706);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.25);
}

.filter-tab.approved.active {
  background: linear-gradient(135deg, var(--success-color), #0d9488);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.25);
}

.filter-tab.rejected.active {
  background: linear-gradient(135deg, var(--danger-color), #b91c1c);
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.25);
}

.filter-tab.pending:hover .counter {
  background-color: rgba(245, 158, 11, 0.15);
  color: var(--warning-color);
}

.filter-tab.approved:hover .counter {
  background-color: rgba(16, 185, 129, 0.15);
  color: var(--success-color);
}

.filter-tab.rejected:hover .counter {
  background-color: rgba(239, 68, 68, 0.15);
  color: var(--danger-color);
}

/* Responsif untuk filter tabs */
@media (max-width: 767.98px) {
  .filter-tabs {
    padding: 5px;
    justify-content: center;
  }
  
  .filter-tab {
    padding: 8px 15px;
    font-size: 0.9rem;
    margin: 3px;
  }
  
  .filter-tab .counter {
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    margin-left: 6px;
    font-size: 0.7rem;
  }
}

/* ===== LOGIN PAGE ===== */
.admin-login {
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

.admin-login::before,
.admin-login::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
  z-index: 0;
}

.admin-login::before {
  top: -200px;
  left: -200px;
}

.admin-login::after {
  bottom: -200px;
  right: -200px;
}

.login-container {
  background-color: #fff;
  padding: 40px;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  width: 420px;
  max-width: 90%;
  position: relative;
  z-index: 1;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.login-container h1 {
  text-align: center;
  margin-bottom: 30px;
  color: var(--dark-color);
  font-weight: 700;
  position: relative;
  padding-bottom: 15px;
}

.login-container h1::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(to right, var(--primary-color), var(--primary-lighter));
  border-radius: 2px;
}

.admin-login .form-group {
  margin-bottom: 20px;
  gap: 10px;
  display: flex;
  flex-direction: column;
}

.admin-login .form-label {
  font-weight: 600;
}

.sidebar-header {
  font-size: 20px;
  font-weight: bold;
  padding: 13px 0 !important;
}

.sidebar-header img {
  width: 50px;
  height: 50px;
  padding: 0;
  margin-left: -10px;
}

.sidebar-header a {
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Kaushan Script", cursive;
  font-size: 30px !important;
  font-weight: 900;
  /* text-transform: uppercase; */
  letter-spacing: 0.01px;
  position: relative;
  /* padding: 0px 15px; */
  border-radius: 8px;
  /* background: rgba(0,0,0,0.2); */
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
  line-height: 1.2;
}

/* ===== CATEGORY STYLES ===== */
.category-form .form-group {
  margin-bottom: 20px;
}

.category-form .form-label {
  font-weight: 600;
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.category-form .form-label i {
  margin-right: 8px;
  color: var(--primary-color);
}

.category-form .form-label.required:after {
  content: " *";
  color: var(--danger-color);
}

.category-form .form-control,
.category-form .form-select {
  border-radius: 8px;
  padding: 12px 16px;
  background-color: var(--light-color);
  border: none;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s;
}

.category-form .form-control:focus,
.category-form .form-select:focus {
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
  transform: translateY(-2px);
}

.category-form .custom-input {
  background-color: var(--light-color);
  border: none;
  box-shadow: var(--shadow-sm);
  border-radius: 8px;
  padding: 12px 16px;
  transition: all 0.3s;
}

.category-form .custom-input:focus {
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
  transform: translateY(-2px);
}

.category-form .form-actions {
  padding-top: 15px;
  margin-top: 20px;
  border-top: 1px solid rgba(0,0,0,0.1);
  display: flex;
  gap: 10px;
}

.category-form .form-actions .btn {
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s;
}

.category-form .form-actions .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* ===== SHARED FORM STYLES ===== */
.article-form .form-group,
.category-form .form-group {
  margin-bottom: 20px;
}

.article-form .form-label,
.category-form .form-label {
  font-weight: 600;
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.article-form .form-label i,
.category-form .form-label i {
  margin-right: 8px;
  color: var(--primary-color);
}

.article-form .form-label.required:after,
.category-form .form-label.required:after {
  content: " *";
  color: var(--danger-color);
}

.article-form .form-control,
.article-form .form-select,
.category-form .form-control,
.category-form .form-select,
.article-form .custom-input,
.category-form .custom-input {
  border-radius: 8px;
  padding: 12px 16px;
  background-color: var(--light-color);
  border: none;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s;
}

.article-form .form-control:focus,
.article-form .form-select:focus,
.category-form .form-control:focus,
.category-form .form-select:focus,
.article-form .custom-input:focus,
.category-form .custom-input:focus {
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
  transform: translateY(-2px);
}

.article-form .form-actions {
  padding-top: 15px;
  margin-top: 20px;
  border-top: 1px solid rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.category-form .form-actions {
  padding-top: 15px;
  margin-top: 20px;
  border-top: 1px solid rgba(0,0,0,0.1);
  display: flex;
  gap: 10px;
}

.article-form .form-actions .btn,
.category-form .form-actions .btn {
  padding: 12px 20px;
  border-radius: 25px;
  font-weight: 500;
  transition: all 0.3s;
}

.article-form .form-actions .btn:hover,
.category-form .form-actions .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Styling spesifik untuk article-form */
.article-form .content-card {
  border: none;
  margin-bottom: 25px;
}

.article-form .card-header {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 20px 25px;
  border-bottom: 1px solid var(--border-color);
}

.article-form .card-header h4 {
  color: var(--primary-color);
  font-weight: 600;
  display: flex;
  align-items: center;
}

.article-form .card-header h4 i {
  margin-right: 10px;
  color: var(--primary-color);
}

.article-form .custom-file-upload {
  border-radius: 8px;
  overflow: hidden;
  background-color: var(--light-color);
  position: relative;
}

.article-form .custom-file-label {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background-color: var(--light-color);
  transition: all 0.3s;
  border: none;
  margin: 0;
}

.article-form .custom-file-label i {
  margin-right: 10px;
  color: var(--primary-color);
}

.article-form .editor-container {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.1);
  margin-bottom: 0;
}

.article-form .ck.ck-editor__editable:not(.ck-editor__nested-editable) {
  min-height: 350px;
}

/* Style untuk current image pada form edit */
.article-form .current-image {
  margin-bottom: 15px;
}

.article-form .current-image img {
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  width: 100%;
  object-fit: cover;
  max-height: 200px;
}

.article-form .rounded-4 {
  border-radius: 12px !important;
}

.article-form .bg-gradient-light {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.article-form .btn-outline-secondary,
.category-form .btn-outline-secondary,
.user-form .btn-outline-secondary {
  border: 1px solid var(--secondary-color);
  color: var(--secondary-color);
  background-color: transparent;
  transition: all 0.3s ease;
}

.article-form .btn-outline-secondary:hover,
.category-form .btn-outline-secondary:hover,
.user-form .btn-outline-secondary:hover {
  background-color: var(--secondary-color);
  color: #fff;
}

.article-form .shadow-sm {
  box-shadow: 0 .125rem .25rem rgba(0,0,0,.075) !important;
}

.admin-content {
  animation: fadeIn 0.5s ease;
}

/* Button styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border-radius: 30px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.3px;
}

.btn i {
  margin-right: 8px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
  border-radius: 20px;
  min-height: 32px;
  min-width: 32px;
}

.btn-sm i {
  margin-right: 0;
}

.btn-primary {
  background: linear-gradient(to right, var(--primary-color), var(--primary-darker));
  color: #fff;
  box-shadow: 0 2px 10px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(to right, var(--primary-darker), var(--primary-color));
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
  transform: translateY(-1px);
  color: #fff;
}

.btn-success {
  background: linear-gradient(to right, var(--success-color), #0d9488);
  color: #fff;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
  background: linear-gradient(to right, #0d9488, var(--success-color));
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
  transform: translateY(-1px);
  color: #fff;
}

.btn-danger {
  background: linear-gradient(to right, var(--danger-color), #b91c1c);
  color: #fff;
  box-shadow: 0 2px 10px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: linear-gradient(to right, #b91c1c, var(--danger-color));
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
  transform: translateY(-1px);
  color: #fff;
}

.btn-warning {
  background: linear-gradient(to right, var(--warning-color), #d97706);
  color: #fff;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.3);
}

.btn-warning:hover {
  background: linear-gradient(to right, #d97706, var(--warning-color));
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
  transform: translateY(-1px);
  color: #fff;
}

.admin-table .title-cell {
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

/* Style untuk kolom aksi pada tabel komentar */
.action-buttons .btn-sm {
  width: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  margin: 0 2px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
}

.action-buttons .btn-sm i {
  font-size: 0.9rem;
  display: block;
  line-height: 1;
} 

/* Styling untuk tautan artikel dalam tabel */
.admin-table .article-link {
  color: var(--primary-color);
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-block;
  text-decoration: none;
}

.admin-table .article-link:hover {
  color: var(--primary-darker);
  text-decoration: underline;
}

/* SweetAlert Custom Style */
.swal-popup {
    border-radius: 20px !important;
    padding: 20px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
    border-left: 4px solid #d33 !important;
}

.swal-title {
    font-weight: 600 !important;
    color: #333 !important;
}

.swal-button-confirm {
    padding: 8px 30px !important;
    font-weight: 500 !important;
    box-shadow: 0 3px 6px rgba(211, 51, 51, 0.2) !important;
    transition: transform 0.2s !important;
    border-radius: 20px !important;
}

.swal-button-confirm:hover {
    transform: translateY(-2px) !important;
}

.swal-button-cancel {
    padding: 8px 30px !important;
    font-weight: 500 !important;
    transition: background 0.2s !important;
    border-radius: 20px !important;
    background-color: var(--primary-color) !important;
    color: #fff !important;
}

/* Animation when popup appears */
.swal2-show {
    animation: swal-pop 0.3s ease-out !important;
}

@keyframes swal-pop {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.alert {
  padding: 18px 24px;
  border-radius: var(--border-radius-lg);
  margin-bottom: 25px;
  position: relative;
  box-shadow: var(--shadow);
  overflow: hidden;
  border: none;
  display: flex;
  align-items: center;
  transform: translateY(0);
  transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease;
  animation: alertSlideIn 0.4s ease-out forwards;
}

@keyframes alertSlideIn {
  0% {
    transform: translateY(-20px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

.alert:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.alert::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
}

.alert-content {
  display: flex;
  align-items: center;
  width: 100%;
}

.alert-icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  border-radius: 50%;
  margin-right: 16px;
  flex-shrink: 0;
}

.alert-text {
  flex-grow: 1;
  padding-top: 2px;
  font-weight: 500;
  line-height: 1.2;
  padding-right: 10px;
}

.alert-text h5 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 1.05rem;
  font-weight: 600;
}

.alert-text ul.error-list {
  margin: 8px 0 0 0;
  padding-left: 20px;
}

.alert-text ul.error-list li {
  margin-bottom: 6px;
  padding-left: 6px;
  line-height: 1;
}

.alert-text ul.error-list li:last-child {
  margin-bottom: 0;
}

.alert-dismiss {
  position: absolute;
  top: 22px;
  right: 22px;
  background: transparent !important;
  border: none;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0.6;
  transition: all 0.3s ease;
  z-index: 5;
}

.alert-dismiss:hover {
  opacity: 1;
  background-color: rgba(0, 0, 0, 0.1);
  transform: rotate(90deg);
}

.alert-dismiss:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.alert-dismiss i {
  font-size: 0.9rem;
  color: inherit;
}

/* Success Alert */
.alert-success {
  background-color: rgba(16, 185, 129, 0.08);
  color: var(--success-color);
  border-left: none;
}

.alert-success::before {
  background: linear-gradient(to bottom, var(--success-color), #0d9488);
}

.alert-success .alert-icon {
  background-color: rgba(16, 185, 129, 0.15);
  color: var(--success-color);
}

/* Danger/Error Alert */
.alert-danger {
  background-color: rgba(239, 68, 68, 0.08);
  color: var(--danger-color);
  border-left: none;
}

.alert-danger::before {
  background: linear-gradient(to bottom, var(--danger-color), #b91c1c);
}

.alert-danger .alert-icon {
  background-color: rgba(239, 68, 68, 0.15);
  color: var(--danger-color);
}

/* Warning Alert */
.alert-warning {
  background-color: rgba(245, 158, 11, 0.08);
  color: var(--warning-color);
  border-left: none;
}

.alert-warning::before {
  background: linear-gradient(to bottom, var(--warning-color), #d97706);
}

.alert-warning .alert-icon {
  background-color: rgba(245, 158, 11, 0.15);
  color: var(--warning-color);
}

/* Info Alert */
.alert-info {
  background-color: rgba(59, 130, 246, 0.08);
  color: var(--info-color);
  border-left: none;
}

.alert-info::before {
  background: linear-gradient(to bottom, var(--info-color), #2563eb);
}

.alert-info .alert-icon {
  background-color: rgba(59, 130, 246, 0.15);
  color: var(--info-color);
}

/* Responsive styles for alerts */
@media (max-width: 767.98px) {
  .alert {
    padding: 16px 20px;
    margin-bottom: 20px;
  }
  
  .alert-icon {
    width: 32px;
    height: 32px;
    font-size: 1.2rem;
    margin-right: 12px;
  }
  
  .alert-text h5 {
    font-size: 1rem;
  }
  
  .alert-dismiss {
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
  }

  .alert-dismiss i {
    font-size: 0.8rem;
  }
}

@media (max-width: 575.98px) {
  .alert {
    padding: 14px 16px;
    margin-bottom: 16px;
  }
  
  .alert-icon {
    width: 28px;
    height: 28px;
    font-size: 1rem;
    margin-right: 10px;
  }
  
  .alert-text {
    font-size: 0.9rem;
  }
  
  .alert-text h5 {
    font-size: 0.95rem;
  }
  
  .alert-text ul.error-list {
    padding-left: 16px;
  }

  .alert-dismiss {
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
  }

  .alert-dismiss i {
    font-size: 0.75rem;
  }
}


.btn-outline-primary {
  border: 1px solid var(--primary-color) !important;
  color: var(--primary-color) !important;
  background-color: transparent !important;
  transition: all 0.3s ease !important;
}

.btn-outline-primary:hover {
  background-color: var(--primary-color) !important;
  color: #fff !important;
}

.btn-outline-info {
  border: 1px solid var(--info-color) !important;
  color: var(--info-color) !important;
  background-color: transparent !important;
  transition: all 0.3s ease !important;
}

.btn-outline-info:hover {
  background-color: var(--info-color) !important;
  color: #fff !important;
}

.btn-outline-danger {
  border: 1px solid var(--danger-color) !important;
  color: var(--danger-color) !important;
  background-color: transparent !important;
  transition: all 0.3s ease !important;
}

.btn-outline-danger:hover {
  background-color: var(--danger-color) !important;
  color: #fff !important;
}







