/* Yabeli — UI aplikasi (landing, auth, dashboard, admin). Tanpa framework. */
:root {
  --wine: #621d25;
  --wine-deep: #4a1219;
  --gold: #d4b483;
  --ink: #2b2523;
  --cream: #f2eee4;
  --border: #e6dcc8;
  --text-soft: #6e5f53;
  --radius: 14px;
  --danger: #b3261e;
  --ok: #1e7d4a;
  font-size: 16px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: 'Hanken Grotesk', system-ui, sans-serif; color: var(--ink); background: var(--cream); }
a { color: var(--wine); }
code { background: #fff; padding: 1px 5px; border-radius: 4px; border: 1px solid var(--border); }

/* ---- Auth pages ---- */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: linear-gradient(160deg, var(--cream), #ece3d1); }
.auth-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 32px 28px; box-shadow: 0 20px 50px rgba(43,37,35,.12); }
.auth-card h1 { font-size: 1.4rem; margin: 0 0 6px; }
.muted { color: var(--text-soft); font-size: .9rem; }
.auth-card form { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.auth-card label { display: flex; flex-direction: column; gap: 6px; font-size: .85rem; font-weight: 600; }
.auth-card input, .auth-card select, .auth-card textarea {
  font: inherit; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border);
}
.auth-card button, .btn-primary {
  background: var(--wine); color: #fff; border: none; padding: 11px; border-radius: 10px;
  font-weight: 700; cursor: pointer; font-size: .95rem;
}
.form-error { background: #fdecea; color: var(--danger); padding: 10px 12px; border-radius: 8px; font-size: .85rem; }
.form-notice { background: #eaf6ee; color: var(--ok); padding: 10px 12px; border-radius: 8px; font-size: .85rem; }

/* ---- Landing page ---- */
.landing-wrap { max-width: 980px; margin: 0 auto; padding: 0 20px; }
.landing-hero { background: linear-gradient(135deg, var(--wine), var(--wine-deep)); color: #fff; padding: 20px 0 60px; }
.landing-nav { display: flex; justify-content: space-between; align-items: center; padding: 18px 0 40px; }
.landing-nav .brand { font-family: 'Fraunces', serif; font-size: 1.4rem; font-weight: 700; }
.landing-nav nav a { color: #fff; text-decoration: none; margin-left: 18px; font-weight: 600; }
.landing-hero h1 { font-family: 'Fraunces', serif; font-size: 2.2rem; max-width: 640px; margin: 0 0 14px; }
.landing-hero p { max-width: 560px; opacity: .92; line-height: 1.6; }
.btn-cta { display: inline-block; background: var(--gold); color: var(--wine-deep); text-decoration: none; font-weight: 700; padding: 10px 18px; border-radius: 999px; margin-top: 16px; }
.btn-cta-lg { padding: 14px 26px; font-size: 1.05rem; }
.landing-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 40px auto; }
.feature-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.landing-pricing { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin: 30px auto 60px; }
.price-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; text-align: center; }
.price-card .price { font-size: 1.7rem; font-weight: 800; color: var(--wine); margin: 10px 0; }
.price-card .price span { font-size: .8rem; font-weight: 500; color: var(--text-soft); }
.site-footer { text-align: center; padding: 30px 0; color: var(--text-soft); font-size: .8rem; }
@media (max-width: 720px) {
  .landing-features, .landing-pricing { grid-template-columns: 1fr; }
}

/* ---- App shell (dashboard & admin) ---- */
.app-shell { display: flex; min-height: 100vh; }
.app-sidebar { width: 220px; flex: none; background: var(--wine-deep); color: #fff; padding: 20px 14px; }
.app-sidebar .brand { font-family: 'Fraunces', serif; font-weight: 700; font-size: 1.2rem; display: block; margin-bottom: 22px; color: #fff; text-decoration: none; }
.app-sidebar nav a { display: block; color: #f2eee4cc; text-decoration: none; padding: 9px 10px; border-radius: 8px; font-size: .9rem; font-weight: 600; margin-bottom: 2px; }
.app-sidebar nav a.active, .app-sidebar nav a:hover { background: rgba(255,255,255,.12); color: #fff; }
/* min-width:0 WAJIB: tanpa ini, flex item tidak boleh menyusut lebih kecil
   dari konten terlebarnya, sehingga tabel lebar akan mendorong seluruh
   halaman melebar ke samping (bukan tabelnya sendiri yang bisa digeser). */
.app-main { flex: 1; min-width: 0; padding: 26px 32px; max-width: 1080px; }
.app-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.app-topbar h1 { font-size: 1.4rem; margin: 0; }
.impersonation-banner { background: #fff3cd; color: #664d03; padding: 10px 16px; border-radius: 10px; margin-bottom: 18px; display: flex; justify-content: space-between; align-items: center; font-size: .88rem; }
.impersonation-banner a { color: #664d03; font-weight: 700; }
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.card h2 { margin-top: 0; font-size: 1.05rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
/* Sama seperti .app-main: anak grid/flex secara default TIDAK boleh
   menyusut lebih kecil dari isinya. Tanpa min-width:0, satu tabel lebar di
   dalam kolom grid akan memaksa seluruh halaman melebar ke samping dan
   membuat pembungkus .table-scroll jadi percuma. */
.grid-2 > *, .grid-3 > * { min-width: 0; }
@media (max-width: 900px) {
  .app-shell { flex-direction: column; }
  .app-sidebar { width: 100%; display: flex; align-items: center; gap: 14px; overflow-x: auto; }
  .app-sidebar .brand { margin: 0 10px 0 0; white-space: nowrap; }
  .app-sidebar nav { display: flex; gap: 4px; }
  .app-sidebar nav a { flex: none; white-space: nowrap; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .app-main { padding: 18px; }
}
/* ---- Pembungkus tabel: di layar sempit (HP) tabel digeser ke samping di
   DALAM kartunya sendiri, bukan membuat seluruh halaman ikut melebar.
   Bayangan tipis di tepi kiri/kanan muncul otomatis saat masih ada isi
   yang bisa digeser (trik background-attachment: local/scroll, tanpa JS). */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  /* supaya geser tabel di HP tidak ikut memicu gestur "kembali" browser */
  overscroll-behavior-x: contain;
  background-image:
    linear-gradient(to right, #fff, #fff),
    linear-gradient(to left, #fff, #fff),
    linear-gradient(to right, rgba(43,37,35,.16), rgba(43,37,35,0)),
    linear-gradient(to left, rgba(43,37,35,.16), rgba(43,37,35,0));
  background-position: left center, right center, left center, right center;
  background-repeat: no-repeat;
  background-size: 24px 100%, 24px 100%, 12px 100%, 12px 100%;
  background-attachment: local, local, scroll, scroll;
}
.table-scroll table.data-table { min-width: 620px; }
table.data-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.data-table th, table.data-table td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--border); }
table.data-table th { color: var(--text-soft); font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; }
.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: .72rem; font-weight: 700; }
.badge-active { background: #eaf6ee; color: var(--ok); }
.badge-pending { background: #fff3cd; color: #856404; }
.badge-suspended, .badge-rejected, .badge-expired { background: #fdecea; color: var(--danger); }
.btn-sm { font-size: .78rem; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border); background: #fff; cursor: pointer; text-decoration: none; color: var(--ink); display: inline-block; }
.btn-sm.danger { color: var(--danger); border-color: #f3c9c5; }
.btn-sm.primary { background: var(--wine); color: #fff; border-color: var(--wine); }
.thumb-preview { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; border: 1px solid var(--border); }
.thumb-preview-lg { width: 110px; height: 110px; border-radius: 12px; object-fit: cover; border: 1px solid var(--border); }
.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; font-size: .88rem; font-weight: 600; }
.form-row input, .form-row select, .form-row textarea { font: inherit; padding: 9px 11px; border-radius: 9px; border: 1px solid var(--border); font-weight: 400; }
.swatch-row { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--border); cursor: pointer; }
.swatch.active { box-shadow: 0 0 0 2px var(--wine); }
.template-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px,1fr)); gap: 12px; }
.template-swatch { border-radius: 12px; padding: 14px; cursor: pointer; border: 2px solid transparent; font-weight: 700; font-size: .85rem; }
.template-swatch.active { border-color: var(--ink); }

/* ---- Layout desain: form di kiri, pratinjau langsung nempel (sticky) di kanan ---- */
.design-layout { display: flex; gap: 24px; align-items: flex-start; }
.design-form-col { flex: 1 1 auto; min-width: 0; }
.design-preview-col { flex: none; width: 300px; }
.design-preview-sticky { position: sticky; top: 20px; }
.design-preview-frame-wrap {
  border: 10px solid var(--ink); border-radius: 28px; overflow: hidden; background: #fff;
  box-shadow: 0 20px 40px rgba(43,37,35,.18); height: 560px;
}
.design-preview-frame-wrap iframe { width: 100%; height: 100%; border: none; display: block; }
@media (max-width: 1000px) {
  .design-layout { flex-direction: column; }
  .design-preview-col { width: 100%; }
  .design-preview-sticky { position: static; }
  .design-preview-frame-wrap { height: 480px; max-width: 320px; margin: 0 auto; }
}

/* =======================================================================
   Landing page (yabeli.com) — terinspirasi tata letak Linktree: nav
   sticky simpel, hero besar dengan CTA tunggal yang jelas, lalu deretan
   section pendek (masalah/solusi, fitur, cara kerja, harga, FAQ).
   ======================================================================= */
.lp-nav {
  position: sticky; top: 0; z-index: 20; background: #fff;
  border-bottom: 1px solid var(--border);
}
.lp-nav-inner {
  max-width: 1080px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.lp-nav-inner .brand { font-family: 'Fraunces', serif; font-weight: 700; font-size: 1.3rem; color: var(--wine); text-decoration: none; }
.lp-nav-links { display: flex; gap: 22px; }
.lp-nav-links a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .9rem; }
.lp-nav-links a:hover { color: var(--wine); }
.lp-nav-cta { display: flex; align-items: center; gap: 16px; }
.lp-nav-cta a:first-child { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .9rem; }
.lp-nav-cta .btn-cta { padding: 9px 18px; }
@media (max-width: 800px) {
  .lp-nav-links { display: none; }
}

.lp-hero { background: linear-gradient(160deg, #fff 0%, var(--cream) 100%); padding: 56px 0 40px; }
.lp-hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.lp-hero-copy h1 { font-family: 'Fraunces', serif; font-size: 2.5rem; line-height: 1.18; margin: 16px 0 18px; color: var(--ink); }
.lp-underline { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 6px; text-underline-offset: 2px; }
.lp-badge {
  display: inline-block; background: #fff3cd; color: #7a5b00; font-weight: 700; font-size: .78rem;
  padding: 6px 14px; border-radius: 999px; border: 1px solid #f2dfa0;
}
.lp-hero-sub { font-size: 1.02rem; line-height: 1.6; color: var(--text-soft); max-width: 540px; margin-bottom: 24px; }
.lp-hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.btn-cta-outline {
  display: inline-block; background: transparent; color: var(--wine); border: 2px solid var(--wine);
  text-decoration: none; font-weight: 700; padding: 12px 24px; border-radius: 999px; font-size: 1.05rem;
}
.lp-hero-note { font-size: .82rem; }

.lp-hero-visual { display: flex; justify-content: center; }
.lp-phone {
  width: 240px; border: 10px solid var(--ink); border-radius: 32px; background: #fff;
  box-shadow: 0 24px 50px rgba(43,37,35,.2); overflow: hidden; position: relative;
}
.lp-phone-notch { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 70px; height: 16px; background: var(--ink); border-radius: 0 0 10px 10px; }
.lp-phone-screen { padding: 30px 16px 18px; text-align: center; background: linear-gradient(180deg, #fff, var(--cream)); min-height: 420px; }
.lp-mock-avatar {
  width: 56px; height: 56px; margin: 0 auto 10px; border-radius: 50%; background: linear-gradient(135deg, var(--wine), var(--gold));
  color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-family: 'Fraunces', serif;
}
.lp-mock-title { font-family: 'Fraunces', serif; font-weight: 600; font-size: 1rem; }
.lp-mock-tagline { font-size: .74rem; color: var(--text-soft); margin-bottom: 14px; }
.lp-mock-tabs { display: flex; gap: 6px; background: #f2eee4; border-radius: 999px; padding: 3px; margin-bottom: 12px; }
.lp-mock-tabs span { flex: 1; padding: 6px 0; font-size: .72rem; font-weight: 700; border-radius: 999px; color: var(--text-soft); }
.lp-mock-tabs span.active { background: var(--wine); color: #fff; }
.lp-mock-link {
  display: flex; align-items: center; gap: 8px; text-align: left; padding: 9px 12px; margin-bottom: 8px;
  background: #fff; border: 1px solid var(--border); border-radius: 12px; font-size: .78rem; font-weight: 600;
}
.lp-mock-icon { font-size: .95rem; }
.lp-mock-badge { margin-top: 12px; font-size: .62rem; opacity: .65; }

.lp-strip { background: var(--wine-deep); padding: 16px 0; }
.lp-strip-inner p { color: #f2eee4dd; text-align: center; margin: 0; font-size: .88rem; }

.lp-section { padding: 60px 0; }
.lp-section-alt { padding: 60px 0; background: #fff; }
.lp-section-title { font-family: 'Fraunces', serif; font-size: 1.8rem; text-align: center; margin: 0 0 8px; }
.lp-section-sub { text-align: center; color: var(--text-soft); max-width: 560px; margin: 0 auto 34px; }

.lp-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.lp-compare-col { border-radius: var(--radius); padding: 24px; }
.lp-compare-col h3 { margin-top: 0; }
.lp-compare-col ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; font-size: .92rem; line-height: 1.5; }
.lp-compare-bad { background: #fdecea; }
.lp-compare-good { background: #eaf6ee; }

.lp-feature-grid .feature-card { text-align: left; }
.lp-feature-icon { font-size: 1.6rem; margin-bottom: 8px; }

.lp-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.lp-step { text-align: center; padding: 10px; }
.lp-step-num {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border-radius: 50%; background: var(--wine); color: #fff; font-weight: 700; margin-bottom: 12px;
}
.lp-step h3 { margin: 0 0 6px; font-size: 1.05rem; }
.lp-step p { color: var(--text-soft); font-size: .9rem; margin: 0; }

.lp-pricing-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 24px; max-width: 780px; margin: 0 auto; align-items: start; }
.lp-price-featured { border: 2px solid var(--gold); position: relative; text-align: left; box-shadow: 0 16px 36px rgba(212,180,131,.28); }
.lp-price-ribbon {
  position: absolute; top: -13px; left: 20px; background: var(--wine); color: #fff; font-size: .72rem; font-weight: 700;
  padding: 5px 14px; border-radius: 999px;
}
.lp-price-strike { color: var(--text-soft); text-decoration: line-through; margin: 8px 0 0; font-size: 1rem; }
.lp-price-big { font-size: 2.2rem !important; }
.lp-price-list { list-style: none; padding: 0; margin: 14px 0 18px; display: flex; flex-direction: column; gap: 8px; font-size: .88rem; }
.lp-price-list li { padding-left: 22px; position: relative; }
.lp-price-list li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }
.price-card:not(.lp-price-featured) { text-align: left; }
.price-card:not(.lp-price-featured) h3 { margin-top: 0; }

.lp-faq { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.lp-faq details { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; }
.lp-faq summary { font-weight: 700; cursor: pointer; list-style: none; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after { content: "+"; float: right; font-size: 1.2rem; color: var(--wine); }
.lp-faq details[open] summary::after { content: "–"; }
.lp-faq p { margin: 10px 0 0; color: var(--text-soft); font-size: .9rem; line-height: 1.55; }

.lp-final-cta { background: linear-gradient(135deg, var(--wine), var(--wine-deep)); color: #fff; text-align: center; padding: 60px 0; }
.lp-final-cta h2 { font-family: 'Fraunces', serif; font-size: 1.9rem; margin: 0 0 10px; }
.lp-final-cta p { opacity: .9; margin: 0 0 22px; }
.lp-final-cta .btn-cta { background: var(--gold); color: var(--wine-deep); }

@media (max-width: 900px) {
  .lp-hero-grid { grid-template-columns: 1fr; }
  .lp-hero-visual { order: -1; }
  .lp-hero-copy h1 { font-size: 2rem; }
  .lp-compare { grid-template-columns: 1fr; }
  .lp-steps { grid-template-columns: 1fr; }
  .lp-pricing-grid { grid-template-columns: 1fr; }
}

/* =======================================================================
   Landing page builder (/admin/landing.php).
   Kanvas memakai kelas .lb-* dari landing-blocks.css (sama dengan halaman
   publik); kelas .lbb-* di bawah ini HANYA untuk perkakas editornya
   (bilah alat, gagang ubah ukuran, panel pengaturan) dan tidak pernah
   ikut tampil di halaman publik.
   ======================================================================= */
.lbb { display: flex; flex-direction: column; gap: 0; }
.lbb-bar {
  position: sticky; top: 0; z-index: 12; display: flex; justify-content: space-between;
  align-items: center; gap: 12px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px 14px; margin-bottom: 14px;
}
.lbb-devices { display: flex; gap: 6px; }
.lbb-dev {
  border: 1px solid var(--border); background: #fff; color: var(--ink); cursor: pointer;
  padding: 7px 14px; border-radius: 999px; font-weight: 700; font-size: .82rem;
}
.lbb-dev.active { background: var(--wine); color: #fff; border-color: var(--wine); }
.lbb-bar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lbb-status { font-size: .78rem; color: var(--ok); font-weight: 700; }
.lbb-status.is-dirty { color: #a8813f; }

.lbb-body { display: grid; grid-template-columns: 210px minmax(0, 1fr) 290px; gap: 14px; align-items: start; }
.lbb-left, .lbb-right {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px; position: sticky; top: 74px; max-height: calc(100vh - 96px); overflow-y: auto;
}
.lbb-hint { font-size: .76rem; line-height: 1.45; margin: 0 0 10px; }
.lbb-tabs { display: flex; gap: 4px; margin-bottom: 10px; }
.lbb-tab { flex: 1; border: none; background: var(--cream); color: var(--ink); cursor: pointer;
  padding: 7px 4px; border-radius: 8px; font-weight: 700; font-size: .76rem; }
.lbb-tab.active { background: var(--wine); color: #fff; }
.lbb-pane { display: none; }
.lbb-pane.active { display: block; }
.lbb-palette { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.lbb-pal {
  display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer;
  border: 1px solid var(--border); background: #fff; border-radius: 10px; padding: 9px 4px;
  font-size: .68rem; font-weight: 600; color: var(--ink); text-align: center; line-height: 1.2;
}
.lbb-pal:hover { border-color: var(--wine); background: var(--cream); }
.lbb-pal span { font-size: 1.1rem; }
.lbb-block-btn { width: 100%; margin-top: 8px; }

.lbb-seclist-item {
  display: flex; justify-content: space-between; align-items: center; gap: 6px;
  padding: 7px 9px; border-radius: 8px; cursor: pointer; font-size: .78rem; font-weight: 600;
}
.lbb-seclist-item:hover { background: var(--cream); }
.lbb-seclist-item.active { background: var(--wine); color: #fff; }
.lbb-seclist-tools { display: flex; gap: 2px; flex: none; }
.lbb-mini {
  border: 1px solid var(--border); background: #fff; color: var(--ink); cursor: pointer;
  border-radius: 6px; width: 22px; height: 22px; line-height: 1; font-size: .7rem; padding: 0;
}
.lbb-mini.danger { color: var(--danger); border-color: #f3c9c5; }
.lbb-mini:hover { background: var(--cream); }

/* ---- Panggung / kanvas ---- */
.lbb-stage {
  background: repeating-conic-gradient(#f6f3ec 0% 25%, #eee9de 0% 50%) 50%/18px 18px;
  border: 1px solid var(--border); border-radius: var(--radius); padding: 16px;
  overflow: hidden;
}
.lbb-canvas-scaler { transform-origin: top left; }
.lbb-page { margin: 0 auto; background: #fff; box-shadow: 0 10px 30px rgba(43,37,35,.14); }
.lbb-sec { position: relative; outline: 1px dashed rgba(98,29,37,.22); outline-offset: -1px; }
.lbb-sec.is-current { outline: 2px solid rgba(98,29,37,.5); }
.lbb-sec-bar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  background: rgba(43,37,35,.82); color: #fff; padding: 3px 8px; font-size: .68rem; font-weight: 700;
}
.lbb-sec-tools { display: flex; gap: 3px; }
.lbb-sec-bar .lbb-mini { background: rgba(255,255,255,.14); border-color: transparent; color: #fff; }
.lbb-sec-bar .lbb-mini.danger { color: #ffb3ad; }
/* Beri ruang di bawah bilah bagian supaya tidak menutupi elemen baris 1 */
.lbb-canvas { padding-top: 34px !important; position: relative; }
/* Garis bantu grid 24 kolom */
.lbb-canvas::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: repeating-linear-gradient(to right,
    rgba(98,29,37,.11) 0 1px, transparent 1px calc(100% / 24));
  background-size: calc(100% / 24) 100%;
}

.lbb-el { position: relative; cursor: grab; }
.lbb-el:hover { outline: 1px solid rgba(98,29,37,.45); outline-offset: 2px; z-index: 4; }
/* Elemen terpilih WAJIB naik di atas tetangganya: di kanvas bebas, elemen
   boleh saling bersinggungan, dan gagang ubah ukuran menonjol sedikit ke
   luar kotak. Tanpa z-index ini, gagang tertutup elemen sebelahnya
   sehingga tidak bisa ditarik. */
.lbb-el.is-selected { outline: 2px solid var(--wine); outline-offset: 2px; z-index: 5; }
.lbb-el.lbb-hidden { opacity: .35; }
.lbb-el.lbb-hidden::after {
  content: "disembunyikan"; position: absolute; top: 2px; left: 2px; z-index: 6;
  background: var(--danger); color: #fff; font-size: .6rem; padding: 1px 6px; border-radius: 4px;
}
.lbb-el-overlay { position: absolute; inset: 0; pointer-events: none; }
.lbb-el-tag {
  position: absolute; top: -9px; left: 0; background: var(--wine); color: #fff;
  font-size: .58rem; font-weight: 700; padding: 1px 6px; border-radius: 4px;
  opacity: 0; transition: opacity .12s ease; white-space: nowrap;
}
.lbb-el:hover .lbb-el-tag, .lbb-el.is-selected .lbb-el-tag { opacity: 1; }
.lbb-handle {
  position: absolute; right: -6px; bottom: -6px; width: 16px; height: 16px; border-radius: 4px;
  background: #fff; border: 2px solid var(--wine); cursor: nwse-resize; pointer-events: auto;
  opacity: 0; transition: opacity .12s ease; z-index: 6;
}
.lbb-el.is-selected .lbb-handle { opacity: 1; }
/* Elemen di kanvas editor tidak boleh bisa diklik/diseret isinya */
.lbb-el a, .lbb-el summary, .lbb-el img, .lbb-el details { pointer-events: none; }
.lbb-video-ph {
  display: flex; align-items: center; justify-content: center; color: #fff;
  font-size: .8rem; text-align: center; background: #2b2523;
}

/* ---- Panel kanan ---- */
.lbb-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.lbb-panel-acts { display: flex; gap: 4px; }
.lbb-group { border-top: 1px solid var(--border); padding-top: 10px; margin-top: 10px; }
.lbb-group h4 { margin: 0 0 8px; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-soft); }
.lbb-f { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; font-size: .75rem; font-weight: 700; }
.lbb-f input, .lbb-f select, .lbb-f textarea {
  font: inherit; font-weight: 400; font-size: .8rem; padding: 6px 8px;
  border: 1px solid var(--border); border-radius: 7px; width: 100%;
}
.lbb-grid4 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.lbb-check { display: flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 600; margin-bottom: 8px; }
.lbb-check input { width: auto; }
.lbb-rows { display: flex; flex-direction: column; gap: 5px; }
.lbb-row { display: flex; gap: 4px; align-items: center; }
.lbb-qa { display: flex; flex-direction: column; gap: 3px; padding: 6px; background: var(--cream); border-radius: 7px; }
.lbb-imgbox { display: block; margin-bottom: 5px; }
.lbb-imgbox img { width: 100%; max-height: 110px; object-fit: cover; border-radius: 7px; border: 1px solid var(--border); }
.lbb-imgbox em { font-size: .72rem; color: var(--text-soft); }
.lbb-gal { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-bottom: 6px; }
.lbb-gal-item { position: relative; }
.lbb-gal-item img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 6px; }
.lbb-gal-item .lbb-mini { position: absolute; top: 2px; right: 2px; }
.lbb-revs { display: flex; flex-direction: column; gap: 5px; }
.lbb-rev { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: .72rem; }

@media (max-width: 1200px) {
  .lbb-body { grid-template-columns: 180px minmax(0, 1fr) 250px; }
}
@media (max-width: 980px) {
  .lbb-body { grid-template-columns: 1fr; }
  .lbb-left, .lbb-right { position: static; max-height: none; }
  .lbb-palette { grid-template-columns: repeat(4, 1fr); }
}

/* Halaman builder butuh ruang lebih lebar dari halaman admin biasa.
   Kalau :has() tidak didukung browser lama, builder tetap jalan --
   hanya kanvasnya diperkecil otomatis mengikuti lebar yang tersedia. */
.app-main:has(.lbb) { max-width: 1680px; }
.lbb-layer-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lbb-layer-name em { font-style: normal; opacity: .6; font-weight: 400; }
