/* =========================================================
   PhotoLink — UI
   ========================================================= */
:root {
  --bg: #0a0a0b;
  --bg2: #0f0f11;
  --panel: #141416;
  --panel2: #1b1b1e;
  --card: #111113;
  --card-line: #222226;
  --line: #26262b;
  --line2: #323238;
  --divider: #1c1c20;
  --text: #f4f4f5;
  --muted: #a1a1a8;
  --dim: #6c6c74;
  --blue: #2f6bea;
  --blue2: #4a84f5;
  --blue-soft: rgba(47, 107, 234, .14);
  --tile: #0c1729;
  --topbar: rgba(10, 10, 11, .78);
  --seg: #131315;
  --seg-pill: #2a2a2e;
  --dock: rgba(24, 24, 27, .92);
  --dock-line: #2c2c31;
  --ring-track: #2e2e33;
  --toast: #1f1f23;
  --toast-line: #34343a;
  --hover: rgba(255, 255, 255, .06);
  --overlay: rgba(0, 0, 0, .6);
  --shadow: rgba(0, 0, 0, .7);
  --green: #4ade80;
  --green-text: #4ade80;
  --amber: #f5b544;
  --amber-text: #f5b544;
  --red: #f05252;
  --err-text: #ffb0b0;
  --ok-text: #a7f3c0;
  --radius: 14px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f6f6f4;
  --bg2: #ffffff;
  --panel: #ffffff;
  --panel2: #f0f0ed;
  --card: #ffffff;
  --card-line: #e4e4e0;
  --line: #e6e6e2;
  --line2: #d8d8d3;
  --divider: #e6e6e2;
  --text: #111113;
  --muted: #5c5c63;
  --dim: #8c8c93;
  --blue2: #2f6bea;
  --blue-soft: rgba(47, 107, 234, .1);
  --tile: #e3e7ee;
  --topbar: rgba(246, 246, 244, .84);
  --seg: #ebebe8;
  --seg-pill: #ffffff;
  --dock: rgba(255, 255, 255, .94);
  --dock-line: #e2e2de;
  --ring-track: #e6e6e2;
  --toast: #ffffff;
  --toast-line: #e2e2de;
  --hover: rgba(0, 0, 0, .05);
  --overlay: rgba(20, 20, 25, .35);
  --shadow: rgba(20, 20, 30, .16);
  --green-text: #15803d;
  --amber-text: #b45309;
  --err-text: #b42318;
  --ok-text: #15803d;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.55 var(--sans); letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .3s ease, color .3s ease;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); font-weight: 400; }
body.no-scroll { overflow: hidden; }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 26px; height: 26px; border-radius: 8px; background: var(--blue);
  display: grid; place-items: center; box-shadow: 0 0 0 4px rgba(47, 107, 234, .18);
}
.logo-mark span { width: 12px; height: 12px; border: 2.5px solid #fff; border-radius: 3.5px; }
.logo-text { font-weight: 700; font-size: 21px; letter-spacing: -.03em; }
.logo-badge {
  font: 600 10px/1 var(--sans); letter-spacing: .08em; color: var(--muted);
  border: 1px solid var(--line2); border-radius: 6px; padding: 5px 7px; margin-left: 6px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 22px; border-radius: 12px; font-weight: 600; font-size: 15px;
  transition: transform .15s var(--ease), background .2s, border-color .2s, opacity .2s, box-shadow .2s;
  white-space: nowrap; user-select: none;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 6px 20px -8px rgba(47, 107, 234, .7); }
.btn-primary:hover { background: #4a84f5; }
.btn-primary:disabled { background: var(--panel2); color: var(--dim); box-shadow: none; cursor: not-allowed; }
.btn-ghost { background: var(--bg2); border: 1px solid var(--line2); color: var(--text); }
.btn-ghost:hover { background: var(--panel2); }
.btn-danger { background: rgba(240, 82, 82, .1); border: 1px solid rgba(240, 82, 82, .35); color: var(--err-text); }
.btn-danger:hover { background: rgba(240, 82, 82, .18); }
.btn-block { width: 100%; }
.btn-sm { height: 40px; padding: 0 16px; font-size: 14px; border-radius: 11px; }
.btn.is-loading { pointer-events: none; opacity: .8; }
.btn.is-loading::before {
  content: ''; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .7s linear infinite;
}
.btn.is-loading svg { display: none; }

.icon-btn {
  width: 42px; height: 42px; border-radius: 12px; display: inline-grid; place-items: center;
  color: var(--blue2); transition: background .2s, transform .15s;
}
.icon-btn:hover { background: var(--hover); }
.icon-btn:active { transform: scale(.92); }
.icon-btn svg { width: 24px; height: 24px; }
.icon-btn.sm { width: 34px; height: 34px; border-radius: 10px; color: var(--muted); }
.icon-btn.sm svg { width: 18px; height: 18px; }

/* Theme toggle */
.theme-btn { color: var(--muted); }
.theme-btn svg { width: 21px; height: 21px; }
.theme-btn .i-moon { display: none; }
[data-theme="light"] .theme-btn .i-sun { display: none; }
[data-theme="light"] .theme-btn .i-moon { display: block; }
.theme-btn.floating {
  position: fixed; top: max(14px, env(safe-area-inset-top)); right: 14px; z-index: 50;
  background: var(--panel); border: 1px solid var(--line);
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, .5); } 100% { box-shadow: 0 0 0 10px rgba(74, 222, 128, 0); } }
@keyframes pulseAmber { 0% { box-shadow: 0 0 0 0 rgba(245, 181, 68, .55); } 100% { box-shadow: 0 0 0 9px rgba(245, 181, 68, 0); } }

/* ---------- Eyebrow / headings ---------- */
.eyebrow {
  display: flex; align-items: center; gap: 14px; margin: 54px 0 22px;
  color: var(--blue2); font-weight: 700; font-size: 12px; letter-spacing: .14em;
}
.eyebrow span { width: 28px; height: 1px; background: var(--line2); }
.eyebrow-plain { color: var(--muted); font-weight: 600; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }

/* =========================================================
   HOME
   ========================================================= */
.home { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 52% 48%; }
.home-demo {
  display: flex; align-items: center; justify-content: center; padding: 40px 6%;
  border-right: 1px solid var(--divider);
}
.demo-wrap { width: 100%; max-width: 620px; animation: fadeUp .8s var(--ease) both; }
.demo-card {
  background: var(--card); border: 1px solid var(--card-line); border-radius: 18px; padding: 14px;
  box-shadow: 0 30px 80px -30px var(--shadow);
}
.demo-head { display: flex; align-items: center; gap: 10px; padding: 2px 2px 12px; }
.demo-avatar { width: 26px; height: 26px; border-radius: 7px; background: var(--panel2); display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.demo-title { font-weight: 600; font-size: 14px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo-count {
  font: 500 12.5px var(--mono); color: var(--blue2); background: var(--blue-soft);
  border-radius: 8px; padding: 6px 10px; display: inline-flex; align-items: center; gap: 8px;
}
.demo-count i { width: 6px; height: 6px; border-radius: 50%; background: var(--blue2); }
.demo-count b { font-weight: 500; }
.demo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.demo-tile {
  position: relative; aspect-ratio: 4 / 5; border-radius: 6px; overflow: hidden; background: var(--tile);
  border: 2px solid transparent; transition: border-color .35s var(--ease);
}
.demo-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s var(--ease), border-radius .35s; }
.demo-tile.is-selected { border-color: var(--blue); }
.demo-tile.is-selected img { transform: scale(.94); border-radius: 4px; }
.demo-note {
  position: absolute; left: 8px; top: 8px; display: inline-flex; align-items: center; gap: 5px;
  background: rgba(10, 10, 12, .8); color: #fff; backdrop-filter: blur(6px); border-radius: 6px;
  font-size: 11.5px; font-weight: 600; padding: 4px 8px;
}
.demo-note svg { width: 12px; height: 12px; }
.demo-tile .check { right: 8px; bottom: 8px; width: 22px; height: 22px; }

.demo-live { display: flex; gap: 12px; margin-top: 26px; padding-left: 4px; }
.demo-live strong { display: block; font-size: 14px; }
.demo-live small { color: var(--muted); font-size: 12.5px; }
.dot-live { width: 9px; height: 9px; border-radius: 50%; background: var(--green); margin-top: 6px; animation: pulse 1.8s infinite; flex: none; }

.home-main { display: flex; align-items: center; padding: 48px 8%; }
.home-inner { width: 100%; max-width: 420px; animation: fadeUp .8s .1s var(--ease) both; }
.hero-title { font-size: clamp(38px, 4.2vw, 46px); line-height: 1.04; letter-spacing: -.04em; margin: 0 0 22px; font-weight: 700; }
.hero-title em, .auth-title em { font-family: var(--serif); font-weight: 400; color: var(--blue2); letter-spacing: -.01em; font-size: 1.08em; }
.hero-desc { color: var(--muted); margin: 0 0 26px; font-size: 15px; line-height: 1.65; }
.hero-desc strong { color: var(--text); }
.steps { list-style: none; padding: 0; margin: 0 0 32px; border-top: 1px solid var(--line); }
.steps li { display: flex; gap: 30px; padding: 12px 0; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 15px; }
.steps span { font: 500 13px var(--mono); color: var(--blue2); padding-top: 2px; }

.code-form { display: grid; gap: 10px; margin-bottom: 10px; }
.code-input {
  display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 16px;
  background: var(--bg2); border: 1px solid var(--line2); border-radius: 12px; transition: border-color .2s, box-shadow .2s;
}
.code-input:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.code-input svg { color: var(--dim); width: 18px; height: 18px; }
.code-input input {
  flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none;
  font: 500 17px var(--mono); letter-spacing: .14em; text-transform: uppercase;
}
.code-input input::placeholder { font-family: var(--sans); font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--dim); }
.code-form.has-error .code-input { border-color: var(--red); animation: shake .4s; }
.form-error { color: var(--err-text); font-size: 13.5px; margin: 2px 0 0; }
.home-foot { color: var(--muted); font-size: 13.5px; margin: 16px 0 0; }
.home-foot a { color: var(--blue2); font-weight: 600; }

/* =========================================================
   ALBUM (client)
   ========================================================= */
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between;
  padding: 12px max(20px, calc((100% - 1200px) / 2)); padding-top: max(12px, env(safe-area-inset-top));
  background: var(--topbar); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px);
}
.topbar-actions { display: flex; align-items: center; gap: 2px; }
.topbar .logo-text { font-size: 17px; }
.topbar .logo-mark { width: 22px; height: 22px; border-radius: 7px; }
.topbar .logo-mark span { width: 10px; height: 10px; border-width: 2px; border-radius: 3px; }

.album { max-width: 1200px; margin: 0 auto; padding-bottom: calc(130px + var(--safe-b)); }
.album-head { padding: 34px 20px 20px; animation: fadeUp .6s var(--ease) both; }
.album-title { font-size: clamp(36px, 7vw, 54px); line-height: 1.05; letter-spacing: -.045em; margin: 8px 0 10px; font-weight: 700; word-break: break-word; }
.album-sub { color: var(--muted); font-size: clamp(15px, 2.6vw, 18px); margin: 0; }

.album-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.segmented {
  position: relative; display: inline-flex; padding: 5px; border-radius: 16px;
  background: var(--seg); border: 1px solid var(--line);
}
.segmented button {
  position: relative; z-index: 1; height: 42px; padding: 0 18px; border-radius: 11px;
  font-weight: 600; font-size: 16px; color: var(--muted); transition: color .25s;
}
.segmented button b { font-weight: 500; color: var(--dim); margin-left: 4px; transition: color .25s; font-variant-numeric: tabular-nums; }
.segmented button.active { color: var(--text); }
.segmented button.active b { color: var(--muted); }
.seg-pill {
  position: absolute; top: 5px; bottom: 5px; left: 0; width: 0; border-radius: 11px; background: var(--seg-pill);
  box-shadow: 0 2px 8px var(--shadow); transition: transform .35s var(--ease), width .35s var(--ease);
}
.select-hint { color: var(--dim); font-size: 13px; margin: 12px 0 0; }
.select-hint kbd { font: 500 11.5px var(--mono); border: 1px solid var(--line2); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; color: var(--muted); background: var(--panel); }

/* Status card */
#statusCard { margin-top: 24px; }
.status-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 18px;
  animation: fadeUp .45s var(--ease) both;
}
.status-top { display: flex; gap: 14px; align-items: flex-start; }
.status-top > div { flex: 1; min-width: 0; }
.status-top strong { display: block; font-size: 17px; letter-spacing: -.01em; }
.status-top small { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }
.status-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.status-icon.ok { background: rgba(74, 222, 128, .14); color: var(--green-text); }
.status-icon.wait { background: var(--blue-soft); color: var(--blue2); }
.status-icon.spin { background: rgba(245, 181, 68, .14); color: var(--amber-text); }
.status-icon.spin svg { animation: spin 1.2s linear infinite; }
.status-card.is-done { border-color: rgba(74, 222, 128, .35); background: linear-gradient(180deg, rgba(74, 222, 128, .07), var(--panel)); }
.live-chip {
  display: inline-flex; align-items: center; gap: 6px; flex: none; height: 24px; padding: 0 9px; border-radius: 999px;
  font: 600 11px var(--sans); letter-spacing: .06em; color: var(--green-text); background: rgba(74, 222, 128, .1);
}
.live-chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: pulse 1.6s infinite; }
.notif-btn { margin-top: 14px; height: 36px; font-size: 13.5px; padding: 0 14px; }

.timeline { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); }
.timeline li { position: relative; padding-top: 18px; font-size: 13.5px; font-weight: 600; color: var(--dim); }
.timeline li::before { content: ''; position: absolute; top: 5px; left: 0; right: 0; height: 2px; background: var(--line2); transition: background .4s; }
.timeline li:first-child::before { left: 6px; }
.timeline li i { position: absolute; top: 0; left: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--line2); border: 2px solid var(--panel); box-sizing: content-box; margin: -2px 0 0 -2px; transition: background .4s; }
.timeline li span { display: block; }
.timeline li small { display: block; font-weight: 400; font-size: 12px; color: var(--dim); }
.timeline li.done { color: var(--text); }
.timeline li.done::before, .timeline li.done i { background: var(--green); }
.timeline li.current { color: var(--text); }
.timeline li.current i { background: var(--amber); animation: pulseAmber 1.8s infinite; }
.timeline.vertical { grid-template-columns: 1fr; margin: 0 0 18px; }
.timeline.vertical li { padding: 0 0 16px 26px; }
.timeline.vertical li::before { top: 14px; bottom: 0; left: 5px; right: auto; width: 2px; height: auto; }
.timeline.vertical li:last-child::before { display: none; }
.timeline.vertical li i { top: 4px; }

/* Grid — Google Photos style */
.grid {
  --cols: 3; display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: 3px;
  padding: 0; user-select: none; -webkit-user-select: none;
}
.tile {
  position: relative; aspect-ratio: 1; overflow: hidden; background: var(--tile); cursor: pointer;
  content-visibility: auto; contain-intrinsic-size: 200px;
  animation: tileIn .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 14ms);
}
@keyframes tileIn { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.35), transparent 35%), linear-gradient(180deg, rgba(0,0,0,.28), transparent 30%); opacity: 0; transition: opacity .25s; pointer-events: none; }
.tile img {
  width: 100%; height: 100%; object-fit: cover; opacity: 0;
  transition: transform .32s var(--ease), border-radius .32s var(--ease), opacity .4s ease;
  user-select: none; -webkit-user-drag: none; -webkit-touch-callout: none; pointer-events: none;
}
.tile img.loaded { opacity: 1; }
.tile.is-selected { background: var(--blue-soft); }
.tile.is-selected img { transform: scale(.86); border-radius: 10px; }
.tile.is-selected::after { opacity: 0; }
.has-selection .tile::after, .tile:hover::after { opacity: 1; }
.has-selection .tile.is-selected::after { opacity: 0; }

.check {
  position: absolute; right: 9%; bottom: 9%; z-index: 2;
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid rgba(255, 255, 255, .9); background: rgba(0, 0, 0, .18);
  transition: background .2s, border-color .2s, transform .25s var(--ease), opacity .2s;
}
.check svg { width: 60%; height: 60%; stroke-width: 3; color: #fff; opacity: 0; transform: scale(.4); transition: transform .25s var(--ease), opacity .2s; }
.is-selected .check, .demo-tile.is-selected .check { background: var(--blue); border-color: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .35); }
.is-selected .check svg, .demo-tile.is-selected .check svg { opacity: 1; transform: none; }
.tile .hit { position: absolute; right: 0; bottom: 0; width: 46%; height: 46%; z-index: 3; }
.tile .zoom {
  position: absolute; top: 7%; right: 7%; z-index: 4; width: 30px; height: 30px; border-radius: 9px;
  display: none; place-items: center; background: rgba(10, 10, 12, .55); color: #fff; backdrop-filter: blur(6px);
  transition: background .2s, transform .15s;
}
.tile .zoom svg { width: 16px; height: 16px; }
.tile .zoom:hover { background: rgba(10, 10, 12, .8); }
.tile .zoom:active { transform: scale(.9); }
.has-selection .tile .zoom { display: grid; }
.tile .note-dot {
  position: absolute; left: 7%; bottom: 7%; z-index: 2; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(0, 0, 0, .45); color: #fff;
}
.tile .note-dot svg { width: 15px; height: 15px; }
.tile .dl {
  position: absolute; right: 8%; bottom: 8%; z-index: 3; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(10, 10, 12, .65); backdrop-filter: blur(6px); color: #fff;
  transition: background .2s, transform .15s;
}
.tile .dl:hover { background: var(--blue); }
.tile .dl:active { transform: scale(.9); }
.tile .dl svg { width: 17px; height: 17px; }
.locked .tile .check, .locked .tile .hit, .locked .tile .zoom { display: none; }
.locked .tile.is-selected .check { display: grid; }
.tile.pop .check { transform: scale(1.18); }

.grid-empty { text-align: center; color: var(--muted); padding: 60px 20px; }

/* Dock */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 0 14px calc(14px + var(--safe-b));
  pointer-events: none; transition: transform .4s var(--ease), opacity .3s;
}
.dock.hide { transform: translateY(120%); opacity: 0; }
.dock-inner {
  pointer-events: auto; max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 14px;
  padding: 14px 14px 14px 16px; border-radius: 22px; background: var(--dock);
  border: 1px solid var(--dock-line); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 20px 50px -10px var(--shadow);
}
.dock-clear { margin-right: -6px; }
.dock.shake .dock-inner { animation: shake .4s; }
.ring { position: relative; width: 52px; height: 52px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke: var(--ring-track); stroke-width: 3.5; }
.ring .ring-val { stroke: var(--green); stroke-dasharray: 119.4; stroke-dashoffset: 119.4; transition: stroke-dashoffset .45s var(--ease), stroke .3s; }
.ring.empty .ring-val { stroke: var(--blue2); }
.ring span { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; }
.dock-text { flex: 1; min-width: 0; }
.dock-text strong { display: block; font-size: 18px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.dock-text small { display: block; color: var(--muted); font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Lightbox (selalu gelap agar foto terlihat jelas) */
.lightbox {
  position: fixed; inset: 0; z-index: 80; background: #000; color: #f4f4f5; display: flex; flex-direction: column;
  height: 100vh; height: 100dvh; opacity: 0; transition: opacity .25s ease;
}
.lightbox.open { opacity: 1; }
.lb-top, .lb-bottom { position: relative; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 10px 12px; flex: none; }
.lb-top { padding-top: max(10px, env(safe-area-inset-top)); justify-content: space-between; }
.lb-top .icon-btn { color: #fff; }
.lb-top .icon-btn:hover { background: rgba(255, 255, 255, .08); }
.lb-meta { flex: 1; text-align: center; min-width: 0; }
.lb-meta span { display: block; font-weight: 600; font-variant-numeric: tabular-nums; }
.lb-meta small { display: block; color: #a1a1a8; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-stage { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; touch-action: pan-y; }
.lb-track { position: absolute; inset: 0; display: flex; will-change: transform; }
.lb-track.anim { transition: transform .35s var(--ease); }
.lb-slide { position: relative; flex: 0 0 100%; width: 100%; height: 100%; overflow: hidden; }
.lb-slide img {
  position: absolute; inset: 0; margin: auto;
  width: auto; height: auto; max-width: calc(100% - 16px); max-height: calc(100% - 16px);
  object-fit: contain; border-radius: 4px; opacity: 0; transition: opacity .3s;
  user-select: none; -webkit-user-drag: none;
}
.lb-slide img.loaded { opacity: 1; }
.lb-slide .lb-spin { position: absolute; top: 50%; left: 50%; width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 50%; border: 2.5px solid #333; border-top-color: #aaa; animation: spin .8s linear infinite; }
.lb-slide img.loaded + .lb-spin { display: none; }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(30, 30, 33, .7); color: #fff; transition: background .2s, opacity .2s;
}
.lb-nav:hover { background: rgba(60, 60, 66, .9); }
.lb-nav.prev { left: 16px; }
.lb-nav.next { right: 16px; }
.lb-nav:disabled { opacity: 0; pointer-events: none; }
.lb-bottom { padding-bottom: max(14px, calc(10px + var(--safe-b))); flex-wrap: wrap; justify-content: center; max-width: 640px; width: 100%; margin: 0 auto; }
.lb-note {
  flex: 1 1 260px; display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px;
  background: #151517; border: 1px solid #2a2a2e; border-radius: 12px; color: #f4f4f5;
}
.lb-note svg { width: 17px; height: 17px; color: #6c6c74; }
.lb-note input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 15px; color: #f4f4f5; }
.lb-note-read { flex: 1 1 100%; margin: 0; color: #a1a1a8; font-size: 14px; text-align: center; }
.btn-select { background: #1e1e21; border: 1px solid #333338; color: #fff; height: 48px; padding: 0 18px 0 12px; }
.btn-select .check { position: static; width: 24px; height: 24px; }
.btn-select.is-selected { background: var(--blue); border-color: var(--blue); }
.btn-select.is-selected .check { background: #fff; border-color: #fff; }
.btn-select.is-selected .check svg { opacity: 1; transform: none; color: var(--blue); }

/* Modal */
.modal {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px;
  background: var(--overlay); backdrop-filter: blur(6px); animation: fadeIn .2s ease both;
}
@keyframes fadeIn { from { opacity: 0; } }
.modal-card {
  width: 100%; max-width: 440px; background: var(--panel); border: 1px solid var(--line2); border-radius: 22px;
  padding: 26px; text-align: center; animation: modalIn .35s var(--ease) both; box-shadow: 0 30px 70px -20px var(--shadow);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(18px) scale(.97); } }
.modal-card h3 { font-size: 21px; letter-spacing: -.02em; margin: 14px 0 6px; }
.modal-card p { color: var(--muted); margin: 0 0 20px; }
.modal-icon { width: 54px; height: 54px; margin: 0 auto; border-radius: 16px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue2); }
.modal-icon svg { width: 26px; height: 26px; }
.modal-icon.ok { background: rgba(74, 222, 128, .14); color: var(--green-text); }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }

/* Toast */
.toast-wrap { position: fixed; left: 0; right: 0; top: max(14px, env(safe-area-inset-top)); z-index: 100; display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 14px; }
.toast {
  pointer-events: auto; max-width: 440px; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px;
  background: var(--toast); color: var(--text); border: 1px solid var(--toast-line); box-shadow: 0 14px 40px -10px var(--shadow);
  font-weight: 500; font-size: 14.5px; animation: toastIn .35s var(--ease) both;
}
.toast.out { animation: toastOut .3s ease both; }
.toast.ok { border-color: rgba(74, 222, 128, .45); }
.toast.err { border-color: rgba(240, 82, 82, .5); }
.toast a { color: var(--blue2); font-weight: 600; margin-left: 4px; }
.toast-rich { display: flex; gap: 12px; align-items: flex-start; }
.toast-rich .t-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.toast-rich .t-icon.ok { background: rgba(74, 222, 128, .15); color: var(--green-text); }
.toast-rich .t-icon.work { background: rgba(245, 181, 68, .15); color: var(--amber-text); }
.toast-rich .t-icon.info { background: var(--blue-soft); color: var(--blue2); }
.toast-rich strong { display: block; font-size: 15px; }
.toast-rich small { display: block; color: var(--muted); font-size: 13px; font-weight: 400; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px) scale(.97); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px); } }

/* =========================================================
   AUTH / LOCK / 404
   ========================================================= */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: 100%; max-width: 400px; display: grid; gap: 14px; animation: fadeUp .6s var(--ease) both; }
.auth-card .eyebrow { margin: 34px 0 0; }
.auth-card .hero-desc { margin: 0 0 6px; }
.auth-title { font-size: 36px; line-height: 1.08; letter-spacing: -.04em; margin: 4px 0 6px; }
.auth-card.center .auth-title { margin-top: 36px; }

/* Fields */


.field { display: grid; gap: 7px; }
.field > span { font-size: 13.5px; font-weight: 600; color: var(--muted); }
.field > span i { font-style: normal; color: var(--dim); font-weight: 400; }
.field .num { font: 500 12px var(--mono); color: var(--blue2); margin-right: 6px; }
.field em { font-style: normal; font-size: 12.5px; color: var(--dim); }
.field input, .search, .copy-line input {
  height: 48px; padding: 0 14px; border-radius: 12px; outline: 0;
  background: var(--bg2); border: 1px solid var(--line2); transition: border-color .2s, box-shadow .2s; width: 100%;
  font-size: 15px;
}
.field input:focus, .search:focus { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.form-stack { display: grid; gap: 16px; }
.stepper { display: grid; grid-template-columns: 56px 1fr 56px; gap: 8px; }
.stepper button { height: 48px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line2); font-weight: 600; color: var(--muted); }
.stepper input { text-align: center; font: 600 18px var(--mono); }
.hint { color: var(--dim); font-size: 13px; margin: 10px 0 0; }

/* =========================================================
   ADMIN
   ========================================================= */
.admin-topbar { border-bottom: 1px solid var(--divider); }
.admin-nav { display: flex; align-items: center; gap: 4px; }
.nav-link { padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: 14px; }
.nav-link:hover { background: var(--hover); }
.nav-link.muted { color: var(--muted); }
.bell { position: relative; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; color: var(--muted); }
.bell:hover { background: var(--hover); }
.bell-badge {
  position: absolute; top: 3px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--red); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center;
}
.bell.ring-anim svg { animation: bellRing .9s ease; transform-origin: 50% 10%; }
@keyframes bellRing { 15% { transform: rotate(16deg); } 30% { transform: rotate(-14deg); } 45% { transform: rotate(10deg); } 60% { transform: rotate(-6deg); } 75% { transform: rotate(3deg); } }

.admin { max-width: 1200px; margin: 0 auto; padding: 26px 20px 80px; display: grid; gap: 18px; }
.admin-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; animation: fadeUp .5s var(--ease) both; }
.admin-head .album-title { font-size: clamp(30px, 5vw, 42px); margin-bottom: 4px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 600; font-size: 14px; width: max-content; }
.back-link svg { width: 16px; height: 16px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat small { color: var(--muted); font-size: 13px; font-weight: 500; }
.stat strong { display: block; font-size: 30px; letter-spacing: -.03em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-blue strong { color: var(--blue2); }
.stat-amber strong { color: var(--amber-text); }
.stat-green strong { color: var(--green-text); }

.admin-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 20px; min-width: 0; animation: fadeUp .5s var(--ease) both; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.panel-head h2 { font-size: 17px; letter-spacing: -.015em; margin: 0; display: flex; align-items: center; gap: 8px; }
details.panel > summary { list-style: none; cursor: pointer; margin: 0; }
details.panel > summary::-webkit-details-marker { display: none; }
details.panel[open] > summary { margin-bottom: 16px; }
details.panel[open] > summary .muted { visibility: hidden; }
.mono-tag { font: 500 12px var(--mono); color: var(--blue2); }
.pill-count { font: 600 12px var(--mono); background: var(--panel2); border: 1px solid var(--line2); color: var(--muted); border-radius: 8px; padding: 3px 8px; }
.search { height: 40px; max-width: 260px; font-size: 14px; }

.alert { padding: 13px 16px; border-radius: 12px; font-weight: 500; font-size: 14.5px; animation: fadeUp .4s var(--ease) both; }
.alert-error { background: rgba(240, 82, 82, .1); border: 1px solid rgba(240, 82, 82, .35); color: var(--err-text); }
.alert-ok { background: rgba(74, 222, 128, .08); border: 1px solid rgba(74, 222, 128, .3); color: var(--ok-text); }

.empty-state { text-align: center; color: var(--muted); padding: 30px 10px; font-size: 14px; }
.empty-state svg { width: 34px; height: 34px; color: var(--dim); margin: 0 auto 10px; stroke-width: 1.6; }
.empty-state p { margin: 0 auto; max-width: 300px; }

.req-list > li { min-width: 0; }
.req { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 10px 10px 10px 12px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line); transition: border-color .2s; }
.req > .badge, .req > form { flex: none; margin-left: auto; max-width: 100%; }
.req-main { flex: 1 1 200px; min-width: 0; display: flex; align-items: center; gap: 12px; }
.req-text { min-width: 0; }
.req-text strong { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.req-text small { color: var(--muted); font-size: 13px; }
.avatar { width: 38px; height: 38px; border-radius: 11px; background: var(--panel2); display: grid; place-items: center; font-weight: 700; flex: none; }
.is-new .avatar { background: var(--blue); color: #fff; }

.badge { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 8px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-lg { height: 34px; padding: 0 14px; font-size: 13.5px; }
.badge-selecting { background: var(--hover); color: var(--muted); }
.badge-submitted { background: var(--blue-soft); color: var(--blue2); }
.badge-processing { background: rgba(245, 181, 68, .12); color: var(--amber-text); }
.badge-done { background: rgba(74, 222, 128, .12); color: var(--green-text); }

.album-table { display: grid; }
.at-row { display: grid; grid-template-columns: 2fr 1.3fr .9fr 1.1fr 80px; gap: 12px; align-items: center; padding: 12px 6px; border-top: 1px solid var(--line); }
.at-head { border-top: 0; padding-top: 0; color: var(--dim); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.at-client { min-width: 0; }
.at-client strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.at-client small { color: var(--muted); font-size: 12.5px; }
.at-num { font-variant-numeric: tabular-nums; font-weight: 600; }
.at-num small { color: var(--dim); font-weight: 400; }
.at-actions { display: flex; justify-content: flex-end; gap: 2px; }
.code-chip { font: 500 13px var(--mono); letter-spacing: .08em; padding: 5px 9px; border-radius: 8px; background: var(--bg2); border: 1px solid var(--line2); color: var(--text); }
.code-chip:hover { border-color: var(--blue); }

.code-big {
  display: grid; gap: 4px; justify-items: center; text-align: center; padding: 18px; border-radius: 16px; cursor: pointer;
  background: var(--bg2); border: 1px dashed var(--line2); margin-bottom: 12px; transition: border-color .2s, background .2s;
}
.code-big:hover { border-color: var(--blue); background: var(--blue-soft); }
.code-big small { font-size: 11px; letter-spacing: .14em; color: var(--dim); font-weight: 700; }
.code-big strong { font: 500 clamp(26px, 6vw, 34px) var(--mono); letter-spacing: .16em; color: var(--blue2); word-break: break-all; }
.code-big span { font-size: 12px; color: var(--dim); }
.copy-line { display: flex; gap: 8px; margin-bottom: 12px; }
.copy-line input { height: 40px; font-size: 13px; color: var(--muted); }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.row-btns .btn { flex: 1; }

.mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.mini-tile { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--tile); text-align: left; color: #fff; }
.mini-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s var(--ease); }
.mini-tile:hover img { transform: scale(1.04); }
.mini-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 6px; font-size: 11px; font-family: var(--mono); background: linear-gradient(0deg, rgba(0,0,0,.75), transparent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-note { position: absolute; left: 6px; right: 6px; top: 6px; display: flex; gap: 5px; align-items: flex-start; padding: 5px 7px; border-radius: 7px; background: rgba(10, 10, 12, .82); font-size: 11.5px; font-weight: 600; line-height: 1.3; }
.mini-note svg { width: 12px; height: 12px; margin-top: 1px; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (min-width: 700px) {
  .grid { --cols: 4; gap: 4px; padding: 0 20px; }
  .tile { border-radius: 4px; }
}
@media (min-width: 1024px) {
  .grid { --cols: 5; }
}
@media (hover: hover) {
  .tile .check { opacity: 0; }
  .tile:hover .check, .tile.is-selected .check, .has-selection .tile .check { opacity: 1; }
  .locked .tile:not(.is-selected) .check { opacity: 0; }
  .tile:hover .zoom { display: grid; }
}

@media (max-width: 960px) {
  .home { grid-template-columns: 1fr; }
  .home-main { order: -1; padding: 40px 22px 24px; justify-content: center; }
  .home-inner { max-width: 480px; }
  .home-demo { border-right: 0; border-top: 1px solid var(--divider); padding: 32px 16px 48px; }
  .eyebrow { margin-top: 40px; }
  .admin-cols { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .at-head { display: none; }
  .at-row { grid-template-columns: 1fr auto; grid-template-areas: "client status" "code actions" "num num"; row-gap: 8px; padding: 14px 2px; }
  .at-row > :nth-child(1) { grid-area: client; }
  .at-row > :nth-child(2) { grid-area: code; }
  .at-row > :nth-child(3) { grid-area: num; font-size: 13px; }
  .at-row > :nth-child(4) { grid-area: status; }
  .at-row > :nth-child(5) { grid-area: actions; }
  .search { max-width: none; }
  .lb-nav { display: none; }
  .lb-slide img { max-width: 100%; max-height: 100%; border-radius: 0; }
  .admin-nav .nav-link:not(.muted) { display: none; }
}

@media (max-width: 480px) {
  .hide-xs { display: none; }
  .album-head { padding: 26px 18px 18px; }
  .segmented button { padding: 0 14px; font-size: 15px; }
  .dock-inner { padding: 12px; gap: 10px; border-radius: 20px; }
  .ring { width: 46px; height: 46px; }
  .dock-text strong { font-size: 16px; }
  .dock-text small { font-size: 13px; }
  .check { width: 26px; height: 26px; }
  .tile .zoom { width: 26px; height: 26px; border-radius: 8px; }
  .modal-actions { grid-template-columns: 1fr; }
  .modal-actions .btn-primary { order: -1; }
  .panel { padding: 16px; border-radius: 16px; }
  .req { flex-wrap: wrap; }
  .req form, .req > .badge { width: 100%; }
  .req form .btn { width: 100%; }
  .mini-grid { grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .mini-name { display: none; }
  .timeline li { font-size: 12.5px; }
  .timeline li small { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* =========================================================
   GALERI BERANDA (9 kotak, 18 foto bergantian)
   ========================================================= */
.demo-tile { display: block; width: 100%; padding: 0; cursor: pointer; }
.demo-tile:focus-visible { outline: 2px solid var(--blue2); outline-offset: 2px; }
.demo-tile:hover img { filter: brightness(1.06); }
.demo-tile.is-moving { z-index: 3; box-shadow: 0 16px 34px -10px rgba(0, 0, 0, .6); }
.demo-tile .check { pointer-events: none; }
.demo-tile.pop .check { transform: scale(1.22); }
.demo-tile img.img-next { position: absolute; top: 0; left: 0; }
.demo-note { z-index: 2; max-width: calc(100% - 16px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* =========================================================
   AKUN, FOTOGRAFER & ADMINISTRATOR
   ========================================================= */
.logo-img { height: 30px; width: auto; max-width: 180px; object-fit: contain; display: block; }
.dev-brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.dev-chip { font: 700 10px/1 var(--sans); letter-spacing: .12em; color: var(--amber-text); background: rgba(245, 181, 68, .12); border-radius: 6px; padding: 6px 8px; white-space: nowrap; }
.dev-tabs { max-width: 1200px; margin: 0 auto; padding: 12px 20px 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.dev-tabs a { padding: 9px 14px; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--muted); white-space: nowrap; transition: background .2s, color .2s; }
.dev-tabs a:hover { background: var(--hover); color: var(--text); }
.dev-tabs a.active { background: var(--panel); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }

.avatar.fun { font-size: 20px; line-height: 1; color: initial; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .06); }
.avatar.fun.sm { width: 30px; height: 30px; border-radius: 9px; font-size: 16px; }
.avatar.fun.lg { width: 52px; height: 52px; border-radius: 16px; font-size: 28px; }
.is-new .avatar.fun { box-shadow: 0 0 0 2px var(--blue); }
.req:hover .avatar.fun { animation: wiggle .5s ease; }
@keyframes wiggle { 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }

.nav-user { display: inline-flex; align-items: center; gap: 6px; padding: 0 6px; }
.plan-chip { font: 700 10.5px/1 var(--sans); letter-spacing: .08em; padding: 5px 7px; border-radius: 6px; }
.plan-chip.free { color: var(--muted); background: var(--hover); border: 1px solid var(--line2); }
.plan-chip.pro { color: #1a1205; background: linear-gradient(135deg, #ffd66b, #f5a524); }

.account-card {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding: 18px 20px; border-radius: 18px;
  background: var(--panel); border: 1px solid var(--line); animation: fadeUp .5s var(--ease) both;
}
.account-card.is-pro { border-color: rgba(245, 181, 68, .4); background: linear-gradient(120deg, rgba(245, 181, 68, .09), var(--panel) 55%); }
.acc-main { display: flex; align-items: center; gap: 14px; flex: 1 1 260px; min-width: 0; }
.acc-text { min-width: 0; }
.acc-text strong { display: block; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-text small { color: var(--muted); font-size: 13px; word-break: break-all; }
.acc-meta { display: flex; gap: 28px; flex-wrap: wrap; }
.acc-meta > div { display: grid; gap: 3px; min-width: 110px; }
.acc-meta small { color: var(--dim); font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.acc-meta strong { font-size: 14.5px; }
.acc-meta em { font-style: normal; font-size: 12.5px; color: var(--muted); }
.acc-meta em.warn { color: var(--amber-text); font-weight: 600; }
.plan-badge { display: inline-flex; align-items: center; gap: 6px; width: max-content; height: 28px; padding: 0 11px; border-radius: 8px; font-weight: 700; font-size: 13px; }
.plan-badge svg { width: 15px; height: 15px; }
.plan-badge.free { background: var(--hover); color: var(--muted); border: 1px solid var(--line2); }
.plan-badge.pro { background: linear-gradient(135deg, #ffd66b, #f5a524); color: #1a1205; box-shadow: 0 6px 18px -8px rgba(245, 165, 36, .8); }
.usage { display: block; width: 110px; height: 5px; border-radius: 3px; background: var(--line2); overflow: hidden; margin-top: 3px; }
.usage i { display: block; height: 100%; background: var(--blue2); border-radius: 3px; transition: width .6s var(--ease); }
.stat strong.sm { font-size: 22px; line-height: 1.6; }

/* Popup upgrade */
.upgrade-card { position: relative; overflow: hidden; max-width: 420px; padding: 30px 26px 24px; }
.upgrade-glow { position: absolute; inset: -40% -20% auto; height: 260px; background: radial-gradient(closest-side, rgba(245, 181, 68, .28), transparent); pointer-events: none; }
.modal-x { position: absolute; top: 12px; right: 12px; z-index: 2; }
.upgrade-crown {
  position: relative; width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 20px; display: grid; place-items: center;
  background: linear-gradient(135deg, #ffd66b, #f5a524); color: #1a1205; box-shadow: 0 14px 34px -10px rgba(245, 165, 36, .8);
  animation: crownIn .7s var(--ease) both .1s;
}
.upgrade-crown svg { width: 30px; height: 30px; }
@keyframes crownIn { from { opacity: 0; transform: translateY(10px) rotate(-12deg) scale(.8); } }
.upgrade-eyebrow { display: block; font: 700 11px/1 var(--sans); letter-spacing: .14em; color: var(--amber-text); }
.upgrade-card h3 { position: relative; font-size: 28px; margin: 10px 0 8px; letter-spacing: -.03em; }
.upgrade-card h3 em, .pay-head h1 em { font-family: var(--serif); font-weight: 400; color: var(--amber-text); font-size: 1.1em; }
.upgrade-card > p { position: relative; margin-bottom: 16px; }
.upgrade-list { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 10px; text-align: left; }
.upgrade-list li { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14.5px; padding: 10px 12px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); }
.upgrade-list .check { position: static; width: 22px; height: 22px; background: var(--green); border-color: var(--green); }
.upgrade-list .check svg { opacity: 1; transform: none; }
.upgrade-price { display: flex; align-items: baseline; justify-content: center; gap: 6px; margin-bottom: 14px; }
.upgrade-price strong { font-size: 30px; letter-spacing: -.03em; }
.upgrade-price span { color: var(--muted); }
.btn-pro { background: linear-gradient(135deg, #2f6bea, #6a4cf5); }
.btn-pro:hover { background: linear-gradient(135deg, #4a84f5, #7d63f7); }
.upgrade-foot { display: block; margin-top: 12px; color: var(--dim); font-size: 12.5px; }

/* Auth tambahan */
.auth-card.wide { max-width: 520px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.form-grid.three { grid-template-columns: repeat(3, 1fr); }
.field.has-error input { border-color: var(--red); }
.field-error { color: var(--err-text) !important; }
.field textarea, .field select, .test-line input, .owner-form select, .menu-row input {
  width: 100%; padding: 12px 14px; border-radius: 12px; outline: 0; background: var(--bg2); border: 1px solid var(--line2);
  font-size: 14.5px; transition: border-color .2s, box-shadow .2s;
}
.field select, .owner-form select { height: 48px; padding: 0 12px; }
.field textarea { resize: vertical; line-height: 1.55; font-family: var(--mono); font-size: 13px; }
.field textarea:focus, .field select:focus, .test-line input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.field code, .info-box code { font: 500 11.5px var(--mono); background: var(--panel2); border: 1px solid var(--line2); border-radius: 5px; padding: 1px 5px; margin: 0 1px; display: inline-block; }
.pass-wrap { position: relative; display: block; }
.pass-wrap input { padding-right: 48px; color: var(--text); font-weight: 400; }
.pass-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--dim); }
.pass-eye.on { color: var(--blue2); }
.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--dim); font-size: 13px; margin: 6px 0 -2px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.link-btn { color: var(--blue2); font-weight: 600; }
.link-btn:disabled { color: var(--dim); cursor: default; }
.link-btn.muted { color: var(--muted); font-weight: 500; font-size: 13.5px; }
.resend { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: 13.5px; }
.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.otp input {
  height: 58px; width: 100%; text-align: center; font: 600 24px var(--mono); border-radius: 12px; outline: 0;
  background: var(--bg2); border: 1px solid var(--line2); transition: border-color .2s, box-shadow .2s, transform .15s;
}
.otp input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); transform: translateY(-1px); }
.otp.has-error input { border-color: var(--red); animation: shake .4s; }

/* Pembayaran QRIS */
.pay { max-width: 520px; }
.pay-card { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 24px; animation: fadeUp .5s var(--ease) both; }
.pay-state { display: grid; gap: 16px; text-align: center; }
.pay-head h1, .pay-state > h1 { font-size: 24px; letter-spacing: -.03em; margin: 8px 0 4px; }
.pay-head p, .pay-state > p { color: var(--muted); margin: 0; }
.qr-frame { position: relative; margin: 0 auto; width: 100%; max-width: 320px; background: #fff; color: #111; border-radius: 20px; padding: 16px; box-shadow: 0 24px 60px -24px var(--shadow); }
.qr-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 700; font-size: 13px; padding: 0 4px 10px; color: #333; }
.qris-mark { font: 800 14px/1 var(--sans); letter-spacing: .04em; color: #fff; background: #111; border-radius: 6px; padding: 5px 8px; }
.qr-box { aspect-ratio: 1; }
.qr-box svg { width: 100%; height: 100%; display: block; stroke: none; stroke-width: 0; image-rendering: pixelated; }
.qr-box svg rect, .qr-box svg path { stroke: none !important; }
.qr-amount { border-top: 1px dashed #ddd; margin-top: 8px; padding-top: 10px; }
.qr-amount small { display: block; color: #777; font-size: 12px; }
.qr-amount strong { font-size: 24px; letter-spacing: -.02em; }
.sandbox-chip { position: absolute; top: -10px; right: -10px; font: 700 10px/1 var(--sans); letter-spacing: .1em; color: #1a1205; background: var(--amber); padding: 6px 8px; border-radius: 7px; }
.pay-live { display: inline-flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-size: 14px; }
.pay-live .dot-live { margin: 0; }
.pay-live b { font: 600 14px var(--mono); color: var(--text); }
.pay-rows { margin: 0; display: grid; gap: 0; text-align: left; border-top: 1px solid var(--line); }
.pay-rows > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--line); font-size: 14px; }
.pay-rows dt { color: var(--muted); }
.pay-rows dd { margin: 0; font-weight: 600; text-align: right; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.pay-cancel { margin-top: -4px; }
.pay-steps { text-align: left; margin: 0; padding: 14px 16px 14px 34px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line); color: var(--muted); font-size: 13.5px; display: grid; gap: 6px; }
.pay-steps b { color: var(--text); }
.pay-success-icon { width: 76px; height: 76px; margin: 6px auto 0; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #05290f; animation: popIn .6s var(--ease) both; box-shadow: 0 0 0 10px rgba(74, 222, 128, .15); }
.pay-success-icon svg { width: 38px; height: 38px; stroke-width: 3; }
.pay-success-icon.fail { background: var(--panel2); color: var(--muted); box-shadow: 0 0 0 10px var(--hover); }
@keyframes popIn { from { opacity: 0; transform: scale(.5); } 70% { transform: scale(1.08); } }

/* Tabel /dev */
.dev-table { display: grid; }
.dt-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 4px; border-top: 1px solid var(--line); }
.dt-row:first-child { border-top: 0; }
.dt-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dt-text { min-width: 0; }
.dt-text strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dt-text small { color: var(--muted); font-size: 12.5px; }
.dt-text small a { color: var(--blue2); }
.dt-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.dt-meta small { color: var(--muted); font-size: 12.5px; }
.dt-meta .amount { font-variant-numeric: tabular-nums; }
.dt-actions { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.icon-btn.danger { color: var(--err-text); }
.icon-btn.danger:hover { background: rgba(240, 82, 82, .12); }
.owner-form { flex: 1; min-width: 180px; }
.owner-form select { height: 36px; font-size: 13px; border-radius: 10px; }
details.menu { position: relative; }
details.menu > summary { list-style: none; }
details.menu > summary::-webkit-details-marker { display: none; }
.menu-pop {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 250px; padding: 8px; border-radius: 14px;
  background: var(--panel); border: 1px solid var(--line2); box-shadow: 0 20px 50px -12px var(--shadow); display: grid; gap: 2px;
  animation: fadeUp .2s var(--ease) both;
}
.menu-row { display: flex; gap: 6px; padding: 4px 4px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu-row input { width: 76px; height: 40px; padding: 0 10px; text-align: center; }
.menu-row .btn { flex: 1; }
.menu-item { width: 100%; text-align: left; padding: 10px 12px; border-radius: 9px; font-weight: 500; font-size: 14px; }
.menu-item:hover { background: var(--hover); }
.menu-item.warn { color: var(--amber-text); }
.menu-item.danger { color: var(--err-text); }

/* Pengaturan /dev */
.settings-tabs { overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.settings-tabs button { font-size: 14.5px; white-space: nowrap; }
.upload-box { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 14px; border: 1px dashed var(--line2); background: var(--bg2); cursor: pointer; transition: border-color .2s; }
.upload-box:hover { border-color: var(--blue); }
.upload-box input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-preview { width: 120px; height: 56px; border-radius: 10px; background: var(--panel2); display: grid; place-items: center; overflow: hidden; flex: none; }
.upload-preview.sm { width: 56px; }
.upload-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.upload-preview.empty::after { content: '+'; color: var(--dim); font-size: 22px; }
.upload-text { display: grid; }
.upload-text b { color: var(--blue2); font-size: 14px; }
.upload-text small { color: var(--dim); font-size: 12px; }
.check-line { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); }
.switch { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 14.5px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch span { position: relative; width: 44px; height: 26px; border-radius: 13px; background: var(--line2); flex: none; transition: background .25s; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .25s var(--ease); }
.switch input:checked + span { background: var(--blue); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { box-shadow: 0 0 0 4px var(--blue-soft); }
.info-box { display: grid; gap: 8px; padding: 14px; border-radius: 14px; background: var(--blue-soft); border: 1px solid rgba(47, 107, 234, .25); margin-bottom: 18px; }
.info-box .copy-line { margin: 0; }
.info-box small { color: var(--muted); font-size: 13px; }
.sub-head { font-weight: 700; font-size: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.test-line { display: flex; gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.test-line input { height: 40px; padding: 0 12px; flex: 1; min-width: 0; }

@media (max-width: 720px) {
  .form-grid, .form-grid.three { grid-template-columns: 1fr; }
  .dt-row { grid-template-columns: 1fr auto; }
  .dt-row .dt-meta { grid-column: 1 / -1; grid-row: 2; }
  .acc-meta { gap: 18px; width: 100%; }
  .account-card .btn, .account-card form { width: 100%; }
  .nav-user .avatar { display: none; }
  .dev-chip { display: none; }
}
@media (max-width: 480px) {
  .otp { gap: 6px; }
  .otp input { height: 52px; font-size: 21px; }
  .pay-card { padding: 18px; }
  .upgrade-card { padding: 28px 18px 20px; }
}

/* =========================================================
   LOGO TERANG/GELAP, HAPUS FILE, SOSIAL MEDIA, CARA PENGGUNAAN
   ========================================================= */
.logo-img.on-light { display: none; }
[data-theme="light"] .logo-img.on-dark { display: none; }
[data-theme="light"] .logo-img.on-light { display: block; }

.upload-wrap { position: relative; }
.upload-wrap .upload-box { padding-right: 52px; }
.upload-preview.on-dark { background: #0d0d0f; }
.upload-preview.on-light { background: #f4f4f2; }
.upload-preview.on-light.empty::after { color: #9a9aa2; }
.trash-btn {
  position: absolute; top: 50%; right: 10px; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; color: var(--muted); background: var(--panel); border: 1px solid var(--line2);
  transition: color .2s, background .2s, border-color .2s, transform .2s var(--ease);
}
.trash-btn svg { width: 16px; height: 16px; }
.trash-btn:hover { color: var(--err-text); background: rgba(240, 82, 82, .12); border-color: rgba(240, 82, 82, .4); }
.trash-btn:active { transform: translateY(-50%) scale(.92); }
.brand-grid .upload-box { flex-direction: column; align-items: flex-start; gap: 10px; }
.brand-grid .upload-preview { width: 100%; height: 72px; }
.brand-grid .upload-preview.sm { width: 72px; }
.brand-grid .trash-btn { top: 12px; right: 12px; transform: none; }
.brand-grid .trash-btn:active { transform: scale(.92); }
.brand-grid .upload-wrap .upload-box { padding-right: 12px; }

.input-icon { position: relative; display: block; }
.input-icon .si { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; fill: var(--muted); pointer-events: none; }
.input-icon input { padding-left: 44px !important; }

.si { width: 18px; height: 18px; fill: currentColor; flex: none; }
.socials { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.social-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 12px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--line); color: var(--muted); font-weight: 600; font-size: 13.5px;
  transition: color .2s, border-color .2s, transform .2s var(--ease), background .2s;
}
.social-btn:hover { color: var(--text); border-color: var(--line2); background: var(--panel2); transform: translateY(-2px); }
.social-btn:active { transform: translateY(0) scale(.97); }

.how-card { position: relative; max-width: 460px; text-align: left; padding: 28px 24px 22px; }
.how-card .eyebrow { margin-bottom: 4px; }
.how-card h3 { font-size: 26px; margin: 8px 0 18px; }
.how-card h3 em { font-family: var(--serif); font-weight: 400; color: var(--blue2); font-size: 1.12em; }
.how-steps { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 4px; position: relative; }
.how-steps li { display: flex; gap: 14px; padding: 10px 0; position: relative; animation: fadeUp .45s var(--ease) both; }
.how-steps li:nth-child(2) { animation-delay: .06s; }
.how-steps li:nth-child(3) { animation-delay: .12s; }
.how-steps li:nth-child(4) { animation-delay: .18s; }
.how-steps li:not(:last-child)::after { content: ''; position: absolute; left: 15px; top: 46px; bottom: -6px; width: 2px; background: var(--line); border-radius: 1px; }
.how-num { width: 32px; height: 32px; flex: none; border-radius: 10px; display: grid; place-items: center; font: 600 14px var(--mono); color: var(--blue2); background: var(--blue-soft); border: 1px solid rgba(47, 107, 234, .3); }
.how-steps strong { display: block; font-size: 15px; margin-bottom: 2px; }
.how-steps small { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.how-steps b { color: var(--text); }

/* =========================================================
   INSTALLER
   ========================================================= */
.page-install { min-height: 100vh; }
.install { max-width: 640px; margin: 0 auto; padding: 40px 20px 60px; }
.install-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 26px; }
.install-title { font-size: clamp(28px, 5vw, 38px); letter-spacing: -.035em; line-height: 1.08; margin: 12px 0 8px; }
.install-title em { font-family: var(--serif); font-weight: 400; color: var(--blue2); font-size: 1.1em; }
.install-sub { color: var(--muted); margin: 0 0 22px; }
.install .stepper { display: flex; gap: 6px; margin: 0 0 22px; }
.install .stepper i { flex: 1; height: 4px; border-radius: 2px; background: var(--line2); transition: background .35s var(--ease); }
.install .stepper i.done { background: var(--blue); }
.install .stepper i.current { background: linear-gradient(90deg, var(--blue) 50%, var(--line2) 50%); background-size: 200% 100%; animation: stepFill .5s var(--ease) forwards; }
@keyframes stepFill { from { background-position: 100% 0; } to { background-position: 0 0; } }
.step-label { display: flex; justify-content: space-between; color: var(--dim); font: 500 12px var(--mono); margin-bottom: 8px; }
.install-card { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 26px; }
.install-step { display: none; }
.install-step.active { display: grid; gap: 16px; animation: fadeUp .4s var(--ease) both; }
.install-step h2 { font-size: 21px; letter-spacing: -.02em; margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.install-step > p { color: var(--muted); margin: -8px 0 0; font-size: 14.5px; }
.tag { font: 700 10.5px/1 var(--sans); letter-spacing: .1em; padding: 5px 7px; border-radius: 6px; }
.tag.req { color: var(--blue2); background: var(--blue-soft); }
.tag.opt { color: var(--muted); background: var(--hover); border: 1px solid var(--line2); }
.install .req-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.install .req-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border-top: 1px solid var(--line); font-size: 14px; }
.install .req-list li:first-child { border-top: 0; }
.install .req-list small { color: var(--dim); font-size: 12.5px; display: block; }
.req-ok, .req-bad, .req-warn { font: 700 11px/1 var(--sans); letter-spacing: .06em; padding: 5px 8px; border-radius: 6px; white-space: nowrap; }
.req-ok { color: var(--green-text); background: rgba(74, 222, 128, .12); }
.req-bad { color: var(--err-text); background: rgba(240, 82, 82, .14); }
.req-warn { color: var(--amber-text); background: rgba(245, 181, 68, .14); }
.install-nav { display: flex; gap: 10px; justify-content: space-between; align-items: center; margin-top: 6px; padding-top: 18px; border-top: 1px solid var(--line); }
.install-nav .spacer { flex: 1; }
.test-result { font-size: 13.5px; padding: 10px 12px; border-radius: 10px; display: none; }
.test-result.ok { display: block; color: var(--ok-text); background: rgba(74, 222, 128, .1); border: 1px solid rgba(74, 222, 128, .25); }
.test-result.err { display: block; color: var(--err-text); background: rgba(240, 82, 82, .1); border: 1px solid rgba(240, 82, 82, .3); word-break: break-word; }
.presets { display: flex; gap: 8px; flex-wrap: wrap; }
.preset { height: 34px; padding: 0 12px; border-radius: 10px; font-weight: 600; font-size: 13px; color: var(--muted); background: var(--bg2); border: 1px solid var(--line2); transition: color .2s, border-color .2s; }
.preset:hover, .preset.active { color: var(--text); border-color: var(--blue); }
.review { margin: 0; display: grid; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.review > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 14px; }
.review > div:first-child { border-top: 0; }
.review dt { color: var(--muted); }
.review dd { margin: 0; font-weight: 600; text-align: right; word-break: break-all; }
.review dd.skip { color: var(--dim); font-weight: 500; }
.config-box { width: 100%; min-height: 220px; font: 12px/1.5 var(--mono); padding: 12px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line2); color: var(--text); resize: vertical; }
@media (max-width: 560px) {
  .install { padding-top: 24px; }
  .install-card { padding: 20px 16px; border-radius: 18px; }
  .install-nav .btn { flex: 1; }
}

/* =========================================================
   UPGRADE PLAN, TIKET PEMBAYARAN, INVOICE, KELOLA PENGGUNA
   ========================================================= */
.plan-badge.is-action { cursor: pointer; font: inherit; font-weight: 700; font-size: 13px; transition: color .2s, border-color .2s, transform .2s var(--ease); }
.plan-badge.is-action svg { width: 13px; height: 13px; stroke-width: 2.5; transition: transform .25s var(--ease); }
.plan-badge.is-action:hover { color: var(--text); border-color: var(--blue); }
.plan-badge.is-action:hover svg { transform: translate(2px, -2px); }
.plan-chip.is-action { cursor: pointer; transition: color .2s, border-color .2s; }
.plan-chip.is-action:hover { color: var(--blue2); border-color: var(--blue); }
.plan-chip.suspended { color: var(--err-text); background: rgba(240, 82, 82, .12); border: 1px solid rgba(240, 82, 82, .35); }
.btn-upgrade { color: #fff; border: 0; box-shadow: 0 10px 24px -12px rgba(106, 76, 245, .9); }
.btn-upgrade svg { width: 16px; height: 16px; }
.account-card > .btn-upgrade, .account-card > form { margin-left: auto; }

.col-stack { display: grid; gap: 14px; min-width: 0; }

/* Tiket pembayaran QRIS (bentuk tiket dengan sobekan di tengah) */
.pay-ticket {
  --notch: 11px; --tline: rgba(47, 107, 234, .45);
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch;
  border-radius: 18px; color: var(--text); animation: fadeUp .5s var(--ease) both; background: var(--panel);
  -webkit-mask: radial-gradient(circle var(--notch) at calc(100% - 200px) 0, #0000 98%, #000) top / 100% 51% no-repeat,
                radial-gradient(circle var(--notch) at calc(100% - 200px) 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
          mask: radial-gradient(circle var(--notch) at calc(100% - 200px) 0, #0000 98%, #000) top / 100% 51% no-repeat,
                radial-gradient(circle var(--notch) at calc(100% - 200px) 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
  box-shadow: inset 0 0 0 1px var(--tline);
  transition: transform .25s var(--ease), box-shadow .25s;
}
.pay-ticket.is-pending { background: linear-gradient(115deg, rgba(47, 107, 234, .22), rgba(106, 76, 245, .12) 60%, var(--panel)); }
.pay-ticket.is-failed { --tline: rgba(240, 82, 82, .4); background: linear-gradient(115deg, rgba(240, 82, 82, .14), var(--panel) 65%); }
a.pay-ticket:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--blue); }
.pay-ticket::after { content: ''; position: absolute; top: 14px; bottom: 14px; right: 200px; border-left: 2px dashed var(--tline); }
.pt-left { display: flex; align-items: center; gap: 14px; padding: 18px 20px; min-width: 0; }
.pt-icon { width: 46px; height: 46px; flex: none; border-radius: 14px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #2f6bea, #6a4cf5); box-shadow: 0 10px 22px -10px rgba(47, 107, 234, .9); }
.pt-icon svg { width: 22px; height: 22px; }
.is-failed .pt-icon { background: linear-gradient(135deg, #f05252, #c2410c); box-shadow: 0 10px 22px -10px rgba(240, 82, 82, .8); }
.is-failed .pt-icon svg { stroke-width: 2.6; }
.pt-text { min-width: 0; display: grid; gap: 2px; }
.pt-text small, .pt-right small { font: 700 10.5px/1.2 var(--sans); letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.pt-text strong { font-size: 15.5px; letter-spacing: -.01em; }
.pt-text em { font-style: normal; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-right { width: 200px; display: grid; align-content: center; justify-items: center; gap: 4px; padding: 14px 16px; text-align: center; }
.pt-timer { font: 600 22px/1.1 var(--mono); letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.is-failed .pt-timer { color: var(--err-text); }
.pt-cta { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; white-space: nowrap; font-weight: 700; font-size: 12.5px; color: var(--blue2); }
.pt-cta svg { width: 14px; height: 14px; stroke-width: 2.5; transition: transform .25s var(--ease); }
a.pay-ticket:hover .pt-cta svg { transform: translateX(3px); }
.pt-cta.as-btn { height: 38px; padding: 0 14px; border-radius: 11px; color: #fff; background: linear-gradient(135deg, #2f6bea, #6a4cf5); margin: 0; font-size: 13px; }
.pay-ticket.is-pending .pt-icon { animation: ptPulse 2.4s ease-in-out infinite; }
@keyframes ptPulse { 0%, 100% { box-shadow: 0 10px 22px -10px rgba(47, 107, 234, .9), 0 0 0 0 rgba(47, 107, 234, .45); } 50% { box-shadow: 0 10px 22px -10px rgba(47, 107, 234, .9), 0 0 0 8px rgba(47, 107, 234, 0); } }
@media (max-width: 560px) {
  .pay-ticket { grid-template-columns: 1fr; -webkit-mask: none; mask: none; }
  .pay-ticket::after { display: none; }
  .pt-left { padding-bottom: 16px; }
  .pt-right { width: auto; grid-template-columns: auto 1fr auto; justify-items: start; align-items: center; gap: 10px; margin: 0 16px; padding: 14px 4px 16px; border-top: 2px dashed var(--tline); text-align: left; }
  .pt-right small { white-space: nowrap; }
  .pt-right small { grid-column: 1; }
  .pt-timer { font-size: 17px; }
  .pt-cta { justify-self: end; margin: 0; }
  .pt-right form { grid-column: 1 / -1; width: 100%; }
  .pt-cta.as-btn { width: 100%; justify-content: center; }
}

/* Halaman pembayaran */
.pay-window { color: var(--muted); font-size: 13px; margin: -6px 0 0; }
.pay-window b { color: var(--err-text); }
.sandbox-box { display: grid; gap: 8px; justify-items: center; padding: 14px; border-radius: 14px; background: rgba(245, 181, 68, .1); border: 1px dashed rgba(245, 181, 68, .5); font-size: 13.5px; color: var(--muted); }
.sandbox-box strong { color: var(--amber-text); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }

/* Invoice di dashboard */
.inv-icon { width: 38px; height: 38px; flex: none; border-radius: 11px; display: grid; place-items: center; color: var(--blue2); background: var(--blue-soft); }
.inv-icon svg { width: 19px; height: 19px; }
a.dt-row.dt-link { color: inherit; border-radius: 12px; transition: background .2s; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
a.dt-row.dt-link:hover { background: var(--hover); }
.badge-failed { background: rgba(240, 82, 82, .12); color: var(--err-text); }
.secret-saved { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--green-text) !important; }
.secret-saved svg { width: 14px; height: 14px; stroke-width: 2.6; }
.secret-saved code { color: var(--text); }

/* Kelola Pengguna */
.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-chips button { height: 36px; padding: 0 12px; border-radius: 10px; font-weight: 600; font-size: 13.5px; color: var(--muted); background: var(--bg2); border: 1px solid var(--line); transition: color .2s, border-color .2s, background .2s; }
.filter-chips button b { font-weight: 500; color: var(--dim); margin-left: 4px; }
.filter-chips button.active { color: var(--text); border-color: var(--blue); background: var(--blue-soft); }
.user-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.user-card { display: grid; gap: 14px; align-content: start; padding: 16px; border-radius: 16px; background: var(--bg2); border: 1px solid var(--line); transition: border-color .25s, box-shadow .25s; }
.user-card.is-pro { border-color: rgba(245, 181, 68, .35); }
.user-card.is-suspended { border-color: rgba(240, 82, 82, .35); background: linear-gradient(160deg, rgba(240, 82, 82, .07), var(--bg2) 50%); }
.user-card.is-suspended .uc-head .avatar { filter: grayscale(1); opacity: .6; }
.user-card.flash { box-shadow: 0 0 0 3px var(--blue-soft); border-color: var(--blue); }
.uc-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.uc-id { flex: 1; min-width: 0; }
.uc-id strong { display: block; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uc-id small { color: var(--muted); font-size: 12.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uc-info { margin: 0; display: grid; gap: 6px; font-size: 13px; padding: 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.uc-info div { display: flex; justify-content: space-between; gap: 10px; min-width: 0; }
.uc-info dt { color: var(--dim); flex: none; }
.uc-info dd { margin: 0; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.uc-info a { color: var(--blue2); }
.uc-info .badge { height: 22px; font-size: 11px; padding: 0 7px; }
.uc-plan { display: grid; gap: 10px; }
.seg-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.seg-mini label { position: relative; cursor: pointer; }
.seg-mini input { position: absolute; opacity: 0; pointer-events: none; }
.seg-mini span { display: grid; place-items: center; height: 34px; border-radius: 9px; font-weight: 600; font-size: 13px; color: var(--muted); transition: background .2s, color .2s; }
.seg-mini input:checked + span { background: var(--seg-pill); color: var(--text); }
.seg-mini input:focus-visible + span { outline: 2px solid var(--blue); }
.uc-plan-fields { display: grid; grid-template-columns: 90px 1fr; gap: 8px; }
.uc-plan-fields[hidden] { display: none; }
.uc-plan-fields .field > span { font-size: 12px; }
.uc-plan-fields input { height: 40px !important; }
.uc-actions { display: flex; gap: 6px; align-items: center; padding-top: 12px; border-top: 1px solid var(--line); }
.uc-actions form { flex: 1; }
.uc-actions form .btn { width: 100%; }
.uc-actions .btn svg { width: 16px; height: 16px; }
.btn.warn { color: var(--amber-text); }
.uc-actions details.menu .menu-pop { bottom: calc(100% + 6px); top: auto; }
@media (max-width: 560px) {
  .user-grid { grid-template-columns: 1fr; }
  .account-card > .btn-upgrade, .account-card > form { margin-left: 0; width: 100%; }
  .account-card > .btn-upgrade, .account-card > form .btn { width: 100%; }
}
