/**
 * InfoMinang Media Portal - Admin Panel Styles (Bright / Light Theme)
 */

:root {
  --admin-bg: #f8fafc;
  --admin-sidebar: #ffffff;
  --admin-card: #ffffff;
  --admin-border: #e2e8f0;
  --admin-border-subtle: #f1f5f9;
  --admin-text: #0f172a;
  --admin-text-muted: #64748b;
  --admin-red: #e50914;
  --admin-red-hover: #c40812;
  --admin-radius: 12px;
  --admin-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --admin-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --admin-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background-color: var(--admin-bg);
  color: var(--admin-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* Fixed / Sticky Sidebar */
.admin-sidebar {
  width: 260px;
  height: 100vh;
  position: sticky;
  top: 0;
  background-color: var(--admin-sidebar);
  border-right: 1px solid var(--admin-border);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.02);
  overflow-y: auto;
  z-index: 50;
}

/* Custom Slim Scrollbar for Sidebar */
.admin-sidebar::-webkit-scrollbar {
  width: 4px;
}

.admin-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.admin-sidebar::-webkit-scrollbar-thumb {
  background: #e2e8f0;
  border-radius: 4px;
}

.admin-sidebar::-webkit-scrollbar-thumb:hover {
  background: #cbd5e1;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  padding: 0 8px;
  flex-shrink: 0;
}

.admin-brand-badge {
  background: linear-gradient(135deg, #e50914, #990000);
  color: #ffffff;
  font-weight: 900;
  font-size: 0.85rem;
  padding: 6px 12px;
  border-radius: 8px;
  letter-spacing: 0.5px;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  list-style: none;
}

.admin-nav-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--admin-text-muted);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-nav-item a:hover {
  background-color: #f1f5f9;
  color: var(--admin-text);
}

.admin-nav-item.active a {
  background-color: #fef2f2;
  color: var(--admin-red);
  font-weight: 700;
}

.admin-nav-item a svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Main Area */
.admin-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background-color: var(--admin-bg);
  min-height: 100vh;
}

.admin-topbar {
  background-color: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--admin-border);
  padding: 16px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  position: sticky;
  top: 0;
  z-index: 40;
}

.admin-content {
  padding: 32px;
  flex: 1;
}

/* Stats Cards Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background-color: #ffffff;
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  padding: 22px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--admin-shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.stat-info h3 {
  font-size: 1.85rem;
  font-weight: 900;
  color: var(--admin-text);
  margin-bottom: 4px;
}

.stat-info p {
  color: var(--admin-text-muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fef2f2;
  color: var(--admin-red);
}

/* Admin Card Box */
.admin-card-box {
  background-color: #ffffff;
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  padding: 24px 28px;
  margin-bottom: 32px;
  box-shadow: var(--admin-shadow-sm);
}

.card-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--admin-border-subtle);
}

/* Table Container & Responsive Wrapper */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  background: #ffffff;
  margin-bottom: 8px;
  position: relative;
  cursor: grab;
  scroll-behavior: smooth;
  will-change: scroll-position;
}

.table-responsive.is-dragging {
  cursor: grabbing !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  scroll-behavior: auto !important;
}

.table-responsive.is-dragging * {
  cursor: grabbing !important;
  pointer-events: none !important;
}

.table-responsive a,
.table-responsive button,
.table-responsive input,
.table-responsive select {
  cursor: pointer;
}

.table-responsive::-webkit-scrollbar {
  height: 6px;
}

.table-responsive::-webkit-scrollbar-track {
  background: #f8fafc;
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Tables */
.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
  font-size: 0.88rem;
}

.admin-table th {
  padding: 13px 16px;
  background-color: #f8fafc;
  color: #475569;
  font-weight: 700;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--admin-border);
  white-space: nowrap;
}

.admin-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--admin-border-subtle);
  vertical-align: middle;
  color: #334155;
  transition: background-color 0.15s ease;
}

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

.admin-table tbody tr:hover td {
  background-color: #f8fafc;
}

/* Table Post & Content Styling */
.table-post-cell {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 260px;
}

.table-thumbnail {
  width: 54px;
  height: 38px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--admin-border);
  background: #f1f5f9;
  display: block;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.table-thumbnail-placeholder {
  width: 54px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--admin-border);
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  flex-shrink: 0;
}

.table-post-info {
  flex: 1;
  min-width: 0;
}

.table-post-title {
  font-weight: 700;
  color: #0f172a;
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 4px;
}

.table-post-title a {
  color: #0f172a;
  transition: color 0.15s;
}

.table-post-title a:hover {
  color: var(--admin-red);
}

.table-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  margin-right: 4px;
  letter-spacing: 0.02em;
}

.table-tag-headline {
  background: #fef3c7;
  color: #b45309;
}

.table-tag-breaking {
  background: #fee2e2;
  color: #b91c1c;
}

.table-tag-trending {
  background: #dbeafe;
  color: #1d4ed8;
}

.table-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  background: #f8fafc;
  border: 1px solid var(--admin-border);
  color: #334155;
  white-space: nowrap;
}

.table-category-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.table-views-count {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  color: #475569;
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
  white-space: nowrap;
}

.table-views-count svg {
  color: #94a3b8;
  width: 14px;
  height: 14px;
}

/* User avatar cell */
.table-user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.table-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  border: 1px solid var(--admin-border);
  flex-shrink: 0;
}

/* Buttons */
.btn-admin {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background-color: #ffffff;
  color: #334155;
  border-color: var(--admin-border);
}

.btn-admin:hover {
  background-color: #f8fafc;
  border-color: #cbd5e1;
}

.btn-admin-primary {
  background: linear-gradient(135deg, #e50914, #b91c1c);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 2px 4px rgba(229, 9, 20, 0.2);
}

.btn-admin-primary:hover {
  background: linear-gradient(135deg, #f81823, #c40812);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(229, 9, 20, 0.3);
}

.btn-admin-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: 6px;
}

.btn-admin-danger {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

.btn-admin-danger:hover {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
}

.btn-admin-danger-solid {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 2px 4px rgba(220, 38, 38, 0.2);
}

.btn-admin-danger-solid:hover {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(220, 38, 38, 0.3);
}

.btn-admin-success {
  background: linear-gradient(135deg, #059669, #047857);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 2px 4px rgba(5, 150, 105, 0.2);
}

.btn-admin-success:hover {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(5, 150, 105, 0.3);
}

/* Table Action Buttons Group */
.table-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  white-space: nowrap;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 7px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1;
  position: relative;
  flex-shrink: 0;
  box-sizing: border-box;
}

.btn-action svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  pointer-events: none;
}

.btn-action-view {
  background: #ffffff;
  color: #475569;
  border-color: var(--admin-border);
}

.btn-action-view:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.btn-action-edit {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.btn-action-edit:hover {
  background: #1d4ed8;
  color: #ffffff;
  border-color: #1d4ed8;
  box-shadow: 0 2px 4px rgba(29, 78, 216, 0.25);
  transform: translateY(-1px);
}

.btn-action-delete {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

.btn-action-delete:hover {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
  box-shadow: 0 2px 4px rgba(220, 38, 38, 0.25);
  transform: translateY(-1px);
}

.btn-action-approve {
  background: #ecfdf5;
  color: #059669;
  border-color: #a7f3d0;
}

.btn-action-approve:hover {
  background: #059669;
  color: #ffffff;
  border-color: #059669;
  box-shadow: 0 2px 4px rgba(5, 150, 105, 0.25);
  transform: translateY(-1px);
}

.btn-action-hide {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}

.btn-action-hide:hover {
  background: #d97706;
  color: #ffffff;
  border-color: #d97706;
  box-shadow: 0 2px 4px rgba(217, 119, 6, 0.25);
  transform: translateY(-1px);
}

.btn-action-show {
  background: #ecfdf5;
  color: #059669;
  border-color: #a7f3d0;
}

.btn-action-show:hover {
  background: #059669;
  color: #ffffff;
  border-color: #059669;
  box-shadow: 0 2px 4px rgba(5, 150, 105, 0.25);
  transform: translateY(-1px);
}

.btn-action-transfer {
  background: #f5f3ff;
  color: #7c3aed;
  border-color: #ddd6fe;
}

.btn-action-transfer:hover {
  background: #7c3aed;
  color: #ffffff;
  border-color: #7c3aed;
  box-shadow: 0 2px 4px rgba(124, 58, 237, 0.25);
  transform: translateY(-1px);
}

/* Floating Tooltip Component (Keterangan Mengambang) */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 1px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  border: 5px solid transparent;
  border-top-color: #0f172a;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #0f172a;
  color: #ffffff;
  padding: 5px 9px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  line-height: 1.2;
}

[data-tooltip]:hover::before,
[data-tooltip]:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Form Controls */
.admin-form-group {
  margin-bottom: 20px;
}

.admin-form-group label {
  display: block;
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 8px;
  color: #1e293b;
}

.admin-form-control {
  width: 100%;
  padding: 11px 15px;
  background-color: #ffffff;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  color: #0f172a;
  font-size: 0.92rem;
  outline: none;
  transition: all 0.2s;
}

.admin-form-control:focus {
  border-color: var(--admin-red);
  box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.12);
}

/* Password Toggle Input Group */
.password-input-group {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-input-group .admin-form-control {
  padding-right: 44px;
}

.btn-toggle-password {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 6px 8px;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.15s, background-color 0.15s;
  user-select: none;
}

.btn-toggle-password:hover {
  color: #0f172a;
  background-color: #f1f5f9;
}

.btn-toggle-password svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* Modern Badges with Indicator Dot */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.badge-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: currentColor;
  display: inline-block;
}

.badge-published,
.badge-active {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.badge-draft,
.badge-inactive {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.badge-pending {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}

.badge-admin {
  background: #eff6ff;
  color: #0284c7;
  border: 1px solid #bae6fd;
}

.badge-editor {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.badge-super {
  background: linear-gradient(135deg, #e50914, #7c3aed);
  color: #ffffff;
  border: none;
  box-shadow: 0 2px 4px rgba(124, 58, 237, 0.2);
}

.badge-super::before {
  display: none;
}

/* Alerts */
.admin-alert {
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 24px;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-alert-success {
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.admin-alert-error {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

/* Pagination Wrapper & Smart Pagination */
.table-pagination-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--admin-border-subtle);
}

.pagination-info {
  font-size: 0.85rem;
  color: var(--admin-text-muted);
  font-weight: 500;
}

.pagination-info strong {
  color: var(--admin-text);
  font-weight: 700;
}

.pagination {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  flex-wrap: wrap;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  background-color: #ffffff;
  border: 1px solid var(--admin-border);
  color: #334155;
  font-weight: 700;
  font-size: 0.82rem;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.page-link:hover {
  background-color: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

.page-link.active {
  background-color: var(--admin-red);
  border-color: var(--admin-red);
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(229, 9, 20, 0.25);
}

.page-link.disabled {
  pointer-events: none;
  opacity: 0.45;
  background-color: #f8fafc;
  color: #94a3b8;
}

.page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 34px;
  color: #94a3b8;
  font-weight: 700;
  font-size: 0.85rem;
}

/* Sidebar Toggle Button (Desktop hidden) */
.sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background-color: #f1f5f9;
  border: 1px solid var(--admin-border);
  color: var(--admin-text);
  cursor: pointer;
  outline: none;
  transition: all 0.2s;
}

.sidebar-toggle:hover {
  background-color: #e2e8f0;
}

.sidebar-toggle svg {
  width: 20px;
  height: 20px;
}

/* Sidebar Overlay (Backdrop) */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.show {
  display: block;
  opacity: 1;
}

/* Table Empty State */
.table-empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--admin-text-muted);
}

.table-empty-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 12px;
  opacity: 0.45;
  color: var(--admin-text-muted);
}

.table-empty-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #1e293b;
  margin-bottom: 4px;
}

.table-empty-desc {
  font-size: 0.84rem;
  color: #64748b;
}

/* Topbar defaults */
/* Topbar defaults */
.topbar-left {
  display: none;
}

.topbar-brand-mobile {
  display: none;
}

.topbar-user-wrapper {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  min-width: 0;
}

.topbar-user-info {
  text-align: right;
  min-width: 0;
}

.user-fullname {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--admin-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.user-role {
  font-size: 0.76rem;
  color: var(--admin-text-muted);
  text-transform: uppercase;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-topbar-logout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
  white-space: nowrap;
  border-radius: 8px;
}

.topbar-title-wrapper {
  flex: 1;
  min-width: 0;
}

.topbar-page-title {
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--admin-text);
  letter-spacing: -0.3px;
  line-height: 1.3;
  margin: 0;
}

/* ==========================================================================
   Admin Horizontal Tabs Navigation Component (Scrollable & Responsive)
   ========================================================================== */
.admin-tabs-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--admin-border);
  padding-bottom: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  white-space: nowrap;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.admin-tabs-nav::-webkit-scrollbar {
  display: none;
}

.admin-tab-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  color: var(--admin-text-muted);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 8px 8px 0 0;
}

.admin-tab-item:hover {
  color: var(--admin-text);
  background: rgba(0, 0, 0, 0.025);
}

.admin-tab-item.active {
  color: var(--admin-red);
  border-bottom-color: var(--admin-red);
  background: rgba(229, 9, 20, 0.04);
}

/* ==========================================================================
   Semantic Admin Responsive Grids
   ========================================================================== */
.admin-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.admin-grid-sidebar {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 28px;
}

.admin-grid-preview {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
}

.admin-grid-smtp {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
}

/* Responsive Styles */
@media (max-width: 992px) {
  .admin-grid-sidebar,
  .admin-grid-preview,
  .admin-grid-smtp {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
}

@media (max-width: 900px) {
  .admin-sidebar {
    position: fixed;
    top: 0;
    left: -260px;
    bottom: 0;
    z-index: 100;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .admin-sidebar.show {
    left: 0;
  }

  .sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: #f1f5f9;
    border: 1px solid var(--admin-border);
    cursor: pointer;
    flex-shrink: 0;
    color: var(--admin-text);
  }

  /* Responsive Topbar (Clean 1-Row Header) */
  .admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    min-height: 56px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }

  .topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
  }

  .topbar-brand-mobile {
    display: flex;
    align-items: center;
  }

  .topbar-brand-mobile .admin-brand-badge {
    font-size: 0.74rem;
    padding: 5px 10px;
    letter-spacing: 0.5px;
  }

  /* Hide redundant title wrapper on mobile topbar */
  .topbar-title-wrapper {
    display: none !important;
  }

  .topbar-user-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    flex-shrink: 0;
  }

  .topbar-user-info {
    text-align: right;
    max-width: 130px;
  }

  .admin-content {
    padding: 20px 16px;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .admin-grid-2 {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* Responsive Grid Forms */
  .admin-card-box form div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
}

@media (max-width: 680px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
  }

  .stat-card {
    padding: 14px 16px;
    border-radius: 10px;
  }

  .stat-info h3 {
    font-size: 1.45rem;
    margin-bottom: 2px;
  }

  .stat-info p {
    font-size: 0.78rem;
  }

  .stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
  }

  .stat-icon svg {
    width: 20px;
    height: 20px;
  }

  .card-box-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .admin-card-box {
    padding: 16px 14px;
    border-radius: 10px;
    margin-bottom: 20px;
  }
}

@media (max-width: 600px) {
  .admin-topbar {
    padding: 8px 12px;
    min-height: 52px;
  }

  .topbar-user-info {
    display: none; /* Hide username on small phones to keep clean header: [ ☰ ] [ INFOMINANG ] ------- [ 🚪 Keluar ] */
  }

  .btn-topbar-logout {
    padding: 6px 11px;
    font-size: 0.8rem;
    gap: 4px;
  }
}

@media (max-width: 480px) {
  .admin-content {
    padding: 14px 10px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .admin-tab-item {
    padding: 10px 14px;
    font-size: 0.85rem;
    gap: 6px;
  }

  .admin-alert {
    padding: 12px 14px;
    font-size: 0.84rem;
  }

  /* Form controls */
  .admin-form-control {
    padding: 9px 11px;
    font-size: 0.88rem;
  }

  .admin-pagination {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
}

/* ==========================================================================
   Professional Toast & Pop-up Notification System
   ========================================================================== */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  max-width: 420px;
  width: calc(100% - 32px);
}

.toast-item {
  pointer-events: auto;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #ffffff;
  padding: 16px 18px 18px 16px;
  border-radius: 14px;
  box-shadow: 
    0 20px 25px -5px rgba(15, 23, 42, 0.14),
    0 8px 10px -6px rgba(15, 23, 42, 0.08),
    0 0 0 1px rgba(15, 23, 42, 0.08);
  color: #0f172a;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: top right;
  opacity: 0;
  transform: translateY(-16px) scale(0.94);
  cursor: default;
}

.toast-item.toast-show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast-item.toast-hide {
  opacity: 0;
  transform: translateY(-12px) scale(0.92);
  margin-top: -60px;
  pointer-events: none;
}

.toast-icon-wrapper {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.toast-icon-wrapper svg {
  width: 20px;
  height: 20px;
}

/* Success Type */
.toast-success .toast-icon-wrapper {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}
.toast-success .toast-progress-bar {
  background: linear-gradient(90deg, #10b981, #059669);
}

/* Error / Danger Type */
.toast-error .toast-icon-wrapper {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}
.toast-error .toast-progress-bar {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

/* Warning Type */
.toast-warning .toast-icon-wrapper {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}
.toast-warning .toast-progress-bar {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

/* Info Type */
.toast-info .toast-icon-wrapper {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}
.toast-info .toast-progress-bar {
  background: linear-gradient(90deg, #0284c7, #0369a1);
}

.toast-content {
  flex: 1;
  min-width: 0;
  padding-right: 18px;
}

.toast-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 3px;
  letter-spacing: -0.2px;
  line-height: 1.3;
}

.toast-message {
  font-size: 0.86rem;
  color: #475569;
  line-height: 1.45;
  word-break: break-word;
  font-weight: 500;
}

.toast-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
}

.toast-close:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(0, 0, 0, 0.05);
}

.toast-progress-bar {
  height: 100%;
  width: 100%;
  transform-origin: left;
  transition: transform linear;
}

@media (max-width: 640px) {
  .toast-container {
    top: 14px;
    left: 16px;
    right: 16px;
    max-width: 100%;
    width: auto;
  }
}

/* ==========================================================================
   Admin Modal Dialog Component
   ========================================================================== */
.admin-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-modal-backdrop.show {
  opacity: 1;
  visibility: visible;
}

.admin-modal-dialog {
  background: #ffffff;
  width: 100%;
  max-width: 580px;
  border-radius: 16px;
  box-shadow: 
    0 25px 50px -12px rgba(15, 23, 42, 0.25),
    0 0 0 1px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(-16px) scale(0.96);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh;
}

.admin-modal-backdrop.show .admin-modal-dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.admin-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
}

.admin-modal-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-modal-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.admin-modal-icon svg {
  width: 20px;
  height: 20px;
}

.admin-modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  line-height: 1.2;
}

.admin-modal-subtitle {
  font-size: 0.82rem;
  color: var(--admin-text-muted);
  margin-top: 2px;
}

.admin-modal-close {
  background: transparent;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
}

.admin-modal-close:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.admin-modal-body {
  padding: 24px;
  overflow-y: auto;
}

.admin-modal-footer {
  padding: 16px 24px;
  background: #f8fafc;
  border-top: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* Category Badges & Mutation Card */
.badge-status-active {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.badge-status-hidden {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.mutate-preview-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px;
  margin-top: 16px;
  margin-bottom: 8px;
}

.mutate-flow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.mutate-node {
  flex: 1;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px 12px;
  text-align: center;
}

.mutate-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f5f3ff;
  color: #7c3aed;
  border: 1px solid #ddd6fe;
  flex-shrink: 0;
}

/* ==========================================================================
   Modern Executive Custom Confirmation Modal System
   ========================================================================== */
.custom-confirm-modal-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-confirm-modal-wrapper.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.custom-confirm-modal-wrapper.is-closing {
  opacity: 0;
  pointer-events: none;
}

.confirm-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.confirm-modal-card {
  position: relative;
  z-index: 10;
  background: #ffffff;
  border-radius: 20px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(226, 232, 240, 0.9);
  padding: 32px 28px 26px 28px;
  text-align: center;
  transform: scale(0.92) translateY(12px);
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.22s ease-out;
  box-sizing: border-box;
}

.custom-confirm-modal-wrapper.is-visible .confirm-modal-card {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.custom-confirm-modal-wrapper.is-closing .confirm-modal-card {
  transform: scale(0.94) translateY(8px);
  opacity: 0;
}

.confirm-modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  transition: all 0.2s ease;
}

.confirm-modal-close:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.confirm-modal-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  position: relative;
  animation: pulseConfirmIcon 2s infinite;
}

@keyframes pulseConfirmIcon {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.confirm-modal-icon.confirm-modal-danger {
  background: #fee2e2;
  color: #dc2626;
  box-shadow: 0 0 0 8px rgba(254, 226, 226, 0.6);
}

.confirm-modal-icon.confirm-modal-warning {
  background: #fef3c7;
  color: #d97706;
  box-shadow: 0 0 0 8px rgba(254, 243, 199, 0.6);
}

.confirm-modal-icon.confirm-modal-primary {
  background: #fee2e2;
  color: #e50914;
  box-shadow: 0 0 0 8px rgba(229, 9, 20, 0.15);
}

.confirm-modal-title {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 10px 0;
  letter-spacing: -0.01em;
}

.confirm-modal-message {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 0.94rem;
  line-height: 1.6;
  color: #475569;
  margin: 0 0 26px 0;
  word-break: break-word;
}

.confirm-modal-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.btn-confirm-cancel {
  flex: 1;
  max-width: 160px;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-confirm-cancel:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.btn-confirm-accept {
  flex: 1;
  max-width: 200px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  padding: 12px 24px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.btn-confirm-accept:hover {
  transform: translateY(-2px);
}

.btn-confirm-accept.btn-confirm-danger {
  background: linear-gradient(135deg, #e50914 0%, #b91c1c 100%);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(229, 9, 20, 0.35);
}

.btn-confirm-accept.btn-confirm-danger:hover {
  box-shadow: 0 6px 20px rgba(229, 9, 20, 0.45);
}

.btn-confirm-accept.btn-confirm-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
}

.btn-confirm-accept.btn-confirm-primary {
  background: linear-gradient(135deg, #e50914 0%, #b91c1c 100%);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(229, 9, 20, 0.35);
}

@media (max-width: 480px) {
  .confirm-modal-card {
    padding: 24px 20px 20px 20px;
  }
  .confirm-modal-footer {
    flex-direction: column-reverse;
    gap: 10px;
  }
  .btn-confirm-cancel,
  .btn-confirm-accept {
    max-width: 100%;
    width: 100%;
  }
}