/* Kirtara design system — palet "Senja": plum, coral, gold, cream. Mobile-first. */
:root {
  --plum: #3a1450; --plum-2: #5b2a86; --plum-3: #7b4aa6; --plum-50: #f4ecf8; --plum-100: #e9dcf1;
  --coral: #ff7a59; --coral-2: #ff9b80; --coral-50: #fff0eb;
  --gold: #ffc857; --gold-2: #ffd98a; --gold-50: #fff7e3;
  --cream: #fff8f3; --paper: #ffffff;
  --ink: #241032; --ink-2: #4b3a57; --muted: #7a6a85; --line: #eee3ea; --line-2: #e2d3dd;
  --ok: #1c8a50; --ok-50: #e5f6ec; --warn: #b26a00; --warn-50: #fff3dc; --bad: #c2384a; --bad-50: #fde9ec; --info: #2f5fb3; --info-50: #e8effc;
  --r-sm: 10px; --r: 16px; --r-lg: 24px; --r-xl: 32px;
  --shadow-sm: 0 1px 2px rgba(58, 20, 80, .06), 0 2px 8px rgba(58, 20, 80, .05);
  --shadow: 0 10px 30px -12px rgba(58, 20, 80, .25);
  --shadow-lg: 0 30px 60px -24px rgba(58, 20, 80, .45);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--ink); background: var(--cream); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: var(--plum-2); text-decoration: none; }
a:hover { color: var(--coral); }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.2; letter-spacing: -.015em; color: var(--plum); }
h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 800; }
h2 { font-size: 1.25rem; font-weight: 800; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 .8em; }
small, .small { font-size: .85rem; }
.muted { color: var(--muted); }
.icon { width: 20px; height: 20px; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--gold-2); color: var(--plum); }
.hidden { display: none !important; }

/* ---------- Buttons ---------- */
.btn { --bg: var(--plum); --fg: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border: 0; border-radius: 12px; background: var(--bg); color: var(--fg); font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; transition: transform .15s var(--ease), box-shadow .2s var(--ease), background .2s; position: relative; overflow: hidden; white-space: nowrap; }
.btn:hover { color: var(--fg); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0) scale(.98); }
.btn .icon { width: 18px; height: 18px; }
.btn--coral { --bg: var(--coral); }
.btn--gold { --bg: var(--gold); --fg: var(--plum); }
.btn--ghost { --bg: transparent; --fg: var(--plum); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.btn--ghost:hover { --bg: var(--plum-50); box-shadow: inset 0 0 0 1.5px var(--plum-100); }
.btn--soft { --bg: var(--plum-50); --fg: var(--plum); }
.btn--danger { --bg: var(--bad-50); --fg: var(--bad); }
.btn--sm { min-height: 36px; padding: 6px 12px; font-size: .9rem; border-radius: 10px; }
.btn--block { width: 100%; }
.btn[disabled], .btn.is-loading { opacity: .65; pointer-events: none; }
.btn.is-loading::after { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--plum-2); font-weight: 700; cursor: pointer; }
.link-btn:hover { color: var(--coral); }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label, .label { font-weight: 700; font-size: .9rem; color: var(--ink-2); }
.field__hint { font-size: .82rem; color: var(--muted); margin: 0; }
.field__error { font-size: .85rem; color: var(--bad); margin: 0; font-weight: 600; }
.input, select.input, textarea.input { width: 100%; min-height: 46px; padding: 11px 14px; border: 1.5px solid var(--line-2); border-radius: 12px; background: #fff; font: inherit; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.input:hover { border-color: var(--plum-100); }
.input:focus { outline: 0; border-color: var(--plum-3); box-shadow: 0 0 0 4px rgba(123, 74, 166, .14); }
.input[aria-invalid="true"] { border-color: var(--bad); }
.input-group { display: flex; align-items: stretch; border: 1.5px solid var(--line-2); border-radius: 12px; background: #fff; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.input-group:focus-within { border-color: var(--plum-3); box-shadow: 0 0 0 4px rgba(123, 74, 166, .14); }
.input-group .input { border: 0; box-shadow: none !important; min-width: 0; }
.input-group__addon { display: flex; align-items: center; padding: 0 4px 0 14px; color: var(--muted); font-size: .9rem; white-space: nowrap; }
.input-group__btn { border: 0; background: none; padding: 0 14px; color: var(--muted); cursor: pointer; }
.input-group__btn:hover { color: var(--plum); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--ink-2); cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--plum-2); flex: none; }
.strength { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.strength__bar { height: 100%; width: 0; border-radius: inherit; background: var(--bad); transition: width .3s var(--ease), background .3s; }
.slug-status { font-size: .85rem; font-weight: 600; min-height: 1.3em; }
.slug-status.is-ok { color: var(--ok); }
.slug-status.is-bad { color: var(--bad); }
.otp { display: flex; gap: 8px; justify-content: center; }
.otp input { width: 48px; height: 58px; text-align: center; font-size: 1.5rem; font-weight: 800; border: 1.5px solid var(--line-2); border-radius: 14px; color: var(--plum); background: #fff; transition: border-color .15s, transform .15s, box-shadow .15s; }
.otp input:focus { outline: 0; border-color: var(--plum-3); box-shadow: 0 0 0 4px rgba(123, 74, 166, .14); transform: translateY(-2px); }
.otp input.is-filled { border-color: var(--plum-3); background: var(--plum-50); }
.otp.is-error input { border-color: var(--bad); animation: shake .35s; }

/* ---------- Chips & badges ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; font-size: .78rem; font-weight: 700; background: var(--plum-50); color: var(--plum-2); white-space: nowrap; }
.chip--ok { background: var(--ok-50); color: var(--ok); }
.chip--warn { background: var(--warn-50); color: var(--warn); }
.chip--bad { background: var(--bad-50); color: var(--bad); }
.chip--info { background: var(--info-50); color: var(--info); }
.chip--gold { background: var(--gold-50); color: #8a5a00; }
.chip--coral { background: var(--coral-50); color: #c24a2c; }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip--live .dot { animation: pulse 1.8s infinite; }

/* ---------- Surfaces ---------- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow-sm); }
.card + .card { margin-top: 16px; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card__head h2, .card__head h3 { margin: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.divider { height: 1px; background: var(--line); margin: 18px 0; border: 0; }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty .icon { width: 40px; height: 40px; margin: 0 auto 10px; color: var(--plum-100); }

/* ---------- Toasts ---------- */
.toasts { position: fixed; z-index: 90; top: 16px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 10px; width: min(92vw, 440px); pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; background: var(--plum); color: #fff; box-shadow: var(--shadow-lg); animation: toastIn .45s var(--ease) both; font-weight: 600; }
.toast .icon { margin-top: 1px; }
.toast--success, .toast--celebrate { background: linear-gradient(135deg, var(--plum), var(--plum-2)); }
.toast--error { background: #8f1f33; }
.toast--info { background: #2b2140; }
.toast__close { margin-left: auto; background: none; border: 0; color: inherit; opacity: .7; cursor: pointer; padding: 0; }
.toast.is-leaving { animation: toastOut .3s var(--ease) forwards; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 95; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 14px; border-radius: 3px; animation: fall linear forwards; }

/* ---------- Auth layout ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr; }
.auth__brand { position: relative; overflow: hidden; color: #fff; padding: 28px 24px 36px; background: radial-gradient(120% 90% at 10% 0%, var(--plum-2) 0%, var(--plum) 55%, #24092f 100%); }
.auth__brand::before { content: ""; position: absolute; width: 520px; height: 520px; right: -200px; bottom: -260px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 122, 89, .55), transparent 65%); filter: blur(10px); animation: float 12s ease-in-out infinite; }
.auth__brand::after { content: ""; position: absolute; width: 360px; height: 360px; left: -160px; top: 30%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 200, 87, .32), transparent 65%); animation: float 14s ease-in-out infinite reverse; }
.auth__brand > * { position: relative; z-index: 1; }
.auth__logo img { height: 34px; width: auto; }
.auth__pitch { margin-top: 28px; max-width: 460px; }
.auth__pitch h2 { color: #fff; font-size: clamp(1.4rem, 3.4vw, 2.3rem); line-height: 1.15; }
.auth__pitch h2 em { font-style: normal; color: var(--gold); }
.auth__pitch p { color: #e8d9f0; }
.orbit { display: none; }
.auth__main { display: flex; align-items: center; justify-content: center; padding: 28px 16px 48px; }
.auth__card { width: min(100%, 440px); }
.auth__card h1 { font-size: 1.7rem; }
.auth__switch { text-align: center; margin-top: 18px; color: var(--muted); }
.auth__foot { text-align: center; color: var(--muted); font-size: .8rem; margin-top: 26px; }
.mascot { position: absolute; z-index: 2; right: 26px; top: 22px; width: 64px; height: 64px; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .35)); animation: bob 4s ease-in-out infinite; }
.mascot__star { fill: var(--coral); }
.mascot__eye { fill: #fff; }
.mascot__pupil { fill: var(--plum); transition: transform .08s linear; }
@media (min-width: 900px) {
  .auth { grid-template-columns: minmax(380px, 1.05fr) 1fr; }
  .auth__brand { padding: 44px 52px; display: flex; flex-direction: column; }
  .auth__pitch { margin-top: auto; margin-bottom: auto; }
  .mascot { width: 96px; height: 96px; right: 60px; top: 70px; }
  .orbit { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
  .orbit span { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 99px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); font-size: .85rem; font-weight: 600; backdrop-filter: blur(6px); animation: rise .6s var(--ease) both; }
  .orbit span .icon { width: 16px; height: 16px; color: var(--gold); }
  .auth__main { padding: 48px; }
}

/* ---------- App shell (akun) ---------- */
.topbar { position: sticky; top: 0; z-index: 40; background: rgba(255, 248, 243, .86); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.topbar__in { max-width: 1160px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.topbar__logo img { height: 28px; width: auto; }
.nav { display: none; gap: 4px; margin-left: 12px; }
.nav a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; color: var(--ink-2); font-weight: 600; font-size: .92rem; }
.nav a:hover { background: var(--plum-50); color: var(--plum); }
.nav a.is-active { background: var(--plum); color: #fff; }
.topbar__right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 12px; }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary:hover { background: var(--plum-50); }
.menu__panel { position: absolute; right: 0; top: calc(100% + 8px); min-width: 260px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 8px; animation: pop .18s var(--ease); z-index: 50; }
.menu__panel a, .menu__panel button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--ink); font: inherit; font-weight: 600; background: none; border: 0; cursor: pointer; text-align: left; }
.menu__panel a:hover, .menu__panel button:hover { background: var(--plum-50); color: var(--plum); }
.menu__label { padding: 8px 12px 4px; font-size: .75rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.menu--left .menu__panel { left: 0; right: auto; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .85rem; color: #fff; background: linear-gradient(135deg, var(--coral), var(--plum-2)); flex: none; }
.avatar--sq { border-radius: 12px; }
.ws-pill { display: flex; align-items: center; gap: 8px; max-width: 220px; }
.ws-pill__name { font-weight: 700; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page { max-width: 1160px; margin: 0 auto; padding: 22px 16px 110px; }
.page__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page__head p { margin: 0; }
.tabbar { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(255, 255, 255, .94); backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; border-radius: 12px; color: var(--muted); font-size: .72rem; font-weight: 700; }
.tabbar a.is-active { color: var(--plum); background: var(--plum-50); }
.tabbar .icon { width: 22px; height: 22px; }
@media (min-width: 860px) {
  .nav { display: flex; }
  .tabbar { display: none; }
  .page { padding: 32px 24px 64px; }
}

/* ---------- Home ---------- */
.hello { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: 26px 22px; color: #fff; background: radial-gradient(120% 140% at 100% 0%, var(--plum-3) 0%, var(--plum) 55%, #2a0b3a 100%); box-shadow: var(--shadow); margin-bottom: 26px; }
.hello::after { content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 200, 87, .45), transparent 65%); animation: float 10s ease-in-out infinite; }
.hello > * { position: relative; z-index: 1; }
.hello h1 { color: #fff; margin-bottom: 6px; }
.hello p { color: #ead9f2; margin: 0; }
.hello__stats { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.hello__stat { padding: 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .15); font-size: .85rem; color: #f3e8f8; }
.hello__stat b { display: block; font-size: 1.2rem; color: #fff; }
.hello__star { position: absolute; right: 22px; bottom: 18px; width: 54px; height: 54px; z-index: 1; color: var(--gold); animation: spinSlow 16s linear infinite; opacity: .9; }
.section-title { display: flex; align-items: center; gap: 10px; margin: 28px 0 14px; }
.section-title h2 { margin: 0; }
.section-title .count { font-size: .8rem; font-weight: 800; color: var(--plum-2); background: var(--plum-50); border-radius: 99px; padding: 2px 9px; }

.app-card { --accent: var(--coral); --mx: 50%; --my: 0%; position: relative; display: flex; flex-direction: column; gap: 12px; padding: 20px; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); color: var(--ink); overflow: hidden; transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s; isolation: isolate; }
.app-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(420px circle at var(--mx) var(--my), color-mix(in srgb, var(--accent) 16%, transparent), transparent 45%); opacity: 0; transition: opacity .3s; }
.app-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); color: var(--ink); }
.app-card:hover::before { opacity: 1; }
.app-card__top { display: flex; align-items: center; gap: 12px; }
.app-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: #fff; background: var(--accent); box-shadow: 0 10px 20px -10px var(--accent); flex: none; transition: transform .3s var(--ease); }
.app-card:hover .app-icon { transform: rotate(-6deg) scale(1.06); }
.app-icon .icon { width: 26px; height: 26px; }
.app-icon--sm { width: 40px; height: 40px; border-radius: 12px; }
.app-icon--sm .icon { width: 20px; height: 20px; }
.app-card__name { font-weight: 800; color: var(--plum); line-height: 1.25; }
.app-card__tag { color: var(--muted); font-size: .9rem; margin: 0; }
.app-card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.app-card__go { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--plum); }
.app-card__go .icon { transition: transform .2s var(--ease); }
.app-card:hover .app-card__go .icon { transform: translateX(4px); }
.app-card--mine { border-width: 1.5px; }
.app-card--soon { background: linear-gradient(180deg, #fff, var(--cream)); }
.app-card--soon .app-icon { background: color-mix(in srgb, var(--accent) 18%, #fff); color: var(--accent); box-shadow: none; }
.soon-group { margin-bottom: 18px; }
.soon-group__label { font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.soon-row { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.soon-item { --accent: var(--plum-2); display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: #fff; border: 1px solid var(--line); transition: border-color .2s, transform .2s var(--ease); }
.soon-item:hover { transform: translateY(-2px); border-color: var(--plum-100); }
.soon-item .app-icon--sm { background: color-mix(in srgb, var(--accent) 16%, #fff); color: var(--accent); box-shadow: none; }
.soon-item__body { min-width: 0; flex: 1; }
.soon-item__name { font-weight: 700; font-size: .92rem; color: var(--ink); }
.soon-item__tag { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notify-btn { border: 0; background: var(--plum-50); color: var(--plum-2); border-radius: 10px; width: 36px; height: 36px; display: grid; place-items: center; cursor: pointer; flex: none; transition: background .2s, color .2s, transform .2s; }
.notify-btn:hover { background: var(--plum); color: #fff; }
.notify-btn.is-on { background: var(--gold); color: var(--plum); }
.notify-btn .icon { width: 18px; height: 18px; }
.banner { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 16px; background: var(--gold-50); border: 1px solid #ffe3a6; color: #6b4600; margin-bottom: 16px; font-weight: 600; flex-wrap: wrap; }
.banner--info { background: var(--info-50); border-color: #cddcf6; color: #1e3f78; }
.banner .btn { margin-left: auto; }

/* ---------- App detail & plans ---------- */
.app-hero { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-bottom: 22px; }
.app-hero .app-icon { width: 72px; height: 72px; border-radius: 22px; }
.app-hero .app-icon .icon { width: 36px; height: 36px; }
.cycle { display: inline-flex; padding: 4px; border-radius: 14px; background: var(--plum-50); gap: 4px; }
.cycle button { border: 0; background: none; padding: 8px 14px; border-radius: 10px; font: inherit; font-weight: 700; color: var(--plum-2); cursor: pointer; }
.cycle button.is-active { background: #fff; color: var(--plum); box-shadow: var(--shadow-sm); }
.cycle .save { font-size: .72rem; background: var(--gold); color: var(--plum); border-radius: 99px; padding: 1px 7px; margin-left: 4px; }
.plans { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); margin-top: 18px; }
.plan { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 22px; border-radius: var(--r-lg); background: #fff; border: 1.5px solid var(--line); transition: transform .25s var(--ease), box-shadow .25s; }
.plan:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.plan--featured { border-color: var(--plum-2); box-shadow: var(--shadow); }
.plan__ribbon { position: absolute; top: -12px; left: 20px; background: linear-gradient(90deg, var(--coral), var(--gold)); color: var(--plum); font-size: .75rem; font-weight: 800; padding: 4px 10px; border-radius: 99px; }
.plan__name { font-weight: 800; font-size: 1.1rem; color: var(--plum); }
.plan__price { font-size: 1.9rem; font-weight: 800; color: var(--plum); letter-spacing: -.02em; line-height: 1; }
.plan__price small { font-size: .9rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.plan__list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: .92rem; }
.plan__list li { display: flex; gap: 8px; align-items: flex-start; }
.plan__list .icon { width: 18px; height: 18px; color: var(--ok); margin-top: 2px; }
.plan__list li.is-off { color: #b6a9bd; }
.plan__list li.is-off .icon { color: #d9cede; }
.plan form { margin-top: auto; }
.feature-tier { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.feature { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--line); font-weight: 600; font-size: .92rem; }
.feature .chip { margin-left: auto; }

/* ---------- Tables / lists ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 800; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: var(--cream); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.list { display: flex; flex-direction: column; }
.list__item { display: flex; gap: 12px; align-items: center; padding: 14px 4px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.list__item:last-child { border-bottom: 0; }
.list__body { flex: 1; min-width: 180px; }
.list__title { font-weight: 700; color: var(--ink); }
.member-apps { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }

/* ---------- Invoice ---------- */
.invoice { max-width: 760px; }
.invoice__head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.invoice__total { font-size: 2rem; font-weight: 800; color: var(--plum); }
.pay-box { border-radius: var(--r-lg); padding: 20px; background: linear-gradient(135deg, var(--plum-50), var(--gold-50)); border: 1px dashed var(--plum-100); }
.copy { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.15rem; color: var(--plum); background: #fff; border: 1px solid var(--line); padding: 8px 12px; border-radius: 12px; cursor: pointer; }
.copy:hover { border-color: var(--plum-3); }
.copy.is-copied { border-color: var(--ok); color: var(--ok); }
.copy .icon { width: 18px; height: 18px; }

/* ---------- Dialog ---------- */
dialog.modal { border: 0; border-radius: var(--r-lg); padding: 0; width: min(94vw, 520px); box-shadow: var(--shadow-lg); color: var(--ink); }
dialog.modal::backdrop { background: rgba(36, 16, 50, .5); backdrop-filter: blur(3px); }
dialog.modal[open] { animation: pop .22s var(--ease); }
.modal__body { padding: 22px; }
.modal__foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; background: var(--cream); border-top: 1px solid var(--line); }

/* ---------- Public layout ---------- */
.public-top { max-width: 1160px; margin: 0 auto; padding: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.public-top img { height: 30px; width: auto; }

/* ---------- Admin ---------- */
.admin { display: grid; grid-template-columns: 1fr; min-height: 100vh; }
.side { background: var(--plum); color: #e9daf2; padding: 14px; position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 8px; overflow-x: auto; }
.side__logo img { height: 26px; width: auto; }
.side__badge { font-size: .65rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; background: var(--coral); color: #fff; padding: 2px 7px; border-radius: 6px; }
.side nav { display: flex; gap: 4px; margin-left: 8px; }
.side nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; color: #e9daf2; font-weight: 600; white-space: nowrap; font-size: .92rem; }
.side nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.side nav a.is-active { background: rgba(255, 255, 255, .14); color: #fff; box-shadow: inset 3px 0 0 var(--gold); }
.side__user { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.side__user a { color: #e9daf2; }
.admin__main { padding: 22px 16px 60px; min-width: 0; }
.stats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); margin-bottom: 22px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px; position: relative; overflow: hidden; }
.stat__label { font-size: .78rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.stat__value { font-size: 1.8rem; font-weight: 800; color: var(--plum); line-height: 1.15; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat__sub { font-size: .82rem; color: var(--muted); }
.stat::after { content: ""; position: absolute; right: -24px; top: -24px; width: 80px; height: 80px; border-radius: 50%; background: var(--accent, var(--plum-50)); opacity: .5; }
.health { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .85rem; }
.health::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.health--sehat { color: var(--ok); }
.health--perhatian { color: var(--warn); }
.health--berisiko { color: var(--bad); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.filters .input { width: auto; min-width: 150px; min-height: 40px; padding: 8px 12px; }
.meter { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; min-width: 80px; }
.meter__bar { height: 100%; background: linear-gradient(90deg, var(--plum-3), var(--coral)); border-radius: inherit; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 14px 20px; font-size: .9rem; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--plum-3); }
.timeline li::after { content: ""; position: absolute; left: 7.5px; top: 18px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
@media (min-width: 980px) {
  .admin { grid-template-columns: 250px 1fr; }
  .side { flex-direction: column; align-items: stretch; height: 100vh; padding: 22px 16px; overflow: visible; }
  .side nav { flex-direction: column; margin: 22px 0 0; }
  .side__user { margin: auto 0 0; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .12); }
  .admin__main { padding: 30px 34px 60px; }
}

/* ---------- Motion ---------- */
.reveal { animation: rise .5s var(--ease) both; }
.reveal:nth-child(2) { animation-delay: .05s; } .reveal:nth-child(3) { animation-delay: .1s; } .reveal:nth-child(4) { animation-delay: .15s; } .reveal:nth-child(5) { animation-delay: .2s; } .reveal:nth-child(6) { animation-delay: .25s; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(-14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px) scale(.96); } }
@keyframes float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-24px, 18px); } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-8px) rotate(4deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spinSlow { to { transform: rotate(360deg); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 currentColor; } 70% { box-shadow: 0 0 0 6px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* Accent per app (no inline styles under CSP) */
.accent-coral { --accent: #ff7a59; }
.accent-plum { --accent: #3a1450; }
.accent-violet { --accent: #7b4aa6; }
.accent-gold { --accent: #e0a21c; }
.accent-gold .app-icon:not(.app-icon--sm) { color: var(--plum); }
.stat.accent-coral { --accent: var(--coral-50); }
.stat.accent-gold { --accent: var(--gold-50); }
.stat.accent-ok { --accent: var(--ok-50); }
.stat.accent-bad { --accent: var(--bad-50); }
.w-0 { width: 0; } .w-10 { width: 10%; } .w-20 { width: 20%; } .w-30 { width: 30%; } .w-40 { width: 40%; } .w-50 { width: 50%; } .w-60 { width: 60%; } .w-70 { width: 70%; } .w-80 { width: 80%; } .w-90 { width: 90%; } .w-100 { width: 100%; }
.plain-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
