/* Owner pages (success.html): the page shown right after payment and the manage dashboard.
   Design source: desain/kelola undangan/*.psd (739px artboards = 2x the CSS sizes here). */

:root {
  --k-bg: #f7f5f0;
  --k-ink: #1f1f1f;
  --k-card: #262626;
  --k-chip: #3b3b3b;
  --k-white: #ffffff;
  --k-soft: #f1eee8;
  --k-tile: #eae7e0;
  --k-line: #e5e1d9;
  --k-grey: #8c8a85;
  --k-grey2: #b9b6af;
  --k-green: #5f9a6e;
  --k-green-dot: #7fc48e;
  --k-red: #c4685c;
  --k-shadow: 0 5px 18px rgba(42, 38, 34, 0.07);
  --k-font: 'Google Sans Flex', 'Google Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--k-bg);
  color: var(--k-ink);
  font-family: var(--k-font);
  font-size: 14px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
svg.i { width: 1em; height: 1em; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.k-page { max-width: 480px; margin: 0 auto; min-height: 100vh; padding-bottom: 40px; }
.k-wrap { padding: 0 24px; }
.k-msg { padding: 80px 24px; text-align: center; color: var(--k-grey); }
.k-msg a { color: var(--k-ink); font-weight: 600; }

/* ---------- shared pieces ---------- */

.k-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 999px; background: var(--k-card); color: var(--k-white);
  font-weight: 600; text-decoration: none; padding: 0 18px; min-height: 40px;
}
.k-btn:disabled { opacity: 0.6; }
.k-btn .i { font-size: 16px; }
.k-btn-block { display: flex; width: 100%; min-height: 46px; font-size: 14px; }

.k-circle {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  border-radius: 50%; background: var(--k-white); color: var(--k-ink);
}
.k-circle.dark { background: var(--k-card); color: var(--k-white); }
.k-circle.soft { background: var(--k-soft); }

.k-chip {
  display: inline-flex; align-items: center; gap: 7px; border-radius: 999px;
  background: var(--k-chip); color: var(--k-white); font-weight: 500; font-size: 11.5px;
  padding: 6px 12px; white-space: nowrap;
}
.k-chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--k-green-dot); }
.k-chip.pending .dot { background: #e2b25c; }

.k-label { font-size: 10px; font-weight: 600; letter-spacing: 1.6px; color: var(--k-grey); text-transform: uppercase; }

.k-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  background: var(--k-card); color: var(--k-white); padding: 10px 18px; border-radius: 999px;
  font-size: 13px; opacity: 0; pointer-events: none; transition: 0.25s; z-index: 50; white-space: nowrap;
}
.k-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- save-the-link block (after payment + bottom sheet) ---------- */

.k-link-field {
  display: flex; align-items: center; gap: 10px; background: var(--k-white);
  border: 1px solid var(--k-line); border-radius: 16px; padding: 10px 10px 10px 10px;
}
.k-link-field .k-circle { width: 34px; height: 34px; font-size: 17px; }
.k-link-field .txt { flex: 1; min-width: 0; }
.k-link-field .txt small { display: block; font-size: 10.5px; font-weight: 500; color: var(--k-grey); }
.k-link-field .txt span { display: block; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-link-field .k-btn { min-height: 34px; padding: 0 16px; font-size: 12px; }

.k-save-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.k-save-tile {
  display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start;
  min-height: 102px; padding: 14px; border-radius: 20px; border: 1px solid var(--k-line);
  background: var(--k-white); color: var(--k-ink); text-align: left; text-decoration: none;
  font-size: 14px; font-weight: 600;
}
.k-save-tile.dark { background: var(--k-card); border-color: var(--k-card); color: var(--k-white); }
.k-save-tile .k-circle { width: 40px; height: 40px; font-size: 20px; }

.k-warn {
  display: flex; gap: 12px; align-items: center; margin-top: 16px; padding: 14px 16px;
  background: var(--k-soft); border-radius: 16px; font-size: 12px; line-height: 1.45;
}
.k-warn .i { font-size: 20px; }

/* ---------- page after payment ---------- */

.k-brand { font-weight: 600; font-size: 13px; padding: 34px 24px 14px; }
.k-hero {
  background: var(--k-card); color: var(--k-white); border-radius: 24px; padding: 24px 24px 22px;
}
.k-hero .k-circle { width: 48px; height: 48px; font-size: 26px; }
.k-hero .pre { margin: 30px 0 4px; font-size: 12px; opacity: 0.65; }
.k-hero h1 { margin: 0 0 14px; font-size: 28px; line-height: 1.18; font-weight: 600; }

.k-step { margin-top: 30px; }
.k-step h2 { margin: 6px 0 6px; font-size: 18px; font-weight: 600; }
.k-step p { margin: 0 0 16px; font-size: 12px; color: var(--k-grey); line-height: 1.5; }

.k-cta {
  display: flex; align-items: center; justify-content: space-between; margin-top: 30px;
  min-height: 54px; padding: 0 7px 0 24px; border-radius: 999px; background: var(--k-card);
  color: var(--k-white); font-size: 15px; font-weight: 600; text-decoration: none;
}
.k-cta .k-circle { width: 40px; height: 40px; font-size: 19px; }

/* ---------- dashboard ---------- */

.k-head {
  background: var(--k-card); color: var(--k-white); border-radius: 0 0 28px 28px;
  padding: 28px 24px 74px; position: relative;
}
.k-head .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.k-head .pre { font-size: 11px; font-weight: 500; opacity: 0.6; margin-top: 10px; }
.k-head h1 { margin: 10px 0 12px; font-size: 28px; line-height: 1.15; font-weight: 600; overflow-wrap: anywhere; }
.k-head .mono { width: 40px; height: 40px; background: var(--k-chip); color: var(--k-white); font-size: 12px; font-weight: 600; }
.k-head .when { display: flex; align-items: center; gap: 7px; margin-top: 16px; font-size: 11.5px; opacity: 0.75; }
.k-head .when .i { font-size: 15px; }

.k-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); margin: -50px 24px 0; position: relative;
  background: var(--k-white); border-radius: 20px; padding: 14px 0; box-shadow: 0 7px 22px rgba(42, 38, 34, 0.1);
}
.k-stats div { text-align: center; padding: 2px 6px; }
.k-stats div + div { border-left: 1px solid var(--k-line); }
.k-stats b { display: block; font-size: 23px; font-weight: 600; line-height: 1.2; }
.k-stats span { display: block; font-size: 10.5px; line-height: 1.25; color: var(--k-grey); margin-top: 2px; }

.k-sec-head { display: flex; justify-content: space-between; align-items: center; margin: 30px 0 14px; }
.k-sec-head h2 { margin: 0; font-size: 17px; font-weight: 600; }
.k-link-btn { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; padding: 4px 0; font-size: 11.5px; font-weight: 500; color: var(--k-grey); }
.k-link-btn.ink { color: var(--k-ink); }
.k-link-btn .i { font-size: 14px; }

.k-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.k-tile {
  position: relative; display: block; min-height: 150px; border-radius: 22px; padding: 14px;
  background: var(--k-tile); color: var(--k-ink); text-decoration: none;
}
.k-tile.dark { background: var(--k-card); color: var(--k-white); }
.k-tile .k-circle { width: 42px; height: 42px; font-size: 21px; }
.k-tile .ttl { position: absolute; left: 14px; bottom: 16px; font-size: 16px; font-weight: 600; line-height: 1.25; }
.k-tile .go { position: absolute; right: 12px; bottom: 12px; width: 32px; height: 32px; font-size: 15px; }
.k-tile:not(.dark) .go { background: var(--k-card); color: var(--k-white); }

.k-acc { margin-top: 10px; background: var(--k-white); border-radius: 20px; box-shadow: var(--k-shadow); }
.k-acc:first-of-type { margin-top: 16px; }
.k-acc-head {
  display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none;
  padding: 14px; text-align: left;
}
.k-acc-head > .k-circle { width: 42px; height: 42px; font-size: 21px; }
.k-acc-head .txt { flex: 1; min-width: 0; }
.k-acc-head .txt b { display: block; font-size: 15px; font-weight: 600; }
.k-acc-head .txt span { display: block; font-size: 11.5px; color: var(--k-grey); margin-top: 2px; }
.k-acc-head .chev { width: 30px; height: 30px; font-size: 16px; transition: transform 0.2s; }
.k-acc.open .k-acc-head .chev { transform: rotate(180deg); }
.k-acc-body { display: none; padding: 0 14px 16px; }
.k-acc.open .k-acc-body { display: block; }
.k-acc-body > hr, .k-hr { border: 0; border-top: 1px solid var(--k-line); margin: 0 0 14px; }
.k-sub-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 22px 0 10px; }
.k-sub-title h3 { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; font-weight: 600; }
.k-count { font-size: 9.5px; font-weight: 500; background: var(--k-soft); border-radius: 999px; padding: 3px 7px; }

/* access switch */
.k-access { display: flex; align-items: center; gap: 12px; background: var(--k-soft); border-radius: 15px; padding: 14px; cursor: pointer; }
.k-access > .i { font-size: 20px; }
.k-access .txt { flex: 1; min-width: 0; }
.k-access .txt b { display: block; font-size: 12.5px; font-weight: 600; }
.k-access .txt span { display: block; font-size: 10.5px; color: var(--k-grey); margin-top: 2px; line-height: 1.35; }
.k-switch { position: relative; width: 45px; height: 26px; flex-shrink: 0; }
.k-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.k-switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--k-grey2); transition: 0.2s; pointer-events: none; }
.k-switch span::after { content: ''; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: var(--k-white); transition: 0.2s; }
.k-switch input:checked + span { background: var(--k-card); }
.k-switch input:checked + span::after { transform: translateX(19px); }
.k-switch input:focus-visible + span { outline: 2px solid var(--k-ink); outline-offset: 2px; }

.k-textarea {
  display: block; width: 100%; min-height: 95px; resize: vertical; border: 0; border-radius: 13px;
  background: var(--k-soft); padding: 12px 14px; font-size: 14px; line-height: 1.55; margin-bottom: 10px;
}
.k-textarea::placeholder, .k-search input::placeholder { color: var(--k-grey2); }
.k-textarea:focus, .k-search input:focus { outline: 2px solid var(--k-line); }

.k-search { display: flex; align-items: center; gap: 8px; background: var(--k-soft); border-radius: 999px; padding: 0 16px; }
.k-search .i { font-size: 16px; color: var(--k-grey); }
.k-search input { flex: 1; min-width: 0; border: 0; background: none; padding: 12px 0; font-size: 14px; }
.k-search input:focus { outline: 0; }

.k-filters { display: flex; gap: 6px; margin: 12px -14px 4px; padding: 0 14px; overflow-x: auto; scrollbar-width: none; }
.k-filters::-webkit-scrollbar { display: none; }
.k-filter { flex-shrink: 0; border: 1px solid var(--k-line); background: var(--k-white); border-radius: 999px; padding: 7px 13px; font-size: 11.5px; }
.k-filter.on { background: var(--k-card); border-color: var(--k-card); color: var(--k-white); }

.k-guest { display: flex; align-items: center; gap: 10px; padding: 14px 0; }
.k-guest + .k-guest { border-top: 1px solid var(--k-line); }
.k-avatar { width: 36px; height: 36px; font-size: 11px; font-weight: 600; background: var(--k-soft); }
.k-guest .txt { flex: 1; min-width: 0; }
.k-guest .txt b { display: block; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.k-status { display: flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 11px; color: var(--k-grey); }
.k-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--k-grey2); flex-shrink: 0; }
.k-status.yes::before { background: var(--k-green); }
.k-status.no::before { background: var(--k-red); }
.k-acts { display: flex; gap: 4px; flex-shrink: 0; }
.k-act { width: 30px; height: 30px; border: 0; font-size: 14px; background: var(--k-soft); color: var(--k-ink); text-decoration: none; }
.k-act.del { color: var(--k-grey); }
.k-more { display: flex; align-items: center; justify-content: center; gap: 5px; width: 100%; border: 0; background: none; padding: 14px 0 0; font-size: 12px; font-weight: 500; }
.k-more .i { font-size: 14px; }
.k-empty { padding: 20px 6px; text-align: center; font-size: 12px; color: var(--k-grey); }

/* RSVP summary */
.k-rsvp-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.k-rsvp-tile { background: var(--k-soft); border-radius: 15px; padding: 12px 14px 14px; min-height: 85px; }
.k-rsvp-tile b { display: block; font-size: 27px; font-weight: 600; line-height: 1.2; }
.k-rsvp-tile span { display: block; font-size: 11px; color: var(--k-grey); margin-top: 3px; }
.k-rsvp-tile small { display: block; font-size: 9.5px; margin-top: 2px; opacity: 0.55; }
.k-rsvp-tile.dark { background: var(--k-card); color: var(--k-white); }
.k-rsvp-tile.dark span { color: rgba(255, 255, 255, 0.8); }

.k-progress { margin: 20px 0 22px; }
.k-progress .row { display: flex; justify-content: space-between; font-size: 11px; color: var(--k-grey); margin-bottom: 6px; }
.k-progress .row b { color: var(--k-ink); font-weight: 600; }
.k-progress .bar { height: 7px; border-radius: 7px; background: var(--k-soft); overflow: hidden; }
.k-progress .bar i { display: block; height: 100%; border-radius: 7px; background: var(--k-card); }

.k-timeline { position: relative; padding-left: 20px; }
.k-wish { position: relative; padding-bottom: 20px; }
.k-wish::before {
  content: ''; position: absolute; left: -20px; top: 4px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--k-white); border: 1.5px solid var(--k-card); box-sizing: border-box;
}
.k-wish:first-child::before { background: var(--k-card); }
.k-wish:not(:last-child)::after { content: ''; position: absolute; left: -15px; top: 18px; bottom: -2px; width: 1px; background: var(--k-line); }
.k-wish .name { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 12.5px; font-weight: 600; }
.k-badge { font-size: 9px; font-weight: 500; border-radius: 999px; padding: 3px 7px; background: var(--k-soft); color: var(--k-grey); }
.k-badge.yes { color: var(--k-green); }
.k-badge.no { color: var(--k-red); }
.k-wish p { margin: 5px 0 4px; font-size: 12px; font-style: italic; line-height: 1.45; color: #5c5a55; overflow-wrap: anywhere; }
.k-wish time { font-size: 9.5px; color: var(--k-grey2); }

.k-keep {
  display: flex; align-items: center; gap: 12px; margin-top: 20px; padding: 14px 14px 14px 18px;
  background: var(--k-soft); border-radius: 18px;
}
.k-keep > .i { font-size: 19px; }
.k-keep .txt { flex: 1; min-width: 0; }
.k-keep .txt b { display: block; font-size: 11.5px; font-weight: 600; }
.k-keep .txt span { display: block; font-size: 10.5px; color: var(--k-grey); margin-top: 1px; }
.k-keep .k-btn { min-height: 34px; padding: 0 16px; font-size: 11.5px; }

.k-pending {
  margin: 16px 24px 0; padding: 12px 14px; border-radius: 15px; background: #fbf0dc; font-size: 12px; line-height: 1.45;
}

/* bottom sheet with the save options */
.k-sheet-bg { position: fixed; inset: 0; background: rgba(20, 20, 20, 0.4); opacity: 0; pointer-events: none; transition: 0.2s; z-index: 40; }
.k-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; max-width: 480px; margin: 0 auto; z-index: 41;
  background: var(--k-bg); border-radius: 24px 24px 0 0; padding: 10px 24px calc(28px + env(safe-area-inset-bottom));
  transform: translateY(100%); transition: transform 0.25s;
}
.k-sheet::before { content: ''; display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--k-line); margin: 0 auto 16px; }
.k-sheet h2 { margin: 0 0 4px; font-size: 17px; font-weight: 600; }
.k-sheet p { margin: 0 0 14px; font-size: 12px; color: var(--k-grey); }
.k-sheet-open .k-sheet-bg { opacity: 1; pointer-events: auto; }
.k-sheet-open .k-sheet { transform: none; }
