/* Page Manager: modern theme. Layered over the Light Able base CSS.
   Indigo accent, soft surfaces, generous radius, Plus Jakarta Sans. */
:root {
  --lp-bg: #f5f6fb;
  --lp-surface: #ffffff;
  --lp-soft: #f1f3f9;
  --lp-line: #e8eaf3;
  --lp-line-strong: #d9dcea;
  --lp-ink: #0f172a;
  --lp-text: #475569;
  --lp-muted: #8b93a7;
  --lp-accent: #4f46e5;
  --lp-accent-2: #7c3aed;
  --lp-accent-soft: #eef0ff;
  --lp-wa: #16a34a;
  --lp-radius: 16px;
  --lp-shadow: 0 1px 2px rgba(15,23,42,.04), 0 10px 28px -14px rgba(30,41,90,.14);
  --lp-font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bs-primary: #4f46e5;
  --bs-primary-rgb: 79, 70, 229;
  --bs-link-color: #4f46e5;
  --bs-link-color-rgb: 79, 70, 229;
  --bs-body-font-family: var(--lp-font);
}

body, button, input, select, textarea, .swal2-popup { font-family: var(--lp-font) !important; }
body { background: var(--lp-bg) !important; color: var(--lp-text); -webkit-font-smoothing: antialiased; letter-spacing: -.003em; }
h1, h2, h3, h4, h5, h6 { font-family: var(--lp-font); }
a { color: var(--lp-accent); }
:focus-visible { outline: 2px solid var(--lp-accent); outline-offset: 2px; }

/* ---------- Shell ---------- */
[data-pc-preset] .pc-container { background: transparent; }
.pc-container .pc-content { padding: 24px 28px 3rem; }
/* Header and footer use the same side padding as the content so everything lines up. */
.pc-header .header-wrapper, .pc-footer .footer-wrapper { padding-left: 28px; padding-right: 28px; }
@media (max-width: 575px) { .pc-container .pc-content { padding: 16px 16px 2.5rem; } .pc-header .header-wrapper, .pc-footer .footer-wrapper { padding-left: 16px; padding-right: 16px; } }

[data-pc-preset] .pc-sidebar { background: var(--lp-surface); border-right: 1px solid var(--lp-line); box-shadow: none; }
[data-pc-preset] .pc-sidebar .m-header { height: auto; padding: 1.5rem 1.4rem 1rem; justify-content: flex-start; border: 0; }
[data-pc-preset] .pc-sidebar .pc-navbar .pc-caption label { color: var(--lp-muted); font-weight: 700; letter-spacing: .08em; font-size: .64rem; text-transform: uppercase; }
[data-pc-preset] .pc-sidebar .pc-navbar > .pc-item > .pc-link { margin: 3px 12px; padding: .65rem .85rem; border-radius: 12px; color: var(--lp-text); font-weight: 600; font-size: .9rem; box-shadow: none; transition: background .15s, color .15s; }
[data-pc-preset] .pc-sidebar .pc-navbar > .pc-item > .pc-link .pc-micon { color: var(--lp-muted); transition: color .15s; }
[data-pc-preset] .pc-sidebar .pc-navbar > .pc-item:hover > .pc-link { background: var(--lp-soft); color: var(--lp-ink); }
[data-pc-preset] .pc-sidebar .pc-navbar > .pc-item.active > .pc-link { background: var(--lp-accent-soft); color: var(--lp-accent); }
[data-pc-preset] .pc-sidebar .pc-navbar > .pc-item.active > .pc-link .pc-micon,
[data-pc-preset] .pc-sidebar .pc-navbar > .pc-item:hover > .pc-link .pc-micon { color: var(--lp-accent); }
[data-pc-preset] .pc-sidebar .pc-navbar > .pc-item > .pc-link::after { background: transparent !important; }

[data-pc-preset] .pc-header { background: rgba(245,246,251,.78); backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--lp-line); box-shadow: none; }
.pc-header .header-wrapper .me-auto.pc-mob-drp { margin-right: 0 !important; }
.lp-crumbs { align-items: center; gap: .5rem; font-size: .84rem; margin: 0 auto 0 .75rem; }
.lp-crumbs a { color: var(--lp-muted) !important; text-decoration: none; display: inline-flex; align-items: center; gap: .35rem; }
.lp-crumbs a:hover { color: var(--lp-accent) !important; }
.lp-crumbs strong { color: var(--lp-ink); font-weight: 700; }
.lp-crumbs .sep { font-size: .65rem; color: var(--lp-line-strong); }

.header-user-profile > a { display: inline-flex !important; align-items: center; gap: .6rem; padding: .25rem .7rem .25rem .25rem !important; border: 1px solid transparent !important; border-radius: 50px; background: transparent; transition: background .15s, border-color .15s; }
.header-user-profile > a:hover, .header-user-profile.show > a { background: var(--lp-surface); border-color: var(--lp-line) !important; }
.lp-avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--lp-accent), var(--lp-accent-2)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; line-height: 1; flex: 0 0 34px; text-transform: uppercase; }
.lp-who { flex-direction: column; line-height: 1.2; text-align: left; }
.lp-username { font-weight: 600; color: var(--lp-ink); font-size: .88rem; }
.lp-caret { font-size: .6rem; line-height: 1; margin-left: .15rem; color: var(--lp-muted); transition: transform .15s; }
.header-user-profile.show .lp-caret { transform: rotate(180deg); }
[data-pc-preset] .dropdown-menu { border: 1px solid var(--lp-line); border-radius: 14px; box-shadow: 0 16px 40px -12px rgba(30,41,90,.22); padding: .4rem; }
[data-pc-preset] .dropdown-item { border-radius: 9px; font-size: .88rem; font-weight: 500; display: flex; align-items: center; gap: .6rem; }
[data-pc-preset] .dropdown-item:hover { background: var(--lp-accent-soft); color: var(--lp-accent); }

[data-pc-preset] .pc-footer { background: transparent !important; border-top: 1px solid var(--lp-line); }
.pc-footer p { color: var(--lp-muted) !important; font-size: .82rem; }

.lp-brand { display: flex; align-items: center; gap: .65rem; font-weight: 800; font-size: 1.05rem; letter-spacing: -.02em; color: var(--lp-ink) !important; text-decoration: none; }
.lp-brand-mark { width: 34px; height: 34px; border-radius: 10px; display: block; overflow: hidden; box-shadow: 0 6px 14px -4px rgba(79,70,229,.5); }
.lp-brand-mark .lp-brand-svg { display: block; width: 100%; height: 100%; }

/* ---------- Page header ---------- */
.lp-pagehead h1 { font-weight: 800; font-size: 1.75rem; letter-spacing: -.03em; color: var(--lp-ink); margin: 0 0 .3rem; }
.lp-pagehead p { color: var(--lp-muted); margin: 0; font-size: .95rem; }

/* ---------- Buttons & forms ---------- */
/* Every button (<a> or <button>) centres its icon and label the same way and has the same 1px border box. */
[data-pc-preset] .btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; line-height: 1.3; border: 1px solid transparent; border-radius: 12px; font-weight: 600; font-size: .88rem; padding: .6rem 1.1rem; box-shadow: none; transition: transform .15s, box-shadow .15s, background .15s; }
[data-pc-preset] .btn .bi, [data-pc-preset] .btn i.me-1 { margin: 0 !important; line-height: 1; display: inline-block; }
[data-pc-preset] .btn-sm { padding: .4rem .8rem; font-size: .8rem; border-radius: 10px; }
[data-pc-preset] .btn-primary { background: linear-gradient(135deg, #5b52f0, var(--lp-accent)) !important; border: 1px solid transparent !important; color: #fff !important; box-shadow: 0 6px 16px -6px rgba(79,70,229,.6); }
[data-pc-preset] .btn-primary:hover, [data-pc-preset] .btn-primary:focus { transform: translateY(-1px); box-shadow: 0 10px 20px -8px rgba(79,70,229,.7); background: linear-gradient(135deg, #5b52f0, #4338ca) !important; }
[data-pc-preset] .btn-outline-secondary { background: var(--lp-surface); border: 1px solid var(--lp-line-strong); color: var(--lp-text); }
[data-pc-preset] .btn-outline-secondary:hover { background: var(--lp-surface); border-color: var(--lp-accent); color: var(--lp-accent); }
[data-pc-preset] .form-control, [data-pc-preset] .form-select, [data-pc-preset] .input-group-text { border: 1px solid var(--lp-line-strong); border-radius: 12px; padding: .62rem .85rem; background: var(--lp-surface); font-size: .9rem; box-shadow: none; }
[data-pc-preset] .input-group > :not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; }
[data-pc-preset] .input-group > :not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
[data-pc-preset] .input-group-text { background: var(--lp-soft); color: var(--lp-muted); }
[data-pc-preset] .form-control:focus, [data-pc-preset] .form-select:focus { border-color: var(--lp-accent); box-shadow: 0 0 0 4px rgba(79,70,229,.12); }
[data-pc-preset] .form-label { font-weight: 600; font-size: .8rem; color: var(--lp-ink); }
.form-text { color: var(--lp-muted); font-size: .78rem; }
[data-pc-preset] .form-check-input:checked { background-color: var(--lp-accent); border-color: var(--lp-accent); }

/* ---------- Cards / stats ---------- */
.lp-card, [data-pc-preset] .card { background: var(--lp-surface); border: 1px solid var(--lp-line); border-radius: var(--lp-radius); box-shadow: var(--lp-shadow); }
.lp-card { overflow: hidden; }
.lp-card-head { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--lp-line); }
.lp-card-head h5 { margin: 0; font-size: 1rem; font-weight: 700; color: var(--lp-ink); letter-spacing: -.01em; }
.lp-card-body { padding: 1.4rem; }
.lp-card-head a { color: var(--lp-accent); text-decoration: none; font-weight: 600; }
.lp-card-head a:hover { text-decoration: underline; }

.lp-stat { display: flex; align-items: center; gap: 1rem; background: var(--lp-surface); border: 1px solid var(--lp-line); border-radius: var(--lp-radius); padding: 1.15rem 1.3rem; height: 100%; box-shadow: var(--lp-shadow); }
.lp-stat .lp-ico { flex: 0 0 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.25rem; background: var(--lp-accent-soft); color: var(--lp-accent); }
.lp-stat .lp-ico.green { background: #e8f8ee; color: var(--lp-wa); }
.lp-stat .lp-ico.amber { background: #fff4e0; color: #d97706; }
.lp-stat .lp-label { font-size: .78rem; color: var(--lp-muted); font-weight: 600; }
.lp-stat .lp-value { font-size: 1.7rem; font-weight: 800; letter-spacing: -.03em; color: var(--lp-ink); line-height: 1.15; font-variant-numeric: tabular-nums; }

/* ---------- Table ---------- */
.lp-table { width: 100%; margin: 0; }
.lp-table th { font-size: .72rem; font-weight: 600; color: var(--lp-muted); padding: .8rem 1rem; border-bottom: 1px solid var(--lp-line); background: #fafbfe; white-space: nowrap; text-transform: uppercase; letter-spacing: .05em; }
.lp-table td { padding: .9rem 1rem; border-bottom: 1px solid var(--lp-line); vertical-align: middle; font-size: .88rem; color: var(--lp-text); font-variant-numeric: tabular-nums; }
.lp-table tbody tr:last-child td { border-bottom: 0; }
.lp-table tbody tr:not(.lp-group-row):hover td { background: #fafbff; }
.lp-table td.fw-semibold { color: var(--lp-ink); }
.lp-group-row td { background: var(--lp-accent-soft); color: var(--lp-accent); font-weight: 700; font-size: .8rem; padding: .6rem 1rem; }
.lp-group-row .bi-whatsapp { color: var(--lp-wa); }
.lp-group-row .lp-count { font-weight: 500; color: var(--lp-muted); margin-left: .5rem; }
.lp-slug { white-space: nowrap; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; color: var(--lp-accent); background: var(--lp-accent-soft); padding: .2rem .55rem; border-radius: 8px; }
.lp-pill { display: inline-block; padding: .22rem .7rem; border-radius: 50px; font-size: .72rem; font-weight: 600; background: var(--lp-soft); color: var(--lp-text); white-space: nowrap; }
.lp-icon-btn { border: 1px solid var(--lp-line); background: var(--lp-surface); color: var(--lp-muted); width: 30px; height: 30px; border-radius: 9px; display: inline-grid; place-items: center; text-decoration: none; cursor: pointer; font-size: .85rem; transition: color .15s, border-color .15s, background .15s; }
.lp-icon-btn:hover { color: var(--lp-accent); border-color: var(--lp-accent); background: var(--lp-accent-soft); }
.lp-seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 12px; background: var(--lp-soft); }
.lp-seg a { padding: .36rem .85rem; border-radius: 9px; font-size: .8rem; font-weight: 600; color: var(--lp-muted); text-decoration: none; }
.lp-seg a:hover { color: var(--lp-ink); }
.lp-seg a.on { background: var(--lp-surface); color: var(--lp-accent); box-shadow: 0 1px 3px rgba(15,23,42,.1); }
.lp-empty { text-align: center; padding: 3.5rem 1rem; color: var(--lp-muted); }
.lp-empty i { font-size: 2.2rem; color: var(--lp-accent); opacity: .5; }

/* ---------- Template picker / gallery ---------- */
.lp-tpl { display: block; cursor: pointer; border: 1px solid var(--lp-line); border-radius: var(--lp-radius); padding: 1rem; background: var(--lp-surface); height: 100%; transition: border-color .15s, box-shadow .15s, transform .15s; }
.lp-tpl:hover { border-color: var(--lp-line-strong); transform: translateY(-2px); }
.lp-tpl-input:checked + .lp-tpl { border-color: var(--lp-accent); box-shadow: 0 0 0 4px rgba(79,70,229,.12); }
.lp-tpl-input:focus-visible + .lp-tpl { outline: 2px solid var(--lp-accent); outline-offset: 2px; }
.lp-tpl .fw-semibold { color: var(--lp-ink); }
.lp-swatch { height: 56px; border-radius: 10px; margin-bottom: .75rem; display: flex; overflow: hidden; }
.lp-swatch span { flex: 1; }
.lp-swatch span:last-child { flex: .35; }
/* The page is rendered at a 1280x800 desktop viewport and scaled (by script) to fill the card's width. */
.lp-thumb { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 12px; border: 1px solid var(--lp-line); background: #fff; }
.lp-thumb iframe { position: absolute; top: 0; left: 0; width: 1280px; height: 800px; border: 0; transform: scale(.3); transform-origin: 0 0; pointer-events: none; }

/* ---------- Request more templates: button + dialog ---------- */
.lp-request-btn { display: inline-flex; align-items: center; gap: .55rem; padding: .45rem 1rem .45rem .5rem; border-radius: 50px; border: 1px solid var(--lp-line-strong); background: var(--lp-surface); color: var(--lp-text); font-weight: 600; font-size: .84rem; cursor: pointer; box-shadow: var(--lp-shadow); transition: border-color .15s, color .15s, transform .15s; }
.lp-request-btn .ico { width: 26px; height: 26px; border-radius: 50%; background: var(--lp-accent-soft); color: var(--lp-accent); display: grid; place-items: center; font-size: .8rem; transition: background .15s, color .15s, transform .25s; }
.lp-request-btn:hover { border-color: var(--lp-accent); color: var(--lp-accent); transform: translateY(-1px); }
.lp-request-btn:hover .ico { background: var(--lp-accent); color: #fff; transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce) { .lp-request-btn, .lp-request-btn .ico { transition: none; } .lp-request-btn:hover, .lp-request-btn:hover .ico { transform: none; } }

.swal2-popup.lp-swal { border-radius: 22px; padding: 2.2rem 1.6rem 1.6rem; width: 24rem; max-width: 92vw; box-shadow: 0 30px 70px -20px rgba(30,41,90,.4); }
.lp-swal .lp-swal-head { display: none; }
.lp-swal .lp-swal-badge { width: 56px; height: 56px; margin: 0 auto 1.1rem; border-radius: 18px; background: linear-gradient(135deg, var(--lp-accent), var(--lp-accent-2)); color: #fff; display: grid; place-items: center; font-size: 1.5rem; box-shadow: 0 10px 20px -6px rgba(79,70,229,.5); }
.lp-swal .swal2-title { font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em; color: var(--lp-ink); padding: 0; margin: 0; }
.lp-swal .swal2-html-container { margin: .55rem 0 0; padding: 0; color: var(--lp-muted); font-size: .92rem; line-height: 1.6; }
.lp-swal .lp-contact { display: flex; align-items: center; justify-content: center; gap: .5rem; margin-top: 1rem; padding: .7rem 1rem; border-radius: 12px; background: var(--lp-accent-soft); color: var(--lp-accent); font-weight: 700; font-size: .88rem; word-break: break-word; text-decoration: none; }
.lp-swal a.lp-contact:hover { background: #e0e4ff; }
.lp-swal .swal2-actions { margin-top: 1.5rem; }
.lp-swal .swal2-confirm.lp-swal-confirm { background: linear-gradient(135deg, #5b52f0, var(--lp-accent)); color: #fff; border-radius: 12px; padding: .65rem 2rem; font-weight: 700; font-size: .9rem; box-shadow: 0 8px 18px -8px rgba(79,70,229,.7); }
.lp-swal .swal2-confirm.lp-swal-confirm:focus-visible { outline: 2px solid var(--lp-accent); outline-offset: 2px; }

/* ---------- Auth ---------- */
.auth-main .auth-wrapper { background: radial-gradient(60% 50% at 50% 0%, #e6e8ff 0%, rgba(245,246,251,0) 70%), var(--lp-bg); }
.auth-main .card { border: 1px solid var(--lp-line); box-shadow: var(--lp-shadow); border-radius: 22px; }

/* ---------- Logo upload ---------- */
.lp-logo-preview { width: 160px; height: 72px; border-radius: 12px; border: 1px dashed var(--lp-line-strong); background: var(--lp-soft); display: grid; place-items: center; color: var(--lp-muted); font-size: 1.5rem; overflow: hidden; flex: 0 0 auto; }
.lp-logo-preview.on-dark { background: #0b0b0e; border-color: #2b2b36; }
.lp-logo-preview img { max-width: 140px; max-height: 52px; object-fit: contain; }
.lp-logo-thumb { width: 60px; height: 30px; border-radius: 7px; background: #0b0b0e; display: grid; place-items: center; flex: 0 0 auto; overflow: hidden; padding: 0 6px; }
.lp-logo-thumb.on-light { background: #f4f2ee; box-shadow: inset 0 0 0 1px var(--lp-line); }
.lp-logo-thumb img { max-width: 100%; max-height: 18px; object-fit: contain; }

/* ---------- Delete link ---------- */
.lp-icon-btn.danger:hover { color: #dc2626; border-color: #f3b9b9; background: #fef2f2; }
.lp-swal .swal2-actions { gap: .6rem; }
.lp-swal .swal2-confirm.lp-swal-danger { background: #dc2626; box-shadow: 0 8px 18px -8px rgba(220,38,38,.7); }
.lp-swal .swal2-confirm.lp-swal-danger:hover { background: #b91c1c; }
.lp-swal .swal2-cancel.lp-swal-cancel { background: var(--lp-surface); color: var(--lp-text); border: 1px solid var(--lp-line-strong); border-radius: 12px; padding: .65rem 1.6rem; font-weight: 700; font-size: .9rem; }
.lp-swal .swal2-cancel.lp-swal-cancel:hover { border-color: var(--lp-accent); color: var(--lp-accent); }
.lp-swal .swal2-icon.swal2-warning { margin: 0 auto 1rem; }
.lp-swal .swal2-icon.swal2-success { margin: 0 auto 1rem; border-color: #bbf7d0; color: #16a34a; }
.lp-swal .swal2-icon.swal2-success [class^=swal2-success-line] { background-color: #16a34a; }
.lp-swal .swal2-icon.swal2-success .swal2-success-ring { border-color: rgba(22,163,74,.25); }
.lp-swal .swal2-timer-progress-bar { background: var(--lp-accent); }
