/* ============================================================
   AN CODE® CMS STUDIO — PURE LIGHT MODE ADMIN DASHBOARD
   Design Language: Pure Light (#ffffff / #f8fafc), Chamfer Geometry, Electric Blue Accent
   ============================================================ */

/* ── Standalone Admin View Body State ── */
body.is-admin-view {
  background-color: #f8fafc !important;
  color: #0f172a !important;
  overflow: auto !important;
}

body.is-admin-view .hero,
body.is-admin-view .header,
body.is-admin-view .footer,
body.is-admin-view #footer,
body.is-admin-view .loading-screen,
body.is-admin-view .mobile-nav-drawer,
body.is-admin-view .scroll-down-container,
body.is-admin-view .main-body-wrapper > *:not(#admin-dashboard) {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

body.is-admin-view .main-body-wrapper {
  margin-top: 0 !important;
  clip-path: none !important;
  padding-top: 0 !important;
  background: #f8fafc !important;
}

/* ── Admin Dashboard Root Container (Full Screen on Top of Everything) ── */
.admin-dashboard-section {
  width: 100vw;
  height: 100vh;
  background: #f8fafc;
  display: flex;
  position: relative;
  z-index: 999999;
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
  box-sizing: border-box;
  overflow: hidden;
}

body.is-admin-view .admin-dashboard-section {
  display: flex !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 999999 !important;
  overflow: hidden !important;
  background: #f8fafc !important;
}

.admin-layout-wrap {
  display: flex;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

/* ============================================================
   1. HIGH-TECH SIDEBAR NAVIGATION (Pure Light Mode)
   ============================================================ */
.admin-sidebar {
  width: 280px;
  background: #ffffff;
  border-right: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 50;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s ease;
  flex-shrink: 0;
  box-sizing: border-box;
}

.admin-sidebar-top {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Sidebar Brand Header */
.admin-brand-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid #edf2f9;
}

.admin-brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.admin-logo-img {
  height: 32px;
  width: auto;
  object-fit: contain;
}

.admin-brand-text {
  display: flex;
  flex-direction: column;
}

.admin-brand-name {
  font-family: "Black Ops One", system-ui;
  font-size: 15px;
  color: #0a0a0a;
  letter-spacing: 0.5px;
  line-height: 1.1;
}

.admin-brand-badge {
  font-family: "DM Sans", monospace;
  font-size: 10px;
  font-weight: 700;
  color: #1c59c3;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.admin-sidebar-close-btn {
  display: none;
  background: transparent;
  border: none;
  font-size: 18px;
  color: #64748b;
  cursor: pointer;
}

/* Sidebar Navigation Menu */
.admin-nav-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-nav-item {
  width: 100%;
}

.admin-nav-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 18px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0;
  clip-path: polygon(
    0 0,
    calc(100% - 8px) 0,
    100% 8px,
    100% 100%,
    0 100%
  );
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  box-sizing: border-box;
}

.admin-nav-btn-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-nav-btn i {
  font-size: 16px;
  color: #64748b;
  width: 20px;
  text-align: center;
  transition: color 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-nav-btn:hover {
  background: #f1f5f9;
  color: #0a0a0a;
  border-color: #e2e8f0;
  transform: translateX(4px);
}

.admin-nav-btn:hover i {
  color: #1c59c3;
  transform: translateX(3px);
}

.admin-nav-btn.active {
  background: #eff6ff;
  color: #1c59c3;
  border-color: #bfdbfe;
  box-shadow: 0 2px 10px rgba(28, 89, 195, 0.12);
  font-weight: 700;
}

.admin-nav-btn.active i {
  color: #1c59c3;
}

.admin-nav-counter {
  font-family: "Black Ops One", monospace;
  font-size: 11px;
  background: #e2e8f0;
  color: #334155;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 400;
}

.admin-nav-btn.active .admin-nav-counter {
  background: #1c59c3;
  color: #ffffff;
}

/* Sidebar Bottom User & Exit Box */
.admin-sidebar-bottom {
  padding: 20px;
  border-top: 1px solid #edf2f9;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #fafcff;
}

.admin-user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.admin-user-info {
  display: flex;
  flex-direction: column;
}

.admin-user-name {
  font-family: "Black Ops One", system-ui;
  font-size: 13.5px;
  color: #0a0a0a;
}

.admin-user-role {
  font-size: 11px;
  color: #10b981;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
}

.admin-user-role::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
}

.admin-exit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 18px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 0;
  clip-path: polygon(
    0 0,
    calc(100% - 8px) 0,
    100% 8px,
    100% 100%,
    0 100%
  );
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.admin-exit-btn i {
  color: #1c59c3;
  transition: transform 0.3s ease, color 0.3s ease;
}

.admin-exit-btn:hover {
  background: #1c59c3;
  color: #ffffff;
  border-color: #1c59c3;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(28, 89, 195, 0.3);
}

.admin-exit-btn:hover i {
  color: #ffffff;
  transform: translateX(3px);
}

/* ============================================================
   2. MAIN ADMIN CONTENT WORKSPACE
   ============================================================ */
.admin-main-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  height: 100vh;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* Custom Scrollbars for Admin Main Content and Sidebar */
.admin-main-content::-webkit-scrollbar,
.admin-sidebar::-webkit-scrollbar,
.admin-modal-body::-webkit-scrollbar {
  width: 8px;
  height: 8px;
  display: block !important;
}

.admin-main-content::-webkit-scrollbar-track,
.admin-sidebar::-webkit-scrollbar-track,
.admin-modal-body::-webkit-scrollbar-track {
  background: #f1f5f9;
}

.admin-main-content::-webkit-scrollbar-thumb,
.admin-sidebar::-webkit-scrollbar-thumb,
.admin-modal-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.admin-main-content::-webkit-scrollbar-thumb:hover,
.admin-sidebar::-webkit-scrollbar-thumb:hover,
.admin-modal-body::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Top App Bar */
.admin-top-bar {
  height: 70px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 40;
  flex-shrink: 0;
}

.admin-top-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.admin-menu-toggle-btn {
  display: none;
  background: transparent;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 16px;
  color: #334155;
  cursor: pointer;
}

.admin-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: #64748b;
  font-weight: 500;
}

.admin-breadcrumb strong {
  color: #0a0a0a;
  font-weight: 700;
}

.admin-top-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.admin-preview-site-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 22px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  border-radius: 0;
  clip-path: polygon(
    0 0,
    calc(100% - 8px) 0,
    100% 8px,
    100% 100%,
    0 100%
  );
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.admin-preview-site-btn i {
  color: #1c59c3;
  transition: transform 0.3s ease, color 0.3s ease;
}

.admin-preview-site-btn:hover {
  background: #1c59c3;
  color: #ffffff;
  border-color: #1c59c3;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(28, 89, 195, 0.3);
}

.admin-preview-site-btn:hover i {
  color: #ffffff;
  transform: translateX(2px) translateY(-1px);
}

.admin-quick-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 22px;
  background: #1c59c3;
  color: #ffffff;
  border: 1px solid #1c59c3;
  border-radius: 0;
  clip-path: polygon(
    0 0,
    calc(100% - 8px) 0,
    100% 8px,
    100% 100%,
    0 100%
  );
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(28, 89, 195, 0.35);
}

.admin-quick-add-btn i {
  transition: transform 0.3s ease;
}

.admin-quick-add-btn:hover {
  background: #15459e;
  border-color: #15459e;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(28, 89, 195, 0.45);
}

.admin-quick-add-btn:hover i {
  transform: rotate(90deg);
}

/* Workspace Canvas View */
.admin-workspace {
  padding: 32px 40px;
  flex: 1;
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.admin-tab-pane {
  display: none;
  width: 100%;
  animation: adminFadeIn 0.3s ease-out;
}

.admin-tab-pane.active {
  display: block;
}

@keyframes adminFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Section Page Header Block */
.admin-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}

.admin-page-title-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-page-title {
  font-family: "Black Ops One", system-ui;
  font-size: 26px;
  color: #0a0a0a;
  letter-spacing: -0.3px;
  margin: 0;
}

.admin-page-subtitle {
  font-size: 14px;
  color: #64748b;
  margin: 0;
}

/* ============================================================
   3. OVERVIEW & ANALYTICS CHARTS TAB
   ============================================================ */
/* Metric Counter Cards Grid */
.admin-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.admin-metric-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 22px 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.admin-metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.admin-metric-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-metric-label {
  font-size: 12.5px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-metric-value {
  font-family: "Black Ops One", system-ui;
  font-size: 28px;
  color: #0a0a0a;
  line-height: 1.1;
}

.admin-metric-trend {
  font-size: 11.5px;
  font-weight: 700;
  color: #10b981;
  display: flex;
  align-items: center;
  gap: 4px;
}

.admin-metric-trend.down {
  color: #ef4444;
}

.admin-metric-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: #eff6ff;
  color: #1c59c3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

/* Charts Grid (Light Mode) */
.admin-charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
}

.admin-chart-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
}

.admin-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.admin-chart-title {
  font-family: "Black Ops One", system-ui;
  font-size: 16px;
  color: #0a0a0a;
  letter-spacing: 0.2px;
  margin: 0;
}

.admin-chart-filter-pills {
  display: flex;
  gap: 6px;
}

.admin-chart-pill {
  padding: 4px 10px;
  background: #f1f5f9;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-chart-pill.active {
  background: #1c59c3;
  color: #ffffff;
}

.admin-chart-body {
  position: relative;
  height: 280px;
  width: 100%;
}

/* Recent Activity Log & Quick System Status */
.admin-bottom-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.admin-panel-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.admin-activity-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13.5px;
  color: #334155;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.admin-activity-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.admin-activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1c59c3;
  margin-top: 6px;
  flex-shrink: 0;
}

.admin-activity-time {
  font-size: 11.5px;
  color: #94a3b8;
  margin-left: auto;
  flex-shrink: 0;
}

/* ============================================================
   4. DATA TABLES & CRUD LISTINGS (Projects & Blog)
   ============================================================ */
.admin-table-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.admin-search-input-wrap {
  position: relative;
  flex: 1;
  max-width: 380px;
  min-width: 240px;
}

.admin-search-input-wrap i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 14px;
}

.admin-search-input {
  width: 100%;
  padding: 10px 16px 10px 38px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
  font-size: 13.5px;
  color: #0f172a;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.admin-search-input:focus {
  border-color: #1c59c3;
  box-shadow: 0 0 0 3px rgba(28, 89, 195, 0.12);
}

.admin-filter-select {
  padding: 10px 16px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-family: "DM Sans", system-ui;
  font-size: 13.5px;
  font-weight: 600;
  color: #334155;
  outline: none;
  cursor: pointer;
}

.admin-table-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  overflow-x: auto;
  overflow-y: hidden;
}

.admin-data-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}

.admin-data-table th {
  background: #f8fafc;
  padding: 15px 20px;
  font-family: "Black Ops One", system-ui;
  font-size: 11.5px;
  color: #64748b;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

.admin-data-table td {
  padding: 16px 20px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.admin-data-table tr:hover td {
  background: #fafcff;
}

.admin-idx-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.admin-table-idx-badge {
  display: inline-block;
  font-family: "Black Ops One", system-ui;
  font-size: 12px;
  color: #1c59c3;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
  user-select: none;
}

.admin-table-idx-badge:hover {
  background: #1c59c3;
  color: #ffffff;
  border-color: #1c59c3;
  transform: scale(1.05);
}

.admin-table-item-cell {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 260px;
}

.admin-table-thumb {
  width: 48px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
  cursor: zoom-in;
  transition: transform 0.2s ease;
}

.admin-table-thumb:hover {
  transform: scale(1.08);
}

/* ── Mouse-following Image Preview Tooltip ── */
#adminImgPreviewTooltip {
  position: fixed;
  z-index: 99999;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, visibility 0.18s ease;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255,255,255,0.12);
  width: 300px;
  height: 190px;
  top: 0;
  left: 0;
  will-change: transform, opacity;
}

#adminImgPreviewTooltip.is-visible {
  opacity: 1;
  visibility: visible;
}

#adminImgPreviewTooltip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 14px;
}

.admin-table-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
  max-width: 380px;
}

.admin-table-title {
  font-family: "DM Sans", system-ui;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 360px;
}

.admin-table-meta-sub {
  font-size: 11.5px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 360px;
}

.admin-category-badge {
  display: inline-block;
  padding: 4px 10px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1c59c3;
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.admin-category-badge.cat-store {
  background: #faf5ff;
  border-color: #e9d5ff;
  color: #7e22ce;
}

.admin-category-badge.cat-landing-page,
.admin-category-badge.cat-landing {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #15803d;
}

.admin-category-badge.cat-website,
.admin-category-badge.cat-web {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1c59c3;
}

.admin-table-live-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: #1c59c3;
  background: #f0f7ff;
  border: 1px solid rgba(28, 89, 195, 0.2);
  border-radius: 5px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.admin-table-live-btn:hover {
  background: #1c59c3;
  color: #ffffff;
  border-color: #1c59c3;
  box-shadow: 0 4px 10px rgba(28, 89, 195, 0.25);
}

.admin-table-no-link {
  color: #cbd5e1;
  font-weight: bold;
  font-size: 14px;
}

.admin-status-badge.published {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #10b981;
  background: #ecfdf5;
  padding: 3px 8px;
  border-radius: 20px;
  border: 1px solid #a7f3d0;
}

.admin-status-badge.published i {
  font-size: 6.5px;
}

.admin-action-btn.swap {
  color: #1c59c3;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.admin-action-btn.swap:hover {
  background: #1c59c3;
  color: #ffffff;
  border-color: #1c59c3;
  transform: scale(1.08);
}

.admin-swap-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #1c59c3;
  background: #ffffff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-swap-nav-btn:hover {
  background: #1c59c3;
  color: #ffffff;
  border-color: #1c59c3;
  box-shadow: 0 4px 12px rgba(28, 89, 195, 0.25);
}

.admin-actions-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-action-btn {
  width: 36px;
  height: 36px;
  border-radius: 0;
  clip-path: polygon(
    0 0,
    calc(100% - 6px) 0,
    100% 6px,
    100% 100%,
    0 100%
  );
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13.5px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.admin-action-btn:hover {
  transform: translateY(-2px);
}

.admin-action-btn.edit:hover {
  background: #1c59c3;
  color: #ffffff;
  border-color: #1c59c3;
  box-shadow: 0 6px 16px rgba(28, 89, 195, 0.35);
}

.admin-action-btn.delete:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.35);
}

.admin-modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(15, 23, 42, 0.75) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  z-index: 99999999 !important;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.admin-modal-overlay.active {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.admin-modal-dialog {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  width: 95%;
  max-width: 1040px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  position: relative;
  margin: auto;
}

.admin-modal-overlay.active .admin-modal-dialog {
  transform: translateY(0);
}

.admin-modal-header {
  padding: 20px 28px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.admin-modal-title {
  font-family: "Black Ops One", system-ui;
  font-size: 18px;
  color: #0a0a0a;
  margin: 0;
}

.admin-modal-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  font-size: 14px;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-modal-close-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #ef4444;
  transform: rotate(90deg) scale(1.05);
}

.admin-modal-body {
  padding: 28px;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  flex: 1 1 auto;
  min-height: 0;
  max-height: calc(88vh - 140px);
  background: #ffffff;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.admin-modal-footer {
  padding: 16px 28px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-shrink: 0;
}

/* Form Controls & High-Tech Inputs */
.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.admin-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-form-group.full-width {
  grid-column: 1 / -1;
}

.admin-form-label {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-form-input,
.admin-form-select,
.admin-form-textarea {
  width: 100%;
  padding: 11px 16px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  color: #0f172a;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.admin-form-input:focus,
.admin-form-select:focus,
.admin-form-textarea:focus {
  border-color: #1c59c3;
  box-shadow: 0 0 0 3px rgba(28, 89, 195, 0.12);
}

.admin-form-textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.6;
}

/* Drag & Drop Media Upload Area */
.admin-dropzone-box {
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}

.admin-dropzone-box:hover,
.admin-dropzone-box.drag-over {
  border-color: #1c59c3;
  background: #eff6ff;
}

.admin-dropzone-icon {
  font-size: 32px;
  color: #1c59c3;
  margin-bottom: 10px;
}

.admin-dropzone-text {
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  margin: 0 0 4px 0;
}

.admin-dropzone-sub {
  font-size: 12px;
  color: #64748b;
  margin: 0;
}

.admin-dropzone-preview {
  margin-top: 14px;
  max-height: 160px;
  border-radius: 8px;
  display: none;
  object-fit: contain;
  margin-left: auto;
  margin-right: auto;
}

.admin-dropzone-success-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  color: #059669;
  margin-top: 10px;
  animation: adminFadeIn 0.3s ease-out;
}

.admin-dim-badge {
  font-size: 11px;
  font-weight: 700;
  color: #1c59c3;
  background: rgba(28, 89, 195, 0.08);
  border: 1px solid rgba(28, 89, 195, 0.2);
  padding: 2px 8px;
  border-radius: 12px;
  margin-left: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Dual Upload Switcher (File vs URL) */
.admin-media-input-toggle {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.admin-toggle-btn {
  padding: 8px 18px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 0;
  clip-path: polygon(
    0 0,
    calc(100% - 6px) 0,
    100% 6px,
    100% 100%,
    0 100%
  );
  font-family: "DM Sans", system-ui;
  font-size: 12.5px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-toggle-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

.admin-toggle-btn.active {
  background: #1c59c3;
  color: #ffffff;
  border-color: #1c59c3;
  box-shadow: 0 2px 8px rgba(28, 89, 195, 0.3);
}

/* Action Buttons */
.admin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 26px;
  border-radius: 0;
  clip-path: polygon(
    0 0,
    calc(100% - 8px) 0,
    100% 8px,
    100% 100%,
    0 100%
  );
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
  text-decoration: none;
}

.admin-btn.btn-primary {
  background: #1c59c3;
  color: #ffffff;
  border-color: #1c59c3;
  box-shadow: 0 4px 14px rgba(28, 89, 195, 0.35);
}

.admin-btn.btn-primary:hover {
  background: #15459e;
  border-color: #15459e;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(28, 89, 195, 0.45);
}

.admin-btn.btn-secondary {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.admin-btn.btn-secondary:hover {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.25);
}

.admin-btn.btn-danger {
  background: #ef4444;
  border-color: #ef4444;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

.admin-btn.btn-danger:hover {
  background: #dc2626;
  border-color: #dc2626;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.45);
}

/* ============================================================
   6. SEO & MEDIA VAULT TABS
   ============================================================ */
/* Google Search & Social Snippet Previews */
.admin-snippet-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  margin-top: 14px;
}

.admin-google-preview-title {
  font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 18px;
  color: #1a0dab;
  text-decoration: underline;
  cursor: pointer;
  margin: 0 0 4px 0;
}

.admin-google-preview-url {
  font-size: 13px;
  color: #006621;
  margin: 0 0 6px 0;
}

.admin-google-preview-desc {
  font-size: 13.5px;
  color: #4d5156;
  line-height: 1.5;
  margin: 0;
}

/* Media Library Cards Grid */
.admin-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.admin-media-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
}

.admin-media-thumb-wrap {
  height: 130px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid #edf2f9;
}

.admin-media-thumb-wrap img,
.admin-media-thumb-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-media-info {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-media-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-media-meta {
  font-size: 11px;
  color: #64748b;
  display: flex;
  justify-content: space-between;
}

.admin-media-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.admin-media-copy-btn {
  flex: 1;
  padding: 8px 12px;
  font-size: 11.5px;
  font-weight: 700;
  font-family: "DM Sans", system-ui, sans-serif;
  background: #ffffff;
  border: 1px solid #bfdbfe;
  color: #1c59c3;
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 5px) 0, 100% 5px, 100% 100%, 0 100%);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-media-copy-btn:hover {
  background: #1c59c3;
  color: #ffffff;
  border-color: #1c59c3;
  box-shadow: 0 4px 12px rgba(28, 89, 195, 0.3);
  transform: translateY(-1px);
}

/* ============================================================
   7. RESPONSIVE DASHBOARD MEDIA QUERIES
   ============================================================ */
@media (max-width: 1024px) {
  .admin-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .admin-charts-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .admin-bottom-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .admin-workspace {
    padding: 24px 20px;
  }
  .admin-tab-pane#adminTab_seo > div {
    grid-template-columns: 1fr !important;
  }
  .admin-tab-pane#adminTab_settings > div {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 768px) {
  .admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 280px;
    transform: translateX(-100%);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.2);
    z-index: 100000;
  }
  .admin-sidebar.mobile-open {
    transform: translateX(0);
  }
  .admin-sidebar-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .admin-menu-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .admin-top-bar {
    padding: 0 16px;
    height: 60px;
  }
  .admin-top-right .admin-preview-site-btn span,
  .admin-top-right .admin-quick-add-btn span {
    display: none;
  }
  .admin-top-right .admin-preview-site-btn,
  .admin-top-right .admin-quick-add-btn {
    padding: 8px 12px;
  }
  .admin-workspace {
    padding: 16px 12px;
  }
  .admin-page-header {
    margin-bottom: 20px;
  }
  .admin-page-title {
    font-size: 20px;
  }
  .admin-metrics-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .admin-form-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .admin-table-card {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .admin-data-table {
    min-width: 580px;
  }
  .admin-modal-overlay {
    padding: 12px;
  }
  .admin-modal-dialog {
    max-height: 94vh;
    margin: auto;
    border-radius: 12px;
  }
  .admin-modal-header,
  .admin-modal-body,
  .admin-modal-footer {
    padding: 16px;
  }
  .admin-auth-card {
    padding: 28px 20px;
    max-width: calc(100vw - 32px);
  }
  #adminCredentialsForm {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {
  .admin-chart-body {
    height: 220px;
  }
  .admin-media-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .admin-page-title {
    font-size: 18px;
  }
  .admin-table-controls {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ============================================================
   8. ADMIN AUTHENTICATION LOGIN MODAL (Pure Light Mode)
   ============================================================ */
.admin-auth-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  padding: 36px 32px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  position: relative;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-auth-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
}

.admin-auth-close-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #ef4444;
  transform: rotate(90deg) scale(1.05);
}

.admin-auth-header {
  text-align: center;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.admin-auth-lock-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1c59c3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 14px;
}

.admin-auth-title {
  font-family: "Black Ops One", system-ui;
  font-size: 20px;
  color: #0a0a0a;
  margin: 0 0 6px 0;
  letter-spacing: 0.3px;
}

.admin-auth-subtitle {
  font-size: 13px;
  color: #64748b;
  margin: 0;
}

.admin-auth-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #ef4444;
  font-size: 12.5px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 18px;
  display: none;
  align-items: center;
  gap: 8px;
}

.admin-password-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.admin-pass-toggle-btn {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  font-size: 15px;
  transition: color 0.2s ease;
}

.admin-pass-toggle-btn:hover {
  color: #1c59c3;
}

.admin-auth-remember-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0 24px 0;
  font-size: 13px;
  color: #475569;
}

.admin-auth-remember-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.admin-auth-submit-btn {
  width: 100%;
  padding: 14px 28px;
  background: #1c59c3;
  color: #ffffff;
  border: 1px solid #1c59c3;
  border-radius: 0;
  clip-path: polygon(
    0 0,
    calc(100% - 10px) 0,
    100% 10px,
    100% 100%,
    0 100%
  );
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 15px rgba(28, 89, 195, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.admin-auth-submit-btn:hover {
  background: #15459e;
  border-color: #15459e;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(28, 89, 195, 0.45);
}

.admin-auth-submit-btn i {
  transition: transform 0.3s ease;
}

.admin-auth-submit-btn:hover i {
  transform: translateX(4px);
}

.admin-auth-back-btn {
  margin-top: 18px;
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  font-family: "DM Sans", system-ui, sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s ease;
}

.admin-auth-back-btn:hover {
  color: #1c59c3;
  transform: translateX(-2px);
}

@keyframes authShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.shake-auth {
  animation: authShake 0.4s ease-in-out;
}


/* ── Reorder Controls & Drag-and-Drop in Projects Studio ── */
.admin-reorder-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.admin-drag-handle {
  color: #94a3b8;
  cursor: grab;
  padding: 4px 6px;
  font-size: 14px;
  transition: color 0.2s ease, transform 0.2s ease;
}
.admin-drag-handle:hover {
  color: #1c59c3;
  transform: scale(1.15);
}

.admin-draggable-row {
  transition: background-color 0.2s ease;
}
.admin-draggable-row.is-dragging {
  opacity: 0.45;
  background: #eff6ff !important;
  outline: 2px dashed #1c59c3;
}
.admin-draggable-row.drag-over-top {
  border-top: 3px solid #1c59c3 !important;
}
.admin-draggable-row.drag-over-bottom {
  border-bottom: 3px solid #1c59c3 !important;
}

.admin-reorder-btn-group {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.admin-reorder-btn {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #475569;
  border-radius: 5px;
  cursor: pointer;
  font-size: 10.5px;
  transition: all 0.2s ease;
}

.admin-reorder-btn:hover:not(:disabled) {
  background: #1c59c3;
  color: #ffffff;
  border-color: #1c59c3;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(28, 89, 195, 0.25);
}

.admin-reorder-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  border-color: #e2e8f0;
}

/* ── Reorder Hint Banner ── */
.admin-reorder-hint-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 14px 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.admin-reorder-hint-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}

.admin-reorder-hint-left > i {
  font-size: 20px;
  color: #1c59c3;
  flex-shrink: 0;
}

.admin-reorder-hint-left > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-reorder-hint-left strong {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
}

.admin-reorder-hint-left span {
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
}

.admin-reorder-hint-left span i {
  color: #1c59c3;
  font-size: 11px;
}

.admin-reorder-hint-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.admin-reorder-kbd {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #475569;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 7px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  white-space: nowrap;
}

.admin-reorder-kbd i {
  font-size: 10px;
  color: #1c59c3;
}

.admin-reorder-sync-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #dcfce7;
  border: 1px solid #86efac;
  color: #15803d;
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.admin-reorder-sync-status.syncing {
  background: #fef9c3;
  border-color: #fde047;
  color: #854d0e;
  animation: pulse-sync 1s ease infinite;
}

@keyframes pulse-sync {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.admin-reorder-sync-status i {
  font-size: 11px;
}

@media (max-width: 768px) {
  .admin-reorder-hint-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .admin-reorder-hint-actions {
    flex-wrap: wrap;
  }
}

/* ── Admin Pure Image Lightbox Popup Modal ── */
.admin-img-lightbox-overlay {
  background: rgba(10, 15, 30, 0.9) !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
  z-index: 999999999 !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 30px;
  box-sizing: border-box;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s ease;
}

.admin-img-lightbox-overlay.active {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.admin-img-lightbox-overlay.is-closing {
  opacity: 0 !important;
  visibility: visible !important;
  pointer-events: none !important;
  transition: opacity 0.25s cubic-bezier(0.4, 0, 1, 1), visibility 0.25s ease;
}

.admin-img-lightbox-dialog {
  background: transparent;
  border: none;
  border-radius: 16px;
  width: auto;
  max-width: 90vw;
  max-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: auto;
  position: relative;
  transform: scale(0.84) translateY(14px);
  opacity: 0;
  filter: blur(8px);
  transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), filter 0.35s ease;
}

.admin-modal-overlay.active .admin-img-lightbox-dialog {
  transform: scale(1) translateY(0);
  opacity: 1;
  filter: blur(0px);
}

.admin-img-lightbox-overlay.is-closing .admin-img-lightbox-dialog {
  transform: scale(0.86) translateY(10px);
  opacity: 0;
  filter: blur(8px);
  transition: transform 0.25s cubic-bezier(0.4, 0, 1, 1), opacity 0.25s cubic-bezier(0.4, 0, 1, 1), filter 0.25s ease;
}

.admin-img-lightbox-dialog img {
  max-width: 90vw;
  max-height: 86vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.12);
  display: block;
  user-select: none;
  pointer-events: auto;
}

/* Floating Clean Close Button (Top Right) */
.admin-img-lightbox-floating-close {
  position: fixed;
  top: 24px;
  right: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000000000;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.admin-img-lightbox-floating-close:hover {
  background: rgba(239, 68, 68, 0.85);
  border-color: rgba(239, 68, 68, 1);
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 12px 28px rgba(239, 68, 68, 0.4);
}

.admin-table-thumb {
  cursor: pointer !important;
}

/* ══════════════════════════════════════════════════════════════
   ADMIN FULL RICH-TEXT ARTICLE EDITOR
   ══════════════════════════════════════════════════════════════ */
.admin-rich-editor {
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.admin-rich-editor:focus-within {
  border-color: #1c59c3;
  box-shadow: 0 0 0 3px rgba(28, 89, 195, 0.12);
}

.admin-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  user-select: none;
}

.admin-editor-select {
  height: 32px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s ease;
}

.admin-editor-select:focus {
  border-color: #1c59c3;
}

.admin-editor-separator {
  width: 1px;
  height: 20px;
  background: #cbd5e1;
  margin: 0 4px;
}

.admin-editor-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #475569;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.admin-editor-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.admin-editor-btn:active,
.admin-editor-btn.active {
  background: #1c59c3;
  color: #ffffff;
}

.admin-editor-mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-editor-mode-toggle:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.admin-editor-mode-toggle.active {
  background: #0f172a;
  color: #38bdf8;
  border-color: #0f172a;
}

.admin-editor-canvas {
  min-height: 280px;
  max-height: 520px;
  overflow-y: auto;
  padding: 18px 20px;
  font-size: 15px;
  line-height: 1.75;
  color: #1e293b;
  outline: none;
  font-family: inherit;
  position: relative;
}

.admin-editor-canvas:empty:before {
  content: attr(data-placeholder);
  color: #94a3b8;
  font-style: italic;
  pointer-events: none;
  display: block;
}

.admin-editor-canvas h2 {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  margin: 20px 0 10px 0;
  line-height: 1.35;
}

.admin-editor-canvas h3 {
  font-size: 17px;
  font-weight: 600;
  color: #1e293b;
  margin: 16px 0 8px 0;
  line-height: 1.4;
}

.admin-editor-canvas p {
  margin-bottom: 14px;
}

.admin-editor-canvas blockquote {
  margin: 16px 0;
  padding: 12px 18px;
  border-left: 3px solid #1c59c3;
  background: rgba(28, 89, 195, 0.05);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #334155;
}

.admin-editor-canvas ul,
.admin-editor-canvas ol {
  padding-left: 24px;
  margin-bottom: 14px;
}

.admin-editor-canvas li {
  margin-bottom: 6px;
}

.admin-editor-canvas code {
  background: #f1f5f9;
  color: #0f172a;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: Consolas, Monaco, "Courier New", monospace;
  font-size: 13.5px;
}

.admin-editor-canvas pre {
  background: #0f172a;
  color: #f8fafc;
  padding: 14px 16px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 16px 0;
}

.admin-editor-canvas pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

.admin-editor-canvas img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 14px 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.admin-editor-canvas hr {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 24px 0;
}

.admin-editor-canvas a {
  color: #1c59c3;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.admin-editor-source-textarea {
  width: 100%;
  min-height: 280px;
  max-height: 520px;
  padding: 18px 20px;
  font-family: Consolas, Monaco, "Courier New", monospace;
  font-size: 13.5px;
  line-height: 1.65;
  background: #0f172a;
  color: #38bdf8;
  border: none;
  outline: none;
  resize: vertical;
  box-sizing: border-box;
}

.admin-editor-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

/* Articles drag and drop feedback matching projects table */
#adminArticlesTableBody tr.dragging {
  opacity: 0.45;
  background: #f1f5f9;
}

#adminArticlesTableBody tr.drag-over {
  border-top: 2px solid #1c59c3 !important;
  background: rgba(28, 89, 195, 0.04);
}

.admin-dropzone-clear-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(239, 68, 68, 0.9);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 5px 11px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  backdrop-filter: blur(4px);
  transition: all 0.2s ease;
}

.admin-dropzone-clear-btn:hover {
  background: #dc2626;
  transform: translateY(-1px);
}
