/* ==========================================================================
   Sandingan — kerangka portal (client, partner, office) + pola halaman.
   Butuh brand.css.
   ========================================================================== */

body.p { background: var(--paper-2); min-height: 100vh; }

/* ---------- kerangka ---------- */
.p-shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.p-side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px;
  padding: 22px 16px 16px; background: var(--paper); border-right: 1px solid var(--line); overflow: hidden;
}
.p-brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 14px; text-decoration: none; }
.p-brand img { width: 34px; height: 28px; }
.p-brand span { font: 500 22px/1 var(--serif); letter-spacing: -.01em; }
.p-brand small { margin-left: auto; font: 600 11px/1 var(--sans); color: var(--muted); padding: 5px 8px; border: 1px solid var(--line-2); border-radius: 99px; }
.p-nav { flex: 1; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; margin: 0 -6px; padding: 0 6px; scrollbar-width: thin; }
.p-group { margin: 16px 10px 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.p-link {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 12px;
  border-radius: 12px; color: var(--ink-2); font-size: 14px; font-weight: 500; text-decoration: none;
  transition: background .15s, color .15s;
}
.p-link .ic { width: 19px; height: 19px; color: var(--muted); transition: color .15s; }
.p-link:hover { background: var(--paper-2); color: var(--ink); }
.p-link.is-active { background: var(--ink); color: var(--paper); }
.p-link.is-active .ic { color: var(--janur); }
.p-link .badge { margin-left: auto; height: 20px; padding: 0 7px; background: var(--janur); color: var(--ink); }
.p-link .p-lock { margin-left: auto; color: var(--muted); }
.p-link .p-lock .ic { width: 15px; height: 15px; }
.p-side-foot { display: grid; gap: 4px; padding-top: 12px; border-top: 1px solid var(--line); }
.p-user { display: flex; align-items: center; gap: 10px; padding: 6px 8px; min-width: 0; }
.p-user > div { min-width: 0; display: grid; }
.p-user b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-user span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar {
  flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--janur-tint); color: var(--janur-ink); font-weight: 700; font-size: 14px;
}
.p-side-foot form button { width: 100%; border: 0; background: none; cursor: pointer; text-align: left; }

/* kartu pasangan di sidebar client */
.p-couple { display: block; margin: 0 0 10px; padding: 14px 14px 13px; border-radius: 16px; background: var(--paper-2); text-decoration: none; border: 1px solid var(--line); }
.p-couple:hover { border-color: var(--line-2); }
.p-couple-names { display: block; font: 500 21px/1.15 var(--serif); letter-spacing: -.01em; }
.p-couple-meta { display: block; margin-top: 4px; font-size: 12.5px; color: var(--muted); }

.p-main { min-width: 0; display: flex; flex-direction: column; }
.p-top {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; min-height: 64px;
  padding: 10px clamp(16px, 3vw, 36px); background: rgba(244, 243, 236, .86); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.p-top.is-stuck { border-bottom-color: var(--line); }
.p-top-title { font-size: 15px; font-weight: 600; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.p-top .p-brand { display: none; padding: 0; }
.p-menu-btn { display: none; }
.p-page { width: 100%; max-width: 1180px; margin: 0 auto; padding: 8px clamp(16px, 3vw, 36px) 72px; }
.p-page--wide { max-width: none; }
.p-scrim { display: none; }

/* bilah tab bawah (HP) */
.p-tabbar { display: none; }

@media (max-width: 1023px) {
  .p-shell { grid-template-columns: 1fr; }
  .p-side {
    position: fixed; z-index: 80; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); height: auto;
    transform: translateX(-102%); transition: transform .32s var(--ease); box-shadow: var(--shadow-pop);
  }
  .nav-open .p-side { transform: none; }
  .p-scrim { display: block; position: fixed; inset: 0; z-index: 70; background: rgba(30, 42, 33, .35); opacity: 0; pointer-events: none; transition: opacity .25s; }
  .nav-open .p-scrim { opacity: 1; pointer-events: auto; }
  .p-top .p-brand { display: flex; }
  .p-top .p-brand span { font-size: 20px; }
  .p-top-title { display: none; }
  .p-menu-btn { display: inline-grid; margin-left: -8px; }
  .p-page { padding-top: 4px; }
}
@media (max-width: 1023px) {
  body.has-tabbar .p-page { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .p-tabbar {
    position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: rgba(251, 251, 247, .94);
    backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-top: 1px solid var(--line);
  }
  .p-tabbar a, .p-tabbar button {
    display: grid; justify-items: center; gap: 3px; padding: 7px 2px 5px; border: 0; background: none; cursor: pointer;
    color: var(--muted); font-size: 11px; font-weight: 600; text-decoration: none; border-radius: 12px;
  }
  .p-tabbar .ic { width: 22px; height: 22px; }
  .p-tabbar .is-active { color: var(--ink); }
  .p-tabbar .is-active .ic { color: var(--ink); stroke-width: 2; }
  .p-tabbar .is-active::before { content: ""; position: absolute; }
}

/* office: sidebar gelap */
.p-office .p-side { background: var(--ink); color: var(--paper); border-right: 0; }
.p-office .p-brand span { color: var(--paper); }
.p-office .p-brand small { color: #C8CEC3; border-color: rgba(251, 251, 247, .22); }
.p-office .p-group { color: #98A294; }
.p-office .p-link { color: #D7DCD3; }
.p-office .p-link .ic { color: #98A294; }
.p-office .p-link:hover { background: rgba(251, 251, 247, .07); color: var(--paper); }
.p-office .p-link.is-active { background: rgba(216, 203, 106, .16); color: var(--paper); }
.p-office .p-link.is-active .ic { color: var(--janur); }
.p-office .p-side-foot { border-top-color: rgba(251, 251, 247, .12); }
.p-office .p-user span { color: #98A294; }
.p-office .avatar { background: rgba(216, 203, 106, .2); color: var(--janur); }

/* ---------- kepala halaman ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin: 18px 0 24px; }
.page-head h1 { font: 500 clamp(30px, 4vw, 40px)/1.08 var(--serif); letter-spacing: -.02em; }
.page-head p { margin-top: 6px; color: var(--muted); max-width: 64ch; }
.page-head .actions, .page-head > .btn, .page-head > a.btn { display: flex; gap: 8px; flex-wrap: wrap; }
.back-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none; }
.back-link:hover { color: var(--ink); }

/* ---------- panel ---------- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(18px, 2.4vw, 26px); min-width: 0; }
.card-tight { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head h2, .card h2 { font-size: 16px; font-weight: 700; letter-spacing: -.005em; }
.card-head p { color: var(--muted); font-size: 13.5px; margin-top: 3px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.card-tight .card-head { padding: 18px 20px 0; }
.card + .card, .stack > * + * { margin-top: 0; }
.section-title { font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 28px 0 12px; }

.grid { display: grid; gap: 16px; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .grid-4 { grid-template-columns: 1fr 1fr; gap: 10px; } }
.stack { display: grid; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 36px; }
.divider { height: 1px; background: var(--line); margin: 20px 0; border: 0; }

/* angka ringkas */
.stat { background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; min-width: 0; }
.stat-label { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); font-weight: 500; }
.stat-label .ic { width: 16px; height: 16px; }
.stat-value { margin-top: 8px; font: 500 30px/1.05 var(--serif); letter-spacing: -.02em; font-variant-numeric: lining-nums tabular-nums; }
.stat-sub { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.mini-stats { display: flex; gap: 22px; flex-wrap: wrap; }
.mini-stats > div { display: grid; }
.mini-stats b { font: 500 22px/1.1 var(--serif); }
.mini-stats span { font-size: 12.5px; color: var(--muted); }

/* catatan & pesan */
.note { display: flex; gap: 10px; align-items: flex-start; padding: 13px 15px; border-radius: 14px; background: var(--paper-2); font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
.note > .ic { margin-top: 1px; }
.note-info { background: var(--info-tint); color: #23485F; }
.note-warn { background: var(--warn-tint); color: #6E4A10; }
.note-ok { background: var(--ok-tint); color: #24533B; }
.note-janur { background: var(--janur-tint); color: #4F4A14; }
.flash { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 18px; padding: 13px 16px; border-radius: 14px; font-size: 14px; font-weight: 500; background: var(--white); border: 1px solid var(--line); }
.flash .ic { margin-top: 1px; }
.flash-success { border-color: rgba(46, 106, 76, .3); background: var(--ok-tint); color: #24533B; }
.flash-error { border-color: rgba(162, 62, 44, .3); background: var(--bad-tint); color: #7A2E21; }
.flash-info { border-color: rgba(45, 91, 120, .25); background: var(--info-tint); color: #23485F; }
.flash-warn { border-color: rgba(154, 101, 20, .3); background: var(--warn-tint); color: #6E4A10; }
.lock-note { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--janur-tint); color: #4F4A14; font-size: 13.5px; }

.empty { display: grid; justify-items: center; gap: 10px; padding: 40px 20px; text-align: center; color: var(--muted); }
.empty::before {
  content: ""; width: 54px; height: 64px; border: 2px solid var(--janur-2); border-bottom: 0; border-radius: 999px 999px 0 0; opacity: .8;
}
.empty h3 { color: var(--ink); font: 500 22px/1.2 var(--serif); }
.empty p { max-width: 42ch; }

/* tabel */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--white); }
.table td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #FCFCF9; }
.table .num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table a:not(.btn) { font-weight: 600; text-decoration: none; }
.table a:not(.btn):hover { text-decoration: underline; }
@media (max-width: 720px) {
  .table.stack-sm thead { display: none; }
  .table.stack-sm tr { display: grid; gap: 4px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .table.stack-sm td { padding: 0; border: 0; }
  .table.stack-sm td[data-label]::before { content: attr(data-label) " "; color: var(--muted); font-size: 12px; }
  .table.stack-sm .num { text-align: left; }
}

/* tab & filter */
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 99px; background: var(--paper-3); width: max-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs a, .tabs button { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 99px; border: 0; background: none; font-size: 13px; font-weight: 600; color: var(--ink-2); text-decoration: none; white-space: nowrap; cursor: pointer; }
.tabs .is-active, .tabs [aria-selected=true] { background: var(--white); color: var(--ink); box-shadow: 0 1px 3px rgba(30, 42, 33, .12); }
.tabs .badge { height: 18px; padding: 0 6px; font-size: 11px; background: var(--paper-2); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filters .input, .filters input, .filters select { min-height: 40px; width: auto; }
.pager { display: flex; justify-content: center; gap: 6px; margin-top: 20px; }
.pager a, .pager span { display: grid; place-items: center; min-width: 38px; height: 38px; padding: 0 10px; border-radius: 99px; background: var(--white); border: 1px solid var(--line); font-size: 13px; font-weight: 600; text-decoration: none; }
.pager .is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* progres */
.progress { height: 6px; border-radius: 99px; background: var(--paper-3); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--ink); transition: width .5s var(--ease); }
.progress.is-janur > span { background: var(--janur-2); }

/* daftar baris */
.list { display: grid; }
.list-item { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.list-item:last-child { border-bottom: 0; }
.list-item > .grow { flex: 1; min-width: 0; }
.list-item b { font-weight: 600; }
.bank-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.bank-row:last-child { border-bottom: 0; }

/* langkah berurutan (memang urutan: isi → terbit → kirim) */
.steps { display: grid; gap: 0; counter-reset: st; list-style: none; margin: 0; padding: 0; }
.step { position: relative; display: grid; grid-template-columns: 34px 1fr; gap: 14px; padding: 0 0 22px; }
.step::before {
  counter-increment: st; content: counter(st); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  border: 1.5px solid var(--line-2); font-weight: 700; font-size: 14px; background: var(--white); position: relative; z-index: 1;
}
.step::after { content: ""; position: absolute; left: 16.5px; top: 34px; bottom: 0; width: 1.5px; background: var(--line-2); }
.step:last-child { padding-bottom: 0; }
.step:last-child::after { display: none; }
.step.is-done::before { content: ""; background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23D8CB6A' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.2 4L19 7'/%3E%3C/svg%3E") center/18px no-repeat; border-color: var(--ink); }
.step.is-now::before { background: var(--janur); border-color: var(--janur); }
.step h3 { font-size: 15px; font-weight: 700; margin-top: 6px; }
.step p { color: var(--muted); font-size: 13.5px; margin-top: 3px; }
.step .row { margin-top: 12px; }

/* pilihan berbentuk kartu */
.choice-cards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.choice-card { position: relative; display: grid; gap: 4px; padding: 14px 16px; border-radius: 16px; border: 1.5px solid var(--line-2); background: var(--white); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.choice-card:hover { border-color: rgba(30, 42, 33, .4); }
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card:has(input:checked), .choice-card.is-active { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(216, 203, 106, .5); }
.choice-card:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }

/* paket */
.plans { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.plan { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 24px; border-radius: var(--r-lg); background: var(--white); border: 1.5px solid var(--line); cursor: pointer; transition: border-color .15s, box-shadow .2s; }
.plan:hover { border-color: rgba(30, 42, 33, .35); }
.plan:has(input:checked), .plan.is-active { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(216, 203, 106, .55); }
.plan input[type=radio] { position: absolute; opacity: 0; }
.plan-name { font: 500 26px/1.1 var(--serif); }
.plan-price { font: 600 24px/1 var(--sans); letter-spacing: -.02em; }
.plan-price small { font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13.5px; }
.plan li { display: flex; gap: 8px; align-items: flex-start; }
.plan li .ic { width: 16px; height: 16px; margin-top: 2px; color: var(--ok); }
.plan li.is-off { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(0, 0, 0, .25); }
.plan li.is-off .ic { color: var(--muted); }
.plan-flag { position: absolute; top: -12px; right: 18px; }

/* pembayaran */
.pay-box { display: grid; gap: 12px; padding: 20px; border-radius: 18px; background: var(--paper-2); }
.pay-amount { font: 600 30px/1 var(--sans); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.proof-img { max-width: 100%; border-radius: 14px; border: 1px solid var(--line); }
.status-steps { display: flex; gap: 6px; flex-wrap: wrap; }

/* foto */
.dropzone {
  display: grid; justify-items: center; gap: 8px; padding: 28px 20px; border: 1.5px dashed rgba(30, 42, 33, .3);
  border-radius: 18px; background: var(--paper); text-align: center; cursor: pointer; transition: background .15s, border-color .15s;
}
.dropzone:hover, .dropzone.is-over { background: var(--janur-tint); border-color: var(--janur-ink); }
.dropzone .ic { width: 26px; height: 26px; color: var(--janur-ink); }
.dropzone input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.photo-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
.photo { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--paper-3); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* pengulang (acara, kisah, rekening) */
.repeater-item { position: relative; display: grid; gap: 14px; padding: 18px; border-radius: 18px; border: 1px solid var(--line); background: var(--paper); }
.repeater-item + .repeater-item { margin-top: 12px; }
.repeater-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.repeater-head b { font-size: 14px; }

/* tugas & daftar periksa */
.task { display: flex; gap: 12px; align-items: flex-start; padding: 13px 0; border-bottom: 1px solid var(--line); }
.task:last-child { border-bottom: 0; }
.task-title { font-weight: 600; font-size: 14.5px; }
.task-meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.task-actions { margin-left: auto; display: flex; gap: 4px; }
.task.is-done .task-title { color: var(--muted); text-decoration: line-through; }
.todo-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-bottom: 20px; }
.todo { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--janur-tint); color: #4F4A14; text-decoration: none; font-size: 14px; }
.todo b { font: 600 20px/1 var(--sans); }
.todo .ic { margin-left: auto; }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.check-list li { display: flex; gap: 8px; align-items: flex-start; }
.check-list .ic { color: var(--ok); margin-top: 1px; }

/* grafik batang sederhana */
.bars { display: flex; align-items: flex-end; gap: 3px; height: 150px; }
.bar { flex: 1; min-width: 3px; border-radius: 4px 4px 1px 1px; background: var(--ink); position: relative; }
.bar.zero { background: var(--paper-3); }
.bar:hover { background: var(--janur-2); }
.bar[data-tip]:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); padding: 5px 9px; border-radius: 8px; background: var(--ink); color: var(--paper); font-size: 12px; white-space: nowrap; z-index: 2; }
.bars-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 8px; }
.mix-row + .mix-row { margin-top: 14px; }

/* warna */
.swatches { display: inline-flex; }
.swatches i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--white); margin-left: -4px; box-shadow: 0 0 0 1px var(--line); }
.swatches i:first-child { margin-left: 0; }
.color-row { display: flex; gap: 12px; flex-wrap: wrap; }
.color-field { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.color-field input[type=color] { width: 40px; height: 40px; padding: 0; border: 1px solid var(--line-2); border-radius: 10px; background: none; cursor: pointer; }

/* lembar (dialog) */
.sheet { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 16px; }
.sheet[hidden] { display: none; }
.sheet-scrim { position: absolute; inset: 0; background: rgba(30, 42, 33, .45); animation: fadeIn .2s; }
.sheet-panel { position: relative; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; border-radius: 24px; background: var(--white); padding: 26px; box-shadow: var(--shadow-pop); animation: sheetIn .32s var(--ease); }
.sheet-panel h2 { font: 500 26px/1.15 var(--serif); }
.sheet-close { position: absolute; top: 14px; right: 14px; }
@media (max-width: 640px) {
  .sheet { place-items: end stretch; padding: 0; }
  .sheet-panel { width: 100%; border-radius: 24px 24px 0 0; max-height: 92vh; padding-bottom: calc(26px + env(safe-area-inset-bottom)); }
}
@keyframes fadeIn { from { opacity: 0; } }
@keyframes sheetIn { from { opacity: 0; transform: translateY(24px); } }

/* bilah aksi melayang di bawah */
.action-bar {
  position: sticky; bottom: 0; z-index: 20; display: flex; align-items: center; gap: 10px; justify-content: flex-end;
  margin: 24px calc(-1 * clamp(16px, 3vw, 36px)) -72px; padding: 14px clamp(16px, 3vw, 36px) calc(14px + env(safe-area-inset-bottom));
  background: rgba(244, 243, 236, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line);
}

/* tautan salin */
.copy-field { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 99px; background: var(--paper-2); border: 1px solid var(--line); min-width: 0; }
.copy-field span { flex: 1; min-width: 0; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 640px) { .hide-sm { display: none !important; } }
@media (min-width: 641px) { .show-sm { display: none !important; } }

/* banner mode admin */
.admin-banner { display: flex; gap: 10px; align-items: center; justify-content: center; padding: 9px 16px; background: var(--ink); color: var(--paper); font-size: 13px; }
.admin-banner a { color: var(--janur); font-weight: 600; }

/* ---------- halaman fokus (buat undangan, terbitkan) ---------- */
body.focus { background: var(--paper); min-height: 100vh; }
.focus-top {
  position: sticky; top: 0; z-index: 30; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  min-height: 68px; padding: 10px clamp(16px, 3vw, 36px); background: rgba(251, 251, 247, .9);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}
.focus-top .p-brand { padding: 0; }
.focus-exit { grid-column: 3; justify-self: end; }
.focus-flash { max-width: 1180px; margin: 16px auto 0; padding: 0 clamp(16px, 3vw, 36px); }
@media (max-width: 720px) {
  .focus-top { grid-template-columns: auto 1fr auto; gap: 8px; }
  .focus-top .p-brand span { display: none; }
}

/* ---------- portal mitra ---------- */
.pt-link { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: center; }
.pt-code { display: grid; gap: 4px; padding: 18px 24px; border-radius: 999px 999px 18px 18px; background: var(--ink); color: var(--paper); text-align: center; min-width: 160px; }
.pt-code .muted { color: #B8C0B4; }
.pt-code b { font: 500 28px/1 var(--serif); letter-spacing: .04em; color: var(--janur); }
@media (max-width: 720px) { .pt-link { grid-template-columns: 1fr; } .pt-code { border-radius: 18px; } }
.choice-card b { font-size: 15px; }

/* ---------- office: tabel & komponen khusus admin ---------- */
.table .actions { text-align: right; white-space: nowrap; }
.table .actions > * + * { margin-left: 4px; }
.table .actions form { display: inline; }
.table .dim td { opacity: .5; }
.table td.primary { font-weight: 600; }
@media (max-width: 760px) {
  .table.responsive thead { display: none; }
  .table.responsive, .table.responsive tbody, .table.responsive tr, .table.responsive td { display: block; width: 100%; }
  .table.responsive tr { padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .table.responsive tr:last-child { border-bottom: 0; }
  .table.responsive td { border: 0; padding: 3px 0; }
  .table.responsive td[data-label] { display: grid; grid-template-columns: 100px 1fr; gap: 10px; }
  .table.responsive td[data-label]::before { content: attr(data-label); font-size: 12px; color: var(--muted); }
  .table.responsive td.primary { font-size: 15px; }
  .table.responsive .actions, .table.responsive .num { text-align: left; }
}
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
@media (max-width: 1100px) { .editor { grid-template-columns: 1fr; } }
details.inline-edit { position: relative; }
details.inline-edit > summary { list-style: none; cursor: pointer; }
details.inline-edit > summary::-webkit-details-marker { display: none; }
.table.matrix td.center, .table.matrix th.center { text-align: center; }
.table.matrix .matrix-check { width: 18px; height: 18px; accent-color: var(--ink); }
.table.matrix .matrix-group td { background: var(--paper); font-size: 12px; color: var(--muted); font-weight: 700; }
.art-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 14px; }
.art-item { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--white); display: grid; grid-template-rows: auto 1fr; }
.art-thumb { position: relative; height: 150px; background: repeating-conic-gradient(#F1F0E8 0 25%, #FBFBF7 0 50%) 0 0 / 16px 16px; display: grid; place-items: center; overflow: hidden; }
.art-thumb.art-sky { background: linear-gradient(180deg, var(--sk1, #E6D3DB), var(--sk2, #F6ECE8)); }
.art-thumb svg, .art-thumb img { width: 100%; height: 100%; object-fit: contain; fill: none; stroke: none; }
.art-badge { position: absolute; left: 8px; top: 8px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, .92); color: var(--ink-2); }
.art-badge.is-custom { background: var(--ok-tint); color: var(--ok); }
.art-body { padding: 12px 14px 14px; display: grid; gap: 4px; align-content: start; }
.art-body .row { gap: 6px; flex-wrap: wrap; }
.art-body input[type="file"] { max-width: 100%; font-size: 12.5px; }
.cc-title { font-weight: 700; }
.cc-sub { font-size: 12.5px; color: var(--muted); }
.input-group .prefix { display: grid; place-items: center; padding: 0 12px; background: var(--paper-2); color: var(--muted); }

/* ---------- halaman error ---------- */
.err-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--paper); }
.err { max-width: 460px; display: grid; justify-items: center; gap: 12px; text-align: center; }
.err-arch { display: grid; place-items: end center; width: 120px; height: 140px; padding-bottom: 18px; border: 2px solid var(--janur-2); border-bottom: 0; border-radius: 999px 999px 0 0; margin-bottom: 10px; }
.err-arch span { font: 500 34px/1 var(--serif); color: var(--janur-ink); }
.err h1 { font: 450 clamp(30px, 6vw, 40px)/1.1 var(--serif); letter-spacing: -.02em; }
.err-debug { text-align: left; white-space: pre-wrap; font-size: 12px; margin-top: 16px; background: var(--white); border: 1px solid var(--line); padding: 12px; border-radius: 12px; max-width: 90vw; overflow: auto; }
