/* Admin Panel CSS */
* { box-sizing: border-box; }

.admin-layout {
  display: flex;
  min-height: 100vh;
  background: #0e0e1a;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: #e2e8f0;
}

/* ===== WP SIDEBAR ===== */
.admin-sidebar {
  width: 200px;
  background: #1a1f26;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 50;
  transition: width 0.15s ease-in-out;
}

body.sidebar-collapsed .admin-sidebar {
  width: 36px;
}

body.sidebar-collapsed .admin-main {
  margin-left: 36px;
}

.sidebar-nav-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-top: 15px;
}

.sidebar-nav-container::-webkit-scrollbar { width: 8px; }
.sidebar-nav-container::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

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

.wp-menu-item {
  position: relative;
}

.wp-menu-link {
  display: flex;
  align-items: center;
  color: #a7aaad;
  text-decoration: none;
  font-size: 13px;
  line-height: 18px;
  padding: 8px 10px;
  transition: background 0.15s, color 0.15s;
}

.wp-menu-link:hover {
  background: #2c3338;
  color: #72aee6;
}

.wp-menu-link.active {
  background: #2271b1;
  color: #fff;
  font-weight: 600;
}

.wp-menu-icon {
  width: 20px;
  text-align: center;
  margin-right: 10px;
  font-size: 16px;
  flex-shrink: 0;
}

body.sidebar-collapsed .wp-menu-icon {
  margin-right: 0;
  width: 100%;
}

.wp-menu-name {
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

body.sidebar-collapsed .wp-menu-name {
  display: none;
}

.wp-menu-badge {
  background: #d63638;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 10px;
  line-height: 1.4;
}

/* ===== BLOG SUBMENU (nested Posts / Categories / Tags / Reports) ===== */
.blog-section {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 4px;
  padding-bottom: 4px;
}

.blog-section-header {
  display: flex;
  align-items: center;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 10px 8px 10px;
  color: #e2e8f0;
  font-family: Georgia, 'Times New Roman', 'DejaVu Serif', serif;
  text-align: left;
}

.blog-section-header:hover {
  background: rgba(255, 255, 255, 0.04);
}

.blog-section-header--collapsed {
  display: flex;
  justify-content: center;
  padding: 10px 6px;
  text-decoration: none;
  color: #e2e8f0;
}

.blog-section-header--collapsed:hover {
  background: #2c3338;
  color: #72aee6;
}

.blog-icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 3px;
  margin-right: 8px;
  flex-shrink: 0;
}

.blog-lucide {
  color: #cbd5e1;
}

.blog-section-title {
  flex: 1;
  font-size: 14px;
  letter-spacing: 0.02em;
  font-weight: 600;
}

.blog-chevron {
  color: #94a3b8;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.blog-chevron--open {
  transform: rotate(180deg);
}

.blog-submenu {
  list-style: none;
  margin: 0;
  padding: 2px 0 10px 0;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  margin-left: 20px;
}

.blog-submenu-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 14px;
  color: #cbd5e1;
  text-decoration: none;
  font-family: Georgia, 'Times New Roman', 'DejaVu Serif', serif;
  font-size: 13px;
  line-height: 1.35;
  transition: background 0.15s, color 0.15s;
}

.blog-submenu-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #f1f5f9;
}

.blog-submenu-link.active {
  background: #2271b1;
  color: #fff;
  font-weight: 600;
}

.blog-submenu-icon {
  flex-shrink: 0;
  color: inherit;
  opacity: 0.92;
}

.blog-section--active .blog-section-title {
  color: #f8fafc;
}

body.sidebar-collapsed .blog-submenu {
  display: none;
}

body.sidebar-collapsed .blog-section {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.sidebar-footer {
  border-top: 1px solid rgba(255,255,255,0.05);
}

.collapse-toggle-btn {
  width: 100%;
  background: none;
  border: none;
  color: #a7aaad;
  display: flex;
  align-items: center;
  padding: 12px 10px;
  cursor: pointer;
  font-size: 13px;
  transition: color 0.1s;
}

.collapse-toggle-btn:hover {
  color: #72aee6;
}

.collapse-icon {
  width: 20px;
  text-align: center;
  margin-right: 10px;
  font-size: 14px;
}

body.sidebar-collapsed .collapse-icon {
  margin-right: 0;
  width: 100%;
}

body.sidebar-collapsed .collapse-text {
  display: none;
}

/* ===== MAIN CONTENT ===== */
.admin-main {
  flex: 1;
  margin-left: 200px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.admin-topbar {
  background: #13131f;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  padding: 0 28px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 40;
}
.topbar-title { font-size: 17px; font-weight: 600; color: #fff; flex: 1; }
.topbar-actions { display: flex; gap: 10px; align-items: center; }

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

/* ===== CARDS ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
  margin-bottom: 32px;
}
.stat-card {
  background: #13131f;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 22px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.stat-icon { font-size: 28px; margin-bottom: 12px; }
.stat-value { font-size: 32px; font-weight: 800; color: #fff; line-height: 1; }
.stat-label { font-size: 13px; color: rgba(255,255,255,0.45); margin-top: 6px; }

.card {
  background: #13131f;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}
.card-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ===== TABLE ===== */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left; padding: 10px 14px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.5px;
  text-transform: uppercase; color: rgba(255,255,255,0.35);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.data-table td {
  padding: 13px 14px;
  font-size: 14px;
  color: rgba(255,255,255,0.8);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255,255,255,0.03); }

/* ===== BADGES ===== */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
}
.badge-published { background: rgba(34,197,94,0.15); color: #86efac; border: 1px solid rgba(34,197,94,0.3); }
.badge-draft { background: rgba(251,191,36,0.15); color: #fde68a; border: 1px solid rgba(251,191,36,0.3); }
.badge-private { background: rgba(99,102,241,0.15); color: #a5b4fc; border: 1px solid rgba(99,102,241,0.3); }
.badge-trash { background: rgba(239,68,68,0.15); color: #fca5a5; border: 1px solid rgba(239,68,68,0.3); }
.badge-admin { background: rgba(139,92,246,0.15); color: #c4b5fd; border: 1px solid rgba(139,92,246,0.3); }
.badge-editor { background: rgba(59,130,246,0.15); color: #93c5fd; border: 1px solid rgba(59,130,246,0.3); }
.badge-author { background: rgba(34,197,94,0.15); color: #86efac; border: 1px solid rgba(34,197,94,0.3); }

/* ===== FORMS ===== */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.form-row.full { grid-template-columns: 1fr; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: 0.5px; }
.form-input {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  color: #fff;
  padding: 11px 14px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}
.form-input::placeholder { color: rgba(255,255,255,0.25); }
.form-input:focus { border-color: #6366f1; }
textarea.form-input { min-height: 120px; resize: vertical; font-family: inherit; line-height: 1.6; }
select.form-input { cursor: pointer; }
select.form-input option { background: #1e1e2e; }

/* ===== BUTTONS ===== */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 18px; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.15s; border: none; text-decoration: none; }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 7px; }
.btn-primary { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; box-shadow: 0 4px 12px rgba(99,102,241,0.3); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(99,102,241,0.4); }
.btn-danger { background: rgba(239,68,68,0.15); color: #fca5a5; border: 1px solid rgba(239,68,68,0.3); }
.btn-danger:hover { background: rgba(239,68,68,0.25); }
.btn-ghost { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.7); border: 1px solid rgba(255,255,255,0.12); }
.btn-ghost:hover { background: rgba(255,255,255,0.12); }
.btn-success { background: rgba(34,197,94,0.15); color: #86efac; border: 1px solid rgba(34,197,94,0.3); }
.btn-success:hover { background: rgba(34,197,94,0.25); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ===== ALERTS ===== */
.alert { padding: 12px 16px; border-radius: 10px; font-size: 14px; margin-bottom: 16px; }
.alert-error { background: rgba(239,68,68,0.15); border: 1px solid rgba(239,68,68,0.3); color: #fca5a5; }
.alert-success { background: rgba(34,197,94,0.15); border: 1px solid rgba(34,197,94,0.3); color: #86efac; }
.alert-info { background: rgba(59,130,246,0.15); border: 1px solid rgba(59,130,246,0.3); color: #93c5fd; }

/* ===== PAGINATION ===== */
.pagination { display: flex; gap: 6px; align-items: center; justify-content: center; margin-top: 24px; }
.page-btn { width: 36px; height: 36px; border-radius: 8px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); color: rgba(255,255,255,0.6); font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.15s; }
.page-btn:hover, .page-btn.active { background: #6366f1; color: #fff; border-color: #6366f1; }

/* ===== MISC ===== */
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.empty-state { text-align: center; padding: 60px 20px; color: rgba(255,255,255,0.35); }
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }

.search-bar { display: flex; gap: 10px; margin-bottom: 20px; }
.search-input { flex: 1; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: 10px; color: #fff; padding: 10px 14px; font-size: 14px; outline: none; }
.search-input::placeholder { color: rgba(255,255,255,0.3); }
.search-input:focus { border-color: #6366f1; }

.action-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 24px; font-weight: 800; color: #fff; }
.page-header p { font-size: 14px; color: rgba(255,255,255,0.45); margin-top: 4px; }

.editor-toolbar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.toolbar-btn { background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.1); color: rgba(255,255,255,0.7); border-radius: 6px; padding: 6px 10px; font-size: 12px; cursor: pointer; transition: all 0.15s; }
.toolbar-btn:hover { background: rgba(255,255,255,0.14); color: #fff; }

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal-box { background: #1a1a2e; border: 1px solid rgba(255,255,255,0.1); border-radius: 20px; padding: 28px; width: 100%; max-width: 500px; }
.modal-title { font-size: 18px; font-weight: 700; color: #fff; margin-bottom: 16px; }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
.media-item { background: rgba(255,255,255,0.05); border: 2px solid rgba(255,255,255,0.08); border-radius: 12px; overflow: hidden; cursor: pointer; transition: all 0.2s; }
.media-item:hover { border-color: #6366f1; }
.media-item.selected { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.2); }
.media-thumb { width: 100%; height: 120px; object-fit: cover; display: block; background: rgba(255,255,255,0.04); }
.media-thumb-icon { width: 100%; height: 120px; display: flex; align-items: center; justify-content: center; font-size: 36px; background: rgba(255,255,255,0.03); }
.media-info { padding: 10px; }
.media-name { font-size: 12px; color: rgba(255,255,255,0.7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-size { font-size: 11px; color: rgba(255,255,255,0.35); margin-top: 2px; }

.tab-bar { display: flex; gap: 4px; border-bottom: 1px solid rgba(255,255,255,0.08); margin-bottom: 24px; }
.tab-item { padding: 10px 16px; font-size: 14px; color: rgba(255,255,255,0.45); cursor: pointer; border-bottom: 2px solid transparent; transition: all 0.15s; }
.tab-item:hover { color: rgba(255,255,255,0.7); }
.tab-item.active { color: #a5b4fc; border-bottom-color: #6366f1; }

.tag-input-wrapper { display: flex; flex-wrap: wrap; gap: 6px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: 10px; padding: 8px 12px; }
.tag-chip { background: rgba(99,102,241,0.2); color: #a5b4fc; border-radius: 6px; padding: 3px 8px; font-size: 12px; display: flex; align-items: center; gap: 5px; }
.tag-chip-remove { background: none; border: none; color: #a5b4fc; cursor: pointer; font-size: 14px; line-height: 1; padding: 0; }
.tag-input { background: none; border: none; color: #fff; font-size: 14px; outline: none; min-width: 80px; flex: 1; }
.tag-input::placeholder { color: rgba(255,255,255,0.25); }

/* ===== INSTALL WIZARD ===== */
.install-root {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  font-family: 'Segoe UI', system-ui, sans-serif;
}
.install-card {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 36px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.5);
  color: #e2e8f0;
}
.install-steps { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; font-size: 12px; color: rgba(255,255,255,0.45); }
.install-step-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.2); display: inline-block; }
.install-step-dot.on { background: #6366f1; }

/* ===== LOGIN (web) ===== */
.login-root {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  font-family: 'Segoe UI', system-ui, sans-serif;
}
.login-card {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.5);
}
.login-logo { display: flex; align-items: center; gap: 14px; margin-bottom: 32px; }
.login-title { font-size: 20px; font-weight: 700; color: #fff; }
.login-sub { font-size: 13px; color: rgba(255,255,255,0.45); margin-top: 2px; }
.login-field { margin-bottom: 18px; }
.login-field label { display: block; font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.login-field input {
  width: 100%; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); border-radius: 10px; color: #fff;
  padding: 12px 14px; font-size: 14px; outline: none;
}
.login-btn {
  width: 100%; background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; border: none; border-radius: 12px;
  padding: 14px; font-size: 15px; font-weight: 600; cursor: pointer; margin-top: 8px;
}
.login-error { background: rgba(239,68,68,0.15); border: 1px solid rgba(239,68,68,0.3); color: #fca5a5; border-radius: 10px; padding: 12px 14px; font-size: 14px; margin-bottom: 18px; }
.login-footer { margin-top: 24px; text-align: center; }
.back-link { color: rgba(255,255,255,0.4); font-size: 13px; text-decoration: none; }

/* ===== POST / PAGE EDITOR (light panel, Botble-like) ===== */
.pe-root {
  background: #f0f2f5;
  margin: -28px;
  padding: 28px;
  min-height: calc(100vh - 88px);
}

.pe-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
  max-width: 1400px;
  margin: 0 auto;
}

.pe-main { min-width: 0; }

.pe-card--main {
  background: #fff;
  border: 1px solid #e2e4e8;
  border-radius: 8px;
  padding: 24px 28px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.pe-label {
  font-size: 13px;
  font-weight: 600;
  color: #1d2327;
  text-transform: none;
  letter-spacing: 0;
}

.pe-req { color: #d63638; }

.pe-input {
  background: #fff;
  border: 1px solid #c3c4c7;
  border-radius: 4px;
  color: #1d2327;
  padding: 10px 12px;
  font-size: 14px;
  width: 100%;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.pe-input::placeholder { color: #8c8f94; }

.pe-input:focus {
  border-color: #2271b1;
  box-shadow: 0 0 0 1px #2271b1;
}

textarea.pe-input.pe-input--desc { min-height: 88px; resize: vertical; font-family: inherit; line-height: 1.5; }

.pe-permalink { display: flex; align-items: stretch; flex-wrap: wrap; width: 100%; }

.pe-permalink-base {
  display: inline-flex;
  align-items: center;
  padding: 10px 10px 10px 12px;
  background: #f6f7f7;
  border: 1px solid #c3c4c7;
  border-right: none;
  border-radius: 4px 0 0 4px;
  font-size: 13px;
  color: #646970;
  max-width: 100%;
  word-break: break-all;
}

.pe-input.pe-input--slug {
  border-radius: 0 4px 4px 0;
  flex: 1;
  min-width: 140px;
}

.pe-permalink-meta { margin-top: 8px; }

.pe-preview-link {
  font-size: 13px;
  color: #2271b1;
  text-decoration: none;
}

.pe-preview-link:hover { text-decoration: underline; }

.pe-editor-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0 10px;
}

.pe-editor-label { font-weight: 600; color: #1d2327; font-size: 14px; }

.pe-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.pe-toolbar-btn {
  background: #f6f7f7;
  border: 1px solid #c3c4c7;
  color: #2c3338;
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  line-height: 1.3;
}

.pe-toolbar-btn:hover {
  background: #fff;
  border-color: #8c8f94;
  color: #1d2327;
}

.pe-ai-writer {
  background: linear-gradient(135deg, #ff9a56, #fa541c);
  border: none;
  color: #fff;
  font-weight: 600;
}

.pe-ai-writer:hover {
  filter: brightness(1.06);
  color: #fff;
}

.pe-editor-wrap {
  border: 1px solid #c3c4c7;
  border-radius: 4px;
  overflow: hidden;
  min-height: 400px;
  background: #fff;
}

.pe-editor-wrap--compact .tox-tinymce { min-height: 220px !important; }

.pe-editor-wrap--compact textarea.pe-content-area { min-height: 140px; }

.pe-content-area {
  width: 100%;
  min-height: 400px;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 13px;
  padding: 12px;
  border: none;
  resize: vertical;
  color: #1d2327;
}

.pe-checkboxes { display: flex; flex-wrap: wrap; gap: 10px; }

.pe-check {
  font-size: 13px;
  color: #50575e;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Sidebar meta boxes: Categories / Tags (WordPress-style) */
.pe-card.pe-postbox {
  padding: 0;
  overflow: hidden;
}

.pe-postbox .pe-postbox-header {
  font-size: 14px;
  font-weight: 600;
  color: #1d2327;
  margin: 0;
  padding: 10px 14px;
  background: #f6f7f7;
  border-bottom: 1px solid #dcdcde;
}

.pe-postbox .pe-postbox-inner {
  padding: 12px 14px 14px;
}

.pe-label--compact {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #50575e;
}

.pe-category-checklist {
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid #c3c4c7;
  border-radius: 0 0 4px 4px;
  background: #fff;
  margin-top: -1px;
}

.pe-postbox .pe-category-checklist {
  border-radius: 4px;
  margin-top: 0;
}

.pe-category-list {
  list-style: none;
  margin: 0;
  padding: 8px 10px;
}

.pe-category-list li {
  margin: 0;
  padding: 2px 0;
}

.pe-check--block {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  line-height: 1.4;
  font-weight: 400;
}

.pe-check--block input {
  margin-top: 3px;
  flex-shrink: 0;
}

.pe-category-empty {
  font-size: 13px;
  color: #646970;
  padding: 8px 4px;
}

.pe-sidebar-links {
  margin: 10px 0 0;
  font-size: 12px;
}

.pe-sidebar-links a {
  color: #2271b1;
  text-decoration: none;
}

.pe-sidebar-links a:hover {
  text-decoration: underline;
}

.pe-tags-input {
  font-size: 13px;
}

.pe-hint--sidebar {
  margin: 8px 0 0;
  font-size: 12px;
  color: #646970;
  line-height: 1.45;
}

.pe-sidebar { display: flex; flex-direction: column; gap: 16px; }

.pe-card--side {
  background: #fff;
  border: 1px solid #e2e4e8;
  border-radius: 8px;
  padding: 16px 18px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.pe-side-title {
  font-size: 13px;
  font-weight: 600;
  color: #1d2327;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f0f1;
}

.pe-publish-btns { display: flex; flex-direction: column; gap: 10px; }

.pe-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 10px 16px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.pe-btn--primary { background: #2271b1; color: #fff; }

.pe-btn--primary:hover { background: #135e96; }

.pe-btn--secondary {
  background: #f6f7f7;
  color: #2c3338;
  border: 1px solid #c3c4c7;
}

.pe-btn--secondary:hover {
  background: #fff;
  border-color: #8c8f94;
}

.pe-featured {
  border: 1px dashed #c3c4c7;
  border-radius: 4px;
  min-height: 120px;
  background: #f6f7f7;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.pe-featured-placeholder { color: #787c82; font-size: 12px; }

.pe-featured-img {
  max-width: 100%;
  max-height: 180px;
  object-fit: contain;
  display: block;
}

.pe-featured-actions {
  display: flex;
  gap: 14px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.pe-link-btn {
  background: none;
  border: none;
  padding: 0;
  color: #2271b1;
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
}

.pe-link-muted {
  color: #787c82;
  text-decoration: none;
}

.pe-link-muted:hover { text-decoration: underline; color: #50575e; }

.pe-advanced {
  margin-top: 22px;
  font-size: 13px;
  color: #50575e;
}

.pe-advanced summary {
  cursor: pointer;
  font-weight: 600;
  color: #2271b1;
  user-select: none;
}

.pe-hint { font-size: 11px; color: #787c82; margin-top: 6px; line-height: 1.4; }

@media (max-width: 1100px) {
  .pe-grid { grid-template-columns: 1fr; }
}

/* ===== WordPress-like Appearance & screens ===== */
body.wp-admin-appearance .admin-content {
  background: #f0f0f1;
  color: #1d2327;
}

body.wp-admin-appearance .admin-topbar {
  background: #fff;
  border-bottom: 1px solid #c3c4c7;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

body.wp-admin-appearance .topbar-title {
  color: #1d2327;
  font-weight: 600;
  font-size: 23px;
  line-height: 1.3;
}

body.wp-admin-appearance .alert-success {
  color: #1e4620;
  background: #edfaef;
  border-color: #68de7c;
}

body.wp-admin-appearance .alert-error {
  color: #721c24;
  background: #f8d7da;
  border-color: #f1aeb5;
}

.wp-appearance-wrap {
  max-width: 1200px;
}

.wp-appearance-form {
  margin-top: 0;
}

.wp-nav-tab-wrapper {
  margin: 0 0 16px;
  padding-top: 9px;
  padding-bottom: 0;
  line-height: inherit;
  border-bottom: 1px solid #c3c4c7;
}

.nav-tab {
  float: left;
  border: 1px solid #c3c4c7;
  border-bottom: none;
  margin-left: 0.5em;
  padding: 5px 10px;
  font-size: 14px;
  line-height: 24px;
  font-weight: 600;
  background: #e5e5e5;
  color: #50575e;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 4px 4px 0 0;
  margin-bottom: -1px;
}

.nav-tab:first-child {
  margin-left: 0;
}

.nav-tab:hover {
  background-color: #fff;
  color: #135e96;
}

.nav-tab-active,
.nav-tab:focus.nav-tab-active,
.nav-tab.nav-tab-active {
  border-bottom: 1px solid #f0f0f1;
  background: #f0f0f1;
  color: #000;
  margin-bottom: -1px;
}

.wp-nav-tab-wrapper::after {
  content: '';
  display: table;
  clear: both;
}

.postbox {
  background: #fff;
  border: 1px solid #c3c4c7;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
  margin-bottom: 20px;
}

.postbox-header {
  border-bottom: 1px solid #c3c4c7;
  padding: 12px 16px;
  background: #fff;
}

.postbox-title {
  margin: 0;
  padding: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: #1d2327;
}

.inside {
  padding: 12px 16px 16px;
  margin: 0;
  position: relative;
}

.form-table {
  border-collapse: collapse;
  width: 100%;
  margin-top: 6px;
}

.form-table th {
  vertical-align: top;
  text-align: left;
  padding: 16px 10px 16px 0;
  width: 200px;
  line-height: 1.4;
  font-weight: 400;
  font-size: 13px;
  color: #1d2327;
}

.form-table td {
  padding: 15px 10px 15px 0;
  line-height: 1.4;
  font-size: 13px;
}

.regular-text {
  width: 25em;
  max-width: 100%;
  padding: 6px 8px;
  border: 1px solid #8c8f94;
  border-radius: 4px;
  font-size: 14px;
  color: #1d2327;
  background: #fff;
}

.regular-text:focus {
  border-color: #2271b1;
  box-shadow: 0 0 0 1px #2271b1;
  outline: 2px solid transparent;
}

input.small-text {
  padding: 4px 8px;
  max-width: 6em;
}

body.wp-admin-appearance textarea.large-text {
  width: 100%;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid #8c8f94;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.5;
  color: #1d2327;
  background: #fff;
}

.large-text.code {
  width: 100%;
  max-width: 100%;
  font-family: Consolas, Monaco, monospace;
  font-size: 13px;
  line-height: 1.5;
  padding: 10px 12px;
  border: 1px solid #8c8f94;
  border-radius: 4px;
  color: #1d2327;
  background: #f6f7f7;
  resize: vertical;
}

.description {
  margin: 8px 0 0;
  font-size: 13px;
  color: #646970;
  line-height: 1.5;
}

.description code {
  font-size: 12px;
  background: rgba(0, 0, 0, 0.06);
  padding: 2px 5px;
  border-radius: 3px;
}

p.submit {
  margin: 12px 0 4px;
  padding-top: 10px;
  border-top: 1px solid #f0f0f0;
}

.button,
.button-primary,
.button-large {
  display: inline-block;
  text-decoration: none;
  font-size: 13px;
  line-height: 2.15384615;
  min-height: 30px;
  margin: 0;
  padding: 0 12px;
  cursor: pointer;
  border-width: 1px;
  border-style: solid;
  border-radius: 4px;
  white-space: nowrap;
  box-sizing: border-box;
  font-family: inherit;
}

.button {
  color: #2271b1;
  border-color: #2271b1;
  background: #f6f7f7;
}

.button:hover {
  background: #f0f0f1;
  border-color: #0a4b78;
  color: #0a4b78;
}

.button-primary,
.button.button-primary {
  background: #2271b1;
  border-color: #2271b1;
  color: #fff;
}

.button-primary:hover,
.button.button-primary:hover {
  background: #135e96;
  border-color: #135e96;
  color: #fff;
}

.button-large {
  min-height: 36px;
  line-height: 2.30769231;
  padding: 0 16px;
  font-size: 14px;
}

.button-link-delete {
  background: none;
  border: none;
  color: #b32d2e;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  font-size: 13px;
}

.button-link-delete:hover {
  color: #8a2424;
}

.widefat {
  border: 1px solid #c3c4c7;
  border-spacing: 0;
  width: 100%;
  clear: both;
}

.widefat thead th,
.widefat tfoot th,
.widefat th {
  font-weight: 400;
  text-align: left;
  padding: 8px 10px;
  font-size: 13px;
  color: #1d2327;
  border-bottom: 1px solid #c3c4c7;
  background: #f6f7f7;
}

.widefat td {
  padding: 10px;
  font-size: 13px;
  vertical-align: middle;
  border-bottom: 1px solid #f0f0f0;
}

.widefat.striped tbody tr:nth-child(odd) {
  background: #f6f7f7;
}

.widefat .column-title .row-title {
  font-weight: 600;
  color: #2271b1;
  text-decoration: none;
}

.widefat .column-title .row-title:hover {
  color: #135e96;
}

/* Menu editor (WP-like) */
.menu-edit-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  max-width: 1200px;
}

@media (max-width: 960px) {
  .menu-edit-layout {
    grid-template-columns: 1fr;
  }
}

.menu-add-column .postbox {
  margin-bottom: 16px;
}

.menu-sortable-root {
  min-height: 56px;
  padding: 10px;
  margin: 0;
  list-style: none;
  background: #f6f7f7;
  border: 1px dashed #c3c4c7;
  border-radius: 4px;
}

.menu-sortable-nested {
  margin: 10px 0 4px 20px;
  padding: 8px 8px 4px;
  min-height: 40px;
  list-style: none;
  border-left: 3px solid #2271b1;
  background: #fafafa;
}

.menu-item-li {
  margin-bottom: 8px;
}

.menu-item-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px;
  background: #fff;
  border: 1px solid #dcdcde;
  border-radius: 4px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.menu-drag-handle {
  cursor: grab;
  color: #787c82;
  user-select: none;
  padding: 4px 6px;
  font-size: 14px;
  line-height: 1;
}

.menu-drag-handle:active {
  cursor: grabbing;
}

.menu-item-badge {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #50575e;
  background: #f0f0f1;
  padding: 3px 8px;
  border-radius: 3px;
  flex-shrink: 0;
}

.menu-item-label {
  flex: 1 1 160px;
  min-width: 120px;
}

.menu-item-url {
  flex: 2 1 200px;
  min-width: 160px;
}

.menu-item-target {
  min-width: 110px;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #8c8f94;
  font-size: 13px;
}

.screen-reader-text {
  position: absolute;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  overflow: hidden;
}

/* Post editor: media modal (WP-like) */
.pe-media-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100000;
  align-items: center;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top, 0px)) 12px max(12px, env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
}

.pe-media-modal.pe-media-modal--open {
  display: flex;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.pe-media-modal__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.pe-media-modal__panel {
  position: relative;
  background: #fff;
  color: #1e293b;
  width: min(720px, calc(100vw - 24px));
  max-width: 100%;
  max-height: min(85vh, 100dvh - 32px);
  min-height: 0;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 1;
  margin: auto 0;
}

.pe-media-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.pe-media-modal__title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.pe-media-modal__close {
  border: none;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: #64748b;
  padding: 4px 8px;
  border-radius: 4px;
}

.pe-media-modal__close:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.pe-media-modal__tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid #e2e8f0;
  padding: 0 12px;
  flex-shrink: 0;
}

.pe-media-tab {
  border: none;
  background: transparent;
  padding: 10px 14px;
  font-size: 13px;
  cursor: pointer;
  color: #64748b;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.pe-media-tab:hover {
  color: #0f172a;
}

.pe-media-tab--active {
  color: #2563eb;
  font-weight: 600;
  border-bottom-color: #2563eb;
}

.pe-media-pane {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#pe-media-pane-library {
  flex: 1 1 auto;
}

#pe-media-pane-upload {
  overflow-y: auto;
  flex: 1 1 auto;
  padding: 0 16px 12px;
}

.pe-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 10px;
  padding: 12px 16px;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.pe-media-item {
  position: relative;
  aspect-ratio: 1;
  min-width: 0;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  background: #f8fafc;
  padding: 0;
  margin: 0;
  font: inherit;
  contain: layout style paint;
}

.pe-media-item:focus {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.pe-media-item img {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.pe-media-item--doc {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  line-height: 1.3;
  padding: 8px;
  text-align: center;
  word-break: break-word;
  color: #475569;
}

.pe-media-load {
  flex-shrink: 0;
}

.pe-media-modal__foot {
  padding: 10px 16px 14px;
  border-top: 1px solid #e2e8f0;
  font-size: 12px;
  color: #64748b;
  flex-shrink: 0;
}

#pe_media_file_input {
  margin-top: 8px;
  font-size: 13px;
  max-width: 100%;
}

/* Post editor: Sections catalog + Four images modal */
.pe-sections-catalog-body,
.pe-section-four-body {
  padding: 12px 16px;
  max-height: min(70vh, 520px);
  overflow-y: auto;
}

.pe-sections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.pe-section-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.pe-section-card:hover {
  border-color: #2271b1;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.pe-section-card__thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  background: #f1f5f9;
  border-radius: 4px;
  font-size: 2rem;
}

.pe-section-card__name {
  font-size: 14px;
  color: #1e293b;
}

.pe-section-card__desc {
  font-size: 12px;
  color: #64748b;
  line-height: 1.35;
}

.pe-sec-img-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.pe-sec-img-preview {
  width: 96px;
  height: 96px;
  flex-shrink: 0;
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
  background: #f8fafc no-repeat center center;
  background-size: cover;
}

.pe-sec-img-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.pe-section-four-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #e2e8f0;
}

.pe-page-mode {
  margin-bottom: 12px;
}

.pe-page-mode__choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.pe-radio-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: #1e293b;
  cursor: pointer;
}

.pe-radio-row input {
  margin-top: 3px;
}

.pe-page-builder {
  margin-top: 12px;
  padding: 12px 0;
}

.pb-blocks-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.pb-block-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  overflow: hidden;
}

.pb-block-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}

.pb-block-card__title {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
}

.pb-block-card__tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.pb-block-card__body {
  padding: 12px;
}

.pb-field {
  margin-bottom: 12px;
}

.pb-field:last-child {
  margin-bottom: 0;
}

.pb-field__label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
}

.pb-field__textarea {
  width: 100%;
  min-height: 80px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
}

/* WordPress-like list tables (Posts, Categories) */
.wp-list-screen {
  max-width: 100%;
}

.wp-posts-filters .search-box {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}

.wp-posts-filters input[type="search"],
.wp-posts-filters select {
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid #3c434a;
  background: #1d2327;
  color: #e2e8f0;
  min-width: 160px;
}

.wp-list-table.widefat {
  width: 100%;
  border-collapse: collapse;
  background: #1d2327;
  border: 1px solid #3c434a;
  border-radius: 4px;
  overflow: hidden;
}

.wp-list-table thead th {
  text-align: left;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #a7aaad;
  border-bottom: 1px solid #3c434a;
}

.wp-list-table tbody td {
  padding: 10px 12px;
  font-size: 13px;
  border-top: 1px solid #2c3338;
  vertical-align: top;
}

.wp-list-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.wp-list-table .column-title {
  min-width: 220px;
}

.wp-list-table .column-title strong a {
  color: #72aee6;
  text-decoration: none;
}

.wp-list-table .column-title strong a:hover {
  text-decoration: underline;
}

.wp-list-table .row-actions {
  margin-top: 4px;
  font-size: 12px;
  color: #787c82;
  visibility: visible;
}

.wp-list-table .row-actions form {
  display: inline !important;
}

.wp-inline-link {
  background: none;
  border: none;
  padding: 0;
  color: #b32d2e;
  cursor: pointer;
  font-size: inherit;
  text-decoration: underline;
}

.wp-inline-link:hover {
  color: #d63638;
}

.wp-list-table .column-comments.num {
  text-align: center;
}

.wp-list-table .column-date {
  width: 140px;
  color: #a7aaad;
  font-size: 12px;
}

.wp-tablenav.bottom {
  margin-top: 16px;
  padding: 10px 0;
}

.wp-tablenav .tablenav-pages {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #a7aaad;
}

.wp-category-add-form .form-label {
  color: #c3c4c7;
}

/* Categories / Tags: WP-style two columns (form left, table right) */
.wp-terms-layout {
  display: grid;
  gap: 24px;
  align-items: start;
}

@media (min-width: 960px) {
  .wp-terms-layout {
    grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  }

  .wp-terms-layout__form .card {
    position: sticky;
    top: 12px;
  }
}

.wp-terms-layout__form .card {
  background: #1d2327;
  border: 1px solid #3c434a;
  border-radius: 8px;
  padding: 16px;
}

.wp-terms-layout__table {
  min-width: 0;
}
