/* ============ LOGIN PAGE ============ */
/* ---- DASHBOARD GLOBAL: FORCE DARK SELECT/DROPDOWN/INPUT no white conflict ---- */
select,
select option,
select optgroup,
.re-select,
.re-select option,
.form-group select,
.form-group select option,
.crud-search select,
.crud-search input,
.modal-body select,
.modal-body input,
.settings-layout select,
.tag-input input,
.cat-check-list input + label,
.nav-menu-item input[type="text"],
.color-group input[type="color"],
input[type="text"],
input[type="search"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="time"],
input[type="url"],
input[type="tel"],
input[type="color"],
textarea,
#cpt-toolbar, #pe-toolbar, #pge-toolbar, #pa-toolbar {
  color-scheme: dark !important;
}
select,
select option,
select optgroup,
.re-select,
.re-select option,
.form-group select,
.form-group select option,
.crud-search select,
.modal-body select,
.settings-layout select {
  background-color: var(--bg-dropdown) !important;
  color: var(--text) !important;
  border-color: var(--border-default) !important;
  border-radius: 10px !important;
  transition: all 0.18s ease;
}
select:hover,
.re-select:hover,
.form-group select:hover,
.crud-search select:hover,
.modal-body select:hover,
.settings-layout select:hover {
  border-color: var(--accent-purple) !important;
  background-color: #1e1a3f !important;
}
select:focus,
.re-select:focus,
.form-group select:focus,
.crud-search select:focus,
.modal-body select:focus,
.settings-layout select:focus {
  border-color: var(--accent-purple) !important;
  background-color: #1f1b42 !important;
  box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.18) !important;
  outline: none !important;
}
select option:checked,
.re-select option:checked,
.form-group select option:checked {
  background: linear-gradient(135deg, rgba(124,92,255,0.5), rgba(236,72,153,0.45)) !important;
  color: #ffffff !important;
}
select option:hover,
.re-select option:hover,
.form-group select option:hover {
  background: var(--bg-dropdown-hover) !important;
  color: #ffffff !important;
}
.re-select {
  background-image: linear-gradient(45deg, transparent 50%, var(--accent-purple) 50%),
                    linear-gradient(135deg, var(--accent-purple) 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 10px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 1.9rem !important;
  -webkit-appearance: none;
  appearance: none;
}
.login-page {
  min-height: 100vh;
  margin: 0; padding: 0;
  display: grid; place-items: center;
  background: var(--bg-primary);
  color: var(--text);
  overflow: hidden;
  font-family: var(--font-body);
}
.login-bg {
  position: fixed; inset: 0;
  background:
    radial-gradient(900px 500px at 20% 10%, rgba(255,77,157,0.18), transparent 60%),
    radial-gradient(900px 500px at 80% 90%, rgba(124,92,255,0.22), transparent 60%),
    linear-gradient(180deg, var(--bg-primary), #07051a 80%);
}
.login-wrapper { position: relative; z-index: 3; width: min(440px, 92vw); padding: 2rem 0; }
.login-card {
  background: rgba(20, 17, 44, 0.6);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 2.2rem;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.05);
}
.login-brand {
  display: flex; align-items: center; gap: 0.85rem;
  text-decoration: none;
  margin-bottom: 1.5rem;
}
.login-brand .brand-mark { flex-shrink: 0; filter: drop-shadow(0 4px 20px rgba(255,77,157,0.3)); }
.login-wordmark {
  display: block; font-weight: 800; letter-spacing: -0.01em;
  font-family: var(--font-display); font-size: 1.25rem; color: var(--text-strong);
}
.login-tagline { display: block; color: var(--text-muted); font-size: 0.75rem; }
.login-title { margin: 0 0 0.25rem 0; font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; }
.login-subtitle { margin: 0 0 1.5rem 0; color: var(--text-muted); line-height: 1.5; }

.login-form { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.25rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label {
  font-size: 0.8rem; font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}
.form-group input, .form-group select, .form-group textarea {
  height: 44px;
  padding: 0 0.9rem;
  background: var(--bg-secondary);
  color: var(--text);
  border: 1px solid var(--border-default);
  border-radius: 10px;
  font-size: 0.92rem;
  outline: none;
  transition: all 0.18s ease;
  font-family: inherit;
}
.form-group textarea { height: auto; min-height: 100px; padding: 0.75rem 0.9rem; line-height: 1.55; resize: vertical; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--accent-pink);
  box-shadow: 0 0 0 4px rgba(255,77,157,0.12);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

.remember-me { display: flex; align-items: center; gap: 0.55rem; color: var(--text-muted); font-size: 0.85rem; cursor: pointer; }
.remember-me input { accent-color: var(--accent-pink); width: 16px; height: 16px; }

.login-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  font-size: 0.85rem;
}

.login-helpers { margin-bottom: 1.5rem; }
.demo-creds summary {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 0.4rem 0;
  user-select: none;
}
.demo-creds[open] summary { color: var(--accent-pink); }
.creds-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.4rem 0.65rem;
  font-size: 0.82rem;
  border-bottom: 1px dashed var(--border-subtle);
  color: var(--text);
}
.creds-row code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--bg-secondary);
  padding: 0.18rem 0.5rem;
  border-radius: 6px;
  font-size: 0.8rem;
  color: var(--accent-pink);
}
.login-footer { margin-top: 0.5rem; }

/* ============ DASHBOARD APP ============ */
.dashboard-body { margin: 0; padding: 0; min-height: 100vh; filter: none !important; -webkit-filter: none !important; }
.admin-app {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
  background: var(--bg-primary);
  color: var(--text);
  filter: none !important;
  -webkit-filter: none !important;
  overflow: visible !important;
  position: relative;
  z-index: 1;
}
.admin-main { filter: none !important; -webkit-filter: none !important; }
.admin-content { filter: none !important; -webkit-filter: none !important; }
/* ⭐ GUARD STUCK OVERLAY: Sidebar backdrop HANYA TAMPIL di MOBILE (<=1023px) SAAT DRAWER OPEN.
   Di DESKTOP (>1023px): WAJIB display:none AGAR DIV INI (jika tidak sengaja ter-create STUCK)
   TIDAK MUNCUL sebagai layer transparan / redup / blur di depan content. */
.sidebar-backdrop { display: none !important; }
/* ⭐ GUARD STUCK MODAL: Jika ada modal-backdrop tersisa tanpa .modal-wrap, sembunyikan (tidak ada gunanya). */
.modal-backdrop:only-child, body > .modal-backdrop { display: none !important; }

@media (max-width: 1023px) {
  .admin-app { grid-template-columns: 1fr; }
  /* Di mobile, sidebar-backdrop DIIZINKAN display block (override guard di atas) */
  .sidebar-backdrop { display: block !important; }
}

/* ============ SIDEBAR ============ */
.admin-sidebar {
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(20,17,44,0.95), rgba(10,8,32,0.95));
  border-right: 1px solid var(--border-default);
  padding: 1rem 0;
  backdrop-filter: blur(10px);
  z-index: 40;
}
@media (max-width: 1023px) {
  .admin-sidebar {
    position: fixed; inset: 0 auto 0 0;
    width: 280px;
    transform: translateX(-100%);
    transition: transform 0.22s ease-out;
    box-shadow: 20px 0 60px rgba(0,0,0,0.5);
    will-change: transform;
  }
  .admin-sidebar.open { transform: translateX(0); }
  .sidebar-backdrop {
    position: fixed; inset: 0; z-index: 34;
    background: rgba(0, 0, 0, 0.52);
    animation: fadeInBackdrop 0.18s ease-out;
  }
  @keyframes fadeInBackdrop {
    from { background: rgba(0,0,0,0); }
    to   { background: rgba(0,0,0,0.52); }
  }
}
@media (max-width: 640px) {
  .admin-sidebar { width: 270px; }
}
@media (max-width: 380px) {
  .admin-sidebar { width: 260px; }
}

.sb-brand {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.35rem 1.1rem 1rem 1.1rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 0.75rem;
  text-decoration: none; color: inherit;
}
.sb-brand .brand-mark svg { width: 32px; height: 32px; }
.sb-brand .sb-wordmark {
  font-family: var(--font-display); font-weight: 800;
  font-size: 1.05rem; color: var(--text-strong);
}
.sb-brand .sb-wordmark em { font-style: normal; color: var(--accent-pink); font-weight: 700; font-size: 0.8em; margin-left: 0.25rem; }

.admin-sidebar ul, .admin-sidebar li {
  margin: 0;
  padding: 0;
  list-style: none;
}
.sb-section-title {
  font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text-muted); font-weight: 700;
  padding: 0.9rem 0.75rem 0.3rem 0;
  margin-left: calc(0.55rem + 24px + 0.65rem + 0.8rem);
}
.sb-menu { list-style: none; margin: 0; padding: 0 0.55rem; }
.sb-menu li + li { margin-top: 0.1rem; }
.sb-menu li { width: 100%; }
.sb-menu a, .sb-menu button {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  column-gap: 0.65rem;
  align-items: center;
  justify-items: start stretch end;
  padding: 0.58rem 0.75rem;
  border-radius: 9px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.88rem; font-weight: 500;
  background: transparent;
  border: none; width: 100%;
  box-sizing: border-box;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  font-family: inherit;
}
.sb-menu .sb-parent-link {
  position: relative;
}
.sb-menu .sb-parent-link:active {
  transform: scale(0.985);
}
.sb-menu a:hover, .sb-menu button:hover {
  color: var(--text);
  background: rgba(255,255,255,0.04);
}
.sb-menu a.active, .sb-menu button.active {
  color: white;
  background: linear-gradient(90deg, rgba(255,77,157,0.22), rgba(124,92,255,0.18));
  box-shadow: inset 0 0 0 1px rgba(255,77,157,0.2);
}
.sb-menu .icon {
  grid-column: 1 / 2;
  justify-self: center;
  align-self: center;
  width: 24px; height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: inherit;
  line-height: 1;
  opacity: 0.95;
}
.sb-menu .icon > svg, .sb-menu .icon svg, .sb-menu svg {
  width: 18px !important;
  height: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
  display: block;
  flex-shrink: 0;
}
.sb-menu .menu-label {
  grid-column: 2 / 3;
  width: 100%;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  justify-self: start;
  align-self: center;
  line-height: 1.25;
}
.sb-menu .menu-count {
  grid-column: 3 / 4;
  justify-self: end;
  align-self: center;
  flex-shrink: 0;
  text-align: right;
  font-size: 0.7rem; font-weight: 700;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  min-width: 1.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
}
.sb-menu a.active .menu-count, .sb-menu button.active .menu-count {
  background: rgba(255,255,255,0.12); color: white;
}
.sb-menu .sb-chevron {
  grid-column: 3 / 4;
  justify-self: end;
  align-self: center;
  width: 16px; height: 16px;
  transition: transform 0.22s cubic-bezier(.2,.9,.3,1.2);
  color: inherit;
  opacity: .75;
  flex-shrink: 0;
}
.sb-menu .sb-chevron > svg { width: 16px; height: 16px; display: block; }
.sb-menu [data-sb-expand="true"] .sb-chevron { transform: rotate(90deg); }

.sb-submenu {
  list-style: none;
  margin: 0.2rem 0 0.15rem 0;
  padding: 0 0 0 calc(24px + 0.65rem + 0.2rem);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-2px);
  transition: max-height 0.28s ease, opacity 0.22s ease, transform 0.22s ease;
}
.sb-submenu li + li { margin-top: 0.05rem; }
.sb-menu [data-sb-expand="true"] + .sb-submenu,
.sb-submenu[data-sb-open="true"] {
  max-height: 1400px;
  opacity: 1;
  transform: translateY(0);
}
.sb-submenu a {
  font-size: 0.82rem;
  padding: 0.48rem 0.7rem;
  grid-template-columns: 20px 1fr auto;
}
.sb-submenu a .icon > svg, .sb-submenu a svg { width: 16px !important; height: 16px !important; max-width: 16px !important; max-height: 16px !important; }
.sb-submenu a.danger-item { color: #fb7185; }
.sb-submenu a.danger-item:hover { color: #f43f5e; background: rgba(244,63,94,0.07); box-shadow: inset 0 0 0 1px rgba(244,63,94,0.18); }
.sb-submenu a.danger-item.active { background: linear-gradient(90deg, rgba(244,63,94,0.24), rgba(255,77,157,0.14)); color: white; box-shadow: inset 0 0 0 1px rgba(244,63,94,0.26); }

/* ============ TOOLS UI KIT ============ */
.tools-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.tools-breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color .15s ease;
  padding: 0.1rem 0;
}
.tools-breadcrumb a:hover { color: var(--accent-pink); }
.tools-breadcrumb .sep { opacity: 0.4; }
.tools-breadcrumb .current { color: var(--text); font-weight: 600; }

.tabs-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.45rem;
  background: var(--bg-secondary);
  border-radius: 14px;
  border: 1px solid var(--border);
  width: fit-content;
  max-width: 100%;
}
.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.58rem 1.05rem;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.18s ease;
  background: transparent;
  border: 1px solid transparent;
  white-space: nowrap;
}
.tab-btn svg, .tab-btn svg * { width: 16px !important; height: 16px !important; max-width: 16px !important; max-height: 16px !important; }
.tab-btn:hover {
  color: var(--text);
  background: rgba(255,255,255,0.04);
  transform: translateY(-1px);
}
.tab-btn.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(255,77,157,0.92), rgba(124,92,255,0.88));
  box-shadow: 0 6px 18px -6px rgba(255,77,157,0.55), 0 0 0 1px rgba(255,255,255,0.08) inset;
  border-color: rgba(255,255,255,0.12);
}

.tools-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.2rem;
  align-items: center;
  padding: 1.4rem 1.5rem;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(124,92,255,0.10), rgba(255,77,157,0.07));
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
  margin-bottom: 1.2rem;
}
.tools-hero.import-hero { background: linear-gradient(135deg, rgba(16,185,129,0.10), rgba(59,130,246,0.07)); }
.tools-hero.system-hero { background: linear-gradient(135deg, rgba(59,130,246,0.10), rgba(236,72,153,0.06)); }
.tools-hero.thumbs-hero { background: linear-gradient(135deg, rgba(245,158,11,0.10), rgba(16,185,129,0.07)); }
.tools-hero.reset-hero { background: linear-gradient(135deg, rgba(239,68,68,0.10), rgba(245,158,11,0.06)); border-color: rgba(239,68,68,0.22); }
.tools-hero-left {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  min-width: 0;
}
.tools-hero-icon {
  width: 60px; height: 60px;
  flex-shrink: 0;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.06);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.07), 0 10px 30px -14px rgba(124,92,255,0.5);
  font-size: 1.8rem;
}
.tools-hero-icon svg, .tools-hero-icon svg * { width: 28px !important; height: 28px !important; max-width: 28px !important; max-height: 28px !important; color: #fff; }
.tools-hero-meta { min-width: 0; }
.tools-hero-meta h2 {
  margin: 0 0 0.2rem;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}
.tools-hero-meta h2 .badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.17rem 0.55rem;
  border-radius: 999px;
  background: rgba(124,92,255,0.2);
  color: #c4b5fd;
  letter-spacing: 0;
}
.tools-hero-meta p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
  max-width: 62ch;
}
.tools-hero-cta { flex-shrink: 0; }
.tools-hero-cta .btn { padding: 0.78rem 1.3rem; font-size: 0.9rem; font-weight: 700; border-radius: 12px; }
.tools-hero-cta .btn svg, .tools-hero-cta .btn svg * { width: 18px !important; height: 18px !important; max-width: 18px !important; max-height: 18px !important; }

.ds-row-progress {
  width: 100%;
  max-width: 150px;
  height: 6px;
  background: rgba(255,255,255,0.05);
  border-radius: 999px;
  overflow: hidden;
  margin-left: auto;
}
.ds-row-progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #ff4d9d, #7c5cff);
  border-radius: 999px;
  transition: width .35s ease;
}
.ds-row-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}
.ds-row-icon {
  width: 28px; height: 28px;
  flex-shrink: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.05);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
  font-size: 0.95rem;
}
.ds-row-icon svg, .ds-row-icon svg * { width: 15px !important; height: 15px !important; max-width: 15px !important; max-height: 15px !important; }
.ds-row-meta { min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.ds-row-meta .t1 { font-weight: 700; color: var(--text-strong); font-size: 0.88rem; }
.ds-row-meta .t2 { font-size: 0.72rem; color: var(--text-muted); font-family: var(--font-mono, monospace); }
.ds-row-count { font-weight: 800; font-family: var(--font-condensed); text-align: right; font-size: 0.98rem; min-width: 50px; }

.step-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  margin: 0 0 1.3rem;
  padding: 1rem;
  background: rgba(255,255,255,0.03);
  border-radius: 14px;
  border: 1px solid var(--border);
}
.step-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  background: transparent;
  transition: all .2s ease;
  position: relative;
}
.step-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -0.3rem;
  top: 50%;
  width: 0; height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 6px solid var(--border);
  transform: translateY(-50%);
  opacity: 0.5;
}
.step-num {
  width: 34px; height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.92rem;
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.08);
  transition: all .25s ease;
}
.step-text { min-width: 0; }
.step-text strong {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  margin-bottom: 0.1rem;
}
.step-text span {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.step-item[data-state="active"] {
  background: linear-gradient(135deg, rgba(255,77,157,0.14), rgba(124,92,255,0.10));
  box-shadow: inset 0 0 0 1px rgba(255,77,157,0.25);
}
.step-item[data-state="active"] .step-num {
  background: linear-gradient(135deg, #ff4d9d, #7c5cff);
  color: white;
  box-shadow: 0 8px 20px -8px rgba(255,77,157,0.6), inset 0 0 0 1px rgba(255,255,255,0.18);
}
.step-item[data-state="active"] .step-text strong { color: #fff; }
.step-item[data-state="done"] .step-num {
  background: rgba(16,185,129,0.18);
  color: #34d399;
  box-shadow: inset 0 0 0 2px rgba(16,185,129,0.3);
}
.step-item[data-state="danger"] .step-num {
  background: rgba(239,68,68,0.18);
  color: #fb7185;
  box-shadow: inset 0 0 0 2px rgba(239,68,68,0.32);
}

.import-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.75rem;
  margin-top: 1.2rem;
}
.import-pv-card {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
}
.import-pv-card .k {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.import-pv-card .v {
  font-weight: 800;
  font-family: var(--font-condensed);
  font-size: 1.1rem;
  color: var(--text);
}

.thumbs-preview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  margin-top: 1rem;
  padding: 0.8rem;
  background: var(--bg-secondary);
  border-radius: 14px;
  border: 1px solid var(--border);
}
.thumb-pv-cell {
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(124,92,255,0.22), rgba(255,77,157,0.18));
  border: 1px solid rgba(255,255,255,0.06);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: rgba(255,255,255,0.7);
  position: relative;
}
.thumb-pv-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-pv-cell.placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,0.03) 0, rgba(255,255,255,0.03) 10px, transparent 10px, transparent 20px);
}

.tools-card-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--border);
}
.tools-card-head-ic {
  width: 38px; height: 38px;
  flex-shrink: 0;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(59,130,246,0.12);
  color: #60a5fa;
  box-shadow: inset 0 0 0 1px rgba(59,130,246,0.22);
  font-size: 1.05rem;
}
.tools-card-head-ic svg, .tools-card-head-ic svg * { width: 18px !important; height: 18px !important; max-width: 18px !important; max-height: 18px !important; color: inherit; }
.tools-card-head h3 { margin: 0; font-size: 1rem; font-weight: 800; }
.tools-card-head h3 + div { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.1rem; }

/* ============ EXPORT FILTER UI KIT ============ */
.export-filter-wrap {
  background: var(--bg-secondary);
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 1.15rem 1.25rem;
  margin-bottom: 1.2rem;
}
.export-filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.95rem;
}
.export-filter-title {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.export-filter-title .ic {
  width: 40px; height: 40px;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(255,77,157,0.18), rgba(124,92,255,0.14));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.export-filter-title h3 { margin: 0; font-size: 1rem; font-weight: 800; letter-spacing: -.01em; }
.export-filter-title h3 + div { font-size: .78rem; color: var(--text-muted); margin-top: .1rem; }
.export-filter-count {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.8rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255,77,157,0.16), rgba(124,92,255,0.12));
  box-shadow: inset 0 0 0 1px rgba(255,77,157,0.22);
  color: #fff;
  font-weight: 700;
  font-size: .84rem;
}
.export-filter-count strong { font-size: 1rem; color: inherit; font-weight: 900; }

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.5rem;
  background: rgba(255,255,255,0.03);
  border-radius: 12px;
  margin-bottom: 1rem;
}
.preset-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.48rem 0.85rem;
  border-radius: 10px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .16s ease;
  font-family: inherit;
}
.preset-btn:hover {
  color: var(--text);
  border-color: rgba(124,92,255,0.35);
  background: rgba(124,92,255,0.06);
  transform: translateY(-1px);
}
.preset-btn.active {
  background: linear-gradient(135deg, rgba(255,77,157,0.92), rgba(124,92,255,0.88));
  color: white;
  border-color: transparent;
  box-shadow: 0 6px 16px -8px rgba(255,77,157,0.6), inset 0 0 0 1px rgba(255,255,255,0.08);
}

.checkbox-groups-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 0.7rem;
  padding-top: 0.1rem;
}
.ds-group-col {
  background: rgba(255,255,255,0.025);
  border-radius: 12px;
  padding: 0.75rem 0.8rem 0.6rem;
  border: 1px solid rgba(255,255,255,0.04);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.ds-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.45rem;
  margin-bottom: 0.1rem;
  border-bottom: 1px dashed var(--border);
}
.ds-group-title strong {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent-pink);
  font-weight: 800;
}
.ds-group-title .mini-count {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(255,255,255,0.05);
  padding: 0.08rem 0.45rem;
  border-radius: 999px;
}
.ds-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.6rem;
  align-items: center;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all .14s ease;
  border: 1px solid transparent;
  user-select: none;
}
.ds-card:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(124,92,255,0.16);
}
.ds-card[data-checked="true"] {
  background: linear-gradient(135deg, rgba(255,77,157,0.10), rgba(124,92,255,0.07));
  border-color: rgba(255,77,157,0.28);
}
.ds-card-check {
  width: 20px; height: 20px;
  border-radius: 6px;
  border: 2px solid var(--border-strong);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  transition: all .15s ease;
  position: relative;
}
.ds-card[data-checked="true"] .ds-card-check {
  background: linear-gradient(135deg, #ff4d9d, #7c5cff);
  border-color: transparent;
  box-shadow: 0 4px 12px -5px rgba(255,77,157,0.65);
}
.ds-card[data-checked="true"] .ds-card-check::after {
  content: '';
  width: 5px; height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
}
.ds-card-info { min-width: 0; display: flex; flex-direction: column; gap: 0.06rem; }
.ds-card-info strong {
  font-size: 0.82rem;
  color: var(--text);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.ds-card-info strong .ico {
  width: 18px; height: 18px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.92rem;
  opacity: .95;
}
.ds-card-info span {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.3;
  max-width: 28ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ds-card-count {
  flex-shrink: 0;
  font-family: var(--font-condensed, ui-monospace);
  font-weight: 900;
  font-size: 0.88rem;
  color: var(--text-strong);
  background: rgba(255,255,255,0.04);
  padding: 0.16rem 0.5rem;
  border-radius: 8px;
  min-width: 42px;
  text-align: center;
}
.ds-card[data-checked="true"] .ds-card-count {
  background: rgba(255,77,157,0.12);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,77,157,0.22);
}

.sb-footer {
  margin-top: 1.5rem;
  padding: 1rem 1.1rem 0.75rem 1.1rem;
  border-top: 1px solid var(--border-subtle);
}
.sb-user { display: flex; align-items: center; gap: 0.65rem; margin-bottom: 0.5rem; }
.sb-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background-size: cover; background-position: center;
  display: grid; place-items: center;
  color: white; font-weight: 700;
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
  font-size: 0.85rem;
  flex-shrink: 0;
}
.sb-user-meta { min-width: 0; }
.sb-user-name { font-size: 0.85rem; color: var(--text-strong); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user-role { font-size: 0.7rem; color: var(--text-muted); }
.sb-btn-logout {
  width: 100%;
  padding: 0.65rem 0.75rem;
  background: linear-gradient(180deg, rgba(239,68,68,0.06), rgba(239,68,68,0.02));
  color: #fca5a5;
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.82rem; font-weight: 600;
  display: flex; align-items: center; justify-content: flex-start; gap: 0.7rem;
  transition: all 0.18s cubic-bezier(.2,.8,.2,1);
  box-shadow: inset 0 0 0 1px rgba(239,68,68,0.05);
}
.sb-btn-logout .sb-lgo-ic {
  width: 22px; height: 22px; border-radius: 7px;
  display: grid; place-items: center; flex-shrink: 0;
  background: rgba(239,68,68,0.12);
  color: #fb7185;
}
.sb-btn-logout .sb-lgo-ic svg { width: 18px; height: 18px; display: block; }
.sb-btn-logout .sb-lgo-meta {
  display: flex; flex-direction: column; align-items: flex-start; min-width: 0;
  line-height: 1.1;
}
.sb-btn-logout .sb-lgo-title {
  color: #fca5a5; font-weight: 700; font-size: 0.85rem;
  letter-spacing: -0.01em;
}
.sb-btn-logout .sb-lgo-sub {
  color: rgba(252,165,165,0.65); font-weight: 500; font-size: 0.68rem;
  margin-top: 2px;
}
.sb-btn-logout:hover {
  background: linear-gradient(180deg, rgba(239,68,68,0.14), rgba(239,68,68,0.08));
  border-color: rgba(239,68,68,0.55);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px -6px rgba(239,68,68,0.5), inset 0 0 0 1px rgba(239,68,68,0.12);
}
.sb-btn-logout:active { transform: translateY(0); }
.sb-btn-logout:focus-visible {
  outline: 2px solid rgba(244,114,182,0.55);
  outline-offset: 2px;
}

/* ============ MAIN CONTENT WRAPPER ============ */
.admin-main {
  display: flex; flex-direction: column; min-width: 0;
  position: relative;
  z-index: 2;
  min-height: 100vh;
  overflow: visible !important;
  background:
    radial-gradient(820px 520px at 92% 0%, rgba(124,92,255,0.085), transparent 58%),
    radial-gradient(680px 460px at 100% 92%, rgba(255,77,157,0.055), transparent 60%),
    linear-gradient(180deg, #120f32 0%, #15113a 48%, #0e0b29 100%);
  border-left: 1px solid rgba(255,255,255,0.06);
}
.admin-main::before {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1200px 700px at 50% -10%, rgba(124,92,255,0.05), transparent 60%);
}

.admin-topbar {
  position: sticky !important; top: 0 !important; z-index: 50 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  background: rgba(22, 18, 55, 0.96);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid rgba(124, 92, 255, 0.28);
  padding: 0.75rem 1.5rem;
  display: flex; align-items: center; gap: 1rem;
  box-shadow: 0 8px 32px -8px rgba(0,0,0,0.45), 0 1px 0 rgba(255,255,255,0.04) inset;
  will-change: transform, box-shadow;
}
@media (max-width: 1023px) { .admin-topbar { position: sticky !important; top: 0 !important; padding: 0.7rem 1.1rem !important; gap: 0.8rem !important; } }
@media (max-width: 960px) { .admin-topbar { position: sticky !important; top: 0 !important; padding: 0.65rem 1rem !important; gap: 0.7rem !important; } }

.sidebar-toggle {
  display: none;
  background: transparent; border: 1px solid var(--border-default);
  width: 38px; height: 38px; border-radius: 9px;
  color: var(--text);
  cursor: pointer;
  align-items: center; justify-content: center;
}
@media (max-width: 1023px) { .sidebar-toggle { display: inline-flex; } }
@media (max-width: 640px) { .sidebar-toggle { width: 36px; height: 36px; } }

.topbar-title {
  font-family: var(--font-display);
  font-weight: 700; font-size: 1.05rem;
  color: var(--text-strong);
  min-width: 0; flex: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar-actions { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.topbar-actions .btn { font-size: 0.82rem; padding: 0.45rem 0.75rem; height: 38px; }

/* ============================================
   👤 TOPBAR USER PROFILE WIDGET (Avatar + Nama + Role Badge)
   Otomatis sesuai role login: Admin / Editor / Author / Contributor / Subscriber
   ============================================ */
.topbar-profile { position: relative; z-index: 40; }
.tp-btn {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.3rem 0.85rem 0.3rem 0.38rem;
  height: 44px; border-radius: 999px;
  border: 1px solid rgba(124, 92, 255, 0.28);
  background: linear-gradient(135deg, rgba(124,92,255,0.13), rgba(255,77,157,0.08));
  box-shadow: 0 4px 14px -6px rgba(124,92,255,0.55), inset 0 1px 0 rgba(255,255,255,0.08);
  cursor: pointer;
  color: var(--text);
  transition: all .2s ease;
  font-family: inherit;
}
.tp-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -6px rgba(124,92,255,0.72), inset 0 1px 0 rgba(255,255,255,0.1); border-color: rgba(255,77,157,0.48); }
.tp-btn:active { transform: translateY(0); }
.tp-avatar {
  flex-shrink: 0;
  width: 34px; height: 34px; border-radius: 999px;
  background: linear-gradient(135deg, #7c5cff, #ff4d9d);
  color: #fff; font-weight: 800; font-size: 0.85rem; letter-spacing: 0.02em;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.06), 0 3px 10px -2px rgba(124,92,255,0.7);
}
.tp-meta { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; line-height: 1.05; }
.tp-name { font-weight: 700; font-size: 0.82rem; color: #fff; max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-role { font-weight: 700; font-size: 0.66rem; margin-top: 2px; letter-spacing: 0.03em; text-transform: capitalize; }
.tp-chev { width: 14px; height: 14px; opacity: 0.82; flex-shrink: 0; }
/* Popup Profile (dropdown muncul saat klik avatar) */
.tp-pop {
  position: absolute; right: 0; top: calc(100% + 10px);
  min-width: 290px; max-width: 92vw;
  background: linear-gradient(160deg, rgba(26,22,64,0.98), rgba(40,30,98,0.98));
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 0.9rem;
  box-shadow: 0 34px 72px -26px rgba(0,0,0,0.92), 0 0 0 1px rgba(124,92,255,0.2), inset 0 1px 0 rgba(255,255,255,0.08);
  animation: tpPopIn 0.22s cubic-bezier(.2,.9,.3,1.3);
  transform-origin: top right;
}
@keyframes tpPopIn { from { opacity:0; transform: translateY(-8px) scale(0.95);} to {opacity:1; transform: translateY(0) scale(1);} }
.tp-pop-role-badge {
  display: flex; flex-direction: column; gap: 3px;
  padding: 0.75rem 0.95rem; border-radius: 14px;
  margin-bottom: 0.7rem;
  border-width: 1px; border-style: solid;
  font-size: 0.76rem;
}
.tp-pop-role-badge span:first-child { font-size: 0.96rem; }
.tp-pop-item {
  width: 100%;
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.7rem 0.9rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.84rem;
  transition: all .18s ease;
}
.tp-pop-item:hover { background: rgba(255,77,157,0.12); border-color: rgba(255,77,157,0.45); transform: translateY(-1px); }
.tp-pop-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.tp-pop-item.signout { color: #ff9eb6; border-color: rgba(255,77,120,0.28); }
.tp-pop-item.signout:hover { background: rgba(255,77,120,0.18); border-color: rgba(255,77,120,0.65); }

/* Responsive Profile Widget */
@media (max-width: 1023px) {
  .tp-meta { display: none; }
}
@media (max-width: 640px) {
  .tp-btn { padding: 0.28rem 0.28rem 0.28rem 0.28rem; height: 40px; }
  .tp-chev { display: none; }
  .tp-avatar { width: 32px; height: 32px; font-size: 0.8rem; }
  .tp-pop { right: -0.5rem; min-width: 260px; }
}

/* ============================================
   ➕ NEW DROPDOWN (WordPress Modern Style)
   Menu cepat buat content baru: Post / Page / Media / Slot / Slot Demo / Blog / Casino / Provider / User
   ============================================ */
.new-dropdown { position: relative; z-index: 35; }
.new-btn {
  display: flex; align-items: center; gap: 0.45rem;
  padding: 0.48rem 0.82rem 0.48rem 0.7rem;
  height: 40px; border-radius: 999px;
  border: 1px solid rgba(124, 92, 255, 0.24);
  background: linear-gradient(135deg, rgba(255,77,157,0.18), rgba(124,92,255,0.16));
  box-shadow: 0 4px 14px -6px rgba(255,77,157,0.55), inset 0 1px 0 rgba(255,255,255,0.08);
  cursor: pointer;
  color: #fff;
  font-weight: 800; font-size: 0.86rem;
  font-family: inherit;
  transition: all .2s ease;
  letter-spacing: 0.01em;
}
.new-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -6px rgba(255,77,157,0.75), inset 0 1px 0 rgba(255,255,255,0.12); border-color: rgba(255,77,157,0.55); }
.new-btn:active { transform: translateY(0); }
.new-btn svg.plus { width: 16px; height: 16px; flex-shrink: 0; }
.new-btn svg.chev { width: 13px; height: 13px; opacity: 0.9; flex-shrink: 0; }
/* New Popup Dropdown */
.new-pop {
  position: absolute; right: 0; top: calc(100% + 10px);
  min-width: 280px; max-width: 92vw;
  background: linear-gradient(160deg, rgba(26,22,64,0.98), rgba(40,30,98,0.98));
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 0.55rem;
  box-shadow: 0 34px 72px -26px rgba(0,0,0,0.92), 0 0 0 1px rgba(255,77,157,0.22), inset 0 1px 0 rgba(255,255,255,0.08);
  animation: tpPopIn 0.22s cubic-bezier(.2,.9,.3,1.3);
  transform-origin: top right;
  z-index: 2147483640;
}
.new-item {
  display: flex; align-items: center; gap: 0.7rem;
  width: 100%;
  padding: 0.6rem 0.78rem;
  border-radius: 12px;
  color: #e2e8f0;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.86rem;
  transition: all .18s ease;
  text-decoration: none;
}
.new-item:hover {
  background: linear-gradient(135deg, rgba(255,77,157,0.15), rgba(124,92,255,0.16));
  border-color: rgba(255,255,255,0.07);
  color: #fff;
  transform: translateX(2px);
}
.new-item .icon-wrap {
  flex-shrink: 0;
  width: 30px; height: 30px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.06);
}
.new-item .icon-wrap svg { width: 15px; height: 15px; color: #cbd5e1; }
.new-item:hover .icon-wrap {
  background: linear-gradient(135deg, rgba(255,77,157,0.35), rgba(124,92,255,0.38));
  border-color: rgba(255,255,255,0.14);
}
.new-item:hover .icon-wrap svg { color: #fff; }
.new-item .ni-meta { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.05; min-width: 0; }
.new-item .ni-label { font-size: 0.87rem; font-weight: 700; }
.new-item .ni-sub { font-size: 0.7rem; color: #94a3b8; margin-top: 2px; font-weight: 500; }
.new-item:hover .ni-sub { color: #cbd5e1; }
.new-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  margin: 0.35rem 0.4rem;
}
/* Responsive New Dropdown */
@media (max-width: 1023px) {
  .new-btn { padding: 0.48rem 0.72rem 0.48rem 0.6rem; }
  .new-btn .chev { display: none; }
}
@media (max-width: 640px) {
  .new-btn { padding: 0.48rem 0.58rem 0.48rem 0.52rem; height: 40px; }
  .new-btn svg.chev { display: none; }
  .new-pop { right: -0.5rem; min-width: 260px; }
  .new-item { padding: 0.55rem 0.65rem; }
}

/* Global Button SVG constraint (fix icon save kebesaran di editor mobile) */
.btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.42rem !important;
  box-sizing: border-box;
  overflow: hidden;
}
.btn svg, .btn svg * {
  width: 18px !important;
  height: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
  flex-shrink: 0;
  display: block;
}
.btn-outline svg { opacity: 0.95; }
.topbar-actions .btn svg, .topbar-actions .btn svg * {
  width: 17px !important;
  height: 17px !important;
  max-width: 17px !important;
  max-height: 17px !important;
}

/* Bulk Actions Bar Responsive (fix Apply terpotong kanan mobile) */
[id$="-bulk-bar"] {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  padding-right: 1rem;
}
[id$="-bulk-bar"] > div:first-child {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
  box-sizing: border-box;
}
[id$="-bulk-bar"] select {
  flex: 1 1 220px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
[id$="-bulk-bar"] [id$="-bulk-apply"] {
  flex: 0 0 auto;
  min-width: 88px;
  box-sizing: border-box;
}

.admin-content { padding: 1.5rem; flex: 1; }
@media (max-width: 1023px) { .admin-content { padding: 1.25rem; } }
@media (max-width: 960px) { .admin-content { padding: 1rem; } }

/* ============ WIDGETS & CARDS ============ */
.page-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 1rem; flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.page-head .page-title { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 1.65rem; color: var(--text-strong); }
.page-head .page-subtitle { color: var(--text-muted); margin-top: 0.25rem; font-size: 0.9rem; line-height: 1.5; }

.stats-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 1023px) { .stats-grid-4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .stats-grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .stats-grid-4 { grid-template-columns: 1fr; } }
.stat-card-xl {
  background: linear-gradient(180deg, rgba(32, 26, 80, 0.92), rgba(26, 22, 64, 0.94));
  border: 1px solid rgba(124, 92, 255, 0.22);
  border-radius: var(--radius-xl);
  padding: 1.15rem 1.25rem;
  position: relative; overflow: hidden;
  transition: all 0.2s;
  box-shadow: 0 6px 26px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.04);
}
.stat-card-xl:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 77, 157, 0.34);
  box-shadow: 0 14px 36px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.05);
}
.stat-card-xl::after {
  content: ''; position: absolute; top: -50%; right: -30%; width: 240px; height: 240px;
  background: radial-gradient(circle, var(--glow-color, rgba(255,77,157,0.18)), transparent 60%);
  pointer-events: none;
}
.scx-label { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; margin-bottom: 0.4rem; }
.scx-value { font-family: var(--font-condensed); font-weight: 800; font-size: 2rem; line-height: 1; color: var(--text-strong); }
.scx-foot { display: flex; align-items: center; gap: 0.35rem; font-size: 0.78rem; color: var(--text-muted); margin-top: 0.5rem; }
.scx-foot .up { color: var(--success); font-weight: 600; }
.scx-foot .down { color: #f87171; font-weight: 600; }
.scx-icon {
  position: absolute; right: 1.1rem; top: 1.1rem;
  width: 38px; height: 38px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--icon-a, var(--accent-pink)), var(--icon-b, var(--accent-purple)));
  color: white; opacity: 0.95;
  z-index: 1;
}
.scx-icon svg { width: 18px; height: 18px; }

.card-panel {
  background: linear-gradient(180deg, rgba(30, 24, 75, 0.91), rgba(25, 21, 62, 0.94));
  border: 1px solid rgba(124, 92, 255, 0.2);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 6px 22px rgba(0,0,0,0.16), inset 0 1px 0 rgba(255,255,255,0.035);
}
.card-panel h3 { margin: 0 0 1rem 0; font-size: 1.05rem; color: var(--text-strong); font-family: var(--font-display); }

/* ============ TABS ============ */
.tabs-panel {
  display: flex; align-items: center; gap: 0.35rem;
  margin-bottom: 1rem; flex-wrap: wrap;
  padding: 0.35rem;
  background: linear-gradient(180deg, rgba(28, 23, 70, 0.88), rgba(24, 20, 60, 0.92));
  border: 1px solid rgba(124, 92, 255, 0.18);
  border-radius: 12px;
  box-shadow: 0 3px 16px rgba(0,0,0,0.14), inset 0 1px 0 rgba(255,255,255,0.03);
}
.tab-pill {
  padding: 0.5rem 0.9rem;
  background: transparent; border: none; cursor: pointer;
  color: var(--text-muted);
  font-size: 0.85rem; font-weight: 600;
  border-radius: 8px;
  transition: all 0.15s;
  font-family: inherit;
}
.tab-pill:hover { color: var(--text); background: rgba(255,255,255,0.03); }
.tab-pill.active {
  color: white;
  background: linear-gradient(135deg, rgba(255,77,157,0.58), rgba(124,92,255,0.58));
  box-shadow: 0 6px 18px rgba(255,77,157,0.22);
}

/* ============ TABLE / LIST ============ */
.crud-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 0.75rem; flex-wrap: wrap;
  margin-bottom: 1rem;
}
.crud-search {
  position: relative; flex: 1; min-width: 220px; max-width: 420px;
}
.crud-search input {
  width: 100%; height: 40px;
  padding: 0 0.9rem 0 2.25rem;
  background: linear-gradient(180deg, rgba(26, 21, 62, 0.95), rgba(22, 18, 54, 0.97));
  color: var(--text);
  border: 1px solid rgba(124, 92, 255, 0.18);
  border-radius: 10px;
  font-size: 0.88rem;
  outline: none;
  font-family: inherit;
}
.crud-search input:focus { border-color: rgba(255,77,157,0.45); box-shadow: 0 0 0 4px rgba(255,77,157,0.1); }
.crud-search svg {
  position: absolute; left: 0.7rem; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--text-muted); pointer-events: none;
}
.crud-toolbar-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.data-table-wrap {
  border: 1px solid rgba(124, 92, 255, 0.22);
  border-radius: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(168, 85, 247, 0.4) transparent;
  background: linear-gradient(180deg, rgba(30, 24, 75, 0.91), rgba(24, 20, 60, 0.94));
  box-shadow: 0 6px 24px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.03);
}
.data-table-wrap::-webkit-scrollbar { height: 6px; }
.data-table-wrap::-webkit-scrollbar-track { background: transparent; }
.data-table-wrap::-webkit-scrollbar-thumb { background: rgba(168,85,247,0.35); border-radius: 999px; }
.data-table-wrap::-webkit-scrollbar-thumb:hover { background: rgba(168,85,247,0.6); }
.data-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 0.86rem;
  table-layout: auto;
}
.data-table thead { background: linear-gradient(180deg, rgba(40, 32, 90, 0.85), rgba(32, 26, 75, 0.9)); }
.data-table th {
  text-align: left;
  padding: 0.9rem 1.05rem;
  color: #d9d3ff;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(124, 92, 255, 0.28);
  white-space: nowrap;
  vertical-align: middle;
}
.data-table th:nth-child(1) { min-width: 0; padding-left: 1.25rem; }
.list-table th:nth-child(2) { min-width: 175px; }
.list-table th:nth-child(3) { min-width: 185px; }
.list-table th:nth-child(4) { min-width: 260px; padding-right: 1.7rem; } /* TAGS COLUMN HEADER: extra right padding away from STATUS */
.list-table th:nth-last-child(3) { min-width: 105px; text-align: right; padding-right: 1.2rem; } /* VIEWS = 3rd from last */
.list-table th:nth-child(1) { min-width: 0; padding-left: 1.25rem; }

/* ===== DASHBOARD INNER TABLES (Top Posts widget + other mini tables) ===== */
.grid-main-side .card-panel .data-table th:nth-child(1),
.grid-main-side .card-panel .data-table td:nth-child(1) {
  min-width: 240px;
  width: 48% !important;
}
.grid-main-side .card-panel .data-table td:nth-child(1) .ct {
  overflow-wrap: normal;
  word-break: break-word;
  hyphens: manual;
  white-space: normal;
  font-size: 0.96rem;
  line-height: 1.35;
}
.grid-main-side .card-panel .data-table th:nth-child(2),
.grid-main-side .card-panel .data-table td:nth-child(2) {
  min-width: 140px;
  width: auto;
}
.data-table td {
  padding: 0.82rem 1.05rem;
  border-bottom: 1px solid rgba(124, 92, 255, 0.1);
  color: var(--text);
  vertical-align: top;
}
.data-table td:nth-child(1) { padding-left: 1.25rem; }
.list-table td:nth-child(4) { padding: 0.8rem 1.7rem 0.85rem 1.05rem; } /* TAGS COLUMN CELL: extra right padding, vertical top, larger bottom pad */
.list-table th:nth-last-child(3) + td,
.list-table td:nth-last-child(3) { text-align: right; font-variant-numeric: tabular-nums; padding-right: 1.2rem; } /* VIEWS content align right */
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background 0.12s; }
.data-table tbody tr:hover { background: rgba(124, 92, 255, 0.06); }
.data-table tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.018); }
.data-table tbody tr:nth-child(even):hover { background: rgba(124, 92, 255, 0.08); }
.data-table .cell-title {
  display: flex; align-items: center; gap: 0.65rem; min-width: 0;
}
.data-table .thumb-sm {
  width: 40px; height: 26px; flex-shrink: 0;
  border-radius: 6px; background-size: cover; background-position: center;
  background-color: var(--bg-tertiary);
  display: grid; place-items: center;
  color: white; font-weight: 700; font-size: 0.65rem;
  overflow: hidden;
}
.data-table .thumb-avatar {
  width: 32px; height: 32px; flex-shrink: 0;
  border-radius: 50%; background-size: cover; background-position: center;
  background-color: var(--bg-tertiary);
  display: grid; place-items: center;
  color: white; font-weight: 700; font-size: 0.7rem;
}
.data-table .ct {
  font-weight: 700;
  color: var(--text-strong);
  max-width: none;
  white-space: normal;
  overflow-wrap: normal;
  word-break: break-word;
  line-height: 1.35;
  hyphens: manual;
  display: block;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}
.data-table .cm { color: var(--text-muted); font-size: 0.76rem; display: block; margin-top: 0.18rem; line-height: 1.4; word-break: break-word; overflow-wrap: anywhere; }
.data-table .cell-title > div:last-child:not(.row-actions-inline):not(:only-child) { min-width: 0; flex: 1 1 auto; }

/* ====== SCRUD TABLES (Categories/Tags/Authors/Providers/Casinos/Streamers/BigWins + CPT Types + Users) ====== */
.scrud-table th:nth-child(1), .scrud-table td:nth-child(1) { min-width: 260px; width: 44% !important; }
.scrud-table td:nth-child(1) .cell-title { align-items: flex-start; padding-top: 0.25rem; }
.scrud-table td:nth-child(1) .cell-title > .thumb-sm,
.scrud-table td:nth-child(1) .cell-title > .thumb-avatar { margin-top: 0.15rem; }
.scrud-table td:nth-child(1) .row-actions-inline { margin-top: 0.45rem; }
/* Description / Bio / Bonus columns wrap natural (bukan nowrap ellipsis) */
.scrud-table td[style*="white-space:nowrap"] {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.5;
  max-width: none !important;
  word-break: break-word;
}
/* SCRUD CATEGORIES / TAGS / AUTHORS: Hide Description (col2) first on mobile */
@media (max-width: 880px) {
  .scrud-categories th:nth-child(2), .scrud-categories td:nth-child(2),
  .scrud-tags th:nth-child(2), .scrud-tags td:nth-child(2),
  .scrud-authors th:nth-child(2), .scrud-authors td:nth-child(2),
  .scrud-providers th:nth-child(2), .scrud-providers td:nth-child(2),
  .scrud-bigwins th:nth-child(4), .scrud-bigwins td:nth-child(4),
  .scrud-casinos th:nth-child(2), .scrud-casinos td:nth-child(2),
  .scrud-streamers th:nth-child(2), .scrud-streamers td:nth-child(2) { display: none; }
  .scrud-table th:nth-child(1), .scrud-table td:nth-child(1) { width: 58% !important; min-width: 220px; }
}
@media (max-width: 640px) {
  /* SCRUD: Hide POSTS COUNT / SLOTS COUNT / CASINO BONUS / BIGWIN AMOUNT (col3) */
  .scrud-categories th:nth-child(3), .scrud-categories td:nth-child(3),
  .scrud-tags th:nth-child(3), .scrud-tags td:nth-child(3),
  .scrud-authors th:nth-child(3), .scrud-authors td:nth-child(3),
  .scrud-providers th:nth-child(3), .scrud-providers td:nth-child(3),
  .scrud-bigwins th:nth-child(2), .scrud-bigwins td:nth-child(2),
  .scrud-bigwins th:nth-child(3), .scrud-bigwins td:nth-child(3),
  /* CPT Types: hide Icon(col3) + Supports(col5) */
  .scrud-cpttypes th:nth-child(3), .scrud-cpttypes td:nth-child(3),
  .scrud-cpttypes th:nth-child(5), .scrud-cpttypes td:nth-child(5),
  /* Users: hide Email(col2) + Created(col4) */
  .scrud-users th:nth-child(2), .scrud-users td:nth-child(2),
  .scrud-users th:nth-child(4), .scrud-users td:nth-child(4) { display: none; }
  .scrud-table th:nth-child(1), .scrud-table td:nth-child(1) { width: 72% !important; min-width: 0; }
  .scrud-cpttypes th:nth-child(2), .scrud-cpttypes td:nth-child(2) { width: 28% !important; }
  .scrud-users th:nth-child(3), .scrud-users td:nth-child(3) { width: 28% !important; }
}
@media (max-width: 520px) {
  /* SCRUD TERSISA: cuma tinggal NAME + 1 optional col (kalau ada) */
  .scrud-table th:nth-child(n+2), .scrud-table td:nth-child(n+2) { display: none; }
  .scrud-table th:nth-child(1), .scrud-table td:nth-child(1) { width: 100% !important; }
}

.list-table th:nth-child(2),
.list-table td:nth-child(2) {
  min-width: 320px;
  width: 42%;
}
.scrud-table th:nth-child(2),
.scrud-table td:nth-child(2) {
  min-width: 0;
  width: auto;
}

.data-table td:nth-child(3) { min-width: 0; }
.list-table td:nth-child(3) > * {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}

.status-pill {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem; font-weight: 600;
  line-height: 1.4;
  flex-shrink: 0;
}
.status-pill .dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.status-published { background: rgba(34,197,94,0.12); color: #86efac; border: 1px solid rgba(34,197,94,0.25); }
.status-published .dot { background: #22c55e; }
.status-draft { background: rgba(148,163,184,0.12); color: #cbd5e1; border: 1px solid rgba(148,163,184,0.25); }
.status-draft .dot { background: #94a3b8; }
.status-scheduled { background: rgba(234,179,8,0.12); color: #fde047; border: 1px solid rgba(234,179,8,0.25); }
.status-scheduled .dot { background: #eab308; }
.status-featured { background: rgba(255,77,157,0.12); color: #fbcfe8; border: 1px solid rgba(255,77,157,0.28); }
.status-featured .dot { background: var(--accent-pink); }
.status-live { background: rgba(239,68,68,0.12); color: #fca5a5; border: 1px solid rgba(239,68,68,0.25); }
.status-live .dot { background: #ef4444; animation: pulse 1.6s ease-in-out infinite; }

/* ============ TABLE RESPONSIVE BREAKPOINTS ============ */
@media (max-width: 1440px) {
  .data-table .ct { max-width: none; }
}
@media (max-width: 1023px) {
  .data-table .ct { max-width: none; }
  .data-table .thumb-sm { width: 36px; height: 24px; }
}
@media (max-width: 1023px) {
  .data-table { min-width: 480px; }
  .data-table th { padding: 0.7rem 0.75rem; font-size: 0.68rem; letter-spacing: 0.05em; }
  .data-table td { padding: 0.6rem 0.75rem; }
  .data-table th:nth-child(1) { padding-left: 0.9rem; }
  .data-table td:nth-child(1) { padding-left: 0.9rem; }
  .data-table th:nth-child(4) { min-width: 200px; padding-right: 1.2rem; } /* TAGS tetap luas di tablet */
  .data-table td:nth-child(4) { padding-right: 1.2rem; }
  .data-table th:nth-child(2) { min-width: 150px; }
  .data-table .ct { max-width: none; font-size: 0.94rem; line-height: 1.35; }
  .data-table .cm { font-size: 0.76rem; }
  .data-table .thumb-sm { width: 34px; height: 22px; }
  .status-pill { font-size: 0.68rem; padding: 0.18rem 0.52rem; }
}
@media (max-width: 880px) {
  .data-table { min-width: 440px; }
  .data-table .ct { max-width: none; }
  .data-table .cm { font-size: 0.72rem; }
  .data-table .thumb-avatar { width: 28px; height: 28px; font-size: 0.65rem; }
  .data-table td { font-size: 0.8rem; }
  .data-table th:nth-last-child(3) { min-width: 80px; } /* VIEWS squeezed, TAGS untouched */
}
@media (max-width: 768px) {
  .data-table-wrap { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 20px), transparent 100%); }
  .data-table { min-width: 100% !important; font-size: 0.82rem; table-layout: auto; }
  .data-table th { padding: 0.65rem 0.65rem; letter-spacing: 0.04em; }
  .data-table td { padding: 0.55rem 0.65rem; }
  .data-table th:nth-child(1), .data-table td:nth-child(1) { padding-left: 0.8rem; }
  .list-table th:nth-child(2), .list-table td:nth-child(2) { min-width: 200px; width: 70% !important; }
  .list-table th:nth-child(4), .list-table td:nth-child(4) { padding-right: 1rem; }
  .list-table .ct { max-width: none; font-size: 0.92rem; line-height: 1.38; }
  .list-table .thumb-sm { width: 32px; height: 20px; border-radius: 5px; }
  /* DASHBOARD widget mobile */
  .grid-main-side .card-panel .data-table th:nth-child(1),
  .grid-main-side .card-panel .data-table td:nth-child(1) {
    min-width: 180px;
    width: 60% !important;
  }
  .grid-main-side .card-panel .data-table th:nth-child(3),
  .grid-main-side .card-panel .data-table td:nth-child(3) {
    min-width: 90px;
  }
  .status-pill { font-size: 0.66rem; padding: 0.16rem 0.48rem; }
  .status-pill .dot { width: 5px; height: 5px; }
}
@media (max-width: 640px) {
  .data-table { min-width: 100% !important; }
  .data-table th { font-size: 0.64rem; padding: 0.6rem 0.6rem; }
  .data-table td { padding: 0.5rem 0.6rem; }
  .list-table th:nth-child(2), .list-table td:nth-child(2) { min-width: 180px; width: 75% !important; }
  .list-table th:nth-child(3), .list-table td:nth-child(3) { display: none; }
  .list-table .ct { max-width: none; font-size: 0.9rem; line-height: 1.4; }
  .list-table .thumb-avatar { width: 26px; height: 26px; font-size: 0.62rem; }
  /* DASHBOARD widget 640 mobile: hide views col 4, updated col 5 */
  .grid-main-side .card-panel .data-table th:nth-child(4),
  .grid-main-side .card-panel .data-table td:nth-child(4),
  .grid-main-side .card-panel .data-table th:nth-child(5),
  .grid-main-side .card-panel .data-table td:nth-child(5),
  .grid-main-side .card-panel .data-table th:nth-child(6),
  .grid-main-side .card-panel .data-table td:nth-child(6) { display: none; }
  .grid-main-side .card-panel .data-table th:nth-child(1),
  .grid-main-side .card-panel .data-table td:nth-child(1) {
    width: 65% !important;
    min-width: 150px;
  }
  .status-pill { font-size: 0.62rem; padding: 0.14rem 0.44rem; gap: 0.22rem; }
  .row-actions-inline { font-size: 0.72rem !important; gap: 0.3rem !important; }
  .row-actions-inline > a,
  .row-actions-inline > button.row-action-link {
    padding: 0.3rem 0.5rem !important;
    border-radius: 999px !important;
  }
  /* Icon button lebih kecil mobile */
  .btn svg, .btn svg * {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
  }
  /* Bulk Actions: lebih lebar, padding rapi, Apply tidak keluar */
  [id$="-bulk-bar"] {
    padding: 0.6rem 0.8rem !important;
    gap: 0.6rem !important;
    flex-direction: column;
    align-items: stretch !important;
  }
  [id$="-bulk-bar"] > div:first-child {
    width: 100%;
    min-width: 0 !important;
  }
  [id$="-bulk-bar"] > div:first-child select {
    flex: 1 1 100%;
    min-width: 100% !important;
  }
  [id$="-bulk-bar"] [id$="-bulk-apply"] {
    flex: 1 1 100%;
    width: 100% !important;
  }
}
@media (max-width: 520px) {
  .data-table-wrap { -webkit-mask-image: none; overflow-x: hidden; }
  .data-table { min-width: 100% !important; table-layout: auto; }
  .list-table th:nth-child(3), .list-table td:nth-child(3),
  .list-table th:nth-child(4), .list-table td:nth-child(4) { display: none; }
  .list-table th:nth-child(2), .list-table td:nth-child(2) { min-width: 0; width: 80% !important; }
  .list-table .ct { max-width: none; white-space: normal; line-height: 1.4; font-size: 0.9rem; }
  .list-table .cell-title { gap: 0.5rem; }
  .list-table .thumb-sm { width: 30px; height: 20px; }
  /* DASHBOARD widget 520 mobile: hide col 2,3,4,5,6 (Author, Status, Views, Updated, Actions icon) */
  .grid-main-side .card-panel .data-table th:nth-child(n+2),
  .grid-main-side .card-panel .data-table td:nth-child(n+2) { display: none; }
  .grid-main-side .card-panel .data-table th:nth-child(1),
  .grid-main-side .card-panel .data-table td:nth-child(1) {
    width: 100% !important;
    min-width: 0;
  }
  .grid-main-side .card-panel .data-table td:nth-child(1) .ct {
    font-size: 0.92rem;
    line-height: 1.4;
  }
  .row-actions-inline { gap: 0.25rem !important; margin-top: 0.35rem; }
  .row-actions-inline > a,
  .row-actions-inline > button.row-action-link {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.34rem 0.4rem !important;
    justify-content: center;
  }
  .row-actions-inline > a,
  .row-actions-inline > button.row-action-link {
    font-size: 0 !important;
  }
  .row-actions-inline .ra-ico {
    font-size: 0.9rem !important;
  }
  /* Editor toolbar mobile kecil: Save/Publish turun ke baris baru, icon lebih kecil */
  .page-head { gap: 0.65rem; }
  .page-head .topbar-actions {
    width: 100%;
    flex-wrap: wrap;
    gap: 0.4rem;
  }
  .page-head .topbar-actions .btn {
    flex: 1 1 calc(50% - 0.25rem);
    min-width: 0;
    justify-content: center;
    height: 40px !important;
    font-size: 0.8rem !important;
  }
  .page-head .topbar-actions .btn.btn-primary { min-width: 0; }
  .btn svg, .btn svg * {
    width: 15px !important;
    height: 15px !important;
    max-width: 15px !important;
    max-height: 15px !important;
  }
  /* Bulk Actions padding lebih ketat */
  [id$="-bulk-bar"] {
    padding: 0.55rem 0.7rem !important;
    gap: 0.45rem !important;
  }
  [id$="-bulk-bar"] select {
    height: 40px;
  }
  [id$="-bulk-bar"] [id$="-bulk-counter"] {
    font-size: 0.76rem !important;
    padding: 0.28rem 0.55rem !important;
  }
}
@media (max-width: 420px) {
  .list-table th:nth-child(5), .list-table td:nth-child(5),
  .list-table th:nth-child(6), .list-table td:nth-child(6) { display: none; }
  .list-table .ct { font-size: 0.86rem; }
  .status-pill { font-size: 0.6rem; padding: 0.12rem 0.42rem; }
  .row-actions-inline > a,
  .row-actions-inline > button.row-action-link {
    padding: 0.32rem 0.22rem !important;
    border-radius: 10px;
  }
  .row-actions-inline .ra-ico { font-size: 0.95rem !important; }
  /* Editor toolbar: 1 baris per tombol */
  .page-head .topbar-actions .btn {
    flex: 1 1 100%;
    height: 42px !important;
    font-size: 0.82rem !important;
  }
  .btn svg, .btn svg * {
    width: 15px !important;
    height: 15px !important;
  }
}

.row-actions { display: flex; gap: 0.3rem; white-space: nowrap; }
.icon-btn-sm {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}
.icon-btn-sm:hover { color: var(--text); border-color: var(--border-strong); background: var(--bg-tertiary); }
.icon-btn-sm.edit:hover { color: #93c5fd; border-color: rgba(59,130,246,0.35); }
.icon-btn-sm.view:hover { color: #86efac; border-color: rgba(34,197,94,0.35); }
.icon-btn-sm.del:hover { color: #fca5a5; border-color: rgba(239,68,68,0.4); background: rgba(239,68,68,0.08); }
.icon-btn-sm svg { width: 14px; height: 14px; }

.data-empty {
  padding: 3rem 1rem;
  text-align: center;
}
.data-empty .big-emoji { font-size: 2.5rem; margin-bottom: 0.5rem; opacity: 0.6; }
.data-empty h4 { margin: 0 0 0.25rem 0; color: var(--text-strong); font-size: 1rem; }
.data-empty p { color: var(--text-muted); font-size: 0.85rem; margin: 0; }

/* ============ MODAL EDITOR ============ */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: grid; place-items: start center;
  padding: 1.5rem 1rem;
  overflow-y: auto;
  animation: fadeIn 0.15s ease both;
}
.modal-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 18px;
  width: min(880px, 100%);
  max-height: calc(100vh - 3rem);
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0,0,0,0.6);
  animation: slideUp 0.22s cubic-bezier(0.22,1,0.36,1) both;
}
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-default);
  gap: 1rem;
}
.modal-title { margin: 0; font-family: var(--font-display); font-size: 1.1rem; color: var(--text-strong); font-weight: 700; }
.modal-close-btn {
  width: 34px; height: 34px;
  background: transparent; border: 1px solid var(--border-default);
  border-radius: 9px; color: var(--text-muted);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}
.modal-close-btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--bg-secondary); }
.modal-body {
  padding: 1.25rem;
  overflow-y: auto;
  flex: 1;
}
.modal-foot {
  display: flex; justify-content: space-between; align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.25rem;
  border-top: 1px solid var(--border-default);
  background: var(--bg-secondary);
}
.modal-foot-actions { display: flex; gap: 0.5rem; }
@media (max-width: 640px) {
  .modal-head { padding: 0.9rem 1rem; }
  .modal-body { padding: 1rem; }
  .modal-foot { padding: 0.85rem 1rem; flex-direction: column-reverse; align-items: stretch; }
  .modal-foot-actions { justify-content: stretch; }
  .modal-foot-actions .btn { flex: 1; }
}

.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) 300px;
  gap: 1.25rem;
  align-items: start;
  min-height: 0;
}
@media (max-width: 1023px) { .editor-layout { grid-template-columns: 1fr; } }

.editor-main {
  min-width: 0;
  padding-right: 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
  min-height: 0;
}

.editor-sidebar {
  position: sticky;
  top: calc(72px + 1rem);
  right: 0;
  max-height: calc(100vh - 72px - 2.5rem);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.25rem;
  padding-left: 0.15rem;
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(168,85,247,0.45) rgba(0,0,0,0.08);
  z-index: 5;
}
.editor-sidebar::-webkit-scrollbar { width: 8px; }
.editor-sidebar::-webkit-scrollbar-track { background: rgba(0,0,0,0.06); border-radius: 999px; margin: 0.4rem 0; }
.editor-sidebar::-webkit-scrollbar-thumb { background: rgba(168,85,247,0.42); border-radius: 999px; }
.editor-sidebar::-webkit-scrollbar-thumb:hover { background: rgba(168,85,247,0.65); }

.editor-sidebar > .editor-group {
  scroll-margin-top: calc(72px + 1.5rem);
}

@media (max-width: 1440px) {
  .editor-sidebar {
    max-height: 82vh;
  }
}
@media (max-width: 1023px) {
  .editor-sidebar {
    position: static !important;
    top: auto !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
    gap: 1.05rem;
  }
  .editor-sidebar::-webkit-scrollbar,
  .editor-sidebar::-webkit-scrollbar-track,
  .editor-sidebar::-webkit-scrollbar-thumb { display: none !important; }
}
@media (max-width: 640px) {
  .editor-sidebar { gap: 0.85rem; }
}

/* ====== SECTION 1: TITLE CARD ====== */
.editor-main #cpt-title,
.editor-main #pe-title,
.editor-main #pge-title,
.editor-main #pa-title {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.09) 0%, rgba(99, 102, 241, 0.05) 50%, rgba(236, 72, 153, 0.07) 100%);
  border: 1.5px solid rgba(168, 85, 247, 0.22);
  border-radius: 16px;
  box-shadow: 0 6px 18px -8px rgba(168, 85, 247, 0.3);
  transition: all 0.18s ease;
}
.editor-main #cpt-title:focus,
.editor-main #pe-title:focus,
.editor-main #pge-title:focus,
.editor-main #pa-title:focus {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.12), 0 8px 26px -10px rgba(168, 85, 247, 0.45);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.11) 0%, rgba(99, 102, 241, 0.07) 50%, rgba(236, 72, 153, 0.09) 100%);
}
/* Remove old inline margin-bottom wrapper gap handled by flex gap above */
.editor-main > .form-group:has(#cpt-title),
.editor-main > .form-group:has(#pe-title),
.editor-main > .form-group:has(#pge-title),
.editor-main > .form-group:has(#pa-title) { margin-bottom: 0 !important; }

/* ====== SECTION 2: PERMALINK / SLUG CARD ====== */
.editor-main > .form-group:has(#cpt-slug),
.editor-main > .form-group:has(#pe-slug),
.editor-main > .form-group:has(#pge-slug),
.editor-main > .form-group:has(#pa-slug) {
  margin-bottom: 0 !important;
  background: rgba(251, 191, 36, 0.05);
  border: 1.5px dashed rgba(251, 191, 36, 0.35);
  border-radius: 14px;
  padding: 0.85rem 1rem 0.9rem 1rem;
}
.editor-main > .form-group:has(#cpt-slug) > label,
.editor-main > .form-group:has(#pe-slug) > label,
.editor-main > .form-group:has(#pge-slug) > label,
.editor-main > .form-group:has(#pa-slug) > label {
  color: var(--accent-gold) !important;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.45rem;
}
.editor-main #cpt-slug,
.editor-main #pe-slug,
.editor-main #pge-slug,
.editor-main #pa-slug {
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 10px;
}
.editor-main #cpt-slug:focus,
.editor-main #pe-slug:focus,
.editor-main #pge-slug:focus,
.editor-main #pa-slug:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.15);
}

/* ====== SECTION 3: RICH EDITOR BLOCK (Toolbar + Content fused) ====== */
.editor-main > div:has(> .rich-editor-toolbar) {
  margin-top: 0 !important;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.04) 0%, rgba(14, 165, 233, 0.03) 100%);
  border: 1.5px solid rgba(59, 130, 246, 0.22);
  border-radius: 18px;
  padding: 0.75rem;
  box-shadow: 0 6px 22px -12px rgba(59, 130, 246, 0.45);
  transition: all 0.2s ease;
  min-width: 0;
  max-width: 100%;
}
.editor-main > div:has(> .rich-editor-toolbar):focus-within {
  border-color: rgba(59, 130, 246, 0.55);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1), 0 10px 30px -14px rgba(59, 130, 246, 0.6);
}
.editor-main .rich-editor-toolbar {
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 12px 12px 0 0;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.72) 0%, rgba(17, 24, 39, 0.75) 100%) !important;
  margin-bottom: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
}
.editor-main .rich-editor {
  min-height: 320px;
  padding: 1.2rem 1.25rem;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-top: none;
  border-radius: 0 0 12px 12px;
  font-size: 0.95rem;
  line-height: 1.78;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
  box-sizing: border-box;
  position: relative;
}
.editor-main .rich-editor:focus {
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.5);
}
.editor-main .rich-editor[data-view="html"] {
  background: linear-gradient(180deg,#0b1020 0%, #10152a 100%);
  padding: 0;
  overflow: visible;
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 380px;
  max-height: none;
  isolation: isolate;
}
.editor-main .rich-editor.code-view-maximized {
  position: fixed !important;
  left: 1.2rem !important;
  right: 1.2rem !important;
  top: 1rem !important;
  bottom: 1rem !important;
  z-index: 94000 !important;
  border-radius: 18px !important;
  box-shadow: 0 40px 120px -40px rgba(139, 92, 246, .65), 0 0 0 1px rgba(139, 92, 246, 0.22) !important;
  width: auto !important;
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 2px solid rgba(236, 72, 153, 0.35) !important;
  overflow: hidden !important;
}
body:has(.rich-editor.code-view-maximized)::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  z-index: 93500;
}
.code-view-header {
  position: sticky !important;
  top: 0 !important;
  left: 0;
  right: 0;
  z-index: 20 !important;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 0.6rem 0.9rem 0.6rem 0.9rem;
  background: linear-gradient(180deg, rgba(236,72,153,0.16), rgba(236,72,153,0.06));
  border-bottom: 1.5px solid rgba(236, 72, 153, 0.26);
  font-family: ui-sans-serif, system-ui;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 6px 18px -10px rgba(236, 72, 153, 0.35);
}
.code-view-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(236, 72, 153, 0.22), transparent);
  pointer-events: none;
  z-index: 1;
}
.code-view-header-left {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  min-width: 0;
}
.code-view-header-right {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}
.code-view-badge-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.6rem;
  background: rgba(236, 72, 153, 0.15);
  color: var(--accent-pink);
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  font-weight: 800;
  border: 1px solid rgba(236,72,153,0.28);
  text-transform: uppercase;
}
.code-view-badge-label small {
  opacity: 0.75;
  letter-spacing: 0.03em;
  font-weight: 500;
  color: #f9a8d4;
}
.code-view-btn,
.code-view-select {
  all: unset;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  padding: 0.32rem 0.58rem;
  background: rgba(30, 41, 59, 0.72);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 9px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .14s ease;
  line-height: 1;
  white-space: nowrap;
  user-select: none;
}
.code-view-btn:hover {
  border-color: rgba(139, 92, 246, 0.45);
  background: rgba(139, 92, 246, 0.15);
  transform: translateY(-1px);
  color: #fff;
  box-shadow: 0 6px 16px -8px rgba(139, 92, 246, .55);
}
.code-view-btn:active { transform: translateY(0); }
.code-view-btn.active,
.code-view-btn[data-active="1"] {
  background: rgba(236, 72, 153, 0.18) !important;
  border-color: rgba(236, 72, 153, 0.5) !important;
  color: #f9a8d4 !important;
  box-shadow: inset 0 0 0 1px rgba(236, 72, 153, 0.25);
}
.code-view-btn.is-scroll {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.3);
}
.code-view-btn.is-scroll:hover {
  background: rgba(59, 130, 246, 0.22);
}
.code-view-btn .kbd {
  display: inline-block;
  font-size: 0.62rem;
  padding: 0.05rem 0.28rem;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.6);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.2);
  margin-left: 2px;
}
.code-view-group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 11px;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(148, 163, 184, 0.12);
}
.code-view-group > .code-view-btn {
  border: 0 !important;
  background: transparent;
  box-shadow: none !important;
  border-radius: 8px;
}
.code-view-divider {
  align-self: stretch;
  width: 1px;
  background: rgba(148, 163, 184, 0.18);
  margin: 0 0.1rem;
}
.code-view-snippet-wrap {
  position: relative;
}
.code-view-snippet-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 230px;
  background: #0f172a;
  border: 1px solid rgba(139, 92, 246, 0.32);
  border-radius: 12px;
  padding: 0.35rem;
  z-index: 12;
  display: none;
  box-shadow: 0 20px 45px -12px rgba(0,0,0,.6);
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}
.code-view-snippet-menu[aria-hidden="false"] { display: grid; }
.code-view-snippet-menu button {
  all: unset;
  grid-column: span 1;
  cursor: pointer;
  padding: 0.45rem 0.55rem;
  font-size: 0.76rem;
  border-radius: 8px;
  color: #e2e8f0;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.code-view-snippet-menu button span {
  font-family: ui-monospace, monospace;
  font-size: 0.64rem;
  color: #a78bfa;
  opacity: 0.85;
}
.code-view-snippet-menu button:hover {
  background: rgba(139, 92, 246, 0.15);
  color: #fff;
}
.code-view-lines {
  font-size: 0.68rem;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.6);
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  font-family: ui-monospace, monospace;
  letter-spacing: 0.03em;
}
.editor-main .rich-editor[data-view="html"] pre,
.editor-main .rich-editor[data-view="html"] code {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
}
.editor-main .rich-editor[data-view="html"] pre.code-view-src {
  display: block;
  flex: 1 1 auto;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: 220px;
  max-height: min(72vh, 760px);
  box-sizing: border-box;
  padding: 1.05rem 1.2rem !important;
  overflow-x: auto !important;
  overflow-y: auto !important;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  white-space: pre;
  word-wrap: normal;
  word-break: normal;
  overflow-wrap: normal;
  font-size: 0.88rem;
  line-height: 1.6;
  color: #e6e8f0;
  outline: none;
  box-shadow: none !important;
  position: relative;
  border-radius: 0 0 10px 10px;
}
.editor-main .rich-editor[data-view="html"] pre.code-view-src.wrap-lines {
  white-space: pre-wrap !important;
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
  overflow-x: hidden !important;
}
.editor-main .rich-editor[data-view="html"] pre.code-view-src *,
.editor-main .rich-editor[data-view="html"] pre.code-view-src *::before,
.editor-main .rich-editor[data-view="html"] pre.code-view-src *::after {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  text-shadow: none !important;
  border: 0 !important;
  outline: 0 !important;
  font-family: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
  text-decoration: none !important;
}
.editor-main .rich-editor[data-view="html"] pre.code-view-src *:not([class^="tok-"]):not([class*=" tok-"]) {
  color: inherit !important;
  font-weight: inherit !important;
  font-style: inherit !important;
}
.editor-main .rich-editor[data-view="html"] pre.code-view-src > code {
  display: block !important;
  width: auto !important;
  min-width: 100% !important;
  max-width: none !important;
  overflow: visible !important;
  overflow-x: visible !important;
  overflow-y: visible !important;
  white-space: inherit !important;
  color: inherit !important;
  font: inherit !important;
  padding: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  border-radius: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}
.editor-main .rich-editor pre,
.editor-main .rich-editor code:not(.editor-main .rich-editor[data-view="html"] pre.code-view-src > code):not(.editor-main .rich-editor[data-view="html"] pre.code-view-src code) {
  max-width: 100%;
  overflow-x: auto;
  box-sizing: border-box;
}
/* ───── Syntax Highlight Tokens (VS Code / Dracula-style dark palette) ───── */
.tok-tag       { color: #f472b6 !important; font-weight: 500; }   /* Pink tag HTML bracket < > */
.tok-tagname   { color: #fb7185 !important; font-weight: 600; }   /* Tag name merah muda: html head meta title */
.tok-close     { color: #f472b6 !important; font-weight: 500; }   /* Close tag </ > */
.tok-slash     { color: #fb7185 !important; opacity: .92; font-weight: 600; }
.tok-attr      { color: #fbbf24 !important; font-weight: 500; }   /* Kuning attribute name: name content id class href rel */
.tok-eq        { color: #cbd5e1 !important; opacity: .78; }       /* = tanda sama dengan pudar */
.tok-str       { color: #34d399 !important; font-weight: 450; }   /* Hijau tosca quoted value "width=device" */
.tok-com       { color: #64748b !important; font-style: italic !important; opacity: .98; }  /* Abu comment <!-- --> */
.tok-doq       { color: #a78bfa !important; font-style: italic !important; font-weight: 600; } /* Ungu <!DOCTYPE html> */
.tok-ent       { color: #60a5fa !important; font-weight: 500; }   /* Biru entity &nbsp; &#169; &amp; */
.tok-text      { color: #e6e8f0 !important; }                     /* Putih teks biasa diantara tag */
.tok-bang      { color: #c084fc !important; font-weight: 600; }   /* Ungu muda <! dan <![CDATA[ */
.editor-main .rich-editor pre {
  white-space: pre;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  background: linear-gradient(135deg,#0b1020,#141a38);
  border: 1px solid rgba(124, 92, 255, 0.22);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88rem;
  line-height: 1.6;
}
.editor-main .rich-editor code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  padding: 0.05rem 0.3rem;
  background: rgba(124, 92, 255, 0.15);
  color: #e9d5ff;
  border-radius: 6px;
}
.editor-main .rich-editor * {
  max-width: 100%;
  box-sizing: border-box;
}
.editor-main .rich-editor table {
  width: 100% !important;
  max-width: 100% !important;
  table-layout: fixed;
  overflow-x: auto;
  display: block;
}
.editor-main .rich-editor img {
  max-width: 100% !important;
  height: auto !important;
  object-fit: contain;
  border-radius: 8px;
}
.editor-main .rich-editor blockquote {
  margin: 0.9rem 0;
  padding: 0.6rem 1rem;
  border-left: 4px solid var(--accent-purple);
  background: rgba(124, 92, 255, 0.06);
  border-radius: 0 10px 10px 0;
  max-width: 100%;
}
.editor-main .rich-editor iframe,
.editor-main .rich-editor video,
.editor-main .rich-editor audio {
  max-width: 100% !important;
  width: 100% !important;
  height: auto;
  border-radius: 10px;
}

/* ====== SECTION 4: EXCERPT CARD (.editor-group inside .editor-main) ====== */
.editor-main > .editor-group {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.06) 0%, rgba(6, 182, 212, 0.05) 100%);
  border: 1.5px solid rgba(20, 184, 166, 0.28);
  border-radius: 16px;
  padding: 1rem 1.1rem 1.1rem 1.1rem;
  box-shadow: 0 6px 18px -10px rgba(20, 184, 166, 0.35);
}
.editor-main > .editor-group > h5 {
  color: var(--accent-teal, #14b8a6);
  letter-spacing: 0.08em;
  margin-bottom: 0.55rem;
}
.editor-main > .editor-group textarea,
.editor-main > .editor-group input[type=text] {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(20, 184, 166, 0.32);
  border-radius: 12px;
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.7;
}
.editor-main > .editor-group textarea:focus,
.editor-main > .editor-group input[type=text]:focus {
  border-color: var(--accent-teal, #14b8a6);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.14);
}

/* ====== RESPONSIVE: ≤ 640px ====== */
@media (max-width: 640px) {
  .editor-main { padding-right: 0; gap: 0.85rem; }
  .editor-main > .form-group:has(#cpt-slug),
  .editor-main > .form-group:has(#pe-slug),
  .editor-main > .form-group:has(#pge-slug),
  .editor-main > .form-group:has(#pa-slug) { padding: 0.7rem 0.75rem 0.8rem 0.75rem; border-radius: 12px; }
  .editor-main > div:has(> .rich-editor-toolbar) { padding: 0.55rem; border-radius: 14px; }
  .editor-main .rich-editor { min-height: 240px; padding: 0.9rem 0.95rem; font-size: 0.9rem; }
  .editor-main > .editor-group { padding: 0.8rem 0.85rem 0.9rem 0.85rem; border-radius: 14px; }
}
.editor-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.06) 0%, rgba(255, 77, 157, 0.05) 100%);
  border-left: 3px solid var(--accent-purple);
  border-radius: 0 16px 16px 0;
  padding: 1.1rem 1rem 1.2rem 1.15rem;
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 104px);
  overflow-y: auto;
  align-self: start;
  scrollbar-width: thin;
  scrollbar-color: var(--border-default) transparent;
}
.editor-sidebar::-webkit-scrollbar { width: 6px; }
.editor-sidebar::-webkit-scrollbar-thumb { background: var(--border-default); border-radius: 999px; }
@media (max-width: 1023px) {
  .editor-sidebar {
    position: static;
    max-height: none;
    border-left: none;
    border: 1px solid var(--border-default);
    border-radius: 14px;
    padding: 1rem 0.95rem;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.05) 0%, rgba(255, 77, 157, 0.04) 100%);
  }
  .editor-main { padding-right: 0; }
}

.editor-group {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  padding: 0.85rem 1rem;
}
.editor-sidebar .editor-group {
  background: rgba(255, 255, 255, 0.025);
  border-color: rgba(168, 85, 247, 0.18);
  backdrop-filter: blur(4px);
}
.editor-sidebar .editor-group h5 {
  color: var(--accent-purple);
  letter-spacing: 0.08em;
}
.editor-group h5 {
  margin: 0 0 0.65rem 0;
  font-size: 0.8rem; font-weight: 700;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em;
}
.checkbox-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.4rem 0;
  font-size: 0.85rem;
}
.checkbox-row + .checkbox-row { border-top: 1px dashed var(--border-subtle); }
.checkbox-row input[type=checkbox] { accent-color: var(--accent-pink); width: 18px; height: 18px; }

.tag-field-wrap { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.35rem; }
.tag-chip {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.25rem 0.35rem 0.25rem 0.6rem;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 999px;
  font-size: 0.78rem;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.tag-chip:hover { transform: translateY(-1px); }
.tag-chip button {
  all: unset; cursor: pointer;
  color: var(--text-muted); font-weight: 700;
  padding: 0 0.25rem; border-radius: 999px;
}
.tag-chip button:hover { color: var(--danger); background: rgba(239,68,68,0.1); }
.tag-chip.tag-chip-toggle {
  padding: 0.2rem 0.55rem;
  cursor: pointer;
  user-select: none;
  opacity: 0.65;
  filter: grayscale(0.35);
}
.tag-chip.tag-chip-toggle:hover {
  opacity: 1;
  filter: grayscale(0);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px -6px rgba(124,92,255,0.4);
}
.tag-chip.tag-chip-toggle.is-on {
  opacity: 1 !important;
  filter: none !important;
  box-shadow: 0 0 0 2px rgba(124,92,255,0.18), 0 4px 12px -6px rgba(0,0,0,0.3);
}
.tag-input { display: flex; gap: 0.4rem; }
.tag-input input {
  flex: 1; height: 34px; padding: 0 0.7rem;
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  font-size: 0.82rem;
  outline: none;
}
.tag-input input:focus { border-color: var(--accent-pink); }
.tag-input button {
  padding: 0 0.85rem; border-radius: 8px; font-size: 0.8rem;
}

.cat-check-list {
  max-height: 195px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  padding: 0.25rem 0 0.15rem 0;
}
.cat-check-list label {
  display: flex !important;
  flex-direction: row !important;
  justify-content: flex-start !important;
  align-items: center !important;
  gap: 0.65rem !important;
  padding: 0.4rem 0.75rem;
  border-radius: 9px;
  cursor: pointer;
  font-size: 0.86rem;
  line-height: 1.2;
  text-align: left !important;
  width: 100% !important;
  transition: background 0.1s, box-shadow 0.1s;
  color: var(--text);
  user-select: none;
}
.cat-check-list label:hover {
  background: rgba(168, 85, 247, 0.10) !important;
}
.cat-check-list label:has(input:checked) {
  background: rgba(236, 72, 153, 0.14) !important;
  box-shadow: inset 0 0 0 1px rgba(236, 72, 153, 0.35);
}
.cat-check-list label input[type="checkbox"] {
  margin: 0 !important;
  width: 18px;
  height: 18px;
  flex-shrink: 0 !important;
  accent-color: var(--accent-pink, #ec4899);
  cursor: pointer;
}

.featured-image-picker {
  border: 2px dashed var(--border-default);
  border-radius: 10px;
  padding: 1.25rem 0.75rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.18s;
  position: relative;
  overflow: hidden;
}
.featured-image-picker:hover { border-color: var(--accent-pink); background: rgba(255,77,157,0.05); }
.editor-sidebar .featured-image-picker { border-color: rgba(168, 85, 247, 0.3); background: rgba(168, 85, 247, 0.04); }
.editor-sidebar .featured-image-picker:hover { border-color: var(--accent-purple); background: rgba(168, 85, 247, 0.1); }
.featured-image-picker.has-image { padding: 0; border-style: solid; }
.featured-image-picker .preview {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-size: cover; background-position: center;
  position: relative;
}
.featured-image-picker .preview-actions {
  position: absolute; inset: auto 0 0 0;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.75));
  padding: 0.75rem;
  display: flex; justify-content: flex-end; gap: 0.4rem;
}
.fip-placeholder-text { font-size: 0.8rem; color: var(--text-muted); }
.fip-placeholder-text strong { display: block; color: var(--text); margin-bottom: 0.2rem; }

/* ====== BRAND ASSET PICKER (Appearance Settings) — COMPACT SIZE (not big like post Featured Image) ====== */
.featured-image-picker.brand-asset-picker {
  padding: 0.5rem 0.65rem !important;
  border-width: 1.5px;
}
.featured-image-picker.brand-asset-picker.has-image { padding: 0 !important; }
.featured-image-picker.brand-asset-picker .fip-placeholder-text {
  font-size: 0.72rem !important;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.15rem;
}
.featured-image-picker.brand-asset-picker .fip-placeholder-text strong {
  font-size: 0.78rem !important;
  margin-bottom: 0 !important;
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 0.35rem !important;
}
.featured-image-picker.brand-asset-picker .fip-placeholder-text strong svg,
.featured-image-picker.brand-asset-picker .fip-placeholder-text strong img,
.featured-image-picker.brand-asset-picker .fip-placeholder-text strong :is(svg, img) {
  width: 28px !important;
  height: 28px !important;
  max-width: 28px !important;
  max-height: 28px !important;
}
.featured-image-picker.brand-asset-picker .preview {
  aspect-ratio: auto !important;
  min-height: 56px !important;
  max-height: 110px !important;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
}
.featured-image-picker.brand-asset-picker .preview-actions {
  padding: 0.4rem 0.5rem !important;
}
.featured-image-picker.brand-asset-picker .preview-actions .btn {
  padding: 0.25rem 0.65rem !important;
  font-size: 0.7rem !important;
  min-height: 26px !important;
  border-radius: 6px !important;
}

/* ============ RICH EDITOR TOOLBAR FULL UPGRADE ============ */
.rich-editor-toolbar {
  display: flex; flex-wrap: wrap; gap: 0.3rem 0.2rem;
  padding: 0.55rem 0.7rem;
  align-items: center;
  position: sticky;
  top: 80px;
  z-index: 25;
  background: linear-gradient(180deg, var(--bg-secondary) 0%, #18142f 100%);
  border: 1px solid var(--border-default);
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 4px 14px -6px rgba(0,0,0,0.35);
  backdrop-filter: blur(8px);
}
.re-sep {
  display: inline-block;
  width: 1px;
  height: 22px;
  background: linear-gradient(180deg, transparent, var(--border-strong, rgba(255,255,255,0.14)), transparent);
  margin: 0 0.4rem;
  align-self: center;
  flex: 0 0 auto;
}
.re-select {
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  height: 34px;
  min-height: 34px;
  padding: 0 2.3rem 0 0.8rem;
  border-radius: 9px;
  border: 1px solid var(--border-default);
  background-color: var(--bg-card);
  background-image: linear-gradient(45deg, transparent 50%, var(--accent-purple) 50%),
                    linear-gradient(135deg, var(--accent-purple) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.8rem;
  line-height: 1;
  font-weight: 500;
  transition: all 0.18s ease;
}
.re-select:hover, .re-select:focus {
  border-color: var(--accent-purple);
  background-color: #1e1a3f;
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.16);
  outline: none;
}
.re-color-wrap {
  position: relative;
  display: inline-flex;
}
.re-color-wrap .re-btn {
  position: relative;
  overflow: hidden;
  z-index: 1;
}
.re-color {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  z-index: 2;
  display: block !important;
}
.re-btn {
  all: unset; cursor: pointer;
  box-sizing: border-box;
  width: 34px; height: 34px;
  min-width: 34px; min-height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px;
  color: var(--text-secondary, #a0aec0);
  font-size: 0.88rem; font-weight: 600;
  font-family: var(--font-body, Inter, sans-serif);
  transition: all 0.16s ease;
  position: relative;
  user-select: none;
}
.re-btn:hover {
  color: var(--text, #fff);
  background: linear-gradient(135deg, rgba(124,92,255,0.18), rgba(236,72,153,0.14));
  border-color: rgba(168, 85, 247, 0.24);
  transform: translateY(-1px);
}
.re-btn:active { transform: translateY(0); }
.re-btn.active { color: var(--accent-pink); background: rgba(255,77,157,0.16); border-color: rgba(255,77,157,0.3); }
.rich-editor {
  min-height: 260px;
  padding: 0.9rem 1rem;
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border-default);
  border-top: none;
  border-radius: 0 0 10px 10px;
  outline: none;
  font-size: 0.92rem; line-height: 1.65;
}
.rich-editor:focus { box-shadow: inset 0 0 0 1px var(--accent-pink); }
/* Code view mode */
.rich-editor[data-view="html"] {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: #020617;
  color: #e2e8f0;
  white-space: pre-wrap;
  font-size: 0.85rem;
}
.rich-editor h1, .rich-editor h2, .rich-editor h3, .rich-editor h4, .rich-editor h5, .rich-editor h6 {
  font-family: var(--font-display);
  color: var(--text-strong);
  margin: 1.2rem 0 0.5rem 0;
  font-weight: 700;
  line-height: 1.3;
}
.rich-editor h2 { font-size: 1.4rem; }
.rich-editor h3 { font-size: 1.15rem; }
.rich-editor p { margin: 0.55rem 0; }
.rich-editor a { color: var(--accent-pink); text-decoration: underline; }
.rich-editor blockquote {
  border-left: 4px solid var(--accent-pink);
  background: rgba(255, 77, 157, 0.07);
  border-radius: 0 10px 10px 0;
  padding: 0.5rem 0.85rem 0.5rem 1rem;
  margin: 0.9rem 0;
  font-style: italic;
}
.rich-editor ul, .rich-editor ol { padding-left: 1.5rem; margin: 0.5rem 0; }
.rich-editor code { padding: 0.1rem 0.35rem; background: var(--bg-secondary); border-radius: 5px; font-size: 0.85em; font-family: ui-monospace, monospace; }
.rich-editor figure {
  margin: 0.9rem 0;
}
.rich-editor figcaption {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 0.35rem;
}
.rich-editor hr {
  border: none;
  border-top: 2px solid var(--border-subtle);
  margin: 1.3rem 0;
  border-radius: 999px;
}
.rich-editor img {
  max-width: 100%;
  border-radius: 12px;
  height: auto;
  display: inline-block;
  transition: all 0.15s;
  box-shadow: 0 8px 22px -12px rgba(0,0,0,0.55);
}
.rich-editor img:hover { filter: brightness(1.08); box-shadow: 0 12px 28px -14px rgba(168, 85, 247, 0.55); }
.rich-editor pre {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  color: #e2e8f0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
  overflow-x: auto;
  margin: 0.9rem 0;
}

/* Tables in editor */
.rich-editor .re-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  overflow-x: auto;
  display: block;
  max-width: 100%;
}
.rich-editor .re-table th,
.rich-editor .re-table td {
  border: 1px solid var(--border-default);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}
.rich-editor .re-table thead th {
  background: rgba(168, 85, 247, 0.14);
  font-weight: 700;
  color: var(--text-strong);
}
.rich-editor .re-table-striped tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.03);
}
.rich-editor .re-table-hover tbody tr:hover {
  background: rgba(124, 58, 237, 0.1);
}
.rich-editor .re-table-bordered { border: 1px solid var(--border-default); border-radius: 10px; }
.rich-editor .re-table caption {
  caption-side: top;
  text-align: left;
  padding: 0.2rem 0.2rem 0.45rem 0.2rem;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.85rem;
}

@media (max-width: 640px) {
  .rich-editor-toolbar { top: 64px; padding: 0.4rem 0.45rem; gap: 0.25rem 0.15rem; }
  .re-sep { margin: 0 0.2rem; }
  .re-select {
    height: 32px;
    min-height: 32px;
    font-size: 0.75rem;
    padding: 0 1.9rem 0 0.65rem;
    background-position: calc(100% - 15px) 50%, calc(100% - 9px) 50%;
  }
  .re-btn { width: 32px; height: 32px; min-width: 32px; min-height: 32px; }
}

/* ============ TOAST ============ */
.toast-wrap {
  position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 99999;
  display: flex; flex-direction: column; gap: 0.65rem;
  max-width: min(400px, calc(100vw - 2.2rem));
  pointer-events: none;
}
.toast-wrap .toast { pointer-events: auto; }
.toast {
  position: relative;
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 0.95rem 1.05rem 0.9rem 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 14px;
  box-shadow: 0 18px 50px -8px rgba(0,0,0,0.6), 0 2px 0 rgba(255,255,255,0.04) inset;
  animation: slideUp 0.26s cubic-bezier(.2,.9,.3,1.2) both;
  font-size: 0.87rem;
  line-height: 1.5;
  overflow: hidden;
}
.toast::before {
  content: ""; position: absolute; inset: 0;
  pointer-events: none; border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.07) 0%, transparent 55%);
}
.toast-top-bar {
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--accent-purple);
}
.toast-success {
  background: linear-gradient(180deg, #0f3a2a 0%, #0a2a1e 100%);
  border-color: #1a6b4a;
  box-shadow: 0 18px 50px -8px rgba(16,185,129,0.28), 0 0 0 1px rgba(16,185,129,0.12), 0 2px 0 rgba(255,255,255,0.04) inset;
}
.toast-success .toast-top-bar { background: linear-gradient(90deg, #10b981, #34d399); }
.toast-error {
  background: linear-gradient(180deg, #3b1220 0%, #2a0c16 100%);
  border-color: #8b1e36;
  box-shadow: 0 18px 50px -8px rgba(239,68,68,0.30), 0 0 0 1px rgba(239,68,68,0.14), 0 2px 0 rgba(255,255,255,0.04) inset;
}
.toast-error .toast-top-bar { background: linear-gradient(90deg, #ef4444, #f87171); }
.toast-warn {
  background: linear-gradient(180deg, #3d2e0b 0%, #2c2007 100%);
  border-color: #8a6913;
  box-shadow: 0 18px 50px -8px rgba(245,158,11,0.28), 0 0 0 1px rgba(245,158,11,0.14), 0 2px 0 rgba(255,255,255,0.04) inset;
}
.toast-warn .toast-top-bar { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.toast-info {
  background: linear-gradient(180deg, #1e1b4b 0%, #130f38 100%);
  border-color: #6d55c7;
  box-shadow: 0 18px 50px -8px rgba(124,58,237,0.32), 0 0 0 1px rgba(124,58,237,0.15), 0 2px 0 rgba(255,255,255,0.04) inset;
}
.toast-info .toast-top-bar { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.toast-ic {
  width: 28px; height: 28px; flex-shrink: 0;
  border-radius: 50%;
  display: grid; place-items: center;
  color: white; font-size: 0.82rem; font-weight: 900;
  background: var(--accent-purple);
  box-shadow: 0 2px 8px -2px rgba(0,0,0,0.5), 0 1px 0 rgba(255,255,255,0.15) inset;
  margin-top: 0.05rem;
}
.toast-success .toast-ic { background: linear-gradient(145deg, #10b981, #059669); }
.toast-error .toast-ic { background: linear-gradient(145deg, #ef4444, #dc2626); }
.toast-warn .toast-ic { background: linear-gradient(145deg, #f59e0b, #d97706); color: #1e1b2e; }
.toast-info .toast-ic { background: linear-gradient(145deg, #8b5cf6, #7c3aed); }
.toast-text { min-width: 0; flex: 1; line-height: 1.5; color: #f0edff; }
.toast-text strong { display: block; color: #ffffff; margin-bottom: 0.18rem; font-size: 0.92rem; font-weight: 800; letter-spacing: 0.01em; }
.toast-success .toast-text { color: #cbf5e3; }
.toast-success .toast-text strong { color: #ecfdf5; }
.toast-error .toast-text { color: #f9d1da; }
.toast-error .toast-text strong { color: #fef2f2; }
.toast-warn .toast-text { color: #f7e5bf; }
.toast-warn .toast-text strong { color: #fffbeb; }
.toast-info .toast-text { color: #ddd5ff; }
.toast-info .toast-text strong { color: #f5f3ff; }
.toast-close {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  cursor: pointer;
  color: rgba(255,255,255,0.6);
  padding: 0.08rem 0.32rem;
  margin-left: 0.1rem;
  line-height: 1;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: 7px;
  transition: background .15s, color .15s, transform .15s;
}
.toast-close:hover { background: rgba(255,255,255,0.15); color: #ffffff; transform: scale(1.08); }
.toast-success .toast-close { background: rgba(16,185,129,0.12); border-color: rgba(16,185,129,0.25); color: rgba(167,243,208,0.8); }
.toast-success .toast-close:hover { background: rgba(16,185,129,0.28); color: #ecfdf5; }
.toast-error .toast-close { background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.28); color: rgba(254,202,202,0.85); }
.toast-error .toast-close:hover { background: rgba(239,68,68,0.32); color: #fef2f2; }
.toast-warn .toast-close { background: rgba(245,158,11,0.12); border-color: rgba(245,158,11,0.28); color: rgba(253,230,138,0.9); }
.toast-warn .toast-close:hover { background: rgba(245,158,11,0.30); color: #fffbeb; }

/* ============ CUSTOM CONFIRM DIALOG MODAL (WordPress-Style Modern Purple) ============ */
.cdlg-overlay {
  position: fixed; inset: 0;
  background: rgba(10, 8, 31, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 95000;
  animation: cdlg-fade .18s ease both;
  padding: 1rem;
}
@keyframes cdlg-fade { from { opacity: 0; } to { opacity: 1; } }
.cdlg-box {
  background: var(--bg-card);
  border: 1.5px solid rgba(139,92,246,0.35);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(139, 92, 246, 0.35), 0 8px 24px rgba(0,0,0,.55);
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  overflow: hidden;
  display: flex; flex-direction: column;
  animation: cdlg-pop .22s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes cdlg-pop {
  from { opacity: 0; transform: translateY(10px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.cdlg-head {
  padding: 0.95rem 1.1rem 0.8rem 1.1rem;
  border-bottom: 1px solid rgba(139,92,246,0.15);
  background: linear-gradient(135deg, rgba(139,92,246,.12), rgba(236,72,153,.08));
  display: flex; align-items: center; gap: 0.6rem;
}
.cdlg-head-ic {
  width: 34px; height: 34px; flex-shrink: 0;
  background: linear-gradient(145deg, #8b5cf6, #ec4899);
  color: white; border-radius: 10px;
  display: grid; place-items: center;
  font-size: 1rem; font-weight: 900;
  box-shadow: 0 4px 12px rgba(236,72,153,.35);
}
.cdlg-head-ic.danger { background: linear-gradient(145deg, #ef4444, #ec4899); }
.cdlg-head-ic.warn { background: linear-gradient(145deg, #f59e0b, #ef4444); }
.cdlg-title {
  font-size: 1.02rem; font-weight: 800; color: var(--text-strong);
  margin: 0; letter-spacing: .01em;
}
.cdlg-body {
  padding: 1rem 1.1rem;
  overflow-y: auto;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text);
  flex: 1;
}
.cdlg-body h1, .cdlg-body h2, .cdlg-body h3, .cdlg-body h4 { color: var(--text-strong); }
.cdlg-body ul, .cdlg-body ol { padding-left: 1.1rem; margin: 0.4rem 0; }
.cdlg-body li { padding: 2px 0; }
.cdlg-body code { font-family: ui-monospace, monospace; font-size: 0.78rem; color: #a78bfa; background: rgba(139,92,246,.08); padding: 1px 5px; border-radius: 5px; }
.cdlg-foot {
  padding: 0.8rem 1.1rem 0.95rem 1.1rem;
  border-top: 1px solid rgba(139,92,246,.12);
  display: flex; gap: 0.55rem;
  justify-content: flex-end;
  flex-wrap: wrap;
  background: rgba(139,92,246,.03);
}
.cdlg-btn {
  height: 38px; min-height: 38px;
  padding: 0 1.1rem;
  border-radius: 9px;
  border: 1px solid var(--border-default);
  background: var(--bg-secondary);
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s ease;
}
.cdlg-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.cdlg-btn:active { transform: translateY(0); }
.cdlg-btn-primary {
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
  color: white;
  border: none;
  box-shadow: 0 3px 10px rgba(139,92,246,.4);
}
.cdlg-btn-primary:hover { box-shadow: 0 5px 16px rgba(139,92,246,.55); }
.cdlg-btn-danger {
  background: linear-gradient(135deg, #ef4444, #ec4899);
  color: white;
  border: none;
  box-shadow: 0 3px 10px rgba(239,68,68,.4);
}
.cdlg-btn-danger:hover { box-shadow: 0 5px 18px rgba(239,68,68,.55); }

/* ============ ACTIVITY / DASHBOARD WIDGETS ============ */
.grid-main-side {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr);
  gap: 1.25rem;
}
@media (max-width: 1000px) { .grid-main-side { grid-template-columns: 1fr; } }

.activity-list { display: flex; flex-direction: column; }
.activity-item {
  display: grid; grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px dashed var(--border-subtle);
}
.activity-item:last-child { border-bottom: none; }
.activity-ic {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(255,77,157,0.2), rgba(124,92,255,0.18));
  color: var(--accent-pink);
}
.activity-item h6 { margin: 0 0 0.15rem 0; color: var(--text-strong); font-size: 0.88rem; }
.activity-item .act-meta { color: var(--text-muted); font-size: 0.76rem; line-height: 1.45; }
.activity-item .act-time { color: var(--text-muted); font-size: 0.72rem; white-space: nowrap; padding-top: 0.1rem; }

/* ============ RECENT BIG WINS MINI LIST ============ */
.bw-mini-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.bw-mini-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.8rem 0.75rem 0.7rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.045) 0%, rgba(168, 85, 247, 0.055) 100%);
  border: 1px solid rgba(168, 85, 247, 0.15);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
.bw-mini-item::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent-gold) 0%, var(--accent-pink) 100%);
  opacity: 0.75;
}
.bw-mini-item:nth-child(even) {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.04) 0%, rgba(59, 130, 246, 0.05) 100%);
  border-color: rgba(236, 72, 153, 0.13);
}
.bw-mini-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px -10px rgba(251, 191, 36, 0.35), 0 8px 16px -12px rgba(168, 85, 247, 0.35);
  border-color: rgba(251, 191, 36, 0.45);
}
.bw-mini-thumb {
  width: 44px; height: 44px;
  flex-shrink: 0;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-tertiary);
  display: grid; place-items: center;
  color: white;
  font-size: 1.15rem;
  box-shadow: 0 3px 10px -4px rgba(168,85,247,0.55);
  border: 1px solid rgba(168,85,247,0.25);
}
.bw-mini-info { min-width: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.bwmi-slot {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-strong);
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.3;
}
.bwmi-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  white-space: normal;
  overflow-wrap: anywhere;
}
.bwmi-time::before {
  content: "•";
  color: var(--accent-purple);
  font-weight: 800;
  flex-shrink: 0;
}
/* Dashboard mobile responsive */
@media (max-width: 1000px) {
  .bw-mini-item {
    grid-template-columns: 44px minmax(0, 1fr);
  }
  .bw-mini-item > div:last-child {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    padding-left: 3.1rem;
    gap: 0.4rem;
  }
  .activity-item {
    grid-template-columns: 36px minmax(0, 1fr);
    row-gap: 0.4rem;
  }
  .activity-item .act-time {
    grid-column: 2 / 3;
    white-space: nowrap;
    padding-top: 0;
  }
}
@media (max-width: 640px) {
  .bwmi-slot { font-size: 0.86rem; }
  .bw-mini-item {
    padding: 0.7rem 0.65rem 0.7rem 0.6rem;
  }
  .bw-mini-thumb { width: 40px; height: 40px; font-size: 1.05rem; }
  .bw-mini-item > div:last-child { padding-left: 2.9rem; }
}

/* ============ MENU NAVIGATION BUILDER ============ */
.edit-menu-grid, .nav-edit-grid {
  display: grid;
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  gap: 1.05rem;
  width: 100%;
}
.edit-menu-grid > .card-panel, .nav-edit-grid > .card-panel {
  min-width: 0;
  overflow-x: hidden;
  box-sizing: border-box;
  width: 100%;
}
@media (max-width: 1020px) {
  .edit-menu-grid, .nav-edit-grid {
    grid-template-columns: 1fr !important;
  }
}
/* Add Menu Items - Search wrap + SVG search icon 16px (fix BESAR BANGET) */
.nav-search-wrap {
  position: relative;
  width: 100%;
}
.nav-search-wrap .nsw-ic {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 2;
}
.nav-search-wrap .nsw-ic svg,
.nav-search-wrap .nsw-ic img {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px;
  min-height: 16px;
  max-width: 16px;
  max-height: 16px;
}
.nsw-input {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  padding: 0 0.85rem;
  transition: border-color .15s, box-shadow .15s;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 0.84rem;
}
.nsw-input:focus {
  outline: none;
  border-color: rgba(124,92,255,0.6);
  box-shadow: 0 0 0 3px rgba(124,92,255,0.18);
}

/* Add Menu Items - Tabs (fix grid-auto-flow inline bikin tab kelebaran) */
.edit-menu-grid .tabs-panel, .nav-edit-grid .tabs-panel {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.85rem !important;
  flex-wrap: nowrap;
  overflow-x: auto !important;
  padding: 0.35rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.edit-menu-grid .tab-pill, .nav-edit-grid .tab-pill {
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: 0.82rem;
  padding: 0.45rem 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.edit-menu-grid .tab-pill svg, .nav-edit-grid .tab-pill svg {
  width: 15px; height: 15px;
}

/* Add Menu Items - Checkbox list Pages/Posts/Cats (fix cuma SQUARE + huruf terpotong S/F) */
.mi-chklist {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.5rem 0;
  width: 100%;
  box-sizing: border-box;
}
.mi-chk {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  transition: background .12s;
  cursor: pointer;
  user-select: none;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
.mi-chk:hover {
  background: rgba(124,92,255,0.08);
}
.mi-chk input[type="checkbox"] {
  margin: 0.15rem 0 0 0;
  width: 16px;
  height: 16px;
  accent-color: var(--accent-purple, #7c5cff);
  flex-shrink: 0;
  grid-row: 1 / span 2;
  align-self: flex-start;
  appearance: auto;
  border: initial;
  background: initial;
}
.mi-chk > span {
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  word-break: break-word;
  overflow-wrap: anywhere;
  hyphens: manual;
  line-height: 1.35;
  max-width: 100%;
}
.mi-chk > span strong {
  color: var(--text-strong);
  font-weight: 600;
  font-size: 0.85rem;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}
.mi-chk > span em {
  color: var(--text-muted);
  font-style: normal;
  font-size: 0.72rem;
  margin-left: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
  opacity: 0.85;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Custom tab form */
.mi-grid {
  display: grid;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}
.mi-grid label {
  display: block;
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-bottom: 0.3rem;
  font-weight: 600;
}
.mi-grid > div {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
.mi-grid input[type="text"] {
  box-sizing: border-box;
}
.tag-chip[data-quick-group] {
  cursor: pointer;
  transition: all .15s;
}
.tag-chip[data-quick-group]:hover {
  transform: translateY(-1px);
  filter: brightness(1.12);
}

/* Toolbar Edit Menu kanan */
.nav-menu-toolbar {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  padding-bottom: 0.8rem;
  margin-bottom: 0.85rem;
  border-bottom: 1px dashed var(--border-subtle);
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}
.nav-menu-left {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}
.nav-menu-left > #nav-menu-select,
.nav-menu-left > select {
  min-width: 0 !important;
  width: 100%;
  flex: 1 1 220px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-menu-right {
  flex: 0 0 auto;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
/* Save Menu — fix ICON kebesaran */
.nav-menu-right .btn svg,
.nav-menu-toolbar .btn svg,
.edit-menu-grid .btn svg,
.nav-edit-grid .btn svg {
  width: 18px !important;
  height: 18px !important;
  max-width: 18px;
  max-height: 18px;
  min-width: 18px;
  min-height: 18px;
}
#nav-menu-structure { width: 100%; min-width: 0; box-sizing: border-box; overflow-x: hidden; }

/* Menu item (nested draggable) - wrap text biar tidak vertikal per huruf */
.nav-menu-item {
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}
.nav-menu-item .nmi-title {
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
  line-height: 1.35;
}
.nav-menu-item .nmi-label {
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

/* Fix double scrollbar di Add Menu Items scroll container */
.edit-menu-grid .card-panel > div[style*="max-height:60vh"],
.nav-edit-grid .card-panel > div[style*="max-height:60vh"] {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  box-sizing: border-box;
  padding-right: 0.25rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  max-width: 100%;
  width: 100%;
  min-width: 0;
}
/* Fix button keluar panel kanan: selalu 100% + wrap */
.edit-menu-grid .card-panel > div[style*="max-height:60vh"] > div,
.nav-edit-grid .card-panel > div[style*="max-height:60vh"] > div {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  max-width: 100%;
}
/* Add selected button tidak keluar */
.edit-menu-grid .card-panel > div[style*="max-height:60vh"] > div > div[style*="justify-content:flex-end"],
.nav-edit-grid .card-panel > div[style*="max-height:60vh"] > div > div[style*="justify-content:flex-end"] {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
.edit-menu-grid .card-panel > div[style*="max-height:60vh"] .btn,
.nav-edit-grid .card-panel > div[style*="max-height:60vh"] .btn {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ================ MOBILE KECIL SPESIFIK < 520 px ================ */
@media (max-width: 520px) {
  /* TABS → wrap jadi 2 baris (supaya Custom tidak kepotong) */
  .edit-menu-grid .tabs-panel, .nav-edit-grid .tabs-panel {
    flex-wrap: wrap !important;
    overflow-x: hidden !important;
    gap: 0.3rem;
    padding: 0.3rem;
  }
  .edit-menu-grid .tab-pill, .nav-edit-grid .tab-pill {
    flex: 1 1 calc(50% - 0.3rem) !important;
    min-width: 0 !important;
    justify-content: center;
    padding: 0.42rem 0.5rem !important;
    font-size: 0.78rem !important;
    gap: 0.3rem !important;
  }
  /* Checkbox list — padding lebih kecil, font lebih kecil */
  .mi-chk { padding: 0.4rem 0.45rem !important; gap: 0.5rem !important; }
  .mi-chk input[type="checkbox"] { width: 15px !important; height: 15px !important; }
  .mi-chk > span strong { font-size: 0.8rem !important; line-height: 1.3 !important; }
  .mi-chk > span em { font-size: 0.68rem !important; }
  /* ADD SELECTED BUTTON → FULL WIDTH tidak terpotong */
  .edit-menu-grid .card-panel > div[style*="max-height:60vh"] > div > div[style*="justify-content:flex-end"],
  .nav-edit-grid .card-panel > div[style*="max-height:60vh"] > div > div[style*="justify-content:flex-end"] {
    justify-content: stretch !important;
  }
  .edit-menu-grid .card-panel > div[style*="max-height:60vh"] > div > div[style*="justify-content:flex-end"] > .btn,
  .nav-edit-grid .card-panel > div[style*="max-height:60vh"] > div > div[style*="justify-content:flex-end"] > .btn {
    width: 100% !important;
    max-width: 100% !important;
    justify-content: center !important;
    padding: 0.55rem 0.8rem !important;
    font-size: 0.8rem !important;
  }
  /* Toolbar Edit Menu — wrap 1 per baris */
  .nav-menu-toolbar { flex-direction: column; align-items: stretch; gap: 0.5rem; padding-bottom: 0.65rem; }
  .nav-menu-left {
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem !important;
    width: 100% !important;
    flex: none !important;
  }
  .nav-menu-left label { display: none; }
  .nav-menu-left > #nav-menu-select,
  .nav-menu-left > select {
    width: 100% !important;
    flex: none !important;
    font-size: 0.82rem !important;
    height: 40px !important;
  }
  .nav-menu-left .btn-ghost,
  .nav-menu-left button {
    width: 100% !important;
    justify-content: center !important;
    font-size: 0.8rem !important;
    height: 38px !important;
  }
  .nav-menu-right {
    width: 100%;
    flex-direction: column;
  }
  .nav-menu-right .btn {
    width: 100% !important;
    justify-content: center !important;
    font-size: 0.84rem !important;
    height: 42px !important;
    padding: 0.6rem 1rem !important;
  }
  /* Search input kecilkan */
  .nsw-input { height: 34px !important; font-size: 0.8rem !important; }
  .nav-search-wrap .nsw-ic { left: 0.65rem !important; }
  .nav-search-wrap .nsw-ic svg { width: 14px !important; height: 14px !important; min-width: 14px !important; min-height: 14px !important; max-width: 14px !important; max-height: 14px !important; }
}

/* ================ MOBILE SANGAT KECIL < 420 px ================ */
@media (max-width: 420px) {
  .edit-menu-grid .tab-pill, .nav-edit-grid .tab-pill {
    font-size: 0.74rem !important;
    padding: 0.38rem 0.4rem !important;
    gap: 0.25rem !important;
  }
  .edit-menu-grid .tab-pill svg, .nav-edit-grid .tab-pill svg {
    width: 13px !important; height: 13px !important;
  }
  .mi-chk { padding: 0.38rem 0.4rem !important; gap: 0.45rem !important; }
  .mi-chk > span strong { font-size: 0.78rem !important; }
  .mi-chk > span em { font-size: 0.66rem !important; }
  .nav-menu-left > #nav-menu-select,
  .nav-menu-left > select {
    font-size: 0.78rem !important;
    height: 38px !important;
  }
  .nav-menu-right .btn {
    font-size: 0.8rem !important;
    height: 40px !important;
  }
  .nav-menu-right .btn svg {
    width: 16px !important; height: 16px !important;
    min-width: 16px !important; min-height: 16px !important;
    max-width: 16px !important; max-height: 16px !important;
  }
  .nsw-input { height: 32px !important; font-size: 0.78rem !important; padding-left: 2.1rem !important; }
}

/* ============ TOOLS (Backup / Import / Export / System) — MOBILE KECIL < 640 px ============ */
@media (max-width: 640px) {
  /* === Tools Card Head (icon + title + filename) — stack vertikal === */
  .tools-card-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
    padding-bottom: 0.7rem;
    margin-bottom: 0.75rem;
  }
  .tools-card-head-ic { width: 34px; height: 34px; font-size: 0.95rem; }
  .tools-card-head-ic svg, .tools-card-head-ic svg * { width: 16px !important; height: 16px !important; }
  .tools-card-head h3 { font-size: 0.92rem !important; line-height: 1.3 !important; }
  .tools-card-head h3 + div,
  .tools-card-head h3 ~ div {
    font-size: 0.72rem !important;
    line-height: 1.5 !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    white-space: normal !important;
  }
  .tools-card-head .mono {
    display: inline-block;
    font-size: 0.7rem !important;
    padding: 0.15rem 0.4rem !important;
    overflow-wrap: anywhere !important;
    word-break: break-all !important;
    white-space: normal !important;
    line-height: 1.4 !important;
  }

  /* === Backup Contents Preview TABLE — fix overflow horizontal === */
  #tools-export-table, #tools-export-table thead, #tools-export-table tbody,
  #tools-export-table tr, #tools-export-table th, #tools-export-table td {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box;
  }
  #tools-export-table thead { display: none !important; }
  #tools-export-table tbody {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  #tools-export-table tbody tr {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    align-items: center;
    gap: 0.55rem;
    padding: 0.6rem 0.55rem !important;
    border-radius: 11px;
    border: 1px solid var(--border-subtle) !important;
    background: var(--bg-card) !important;
    margin: 0 !important;
  }
  /* Progress bar column (col 4) jadi bar bawah */
  #tools-export-table tbody tr td:first-child {
    grid-column: 1 / 2;
    grid-row: 1 / span 2;
    width: auto !important;
    padding: 0 !important;
    border: none !important;
  }
  #tools-export-table tbody tr td:nth-child(2) {
    display: none !important; /* Description — hidden mobile */
  }
  #tools-export-table tbody tr td:nth-child(3) {
    grid-column: 3 / 4;
    grid-row: 1 / span 2;
    text-align: right !important;
    padding: 0 !important;
    border: none !important;
    min-width: 0;
  }
  #tools-export-table tbody tr td:last-child {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
    width: 100% !important;
    padding: 0.15rem 0 0 0 !important;
    border: none !important;
  }
  .ds-row-progress { max-width: 100% !important; width: 100% !important; }
  .ds-row-label { gap: 0.5rem; }
  .ds-row-icon { width: 26px; height: 26px; font-size: 0.9rem; }
  .ds-row-icon svg, .ds-row-icon svg * { width: 13px !important; height: 13px !important; }
  .ds-row-meta { min-width: 0; max-width: 100%; }
  .ds-row-meta .t1 { font-size: 0.82rem !important; line-height: 1.3 !important; white-space: normal !important; overflow-wrap: anywhere !important; }
  .ds-row-meta .t2 {
    font-size: 0.68rem !important;
    line-height: 1.4 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-all !important;
    opacity: 0.88;
  }
  .ds-row-count {
    display: inline-block;
    padding: 0.22rem 0.55rem;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
    border: 1px solid rgba(255,255,255,0.08);
    font-weight: 800;
    font-size: 0.82rem !important;
    min-width: 40px;
    text-align: center;
    color: var(--text-strong);
  }
  /* Total row */
  #tools-export-row-total {
    background: linear-gradient(135deg, rgba(255,77,157,0.18), rgba(124,92,255,0.14)) !important;
    border-color: rgba(255,77,157,0.28) !important;
  }
  #tools-export-row-total .ds-row-count {
    background: linear-gradient(135deg, #ff4d9d, #7c5cff);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px -6px rgba(255,77,157,0.55);
  }

  /* === Export Filter wrap === */
  .export-filter-wrap { padding: 0.85rem 0.75rem !important; border-radius: 12px !important; }
  .export-filter-head { flex-direction: column; align-items: stretch; gap: 0.5rem; margin-bottom: 0.75rem; }
  .export-filter-title .ic { width: 34px; height: 34px; font-size: 1rem; }
  .export-filter-title h3 { font-size: 0.9rem; }
  .export-filter-title h3 + div { font-size: 0.72rem; }
  .export-filter-count { justify-content: center; }
  .preset-row { gap: 0.4rem; }

  /* === Import Format tabs (3 kolom) — jadi 1 kolom === */
  .import-format-tabs {
    grid-template-columns: 1fr !important;
    gap: 0.4rem !important;
    padding: 0.35rem !important;
  }
  .import-format-tabs .import-fmt-tab {
    flex-direction: row !important;
    align-items: center !important;
    padding: 0.6rem 0.7rem !important;
  }
  .import-format-tabs .import-fmt-tab > div:first-child {
    flex: 0 0 auto;
    flex-direction: row !important;
  }
  .import-format-tabs .import-fmt-tab > div:nth-child(2) {
    flex: 1 1 auto;
    padding-left: 0.5rem;
  }

  /* === Tabs Tools (Export / Import / System Info) === */
  .tools-tabs, [id*="tools-tabs"], [class*="tools-tabs"] {
    flex-wrap: wrap;
    overflow-x: hidden !important;
  }
  .tools-tabs button, [id*="tools-tabs"] button, [class*="tools-tabs"] button {
    flex: 1 1 calc(50% - 0.3rem);
    font-size: 0.78rem !important;
    padding: 0.45rem 0.6rem !important;
  }

  /* === Table wrap umum di Tools page — hapus overflow x berantakan === */
  #tools-export-table, .export-filter-wrap + .card-panel .table-wrap,
  .card-panel .table-wrap {
    overflow-x: hidden !important;
    -webkit-mask-image: none !important;
  }
}

/* ============ MEDIA LIBRARY — MOBILE KECIL < 520 px ============ */
@media (max-width: 520px) {
  .media-toolbar-top {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding-bottom: 0.7rem;
  }
  .media-toolbar-top .crud-search { width: 100% !important; flex: none !important; min-width: 0 !important; }
  .media-filter-wrap {
    flex-wrap: wrap;
    gap: 0.4rem;
    width: 100%;
  }
  .media-filter-wrap > * {
    flex: 1 1 calc(50% - 0.4rem) !important;
    min-width: 0 !important;
    width: 100%;
  }
  .media-filter-dropdown { width: 100% !important; height: 36px !important; }
  .media-filter-label { width: 100% !important; margin-bottom: -0.15rem; flex: 1 1 100% !important; }
  .media-bulk-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
    padding: 0.6rem 0.7rem !important;
  }
  .media-bulk-bar > div, .media-bulk-bar > select, .media-bulk-bar > button {
    width: 100% !important;
    flex: none !important;
  }
  .media-bulk-actions {
    flex-direction: column !important;
    gap: 0.4rem !important;
    width: 100% !important;
    margin: 0 !important;
  }
  .media-bulk-actions > select,
  .media-bulk-actions > button {
    width: 100% !important;
    height: 38px !important;
    justify-content: center !important;
  }
  .media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.5rem !important;
  }
  .media-card {
    border-radius: 10px !important;
  }
  .media-thumb-wrap { aspect-ratio: 1 / 1 !important; }
  .media-card-body {
    padding: 0.45rem 0.55rem !important;
  }
  .media-card-name {
    font-size: 0.76rem !important;
    line-height: 1.3 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(0.76rem * 1.3 * 2);
  }
  .media-card-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.05rem;
    margin-top: 0.25rem;
    font-size: 0.68rem !important;
  }
  .media-type-badge {
    font-size: 0.58rem !important;
    padding: 0.12rem 0.35rem !important;
  }
  .media-used-by {
    top: auto !important;
    left: 6px !important;
    bottom: 6px !important;
    font-size: 0.58rem !important;
    padding: 0.1rem 0.35rem !important;
  }
  .media-optim-badge {
    font-size: 0.56rem !important;
    padding: 0.1rem 0.35rem !important;
  }
  .media-card-checkbox {
    width: 16px !important;
    height: 16px !important;
    top: 6px !important;
    left: 6px !important;
  }
  .media-card.selected::after {
    width: 20px !important;
    height: 20px !important;
    top: 6px !important;
    right: 6px !important;
    font-size: 0.72rem !important;
  }
  .media-card-actions {
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.35rem;
  }
  .media-card-actions > button,
  .media-card-actions > a {
    width: 100% !important;
    justify-content: center !important;
    font-size: 0.72rem !important;
    padding: 0.3rem 0.4rem !important;
  }
}

@media (max-width: 380px) {
  .media-grid { grid-template-columns: 1fr !important; }
  #tools-export-table tbody tr {
    grid-template-columns: auto minmax(0, 1fr) !important;
  }
  #tools-export-table tbody tr td:nth-child(3) {
    grid-column: 2 / 3;
    grid-row: 3 / 4;
    text-align: left !important;
  }
  #tools-export-table tbody tr td:last-child {
    grid-column: 1 / -1;
  }
}

/* ============ SYSTEM INFO (Diagnostics) — MOBILE KECIL < 640 px ============ */
@media (max-width: 640px) {
  /* === Main 2 Kolom System Info: Content Records + LocalStorage === */
  [class*="card-panel"] + [class*="card-panel"]:has(+ .tools-card-head),
  #tools-export + section > div[style*="grid-template-columns:1.1fr"],
  section > div[style*="grid-template-columns:1.1fr"] {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }
  section > div[style*="grid-template-columns:1.1fr"] > .card-panel {
    min-width: 0;
    width: 100%;
    overflow-x: hidden !important;
    box-sizing: border-box;
  }

  /* === CARD KIRI: Content Record Counts — HAPUS 3 baris vertikal === */
  section > div[style*="grid-template-columns:1.1fr"] > .card-panel:first-child .hov-row,
  .card-panel > div[style*="flex-direction:column;gap:.25rem;padding:.25rem"] > div,
  #tools-export-row-total {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    grid-template-rows: auto auto !important;
    gap: 0.45rem !important;
    padding: 0.6rem 0.6rem !important;
    align-items: center !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  /* col 1: icon — span 2 rows */
  section > div[style*="grid-template-columns:1.1fr"] > .card-panel:first-child .hov-row > *:first-child,
  .card-panel > div[style*="flex-direction:column;gap:.25rem;padding:.25rem"] > div > .ds-row-label:first-child,
  .card-panel > div[style*="flex-direction:column;gap:.25rem;padding:.25rem"] > div > div:first-child {
    grid-column: 1 / 2;
    grid-row: 1 / span 2;
    align-self: flex-start;
    width: auto !important;
    min-width: 0 !important;
    padding: 0 !important;
    border: none !important;
  }
  .ds-row-icon {
    width: 30px !important;
    height: 30px !important;
    flex-shrink: 0 !important;
  }
  .ds-row-icon svg, .ds-row-icon svg * { width: 14px !important; height: 14px !important; }
  /* col 2 (ds-row-label / meta) — line 1, wrap natural */
  section > div[style*="grid-template-columns:1.1fr"] > .card-panel:first-child .hov-row .ds-row-meta,
  .card-panel > div[style*="flex-direction:column;gap:.25rem;padding:.25rem"] > div .ds-row-meta {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .ds-row-meta .t1 {
    font-size: 0.82rem !important;
    line-height: 1.32 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    color: var(--text-strong);
  }
  .ds-row-meta .t2 {
    font-size: 0.68rem !important;
    line-height: 1.42 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-all !important;
  }
  /* col 3 — count badge (col 1 / span 2 row, top right) */
  .ds-row-count {
    grid-column: 3 / 4;
    grid-row: 1 / span 2;
    align-self: flex-start !important;
    font-size: 0.86rem !important;
    min-width: 48px !important;
    text-align: center !important;
    padding: 0.22rem 0.55rem;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-strong);
    font-weight: 800;
  }
  /* Progress bar — line 2 bawah, full span */
  .ds-row-progress {
    grid-column: 2 / -1;
    grid-row: 2 / 3;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    margin: 0 !important;
  }
  .card-panel > div[style*="flex-direction:column;gap:.25rem;padding:.25rem"] > div + .ds-row-progress {
    grid-column: 1 / -1;
    width: calc(100% - 2.3rem);
    margin-left: 2.3rem !important;
  }

  /* === CARD KANAN: LocalStorage by Size === */
  section > div[style*="grid-template-columns:1.1fr"] > .card-panel:last-child div[style*="display:flex;flex-direction:column;gap:.25rem;padding:.25rem;max-height:420px"] {
    max-height: 360px !important;
    overflow-x: hidden !important;
    padding-right: 0.25rem !important;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }
  section > div[style*="grid-template-columns:1.1fr"] > .card-panel:last-child div[style*="display:flex;flex-direction:column;gap:.25rem;padding:.25rem;max-height:420px"] > div[style*="display:grid;grid-template-columns:1fr auto"] {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    grid-template-rows: auto auto !important;
    gap: 0.45rem !important;
    padding: 0.6rem 0.6rem !important;
    align-items: center !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
  /* icon col LocalStorage */
  section > div[style*="grid-template-columns:1.1fr"] > .card-panel:last-child div[style*="display:flex;flex-direction:column;gap:.25rem;padding:.25rem;max-height:420px"] > div[style*="display:grid;grid-template-columns:1fr auto"] .ds-row-label {
    grid-column: 1 / 2;
    grid-row: 1 / span 2;
    align-self: flex-start;
  }
  section > div[style*="grid-template-columns:1.1fr"] > .card-panel:last-child div[style*="display:flex;flex-direction:column;gap:.25rem;padding:.25rem;max-height:420px"] > div[style*="display:grid;grid-template-columns:1fr auto"] .ds-row-meta {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    min-width: 0 !important;
    width: 100% !important;
  }
  section > div[style*="grid-template-columns:1.1fr"] > .card-panel:last-child div[style*="display:flex;flex-direction:column;gap:.25rem;padding:.25rem;max-height:420px"] > div[style*="display:grid;grid-template-columns:1fr auto"] > .ds-row-count {
    grid-column: 3 / 4;
    grid-row: 1 / span 2;
    align-self: flex-start;
  }
  section > div[style*="grid-template-columns:1.1fr"] > .card-panel:last-child div[style*="display:flex;flex-direction:column;gap:.25rem;padding:.25rem;max-height:420px"] > .ds-row-progress {
    grid-column: 2 / -1;
    grid-row: 2 / 3;
    margin-left: 0 !important;
  }

  /* === Runtime / Browser Section — User Agent wrap === */
  section > div[style*="grid-template-columns:1.1fr"] > .card-panel:last-child h4 + div,
  section > div[style*="grid-template-columns:1.1fr"] > .card-panel:last-child > div[style*="margin-top:1.05rem;padding-top:1rem;border-top:1px solid var(--border)"] {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }
  section > div[style*="grid-template-columns:1.1fr"] > .card-panel:last-child > div[style*="margin-top:1.05rem;padding-top:1rem;border-top:1px solid var(--border)"] h4 {
    font-size: 0.95rem !important;
    flex-wrap: wrap;
  }
  section > div[style*="grid-template-columns:1.1fr"] > .card-panel:last-child > div[style*="margin-top:1.05rem;padding-top:1rem;border-top:1px solid var(--border)"] h4 span:first-child {
    width: 30px !important;
    height: 30px !important;
    flex-shrink: 0;
  }
  section > div[style*="grid-template-columns:1.1fr"] > .card-panel:last-child > div[style*="margin-top:1.05rem;padding-top:1rem;border-top:1px solid var(--border)"] > div[style*="font-size:.82rem"] {
    padding-left: 0 !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
  }
  /* label+value pair (User Agent, Screen, Viewport, App) → 1 per baris di mobile (tidak grid 120px 1fr) */
  section > div[style*="grid-template-columns:1.1fr"] > .card-panel:last-child > div[style*="margin-top:1.05rem;padding-top:1rem;border-top:1px solid var(--border)"] > div[style*="font-size:.82rem"] > div {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.15rem !important;
    grid-template-columns: unset !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    padding: 0.5rem 0.6rem !important;
    background: var(--bg-secondary, rgba(124,92,255,0.05));
    border-radius: 9px;
    border: 1px solid var(--border-subtle, rgba(124,92,255,0.1));
  }
  section > div[style*="grid-template-columns:1.1fr"] > .card-panel:last-child > div[style*="margin-top:1.05rem;padding-top:1rem;border-top:1px solid var(--border)"] > div[style*="font-size:.82rem"] > div > strong {
    font-size: 0.72rem !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
  }
  section > div[style*="grid-template-columns:1.1fr"] > .card-panel:last-child > div[style*="margin-top:1.05rem;padding-top:1rem;border-top:1px solid var(--border)"] > div[style*="font-size:.82rem"] > div > span:not(.mono),
  section > div[style*="grid-template-columns:1.1fr"] > .card-panel:last-child > div[style*="margin-top:1.05rem;padding-top:1rem;border-top:1px solid var(--border)"] > div[style*="font-size:.82rem"] > div > span {
    font-size: 0.8rem !important;
    line-height: 1.4 !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    min-width: 0 !important;
    color: var(--text);
  }
  section > div[style*="grid-template-columns:1.1fr"] > .card-panel:last-child > div[style*="margin-top:1.05rem;padding-top:1rem;border-top:1px solid var(--border)"] > div[style*="font-size:.82rem"] > div > .mono {
    font-size: 0.7rem !important;
    line-height: 1.55 !important;
    overflow-wrap: anywhere !important;
    word-break: break-all !important;
    white-space: normal !important;
    color: var(--text);
    background: rgba(124,92,255,0.12);
    padding: 0.3rem 0.4rem !important;
    border-radius: 7px;
    border: 1px solid rgba(124,92,255,0.2);
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* stat-card-xl — lebih kecil padding */
  .stat-card-xl { padding: 0.95rem 1rem; border-radius: 14px !important; }
  .scx-label { font-size: 0.72rem !important; }
  .scx-value { font-size: 1.5rem !important; line-height: 1.1; }
  .scx-foot { font-size: 0.7rem !important; flex-wrap: wrap; gap: 0.2rem; }
  .scx-icon {
    position: absolute;
    right: 0.9rem; top: 0.9rem;
    width: 32px !important; height: 32px !important;
  }
  .scx-icon svg, .scx-icon svg * { width: 15px !important; height: 15px !important; }
}

/* ============ SYSTEM INFO — MOBILE SUPER KECIL < 420 px ============ */
@media (max-width: 420px) {
  section > div[style*="grid-template-columns:1.1fr"] > .card-panel:first-child .hov-row,
  .card-panel > div[style*="flex-direction:column;gap:.25rem;padding:.25rem"] > div,
  section > div[style*="grid-template-columns:1.1fr"] > .card-panel:last-child div[style*="display:flex;flex-direction:column;gap:.25rem;padding:.25rem;max-height:420px"] > div[style*="display:grid;grid-template-columns:1fr auto"] {
    grid-template-columns: auto minmax(0, 1fr) !important;
  }
  .ds-row-count {
    grid-column: 2 / 3;
    grid-row: 3 / 4;
    align-self: flex-start !important;
    text-align: left !important;
    justify-self: start;
    width: auto !important;
    min-width: 54px !important;
    max-width: 80px;
  }
  .ds-row-progress {
    grid-column: 1 / -1;
    grid-row: 2 / 3;
  }
  .ds-row-icon {
    width: 28px !important; height: 28px !important;
  }
  .ds-row-meta .t1 { font-size: 0.8rem !important; }
  .ds-row-meta .t2 { font-size: 0.66rem !important; }
  .stat-card-xl { padding: 0.85rem 0.9rem; }
  .scx-value { font-size: 1.4rem !important; }
  .scx-label { font-size: 0.7rem !important; }
  .scx-icon { width: 30px !important; height: 30px !important; }
}

/* ============ RESET DATABASE (Factory Reset) — MOBILE KECIL < 640 px ============ */
@media (max-width: 640px) {
  /* === STEP BAR — 3 kolom horizontal → 1 kolom VERTIKAL (fix step 3 keluar frame) === */
  .step-bar {
    grid-template-columns: 1fr !important;
    gap: 0.45rem !important;
    padding: 0.7rem !important;
    margin-bottom: 1rem !important;
    overflow-x: hidden !important;
  }
  .step-item {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0.65rem !important;
    padding: 0.65rem 0.7rem !important;
    min-width: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  /* Hilangkan panah panah kanan antar step (karena jadi vertikal) */
  .step-item:not(:last-child)::after {
    display: none !important;
  }
  .step-num {
    width: 38px !important;
    height: 38px !important;
    font-size: 0.95rem !important;
    flex-shrink: 0 !important;
    grid-column: auto !important;
    grid-row: auto !important;
  }
  .step-text {
    min-width: 0 !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.05rem !important;
  }
  .step-text strong {
    font-size: 0.84rem !important;
    line-height: 1.25 !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    white-space: normal !important;
  }
  .step-text span {
    font-size: 0.7rem !important;
    line-height: 1.4 !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    white-space: normal !important;
  }

  /* === WARNING CARD: icon ⚠️ 72px + title === */
  section > .card-panel[style*="border:1px solid rgba(239,68,68,.35)"] {
    padding: 0.9rem 0.8rem !important;
    border-radius: 14px !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  section > .card-panel[style*="border:1px solid rgba(239,68,68,.35)"] > div:first-child[style*="display:flex;gap:1.2rem"] {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.65rem !important;
    margin-bottom: 0.85rem !important;
  }
  /* Icon ⚠️ kecilin, tidak 72px */
  section > .card-panel[style*="border:1px solid rgba(239,68,68,.35)"] > div:first-child[style*="display:flex;gap:1.2rem"] > div:first-child[style*="font-size:3.2rem"] {
    width: 48px !important;
    height: 48px !important;
    font-size: 1.6rem !important;
    border-radius: 12px !important;
  }
  section > .card-panel[style*="border:1px solid rgba(239,68,68,.35)"] > div:first-child[style*="display:flex;gap:1.2rem"] > div:last-child[style*="flex:1"] {
    width: 100% !important;
    min-width: 0 !important;
  }
  section > .card-panel[style*="border:1px solid rgba(239,68,68,.35)"] > div:first-child[style*="display:flex;gap:1.2rem"] h2 {
    font-size: 1.05rem !important;
    line-height: 1.25 !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }
  section > .card-panel[style*="border:1px solid rgba(239,68,68,.35)"] > div:first-child[style*="display:flex;gap:1.2rem"] p {
    font-size: 0.8rem !important;
    line-height: 1.5 !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }

  /* === 2 Kolom DELETED + BEFORE PROCEED → 1 kolom vertical === */
  section > .card-panel[style*="border:1px solid rgba(239,68,68,.35)"] > div[style*="display:grid;grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 0.6rem !important;
    margin-bottom: 0.9rem !important;
  }
  section > .card-panel[style*="border:1px solid rgba(239,68,68,.35)"] > div[style*="display:grid;grid-template-columns:1fr 1fr"] > div {
    padding: 0.75rem 0.8rem !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  /* DELETED list — grid 2 kolom → 1 kolom (mobile) */
  section > .card-panel[style*="border:1px solid rgba(239,68,68,.35)"] ul[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 0.2rem !important;
  }
  section > .card-panel[style*="border:1px solid rgba(239,68,68,.35)"] ul li {
    font-size: 0.78rem !important;
    line-height: 1.45 !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }
  section > .card-panel[style*="border:1px solid rgba(239,68,68,.35)"] ul li a {
    font-size: 0.78rem !important;
    line-height: 1.45 !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    white-space: normal !important;
    display: inline-block;
  }

  /* === LAST WARNING BOX (🚨 BY PROCEEDING...) === */
  section > .card-panel[style*="border:1px solid rgba(239,68,68,.35)"] > div[style*="background:rgba(239,68,68,.08)"] {
    padding: 0.75rem 0.8rem !important;
    margin-bottom: 0.9rem !important;
  }
  section > .card-panel[style*="border:1px solid rgba(239,68,68,.35)"] > div[style*="background:rgba(239,68,68,.08)"] > div:first-child {
    font-size: 0.82rem !important;
    line-height: 1.35 !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    margin-bottom: 0.25rem !important;
  }
  section > .card-panel[style*="border:1px solid rgba(239,68,68,.35)"] > div[style*="background:rgba(239,68,68,.08)"] > div:last-child {
    font-size: 0.78rem !important;
    line-height: 1.5 !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }

  /* === BUTTONS (Reset + Cancel) === */
  section > .card-panel[style*="border:1px solid rgba(239,68,68,.35)"] > div[style*="display:flex;gap:.8rem"] {
    flex-direction: column-reverse !important; /* Reset button ATAS */
    align-items: stretch !important;
    gap: 0.5rem !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  section > .card-panel[style*="border:1px solid rgba(239,68,68,.35)"] > div[style*="display:flex;gap:.8rem"] > .btn {
    width: 100% !important;
    justify-content: center !important;
    padding: 0.7rem 1rem !important;
    font-size: 0.86rem !important;
    height: auto !important;
    line-height: 1.35 !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    white-space: normal !important;
  }
  section > .card-panel[style*="border:1px solid rgba(239,68,68,.35)"] > div[style*="display:flex;gap:.8rem"] > .btn svg,
  section > .card-panel[style*="border:1px solid rgba(239,68,68,.35)"] > div[style*="display:flex;gap:.8rem"] > .btn svg * {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
    min-width: 16px !important;
    min-height: 16px !important;
    flex-shrink: 0 !important;
  }

  /* === Tools Hero + Breadcrumb Tabs === */
  .reset-hero + .step-bar + .card-panel {
    min-width: 0 !important;
    width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }
  section {
    overflow-x: hidden !important;
    min-width: 0 !important;
    width: 100% !important;
  }
}

/* ============ RESET DATABASE — MOBILE SUPER KECIL < 420 px ============ */
@media (max-width: 420px) {
  .step-item {
    padding: 0.6rem 0.6rem !important;
    gap: 0.55rem !important;
  }
  .step-num {
    width: 34px !important;
    height: 34px !important;
    font-size: 0.88rem !important;
  }
  .step-text strong { font-size: 0.8rem !important; }
  .step-text span { font-size: 0.68rem !important; }
  section > .card-panel[style*="border:1px solid rgba(239,68,68,.35)"] { padding: 0.8rem 0.7rem !important; }
  section > .card-panel[style*="border:1px solid rgba(239,68,68,.35)"] > div:first-child[style*="display:flex;gap:1.2rem"] > div:first-child[style*="font-size:3.2rem"] {
    width: 44px !important; height: 44px !important; font-size: 1.4rem !important;
  }
  section > .card-panel[style*="border:1px solid rgba(239,68,68,.35)"] h2 { font-size: 1rem !important; }
  section > .card-panel[style*="border:1px solid rgba(239,68,68,.35)"] > div[style*="display:grid;grid-template-columns:1fr 1fr"] > div {
    padding: 0.65rem 0.7rem !important;
  }
  section > .card-panel[style*="border:1px solid rgba(239,68,68,.35)"] ul li { font-size: 0.76rem !important; }
  section > .card-panel[style*="border:1px solid rgba(239,68,68,.35)"] > div[style*="display:flex;gap:.8rem"] > .btn {
    padding: 0.65rem 0.9rem !important;
    font-size: 0.82rem !important;
  }
}

/* ============ TOOLS HERO (Export / Import / System / Thumbs) — MOBILE KECIL < 640 px ============ */
@media (max-width: 640px) {
  .tools-hero {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 0.75rem !important;
    padding: 0.9rem 0.85rem !important;
    margin-bottom: 0.9rem !important;
    border-radius: 14px !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }
  .tools-hero-left {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0.55rem !important;
    min-width: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    flex: none !important;
  }
  .tools-hero-icon {
    width: 54px !important;
    height: 54px !important;
    font-size: 1.6rem !important;
    border-radius: 14px !important;
    flex-shrink: 0 !important;
    margin: 0 auto !important;
  }
  .tools-hero-icon svg, .tools-hero-icon svg * { width: 26px !important; height: 26px !important; max-width: 26px !important; max-height: 26px !important; }
  .tools-hero-meta {
    min-width: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 0.3rem !important;
  }
  .tools-hero-meta h2 {
    font-size: 1.05rem !important;
    line-height: 1.25 !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    white-space: normal !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 0.4rem !important;
    flex-direction: row;
    margin: 0 auto 0.1rem !important;
    max-width: 100% !important;
  }
  .tools-hero-meta h2 .badge {
    display: inline-block;
    margin-top: 0.1rem;
    font-size: 0.64rem !important;
    padding: 0.16rem 0.5rem !important;
    line-height: 1.4;
  }
  .tools-hero-meta p {
    font-size: 0.78rem !important;
    line-height: 1.5 !important;
    color: var(--text-muted);
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    white-space: normal !important;
    text-align: center !important;
    margin: 0 auto !important;
    max-width: 100% !important;
    hyphens: auto;
  }
  .tools-hero-cta {
    flex-shrink: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    display: flex;
    justify-content: stretch;
    align-items: stretch;
  }
  .tools-hero-cta > * {
    width: 100% !important;
  }
  .tools-hero-cta .btn {
    width: 100% !important;
    padding: 0.7rem 0.9rem !important;
    font-size: 0.84rem !important;
    line-height: 1.35 !important;
    height: auto !important;
    justify-content: center !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    white-space: normal !important;
    display: flex !important;
    flex-direction: row;
    flex-wrap: nowrap;
  }
  .tools-hero-cta .btn svg, .tools-hero-cta .btn svg * {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
    min-width: 16px !important;
    min-height: 16px !important;
    flex-shrink: 0 !important;
  }
  .tools-hero-cta .btn .btn-label,
  .tools-hero-cta .btn span:not(svg) {
    min-width: 0 !important;
    width: auto;
    max-width: 100% !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    white-space: normal !important;
    line-height: 1.35 !important;
    text-align: left !important;
  }
  .tools-hero-cta .btn #tools-export-count {
    display: inline-block;
    min-width: 0 !important;
  }
}

@media (max-width: 420px) {
  .tools-hero {
    padding: 0.8rem 0.7rem !important;
    gap: 0.65rem !important;
  }
  .tools-hero-icon {
    width: 50px !important;
    height: 50px !important;
    font-size: 1.45rem !important;
  }
  .tools-hero-icon svg, .tools-hero-icon svg * { width: 24px !important; height: 24px !important; max-width: 24px !important; max-height: 24px !important; }
  .tools-hero-meta h2 {
    font-size: 0.98rem !important;
    line-height: 1.22 !important;
  }
  .tools-hero-meta p {
    font-size: 0.75rem !important;
    line-height: 1.48 !important;
  }
  .tools-hero-cta .btn {
    padding: 0.65rem 0.8rem !important;
    font-size: 0.8rem !important;
  }
  .tools-hero-cta .btn svg, .tools-hero-cta .btn svg * {
    width: 15px !important;
    height: 15px !important;
    max-width: 15px !important;
    max-height: 15px !important;
    min-width: 15px !important;
    min-height: 15px !important;
  }
}

/* ============ EXPORT CONTENT — Preset + Checkbox Groups MOBILE < 640 px ============ */
@media (max-width: 640px) {
  .export-filter-wrap {
    padding: 0.75rem 0.7rem !important;
    border-radius: 14px !important;
    margin-bottom: 0.9rem !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }
  .preset-row {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.35rem !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
  .preset-btn {
    width: 100% !important;
    justify-content: center !important;
    padding: 0.45rem 0.5rem !important;
    font-size: 0.76rem !important;
    line-height: 1.3 !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    white-space: normal !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    text-align: center !important;
    gap: 0.3rem !important;
    flex-direction: column !important;
  }
  .preset-btn span:first-child {
    font-size: 1.05rem !important;
  }
  .checkbox-groups-wrap {
    grid-template-columns: 1fr !important;
    gap: 0.55rem !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
  .ds-group-col {
    padding: 0.6rem 0.55rem !important;
    gap: 0.3rem !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
  .ds-group-title {
    padding-bottom: 0.35rem !important;
    margin-bottom: 0.05rem !important;
    gap: 0.3rem !important;
    flex-wrap: wrap;
  }
  .ds-group-title strong {
    font-size: 0.72rem !important;
    letter-spacing: 0.04em;
  }
  .ds-card {
    padding: 0.45rem 0.5rem !important;
    gap: 0.45rem !important;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
  .ds-card-check {
    width: 15px !important;
    height: 15px !important;
    flex-shrink: 0;
  }
  .ds-card-info {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    gap: 0.05rem !important;
  }
  .ds-card-info strong {
    font-size: 0.8rem !important;
    line-height: 1.3 !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    white-space: normal !important;
    min-width: 0 !important;
    display: inline-flex !important;
    flex-direction: row;
    align-items: center;
    gap: 0.3rem !important;
  }
  .ds-card-info strong .ico {
    width: 18px !important;
    height: 18px !important;
    font-size: 0.8rem !important;
    border-radius: 5px !important;
    flex-shrink: 0;
  }
  .ds-card-info span {
    font-size: 0.7rem !important;
    line-height: 1.4 !important;
    overflow-wrap: anywhere !important;
    word-break: break-all !important;
    white-space: normal !important;
    min-width: 0 !important;
    color: var(--text-muted);
  }
  .ds-card-count {
    font-size: 0.78rem !important;
    min-width: 38px !important;
    padding: 0.15rem 0.4rem !important;
    align-self: center;
  }
}

@media (max-width: 420px) {
  .preset-row {
    grid-template-columns: 1fr !important;
  }
  .preset-btn {
    flex-direction: row !important;
    justify-content: flex-start !important;
    padding: 0.5rem 0.6rem !important;
    font-size: 0.78rem !important;
    text-align: left !important;
  }
  .preset-btn span:first-child {
    font-size: 1.1rem !important;
    width: 22px !important;
    flex-shrink: 0;
    text-align: center;
  }
  .ds-card {
    padding: 0.45rem 0.45rem !important;
    gap: 0.4rem !important;
  }
  .ds-card-info strong { font-size: 0.78rem !important; }
  .ds-card-info span { font-size: 0.68rem !important; }
}

/* ============ IMPORT CONTENT — Dropzone + Format Tabs + Smart Merge MOBILE < 640 px ============ */
@media (max-width: 640px) {
  .import-dropzone {
    padding: 1.6rem 0.9rem !important;
    border-radius: 14px !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }
  .import-dropzone > div:first-child[style*="width:64px"] {
    width: 52px !important;
    height: 52px !important;
    font-size: 1.5rem !important;
    border-radius: 14px !important;
    margin: 0 auto 0.7rem !important;
  }
  .import-dropzone h4 {
    font-size: 0.9rem !important;
    line-height: 1.3 !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    white-space: normal !important;
    text-align: center !important;
    margin: 0 auto 0.3rem !important;
    max-width: 100% !important;
  }
  .import-dropzone p {
    font-size: 0.76rem !important;
    line-height: 1.5 !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    white-space: normal !important;
    text-align: center !important;
    max-width: 100% !important;
    margin: 0 auto !important;
  }
  .import-dropzone p strong,
  .import-dropzone h4 strong {
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    white-space: normal !important;
  }
  .import-dropzone > div[style*="margin-top:1rem;display:inline-flex"] {
    margin-top: 0.85rem !important;
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center !important;
    gap: 0.35rem !important;
  }
  .import-dropzone .status-pill {
    font-size: 0.64rem !important;
    padding: 0.16rem 0.45rem !important;
    line-height: 1.4 !important;
  }
  /* Overwrite/Smart Merge warning box */
  #tools-import-warning {
    padding: 0.7rem 0.75rem !important;
    border-radius: 11px !important;
    margin-bottom: 0.9rem !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
  #tools-import-warning > div[style*="display:flex;align-items:flex-start"] {
    flex-direction: column !important;
    gap: 0.45rem !important;
    align-items: flex-start;
  }
  #tools-import-warning > div[style*="display:flex;align-items:flex-start"] > div:first-child {
    width: 34px !important;
    height: 34px !important;
    font-size: 1.1rem !important;
    border-radius: 9px !important;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,0.04);
    flex-shrink: 0;
  }
  #tools-import-warning > div[style*="display:flex;align-items:flex-start"] > div:last-child {
    font-size: 0.78rem !important;
    line-height: 1.5 !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    white-space: normal !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  .import-preview-grid {
    grid-template-columns: 1fr !important;
    gap: 0.5rem !important;
  }
  .import-pv-card {
    padding: 0.7rem 0.75rem !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }
}

@media (max-width: 420px) {
  .import-dropzone {
    padding: 1.4rem 0.8rem !important;
  }
  .import-dropzone > div:first-child[style*="width:64px"] {
    width: 48px !important;
    height: 48px !important;
    font-size: 1.35rem !important;
  }
  .import-dropzone h4 { font-size: 0.85rem !important; }
  .import-dropzone p { font-size: 0.74rem !important; }
  #tools-import-warning { padding: 0.65rem 0.65rem !important; }
  #tools-import-warning > div[style*="display:flex;align-items:flex-start"] > div:last-child {
    font-size: 0.76rem !important;
  }
}



.bw-mini-item > div:last-child {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 0.3rem;
  text-align: right;
  min-width: 0;
  flex-shrink: 0;
}
.bw-mini-mult {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.22rem 0.55rem 0.22rem 0.55rem;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.72rem;
  line-height: 1;
  letter-spacing: 0.01em;
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.22) 0%, rgba(245, 158, 11, 0.28) 100%);
  color: #fde68a;
  border: 1px solid rgba(250, 204, 21, 0.38);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
}
.bw-mini-amt {
  font-weight: 800;
  font-size: 0.98rem;
  color: #5eead4;
  letter-spacing: 0.005em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 0 rgba(0,0,0,0.4);
  line-height: 1.1;
}
@media (max-width: 640px) {
  .bw-mini-item {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 0.6rem;
    padding: 0.65rem 0.7rem 0.65rem 0.6rem;
    border-radius: 12px;
  }
  .bw-mini-thumb { width: 38px; height: 38px; font-size: 1rem; border-radius: 8px; }
  .bwmi-slot { font-size: 0.82rem; }
  .bwmi-time { font-size: 0.68rem; }
  .bw-mini-mult { font-size: 0.66rem; padding: 0.2rem 0.48rem; border-radius: 6px; }
  .bw-mini-amt { font-size: 0.88rem; }
}
@media (max-width: 480px) {
  .bw-mini-list { gap: 0.55rem; }
  .bw-mini-item {
    grid-template-columns: 34px minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 0.35rem 0.6rem;
  }
  .bw-mini-item > div:last-child {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding-top: 0.35rem;
    margin-top: 0.15rem;
    border-top: 1px dashed rgba(168,85,247,0.2);
  }
  .bw-mini-thumb { width: 34px; height: 34px; font-size: 0.95rem; }
  .bw-mini-mult { font-size: 0.64rem; }
  .bw-mini-amt { font-size: 0.86rem; }
}

.quick-links {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem;
}
.ql-card {
  padding: 0.9rem;
  border-radius: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  display: flex; flex-direction: column; gap: 0.4rem;
  cursor: pointer;
  text-decoration: none; color: inherit;
  transition: all 0.18s;
  min-width: 0;
}
.ql-card:hover { border-color: var(--accent-pink); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0,0,0,0.25); }
.ql-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
  color: white;
  flex-shrink: 0;
}
.ql-title { font-weight: 700; font-size: 0.9rem; color: var(--text-strong); }
.ql-desc { font-size: 0.75rem; color: var(--text-muted); line-height: 1.45; overflow-wrap: anywhere; }
@media (max-width: 840px) { .quick-links { grid-template-columns: 1fr; } }

/* ============ SETTINGS PANEL ============ */
.settings-nav {
  display: flex; flex-direction: column; gap: 0.25rem;
  padding: 0.4rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: 12px;
}
.settings-nav button {
  all: unset; cursor: pointer;
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  font-size: 0.85rem; font-weight: 600;
  color: var(--text-muted);
  transition: all 0.12s;
  display: flex; align-items: center; gap: 0.65rem;
}
.settings-nav button:hover { color: var(--text); background: var(--bg-tertiary); }
.settings-nav button.active {
  color: white;
  background: linear-gradient(135deg, rgba(255,77,157,0.22), rgba(124,92,255,0.22));
  box-shadow: inset 0 0 0 1px rgba(255,77,157,0.2);
}

.settings-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}
@media (max-width: 1000px) { .settings-layout { grid-template-columns: 1fr; } }

/* ============ SWITCH TOGGLE (Home Builder Enable/Disable Section) ============ */
.switch-wrap {
  position: relative;
  display: inline-block;
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.switch-wrap input[type="checkbox"] {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--bg-tertiary, #26204a);
  border: 1px solid var(--border-default, rgba(124,92,255,.3));
  transition: .22s all ease;
  border-radius: 999px;
  display: block;
}
.switch-slider::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  top: 50%;
  transform: translateY(-50%);
  background-color: #ffffff;
  transition: .22s all ease;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,.35);
}
.switch-wrap input:checked + .switch-slider {
  background: linear-gradient(135deg, rgba(255,77,157,0.65), rgba(124,92,255,0.65));
  border-color: rgba(124,92,255,0.55);
}
.switch-wrap input:checked + .switch-slider::before {
  transform: translate(20px, -50%);
}

/* ============ GLOBAL RESPONSIVE UTILITIES ============ */
@media (max-width: 640px) {
  html { -webkit-text-size-adjust: 100%; }
  body { overflow-x: hidden; }
  .dashboard-body { font-size: 14px; }
}

/* ============ MEDIUM TABLET / LAPTOP KECIL (≤ 1280px) ============ */
@media (max-width: 1023px) {
  .topbar-actions .btn .btn-label { display: none; }
  .topbar-actions .btn { padding: 0.45rem 0.65rem !important; min-width: 38px; }
  .topbar-actions .btn svg + span:not(.badge-dot) { display: none; }
  .topbar-title { font-size: 0.98rem; }
  .quick-links { grid-template-columns: 1fr; }
  .grid-main-side { grid-template-columns: 1fr; }
  .activity-item { grid-template-columns: 36px minmax(0, 1fr); }
  .activity-item .act-time { grid-column: 2; text-align: left; padding-top: 0; }
}

/* ============ LARGE TABLET (≤ 1080px) ============ */
@media (max-width: 1023px) {
  .admin-content { padding: 1.1rem; }
  .card-panel { padding: 1.05rem; }
  .page-head .page-title { font-size: 1.45rem; }
  .rich-editor { min-height: 220px; padding: 0.8rem 0.9rem; font-size: 0.92rem; }
  .rich-editor h2 { font-size: 1.3rem; }
  .rich-editor-toolbar { padding: 0.45rem 0.6rem; }
  .re-btn { width: 30px; height: 30px; }
  .data-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .data-table { min-width: 760px; }
  .crud-toolbar { flex-direction: column; align-items: stretch; }
  .crud-toolbar-actions { justify-content: flex-start; }
  .crud-search { max-width: 100%; }
  .page-head { flex-direction: column; align-items: stretch; }
  .page-head .topbar-actions { justify-content: flex-start; flex-wrap: wrap; }
  .settings-nav { flex-direction: row; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .settings-nav button { flex-shrink: 0; }
}

/* ============ TABLET KECIL (≤ 960px) ============ */
@media (max-width: 960px) {
  .admin-content { padding: 1rem; }
  .card-panel { padding: 1rem; }
  .page-head .page-title { font-size: 1.4rem; }
  .topbar-title { font-size: 0.95rem; }
  .scx-value { font-size: 1.6rem; }
  .scx-icon { width: 34px; height: 34px; }
  .rich-editor { min-height: 220px; padding: 0.75rem 0.85rem; font-size: 0.9rem; }
  .rich-editor h2 { font-size: 1.25rem; }
  .rich-editor-toolbar { padding: 0.4rem 0.5rem; }
  .re-btn { width: 28px; height: 28px; }
  .editor-layout { grid-template-columns: 1fr; }
  .settings-layout { grid-template-columns: 1fr; }
  .data-table { min-width: 720px; }
}

/* ============ MOBILE (≤ 640px) ============ */
@media (max-width: 640px) {
  html, body { overflow-x: hidden !important; max-width: 100vw !important; }
  *, *::before, *::after { box-sizing: border-box !important; }
  .dashboard-body,
  .admin-app,
  .admin-app > *,
  .admin-content,
  .admin-content > *,
  section,
  form,
  .card-panel,
  .card-panel > *,
  .page-head,
  .page-head > *,
  div[class*="-wrap"],
  div[class*="-panel"],
  div[class*="-builder"] {
    max-width: 100% !important;
    min-width: 0 !important;
    width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }
  /* ⚠️ EXCLUDE .admin-main DARI overflow-x HIDDEN!
     .admin-main ADALAH PARENT LANGSUNG .admin-topbar (sticky).
     STICKY HANYA BERJALAN JIKA SEMUA PARENT PUNYA overflow:visible!
     Kalau admin-main ada overflow-x:hidden → sticky RUSAK TOTAL (header ikut naik saat scroll!). */
  .admin-app > .admin-main {
    overflow-x: visible !important;
    overflow-y: visible !important;
  }
  .admin-content { overflow-x: hidden !important; padding: 0.7rem; }
  .admin-topbar .topbar-title { font-size: 0.9rem; }
  .sidebar-toggle { width: 36px; height: 36px; }
  .admin-sidebar { width: 270px; }
  .page-head { margin-bottom: 1rem; }
  .page-head .page-title { font-size: 1.25rem; }
  .page-head .page-subtitle { font-size: 0.82rem; }
  .card-panel { padding: 0.85rem; border-radius: 14px; margin-bottom: 0.9rem; }
  .card-panel h3 { font-size: 0.95rem; margin-bottom: 0.75rem; }
  .stats-grid-4 { grid-template-columns: 1fr; gap: 0.75rem; }
  .stat-card-xl { padding: 0.95rem 1rem; }
  .scx-label { font-size: 0.72rem; }
  .scx-value { font-size: 1.5rem; }
  .scx-foot { font-size: 0.72rem; }
  .tabs-panel { padding: 0.25rem; gap: 0.25rem; margin-bottom: 0.75rem; border-radius: 10px; }
  .tab-pill { padding: 0.42rem 0.7rem; font-size: 0.8rem; }
  .crud-toolbar { gap: 0.5rem; margin-bottom: 0.75rem; }
  .crud-search { min-width: 100%; }
  .crud-search input { height: 38px; font-size: 0.85rem; }
  .data-table { min-width: 680px; font-size: 0.8rem; }
  .data-table th { padding: 0.6rem 0.7rem; font-size: 0.68rem; }
  .data-table td { padding: 0.55rem 0.7rem; }
  .data-table .ct { max-width: 170px; }
  .data-table .thumb-sm { width: 34px; height: 22px; }
  .data-table .thumb-avatar { width: 28px; height: 28px; }
  .row-actions { gap: 0.2rem; }
  .icon-btn-sm { width: 28px; height: 28px; border-radius: 7px; }
  .icon-btn-sm svg { width: 13px; height: 13px; }
  .modal-backdrop { padding: 0.75rem 0.5rem; }
  .modal-panel { border-radius: 14px; }
  .modal-head { padding: 0.8rem 0.9rem; }
  .modal-body { padding: 0.85rem; }
  .modal-foot { padding: 0.75rem 0.9rem; flex-direction: column-reverse; align-items: stretch; gap: 0.5rem; }
  .modal-foot-actions { flex-direction: column; }
  .modal-foot-actions .btn { flex: 1; width: 100%; justify-content: center; }
  .form-group input, .form-group select, .form-group textarea { height: 42px; font-size: 0.88rem; border-radius: 9px; }
  .form-group textarea { height: auto; min-height: 90px; }
  .form-row { grid-template-columns: 1fr; gap: 0.75rem; }
  .checkbox-row { font-size: 0.82rem; }
  .checkbox-row input[type=checkbox] { width: 18px; height: 18px; }
  .editor-layout { grid-template-columns: 1fr; gap: 0.9rem; }
  .editor-group { padding: 0.75rem 0.85rem; border-radius: 10px; }
  .editor-group h5 { font-size: 0.76rem; margin-bottom: 0.5rem; }
  .rich-editor-toolbar { padding: 0.35rem 0.45rem; }
  .re-btn { width: 28px; height: 28px; font-size: 0.8rem; }
  .rich-editor { min-height: 200px; padding: 0.7rem 0.8rem; font-size: 0.88rem; line-height: 1.6; }
  .rich-editor h2 { font-size: 1.15rem; }
  .rich-editor h3 { font-size: 1rem; }
  .tag-field-wrap { gap: 0.25rem; }
  .tag-chip { font-size: 0.75rem; padding: 0.22rem 0.3rem 0.22rem 0.5rem; }
  .cat-check-list { max-height: 150px; }
  .featured-image-picker { padding: 1rem 0.5rem; border-radius: 9px; }
  .toast-wrap { right: 0.6rem; left: 0.6rem; bottom: 0.6rem; max-width: none; }
  .toast { padding: 0.7rem 0.85rem; font-size: 0.82rem; border-radius: 9px; }
  .activity-list { gap: 0; }
  .activity-item { grid-template-columns: 34px minmax(0, 1fr); gap: 0.6rem; padding: 0.6rem 0; }
  .activity-ic { width: 34px; height: 34px; border-radius: 9px; }
  .activity-item h6 { font-size: 0.84rem; }
  .activity-item .act-meta { font-size: 0.72rem; }
  .grid-main-side { gap: 0.9rem; }
  .quick-links { gap: 0.5rem; }
  .ql-card { padding: 0.75rem; border-radius: 10px; }
  .ql-icon { width: 32px; height: 32px; border-radius: 9px; }
  .ql-title { font-size: 0.84rem; }
  .ql-desc { font-size: 0.72rem; }
  .settings-layout { grid-template-columns: 1fr; gap: 0.9rem; }
  .settings-nav { padding: 0.3rem; border-radius: 10px; gap: 0.2rem; }
  .settings-nav button { padding: 0.5rem 0.7rem; font-size: 0.82rem; }
  .btn { min-height: 40px; padding: 0.5rem 0.9rem !important; border-radius: 9px !important; font-size: 0.85rem !important; }
  .btn.btn-primary { padding-left: 1rem !important; padding-right: 1rem !important; }
  .topbar-actions { gap: 0.35rem; }
  .topbar-actions .btn { height: 38px !important; }
  .topbar-actions .btn.btn-primary { min-width: 90px; }
  .data-empty { padding: 2rem 0.75rem; }
  .data-empty .big-emoji { font-size: 2rem; }
  .data-empty h4 { font-size: 0.95rem; }
  .data-empty p { font-size: 0.8rem; }
}

/* ============ APPEARANCE PAGE — MOBILE RESPONSIVE (<640px) ============ */
@media (max-width: 640px) {
  #ap-form > div[style*="grid-template-columns:1.25fr"],
  #ap-form > div[style*="grid-template-columns: 1.25fr"] {
    grid-template-columns: 1fr !important;
    gap: 0.9rem !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }
  #ap-form > div[style*="grid-template-columns:1.25fr"] > div,
  #ap-form > div[style*="grid-template-columns: 1.25fr"] > div {
    min-width: 0 !important;
    width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }
  #ap-form .card-panel {
    width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }
  #ap-form input[type="text"],
  #ap-form input[type="email"],
  #ap-form input[type="url"],
  #ap-form textarea {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    font-size: 0.88rem !important;
    overflow-wrap: anywhere !important;
  }
  #ap-form textarea {
    min-height: 88px !important;
    line-height: 1.5 !important;
    word-break: break-word !important;
  }
  #ap-form div[style*="grid-template-columns:repeat(2,1fr)"],
  #ap-form div[style*="grid-template-columns: repeat(2, 1fr)"] {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }
  #ap-form div[style*="display:flex"][style*="align-items:center"][style*="gap:0.85rem"],
  #ap-form div[style*="display:flex"][style*="align-items: center"][style*="gap: 0.85rem"] {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    grid-template-rows: auto auto auto !important;
    grid-auto-flow: row !important;
    gap: 0.5rem !important;
    align-items: start !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  #ap-form div[style*="display:flex"][style*="align-items:center"][style*="gap:0.85rem"] > label[style*="min-width:130px"],
  #ap-form div[style*="display:flex"][style*="align-items: center"][style*="gap: 0.85rem"] > label[style*="min-width: 130px"] {
    grid-column: 1 / -1 !important;
    min-width: 0 !important;
    width: 100% !important;
    font-size: 0.78rem !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
  }
  #ap-form input[type="color"] {
    grid-column: 2 / 3 !important;
    grid-row: 2 / 3 !important;
    width: 52px !important;
    height: 36px !important;
    min-width: 52px !important;
    min-height: 36px !important;
    justify-self: end !important;
    margin: 0 !important;
  }
  #ap-form input[type="color"] + input[type="text"],
  #ap-form input[type="text"][id$="-col1-txt"],
  #ap-form input[type="text"][id$="-col2-txt"] {
    grid-column: 1 / 2 !important;
    grid-row: 2 / 3 !important;
    width: 100% !important;
    height: 36px !important;
    padding: 0 0.65rem !important;
    font-size: 0.78rem !important;
  }
  #ap-col-preview {
    height: 46px !important;
    width: 100% !important;
    border-radius: 12px !important;
    min-width: 0 !important;
    margin-top: 0.5rem !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }
  #ap-form div[style*="display:flex"][style*="gap:0.55rem"][style*="align-items:stretch"],
  #ap-form div[style*="display:flex"][style*="gap: 0.55rem"][style*="align-items: stretch"] {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) auto !important;
    gap: 0.5rem !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
  #ap-form div[style*="display:flex"][style*="gap:0.55rem"][style*="align-items:stretch"] > input,
  #ap-form div[style*="display:flex"][style*="gap: 0.55rem"][style*="align-items: stretch"] > input {
    height: 40px !important;
    min-width: 0 !important;
    font-size: 0.78rem !important;
  }
  #ap-form div[style*="display:flex"][style*="gap:0.55rem"][style*="align-items:stretch"] > button,
  #ap-form div[style*="display:flex"][style*="gap: 0.55rem"][style*="align-items: stretch"] > button {
    min-width: auto !important;
    width: auto !important;
    padding: 0 0.7rem !important;
    height: 40px !important;
    font-size: 0.78rem !important;
    white-space: nowrap !important;
  }
  .brand-asset-picker {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    padding: 0.7rem 0.6rem !important;
    overflow-x: hidden !important;
  }
  .brand-asset-picker .fip-placeholder-text {
    font-size: 0.74rem !important;
    line-height: 1.45 !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
  }
  .brand-asset-picker .fip-placeholder-text strong {
    font-size: 0.82rem !important;
    line-height: 1.35 !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 0.25rem !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
  }
  .brand-asset-picker .fip-placeholder-text strong svg {
    width: 26px !important;
    height: 26px !important;
    max-width: 26px !important;
    max-height: 26px !important;
    flex-shrink: 0 !important;
  }
  .brand-asset-picker .fip-placeholder-text strong > span {
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    line-height: 1.35 !important;
    text-align: center !important;
  }
  .brand-asset-picker .fip-placeholder-text > div,
  .brand-asset-picker .fip-placeholder-text :not(strong) {
    font-size: 0.68rem !important;
    line-height: 1.45 !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    color: var(--text-muted) !important;
    margin-top: 0.25rem !important;
  }
  #ap-form .page-head .topbar-actions {
    width: 100% !important;
  }
  #ap-form .page-head .topbar-actions .btn {
    width: 100% !important;
    min-width: 0 !important;
  }
  .page-head:has(+ form#ap-form) .topbar-actions,
  section:has(> form#ap-form) > .page-head .topbar-actions {
    width: 100% !important;
  }
  section:has(> form#ap-form) > .page-head .topbar-actions .btn {
    width: 100% !important;
    justify-content: center !important;
  }
}
@media (max-width: 480px) {
  #ap-form div[style*="display:flex"][style*="gap:0.55rem"][style*="align-items:stretch"],
  #ap-form div[style*="display:flex"][style*="gap: 0.55rem"][style*="align-items: stretch"] {
    grid-template-columns: minmax(0,1fr) !important;
    grid-template-rows: auto auto !important;
    gap: 0.45rem !important;
  }
  #ap-form div[style*="display:flex"][style*="gap:0.55rem"][style*="align-items:stretch"] > input,
  #ap-form div[style*="display:flex"][style*="gap: 0.55rem"][style*="align-items: stretch"] > input {
    grid-row: 1 / 2 !important;
    height: 40px !important;
  }
  #ap-form div[style*="display:flex"][style*="gap:0.55rem"][style*="align-items:stretch"] > button,
  #ap-form div[style*="display:flex"][style*="gap: 0.55rem"][style*="align-items: stretch"] > button {
    grid-row: 2 / 3 !important;
    height: 38px !important;
    width: 100% !important;
    justify-self: stretch !important;
  }
  #ap-form input[type="color"] {
    width: 100% !important;
    height: 40px !important;
    justify-self: stretch !important;
    grid-column: 1 / -1 !important;
    grid-row: 3 / 4 !important;
  }
  #ap-form input[type="text"][id$="-col1-txt"],
  #ap-form input[type="text"][id$="-col2-txt"] {
    grid-column: 1 / -1 !important;
    grid-row: 2 / 3 !important;
  }
  .brand-asset-picker .fip-placeholder-text strong {
    flex-direction: column !important;
    gap: 0.2rem !important;
  }
  .brand-asset-picker .fip-placeholder-text strong svg {
    width: 30px !important;
    height: 30px !important;
    max-width: 30px !important;
    max-height: 30px !important;
  }
}

/* ============ HOME BUILDER PAGE — MOBILE RESPONSIVE (<640px) [REVISI RAPIH FULL] ============ */
@media (max-width: 640px) {
  section:has(.card-section-builder),
  section:has(.card-section-builder) > .page-head,
  section:has(.card-section-builder) > .card-panel,
  section:has(.card-section-builder) > .card-panel > * {
    max-width: 100% !important;
    min-width: 0 !important;
    width: 100% !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
    box-sizing: border-box !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  section:has(.card-section-builder) > .card-panel {
    padding: 0.75rem 0.65rem !important;
    border-radius: 12px !important;
  }
  section:has(.card-section-builder) > .page-head > div:first-child {
    min-width: 0 !important;
    width: 100% !important;
  }
  section:has(.card-section-builder) > .page-head .page-title {
    font-size: 1.2rem !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
    line-height: 1.3 !important;
    margin: 0 !important;
  }
  section:has(.card-section-builder) > .page-head .page-subtitle {
    font-size: 0.78rem !important;
    line-height: 1.5 !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    margin-top: 0.2rem !important;
  }
  section:has(.card-section-builder) .topbar-actions {
    width: 100% !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.4rem !important;
    margin-top: 0.15rem !important;
    flex-wrap: nowrap !important;
  }
  section:has(.card-section-builder) .topbar-actions .btn {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 44px !important;
    font-size: 0.84rem !important;
    font-weight: 700 !important;
    justify-content: center !important;
    padding: 0 0.85rem !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
    gap: 0.5rem !important;
    box-sizing: border-box !important;
    border-radius: 10px !important;
  }
  section:has(.card-section-builder) .topbar-actions .btn span,
  section:has(.card-section-builder) .topbar-actions .btn span:not(.badge-dot),
  section:has(.card-section-builder) .topbar-actions .btn svg + span:not(.badge-dot) {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 0 !important;
    line-height: 1.3 !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
  }
  section:has(.card-section-builder) .topbar-actions .btn svg {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
    min-width: 16px !important;
    min-height: 16px !important;
    flex-shrink: 0 !important;
  }
  section:has(.card-section-builder) div[style*="display:grid"][style*="grid-template-columns:repeat(auto-fill, minmax(330px"],
  section:has(.card-section-builder) div[style*="display:grid"][style*="grid-template-columns: repeat(auto-fill, minmax(330px"] {
    grid-template-columns: 1fr !important;
    gap: 0.7rem !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }
  .card-section-builder {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
    padding: 0.75rem 0.65rem 0.85rem 0.65rem !important;
    border-radius: 11px !important;
    margin: 0 !important;
    border: 1px solid var(--border-default) !important;
  }
  .card-section-builder > div[style*="display:flex"][style*="justify-content:space-between"],
  .card-section-builder > div[style*="display:flex"][style*="justify-content: space-between"] {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-rows: auto !important;
    gap: 0.5rem !important;
    align-items: start !important;
    justify-content: space-between !important;
    margin-bottom: 0.7rem !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
  .card-section-builder > div[style*="display:flex"][style*="justify-content:space-between"] > div:first-child,
  .card-section-builder > div[style*="display:flex"][style*="justify-content: space-between"] > div:first-child {
    grid-column: 1 / 2 !important;
    grid-row: 1 / 2 !important;
    min-width: 0 !important;
    width: 100% !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.15rem !important;
  }
  .card-section-builder > div[style*="display:flex"][style*="justify-content:space-between"] > div:first-child > div:first-child,
  .card-section-builder > div[style*="display:flex"][style*="justify-content: space-between"] > div:first-child > div:first-child {
    font-size: 0.98rem !important;
    font-weight: 900 !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
    line-height: 1.3 !important;
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.45rem !important;
  }
  .card-section-builder > div[style*="display:flex"][style*="justify-content:space-between"] > div:first-child > div:first-child > div[style*="border-radius"][style*="font-weight"],
  .card-section-builder > div[style*="display:flex"][style*="justify-content:space-between"] > div:first-child > div:first-child > *:first-child {
    flex-shrink: 0 !important;
    min-width: 34px !important;
    width: auto !important;
    height: auto !important;
    padding: 0.15rem 0.35rem !important;
    border-radius: 6px !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .card-section-builder > div[style*="display:flex"][style*="justify-content:space-between"] > div:first-child .mono,
  .card-section-builder > div[style*="display:flex"][style*="justify-content: space-between"] > div:first-child .mono {
    font-size: 0.7rem !important;
    overflow-wrap: break-all !important;
    word-break: break-all !important;
    line-height: 1.4 !important;
    margin-top: 0.1rem !important;
    white-space: normal !important;
    color: var(--accent-purple) !important;
  }
  .card-section-builder > div[style*="display:flex"][style*="justify-content:space-between"] > .switch-wrap,
  .card-section-builder > div[style*="display:flex"][style*="justify-content: space-between"] > .switch-wrap,
  .card-section-builder .switch-wrap {
    grid-column: 2 / 3 !important;
    grid-row: 1 / 2 !important;
    justify-self: end !important;
    align-self: start !important;
    width: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    height: 26px !important;
    min-height: 26px !important;
    max-height: 26px !important;
    flex-shrink: 0 !important;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 5 !important;
    position: relative !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .card-section-builder .switch-wrap input[type="checkbox"] {
    display: block !important;
    position: absolute !important;
    inset: 0 !important;
    width: 48px !important;
    height: 26px !important;
    z-index: 2 !important;
    cursor: pointer !important;
  }
  .card-section-builder .switch-slider {
    width: 48px !important;
    height: 26px !important;
    display: block !important;
    border-radius: 999px !important;
    position: absolute !important;
    inset: 0 !important;
  }
  .card-section-builder .switch-slider::before {
    width: 20px !important;
    height: 20px !important;
    top: 50% !important;
    left: 3px !important;
    border-radius: 50% !important;
  }
  .card-section-builder .switch-wrap input:checked + .switch-slider::before {
    transform: translate(22px, -50%) !important;
  }
  .card-section-builder > div[style*="display:flex"][style*="flex-direction:column"][style*="gap:0.65rem"],
  .card-section-builder > div[style*="display:flex"][style*="flex-direction: column"][style*="gap: 0.65rem"] {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    gap: 0.55rem !important;
  }
  .card-section-builder .form-group {
    margin-bottom: 0 !important;
    gap: 0.25rem !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
  .card-section-builder .form-group label {
    font-size: 0.72rem !important;
    line-height: 1.35 !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    white-space: normal !important;
    color: var(--text-muted) !important;
    font-weight: 600 !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  .card-section-builder .form-group input[type="text"],
  .card-section-builder .form-group select,
  .card-section-builder .hbs-title,
  .card-section-builder .hbs-subtitle,
  .card-section-builder .hbs-link,
  .card-section-builder .hbs-pageid {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    height: 38px !important;
    padding: 0 0.65rem !important;
    font-size: 0.82rem !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
    border-radius: 8px !important;
    line-height: 1.3 !important;
  }
  .card-section-builder .form-group select option {
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    font-size: 0.78rem !important;
  }
  section:has(.card-section-builder) div[style*="display:flex"][style*="gap:0.8rem"][style*="justify-content:flex-end"][style*="margin-top:1.6rem"],
  section:has(.card-section-builder) div[style*="display:flex"][style*="gap: 0.8rem"][style*="justify-content: flex-end"][style*="margin-top: 1.6rem"] {
    flex-direction: column-reverse !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    margin-top: 0.9rem !important;
    padding-top: 0.8rem !important;
    gap: 0.4rem !important;
    overflow-x: hidden !important;
  }
  section:has(.card-section-builder) div[style*="display:flex"][style*="gap:0.8rem"][style*="justify-content:flex-end"][style*="margin-top:1.6rem"] .btn,
  section:has(.card-section-builder) div[style*="display:flex"][style*="gap: 0.8rem"][style*="justify-content: flex-end"][style*="margin-top: 1.6rem"] .btn {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 44px !important;
    font-size: 0.84rem !important;
    font-weight: 700 !important;
    justify-content: center !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
    box-sizing: border-box !important;
    gap: 0.5rem !important;
  }
  section:has(.card-section-builder) div[style*="display:flex"][style*="gap:0.8rem"][style*="justify-content:flex-end"][style*="margin-top:1.6rem"] .btn span,
  section:has(.card-section-builder) div[style*="display:flex"][style*="gap:0.8rem"][style*="justify-content:flex-end"][style*="margin-top:1.6rem"] .btn svg + span:not(.badge-dot) {
    display: inline-flex !important;
  }
}
@media (max-width: 480px) {
  section:has(.card-section-builder) > .page-head > div:first-child .page-subtitle {
    font-size: 0.76rem !important;
  }
  .card-section-builder {
    padding: 0.75rem 0.65rem 0.85rem 0.65rem !important;
    border-radius: 11px !important;
  }
  .card-section-builder > div[style*="display:flex"][style*="justify-content:space-between"] > div:first-child > div:first-child,
  .card-section-builder > div[style*="display:flex"][style*="justify-content: space-between"] > div:first-child > div:first-child {
    font-size: 0.92rem !important;
    flex-direction: row !important;
    gap: 0.4rem !important;
  }
  .card-section-builder > div[style*="display:flex"][style*="justify-content:space-between"],
  .card-section-builder > div[style*="display:flex"][style*="justify-content: space-between"] {
    gap: 0.45rem !important;
    margin-bottom: 0.6rem !important;
  }
  .card-section-builder .switch-wrap,
  .card-section-builder > div[style*="display:flex"][style*="justify-content:space-between"] > .switch-wrap {
    width: 46px !important;
    min-width: 46px !important;
    max-width: 46px !important;
    height: 25px !important;
    min-height: 25px !important;
  }
  .card-section-builder .switch-slider {
    width: 46px !important;
    height: 25px !important;
  }
  .card-section-builder .switch-wrap input[type="checkbox"] {
    width: 46px !important;
    height: 25px !important;
  }
  .card-section-builder .switch-slider::before {
    width: 19px !important;
    height: 19px !important;
  }
  .card-section-builder .switch-wrap input:checked + .switch-slider::before {
    transform: translate(21px, -50%) !important;
  }
  .card-section-builder .form-group input[type="text"],
  .card-section-builder .form-group select,
  .card-section-builder .hbs-title,
  .card-section-builder .hbs-subtitle,
  .card-section-builder .hbs-link,
  .card-section-builder .hbs-pageid {
    height: 37px !important;
    padding: 0 0.6rem !important;
    font-size: 0.8rem !important;
  }
}

/* ============ SETTINGS PAGE — MOBILE RESPONSIVE (<640px) ============ */
@media (max-width: 640px) {
  .settings-layout {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
    width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }
  .settings-layout aside,
  .settings-layout .card-panel {
    width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }
  .settings-nav {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.3rem !important;
    padding: 0.35rem !important;
    border-radius: 10px !important;
    overflow-x: visible !important;
  }
  .settings-nav button {
    padding: 0.55rem 0.55rem !important;
    border-radius: 8px !important;
    font-size: 0.8rem !important;
    gap: 0.4rem !important;
    justify-content: flex-start !important;
    align-items: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
    word-break: break-word !important;
    line-height: 1.3 !important;
    min-height: 40px !important;
  }
  .settings-nav button:nth-child(4) {
    grid-column: 1 / -1 !important;
  }
  .settings-nav button span:first-child {
    font-size: 1rem !important;
    flex-shrink: 0 !important;
    width: 22px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .settings-nav button span:last-child {
    font-size: 0.78rem !important;
    line-height: 1.25 !important;
  }
  #settings-panel {
    padding: 0.9rem 0.8rem !important;
    border-radius: 12px !important;
  }
  #settings-panel h2 {
    font-size: 1.02rem !important;
    overflow-wrap: anywhere !important;
    line-height: 1.3 !important;
    margin-bottom: 0.75rem !important;
  }
  #settings-panel h3 {
    font-size: 0.9rem !important;
    overflow-wrap: anywhere !important;
    line-height: 1.3 !important;
    margin-bottom: 0.6rem !important;
  }
  #settings-panel > p {
    font-size: 0.82rem !important;
    line-height: 1.5 !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
  }
  .form-row {
    grid-template-columns: 1fr !important;
    gap: 0.65rem !important;
  }
  .form-group {
    width: 100% !important;
    min-width: 0 !important;
    gap: 0.3rem !important;
  }
  .form-group label {
    font-size: 0.78rem !important;
    line-height: 1.35 !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    white-space: normal !important;
  }
  .form-group input,
  .form-group select,
  .form-group textarea {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    height: 40px !important;
    padding: 0 0.75rem !important;
    font-size: 0.85rem !important;
    overflow-wrap: anywhere !important;
    border-radius: 9px !important;
  }
  .form-group textarea {
    height: auto !important;
    min-height: 90px !important;
    padding: 0.65rem 0.75rem !important;
    line-height: 1.5 !important;
    word-break: break-word !important;
  }
  .form-group input[type="color"] {
    width: 100% !important;
    height: 42px !important;
    padding: 0.3rem 0.45rem !important;
    min-height: 42px !important;
    border-radius: 9px !important;
  }
  #settings-panel div[style*="display:flex"][style*="justify-content:flex-end"] {
    flex-direction: column-reverse !important;
    gap: 0.45rem !important;
    width: 100% !important;
    margin-top: 1.2rem !important;
    flex-wrap: wrap !important;
  }
  #settings-panel div[style*="display:flex"][style*="justify-content:flex-end"] .btn {
    width: 100% !important;
    min-width: 0 !important;
    height: 40px !important;
    font-size: 0.82rem !important;
    justify-content: center !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
    padding: 0 0.9rem !important;
  }
  #settings-panel div[style*="padding:1rem"][style*="border:1px solid rgba(239,68,68"] {
    padding: 0.8rem 0.75rem !important;
    border-radius: 10px !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
  #settings-panel div[style*="padding:1rem"][style*="border:1px solid rgba(239,68,68"] h3 {
    font-size: 0.92rem !important;
    line-height: 1.3 !important;
    margin-bottom: 0.35rem !important;
  }
  #settings-panel div[style*="padding:1rem"][style*="border:1px solid rgba(239,68,68"] p {
    font-size: 0.8rem !important;
    line-height: 1.5 !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
  }
  #settings-panel div[style*="padding:1rem"][style*="border:1px solid rgba(239,68,68"] > div:last-child,
  #settings-panel div[style*="padding:1rem"][style*="border:1px solid rgba(239,68,68"] div[style*="display:flex"][style*="gap:0.5rem"][style*="margin-top:1rem"] {
    flex-direction: column-reverse !important;
    gap: 0.45rem !important;
    margin-top: 0.8rem !important;
  }
  #settings-panel div[style*="padding:1rem"][style*="border:1px solid rgba(239,68,68"] div[style*="display:flex"][style*="gap:0.5rem"][style*="margin-top:1rem"] .btn {
    width: 100% !important;
    min-width: 0 !important;
    height: 40px !important;
    font-size: 0.82rem !important;
    justify-content: center !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
  }
  #settings-panel div[style*="height:1px"][style*="margin:1.5rem 0"] {
    margin: 1rem 0 !important;
  }
}
@media (max-width: 480px) {
  .settings-nav {
    grid-template-columns: 1fr !important;
    gap: 0.25rem !important;
  }
  .settings-nav button:nth-child(4) {
    grid-column: auto !important;
  }
  .settings-nav button {
    min-height: 38px !important;
    padding: 0.5rem 0.6rem !important;
    font-size: 0.82rem !important;
  }
  .settings-nav button span:first-child {
    width: 24px !important;
  }
  #settings-panel {
    padding: 0.85rem 0.7rem !important;
  }
  #settings-panel h2 {
    font-size: 0.98rem !important;
  }
  .form-group input,
  .form-group select {
    height: 38px !important;
    padding: 0 0.65rem !important;
    font-size: 0.82rem !important;
  }
  .form-group input[type="color"] {
    height: 40px !important;
  }
}

/* ============ GLOBAL MEDIA PICKER MODAL (WordPress style modern) ============ */
.media-picker-overlay {
  position: fixed; inset: 0; z-index: 90000;
  background: rgba(5, 2, 20, 0.78);
  backdrop-filter: blur(10px) saturate(140%);
  display: flex; align-items: center; justify-content: center;
  padding: 2.5vh 2vw;
  opacity: 0; pointer-events: none; transition: opacity 0.18s ease;
}
.media-picker-overlay.open { opacity: 1; pointer-events: auto; }
.media-picker-modal {
  background: linear-gradient(180deg, #0f0b2e 0%, #151138 100%);
  border: 1px solid rgba(168,85,247,0.22);
  border-radius: 18px;
  width: 100%; max-width: 1200px;
  max-height: 92vh; min-height: 640px;
  display: flex; flex-direction: column;
  box-shadow: 0 40px 120px rgba(110, 70, 220, 0.35), 0 0 0 1px rgba(255,255,255,0.04) inset;
  overflow: hidden;
  transform: translateY(16px) scale(0.985);
  transition: transform 0.22s cubic-bezier(.2,.9,.3,1);
}
.media-picker-overlay.open .media-picker-modal { transform: translateY(0) scale(1); }

.mpm-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.85rem 1.2rem;
  border-bottom: 1px solid rgba(168,85,247,0.15);
  background: linear-gradient(90deg, rgba(124,92,255,0.07), transparent);
}
.mpm-title { font-weight: 800; font-size: 1.05rem; color: var(--text-strong); letter-spacing: -0.01em; display: flex; align-items: center; gap: 0.5rem; }
.mpm-close {
  width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.03);
  color: var(--text-muted);
  font-size: 1.45rem; font-weight: 700; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.15s;
}
.mpm-close:hover { background: rgba(239,68,68,0.15); color: #fecaca; border-color: rgba(239,68,68,0.35); transform: scale(1.05); }

.mpm-tabs {
  display: flex; align-items: center; gap: 0.25rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid rgba(168,85,247,0.1);
}
.mpm-tab {
  padding: 0.48rem 0.9rem;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-weight: 600; font-size: 0.82rem;
  border-radius: 9px; cursor: pointer;
  transition: all 0.15s;
}
.mpm-tab:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.mpm-tab.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(124,92,255,0.26), rgba(236,72,153,0.2));
  border-color: rgba(168,85,247,0.38);
  box-shadow: 0 0 0 1px rgba(168,85,247,0.2) inset, 0 4px 16px rgba(124,92,255,0.18);
}
.mpm-search {
  position: relative;
  min-width: 280px; max-width: 40%;
  display: flex; align-items: center;
}
.mpm-search input {
  width: 100%;
  height: 38px;
  padding: 0 0.9rem 0 2.25rem;
  background: rgba(255,255,255,0.035);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px; font-size: 0.8rem;
  outline: none; transition: border-color 0.15s, background 0.15s;
}
.mpm-search input:focus { border-color: rgba(168,85,247,0.5); background: rgba(255,255,255,0.05); }
.mpm-search-icon {
  position: absolute; left: 0.72rem; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); opacity: 0.75;
  display: flex; align-items: center;
}
.mpm-search-icon svg, .mpm-search-icon img { width: 15px; height: 15px; }

.mpm-body { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
.mpm-panel { flex: 1; overflow: hidden; }

/* ----- UPLOAD TAB ----- */
.mpm-upload {
  display: flex; flex-direction: column;
  padding: 1.2rem 1.4rem;
}
.mpm-dropzone {
  cursor: pointer;
  border: 2.5px dashed rgba(168,85,247,0.32);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  min-height: 240px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.55rem;
  background: radial-gradient(ellipse at top, rgba(124,92,255,0.07), transparent 65%);
  transition: all 0.18s;
}
.mpm-dropzone:hover { border-color: rgba(168,85,247,0.5); background: radial-gradient(ellipse at top, rgba(124,92,255,0.11), transparent 68%); }
.mpm-dropzone.over {
  border-color: #a855f7;
  background: radial-gradient(ellipse at top, rgba(236,72,153,0.14), rgba(124,92,255,0.12));
  transform: scale(1.002);
  box-shadow: 0 0 0 1px rgba(168,85,247,0.25) inset;
}
.mpm-dz-ic { font-size: 3.5rem; line-height: 1; filter: drop-shadow(0 6px 20px rgba(124,92,255,0.35)); animation: mpmFloat 3.2s ease-in-out infinite; }
@keyframes mpmFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.mpm-dz-t1 { font-weight: 700; font-size: 1rem; color: var(--text-strong); }
.mpm-dz-t2 { color: var(--text-muted); font-size: 0.78rem; text-align: center; max-width: 500px; }

.mpm-qrow {
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  padding: 0.5rem 0.75rem; border-radius: 10px;
  font-size: 0.78rem;
}
.mpm-qname { font-weight: 600; color: var(--text); max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mpm-qstatus { display: flex; align-items: center; gap: 0.4rem; color: var(--text-muted); }
.mpm-qstatus[data-st="running"] { color: #fde68a; }
.mpm-qstatus[data-st="done"] { color: #86efac; }
.mpm-qstatus[data-st="err"] { color: #fecaca; }
.mpm-qstatus .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0.9; }
.mpm-qstatus[data-st="running"] .dot { animation: mpmBlink 0.8s infinite; }
@keyframes mpmBlink { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ----- LIBRARY TAB (2-column: grid + meta) ----- */
.mpm-library {
  display: grid;
  grid-template-columns: 1fr 380px;
  height: 100%;
  overflow: hidden;
}
.mpm-grid {
  overflow-y: auto;
  padding: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  grid-auto-rows: 140px;
  gap: 0.75rem;
  scrollbar-width: thin;
}
.mpm-grid::-webkit-scrollbar { width: 8px; }
.mpm-grid::-webkit-scrollbar-thumb { background: rgba(168,85,247,0.25); border-radius: 10px; }
.mpm-grid::-webkit-scrollbar-track { background: transparent; }

.mpm-thumb {
  position: relative;
  border-radius: 11px;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.06);
  background: #1a1540;
  cursor: pointer;
  transition: all 0.17s cubic-bezier(.2,.9,.3,1);
}
.mpm-thumb:hover { border-color: rgba(168,85,247,0.45); transform: translateY(-2px); box-shadow: 0 8px 26px rgba(124,92,255,0.25); }
.mpm-thumb.selected {
  border-color: #a855f7;
  box-shadow: 0 0 0 3px rgba(168,85,247,0.25), 0 10px 30px rgba(168,85,247,0.35);
  transform: translateY(-1px) scale(1.01);
}
.mpm-thumb-img {
  position: absolute; inset: 0;
  background: center / cover no-repeat;
}
.mpm-thumb-badge {
  position: absolute; top: 0.4rem; left: 0.4rem;
  background: rgba(5,2,20,0.7);
  backdrop-filter: blur(3px);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 0.13rem 0.45rem; border-radius: 6px;
  font-size: 0.6rem; font-weight: 700; color: #e9d5ff;
  letter-spacing: 0.04em;
}
.mpm-thumb-opt {
  position: absolute; top: 0.4rem; right: 0.4rem;
  width: 24px; height: 24px;
  background: rgba(16,185,129,0.22);
  backdrop-filter: blur(3px);
  border: 1px solid rgba(16,185,129,0.4);
  color: #6ee7b7;
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem;
}
.mpm-thumb-check {
  position: absolute; top: 0.4rem; right: 0.4rem;
  width: 26px; height: 26px;
  background: linear-gradient(135deg, #7c5cff, #ec4899);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 0.82rem;
  box-shadow: 0 3px 12px rgba(236,72,153,0.55);
  z-index: 2;
}
.mpm-thumb.selected .mpm-thumb-opt { display: none; }
.mpm-thumb-foot {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 0.35rem 0.5rem;
  background: linear-gradient(180deg, transparent, rgba(5,2,20,0.88));
  display: flex; justify-content: space-between;
  color: rgba(255,255,255,0.85);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* META PANEL */
.mpm-meta {
  overflow-y: auto;
  border-left: 1px solid rgba(168,85,247,0.12);
  background: linear-gradient(180deg, rgba(168,85,247,0.035), transparent 40%);
  padding: 1rem 1.05rem;
  display: flex; flex-direction: column; gap: 0.8rem;
  scrollbar-width: thin;
}
.mpm-meta::-webkit-scrollbar { width: 6px; }
.mpm-meta::-webkit-scrollbar-thumb { background: rgba(168,85,247,0.25); border-radius: 10px; }
.mpm-meta-empty {
  height: 100%; min-height: 260px;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  color: var(--text-muted); font-size: 0.82rem; line-height: 1.7;
}
.mpm-preview-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  background: #1a1540 center / contain no-repeat;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03);
  min-height: 150px;
}
.mpm-meta-fields { display: flex; flex-direction: column; gap: 0.55rem; }
.mpm-meta-row { display: flex; flex-direction: column; gap: 0.25rem; }
.mpm-meta-row > label {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-muted);
  padding-left: 0.05rem;
}
.mpm-meta-row input, .mpm-meta-row textarea {
  width: 100%;
  background: rgba(255,255,255,0.035);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 9px;
  padding: 0.45rem 0.6rem;
  font-size: 0.78rem;
  line-height: 1.4;
  outline: none;
  resize: vertical;
  transition: border-color 0.15s, background 0.15s;
  font-family: inherit;
}
.mpm-meta-row input:focus, .mpm-meta-row textarea:focus { border-color: rgba(168,85,247,0.5); background: rgba(255,255,255,0.05); }
.mpm-meta-row textarea { min-height: 42px; }

.mpm-meta-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.4rem;
  margin-top: 0.15rem;
}
.mpm-meta-stats > div {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 9px;
  padding: 0.45rem 0.5rem;
  text-align: center;
}
.mpm-meta-stats span {
  display: block;
  font-weight: 800;
  font-size: 0.8rem;
  color: var(--text-strong);
}
.mpm-meta-stats em {
  display: block;
  font-style: normal;
  font-size: 0.62rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 0.05rem;
}
.mpm-meta-stats .opt span { color: #86efac; }

/* FOOTER */
.mpm-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 1.2rem;
  border-top: 1px solid rgba(168,85,247,0.12);
  background: rgba(5,2,20,0.45);
}
.mpm-selection {
  font-size: 0.8rem; color: var(--text-muted);
  max-width: 55%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mpm-selection strong { color: var(--text-strong); }

@media (max-width: 980px) {
  .mpm-library { grid-template-columns: 1fr; }
  .mpm-meta { border-left: none; border-top: 1px solid rgba(168,85,247,0.12); max-height: 50vh; }
  .mpm-search { min-width: 180px; }
  .media-picker-modal { min-height: 540px; }
}
@media (max-width: 620px) {
  .mpm-tabs { flex-wrap: wrap; gap: 0.5rem; }
  .mpm-search { min-width: 100%; max-width: 100%; order: 3; }
  .mpm-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); grid-auto-rows: 110px; padding: 0.7rem; gap: 0.55rem; }
  .mpm-header { padding: 0.7rem 0.9rem; }
  .mpm-footer { padding: 0.65rem 0.8rem; gap: 0.5rem; }
  .mpm-selection { max-width: 45%; font-size: 0.72rem; }
  .mpm-dz-ic { font-size: 2.7rem; }
  .mpm-dropzone { padding: 1.5rem 1rem; min-height: 200px; }
}

/* ============ MEDIA LIBRARY TOOLBAR + BULK ACTIONS (WordPress-Style) ============ */
.media-toolbar-top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  padding: 0.3rem 0 0.9rem 0;
}
.media-toolbar-top .crud-search { flex: 1 1 260px; }
.media-filter-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.media-filter-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}
.media-filter-dropdown {
  height: 38px;
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border-default);
  border-radius: 9px;
  padding: 0 0.85rem;
  font-size: 0.84rem;
  font-weight: 600;
  min-width: 160px;
  cursor: pointer;
  transition: all .15s ease;
}
.media-filter-dropdown:hover { border-color: rgba(139, 92, 246, 0.5); }
.media-filter-dropdown:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

/* Bulk Select Toolbar */
.media-bulk-bar {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0.95rem;
  background: linear-gradient(135deg, rgba(139,92,246,0.10), rgba(236,72,153,0.08));
  border: 1px solid rgba(139,92,246,0.18);
  border-radius: 11px;
  margin-bottom: 0.85rem;
}
.media-bulk-bar label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-strong);
  font-weight: 600;
  cursor: pointer;
}
.media-bulk-bar label input[type="checkbox"] {
  width: 17px; height: 17px;
  accent-color: var(--accent-primary);
  cursor: pointer;
}
.media-bulk-count {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--accent-primary);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  min-width: 26px;
  justify-content: center;
}
.media-bulk-actions {
  margin-left: auto;
  display: flex;
  gap: 0.5rem;
}

/* Media Cards Selectable */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.75rem;
}
.media-card {
  position: relative;
  background: var(--bg-card);
  border: 1.5px solid var(--border-default);
  border-radius: 12px;
  overflow: hidden;
  transition: all .18s ease;
  cursor: pointer;
  user-select: none;
}
.media-card:hover {
  border-color: rgba(139, 92, 246, 0.45);
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(99, 102, 241, 0.12);
}
.media-card.selected {
  /* 🔵 BACKGROUND BIRU TUA TRANSPARAN LEMBUT (14-18% alpha = nama file tetap KONTRAS terbaca jelas, BEDA TOTAL dengan card biasa gelap) */
  background: rgba(29, 78, 216, 0.12) linear-gradient(180deg, rgba(37, 99, 235, 0.15) 0%, rgba(29, 78, 216, 0.20) 100%);
  /* 🔵 BORDER SOLID BIRU 2.5px + OUTER GLOW 4px RING BIRU (dari jauh pun kelihatan selected) */
  border: 2.5px solid #2563eb;
  box-shadow:
    0 0 0 4px rgba(37, 99, 235, 0.22),  /* glow luar ring biru lebar */
    0 12px 28px rgba(37, 99, 235, 0.22); /* shadow biru bawah kedalaman */
  transform: translateY(-1.8px) scale(1.01); /* sedikit membesar = selected lebih "menonjol" */
  /* 🔵 TEXT NAME META LEBIH KONTRAS PUTIH BIRU: pastikan nama file terbaca di atas background biru */
}
/* 🔵 NAMA FILE = PUTIH TEBAL TIDAK TRANSPARAN saat selected */
.media-card.selected .media-card-name {
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(15, 23, 42, 0.6);
}
/* 🔵 META FILE (size/date) = biru muda terang, TIDAK redup muted seperti card biasa */
.media-card.selected .media-card-meta {
  color: #bfdbfe;
}
/* 🔵 BUTTON ACTIONS (View/URL) = border dan text sedikit putih biru menyesuaikan state selected */
.media-card.selected .media-card-actions > button,
.media-card.selected .media-card-actions > a {
  border-color: rgba(59, 130, 246, 0.55);
  color: #e0f2fe;
}
.media-card.selected::after {
  content: '✓';
  position: absolute;
  top: 8px; right: 8px;
  /* ✅ SIZE SEDIKIT LEBIH BESAR (26px vs 23px) = check lebih gampang dilihat */
  width: 26px; height: 26px;
  /* 🔵 CHECKLIST ICON = GRADIENT BIRU BUKAN UNGU (beda dengan hover theme!) */
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.88rem;  /* font check lebih tebal */
  font-weight: 950;
  z-index: 5;
  box-shadow:
    0 0 0 2px rgba(255,255,255, 0.6),  /* 🔵 RING PUTIH luar checklist = kontras TIDAK tertelan thumbnail background */
    0 4px 12px rgba(29, 78, 216, 0.55);
}
.media-card-checkbox {
  position: absolute;
  top: 8px; left: 8px;
  z-index: 6;
  width: 18px; height: 18px;
  accent-color: var(--accent-primary);
  cursor: pointer;
}
.media-thumb-wrap {
  position: relative;
  aspect-ratio: 16/10;
  background: var(--bg-secondary);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
.media-thumb-icon {
  font-size: 2.4rem;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,.25));
}
.media-type-badge {
  position: absolute;
  bottom: 6px; left: 6px;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  z-index: 3;
  backdrop-filter: blur(6px);
}
.media-type-badge.images { background: rgba(34, 197, 94, 0.85); color: white; }
.media-type-badge.audio { background: rgba(249, 115, 22, 0.85); color: white; }
.media-type-badge.video { background: rgba(239, 68, 68, 0.85); color: white; }
.media-type-badge.documents { background: rgba(59, 130, 246, 0.85); color: white; }
.media-type-badge.other { background: rgba(107, 114, 128, 0.85); color: white; }
.media-optim-badge {
  position: absolute;
  top: 6px; right: 6px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.92), rgba(6, 182, 212, 0.92));
  color: white;
  padding: 0.14rem 0.42rem;
  border-radius: 6px;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  z-index: 3;
}
.media-used-by {
  position: absolute;
  top: 6px;
  left: 34px;
  background: rgba(234, 179, 8, 0.92);
  color: #3b2a00;
  padding: 0.12rem 0.42rem;
  border-radius: 6px;
  font-size: 0.62rem;
  font-weight: 800;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}
.media-card-body {
  padding: 0.55rem 0.7rem;
}
.media-card-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.media-card-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  margin-top: 0.2rem;
}
.media-card-actions {
  display: flex;
  gap: 0.3rem;
  margin-top: 0.45rem;
}
.media-card.selected img, .media-card.selected .media-thumb-wrap {
  /* 🔵 GAMBAR TIDAK REDUP (bukan brightness(0.92)!) → malah DITINGKATKAN saturasi & kontras biar jelas */
  filter: saturate(1.18) contrast(1.06);
  /* 🔵 OUTLINE BIRU 2px DIDALAM THUMBNAIL (offset -3px = TIDAK tertutup badges Images/Optimize/UsedBy) */
  outline: 2.5px solid rgba(37, 99, 235, 0.82);
  outline-offset: -3px;
  border-radius: 0; /* rapikan outline sudut dalam dengan 0 (sudut card luar sudah rounded 12px) */
}
.media-used-list {
  margin-top: 0.4rem;
  padding-top: 0.4rem;
  border-top: 1px dashed var(--border-default);
  font-size: 0.66rem;
  color: var(--text-muted);
  max-height: 72px;
  overflow-y: auto;
}
.media-used-list div {
  padding: 2px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 580px) {
  .media-toolbar-top { flex-direction: column; align-items: stretch; }
  .media-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.6rem; }
  .media-bulk-bar { flex-wrap: wrap; }
  .media-bulk-actions { margin-left: 0; width: 100%; }
}

/* ============ SMALL MOBILE (≤ 380px) ============ */
@media (max-width: 380px) {
  .admin-content { padding: 0.65rem; }
  .admin-topbar { position: sticky !important; top: 0 !important; padding: 0.5rem 0.7rem !important; gap: 0.45rem !important; }
  .page-head .page-title { font-size: 1.15rem; }
  .card-panel { padding: 0.75rem; border-radius: 12px; }
  .data-table { min-width: 640px; }
  .tab-pill { padding: 0.4rem 0.6rem; font-size: 0.78rem; }
  .btn { min-height: 38px; padding: 0.45rem 0.8rem !important; font-size: 0.82rem !important; }
  .toast-wrap { right: 0.4rem; left: 0.4rem; bottom: 0.4rem; }
  .admin-sidebar { width: 260px; }
  .sb-menu a, .sb-menu button { padding: 0.5rem 0.65rem; font-size: 0.84rem; }
  .sb-footer { padding: 0.85rem 0.95rem 0.65rem 0.95rem; }
  .sb-brand { padding: 0.3rem 0.95rem 0.85rem 0.95rem; }
}

/* ============ LARGE SCREEN (≥ 1440px) ============ */
@media (min-width: 1440px) {
  .admin-app { grid-template-columns: 280px minmax(0, 1fr); }
  .admin-topbar { padding: 0.85rem 2rem; }
  .admin-content { padding: 2rem; max-width: 1800px; margin: 0 auto; width: 100%; }
  .page-head .page-title { font-size: 1.85rem; }
  .stats-grid-4 { gap: 1.25rem; }
  .editor-layout { grid-template-columns: minmax(0, 2fr) 340px; gap: 1.75rem; }
  .settings-layout { grid-template-columns: 280px minmax(0, 1fr); gap: 1.75rem; }
  .grid-main-side { gap: 1.75rem; }
  .card-panel { padding: 1.5rem; border-radius: 18px; }
  .rich-editor { min-height: 320px; font-size: 0.95rem; line-height: 1.7; }
  .rich-editor-toolbar { padding: 0.55rem 0.75rem; }
  .sidebar-toggle { display: none !important; }
}

/* ============ LANDSCAPE MOBILE FIX ============ */
@media (max-height: 500px) and (orientation: landscape) {
  .admin-sidebar { height: 100vh; padding: 0.6rem 0; }
  .sb-brand { padding: 0.25rem 1rem 0.6rem 1rem; margin-bottom: 0.4rem; }
  .sb-footer { margin-top: 0.75rem; padding: 0.65rem 1rem 0.5rem 1rem; }
  .sb-section-title { padding: 0.5rem 1rem 0.15rem 1rem; }
}

/* ============ ANIMATIONS ============ */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

.hidden { display: none !important; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* ============ WP-MODERN ROW ACTIONS + PAGINATION ============ */
.row-actions-inline {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.45rem;
  font-size: 0.76rem;
}

/* ============ WP-MODERN POST ATTRIBUTES WIDGET (Post/Page Editor Sidebar) ============ */
.wp-post-attrs {
  border: 1px solid transparent;
  background: linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
              linear-gradient(135deg, rgba(124,92,255,0.35), rgba(255,77,157,0.25)) border-box;
  border-radius: 14px;
  padding: 0 !important;
  overflow: hidden;
  box-shadow: 0 6px 18px -8px rgba(124,92,255,0.35);
  transition: box-shadow .2s ease, transform .2s ease;
}
.wp-post-attrs:hover {
  box-shadow: 0 10px 26px -10px rgba(124,92,255,0.55);
}

.wpa-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  cursor: pointer;
  user-select: none;
  background: linear-gradient(135deg, rgba(124,92,255,0.08) 0%, rgba(255,77,157,0.06) 100%);
  border-bottom: 1px solid var(--border-subtle);
  transition: background .18s ease;
}
.wpa-header:hover {
  background: linear-gradient(135deg, rgba(124,92,255,0.14) 0%, rgba(255,77,157,0.10) 100%);
}
.wpa-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}
.wpa-icon {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  background: linear-gradient(135deg, #7c5cff2e, #ff4d9d24);
  border: 1px solid rgba(124,92,255,0.25);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.wpa-titles { display: flex; flex-direction: column; gap: 0.08rem; min-width: 0; }
.wpa-name {
  font-size: 0.88rem;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.2;
}
.wpa-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.3;
}
.wpa-actions { display: inline-flex; align-items: center; gap: 0.15rem; }
.wpa-chev {
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-elev-1);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .18s ease;
}
.wpa-chev:hover {
  color: var(--text);
  background: rgba(124,92,255,0.12);
  border-color: rgba(124,92,255,0.35);
}
.wpa-chev svg {
  transition: transform .24s ease;
}
.wp-post-attrs.is-collapsed .wpa-chev svg { transform: rotate(180deg); }

.wp-post-attrs,
.editor-group.wp-post-attrs {
  overflow: visible !important;
  height: auto !important;
  min-height: min-content !important;
  max-height: 99999px !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}
.editor-group.wp-post-attrs.is-collapsed {
  min-height: min-content !important;
  max-height: 99999px !important;
}
.wpa-body {
  overflow: visible !important;
  height: auto !important;
  max-height: 9999px !important;
  padding: 0 1rem 1rem 1rem;
  transition: all .24s ease;
}
.wp-post-attrs.is-collapsed .wpa-body {
  height: 0 !important;
  max-height: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  overflow: hidden !important;
  opacity: 0;
}

@media (min-width: 641px) {
  .editor-group.wp-post-attrs,
  .editor-group.wp-post-attrs.is-expanded,
  #pe-attrs, #pa-attrs, #pge-attrs, [id$="-attrs"].wp-post-attrs {
    overflow: visible !important;
    height: auto !important;
    min-height: min-content !important;
    max-height: 99999px !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    border: 2px solid rgba(168, 85, 247, 0.35) !important;
    border-radius: 16px !important;
    margin: 1rem 0 !important;
  }
  .wp-post-attrs .wpa-body {
    overflow: visible !important;
    height: auto !important;
    max-height: 9999px !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    padding: 0 1rem 1rem 1rem !important;
  }
  .wp-post-attrs.is-collapsed .wpa-body {
    height: 0 !important;
    max-height: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
  }
}

.wpa-field {
  padding: 0.95rem 1rem 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.wpa-field--first { padding-top: 1rem; }
.wpa-field:last-of-type { padding-bottom: 0.85rem; }
.wpa-field--parent { border-top: 1px dashed var(--border-subtle); margin-top: 0.25rem; padding-top: 0.95rem; }

.wpa-label {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  cursor: default;
}
.wpa-label-icon {
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  background: var(--bg-elev-1);
  border: 1px solid var(--border-subtle);
  margin-top: 1px;
}
.wpa-label strong {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.08rem;
  line-height: 1.25;
}
.wpa-hint {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 400;
  line-height: 1.4;
}

.wpa-select,
.wpa-input {
  height: 38px;
  padding: 0 0.75rem;
  border-radius: 9px;
  background: var(--bg-elev-1);
  border: 1.5px solid var(--border-subtle);
  color: var(--text);
  font-size: 0.83rem;
  font-weight: 500;
  width: 100%;
  box-sizing: border-box;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
  outline: none;
  font-family: inherit;
}
.wpa-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 14px;
  padding-right: 2.1rem;
}
.wpa-select:hover,
.wpa-input:hover {
  border-color: rgba(124,92,255,0.45);
  background: var(--bg-card);
}
.wpa-select:focus,
.wpa-input:focus {
  border-color: transparent;
  background: var(--bg-card);
  box-shadow: 0 0 0 2px #7c5cff4d, 0 0 0 3.5px #ff4d9d2e;
}
.wpa-input[type="number"] {
  -moz-appearance: textfield;
}
.wpa-input::-webkit-outer-spin-button,
.wpa-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.wpa-num-wrap {
  display: inline-flex;
  align-items: stretch;
  gap: 0;
  border-radius: 10px;
  background: var(--bg-elev-1);
  border: 1.5px solid var(--border-subtle);
  overflow: hidden;
  width: 100%;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.wpa-num-wrap:focus-within {
  border-color: transparent;
  background: var(--bg-card);
  box-shadow: 0 0 0 2px #7c5cff4d, 0 0 0 3.5px #ff4d9d2e;
}
.wpa-num-btn {
  width: 40px;
  min-width: 40px;
  height: 38px;
  border: none;
  background: linear-gradient(135deg, rgba(124,92,255,0.06), rgba(255,77,157,0.04));
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .16s ease, color .16s ease;
  user-select: none;
}
.wpa-num-btn:hover {
  background: linear-gradient(135deg, rgba(124,92,255,0.20), rgba(255,77,157,0.14));
  color: var(--text);
}
.wpa-num-btn:active { transform: scale(0.95); }
.wpa-num-minus { border-right: 1px solid var(--border-subtle); }
.wpa-num-plus { border-left: 1px solid var(--border-subtle); }
.wpa-num-wrap .wpa-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  height: 38px;
  text-align: center;
  border-radius: 0;
}
.wpa-num-wrap .wpa-input:focus {
  box-shadow: none;
  background: transparent;
}

.wpa-preview {
  margin: 0 1rem 1rem 1rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(124,92,255,0.08), rgba(255,77,157,0.05));
  border: 1px solid rgba(124,92,255,0.20);
  padding: 0.75rem 0.85rem;
}
.wpa-preview-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.55rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.wpa-preview-label span { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--text-muted); font-size: 0.74rem; }
.wpa-preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem 0.75rem;
}
.wpa-preview-item {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}
.wpa-pv--full { grid-column: 1 / -1; }
.wpa-pv-k {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.wpa-pv-v {
  font-size: 0.8rem;
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

@media (max-width: 640px) {
  .wp-post-attrs {
    border-radius: 12px;
  }
  .wpa-header { padding: 0.75rem 0.8rem; gap: 0.5rem; }
  .wpa-icon { width: 32px; height: 32px; min-width: 32px; font-size: 1rem; }
  .wpa-name { font-size: 0.85rem; }
  .wpa-sub { font-size: 0.7rem; }
  .wpa-field { padding: 0.85rem 0.8rem 0 0.8rem; }
  .wpa-field--first { padding-top: 0.85rem; }
  .wpa-field:last-of-type { padding-bottom: 0.75rem; }
  .wpa-preview { margin: 0 0.8rem 0.8rem 0.8rem; border-radius: 10px; padding: 0.65rem 0.7rem; }
  .wpa-preview-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   🗑 SLOTS — TRASH SYSTEM UI STYLING (GLOBAL: DESKTOP + MOBILE)
   ============================================================ */

/* Tab Trash: text merah muda normal, active gradien merah pink */
.slots-page .tab-pill.tab-trash { color: #fda4af !important; }
.slots-page .tab-pill.tab-trash.active {
  background: linear-gradient(135deg, #ef4444 0%, #ec4899 100%) !important;
  color: #fff !important;
  border-color: rgba(236, 72, 153, 0.5) !important;
  box-shadow: 0 6px 16px rgba(236, 72, 153, 0.25) !important;
}

/* Slot TRASH ROW visual: sedikit redup, thumbnail agak grayscale agar beda jelas dengan slot NORMAL */
.slots-page .data-table tbody tr.sl-trash-row { opacity: 0.88; }
.slots-page .data-table tbody tr.sl-trash-row .thumb-sm,
.slots-page .data-table tbody tr.sl-trash-row td[data-label="Slot"] .thumb-sm {
  filter: grayscale(0.22) saturate(0.85) !important;
  -webkit-filter: grayscale(0.22) saturate(0.85) !important;
  opacity: 0.9;
}
.slots-page .data-table tbody tr.sl-trash-row:hover {
  opacity: 1 !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
}
.slots-page .data-table tbody tr.sl-trash-row .ct {
  text-decoration: line-through dotted rgba(239, 68, 68, 0.45);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

/* Trash ACTION BUTTONS: Restore HIJAU, Delete Permanen MERAH SOLID! */
.slots-page .row-actions-trash .icon-btn-sm.restore {
  background: rgba(16, 185, 129, 0.10) !important;
  color: #10b981 !important;
  border: 1.5px solid rgba(16, 185, 129, 0.45) !important;
  width: 38px;
  height: 38px;
  font-size: 1.1rem;
  font-weight: 800;
  transition: all .18s ease;
}
.slots-page .row-actions-trash .icon-btn-sm.restore:hover {
  background: #10b981 !important;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(16,185,129,0.28);
}
.slots-page .row-actions-trash .icon-btn-sm.del {
  background: rgba(239, 68, 68, 0.14) !important;
  color: #dc2626 !important;
  border: 1.5px solid rgba(239, 68, 68, 0.55) !important;
  width: 38px;
  height: 38px;
  font-size: 1rem;
}
.slots-page .row-actions-trash .icon-btn-sm.del:hover {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(220, 38, 38, 0.30);
}

/* Trash-soft NORMAL (button pindah ke trash di list NORMAL) — GOLD / KUNING */
.slots-page .icon-btn-sm.trash-soft {
  background: rgba(245, 158, 11, 0.12) !important;
  color: #d97706 !important;
  border: 1.5px solid rgba(245, 158, 11, 0.55) !important;
  transition: all .18s ease;
}
.slots-page .icon-btn-sm.trash-soft:hover {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(217, 119, 6, 0.28);
}

/* Danger Outline Button: "Empty All Trash" topbar */
.slots-page .btn.btn-danger-outline {
  background: rgba(239, 68, 68, 0.10) !important;
  color: #dc2626 !important;
  border: 1.5px solid rgba(239, 68, 68, 0.55) !important;
  border-radius: 12px;
  padding: 0.68rem 1.1rem;
  font-weight: 700;
  transition: all .18s ease;
}
.slots-page .btn.btn-danger-outline:hover {
  background: linear-gradient(135deg, #ef4444, #b91c1c) !important;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(220, 38, 38, 0.30);
}

/* ============================================================
   🎯 SLOT EDITOR — Display Rules Multi Select Alignment
   ============================================================ */
.se-disp-list .se-disp-item {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;          /* ✅ NAIKAN & RATA TENGAH vertikal checkbox sama text! */
  justify-content: flex-start !important;  /* ✅ RATA KIRI TOTAL! */
  text-align: left !important;             /* ✅ RATA KIRI text! */
  gap: 0.65rem !important;                 /* ⬆️ gap checkbox ke text: 0.5 → 0.65 (legible) */
  padding: 0.55rem 0.7rem !important;      /* ⬆️ padding 0.35 → 0.55 (click area luas) */
  border-radius: 10px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  min-height: 44px !important;             /* ✅ MIN HEIGHT! walau label pendek = tetap rapi */
}
.se-disp-list .se-disp-item input[type=checkbox] {
  margin: 0 !important;                    /* ✅ hapus margin-top acak (biar TENGAH vertikal) */
  flex-shrink: 0 !important;
  width: 18px !important;                  /* ⬆️ checkbox 16 → 18px (mudah click) */
  height: 18px !important;
  cursor: pointer;
  order: 1 !important;
  accent-color: #7c5cff !important;
}
.se-disp-list .se-disp-item span {
  flex: 1 1 auto !important;
  display: block !important;
  order: 2 !important;
  white-space: normal !important;
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
  line-height: 1.5 !important;
  text-align: left !important;              /* ✅ RATA KIRI text */
  padding-right: 0.4rem;
  font-size: 0.88rem !important;
  color: var(--text-primary, #e5e7eb) !important;
  font-weight: 500 !important;
}
/* ============================================================
   🎯 SLOT EDITOR / MENU EDITOR — Inner Tabs RATA KIRI BUKAN TENGAH!
   Sebelumnya flex:1 = tabs MELEBAR RATA TENGAH (Most Recent / View All / Search)
   sekarang RATA KIRI seperti SPINDEX native UI.
   ============================================================ */
.inner-tabs {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;   /* ✅ RATA KIRI BUKAN SPACE-AROUND! */
  flex-wrap: wrap !important;
  gap: 0.55rem !important;                  /* ⬆️ jarak antar tab 0.4 → 0.55 */
  margin-bottom: 0.75rem;
  padding: 0.4rem 0.45rem !important;
  border-radius: 11px !important;
  background: rgba(15,23,42,0.4) !important;
  border: 1px solid rgba(148,163,184,0.12) !important;
}
.inner-tabs .inner-tab {
  flex: 0 0 auto !important;                /* ✅ TIDAK MELEBAR! (sebelumnya flex:1 lebar sama semua tengah) */
  min-width: 108px !important;
  text-align: left !important;              /* ✅ text RATA KIRI dalam tombol */
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;   /* ✅ RATA KIRI content dalam tombol */
  gap: 0.45rem !important;
  padding: 0.55rem 0.95rem !important;      /* ⬆️ padding 0.45 → 0.55 click nyaman */
  border-radius: 9px !important;
  border: 1px solid transparent !important;
  background: transparent;
  color: var(--text-muted, #9ca3af);
  font-weight: 700;
  font-size: 0.82rem !important;
  cursor: pointer;
  transition: all .15s ease;
  white-space: nowrap;
  line-height: 1.15;
}
.inner-tabs .inner-tab.active {
  background: linear-gradient(135deg, #7c5cff, #ff4d9d) !important;
  color: #ffffff !important;
  border-color: rgba(124,92,255,0.35) !important;
  box-shadow: 0 4px 14px -8px rgba(236,72,153,0.55) !important;
}
/* ============================================================
   🎯 MENU ADD PANEL — checkbox LIST RATA KIRI TIDAK TENGAH!
   Class: .add-checkbox, .add-list-pages / .add-list-posts / .add-list-categories
   Sebelumnya label item posisi tengah-tengah sendiri (terpotong).
   ============================================================ */
.add-list-pages, .add-list-posts, .add-list-categories {
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 0.1rem !important;
  padding-right: 0.3rem;
}
.add-checkbox {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;            /* ✅ checkbox = vertikal TENGAH sama text */
  justify-content: flex-start !important;   /* ✅ RATA KIRI TOTAL! */
  text-align: left !important;
  gap: 0.65rem !important;
  padding: 0.6rem 0.8rem !important;        /* ⬆️ padding click area besar */
  border-radius: 10px !important;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
  border: 1px solid transparent !important;
  width: 100% !important;
  box-sizing: border-box !important;
  min-height: 44px !important;
}
.add-checkbox:hover {
  background: rgba(124, 92, 255, 0.07) !important;
  border-color: rgba(124,92,255,0.18) !important;
}
.add-checkbox:has(input:checked) {
  background: rgba(124, 92, 255, 0.12) !important;
  border-color: rgba(124,92,255,0.3) !important;
}
.add-checkbox input[type=checkbox] {
  margin: 0 !important;
  flex-shrink: 0 !important;
  width: 18px !important;
  height: 18px !important;
  accent-color: #7c5cff;
  cursor: pointer;
  order: 1 !important;
}
.add-checkbox span {
  flex: 1 1 auto !important;
  order: 2 !important;
  display: block !important;
  white-space: normal !important;
  word-break: break-word !important;
  line-height: 1.5 !important;
  text-align: left !important;              /* ✅ RATA KIRI text label (TIDAK TENGAH LAGI!) */
  font-size: 0.88rem !important;
  color: var(--text-primary, #e5e7eb) !important;
  font-weight: 500 !important;
  padding-right: 0.3rem;
}
/* Search bar ADD PANEL & SE-DISP: RATA KIRI placeholder text + input text */
.add-menu-items-panel .field-input,
[id^=se-disp-pages-search], [id^=se-disp-posts-search],
[id^=se-disp-categories-search] {
  text-align: left !important;
  direction: ltr !important;
  padding-left: 2.4rem !important;
  background-repeat: no-repeat !important;
  background-position: 0.85rem center !important;
}
.add-menu-items-panel .field-input::placeholder,
[id^=se-disp-pages-search]::placeholder,
[id^=se-disp-posts-search]::placeholder,
[id^=se-disp-categories-search]::placeholder {
  text-align: left !important;
  color: var(--text-muted, #9ca3af) !important;
  opacity: 0.9;
}
.se-disp-list .se-disp-item:hover {
  background: rgba(124, 92, 255, 0.07) !important;
}
.se-disp-list .se-disp-item:has(input[type=checkbox]:checked) {
  background: rgba(124, 92, 255, 0.11) !important;
}
[id^=se-disp-pages-search], [id^=se-disp-posts-search] {
  background-image: linear-gradient(transparent, transparent), url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'></circle><line x1='21' y1='21' x2='16.65' y2='16.65'></line></svg>") !important;
  background-repeat: no-repeat !important;
  background-position: 0.85rem center !important;
  padding-left: 2.35rem !important;
  text-align: left !important;
}
.editor-group input[type=checkbox], .editor-group label {
  text-align: left !important;
}

/* ============================================================
   📦 SLOTS — BULK ACTIONS TOOLBAR & ROW SELECTED (GLOBAL)
   ============================================================ */
.slots-page .sl-bulk-toolbar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  padding: 0.75rem 1rem;
  margin: 0.9rem 0 0.75rem 0;
  background: linear-gradient(180deg, rgba(124,92,255,0.07), rgba(124,92,255,0.03));
  border: 1px solid rgba(124,92,255,0.22);
  border-radius: 14px;
  box-sizing: border-box;
  width: 100%;
}
.slots-page .sl-bulk-toolbar .bulk-all-cb {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  user-select: none;
  flex: 0 0 auto;
}
.slots-page .sl-bulk-toolbar .bulk-all-cb input { width:18px; height:18px; cursor:pointer; }
.slots-page .sl-bulk-toolbar .bac-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-strong);
}
.slots-page .sl-bulk-toolbar .bulk-select-wrap {
  flex: 1 1 230px;
  min-width: 0;
  max-width: 100%;
  overflow: visible;
  position: relative;
  z-index: 10;
}
.slots-page .sl-bulk-toolbar .bulk-select {
  width: 100%;
  max-width: 100%;
  height: 40px;
  padding: 0 2.2rem 0 0.8rem;
  background: var(--bg-card);
  color: var(--text-strong);
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s;
  box-sizing: border-box;
  /* ── text truncate SAFE (jika masih kelebihan walau label pendek ── */
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  display: block;
}
.slots-page .sl-bulk-toolbar .bulk-select:hover:not(:disabled) {
  border-color: rgba(124,92,255,0.55);
}
.slots-page .sl-bulk-toolbar .bulk-select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.slots-page .sl-bulk-toolbar .bulk-select optgroup {
  font-weight: 800;
  color: var(--text-muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.3rem 0.2rem 0.1rem 0.2rem;
  max-width: 100%;
}
.slots-page .sl-bulk-toolbar .bulk-select optgroup option {
  font-weight: 600;
  color: var(--text-strong);
  font-size: 0.84rem;
  padding: 0.35rem 0.7rem;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.25;
  white-space: nowrap;
  max-width: 100%;
  box-sizing: border-box;
}
.slots-page .sl-bulk-toolbar .bulk-apply-btn {
  flex: 0 0 auto;
  min-width: 84px;
  height: 40px;
  font-weight: 700;
  border-radius: 10px;
  border: 1.5px solid rgba(124,92,255,0.45) !important;
  color: #7c5cff !important;
  background: rgba(124,92,255,0.10) !important;
  transition: all .18s ease;
}
.slots-page .sl-bulk-toolbar .bulk-apply-btn:hover:not(:disabled) {
  background: linear-gradient(135deg,#7c5cff,#5b3dff) !important;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(124,92,255,0.30);
}
.slots-page .sl-bulk-toolbar .bulk-apply-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.slots-page .sl-bulk-toolbar .sel-count-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.72rem;
  background: linear-gradient(135deg, rgba(124,92,255,0.22), rgba(255,77,157,0.22));
  color: var(--text-strong);
  border: 1px solid rgba(124,92,255,0.35);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
  height: 32px;
  box-sizing: border-box;
  flex: 0 0 auto;
}
.slots-page .sl-bulk-toolbar .bulk-clear-btn {
  flex: 0 0 auto;
  height: 32px;
  padding: 0 0.6rem;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.slots-page .sl-bulk-toolbar .bulk-clear-btn:hover {
  background: rgba(239,68,68,0.10);
  color: #dc2626;
  border-color: rgba(239,68,68,0.30);
}

/* ROW SELECTED highlight */
.slots-page .data-table tbody tr.row-selected {
  background: linear-gradient(90deg, rgba(124,92,255,0.10), rgba(255,77,157,0.06)) !important;
  box-shadow: inset 3px 0 0 #7c5cff;
}
.slots-page .data-table tbody tr.row-selected:hover {
  background: linear-gradient(90deg, rgba(124,92,255,0.16), rgba(255,77,157,0.10)) !important;
}
.slots-page .data-table tbody tr.sl-trash-row.row-selected {
  background: linear-gradient(90deg, rgba(239,68,68,0.12), rgba(236,72,153,0.07)) !important;
  box-shadow: inset 3px 0 0 #ef4444;
}

/* ============================================================
   📱 SLOTS VIEW — KHUSUS MOBILE KECIL (<=768px) SAJA!
   💡 DESKTOP (>768px) TETAP TABLE 7 KOLOM ASLI 100% TANPA PERUBAHAN.
   🎯 SPECIFICITY SUPER TINGGI: body.dashboard-body prefix
       → DIJAMIN mengalahkan default components.css
   ============================================================ */
@media (max-width: 768px) {
  /* ─────────────────────────────────────────────────────
     🔴 1. KRITIS SEKALI: WORD-BREAK TIDAK BOLEH BREAK-ALL!
        Override components.css default .data-table td { word-break: break-all }
     ───────────────────────────────────────────────────── */
  body.dashboard-body .slots-page .data-table,
  body.dashboard-body .slots-page .data-table * {
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    -webkit-hyphens: none !important;
    hyphens: none !important;
  }
  body.dashboard-body .slots-page .data-table .ct,
  body.dashboard-body .slots-page .data-table td .ct {
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    overflow: visible !important;
    text-overflow: clip !important;
    max-width: 100% !important;
    width: 100% !important;
    line-height: 1.32 !important;
    font-size: 0.97rem !important;
  }
  body.dashboard-body .slots-page .data-table td {
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
  }
  /* ─────────────────────────────────────────────────────
     2. TABLE FLATTEN → CARD LIST VERTICAL (MOBILE ONLY)
     ───────────────────────────────────────────────────── */
  body.dashboard-body .slots-page .data-table thead {
    display: none !important;
  }
  body.dashboard-body .slots-page .data-table tbody {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
    background: transparent !important;
  }
  body.dashboard-body .slots-page .data-table tbody tr {
    display: block !important;
    background: var(--bg-card, #ffffff) !important;
    border: 1.5px solid var(--border-default, rgba(15,23,42,0.08)) !important;
    border-radius: 15px !important;
    padding: 0.85rem 0.95rem 0.4rem !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08) !important;
    transition: all .18s ease;
    margin: 0 !important;
  }
  body.dashboard-body .slots-page .data-table tbody tr:hover {
    border-color: rgba(124, 92, 255, 0.35) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 10px 22px rgba(99, 102, 241, 0.14) !important;
  }
  /* ─────────────────────────────────────────────────────
     3. SETIAP CELL (TD) = FLEX ROW (LABEL KIRI · VALUE KANAN)
     ───────────────────────────────────────────────────── */
  body.dashboard-body .slots-page .data-table tbody td {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 0.5rem 0.75rem !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 0.42rem 0 !important;
    border: none !important;
    border-bottom: 1px dashed var(--border-default, rgba(15,23,42,0.08)) !important;
    font-size: 0.83rem !important;
    text-align: left !important;
  }
  body.dashboard-body .slots-page .data-table tbody td::before {
    content: attr(data-label);
    font-weight: 700 !important;
    color: var(--text-muted, #64748b) !important;
    font-size: 0.7rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
    margin-right: 0.6rem !important;
    flex: 0 0 auto !important;
    min-width: 5.2rem !important;
  }
  /* TD PERTAMA = SLOT TITLE (THUMBNAIL + NAMA) — TIDAK PAKAI LABEL */
  body.dashboard-body .slots-page .data-table tbody td:first-child,
  body.dashboard-body .slots-page .data-table tbody td[data-label="Slot"] {
    display: flex !important;
    padding: 0 0 0.65rem 0 !important;
    margin-bottom: 0.15rem;
    border-bottom: 1.5px solid var(--border-default) !important;
  }
  body.dashboard-body .slots-page .data-table tbody td:first-child::before,
  body.dashboard-body .slots-page .data-table tbody td[data-label="Slot"]::before {
    display: none !important;
  }
  body.dashboard-body .slots-page .data-table tbody td:first-child .cell-title,
  body.dashboard-body .slots-page .data-table tbody td[data-label="Slot"] .cell-title {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    width: 100% !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }
  body.dashboard-body .slots-page .data-table tbody td:first-child .thumb-sm,
  body.dashboard-body .slots-page .data-table tbody td[data-label="Slot"] .thumb-sm {
    flex: 0 0 50px !important;
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
    border-radius: 11px !important;
    font-size: 1rem !important;
    background-size: cover;
    background-position: center;
    box-shadow: 0 2px 6px rgba(15,23,42,0.15) !important;
  }
  body.dashboard-body .slots-page .data-table tbody td:first-child .cell-title > div:last-child,
  body.dashboard-body .slots-page .data-table tbody td[data-label="Slot"] .cell-title > div:last-child {
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }
  body.dashboard-body .slots-page .data-table tbody td:first-child .cm,
  body.dashboard-body .slots-page .data-table tbody td[data-label="Slot"] .cm {
    font-size: 0.73rem !important;
    margin-top: 0.22rem !important;
    color: var(--text-muted, #64748b) !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    line-height: 1.35 !important;
  }
  /* TD TERAKHIR = ACTIONS (View / Edit / Delete) — justify kanan, border top dashed */
  body.dashboard-body .slots-page .data-table tbody td:last-child,
  body.dashboard-body .slots-page .data-table tbody td[data-label="Actions"] {
    justify-content: flex-end !important;
    padding-top: 0.6rem !important;
    padding-bottom: 0.15rem !important;
    margin-top: 0.15rem !important;
    border-top: 1px dashed var(--border-default) !important;
    border-bottom: none !important;
  }
  body.dashboard-body .slots-page .data-table tbody td:last-child::before,
  body.dashboard-body .slots-page .data-table tbody td[data-label="Actions"]::before {
    display: none !important;
  }
  body.dashboard-body .slots-page .data-table tbody td:last-child .row-actions,
  body.dashboard-body .slots-page .data-table tbody td[data-label="Actions"] .row-actions {
    justify-content: flex-end !important;
    gap: 0.35rem !important;
  }
  /* ROW KOSONG (empty) — tanpa border, center */
  body.dashboard-body .slots-page .data-table tbody td[colspan] {
    border: none !important;
    justify-content: center !important;
    padding: 1.8rem 0 !important;
  }
  body.dashboard-body .slots-page .data-table tbody td[colspan]::before { display: none !important; }

  /* ─────────────────────────────────────────────────────
     4. TABS + SEARCH TOOLBAR COMPACT MOBILE
     ───────────────────────────────────────────────────── */
  body.dashboard-body .slots-page .tabs-panel {
    gap: 0.4rem !important;
    row-gap: 0.45rem !important;
    padding: 0.5rem 0.55rem !important;
    flex-wrap: wrap !important;
  }
  body.dashboard-body .slots-page .tabs-panel .tab-pill {
    padding: 0.45rem 0.8rem !important;
    font-size: 0.83rem !important;
    min-height: 36px;
    line-height: 1 !important;
  }
  body.dashboard-body .slots-page .crud-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.65rem !important;
  }
  body.dashboard-body .slots-page .crud-toolbar .crud-search {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 44px !important;
  }
}

/* ────────────────────────────────────────────────────────
   📱 EXTRA NARROW (<=640px): Mobile HP biasa 360-420px
   ──────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  body.dashboard-body .slots-page .data-table tbody tr {
    padding: 0.7rem 0.8rem 0.25rem !important;
    border-radius: 13px !important;
    gap: 0 !important;
    margin-bottom: 0.55rem !important;
  }
  body.dashboard-body .slots-page .data-table tbody td {
    font-size: 0.79rem !important;
    padding: 0.34rem 0 !important;
    gap: 0.35rem 0.5rem !important;
  }
  body.dashboard-body .slots-page .data-table tbody td::before {
    font-size: 0.64rem !important;
    min-width: 4.4rem !important;
    font-weight: 700 !important;
    opacity: 0.85;
  }
  body.dashboard-body .slots-page .data-table tbody td[data-label="Slot"] {
    padding-top: 0.05rem !important;
    padding-bottom: 0.45rem !important;
    border-bottom-width: 1.5px !important;
  }
  body.dashboard-body .slots-page .data-table tbody td:first-child .thumb-sm,
  body.dashboard-body .slots-page .data-table tbody td[data-label="Slot"] .thumb-sm {
    flex: 0 0 44px !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    border-radius: 10px !important;
    font-size: 0.88rem !important;
  }
  body.dashboard-body .slots-page .data-table tbody td:first-child .ct,
  body.dashboard-body .slots-page .data-table tbody td[data-label="Slot"] .ct {
    font-size: 0.9rem !important;
    line-height: 1.28 !important;
    font-weight: 700 !important;
  }
  body.dashboard-body .slots-page .data-table tbody td[data-label="Actions"] {
    padding-top: 0.55rem !important;
  }
  body.dashboard-body .slots-page .tabs-panel {
    padding: 0.45rem 0.35rem !important;
    gap: 0.28rem !important;
    row-gap: 0.35rem !important;
  }
  body.dashboard-body .slots-page .tabs-panel .tab-pill {
    padding: 0.38rem 0.6rem !important;
    font-size: 0.76rem !important;
    min-height: 32px !important;
    font-weight: 600 !important;
  }
  body.dashboard-body .slots-page .tabs-panel .tab-pill span {
    font-size: 0.7rem !important;
    margin-left: 0.2rem !important;
    font-weight: 600 !important;
  }
  body.dashboard-body .slots-page .page-head {
    margin-bottom: 0.9rem !important;
    gap: 0.6rem !important;
  }
  body.dashboard-body .slots-page .page-head .page-title {
    font-size: 1.3rem !important;
  }
  body.dashboard-body .slots-page .page-head .page-subtitle {
    font-size: 0.78rem !important;
    margin-top: 0.18rem !important;
  }
  body.dashboard-body .slots-page .topbar-actions .btn {
    padding: 0.42rem 0.7rem !important;
    height: 40px !important;
    font-size: 0.82rem !important;
  }
  body.dashboard-body .slots-page .crud-toolbar {
    padding-top: 0.4rem !important;
    margin-top: 0.4rem !important;
  }
  body.dashboard-body .slots-page .data-table .ct,
  body.dashboard-body .slots-page .data-table td .ct,
  body.dashboard-body .slots-page .data-table tbody td,
  body.dashboard-body .slots-page .data-table tbody td .cm {
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    -webkit-word-break: break-word !important;  /* iOS Safari */
  }
  /* Hide checkbox column di mobile super sempit (bulk bisa lewat Select All di toolbar saja) */
  body.dashboard-body .slots-page .data-table thead th:first-child,
  body.dashboard-body .slots-page .data-table tbody td:first-child,
  body.dashboard-body .slots-page .data-table tbody td:first-child input[type=checkbox] {
    display: none !important;
    width: 0 !important;
    padding: 0 !important;
    min-width: 0 !important;
    flex: 0 !important;
  }
  /* Bulk toolbar RAPIH MOBILE ≤640 */
  body.dashboard-body .slots-page .sl-bulk-toolbar {
    padding: 0.55rem 0.6rem !important;
    gap: 0.35rem !important;
    row-gap: 0.4rem !important;
    margin: 0.65rem 0 0.5rem 0 !important;
    border-radius: 12px !important;
  }
  body.dashboard-body .slots-page .sl-bulk-toolbar .bulk-all-cb {
    gap: 0.3rem !important;
  }
  body.dashboard-body .slots-page .sl-bulk-toolbar .bulk-all-cb input {
    width: 16px !important;
    height: 16px !important;
  }
  body.dashboard-body .slots-page .sl-bulk-toolbar .bac-label {
    display: none !important;
  }
  body.dashboard-body .slots-page .sl-bulk-toolbar .bulk-select-wrap {
    flex: 1 1 calc(100% - 56px) !important;
    min-width: 0 !important;
  }
  body.dashboard-body .slots-page .sl-bulk-toolbar .bulk-select {
    height: 38px !important;
    padding: 0 0.6rem !important;
    font-size: 0.82rem !important;
    border-radius: 9px !important;
    font-weight: 600 !important;
  }
  body.dashboard-body .slots-page .sl-bulk-toolbar .sel-count-pill {
    font-size: 0.72rem !important;
    padding: 0.2rem 0.5rem !important;
    height: 26px !important;
    line-height: 1.1 !important;
  }
  body.dashboard-body .slots-page .sl-bulk-toolbar .bulk-clear-btn {
    height: 26px !important;
    padding: 0 0.4rem !important;
    font-size: 0.72rem !important;
    border-radius: 7px !important;
  }
  body.dashboard-body .slots-page .sl-bulk-toolbar .bulk-apply-btn {
    flex: 1 1 100% !important;
    width: 100% !important;
    order: 99 !important;
    height: 40px !important;
    min-width: 100% !important;
    font-size: 0.9rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.01em !important;
  }
  /* Actions column — 3 tombol rata kanan rapih mobile */
  body.dashboard-body .slots-page .data-table tbody td[data-label="Actions"] .row-actions,
  body.dashboard-body .slots-page .data-table tbody td[data-label="Actions"] .row-actions-trash {
    gap: 0.3rem !important;
  }
  body.dashboard-body .slots-page .data-table tbody td[data-label="Actions"] .icon-btn-sm {
    width: 34px !important;
    height: 34px !important;
    font-size: 0.88rem !important;
  }
  body.dashboard-body .slots-page .data-table tbody td[data-label="Actions"] .icon-btn-sm svg {
    width: 15px !important;
    height: 15px !important;
  }
}
/* ────────────────────────────────────────────────────────
   📱 SANGAT NARROW (<=400px): HP low-end 320-380px — super compact
   ──────────────────────────────────────────────────────── */
@media (max-width: 400px) {
  body.dashboard-body .slots-page .tabs-panel .tab-pill {
    padding: 0.36rem 0.5rem !important;
    font-size: 0.72rem !important;
  }
  body.dashboard-body .slots-page .data-table tbody td[data-label="Slot"] .thumb-sm {
    flex: 0 0 40px !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
  }
  body.dashboard-body .slots-page .data-table tbody td[data-label="Slot"] .ct {
    font-size: 0.85rem !important;
  }
  body.dashboard-body .slots-page .data-table tbody td::before {
    min-width: 4rem !important;
    font-size: 0.62rem !important;
  }
  body.dashboard-body .slots-page .sl-bulk-toolbar .bulk-select {
    font-size: 0.78rem !important;
    height: 36px !important;
  }
  body.dashboard-body .slots-page .sl-bulk-toolbar .bulk-apply-btn {
    height: 38px !important;
    font-size: 0.85rem !important;
  }
}

.row-actions-inline > a,
.row-actions-inline > button.row-action-link {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.28rem !important;
  padding: 0.32rem 0.65rem !important;
  border-radius: 999px !important;
  border: 1px solid !important;
  font-weight: 600 !important;
  font-size: 0.76rem !important;
  line-height: 1.2 !important;
  cursor: pointer !important;
  text-decoration: none !important;
  transition: all 0.18s cubic-bezier(0.2,0.9,0.3,1.1) !important;
  background: var(--bg-input);
  backdrop-filter: blur(4px);
}
.row-actions-inline > a {
  color: #2563eb !important;
  border-color: rgba(59,130,246,0.25) !important;
  background: rgba(59,130,246,0.06);
}
.row-actions-inline > a:hover {
  color: #fff !important;
  border-color: rgba(59,130,246,0.5) !important;
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  box-shadow: 0 4px 12px rgba(59,130,246,0.32);
  transform: translateY(-1px);
  filter: none !important;
  text-decoration: none !important;
}
.row-actions-inline > button.row-action-link[data-action*="edit"],
.row-actions-inline > button.row-action-link[data-action$="-edit"] {
  color: #6366f1 !important;
  border-color: rgba(99,102,241,0.28) !important;
  background: rgba(99,102,241,0.06);
}
.row-actions-inline > button.row-action-link[data-action*="edit"]:hover,
.row-actions-inline > button.row-action-link[data-action$="-edit"]:hover {
  color: #fff !important;
  border-color: rgba(99,102,241,0.55) !important;
  background: linear-gradient(135deg, #7c5cff 0%, #6366f1 100%);
  box-shadow: 0 4px 12px rgba(99,102,241,0.35);
  transform: translateY(-1px);
}
.row-actions-inline > button.row-action-link[data-action*="trash"],
.row-actions-inline > button.row-action-link[data-action$="-trash"] {
  color: #f59e0b !important;
  border-color: rgba(245,158,11,0.28) !important;
  background: rgba(245,158,11,0.06);
}
.row-actions-inline > button.row-action-link[data-action*="trash"]:hover,
.row-actions-inline > button.row-action-link[data-action$="-trash"]:hover {
  color: #fff !important;
  border-color: rgba(245,158,11,0.55) !important;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 4px 12px rgba(245,158,11,0.32);
  transform: translateY(-1px);
}
.row-actions-inline > button.row-action-link[data-action*="restore"],
.row-actions-inline > button.row-action-link[data-action$="-restore"] {
  color: #10b981 !important;
  border-color: rgba(16,185,129,0.28) !important;
  background: rgba(16,185,129,0.06);
}
.row-actions-inline > button.row-action-link[data-action*="restore"]:hover,
.row-actions-inline > button.row-action-link[data-action$="-restore"]:hover {
  color: #fff !important;
  border-color: rgba(16,185,129,0.55) !important;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 4px 12px rgba(16,185,129,0.32);
  transform: translateY(-1px);
}
.row-actions-inline > button.row-action-link[data-action*="delete-permanent"],
.row-actions-inline > button.row-action-link[data-action$="-delete-permanent"] {
  color: #dc2626 !important;
  border-color: rgba(220,38,38,0.28) !important;
  background: rgba(220,38,38,0.06);
}
.row-actions-inline > button.row-action-link[data-action*="delete-permanent"]:hover,
.row-actions-inline > button.row-action-link[data-action$="-delete-permanent"]:hover {
  color: #fff !important;
  border-color: rgba(220,38,38,0.55) !important;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 4px 12px rgba(220,38,38,0.32);
  transform: translateY(-1px);
}
.row-actions-inline > span { display: none !important; }
.row-actions-inline .ra-ico {
  font-size: 0.8rem;
  line-height: 1;
  display: inline-grid;
  place-items: center;
}
.row-actions-inline button.row-action-link:focus-visible,
.row-actions-inline > a:focus-visible {
  outline: 2px solid rgba(124,92,255,0.5);
  outline-offset: 2px;
}

/* Pagination WordPress Modern Style */
.pg-btn {
  background: var(--bg-input);
  color: var(--text-strong);
  border: 1px solid var(--border);
  padding: 0.45rem 0.75rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.85rem;
  min-width: 38px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.pg-btn:hover:not(:disabled) {
  border-color: rgba(99,102,241,0.55);
  color: #818cf8;
  background: rgba(124,92,255,0.08);
  transform: translateY(-1px);
}
.pg-btn:focus {
  outline: 2px solid rgba(99,102,241,0.4);
  outline-offset: 1px;
}
.pg-btn-active {
  background: linear-gradient(135deg, #7c5cff 0%, #6366f1 100%) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 4px 12px rgba(99,102,241,0.35);
  cursor: default !important;
}
.pg-btn-active:hover {
  transform: none !important;
  color: #fff !important;
}
.pg-btn:disabled {
  cursor: not-allowed;
}
