/* ==========================================================
   DInvite — Aplikasi (dashboard & halaman masuk)
   ========================================================== */
:root {
    --bg: #f6f3ee;
    --surface: #ffffff;
    --surface-2: #faf8f4;
    --ink: #1c1917;
    --ink-2: #44403c;
    --muted: #78716c;
    --line: rgba(28, 25, 23, .09);
    --line-2: rgba(28, 25, 23, .16);
    --gold: #b8935a;
    --gold-2: #d4af7a;
    --gold-soft: #f3e9d8;
    --green: #3f7a4a; --green-soft: #e5f0e3;
    --red: #b24b4b;   --red-soft: #f7e3e3;
    --amber: #a8741f; --amber-soft: #f7ecd6;
    --wa: #1faa59;
    --serif: 'Cormorant Garamond', Georgia, serif;
    --sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --script: 'Great Vibes', cursive;
    --r: 16px;
    --r-sm: 10px;
    --shadow: 0 1px 2px rgba(28,25,23,.04), 0 10px 30px -14px rgba(28,25,23,.14);
    --side-w: 260px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; font-family: var(--sans); font-size: 15px; line-height: 1.6; color: var(--ink-2); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1, h2, h3 { color: var(--ink); margin: 0; line-height: 1.2; }
p { margin: 0; }
img { max-width: 100%; display: block; }
code { background: var(--gold-soft); color: #7a5a2c; padding: .1em .4em; border-radius: 5px; font-size: .88em; }
.ic { width: 1.1em; height: 1.1em; flex-shrink: 0; }
.muted { color: var(--muted); }
.d-block { display: block; }
.t-right { text-align: right; }
[hidden] { display: none !important; }

/* ---------- Tombol ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
    padding: .7rem 1.2rem; border-radius: 999px; border: 1px solid transparent;
    font: 600 .9rem/1.2 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap;
    transition: background .2s, border-color .2s, transform .2s, box-shadow .2s;
}
.btn:active { transform: translateY(1px); }
.btn--sm { padding: .5rem .95rem; font-size: .84rem; }
.btn--xs { padding: .35rem .7rem; font-size: .78rem; }
.btn--lg { padding: .95rem 1.5rem; font-size: .98rem; }
.btn--block { width: 100%; }
.btn--dark { background: var(--ink); color: #fff; box-shadow: 0 8px 20px -10px rgba(28,25,23,.6); }
.btn--dark:hover { background: #000; }
.btn--light { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.btn--light:hover { border-color: var(--ink); }
.btn--wa { background: var(--wa); color: #fff; }
.btn--wa:hover { background: #178c48; }
.btn--danger-ghost { background: transparent; color: var(--red); border-color: rgba(178,75,75,.3); }
.btn--danger-ghost:hover { background: var(--red-soft); }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); cursor: pointer; transition: background .2s, color .2s; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn--danger:hover { background: var(--red-soft); color: var(--red); }
.btn:focus-visible, .icon-btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- Sidebar ---------- */
.side {
    position: fixed; inset: 0 auto 0 0; width: var(--side-w); z-index: 40;
    display: flex; flex-direction: column; padding: 1.4rem 1rem 1rem;
    background: #171412; color: rgba(255,255,255,.65);
}
.side__brand { display: inline-flex; align-items: center; gap: .1rem; padding: 0 .6rem; margin-bottom: 1.8rem; font: 700 1.6rem var(--serif); color: #fff; text-decoration: none; }
.side__brand--dark { color: var(--ink); padding: 0; margin-bottom: 2.5rem; }
.mark { display: grid; place-items: center; width: 34px; height: 34px; margin-right: .35rem; border-radius: 10px; background: var(--gold-2); color: var(--ink); font-style: italic; font-size: 1.3rem; }
.side__brand--dark .mark { background: var(--ink); color: var(--gold-2); }
.side__nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.side__label { font-size: .68rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.35); padding: 1.1rem .75rem .45rem; }
.side__label--inv { color: var(--gold-2); letter-spacing: .04em; text-transform: none; font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side__nav a { display: flex; align-items: center; gap: .7rem; padding: .62rem .75rem; border-radius: 10px; text-decoration: none; font-weight: 500; font-size: .9rem; transition: background .2s, color .2s; }
.side__nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.side__nav a.is-active { background: rgba(212,175,122,.14); color: var(--gold-2); }
.side__admin { color: var(--gold-2) !important; background: rgba(212,175,122,.08); }
.imp-bar { position: sticky; top: 0; z-index: 35; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .4rem 1rem; padding: .55rem 1rem; background: #7c2d12; color: #fde7d7; font-size: .84rem; text-align: center; }
.imp-bar a { color: #fff; font-weight: 700; text-decoration: underline; }
.imp-bar + .topbar { top: 0; }
.side__btn { display: flex; align-items: center; gap: .7rem; width: 100%; padding: .62rem .75rem; border: 0; border-radius: 10px; background: none; color: inherit; font: 500 .9rem var(--sans); text-align: left; cursor: pointer; transition: background .2s, color .2s; }
.side__btn:hover { background: rgba(255,255,255,.06); color: #fff; }
.side__btn:disabled { opacity: .7; cursor: wait; }
.side__btn.is-busy .ic { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.side__user { display: grid; gap: .5rem; padding: .8rem 0 0; border-top: 1px solid rgba(255,255,255,.08); margin-top: .8rem; }
.side__me { display: flex; align-items: center; gap: .7rem; padding: .45rem .6rem; border-radius: 10px; text-decoration: none; transition: background .2s; }
.side__me:hover { background: rgba(255,255,255,.06); }
.side__me-txt { flex: 1; min-width: 0; line-height: 1.3; }
.side__user strong { display: block; color: #fff; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side__user small { font-size: .76rem; }
.side__user form { margin: 0; }
.side__logout {
    display: flex; align-items: center; justify-content: center; gap: .5rem; width: 100%;
    padding: .6rem .75rem; border-radius: 10px; border: 1px solid rgba(255,255,255,.12);
    background: transparent; color: rgba(255,255,255,.75); font: 600 .86rem var(--sans); cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
}
.side__logout:hover { background: rgba(224,107,107,.12); border-color: rgba(224,107,107,.4); color: #f4b4b4; }
.side__logout .ic { transform: rotate(0deg); }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--gold-2); color: var(--ink); font: 700 1.05rem var(--serif); flex-shrink: 0; }
.avatar--soft { background: var(--gold-soft); color: var(--gold); }
.side__backdrop { display: none; }

/* ---------- Main ---------- */
.main { margin-left: var(--side-w); min-height: 100vh; }
.topbar {
    position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 1rem;
    height: 68px; padding: 0 2rem;
    background: rgba(246,243,238,.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.topbar__title { font: 600 1.55rem var(--serif); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__actions { display: flex; gap: .5rem; }
.topbar__menu { display: none; }
.content { padding: 1.8rem 2rem 4rem; max-width: 1240px; }

/* ---------- Notifikasi ---------- */
.notice { padding: .85rem 1.1rem; border-radius: 12px; margin-bottom: 1.1rem; font-size: .9rem; border: 1px solid; }
.notice a { font-weight: 700; }
.notice--row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.notice--row .btn { color: #fff; }
.notice--success { background: var(--green-soft); color: #2d5c36; border-color: rgba(63,122,74,.2); }
.notice--error { background: var(--red-soft); color: #8e3434; border-color: rgba(178,75,75,.2); }
.notice--warn { background: var(--amber-soft); color: #7c5414; border-color: rgba(168,116,31,.2); }

.toast {
    position: fixed; left: 50%; bottom: 24px; z-index: 100; transform: translate(-50%, 20px);
    padding: .75rem 1.2rem; border-radius: 999px; background: var(--ink); color: #fff; font-size: .88rem; font-weight: 600;
    opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Kartu & form ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.5rem; margin-bottom: 1.25rem; }
.card__head { margin-bottom: 1.2rem; }
.card--row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 1.25rem; }
.card--row h2 { font-size: 1.05rem; font-weight: 700; }
.card--row form { margin: 0; }
.card__head h2 { font-size: 1.05rem; font-weight: 700; }
.card__head h3 { font-size: .95rem; font-weight: 700; }
.card__head p { color: var(--muted); font-size: .86rem; margin-top: .15rem; }
.card__head--row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.card__head--sub { margin: 1.5rem 0 .8rem; padding-top: 1.3rem; border-top: 1px solid var(--line); }

.stack { display: grid; gap: 1rem; }
.grid2, .grid3, .grid4 { display: grid; gap: 1rem; }
.grid2 { grid-template-columns: 1fr 1fr; }
.grid3 { grid-template-columns: repeat(3, 1fr); }
.grid4 { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
.grid2--top { align-items: start; }
.grid2 > .card { margin-bottom: 0; }
.grid2 + .card, .card + .grid2 { margin-top: 1.25rem; }

.fld { display: grid; gap: .35rem; align-content: start; }
.fld > span:first-child, .fld__label { font-size: .82rem; font-weight: 600; color: var(--ink); display: block; }
.fld__label { margin-bottom: .4rem; }
.fld small, .fld__label small { font-weight: 400; color: var(--muted); }
.fld--inline { max-width: 320px; margin-bottom: 1.2rem; }
.hint { font-size: .76rem; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=url],
input[type=date], input[type=time], input[type=search], input[type=number], select, textarea {
    width: 100%; padding: .7rem .9rem; border-radius: var(--r-sm);
    border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
    font: inherit; font-size: .92rem; transition: border-color .2s, box-shadow .2s;
}
textarea { resize: vertical; line-height: 1.55; }
select {
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
    padding-right: 2.6rem; cursor: pointer; line-height: inherit;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--muted) 50%),
        linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: calc(100% - 1.2rem) 52%, calc(100% - .85rem) 52%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}
select:hover { border-color: rgba(28,25,23,.3); }
select:focus {
    background-image:
        linear-gradient(45deg, transparent 50%, var(--gold) 50%),
        linear-gradient(135deg, var(--gold) 50%, transparent 50%);
}
select::-ms-expand { display: none; }
select option { color: var(--ink); background: var(--surface); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(184,147,90,.15); }
input:disabled { background: var(--surface-2); color: var(--muted); }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .86rem; cursor: pointer; }
.check input { margin-top: .25rem; accent-color: var(--ink); }
.check--sm { margin-top: .6rem; font-size: .82rem; }
.pw { position: relative; display: block; }
.pw input { padding-right: 4.5rem; }
.pw__toggle { position: absolute; right: .4rem; top: 50%; transform: translateY(-50%); border: 0; background: none; font: 600 .8rem var(--sans); color: var(--gold); cursor: pointer; padding: .4rem .6rem; }
.prefix { display: flex; align-items: stretch; border: 1px solid var(--line-2); border-radius: var(--r-sm); overflow: hidden; background: var(--surface); }
.prefix em { display: flex; align-items: center; padding: 0 .7rem; font-style: normal; font-size: .8rem; color: var(--muted); background: var(--surface-2); border-right: 1px solid var(--line); white-space: nowrap; }
.prefix input { border: 0; border-radius: 0; }
.prefix:focus-within { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(184,147,90,.15); }
.prefix input:focus { box-shadow: none; }

.seg { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); width: max-content; }
.seg label { position: relative; }
.seg input { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: .5rem 1.2rem; border-radius: 9px; font-weight: 600; font-size: .86rem; cursor: pointer; color: var(--muted); transition: all .2s; }
.seg input:checked + span { background: var(--ink); color: #fff; }
.seg input:focus-visible + span { outline: 2px solid var(--gold); }

/* ---------- Dashboard ---------- */
.hello { margin-bottom: 1.5rem; }
.hello h2 { font: 600 2rem var(--serif); }
.hello p { color: var(--muted); }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.6rem; }
.kpi { display: flex; align-items: center; gap: .9rem; padding: 1.15rem 1.2rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.kpi strong { display: block; font: 600 1.7rem/1.1 var(--serif); color: var(--ink); }
.kpi small { color: var(--muted); font-size: .8rem; }
.kpi__ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--gold-soft); color: var(--gold); flex-shrink: 0; }
.kpi--green .kpi__ic { background: var(--green-soft); color: var(--green); }
.kpi--red .kpi__ic { background: var(--red-soft); color: var(--red); }
.kpi--amber .kpi__ic { background: var(--amber-soft); color: var(--amber); }

.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.25rem; }
.inv-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: box-shadow .25s, transform .25s; }
.inv-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.inv-card__preview { position: relative; display: grid; place-items: center; height: 190px; padding: 1.2rem; text-decoration: none; overflow: hidden; }
.inv-card__preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .28; }
.inv-card__frame { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem; width: 100%; height: 100%; border: 1px solid currentColor; border-radius: 10px; text-align: center; }
.inv-card__frame small { font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; opacity: .85; }
.script { font-family: var(--script); font-size: 2.2rem; line-height: 1.1; }
.badge { position: absolute; top: 12px; right: 12px; padding: .25rem .65rem; border-radius: 999px; font-size: .72rem; font-weight: 700; }
.badge--live { background: var(--green); color: #fff; }
.badge--draft { background: rgba(255,255,255,.9); color: var(--ink-2); }
.inv-card__body { padding: 1.1rem 1.2rem 1.2rem; }
.inv-card__head h3 { font-size: 1.05rem; }
.inv-card__head small { color: var(--muted); font-size: .8rem; }
.mini-stats { display: flex; gap: 1.2rem; list-style: none; padding: .8rem 0; margin: .8rem 0; border-block: 1px solid var(--line); font-size: .82rem; color: var(--muted); }
.mini-stats strong { color: var(--ink); font-size: .95rem; }
.inv-card__link { display: flex; gap: .4rem; margin-bottom: .8rem; }
.inv-card__link input { font-size: .78rem; padding: .45rem .7rem; background: var(--surface-2); color: var(--muted); }
.inv-card__label { display: block; font-size: .76rem; font-weight: 600; color: var(--ink-2); margin-bottom: .35rem; }
.inv-card__label small { font-weight: 400; color: var(--muted); }
.inv-card__tip { display: flex; align-items: flex-start; gap: .45rem; line-height: 1.45; margin: -.3rem 0 .9rem; font-size: .78rem; color: var(--muted); }
.inv-card__tip .ic { margin-top: .1rem; }
.inv-card__tip a { color: var(--gold); font-weight: 700; }
.inv-card__actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.inv-card__actions form { margin: 0 0 0 auto; }

.empty { text-align: center; padding: 3.5rem 1.5rem; background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--r); }
.empty--sm { padding: 2.5rem 1rem; border: 0; }
.empty__art { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--gold-soft); color: var(--gold); margin-bottom: 1rem; }
.empty__art .ic { width: 28px; height: 28px; }
.empty h3 { font: 600 1.5rem var(--serif); margin-bottom: .3rem; }
.empty p { color: var(--muted); margin-bottom: 1.3rem; }
.empty--sm p { margin-bottom: 0; }

/* ---------- Tema (preview kecil) ---------- */
.th-ivory    { background: linear-gradient(160deg, #fffaf2, #efe3cf); color: #8a6a3a; }
.th-midnight { background: radial-gradient(circle at 50% 0%, #3a3127, #141110 75%); color: #d4af7a; }
.th-sage     { background: linear-gradient(160deg, #e9eee3, #c7d3bd); color: #4d6146; }
.th-rose     { background: linear-gradient(160deg, #fdf2f0, #f1d5d0); color: #a35d5d; }
.th-batik    { background: radial-gradient(circle at 25% 25%, rgba(243,220,181,.14) 2px, transparent 3px) 0 0 / 18px 18px, linear-gradient(160deg, #6b3a1f, #3d1f10); color: #f3dcb5; }
.th-ocean    { background: linear-gradient(160deg, #e6f2f5, #b8d8e0); color: #2f6475; }

/* ---------- Editor ---------- */
.editor { display: grid; grid-template-columns: 180px 1fr; gap: 1.6rem; align-items: start; }
.editor__nav { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 2px; }
.editor__nav a { padding: .5rem .8rem; border-radius: 9px; font-size: .86rem; font-weight: 500; color: var(--muted); text-decoration: none; border-left: 2px solid transparent; }
.editor__nav a:hover { color: var(--ink); background: var(--surface); }
.editor__nav a.is-active { color: var(--ink); background: var(--surface); border-left-color: var(--gold); }
.editor__body { min-width: 0; }

.theme-pick { display: grid; grid-template-columns: repeat(6, 1fr); gap: .8rem; }
.theme-opt { position: relative; cursor: pointer; text-align: center; }
.theme-opt input { position: absolute; opacity: 0; pointer-events: none; }
.theme-opt__card { position: relative; display: grid; place-items: center; aspect-ratio: 3 / 4; padding: .5rem; border-radius: 12px; border: 2px solid transparent; outline: 1px solid var(--line); transition: transform .2s, border-color .2s; }
.theme-opt__frame { display: grid; place-items: center; width: 100%; height: 100%; border: 1px solid currentColor; border-radius: 7px; }
.theme-opt__frame .script { font-size: 1.35rem; }
.theme-opt__name { display: block; margin-top: .45rem; font-size: .78rem; font-weight: 600; color: var(--ink-2); }
.theme-opt:hover .theme-opt__card { transform: translateY(-2px); }
.theme-opt input:checked + .theme-opt__card { border-color: var(--ink); box-shadow: 0 0 0 3px var(--gold-2); }
.theme-opt input:focus-visible + .theme-opt__card { box-shadow: 0 0 0 3px var(--gold); }
.theme-opt.is-locked { cursor: not-allowed; }
.theme-opt.is-locked .theme-opt__card { filter: saturate(.5); opacity: .65; }
.lock { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); padding: .15rem .5rem; border-radius: 999px; background: var(--ink); color: var(--gold-2); font-size: .65rem; font-weight: 700; }

.person + .person { margin-top: 1.4rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.person__title { font-size: .9rem; font-weight: 700; margin-bottom: .8rem; color: var(--gold); }

.repeat { display: grid; gap: .9rem; }
.repeat__item { position: relative; display: grid; gap: .9rem; padding: 1.1rem 3rem 1.1rem 1.1rem; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.repeat__del { position: absolute; top: .7rem; right: .7rem; display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.repeat__del:hover { background: var(--red-soft); color: var(--red); }

.drop { position: relative; display: grid; place-items: center; height: 200px; border-radius: 12px; border: 1.5px dashed var(--line-2); background: var(--surface-2); cursor: pointer; overflow: hidden; transition: border-color .2s; }
.drop:hover { border-color: var(--gold); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop__img { position: absolute; inset: 0; background: center / cover no-repeat; }
.drop__txt { position: relative; display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .9rem; border-radius: 999px; background: rgba(255,255,255,.92); font-size: .84rem; font-weight: 600; color: var(--ink); box-shadow: var(--shadow); pointer-events: none; }
.drop--small { height: 80px; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: .5rem; margin-top: .7rem; }
.thumb { position: relative; display: block; border-radius: 9px; overflow: hidden; aspect-ratio: 1; cursor: pointer; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb__del { position: absolute; inset: auto 0 0; display: flex; align-items: center; gap: .3rem; padding: .25rem .4rem; background: rgba(28,25,23,.7); color: #fff; font-size: .7rem; }
.thumb:has(input:checked) img { opacity: .35; }
.locked { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; padding: .9rem 1rem; border-radius: 12px; background: var(--gold-soft); color: #7a5a2c; font-size: .86rem; }
.locked a { font-weight: 700; }

.savebar {
    position: sticky; bottom: 1rem; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
    padding: .8rem .8rem .8rem 1.3rem; border-radius: 999px; background: rgba(28,25,23,.94); color: rgba(255,255,255,.7);
    backdrop-filter: blur(10px); box-shadow: 0 18px 40px -16px rgba(28,25,23,.6);
}
.savebar__txt { font-size: .84rem; }
.savebar__btns { display: flex; gap: .5rem; }
.savebar .btn--dark { background: var(--gold-2); color: var(--ink); }
.savebar .btn--dark:hover { background: #e2c08e; }
.savebar .btn--light { background: transparent; color: #fff; border-color: rgba(255,255,255,.25); }

/* ---------- Tamu ---------- */
.split { display: grid; grid-template-columns: 340px 1fr; gap: 1.25rem; align-items: start; }
.split__main { min-width: 0; }
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); margin-bottom: 1rem; }
.tabs button, .tabs a { padding: .42rem .9rem; border: 0; border-radius: 9px; background: none; font: 600 .82rem var(--sans); color: var(--muted); cursor: pointer; text-decoration: none; }
.tabs .is-active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.tabs--links { margin: 0; }
.msg-tpl { font-size: .84rem; margin-bottom: .7rem; }
.search input { width: 220px; padding: .5rem .9rem; border-radius: 999px; }

.table-wrap { overflow-x: auto; margin: 0 -1.5rem; }
.table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.table th { text-align: left; padding: .6rem 1.5rem; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.table td { padding: .8rem 1.5rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:hover td { background: #fdfcfa; }
.table strong { color: var(--ink); }
.link-cell { display: block; max-width: 280px; margin-top: .15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8rem; color: var(--muted); }
.actions { white-space: nowrap; }
.actions > * { display: inline-flex; vertical-align: middle; }
.actions form { margin: 0; }
.pill { display: inline-block; padding: .18rem .6rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: .74rem; font-weight: 600; color: var(--ink-2); }
.pill--hadir { background: var(--green-soft); color: var(--green); border-color: transparent; }
.pill--tidak { background: var(--red-soft); color: var(--red); border-color: transparent; }
.pill--ragu { background: var(--amber-soft); color: var(--amber); border-color: transparent; }
.danger-zone { display: flex; justify-content: flex-end; margin: 1rem 0 0; }
.tabs--mb { margin-bottom: 1rem; }
.pill--sm { font-size: .68rem; padding: .1rem .5rem; vertical-align: middle; }
.status-cell .pill { white-space: nowrap; }

/* ---------- QR check-in ---------- */
.checkin-stat { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: 1.1rem; }
.checkin-stat div { padding: .8rem .9rem; border-radius: 12px; background: var(--green-soft); }
.checkin-stat strong { display: block; font: 600 1.6rem/1.1 var(--serif); color: var(--green); }
.checkin-stat small { color: #4c6b51; font-size: .78rem; }
.stack--mt { margin-top: .8rem; }
.hide-sm { display: contents; }
.show-sm { display: none; }
.btn-row { gap: .5rem; flex-wrap: wrap; margin-top: 1rem; }
@media (max-width: 600px) {
    .hide-sm { display: none; }
    .show-sm { display: flex; }
}

.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 1rem; background: rgba(28,25,23,.55); backdrop-filter: blur(4px); }
.modal__box { position: relative; width: min(400px, 100%); max-height: 100%; overflow-y: auto; padding: 1.5rem; border-radius: 20px; background: var(--surface); box-shadow: 0 30px 70px -20px rgba(0,0,0,.45); text-align: center; }
.modal__box h2 { font: 600 1.5rem var(--serif); margin-bottom: 1rem; }
.modal__close { position: absolute; top: .8rem; right: .8rem; }
.modal__btns { display: flex; gap: .5rem; justify-content: center; margin-top: 1rem; }
.qr-canvas { display: block; width: 100%; height: auto; border-radius: 14px; box-shadow: var(--shadow); }

.ci-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .7rem; }
.ci-grid div { padding: .9rem 1rem; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.ci-grid div:first-child { background: var(--green-soft); border-color: transparent; }
.ci-grid strong { display: block; font: 600 1.7rem/1.1 var(--serif); color: var(--ink); }
.ci-grid div:first-child strong { color: var(--green); }
.ci-grid small { color: var(--muted); font-size: .78rem; }
.card .bar--ci { margin: 1rem 0 .4rem; }
.arrivals { list-style: none; padding: 0; margin: 1rem 0 0; max-height: 360px; overflow-y: auto; }
.arrivals li { display: flex; align-items: center; gap: .9rem; padding: .65rem 0; border-top: 1px solid var(--line); font-size: .9rem; }
.arrivals__time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .82rem; width: 3rem; flex-shrink: 0; }
.arrivals__name { flex: 1; min-width: 0; }
.arrivals__name strong { color: var(--ink); }
.ci-empty { margin-top: 1rem; font-size: .88rem; }
@media (max-width: 900px) { .ci-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- RSVP ---------- */
.bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--line); margin: -.4rem 0 1.4rem; }
.bar__seg--green { background: var(--green); }
.bar__seg--amber { background: #d6a14b; }
.bar__seg--red { background: #cf7a7a; }
.wishes { list-style: none; padding: 0; margin: 0; }
.wish { display: flex; gap: .9rem; padding: 1rem 0; border-top: 1px solid var(--line); }
.wish:first-child { border-top: 0; padding-top: 0; }
.wish__body { flex: 1; min-width: 0; }
.wish__head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .2rem; }
.wish__head strong { color: var(--ink); }
.wish p { font-size: .9rem; overflow-wrap: anywhere; }
.wish form { margin: 0; }

/* ---------- Akun ---------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.plan-box { display: flex; flex-direction: column; padding: 1.3rem; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); }
.plan-box.is-current { border-color: var(--green); background: #fbfdfb; }
.plan-box.is-wanted { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.plan-box__head { display: flex; justify-content: space-between; align-items: center; }
.plan-box h3 { font: 600 1.4rem var(--serif); }
.plan-box__price { margin: .4rem 0 1rem; }
.plan-box__price strong { font: 600 1.6rem var(--serif); color: var(--ink); }
.plan-box ul { list-style: none; padding: 0; margin: 0 0 1.2rem; display: grid; gap: .45rem; font-size: .86rem; flex: 1; }
.plan-box li { display: flex; gap: .5rem; align-items: center; }
.plan-box li .ic { color: var(--gold); }
.plan-box form { margin: 0; }

/* ---------- Halaman masuk/daftar ---------- */
.auth { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; background: var(--surface); }
.auth__art {
    position: relative; display: grid; place-items: center; padding: 3rem; overflow: hidden;
    background: radial-gradient(circle at 20% 15%, rgba(212,175,122,.35), transparent 50%), radial-gradient(circle at 85% 90%, rgba(201,138,138,.25), transparent 50%), #171412;
    color: #fff; text-align: center;
}
.auth__art::before { content: ''; position: absolute; inset: 28px; border: 1px solid rgba(212,175,122,.35); border-radius: 22px; }
.auth__art::after { content: ''; position: absolute; inset: 38px; border: 1px solid rgba(212,175,122,.15); border-radius: 16px; }
.auth__art-inner { position: relative; z-index: 1; }
.auth__script { font: 3.2rem/1 var(--script); color: var(--gold-2); }
.auth__big { font: 600 2.8rem/1.1 var(--serif); margin: .3rem 0 1rem; }
.auth__small { color: rgba(255,255,255,.6); }
.auth__panel { display: flex; flex-direction: column; justify-content: center; width: 100%; max-width: 460px; margin: 0 auto; padding: 3rem 1.5rem; }
.auth__title { font: 600 2.1rem var(--serif); }
.auth__sub { color: var(--muted); margin: .3rem 0 1.8rem; }
.auth__foot { margin-top: 1.5rem; text-align: center; color: var(--muted); font-size: .9rem; }
.auth__foot a { color: var(--ink); font-weight: 700; }

/* ---------- Responsif ---------- */
@media (max-width: 1100px) {
    .theme-pick { grid-template-columns: repeat(3, 1fr); }
    .split { grid-template-columns: 1fr; }
    .editor { grid-template-columns: 1fr; }
    .editor__nav { position: sticky; top: 68px; z-index: 15; flex-direction: row; overflow-x: auto; margin: -1rem -2rem 0; padding: .6rem 2rem; background: rgba(246,243,238,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
    .editor__nav a { white-space: nowrap; border-left: 0; border-bottom: 2px solid transparent; border-radius: 0; }
    .editor__nav a.is-active { border-bottom-color: var(--gold); background: none; }
}

@media (max-width: 900px) {
    .side { transform: translateX(-100%); visibility: hidden; transition: transform .3s ease, visibility .3s; }
    body.side-open .side { transform: none; visibility: visible; box-shadow: 20px 0 50px rgba(0,0,0,.25); }
    body.side-open .side__backdrop { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(28,25,23,.45); }
    .main { margin-left: 0; }
    .topbar { padding: 0 1rem; }
    .topbar__menu { display: inline-grid; }
    .topbar__title { font-size: 1.3rem; }
    .content { padding: 1.3rem 1rem 4rem; }
    .editor__nav { margin: -.5rem -1rem 0; padding: .5rem 1rem; }
    .kpis { grid-template-columns: 1fr 1fr; }
    .grid3, .grid4, .plans { grid-template-columns: 1fr; }
    .grid2 { grid-template-columns: 1fr; }
    .grid2 > .card + .card { margin-top: 0; }
    .auth { grid-template-columns: 1fr; }
    .auth__art { display: none; }
}

@media (max-width: 600px) {
    .inv-grid { grid-template-columns: 1fr; }
    .card { padding: 1.15rem; }
    .theme-pick { grid-template-columns: repeat(3, 1fr); gap: .6rem; }
    .search, .search input { width: 100%; }
    .table-wrap { margin: 0; }
    .table thead { display: none; }
    .table, .table tbody, .table tr, .table td { display: block; }
    .table tr { padding: .9rem 0; border-bottom: 1px solid var(--line); }
    .table td { padding: .2rem 0; border: 0; }
    .table td.t-right { text-align: left; padding-top: .6rem; }
    .link-cell { max-width: 100%; }
    .savebar { border-radius: 16px; padding: .6rem; bottom: .6rem; }
    .savebar__txt { display: none; }
    .savebar__btns { flex: 1; }
    .savebar__btns .btn { flex: 1; padding: .65rem .8rem; }
    .hello h2 { font-size: 1.6rem; }
    .topbar__actions .btn { padding: .45rem .8rem; }
}

/* ---------- Tagihan paket (halaman akun) ---------- */
.bill { border-color: rgba(168,116,31,.45); background: linear-gradient(180deg, #fffcf6, var(--surface)); }
.bill__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; padding-bottom: 1.1rem; margin-bottom: 1.1rem; border-bottom: 1px solid var(--line); }
.bill__head h2 { font: 600 1.6rem var(--serif); margin: .4rem 0 .1rem; }
.bill__amount { text-align: right; display: grid; justify-items: end; gap: .2rem; }
.bill__amount small { color: var(--muted); font-size: .78rem; }
.bill__amount strong { font: 600 2rem/1 var(--serif); color: var(--ink); }
.bill__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.bill__sub { font-size: .9rem; font-weight: 700; margin-bottom: .7rem; }
.bill__note { margin-top: .7rem; }
.bill__btns { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }
.bill__btns form { margin: 0; }
.banks { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.banks li { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .75rem .9rem; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.banks li > span { display: grid; }
.banks strong { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.banks__num { font: 600 1.25rem var(--serif); color: var(--ink); letter-spacing: .03em; }
@media (max-width: 900px) {
    .bill__grid { grid-template-columns: 1fr; }
    .bill__amount { text-align: left; justify-items: start; }
}
