:root {
  --bg: #f3f4f1;
  --surface: #ffffff;
  --surface-2: #f7f8f5;
  --ink: #18201d;
  --muted: #66706a;
  --line: #e2e5df;
  --brand: #1a3d5d;
  --logo-web: #1a3d5d;
  --logo-nyaabi: #0a6844;
  --logo-tag: #173449;
  --brand-ink: #ffffff;
  --brand-soft: #e3eaf3;
  --accent: #d9822b;
  --ok: #1a7f52;
  --ok-soft: #e0f1e8;
  --warn: #9a6400;
  --warn-soft: #fbf0d9;
  --danger: #c2452f;
  --danger-soft: #f8e4df;
  --radius: 16px;
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2366706a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  --shadow: 0 1px 2px rgba(20, 25, 20, .05), 0 8px 26px -14px rgba(20, 25, 20, .16);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111413; --surface: #1a1e1c; --surface-2: #212623; --ink: #eceee9; --muted: #9aa29c; --line: #2d332f;
    --brand: #7fa7d9; --brand-ink: #0a1320; --brand-soft: #1f2d3f; --accent: #f0a55a;
    --logo-web: #e6eef6; --logo-nyaabi: #58cc8c; --logo-tag: #a9b8c6;
    --ok: #57c491; --ok-soft: #173327; --warn: #e2b04a; --warn-soft: #3a2f16; --danger: #f07b64; --danger-soft: #3a2420;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px -16px rgba(0,0,0,.7);
    --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa29c' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111413; --surface: #1a1e1c; --surface-2: #212623; --ink: #eceee9; --muted: #9aa29c; --line: #2d332f;
  --brand: #7fa7d9; --brand-ink: #0a1320; --brand-soft: #1f2d3f; --accent: #f0a55a;
    --logo-web: #e6eef6; --logo-nyaabi: #58cc8c; --logo-tag: #a9b8c6;
  --ok: #57c491; --ok-soft: #173327; --warn: #e2b04a; --warn-soft: #3a2f16; --danger: #f07b64; --danger-soft: #3a2420;
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa29c' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
a { color: var(--brand); }
h1 { font-size: 1.6rem; letter-spacing: -.02em; margin: 0 0 .3rem; }
h2 { margin: .2rem 0 .4rem; letter-spacing: -.01em; }
h3 { font-size: 1rem; margin: 0 0 .6rem; }
.muted { color: var(--muted); margin: .2rem 0 .9rem; }
.small { font-size: .85rem; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* boot */
.boot { min-height: 100dvh; display: grid; place-items: center; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* brand */
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; font-size: 1.05rem; color: inherit; text-decoration: none; min-width: 0; }
.brand span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand.big { font-size: 1.35rem; margin-bottom: .5rem; }
.mark { width: 36px; height: 36px; border-radius: 10px; flex: none; display: block; }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.05; }
.brand .brand-text > * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wordmark { font-family: "Fredoka", "Nunito", "Plus Jakarta Sans", system-ui, sans-serif; font-weight: 700; font-size: 1.35rem; letter-spacing: -.01em; }
.wordmark .w1 { color: var(--logo-web); }
.wordmark .w2 { color: var(--logo-nyaabi); }
.brand .tagline { font-size: .62rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--logo-tag); margin-top: 2px; }
@media (max-width: 560px) { .brand .tagline { display: none; } }
/* logo besar di halaman masuk/daftar */
.logo-big { text-align: center; margin: -4px 0 18px; }
.logo-big img { width: min(290px, 86%); height: auto; display: inline-block; }
.logo-big .logo-d { display: none; }
.logo-big .tagline { margin: 8px 0 0; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--logo-tag); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-big .logo-l { display: none; }
  :root:not([data-theme="light"]) .logo-big .logo-d { display: inline-block; }
}
:root[data-theme="dark"] .logo-big .logo-l { display: none; }
:root[data-theme="dark"] .logo-big .logo-d { display: inline-block; }

/* form */
.btn { appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; padding: 10px 16px; border-radius: 12px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background .15s, transform .05s; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); }
.btn.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }
.btn.small { padding: 5px 11px; font-size: .82rem; border-radius: 9px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }
label { display: grid; gap: 6px; font-weight: 600; font-size: .88rem; margin-bottom: 12px; }
label small { font-weight: 400; color: var(--muted); }
label.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; cursor: pointer; }
label.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand); flex: none; }
input, select { font: inherit; font-weight: 400; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; width: 100%; min-width: 0; }
input:disabled { color: var(--muted); }
select { -webkit-appearance: none; appearance: none; padding-right: 36px; cursor: pointer; background-image: var(--chev); background-repeat: no-repeat; background-position: right 12px center; background-size: 14px; text-overflow: ellipsis; }
select option { background: var(--surface); color: var(--ink); }
input::-webkit-calendar-picker-indicator { cursor: pointer; }
input[list]::-webkit-calendar-picker-indicator { display: none !important; }
input:focus, select:focus { outline: 2px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 1px; border-color: var(--brand); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.stack > :last-child { margin-bottom: 0; }
.error { color: var(--danger); min-height: 1.2em; margin: .6rem 0 0; font-weight: 600; font-size: .9rem; }

/* auth */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background:
  radial-gradient(1200px 500px at 50% -10%, color-mix(in srgb, var(--brand) 12%, transparent), transparent 70%), var(--bg); }
.auth-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 28px; box-shadow: var(--shadow); }
.switch { text-align: center; color: var(--muted); margin: 14px 0 0; font-size: .9rem; }
.switch a { font-weight: 700; }
.done-icon { width: 52px; height: 52px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; font-size: 1.6rem; font-weight: 800; margin-bottom: 10px; }

/* layout */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px max(16px, calc((100vw - 1040px) / 2)); background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 4px; }
.tabs a { position: relative; display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; padding: 8px 12px; border-radius: 10px; text-decoration: none; }
.tabs a svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tabs a.active { color: var(--brand); background: var(--brand-soft); }
.count { background: var(--accent); color: #fff; font-size: .7rem; font-weight: 800; min-width: 18px; height: 18px; border-radius: 9px; display: inline-grid; place-items: center; padding: 0 5px; }
main { max-width: 1040px; margin: 0 auto; padding: 24px 16px 100px; }
.view-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.view-head h1 { margin: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 14px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.card-head h3 { margin: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }

/* aplikasi */
.hello { margin: 4px 0 20px; }
.app-groups { display: grid; gap: 26px 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); align-items: start; }
.app-group h3 { display: flex; align-items: baseline; gap: 10px; margin: 0 0 12px; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 800; }
.app-group h3::after { content: ''; flex: 1; height: 1px; background: var(--line); align-self: center; }
.app-group h3 small { font-size: .74rem; letter-spacing: 0; text-transform: none; font-weight: 600; opacity: .8; order: 2; }
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.app-card { display: flex; flex-direction: column; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: var(--shadow); text-decoration: none; color: inherit; transition: transform .12s, box-shadow .12s, border-color .12s; min-height: 170px; }
.app-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--app, var(--brand)) 45%, var(--line)); box-shadow: 0 14px 30px -16px color-mix(in srgb, var(--app, var(--brand)) 55%, transparent); }
.app-tile { width: 48px; height: 48px; border-radius: 14px; background: var(--app, var(--brand)); display: grid; place-items: center; flex: none; }
.app-tile svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.app-card b { font-size: 1.05rem; }
.app-card p { margin: 0; color: var(--muted); font-size: .88rem; }
.app-card .go { margin-top: auto; font-weight: 700; font-size: .85rem; color: var(--app, var(--brand)); }
.app-card.soon { border-style: dashed; box-shadow: none; background: transparent; cursor: default; }
.app-card.soon:hover { transform: none; }
.app-card.soon .app-tile { background: var(--surface-2); border: 1px dashed var(--line); }
.app-card.soon .app-tile svg { stroke: var(--muted); }
.notice { margin-top: 18px; padding: 12px 16px; border-radius: 14px; background: var(--warn-soft); color: var(--warn); font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.notice a { color: inherit; }

/* admin: pengguna */
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; color: var(--muted); font: inherit; font-weight: 600; font-size: .85rem; padding: 6px 11px; border-radius: 9px; cursor: pointer; white-space: nowrap; }
.seg button.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.seg .n:empty { display: none; }
.seg .n { font-size: .75rem; opacity: .8; }
.users { list-style: none; margin: 0; padding: 0; }
.users li { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 12px 4px; border-top: 1px solid var(--line); }
.users li:first-child { border-top: 0; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 800; }
.u-main { min-width: 0; }
.u-name { font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.u-sub { color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.pill { font-size: .7rem; font-weight: 700; padding: 1px 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.pill.pending { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill.admin { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.pill.disabled { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.empty { color: var(--muted); text-align: center; padding: 22px 8px; }
.app-toggles { list-style: none; margin: 0; padding: 0; }
.app-toggles li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.app-toggles li:first-child { border-top: 0; }
.app-toggles .app-tile { width: 36px; height: 36px; border-radius: 10px; }
.app-toggles .app-tile svg { width: 20px; height: 20px; }
.app-toggles .grow { flex: 1; min-width: 0; }
.app-toggles small { display: block; color: var(--muted); }
.switch-toggle { position: relative; width: 42px; height: 24px; flex: none; }
.switch-toggle input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch-toggle span { position: absolute; inset: 0; border-radius: 99px; background: var(--line); transition: .15s; pointer-events: none; }
.switch-toggle span::after { content: ""; position: absolute; width: 18px; height: 18px; top: 3px; left: 3px; border-radius: 50%; background: #fff; transition: .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.switch-toggle input:checked + span { background: var(--ok); }
.switch-toggle input:checked + span::after { transform: translateX(18px); }
.switch-toggle input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

/* dialog & toast */
dialog { border: 0; border-radius: 20px; padding: 22px; width: min(440px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); box-shadow: 0 30px 60px -20px rgba(0,0,0,.45); }
dialog::backdrop { background: rgba(10, 14, 12, .45); backdrop-filter: blur(2px); }
.dialog-actions { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.spacer { flex: 1; }
.temp-box { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border: 1px dashed var(--line); border-radius: 12px; padding: 12px 14px; margin: 8px 0; }
.temp-box code { flex: 1; font-size: 1.3rem; font-weight: 700; letter-spacing: .06em; }
.toast { position: fixed; left: 50%; bottom: 32px; transform: translate(-50%, 20px); opacity: 0; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: .9rem; pointer-events: none; transition: .2s; z-index: 50; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 760px) {
  .topbar { padding: 10px 16px; backdrop-filter: none; background: var(--bg); }
  .tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; }
  .tabs a { flex-direction: column; gap: 2px; font-size: .72rem; padding: 6px 4px; flex: 1; }
  .tabs a svg { width: 22px; height: 22px; }
  .tabs a.active { background: none; }
  .tabs .count { position: absolute; top: 2px; left: calc(50% + 6px); }
  main { padding: 18px 16px 110px; }
  .grid2, .two { grid-template-columns: 1fr; }
  .users li { grid-template-columns: 40px 1fr; }
  .u-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .toast { bottom: calc(90px + env(safe-area-inset-bottom)); }
  .view-head { flex-wrap: wrap; }
}

/* akses aplikasi per pengguna */
.u-apps { margin-top: 2px; }
.u-apps.limited { color: var(--accent); font-weight: 600; }
.access-apps { list-style: none; margin: 4px 0 12px 28px; padding: 0; display: grid; gap: 6px; transition: opacity .15s; }
.access-apps.off { opacity: .45; }
.access-apps label.check { align-items: center; margin: 0; padding: 6px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.access-apps .app-tile { width: 30px; height: 30px; border-radius: 9px; }
.access-apps .app-tile svg { width: 17px; height: 17px; }
#access-form > label.check { margin-bottom: 8px; }

/* ---------- akun demo ---------- */
.demo-box { display: flex; justify-content: center; margin-top: 28px; }
.btn.demo-go { display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-size: .92rem; padding: 9px 20px; background: var(--accent, #f0a55a); border-color: var(--accent, #f0a55a); color: #1f2937; }
.btn.demo-go:hover { filter: brightness(.96); }
.demo-go svg { width: 15px; height: 15px; fill: currentColor; stroke: none; }
.demo-note { border-left: 4px solid #f59e0b; }
.demo-link { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border: 1px dashed var(--line); border-radius: 12px; padding: 10px 12px; margin: 10px 0 14px; }
.demo-link code { flex: 1; overflow-wrap: anywhere; font-size: .95rem; }
.demo-fill { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.demo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.demo-actions .muted { flex: 1; }
#demo-card .card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#login-form:has(.demo-box:not([hidden])) > p.muted { display: none; }

/* ---------- kuota Berkasku ---------- */
.bq-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.bq-list li { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.3fr) minmax(150px, .9fr); gap: 14px; align-items: center; padding: 12px 14px; border-top: 1px solid var(--line); }
.bq-list li:first-child { border-top: 0; }
.bq-list .who { min-width: 0; } .bq-list .who b { display: block; overflow-wrap: anywhere; } .bq-list .who small { color: var(--muted); overflow-wrap: anywhere; }
.bq-bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bq-bar i { display: block; height: 100%; background: var(--brand); }
.bq-bar.warn i { background: #d18b1f; } .bq-bar.full i { background: #c2412f; }
.bq-use small { display: block; color: var(--muted); font-size: .8rem; margin-top: 4px; }
.bq-q { display: grid; gap: 6px; }
.bq-q input { width: 100%; }
@media (max-width: 640px) { .bq-list li { grid-template-columns: minmax(0, 1fr); gap: 8px; } }
.bq-custom { display: flex; align-items: center; gap: 8px; } .bq-custom input { flex: 1; min-width: 0; }

/* ---------- email ---------- */
.forgot { margin: -4px 0 4px; text-align: right; font-size: .88rem; }
.forgot a { color: var(--brand); font-weight: 600; }
#mail-form textarea { width: 100%; resize: vertical; font: inherit; }
.mail-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mail-actions .spacer { flex: 1; }
.mail-actions input { width: min(240px, 100%); }
#mail-error { color: #b42318; }
#mail-preview-dlg { width: min(640px, calc(100vw - 24px)); }

/* ---------- admin: bagian bisa dibuka-tutup ---------- */
.acc-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.acc-list { display: grid; gap: 12px; }
.card.acc { padding: 0; overflow: hidden; }
.acc-h { width: 100%; display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.acc-h:hover { background: var(--surface-2); }
.acc-h .ai { width: 40px; height: 40px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex: none; }
.acc-h .ai svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.acc-h .at { flex: 1; min-width: 0; display: grid; gap: 2px; }
.acc-h .at b { font-size: 1.02rem; }
.acc-h .at small { color: var(--muted); font-size: .84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-h .badge { background: var(--accent); color: #1f2937; font-weight: 800; font-size: .75rem; border-radius: 99px; padding: 2px 9px; }
.acc-h .chev { width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .18s; flex: none; }
.acc.open .acc-h .chev { transform: rotate(180deg); }
.acc-b { padding: 4px 18px 18px; border-top: 1px solid var(--line); }
.acc-b > .card-head:first-child { margin-top: 12px; }
.acc:not(.open) .acc-b { display: none; }
@media (prefers-reduced-motion: reduce) { .acc-h .chev { transition: none; } }
.card-head.nudge { outline: 2px solid var(--accent); outline-offset: 6px; border-radius: 10px; }

/* ---------- masa aktif aplikasi ---------- */
.plan-chip { align-self: flex-start; font-size: .76rem; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.plan-chip.warn { background: #fdf1dc; color: #9a5b00; border-color: #f3d9a8; }
.plan-chip.bad { background: #f9e3df; color: #b42318; border-color: #f0c4bb; }
.app-card.locked { cursor: pointer; opacity: .78; filter: grayscale(.55); }
.app-card.locked:hover { transform: none; }
#access-dialog.access-wide { width: min(640px, calc(100vw - 24px)); }
.access-apps li.acc-app { display: grid; gap: 6px; }
.access-apps li.off label.check { opacity: .5; }
.plan { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 8px 4px 46px; }
.plan select, .plan input { padding: 6px 8px; font-size: .86rem; width: auto; }
.plan .sub { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.plan .sub label { display: flex; align-items: center; gap: 6px; font-size: .84rem; font-weight: 600; margin: 0; }
.plan .until { flex-basis: 100%; color: var(--muted); font-size: .8rem; }
.plan .until.warn { color: #9a5b00; } .plan .until.bad { color: #b42318; }
@media (max-width: 520px) { .plan { padding-left: 8px; } }
.subs-list { list-style: none; margin: 0 0 14px; padding: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.subs-list li { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); }
.subs-list li:first-child { border-top: 0; }
.subs-list li.empty { display: block; color: var(--muted); font-size: .88rem; }
.subs-list b { display: block; } .subs-list small { color: var(--muted); }
.subs-list .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 12px; }
.row-actions .spacer { flex: 1; }
.cron-help summary { cursor: pointer; font-weight: 600; font-size: .9rem; }
#subs-renew { width: 100%; resize: vertical; font: inherit; }
@media (max-width: 640px) { .subs-list li { grid-template-columns: minmax(0, 1fr); } .subs-list .acts { justify-content: flex-start; } }

/* admin: perangkat Android, dikelompokkan per pengguna */
.mob-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.mob-list > li.empty { color: var(--muted); font-size: .88rem; border: 1px dashed var(--line); border-radius: 14px; padding: 12px 14px; }
.mob-user { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.mob-head { display: flex; gap: 12px; align-items: center; width: 100%; padding: 11px 14px; background: var(--surface-2, transparent); border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.mob-head > div { flex: 1; min-width: 0; }
.mob-chev { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.mob-user.open .mob-chev { transform: rotate(180deg); }
.mob-user:not(.open) .mob-devs { display: none; }
.mob-head b { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .mob-head small { color: var(--muted); display: block; overflow-wrap: anywhere; }
.mob-av { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 800; font-size: .8rem; background: var(--brand); color: #fff; }
.mob-devs { list-style: none; margin: 0; padding: 0; }
.mob-devs li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); }
.mob-devs b { display: block; font-weight: 600; } .mob-devs small { color: var(--muted); font-size: .8rem; }
.mob-app { min-width: 118px; text-align: center; box-sizing: border-box; font-size: .74rem; font-weight: 700; padding: 3px 9px; border-radius: 99px; border: 1px solid var(--line); white-space: nowrap; }
@media (max-width: 560px) { .mob-devs li { grid-template-columns: minmax(0, 1fr) auto; } .mob-devs .mob-app { grid-column: 1 / -1; justify-self: start; min-width: 0; } }

/* ---------- langganan & pembayaran ---------- */
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 12px; }
.pay-cat { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 8px; }
.pay-cat li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; transition: border-color .12s, background .12s; }
.pay-cat li.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, transparent); }
.pay-cat .app-tile { width: 40px; height: 40px; border-radius: 12px; }
.pay-cat .app-tile svg { width: 22px; height: 22px; }
.pay-cat .pc-main { display: grid; gap: 2px; justify-items: start; min-width: 0; }
.pay-cat .pc-main small { color: var(--muted); }
.pay-cat select { width: auto; min-width: 150px; }
.pay-ways { display: grid; gap: 14px; margin: 6px 0 10px; }
.pay-way h4 { margin: 0; font-size: .95rem; }
.pay-way .pay-banks, .pay-way .pay-qris { margin-top: 8px; margin-bottom: 0; }
.pay-or { margin: 12px 0 0; }
@media (min-width: 760px) { .pay-ways.two { grid-template-columns: 1fr 1fr; align-items: start; } }
.pay-total { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--line); }
.pay-total > div { display: grid; }
.pay-total b { font-size: 1.5rem; letter-spacing: -.01em; }
.pay-status { border-color: var(--brand); }
.pay-head { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 8px; }
.pay-head h3 { margin: 0; }
.pay-items { list-style: none; margin: 0 0 10px; padding: 0; }
.pay-items li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px dashed var(--line); font-size: .92rem; }
.pay-amount { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 10px 0 6px; }
.pay-amount b { font-size: 1.8rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pay-amount .muted { width: 100%; }
.pay-banks { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 8px; }
.pay-banks li { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.pay-banks li div { display: grid; }
.pay-banks code { font-size: 1.1rem; font-weight: 700; letter-spacing: .03em; }
.pay-banks small { color: var(--muted); }
.pay-qris { display: grid; gap: 6px; justify-items: center; text-align: center; margin: 10px 0; padding: 12px; background: #fff; color: #222; border-radius: 14px; border: 1px solid var(--line); }
.pay-qris img { width: 100%; max-width: 300px; max-height: 50vh; object-fit: contain; }
.pay-proof { display: grid; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.pay-hist { list-style: none; margin: 0; padding: 0; }
.pay-hist li { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); }
.pay-hist li:first-child { border-top: 0; }
.pay-hist li div { display: grid; min-width: 0; } .pay-hist small { color: var(--muted); }
.pay-adm { list-style: none; margin: 12px 0; padding: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.pay-adm li { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-top: 1px solid var(--line); }
.pay-adm li:first-child { border-top: 0; }
.pay-adm li.pending { background: color-mix(in srgb, #d18b1f 8%, transparent); }
.pay-adm li.empty { display: block; color: var(--muted); font-size: .88rem; }
.pay-adm .pa-main { display: grid; gap: 2px; min-width: 0; } .pay-adm .pa-main small { color: var(--muted); overflow-wrap: anywhere; }
.pay-adm .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.pay-proof-thumb { display: grid; place-items: center; gap: 2px; width: 64px; height: 56px; border-radius: 10px; border: 1px solid var(--line); text-decoration: none; color: var(--muted); font-size: .72rem; font-weight: 700; }
.pay-proof-thumb svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pay-set { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.pay-set summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
.pay-set h4 { margin: 8px 0 0; }
.pay-prices { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 12px; }
.rp-in { display: flex; align-items: center; gap: 6px; } .rp-in > span { color: var(--muted); font-weight: 700; }
.qris-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.qris-thumb { width: 84px; height: 84px; border-radius: 12px; background: #fff; border: 1px solid var(--line); object-fit: contain; display: grid; place-items: center; font-size: .72rem; color: #777; }
@media (max-width: 600px) {
  .pay-cat li { grid-template-columns: auto minmax(0, 1fr); }
  .pay-cat select { grid-column: 1 / -1; width: 100%; }
  .pay-adm li { grid-template-columns: 56px minmax(0, 1fr); }
  .pay-adm .acts { grid-column: 1 / -1; justify-content: flex-start; }
  .three { grid-template-columns: 1fr 1fr 1fr; }
}

.legal-links { display: flex; justify-content: center; gap: 18px; margin: 14px 0 0; font-size: .82rem; }
.legal-links a { color: var(--muted); }

/* ===== halaman masuk / daftar: gaya neumorphism (timbul-lembut) ===== */
.auth {
  --neu-bg: #e3e7ee; --neu-hi: rgba(255,255,255,.95); --neu-lo: rgba(158,170,190,.62); --neu-ink: #27303d; --neu-muted: #6d7686; --neu-accent: #2563c4;
  position: relative; overflow: hidden; isolation: isolate; background: var(--neu-bg); color: var(--neu-ink);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .auth { --neu-bg: #252a32; --neu-hi: rgba(255,255,255,.055); --neu-lo: rgba(0,0,0,.5); --neu-ink: #e7ebf1; --neu-muted: #9aa3b2; --neu-accent: #7fb0f2; } }
:root[data-theme="dark"] .auth { --neu-bg: #252a32; --neu-hi: rgba(255,255,255,.055); --neu-lo: rgba(0,0,0,.5); --neu-ink: #e7ebf1; --neu-muted: #9aa3b2; --neu-accent: #7fb0f2; }
/* lingkaran hiasan di latar */
.auth::before, .auth::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; background: var(--neu-bg);
  box-shadow: 18px 18px 40px var(--neu-lo), -18px -18px 40px var(--neu-hi); }
.auth::before { width: 190px; height: 190px; top: -40px; left: max(-50px, calc(50% - 560px)); }
.auth::after { width: 150px; height: 150px; bottom: 6%; right: max(-40px, calc(50% - 520px)); }
.auth .auth-card { position: relative; background: var(--neu-bg); border: 0; border-radius: 30px; padding: 34px 30px 26px;
  box-shadow: 16px 16px 36px var(--neu-lo), -16px -16px 36px var(--neu-hi); }
.auth .auth-card::after { content: ""; position: absolute; width: 44px; height: 44px; border-radius: 50%; right: -70px; top: 22%;
  background: var(--neu-bg); box-shadow: 6px 6px 14px var(--neu-lo), -6px -6px 14px var(--neu-hi); }
@media (max-width: 560px) { .auth .auth-card::after { display: none; } .auth .auth-card { padding: 30px 22px 22px; } }
.auth h2, .auth .auth-title { color: var(--neu-ink); }
.auth .muted, .auth .switch, .auth label { color: var(--neu-muted); }
.auth .neu-badge { width: 74px; height: 74px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; background: var(--neu-bg);
  box-shadow: 8px 8px 18px var(--neu-lo), -8px -8px 18px var(--neu-hi); color: var(--neu-accent); }
.auth .neu-badge svg { width: 30px; height: 30px; fill: currentColor; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.auth .neu-badge svg path { fill: none; }
.auth .logo-big { margin: 0 0 6px; }
.auth .logo-big img { width: min(200px, 70%); }
.auth .auth-title { text-align: center; margin: 4px 0 2px; font-size: 1.5rem; letter-spacing: -.01em; }
.auth .auth-sub, #login-form .auth-sub { display: block !important; text-align: center; margin: 0 0 22px; font-size: .9rem; }
.auth .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.auth label { margin-bottom: 16px; }
/* kolom isian: cekung */
.auth input:not([type=checkbox]):not([type=radio]) { background: var(--neu-bg); color: var(--neu-ink); border: 0; border-radius: 14px; padding: 14px 16px;
  box-shadow: inset 5px 5px 10px var(--neu-lo), inset -5px -5px 10px var(--neu-hi); transition: box-shadow .15s; }
.auth input::placeholder { color: var(--neu-muted); opacity: .85; }
.auth input:focus { outline: 0; box-shadow: inset 6px 6px 12px var(--neu-lo), inset -6px -6px 12px var(--neu-hi), 0 0 0 2px color-mix(in srgb, var(--neu-accent) 45%, transparent); }
.auth input:-webkit-autofill { -webkit-text-fill-color: var(--neu-ink); -webkit-box-shadow: inset 5px 5px 10px var(--neu-lo), inset -5px -5px 10px var(--neu-hi), 0 0 0 100px var(--neu-bg) inset; }
/* tombol lihat kata sandi */
.auth .pw-wrap { position: relative; display: block; }
.auth .pw-wrap input { padding-right: 48px; }
.auth .pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; border-radius: 50%; background: transparent; color: var(--neu-muted); cursor: pointer; display: grid; place-items: center; }
.auth .pw-eye:hover { color: var(--neu-accent); }
.auth .pw-eye svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* tombol: timbul, ditekan jadi cekung */
.auth .btn { background: var(--neu-bg); color: var(--neu-ink); border: 0; border-radius: 16px; padding: 13px 18px;
  box-shadow: 6px 6px 14px var(--neu-lo), -6px -6px 14px var(--neu-hi); transition: box-shadow .15s, transform .05s; }
.auth .btn:hover { background: var(--neu-bg); filter: none; }
.auth .btn:active { transform: none; box-shadow: inset 5px 5px 10px var(--neu-lo), inset -5px -5px 10px var(--neu-hi); }
.auth .btn.primary { color: var(--neu-accent); font-weight: 800; letter-spacing: .01em; margin-top: 4px; }
.auth .btn.demo-go { color: #b8620f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .auth .btn.demo-go { color: #f0a55a; } }
:root[data-theme="dark"] .auth .btn.demo-go { color: #f0a55a; }
.auth .forgot { margin: -6px 0 14px; }
.auth .forgot a, .auth .switch a { color: var(--neu-accent); }
.auth .switch { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 20px; }
.auth .neu-plus { width: 42px; height: 42px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 1.5rem; font-weight: 400; line-height: 1; text-decoration: none;
  background: var(--neu-bg); box-shadow: 5px 5px 12px var(--neu-lo), -5px -5px 12px var(--neu-hi); }
.auth .neu-plus:active { box-shadow: inset 4px 4px 9px var(--neu-lo), inset -4px -4px 9px var(--neu-hi); }
.auth .legal-links a { color: var(--neu-muted); }
.auth .error { text-align: center; }
/* tombol tema di halaman masuk ikut gaya timbul */
body:has(.auth:not([hidden])) .theme-btn.float { border: 0; border-radius: 50%; width: 44px; height: 44px; background: #e3e7ee; color: #27303d;
  box-shadow: 5px 5px 12px rgba(158,170,190,.62), -5px -5px 12px rgba(255,255,255,.95); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body:has(.auth:not([hidden])) .theme-btn.float { background: #252a32; color: #e7ebf1; box-shadow: 5px 5px 12px rgba(0,0,0,.5), -5px -5px 12px rgba(255,255,255,.055); } }
:root[data-theme="dark"] body:has(.auth:not([hidden])) .theme-btn.float { background: #252a32; color: #e7ebf1; box-shadow: 5px 5px 12px rgba(0,0,0,.5), -5px -5px 12px rgba(255,255,255,.055); }
