@import "./fonts.css";

/* ==========================================================================
   box-email · tosca & putih, dengan kedalaman 3D
   ========================================================================== */

:root {
  --tosca: #13c6d8;
  --tosca-light: #8af0f7;
  --tosca-mid: #2dd3e3;
  --tosca-deep: #0a8e9e;
  --tosca-ink: #076b77;
  --ink: #0b3b44;
  --ink-2: #2c5962;
  --muted: #4f7b84;
  --mist: #eaf9fa;
  --foam: #d4eef1;
  --foam-2: #ecf9fa;
  --paper: #ffffff;
  --ok: #0c9466;
  --ok-bg: #e2f6ee;
  --wait: #a96500;
  --wait-bg: #fff2d9;
  --fail: #cf3f58;
  --fail-bg: #ffe9ed;

  --r-panel: 22px;
  --r-item: 16px;
  --r-ctrl: 14px;

  --edge-c: rgba(160, 219, 226, 0.75);
  --panel-shadow: 0 0 0 1px rgba(19, 198, 216, 0.11), 0 3px 0 var(--edge-c), 0 24px 40px -30px rgba(7, 93, 104, 0.6);
  --surface: rgba(255, 255, 255, 0.93);

  --dock-h: 66px;
  --dock-gap: 10px;
  --safe-b: env(safe-area-inset-bottom, 0px);

  --font: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(0.2, 0.75, 0.25, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --i-logout: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/%3E%3Cpath d='M16 17l5-5-5-5'/%3E%3Cpath d='M21 12H9'/%3E%3C/svg%3E");
  --i-lock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2.5'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E");
  --i-unlock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2.5'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 7.8-1.3'/%3E%3C/svg%3E");
  --i-dl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11'/%3E%3Cpath d='M7 10.5l5 5 5-5'/%3E%3Cpath d='M5 20h14'/%3E%3C/svg%3E");
  --i-alert: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7.5v5.5'/%3E%3Cpath d='M12 16.5v.5'/%3E%3C/svg%3E");
  --i-send: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 4 3 11l7 2.5L12.5 21z'/%3E%3Cpath d='M10 13.5 21 4'/%3E%3C/svg%3E");
  --i-copy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='11' height='11' rx='2.5'/%3E%3Cpath d='M5 15V6a2 2 0 0 1 2-2h9'/%3E%3C/svg%3E");
  --i-undo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 14 4 9l5-5'/%3E%3Cpath d='M4 9h10.5a5.5 5.5 0 0 1 0 11H11'/%3E%3C/svg%3E");
  --i-doc: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6' y='3' width='12' height='18' rx='2'/%3E%3Cpath d='M9 8h6M9 12h6M9 16h4'/%3E%3C/svg%3E");
  --i-chat: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 12a8 8 0 0 1-11.6 7.1L4 20l1-4.2A8 8 0 1 1 20 12z'/%3E%3C/svg%3E");
  --i-search: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  --i-trash: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16'/%3E%3Cpath d='M10 11v6M14 11v6'/%3E%3Cpath d='M6 7l1 12.5A2 2 0 0 0 9 21h6a2 2 0 0 0 2-1.5L18 7'/%3E%3Cpath d='M9 7V4h6v3'/%3E%3C/svg%3E");
  --i-reset: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12a9 9 0 1 0 3-6.7L3 8'/%3E%3Cpath d='M3 3v5h5'/%3E%3C/svg%3E");
  --i-archive: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='5' rx='1.5'/%3E%3Cpath d='M5 9v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V9'/%3E%3Cpath d='M10 13h4'/%3E%3C/svg%3E");
  --i-plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
  --i-down-tosca: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a8e9e' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink);
  background: var(--mist);
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: clamp(26px, 6.6vw, 32px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.12; }
h2 { font-size: 20px; font-weight: 800; letter-spacing: -0.025em; line-height: 1.22; }
h3 { font-size: 16px; font-weight: 800; letter-spacing: -0.012em; line-height: 1.3; }
h4 { font-size: 15px; font-weight: 800; letter-spacing: -0.01em; }
a { color: var(--tosca-deep); text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button, [role="button"], [role="switch"], a, summary, label[for], select { cursor: pointer; }
:focus { outline: none; }
:focus-visible { outline: 3px solid rgba(19, 198, 216, 0.55); outline-offset: 2px; }
::selection { background: rgba(19, 198, 216, 0.28); }
.hidden, [hidden] { display: none !important; }

/* --------------------------------------------------------------------------
   Dunia 3D di belakang (diisi oleh ui.js)
   -------------------------------------------------------------------------- */
.world {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: var(--mist);
}
.w-sky {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(44% 34% at 6% 0%, rgba(19, 198, 216, 0.24), transparent 72%),
    radial-gradient(40% 30% at 100% 4%, rgba(98, 226, 238, 0.28), transparent 72%),
    radial-gradient(70% 46% at 50% 108%, rgba(19, 198, 216, 0.22), transparent 70%),
    linear-gradient(180deg, #f5fdfe 0%, #eaf9fa 50%, #ddf4f6 100%);
}
.w-floor {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: min(42vh, 400px);
  perspective: 520px;
  perspective-origin: 50% 0%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to top, #000 0%, rgba(0, 0, 0, 0.7) 42%, transparent 96%);
  mask-image: linear-gradient(to top, #000 0%, rgba(0, 0, 0, 0.7) 42%, transparent 96%);
}
.w-plane {
  position: absolute;
  left: -60%;
  width: 220%;
  top: 0;
  height: 430px;
  transform-origin: 50% 0;
  transform: rotateX(78deg);
  overflow: hidden;
}
.w-plane i {
  position: absolute;
  left: 0;
  right: 0;
  top: -64px;
  bottom: 0;
  background-image:
    linear-gradient(rgba(19, 198, 216, 0.38) 2px, transparent 2px),
    linear-gradient(90deg, rgba(19, 198, 216, 0.38) 2px, transparent 2px);
  background-size: 64px 64px;
  background-position: center top;
  animation: w-run 2.8s linear infinite;
  will-change: transform;
}
.w-layer { position: absolute; inset: 0; will-change: transform; }
.w-obj { position: absolute; left: var(--x, auto); right: var(--r, auto); top: var(--y); perspective: 700px; }
.w-float { transform-style: preserve-3d; animation: w-bob var(--fd, 10s) ease-in-out var(--dl, 0s) infinite; }

.w-cube, .mini-box, .nc-cube { --s: 56px; position: relative; width: var(--s); height: var(--s); transform-style: preserve-3d; }
.w-cube { animation: w-tumble var(--rd, 26s) linear var(--dl, 0s) infinite; }
.w-cube > i, .mini-box > i, .nc-cube > i {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(204, 244, 248, 0.75) 50%, rgba(19, 198, 216, 0.38));
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 0 0 1px rgba(19, 198, 216, 0.24), inset 0 -10px 18px rgba(19, 198, 216, 0.16);
}
.w-cube > i:nth-child(1), .mini-box > i:nth-child(1), .nc-cube > i:nth-child(1) { transform: translateZ(calc(var(--s) / 2)); }
.w-cube > i:nth-child(2), .mini-box > i:nth-child(2), .nc-cube > i:nth-child(2) { transform: rotateY(180deg) translateZ(calc(var(--s) / 2)); }
.w-cube > i:nth-child(3), .mini-box > i:nth-child(3), .nc-cube > i:nth-child(3) { transform: rotateY(90deg) translateZ(calc(var(--s) / 2)); }
.w-cube > i:nth-child(4), .mini-box > i:nth-child(4), .nc-cube > i:nth-child(4) { transform: rotateY(-90deg) translateZ(calc(var(--s) / 2)); }
.w-cube > i:nth-child(5), .mini-box > i:nth-child(5), .nc-cube > i:nth-child(5) { transform: rotateX(90deg) translateZ(calc(var(--s) / 2)); }
.w-cube > i:nth-child(6), .mini-box > i:nth-child(6), .nc-cube > i:nth-child(6) { transform: rotateX(-90deg) translateZ(calc(var(--s) / 2)); }

.w-env { --w: 60px; position: relative; width: var(--w); height: calc(var(--w) * 0.68); transform-style: preserve-3d; animation: w-flip var(--rd, 14s) linear var(--dl, 0s) infinite; }
.w-env > i { position: absolute; inset: 0; border-radius: 7px; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.w-env > i:first-child {
  background:
    linear-gradient(to top right, transparent calc(50% - 1.6px), #2dd3e3 calc(50% - 1.6px), #2dd3e3 calc(50% + 1.6px), transparent calc(50% + 1.6px)) left top / 50% 62% no-repeat,
    linear-gradient(to top left, transparent calc(50% - 1.6px), #2dd3e3 calc(50% - 1.6px), #2dd3e3 calc(50% + 1.6px), transparent calc(50% + 1.6px)) right top / 50% 62% no-repeat,
    linear-gradient(180deg, #ffffff, #e9fafc);
  border: 2px solid #86e6ef;
  box-shadow: 0 12px 20px -14px rgba(7, 93, 104, 0.55);
}
.w-env > i:last-child { transform: rotateY(180deg); background: linear-gradient(150deg, #6ae8f2, #13b9cb); border: 2px solid rgba(255, 255, 255, 0.75); }

.w-small .w-cube { --s: 40px; }
.w-tiny .w-cube { --s: 30px; }
.w-small .w-env { --w: 46px; }
.w-tiny .w-env { --w: 38px; }
.w-ring {
  --s: var(--rs, 160px);
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  border: 2px solid rgba(19, 198, 216, 0.34);
  border-left-color: rgba(19, 198, 216, 0.08);
  animation: w-orbit var(--rd, 20s) linear infinite;
}
.w-orb {
  --s: 22px;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #ffffff 0 16%, #b6f4f8 36%, #2ccfe0 72%, #0fa9bb 100%);
  box-shadow: 0 10px 18px -8px rgba(10, 142, 158, 0.55), inset -3px -4px 8px rgba(7, 110, 122, 0.22);
}

/* --------------------------------------------------------------------------
   Kerangka aplikasi
   -------------------------------------------------------------------------- */
.app { position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh; }

.header {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: max(12px, env(safe-area-inset-top)) 16px 4px;
}
.brand, .nav-brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--ink); }
.brand-mark { flex: none; width: 50px; height: 50px; display: grid; place-items: center; perspective: 420px; }
.brand-logo { width: 50px; height: auto; transform-origin: 50% 70%; animation: logo-sway 7s ease-in-out infinite; }
.brand-word, .nb-word { display: grid; min-width: 0; }
.brand-word b, .nb-word b { font-size: 17px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; }
.brand-word small, .nb-word small { font-size: 12px; font-weight: 600; color: var(--muted); line-height: 1.3; }

#btn-logout {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 14px 8px 12px;
  border-radius: 999px;
  border: 1px solid #f5d2d9;
  background: #fff;
  color: var(--fail);
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 2px 0 #f5d2d9;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
#btn-logout::before {
  content: "";
  width: 17px;
  height: 17px;
  background: currentColor;
  -webkit-mask: var(--i-logout) center / contain no-repeat;
  mask: var(--i-logout) center / contain no-repeat;
}
#btn-logout:active { transform: translateY(2px); box-shadow: 0 0 0 #f5d2d9; }

.content {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-content: start;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 6px 16px calc(var(--dock-h) + var(--dock-gap) + 30px + var(--safe-b));
}
.content > * { min-width: 0; }
.layout-narrow .content { max-width: 760px; }

.page-title { display: grid; gap: 4px; padding: 6px 2px 2px; }
.page-title h1 { font-size: clamp(26px, 7vw, 34px); }
.page-title p { color: var(--muted); font-size: 14px; font-weight: 600; max-width: 62ch; }

/* --------------------------------------------------------------------------
   Panel & kartu
   -------------------------------------------------------------------------- */
.card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-content: start;
  min-width: 0;
  padding: 16px;
  border-radius: var(--r-panel);
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.96);
  box-shadow: var(--panel-shadow);
}
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-content: start; }
.card-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.card-head h2, .card-head h3 { min-width: 0; }
.head-ico, .ann-ico, .sc-ico, .doc-ico {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--tosca-ink);
  background: linear-gradient(160deg, #ffffff, #dbf5f8);
  box-shadow: inset 0 1px 0 #fff, inset 0 -2px 0 rgba(19, 198, 216, 0.22), 0 2px 0 #cdebef;
}
.head-ico .i, .ann-ico .i, .sc-ico .i { width: 19px; height: 19px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 2px 0; }
.note { font-size: 13.5px; font-weight: 600; color: var(--muted); }
.note b { color: var(--ink-2); }

/* Saldo: kotak 3D tosca ------------------------------------------------- */
.balance {
  --glare: rgba(255, 255, 255, 0.42);
  gap: 6px;
  padding: 20px 20px 22px;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  border: 0;
  background:
    radial-gradient(130% 120% at 0% 0%, rgba(140, 244, 250, 0.5) 0%, rgba(140, 244, 250, 0) 50%),
    linear-gradient(140deg, #15bfd1 0%, #0da2b5 48%, #087c8b 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 0 -2px 0 rgba(4, 80, 90, 0.2),
    0 6px 0 #0a7c8a,
    0 30px 44px -26px rgba(10, 142, 158, 0.9);
}
.balance > :not(.bal-deco) { position: relative; z-index: 2; }
.balance small { font-size: 13px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px rgba(4, 70, 80, 0.35); }
.balance .amount {
  font-size: clamp(34px, 10vw, 46px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 0 rgba(5, 96, 108, 0.35);
  overflow-wrap: anywhere;
}
.balance .sub {
  justify-self: start;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  margin-top: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}
.balance .sub b { color: #fff; font-weight: 800; }
.balance::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: -50% -80%;
  background: linear-gradient(100deg, transparent 44%, rgba(255, 255, 255, 0.26) 50%, transparent 56%);
  transform: translateX(-38%);
  animation: sheen 7s ease-in-out 1.4s infinite;
  pointer-events: none;
}
.bal-deco {
  position: absolute;
  z-index: 1;
  right: 4px;
  top: 50%;
  width: 136px;
  height: 120px;
  transform: translateY(-50%);
  perspective: 500px;
  pointer-events: none;
}
.coin { position: absolute; width: 46px; height: 46px; transform-style: preserve-3d; animation: coin-spin 5.5s linear infinite; }
.coin > i {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  background: radial-gradient(circle at 34% 30%, #ffffff 0 18%, #e7fbfd 42%, #b4eef4 72%, #86dfe9 100%);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.85), inset 0 0 0 6px rgba(19, 198, 216, 0.35), 0 8px 14px -6px rgba(4, 80, 90, 0.45);
}
.coin > i::before { content: "Rp"; font-size: 13px; font-weight: 800; letter-spacing: -0.02em; color: var(--tosca-deep); }
.coin > i:last-child { transform: rotateY(180deg); }
.coin.c1 { right: 16px; top: 4px; }
.coin.c2 { right: 74px; top: 60px; width: 34px; height: 34px; animation-duration: 4.2s; animation-direction: reverse; }
.coin.c2 > i::before { font-size: 10px; }
.mini-box { --s: 28px; position: absolute; right: 24px; bottom: 8px; animation: w-tumble 12s linear infinite; }
.mini-box > i { border-radius: 6px; background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.32)); border-color: rgba(255, 255, 255, 0.85); box-shadow: none; }

/* Ringkasan (beranda) ---------------------------------------------------- */
.overview { gap: 14px; }
.status-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.overview .stat {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border-radius: var(--r-item);
  background: linear-gradient(180deg, #f8feff, #eefafb);
  box-shadow: inset 0 0 0 1px rgba(19, 198, 216, 0.13);
}
.overview .stat { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 10px; row-gap: 8px; }
.overview .stat > div { display: contents; }
.overview .stat .stat-ico { grid-row: 1; grid-column: 1; }
.overview .stat b { grid-row: 1; grid-column: 2; }
.overview .stat small { grid-row: 2; grid-column: 1 / -1; }
.stat small, .stat-box small { font-size: 12.5px; font-weight: 700; color: var(--muted); line-height: 1.3; }
.stat b, .stat-box b {
  font-size: clamp(20px, 6vw, 26px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.stat-ico { flex: none; width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; }
.stat-ico .i { width: 21px; height: 21px; }
.stat-ico.ok { color: var(--ok); background: linear-gradient(160deg, #f2fcf8, #d5f3e7); box-shadow: inset 0 -2px 0 rgba(12, 148, 102, 0.18), 0 2px 0 #c4eadb; }
.stat-ico.wait { color: var(--wait); background: linear-gradient(160deg, #fffaf0, #ffecc7); box-shadow: inset 0 -2px 0 rgba(169, 101, 0, 0.16), 0 2px 0 #f3dcaf; }
.stat-ico.fail { color: var(--fail); background: linear-gradient(160deg, #fff6f8, #ffdde4); box-shadow: inset 0 -2px 0 rgba(207, 63, 88, 0.16), 0 2px 0 #f6cbd4; }

.limit-box { display: grid; gap: 8px; }
.limit-row, .limit-line { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 14px; font-weight: 700; }
.limit-row > span:first-child, .limit-line > span { color: var(--ink-2); }
.limit-row > span:last-child, .limit-line > b { font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.limit-sisa { color: var(--tosca-deep); }
.meter { position: relative; height: 10px; border-radius: 999px; overflow: hidden; background: #dff2f4; box-shadow: inset 0 1px 2px rgba(7, 93, 104, 0.16); }
.meter > i {
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--p, 0) * 100%);
  border-radius: inherit;
  overflow: hidden;
  background: linear-gradient(90deg, #5ce4ef, #12b6c8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  transition: width 1.1s var(--ease);
}
.meter > i::after {
  content: "";
  position: absolute;
  inset: 0 0 0 -18px;
  background: repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.3) 0 8px, transparent 8px 16px);
  animation: meter-run 1.1s linear infinite;
}
.meter.full > i { background: linear-gradient(90deg, #f6c46a, #e39400); }

/* Panel statistik dengan garis pemisah ---------------------------------- */
.stat-panel {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  padding: 0;
  overflow: hidden;
  background: var(--foam);
}
.card.stat-panel, .card.meta-row { padding: 0; }
.stat-panel > * { display: grid; align-content: start; gap: 4px; min-width: 0; padding: 14px 12px; background: #fff; }
.stat-panel .stat-ico { width: 32px; height: 32px; border-radius: 11px; margin-bottom: 4px; }
.stat-panel .stat-ico .i { width: 18px; height: 18px; }
.stat-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.money-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.money-2 > :nth-child(2) { grid-column: 1 / -1; order: -1; }

/* Pengumuman ------------------------------------------------------------- */
.ann { gap: 10px; }
.ann-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ann-head > b { flex: 1; min-width: 0; font-size: 15px; font-weight: 800; }
.ann-ctrl { display: flex; align-items: center; gap: 4px; flex: none; }
.icon-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 12px;
  border: 1px solid #d5ecef;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 2px 0 #d5ecef;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.icon-btn .i { width: 18px; height: 18px; }
.icon-btn:active { transform: translateY(2px); box-shadow: 0 0 0 #d5ecef; }
#ann-nav { min-width: 38px; text-align: center; font-size: 13px; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
#ann-text { color: var(--ink-2); font-size: 15px; line-height: 1.6; min-height: 3.2em; transform-origin: 50% 0; }
#ann-text.flip { animation: ann-flip 0.55s var(--ease); }

/* Menu & ubin ------------------------------------------------------------ */
.menu-panel {
  padding: 18px 8px 14px;
  border-radius: var(--r-panel);
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.96);
  box-shadow: var(--panel-shadow);
}
.menu-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.menu-tile {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}
.mt-text { display: grid; gap: 2px; min-width: 0; flex: 1; }
.mt-text b { font-size: 15px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.25; }
.mt-text span { font-size: 12.5px; font-weight: 600; color: var(--muted); line-height: 1.4; overflow-wrap: anywhere; }
.chev { flex: none; margin-left: auto; display: grid; place-items: center; color: #95bec5; transition: transform 0.3s var(--spring), color 0.2s; }
.chev .i { width: 18px; height: 18px; }
.menu-tile:hover .chev { transform: translateX(3px); color: var(--tosca-deep); }

.ico {
  position: relative;
  flex: none;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: var(--tosca-ink);
  background: linear-gradient(160deg, #ffffff 0%, #e2f8fa 55%, #c6f0f4 100%);
  box-shadow: inset 0 1px 0 #fff, inset 0 -3px 0 rgba(19, 198, 216, 0.22), 0 3px 0 #c3e8ed, 0 12px 18px -12px rgba(7, 93, 104, 0.55);
  transform: perspective(300px) translate3d(0, 0, 0) rotateX(0deg) rotateY(0deg);
  transition: transform 0.45s var(--spring), box-shadow 0.3s ease;
}
.ico .i { width: 22px; height: 22px; }
.ico-primary .ico {
  color: #fff;
  background: linear-gradient(160deg, #6ae8f2 0%, #19c2d5 50%, #0c9fb1 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), inset 0 -3px 0 rgba(4, 90, 100, 0.25), 0 3px 0 #0b8696, 0 12px 18px -10px rgba(10, 142, 158, 0.75);
}
.ico-wa { color: #0b8f7c; background: linear-gradient(160deg, #ffffff, #d5f5ec); box-shadow: inset 0 1px 0 #fff, inset 0 -3px 0 rgba(12, 154, 134, 0.2), 0 3px 0 #c2eadf, 0 12px 18px -12px rgba(7, 93, 104, 0.5); }
.menu-tile:hover .ico, .menu-tile:focus-visible .ico { transform: perspective(300px) translate3d(0, -3px, 0) rotateX(14deg) rotateY(-14deg); }
.menu-tile:active .ico { transform: perspective(300px) translate3d(0, 2px, 0) rotateX(0deg) rotateY(0deg) scale(0.95); }

/* Beranda: peluncur ikon di HP */
.menu-apps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 2px; }
.menu-apps .menu-tile { flex-direction: column; justify-content: flex-start; gap: 8px; padding: 2px; text-align: center; border-radius: 16px; }
.menu-apps .mt-text { flex: none; }
.menu-apps .mt-text b { font-size: 12px; font-weight: 700; color: var(--ink-2); line-height: 1.25; }
.menu-apps .mt-text span { display: none; }
.menu-apps .ico { width: 54px; height: 54px; border-radius: 18px; }
.menu-apps .ico .i { width: 25px; height: 25px; }

.contact-list .menu-tile, .settings-grid .menu-tile { padding: 14px 16px; }
.settings-grid .menu-tile {
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.96);
  box-shadow: var(--panel-shadow);
}

/* --------------------------------------------------------------------------
   Tombol 3D
   -------------------------------------------------------------------------- */
.btn {
  --edge: #cfe8ec;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 18px;
  border-radius: var(--r-ctrl);
  border: 1px solid #d5ecef;
  background: linear-gradient(180deg, #ffffff, #f4fbfc);
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.005em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  box-shadow: inset 0 1px 0 #fff, 0 3px 0 var(--edge), 0 12px 20px -16px rgba(7, 93, 104, 0.6);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.2s ease;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}
.btn:hover { filter: brightness(1.03) saturate(1.05); }
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: inset 0 1px 0 #fff, 0 0 0 var(--edge), 0 6px 12px -12px rgba(7, 93, 104, 0.6); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; filter: grayscale(0.25); }
.btn .i { width: 18px; height: 18px; flex: none; }
.btn.btn-gold {
  --edge: #0a8796;
  color: #03343b;
  border-color: transparent;
  background: linear-gradient(180deg, #8af0f7 0%, #2dd3e3 50%, #13b8ca 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), inset 0 -2px 0 rgba(7, 110, 122, 0.22), 0 4px 0 var(--edge), 0 16px 24px -16px rgba(10, 142, 158, 0.95);
}
.btn.btn-gold:active:not(:disabled) { transform: translateY(4px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), inset 0 -2px 0 rgba(7, 110, 122, 0.22), 0 0 0 var(--edge), 0 8px 14px -12px rgba(10, 142, 158, 0.9); }
.btn.btn-success { --edge: #0a7a54; color: #fff; border-color: transparent; background: linear-gradient(180deg, #2fcf98, #0e9f6e); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 3px 0 var(--edge), 0 12px 20px -14px rgba(12, 148, 102, 0.9); }
.btn.btn-soft-danger { --edge: #f2c4cd; color: var(--fail); border-color: #f7d5dc; background: linear-gradient(180deg, #fff6f8, #ffecf0); }
.btn.btn-soft-amber { --edge: #efd7a6; color: var(--wait); border-color: #f5e2b9; background: linear-gradient(180deg, #fffaf0, #fff1d6); }
.btn.btn-dark { --edge: #04252b; color: #fff; border-color: transparent; background: linear-gradient(180deg, #17606d, #0b3b44); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 3px 0 var(--edge), 0 12px 20px -14px rgba(7, 59, 68, 0.9); }
.btn.btn-white { color: var(--ink); background: #fff; }
.btn.btn-sm { min-height: 38px; padding: 7px 12px; font-size: 13px; border-radius: 12px; }
.btn.btn-xs { min-height: 32px; padding: 5px 10px; font-size: 12px; border-radius: 10px; box-shadow: inset 0 1px 0 #fff, 0 2px 0 var(--edge); }
.btn.btn-lg { min-height: 52px; font-size: 16px; }
.btn-full { width: 100%; }
.btn-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.btn-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gen-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.gen-grid .btn { min-height: 54px; padding-inline: 0; font-size: 18px; font-variant-numeric: tabular-nums; }

.bi::before {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: var(--bi) center / contain no-repeat;
  mask: var(--bi) center / contain no-repeat;
}
.bi-send { --bi: var(--i-send); }
.bi-copy { --bi: var(--i-copy); }
.bi-undo { --bi: var(--i-undo); }
.bi-doc { --bi: var(--i-doc); }
.bi-chat { --bi: var(--i-chat); }
.bi-search { --bi: var(--i-search); }
.bi-dl { --bi: var(--i-dl); }
.bi-trash { --bi: var(--i-trash); }
.bi-reset { --bi: var(--i-reset); }
.bi-archive { --bi: var(--i-archive); }
.bi-plus { --bi: var(--i-plus); }

/* --------------------------------------------------------------------------
   Formulir
   -------------------------------------------------------------------------- */
form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin: 0; min-width: 0; }
.field { display: grid; gap: 7px; min-width: 0; margin: 0; }
.field label { font-size: 13px; font-weight: 800; color: var(--ink-2); }
.field .note { font-size: 12.5px; }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
select,
textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: var(--r-ctrl);
  border: 1.5px solid #cfe8ec;
  background: #fbfeff;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  outline: none;
  box-shadow: inset 0 2px 0 rgba(7, 93, 104, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}
textarea { min-height: 124px; resize: vertical; line-height: 1.55; }
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus, select:focus, textarea:focus {
  border-color: var(--tosca);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(19, 198, 216, 0.18);
}
input[readonly], textarea[readonly] { background: var(--foam-2); color: var(--ink-2); }
input:disabled, select:disabled, textarea:disabled { background: #f2f9fa; color: #7b9aa0; border-style: dashed; cursor: not-allowed; opacity: 1; -webkit-text-fill-color: #7b9aa0; }
select { padding-right: 44px; background-image: var(--i-down-tosca); background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; }
input[type="date"] { text-align: left; }
input[type="date"]::-webkit-date-and-time-value { text-align: left; }
input[type="checkbox"] { width: 20px; height: 20px; margin: 0; accent-color: var(--tosca-deep); flex: none; }
input[type="file"] {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 8px;
  border-radius: var(--r-ctrl);
  border: 1.5px dashed #bfe3e8;
  background: #fbfeff;
  font-size: 14px;
  color: var(--ink-2);
}
input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 8px 14px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, #e9fbfd, #d4f5f9);
  color: var(--tosca-ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
::placeholder { color: #94b4ba; opacity: 1; font-weight: 500; }
#gen-result { font-variant-numeric: tabular-nums; min-height: 148px; }
.pass-view b { display: inline-block; padding: 1px 8px; border-radius: 8px; background: var(--foam-2); color: var(--ink); font-weight: 800; overflow-wrap: anywhere; }

/* Saklar 3D ------------------------------------------------------------- */
.switch {
  position: relative;
  flex: none;
  width: 54px;
  height: 32px;
  border-radius: 999px;
  background: #d8e9ec;
  box-shadow: inset 0 2px 4px rgba(7, 93, 104, 0.2), inset 0 0 0 1px rgba(7, 93, 104, 0.06);
  transition: background 0.25s ease;
  cursor: pointer;
}
.switch i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffffff, #edf7f8);
  box-shadow: 0 2px 0 rgba(7, 93, 104, 0.18), 0 6px 10px -4px rgba(7, 93, 104, 0.35);
  transition: transform 0.38s var(--spring);
}
.switch.on { background: linear-gradient(180deg, #3fdbe9, #0fb3c6); box-shadow: inset 0 2px 4px rgba(7, 93, 104, 0.25); }
.switch.on i { transform: translateX(22px); }
.switch-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.card.switch-card { padding: 14px 16px; }
.sc-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sc-left > div { min-width: 0; }
.switch-card b { display: block; font-size: 15px; font-weight: 800; }
.switch-card p { margin-top: 2px; font-size: 12.5px; font-weight: 600; color: var(--muted); line-height: 1.4; }
form .switch-card { padding: 4px 0 14px; border-bottom: 1px solid var(--foam); }

/* Tab ------------------------------------------------------------------- */
.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  overflow-x: auto;
  border-radius: 16px;
  background: rgba(210, 238, 241, 0.75);
  box-shadow: inset 0 1px 2px rgba(7, 93, 104, 0.12);
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 1 0 auto;
  min-height: 40px;
  padding: 8px 14px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.3s var(--spring);
}
.tab.on { background: #fff; color: var(--ink); box-shadow: 0 2px 0 #cdebef, 0 8px 14px -10px rgba(7, 93, 104, 0.55); transform: translateY(-1px); }

/* Label status ---------------------------------------------------------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--foam-2);
  color: var(--tosca-ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
  white-space: nowrap;
  text-transform: capitalize;
  box-shadow: inset 0 0 0 1px rgba(19, 198, 216, 0.16);
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { background: var(--ok-bg); color: var(--ok); box-shadow: inset 0 0 0 1px rgba(12, 148, 102, 0.18); }
.pill.wait { background: var(--wait-bg); color: var(--wait); box-shadow: inset 0 0 0 1px rgba(169, 101, 0, 0.16); }
.pill.fail { background: var(--fail-bg); color: var(--fail); box-shadow: inset 0 0 0 1px rgba(207, 63, 88, 0.16); }
.vip-chip {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  vertical-align: 2px;
  color: #6b4b00;
  background: linear-gradient(160deg, #fff4c2, #ffd45c);
  box-shadow: 0 1px 0 #e0b23a;
}

.banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--r-item);
  background: var(--wait-bg);
  color: #7a4b04;
  font-size: 14px;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(169, 101, 0, 0.16), 0 3px 0 #f1dcae;
}
.banner::before {
  content: "";
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  background: currentColor;
  -webkit-mask: var(--i-alert) center / contain no-repeat;
  mask: var(--i-alert) center / contain no-repeat;
}
.banner.bad { background: var(--fail-bg); color: var(--fail); box-shadow: inset 0 0 0 1px rgba(207, 63, 88, 0.16), 0 3px 0 #f6cbd4; }

.count-note, .status-note {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 0 0 1px rgba(19, 198, 216, 0.16), 0 2px 0 #d5eef1;
}

/* --------------------------------------------------------------------------
   Daftar: riwayat, peringkat, antrean, penarikan
   -------------------------------------------------------------------------- */
.item { gap: 10px; overflow: hidden; }
.item .top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 12px; min-width: 0; }
.item .top > :first-child { min-width: 0; }
.item .top b, .item .mail { font-weight: 800; overflow-wrap: anywhere; word-break: break-word; }
.item .date { font-size: 12px; font-weight: 600; color: var(--muted); }
.item .foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--foam);
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.item .foot b { color: var(--ink); font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.item[data-status]::after { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 4px; border-radius: 0 4px 4px 0; background: var(--tosca); }
.item[data-status="ok"]::after { background: var(--ok); }
.item[data-status="wait"]::after { background: #e8a33a; }
.item[data-status="fail"]::after { background: var(--fail); }

.empty-state { justify-items: center; gap: 10px; padding: 28px 16px; text-align: center; color: var(--muted); font-weight: 700; }
.empty-state::before {
  content: "";
  width: 76px;
  height: 66px;
  background: url("../img/logo-sm.png") center / contain no-repeat;
  animation: float-y 4.5s ease-in-out infinite;
}
.empty-inline { padding: 10px 0; text-align: center; color: var(--muted); font-size: 14px; font-weight: 600; }

.lb-row { display: flex; align-items: center; gap: 12px; }
.lb-rank {
  flex: none;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 800;
  color: var(--tosca-ink);
  background: linear-gradient(160deg, #ffffff, #dcf6f9);
  box-shadow: inset 0 -3px 0 rgba(19, 198, 216, 0.2), 0 2px 0 #cdebef;
}
.lb-meta { flex: 1; min-width: 0; }
.lb-meta h4 { overflow-wrap: anywhere; }
.lb-meta p { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.lb-reward { flex: none; font-weight: 800; color: var(--tosca-deep); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lb-1 .lb-rank { color: #6b4b00; background: linear-gradient(160deg, #fff6cf, #ffd45c 60%, #f2b705); box-shadow: inset 0 1px 0 #fffbe8, inset 0 -3px 0 rgba(160, 110, 0, 0.25), 0 3px 0 #d9a300; }
.lb-2 .lb-rank { color: #3f5c66; background: linear-gradient(160deg, #ffffff, #dfe9ec 60%, #c3d3d8); box-shadow: inset 0 1px 0 #fff, inset 0 -3px 0 rgba(63, 92, 102, 0.18), 0 3px 0 #b5c8ce; }
.lb-3 .lb-rank { color: #7a3f0c; background: linear-gradient(160deg, #fff1e4, #ffc999 60%, #ee9a52); box-shadow: inset 0 1px 0 #fff8f1, inset 0 -3px 0 rgba(122, 63, 12, 0.2), 0 3px 0 #d98443; }
.lb-1 { box-shadow: 0 0 0 1.5px rgba(242, 183, 5, 0.45), 0 3px 0 rgba(242, 205, 110, 0.6), 0 24px 40px -30px rgba(160, 110, 0, 0.6); }

.queue-item {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.96);
  box-shadow: var(--panel-shadow);
}
.card .queue-item { padding: 12px 0; border: 0; border-radius: 0; background: none; box-shadow: none; border-bottom: 1px solid var(--foam); }
.card .queue-item:first-child { padding-top: 2px; }
.card .queue-item:last-child { border-bottom: 0; padding-bottom: 0; }
.q-top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 4px 12px; min-width: 0; }
.q-top > div { min-width: 0; }
.q-top b { overflow-wrap: anywhere; word-break: break-word; }
.q-top .date, .wd-row .date { font-size: 12.5px; font-weight: 600; color: var(--muted); overflow-wrap: anywhere; }
.q-amt { flex: none; color: var(--tosca-deep); font-variant-numeric: tabular-nums; white-space: nowrap; }
.q-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.q-actions .btn { min-height: 44px; padding: 8px 10px; font-size: 14px; }

.wd-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--foam); }
.wd-row:last-child { border-bottom: 0; padding-bottom: 2px; }
.wd-row > div { min-width: 0; }
.wd-row b { font-variant-numeric: tabular-nums; }

.kv { display: grid; }
.kv-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--foam); }
.kv-row:first-child { padding-top: 0; }
.kv-row span { font-size: 13px; font-weight: 700; color: var(--muted); }
.kv-row b { text-align: right; overflow-wrap: anywhere; }
.kv-note { padding-top: 10px; font-size: 12.5px; font-weight: 600; color: var(--muted); }

.meta-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; padding: 0; overflow: hidden; background: var(--foam); }
.meta-row > span { display: grid; gap: 2px; padding: 14px 16px; background: #fff; font-size: 13px; font-weight: 700; color: var(--muted); }
.meta-row > span b { color: var(--ink); font-size: 18px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

/* --------------------------------------------------------------------------
   Tabel
   -------------------------------------------------------------------------- */
.table-card { padding-bottom: 8px; }
.table-wrap {
  overflow-x: auto;
  margin: 0 -16px;
  padding: 0 16px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #bfe3e8 transparent;
  background:
    linear-gradient(90deg, #fff 30%, rgba(255, 255, 255, 0)) left center / 32px 100% no-repeat local,
    linear-gradient(270deg, #fff 30%, rgba(255, 255, 255, 0)) right center / 32px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(7, 93, 104, 0.16), transparent) left center / 12px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(7, 93, 104, 0.16), transparent) right center / 12px 100% no-repeat scroll;
}
table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 14px; }
th {
  padding: 10px;
  border-bottom: 1.5px solid var(--foam);
  text-align: left;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--muted);
  white-space: nowrap;
}
td { padding: 12px 10px; border-bottom: 1px solid var(--foam-2); vertical-align: middle; overflow-wrap: anywhere; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background 0.15s ease; }
tbody tr:hover { background: rgba(19, 198, 216, 0.05); }
th:first-child, td:first-child { padding-left: 4px; }
th.th-act { text-align: right; }
td small { font-size: 12px; font-weight: 700; color: var(--muted); }
td[colspan] { padding: 18px 10px; text-align: center; font-weight: 600; color: var(--muted); }
.row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }

/* --------------------------------------------------------------------------
   Referral, profil, dokumen
   -------------------------------------------------------------------------- */
.ref-card { gap: 14px; }
.ticket {
  position: relative;
  display: grid;
  gap: 6px;
  justify-items: center;
  padding: 18px 18px 16px;
  text-align: center;
  border-radius: 18px;
  background: linear-gradient(180deg, #f3fdfe, #e2f7f9);
  border: 2px dashed #9fe3ea;
}
.ticket::before, .ticket::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 2px #cfeff2;
}
.ticket::before { left: -11px; }
.ticket::after { right: -11px; }
.ref-code { font-size: clamp(26px, 8vw, 34px); font-weight: 800; letter-spacing: 0.06em; line-height: 1.15; color: var(--ink); overflow-wrap: anywhere; }

.profile-card { display: flex; align-items: center; gap: 14px; }
.avatar {
  flex: none;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 19px;
  color: #fff;
  background: linear-gradient(160deg, #6ae8f2, #0c9fb1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 4px 0 #0b8696, 0 14px 20px -12px rgba(10, 142, 158, 0.8);
}
.avatar .i { width: 28px; height: 28px; }
.profile-text { display: grid; gap: 2px; min-width: 0; }
.profile-text h2 { overflow-wrap: anywhere; }

.doc-card { gap: 12px; padding: 22px 20px; }
.doc-ico { width: 48px; height: 48px; border-radius: 16px; }
.doc-ico .i { width: 24px; height: 24px; }
.doc-card h1 { font-size: clamp(24px, 6vw, 30px); }
.doc-body { white-space: pre-wrap; color: var(--ink-2); font-size: 15.5px; line-height: 1.75; max-width: 68ch; overflow-wrap: anywhere; }

/* Admin: rekening jaringan, iklan, pengumuman ------------------------------ */
.payout-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.payout-row { display: grid; gap: 10px; min-width: 0; padding: 14px; border-radius: var(--r-item); background: #f6fdfe; box-shadow: inset 0 0 0 1px rgba(19, 198, 216, 0.16); }
.pay-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pay-top input[name="pname"] { flex: 1; font-weight: 800; }
.pay-check {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 8px 12px;
  border-radius: 12px;
  background: #fff;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px #d5ecef;
  cursor: pointer;
}
.pay-check:has(input:checked) { background: var(--ok-bg); color: var(--ok); box-shadow: inset 0 0 0 1px rgba(12, 148, 102, 0.25); }
.pay-grid .field { gap: 6px; }
.ad-preview { display: none; width: 100%; max-height: 200px; object-fit: cover; border-radius: var(--r-item); box-shadow: 0 0 0 1px rgba(19, 198, 216, 0.16); }
#ann-list { display: grid; gap: 12px; }
#form-promote-admin:has(#promote-box[style*="none"]) { display: none; }

/* Admin beranda: dua kolom di layar lebar --------------------------------- */
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.admin-home { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ah-queue, .ah-side { min-width: 0; }
.ah-side { display: contents; }
.ah-maint { order: -1; }
.arsip-grid, .dl-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.dl-grid { gap: 10px; }

/* --------------------------------------------------------------------------
   Navigasi member (dock 3D mengambang)
   -------------------------------------------------------------------------- */
.dock, .nav {
  position: fixed;
  z-index: 50;
  left: 12px;
  right: 12px;
  bottom: calc(var(--dock-gap) + var(--safe-b));
  height: var(--dock-h);
  padding: 6px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.96);
  box-shadow: 0 0 0 1px rgba(19, 198, 216, 0.13), 0 4px 0 rgba(176, 226, 232, 0.7), 0 22px 40px -18px rgba(7, 93, 104, 0.55);
}
.dock { display: flex; align-items: stretch; gap: 2px; }
.dock a, .nav-main a {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 16px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  transition: color 0.2s ease, background 0.2s ease;
}
.dock a > span, .nav-main .nl { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dock a .i, .nav-main a .i { width: 22px; height: 22px; transition: transform 0.4s var(--spring); }
.dock a.active, .nav-main a.active, .nav-main a.parent-active {
  color: var(--tosca-ink);
  background: linear-gradient(180deg, #ebfbfd, #d3f4f8);
  box-shadow: inset 0 -2px 0 rgba(19, 198, 216, 0.28), 0 2px 0 #cdebef;
}
.dock a.active .i, .nav-main a.active .i, .nav-main a.parent-active .i { transform: translateY(-2px) scale(1.08); }
.dock a:active .i, .nav-main a:active .i { transform: scale(0.9); }

/* Navigasi admin: bilah bawah di HP, sidebar di desktop */
.nav-brand, .nav-sec, .nav-extra, .nav-card { display: none; }
.nav-main { display: flex; gap: 2px; height: 100%; }
.nav-main .ni { display: grid; place-items: center; }

.page-head {
  position: relative;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  padding: max(14px, env(safe-area-inset-top)) 16px 6px;
}
.ph-left { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 0%; }
.ph-title { display: grid; gap: 1px; min-width: 0; }
.ph-title h2 { font-size: clamp(20px, 5.6vw, 24px); overflow-wrap: anywhere; }
.ph-sub { font-size: 13px; font-weight: 600; color: var(--muted); }
.back {
  flex: none;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 0 0 1px rgba(19, 198, 216, 0.16), 0 3px 0 #cdebef;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.back .i { width: 20px; height: 20px; }
.back:active { transform: translateY(2px); box-shadow: 0 0 0 1px rgba(19, 198, 216, 0.16), 0 1px 0 #cdebef; }
.page-head #btn-logout { order: 1; }
.lock-toggle {
  order: 2;
  flex: 1 0 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 14px;
  border: 1px solid #d5ecef;
  background: linear-gradient(180deg, #ffffff, #f4fbfc);
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 3px 0 #cfe8ec;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.lock-toggle::before {
  content: "";
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: var(--i-lock) center / contain no-repeat;
  mask: var(--i-lock) center / contain no-repeat;
}
.lock-toggle[data-open="1"] { color: #03343b; border-color: transparent; background: linear-gradient(180deg, #8af0f7, #2dd3e3); box-shadow: 0 3px 0 #0a8796; }
.lock-toggle[data-open="1"]::before { -webkit-mask-image: var(--i-unlock); mask-image: var(--i-unlock); }
.lock-toggle:active { transform: translateY(3px); box-shadow: 0 0 0 #cfe8ec; }

/* --------------------------------------------------------------------------
   Halaman masuk & daftar: logo 3D
   -------------------------------------------------------------------------- */
.auth-wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(28px, var(--safe-b));
}
.auth-card { width: min(440px, 100%); display: grid; gap: 6px; }
.hero-stage { height: 214px; display: grid; place-items: center; perspective: 1000px; }
.logo3d { position: relative; width: min(232px, 64vw); aspect-ratio: 640 / 551; transform-style: preserve-3d; animation: hero-float 9s ease-in-out infinite; }
.hero-logo { position: relative; width: 100%; height: auto; transform: translateZ(40px); }
.logo-shine {
  position: absolute;
  inset: 0;
  transform: translateZ(41px);
  pointer-events: none;
  -webkit-mask: url("../img/logo.png") center / 100% 100% no-repeat;
  mask: url("../img/logo.png") center / 100% 100% no-repeat;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.75) 48%, rgba(255, 255, 255, 0) 58%) 0 0 / 300% 100% no-repeat;
  animation: logo-shine 6s ease-in-out 1s infinite;
}
.halo {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 132%;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%) translateZ(-40px);
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.95), rgba(190, 244, 249, 0.6) 52%, rgba(19, 198, 216, 0) 100%);
}
.orbit {
  position: absolute;
  left: 50%;
  top: 54%;
  width: 128%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid rgba(19, 198, 216, 0.42);
  transform-style: preserve-3d;
  animation: orbit-a 10s linear infinite;
}
.orbit > i {
  position: absolute;
  left: 50%;
  top: -10px;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #ffffff 0 18%, #aef3f8 40%, #19c2d5 78%);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.65);
  animation: orbit-face-a 10s linear infinite;
}
.orbit.o2 { top: 50%; width: 104%; border: 2px dashed rgba(19, 198, 216, 0.3); animation: orbit-b 16s linear infinite reverse; }
.orbit.o2 > i { width: 22px; height: 15px; margin-left: -11px; top: -8px; border-radius: 4px; background: linear-gradient(180deg, #ffffff, #e6f9fb); box-shadow: inset 0 0 0 2px #5fe0eb; animation: orbit-face-b 16s linear infinite reverse; }
.auth-form { gap: 16px; padding: 22px 20px 20px; }
.auth-head { display: grid; gap: 4px; }
.lede { color: var(--muted); font-size: 14.5px; font-weight: 600; }
.auth-links { text-align: center; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.auth-links a { font-weight: 800; }

/* --------------------------------------------------------------------------
   Tombol WhatsApp, toast, pop-up iklan
   -------------------------------------------------------------------------- */
.wa-btn {
  position: fixed;
  z-index: 45;
  right: 16px;
  bottom: calc(var(--dock-h) + var(--dock-gap) + 16px + var(--safe-b));
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 19px;
  color: #fff;
  background: linear-gradient(180deg, #43e2c6, #10a58e);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 4px 0 #0b7f6d, 0 18px 28px -14px rgba(12, 154, 134, 0.85);
  animation: wa-bob 3.8s ease-in-out infinite;
}
.wa-btn .i { width: 26px; height: 26px; }
.wa-btn:active { transform: translateY(3px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 1px 0 #0b7f6d; }

.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: calc(var(--dock-h) + var(--dock-gap) + 18px + var(--safe-b));
  max-width: min(92vw, 440px);
  padding: 12px 18px;
  border-radius: 16px;
  background: #0b3b44;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform-origin: 50% 100%;
  transform: translateX(-50%) perspective(600px) rotateX(70deg) translateY(14px);
  box-shadow: 0 4px 0 #062a31, 0 18px 30px -12px rgba(7, 93, 104, 0.6);
  transition: transform 0.45s var(--spring), opacity 0.25s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) perspective(600px) rotateX(0deg) translateY(0); }
.auth-page .toast { bottom: calc(24px + var(--safe-b)); }

.ad-overlay { background: rgba(6, 52, 60, 0.5) !important; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fade-in 0.25s ease both; }
.ad-modal { display: grid; gap: 10px; box-shadow: 0 6px 0 #cdebef, 0 30px 60px -20px rgba(7, 93, 104, 0.6); animation: pop3d 0.6s var(--spring) both; }
.ad-modal h3 { font-size: 20px; padding: 0 30px; }
.ad-modal p { color: var(--ink-2); }
.ad-modal img { margin-bottom: 0 !important; }
.ad-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 12px;
  border: 1px solid var(--foam);
  background: #fff;
  color: var(--ink-2);
  font-size: 22px;
  line-height: 1;
  box-shadow: 0 2px 0 var(--foam);
  z-index: 2;
}

/* --------------------------------------------------------------------------
   Gerak: buka-lipat 3D, kemiringan, animasi
   -------------------------------------------------------------------------- */
.rv { opacity: 0; }
.rv.in { opacity: 1; transform-origin: 50% 0; animation: unfold 0.66s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 45ms); }

[data-tilt] {
  --rx: 0deg;
  --ry: 0deg;
  --lift: 0;
  --ps: 1;
  transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry)) translate3d(0, calc(var(--lift) * -4px), 0) scale(var(--ps));
  transition: transform 0.6s var(--ease), box-shadow 0.3s ease;
}
[data-tilt].is-tilting { transition: transform 0.1s linear, box-shadow 0.3s ease; }
[data-tilt].is-pressed { --ps: 0.975; transition: transform 0.15s ease; }
[data-tilt]::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
  background: radial-gradient(360px circle at var(--gx, 50%) var(--gy, 50%), var(--glare, rgba(19, 198, 216, 0.1)), transparent 60%);
}
[data-tilt].is-tilting::before { opacity: 1; }

@keyframes w-run { to { transform: translate3d(0, 64px, 0); } }
@keyframes w-bob { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(0, -16px, 0); } }
@keyframes w-tumble { from { transform: rotateX(-22deg) rotateY(0deg) rotateZ(10deg); } to { transform: rotateX(-22deg) rotateY(360deg) rotateZ(10deg); } }
@keyframes w-flip { from { transform: rotateX(12deg) rotateY(0deg) rotateZ(-8deg); } to { transform: rotateX(12deg) rotateY(360deg) rotateZ(-8deg); } }
@keyframes w-orbit { from { transform: rotateX(70deg) rotateZ(0deg); } to { transform: rotateX(70deg) rotateZ(360deg); } }
@keyframes logo-sway { 0%, 100% { transform: rotateY(-16deg) rotateX(5deg) translateY(0); } 50% { transform: rotateY(16deg) rotateX(-3deg) translateY(-2px); } }
@keyframes hero-float { 0%, 100% { transform: rotateY(-20deg) rotateX(8deg) translate3d(0, 0, 0); } 50% { transform: rotateY(20deg) rotateX(-2deg) translate3d(0, -10px, 0); } }
@keyframes logo-shine { 0%, 50% { background-position: 100% 0; } 85%, 100% { background-position: 0% 0; } }
@keyframes orbit-a { from { transform: translate(-50%, -50%) rotateX(76deg) rotateZ(0deg); } to { transform: translate(-50%, -50%) rotateX(76deg) rotateZ(360deg); } }
@keyframes orbit-face-a { from { transform: rotateZ(0deg) rotateX(-76deg); } to { transform: rotateZ(-360deg) rotateX(-76deg); } }
@keyframes orbit-b { from { transform: translate(-50%, -50%) rotateX(66deg) rotateY(-14deg) rotateZ(0deg); } to { transform: translate(-50%, -50%) rotateX(66deg) rotateY(-14deg) rotateZ(360deg); } }
@keyframes orbit-face-b { from { transform: rotateZ(0deg) rotateY(14deg) rotateX(-66deg); } to { transform: rotateZ(-360deg) rotateY(14deg) rotateX(-66deg); } }
@keyframes sheen { 0%, 55% { transform: translateX(-38%); } 80%, 100% { transform: translateX(38%); } }
@keyframes coin-spin { 0% { transform: rotateY(0deg) translateY(0); } 50% { transform: rotateY(180deg) translateY(-6px); } 100% { transform: rotateY(360deg) translateY(0); } }
@keyframes meter-run { to { transform: translateX(17.66px); } }
@keyframes ann-flip { from { opacity: 0; transform: perspective(700px) rotateX(-70deg) translateY(-6px); } }
@keyframes unfold { from { opacity: 0; transform: perspective(1000px) rotateX(-28deg) translate3d(0, 22px, -30px); } }
@keyframes float-y { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-6px) rotate(3deg); } }
@keyframes wa-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes pop3d { from { opacity: 0; transform: perspective(800px) rotateX(-35deg) translateY(30px) scale(0.92); } }

/* --------------------------------------------------------------------------
   Responsif
   -------------------------------------------------------------------------- */
.w-desk { display: none; }
@media (min-width: 720px) { .w-mob { display: none; } }

@media (max-width: 380px) {
  .content { padding-left: 12px; padding-right: 12px; gap: 12px; }
  .header, .page-head { padding-left: 12px; padding-right: 12px; }
  .card { padding: 14px; }
  .table-wrap { margin: 0 -14px; padding: 0 14px; }
  .bal-deco { transform: translateY(-50%) scale(0.78); transform-origin: 100% 50%; }
  .overview .stat { gap: 8px; padding: 10px; }
  .stat-ico { width: 34px; height: 34px; border-radius: 11px; }
  .stat-ico .i { width: 18px; height: 18px; }
  .menu-apps .ico { width: 48px; height: 48px; border-radius: 16px; }
  .dock a, .nav-main a { font-size: 10px; }
  .brand-word small { display: none; }
  .ann-ico { display: none; }
  .tab { flex: 1 1 auto; padding: 8px; font-size: 13px; }
  .icon-btn { width: 32px; height: 32px; border-radius: 10px; }
  .ann-head > b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .wa-btn { width: 50px; height: 50px; border-radius: 17px; }
  .ph-sub { font-size: 12px; }
  .stat-panel > * { padding: 12px 10px; }
}

@media (max-width: 639px) {
  .table-card .table-wrap { margin: 0; padding: 0; overflow: visible; background: none; }
  .table-card table, .table-card tbody, .table-card tr, .table-card td { display: block; width: 100%; }
  .table-card table { min-width: 0; }
  .table-card thead { display: none; }
  .table-card tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; padding: 14px 0; border-bottom: 1px solid var(--foam); }
  .table-card tbody tr:first-child { padding-top: 4px; }
  .table-card tbody tr:last-child { border-bottom: 0; padding-bottom: 6px; }
  .table-card tbody tr:hover { background: none; }
  .table-card td {
    display: grid;
    align-content: start;
    gap: 2px;
    min-width: 0;
    padding: 0;
    border: 0;
    text-align: left;
    font-weight: 700;
    overflow-wrap: anywhere;
  }
  .table-card td:first-child { padding-left: 0; }
  .table-card td::before { content: attr(data-label); font-size: 12px; font-weight: 700; color: var(--muted); }
  .table-card td:not([data-label])::before, .table-card td[colspan]::before { content: none; }
  .table-card td[colspan] { grid-column: 1 / -1; padding: 10px 0; text-align: center; font-weight: 600; color: var(--muted); }
  .table-card td[data-label="Email"], .table-card td:has(.row-actions) { grid-column: 1 / -1; }
  .table-card td .row-actions { justify-content: flex-start; margin-top: 4px; }
  .table-card tbody:empty::after { content: "Belum ada data"; display: block; padding: 6px 0 10px; text-align: center; font-size: 14px; font-weight: 600; color: var(--muted); }
}

@media (min-width: 361px) and (max-width: 1023px) {
  .has-fab .dock { right: calc(12px + var(--dock-h) + 10px); }
  .has-fab .wa-btn { right: 12px; bottom: calc(var(--dock-gap) + var(--safe-b)); width: var(--dock-h); height: var(--dock-h); border-radius: 22px; animation: none; }
}

@media (max-width: 959px) {
  [data-page="register"] .hero-stage { height: 172px; }
  [data-page="register"] .logo3d { width: min(186px, 52vw); }
}

@media (min-width: 560px) {
  .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .btn-grid.stack-sm { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .q-actions { display: flex; justify-content: flex-end; }
  .q-actions .btn { min-width: 112px; }
}
@media (max-width: 559px) {
  .btn-grid.stack-sm { grid-template-columns: minmax(0, 1fr); }
}

@media (min-width: 640px) {
  .stat-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .money-2 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .money-2 > :nth-child(2) { grid-column: auto; order: 0; }
  .dl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .payout-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-head #btn-logout { order: 2; }
  .lock-toggle { order: 1; flex: none; }
}

@media (min-width: 720px) {
  .w-desk { display: block; }
  .content, .home-grid { gap: 16px; }
  .content { padding-left: 24px; padding-right: 24px; }
  .header, .page-head { padding-left: 24px; padding-right: 24px; }
  .card { padding: 20px; }
  .table-wrap { margin: 0 -20px; padding: 0 20px; }
  .menu-panel { padding: 0; background: none; border: 0; box-shadow: none; }
  .menu-apps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .menu-apps .menu-tile {
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 16px;
    text-align: left;
    border-radius: 20px;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.96);
    box-shadow: var(--panel-shadow);
  }
  .menu-apps .mt-text { flex: 1; }
  .menu-apps .mt-text b { font-size: 15px; font-weight: 800; color: var(--ink); }
  .menu-apps .mt-text span { display: block; }
  .menu-apps .ico { width: 50px; height: 50px; border-radius: 16px; }
  .menu-apps > :last-child:nth-child(3n + 1) { grid-column: 1 / -1; }
  .bal-deco { right: 18px; transform: translateY(-50%) scale(1.15); transform-origin: 100% 50%; }
  .stat-panel > * { padding: 18px 20px; }
  .hero-stage { height: 250px; }
}

@media (min-width: 960px) {
  .auth-card { width: min(980px, 100%); grid-template-columns: minmax(0, 1fr) 420px; align-items: center; gap: 56px; }
  .hero-stage { height: 470px; }
  .logo3d { width: 380px; }
}

@media (min-width: 1024px) {
  :root { --dock-h: 52px; }
  .content { padding-bottom: 56px; }
  .home-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; }
  .home-grid .ann, .home-grid .menu-panel { grid-column: 1 / -1; }
  .home-grid .balance { min-height: 210px; align-content: center; }
  .home-grid .overview { align-content: center; }
  .menu-apps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .menu-apps > :last-child:nth-child(3n + 1) { grid-column: auto; }
  .menu-apps > :last-child:nth-child(4n + 1) { grid-column: 1 / -1; }

  /* member: header lengket + navigasi di atas */
  .role-user .header {
    position: sticky;
    top: 0;
    min-height: 76px;
    padding: 12px max(24px, calc((100% - 1072px) / 2)) 12px;
    background: rgba(240, 252, 253, 0.84);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    backdrop-filter: blur(14px) saturate(140%);
    box-shadow: 0 1px 0 rgba(19, 198, 216, 0.14);
  }
  .role-user .content { padding-top: 22px; }
  .dock {
    top: 12px;
    bottom: auto;
    left: 50%;
    right: auto;
    height: 52px;
    gap: 4px;
    padding: 4px;
    border-radius: 18px;
    transform: translateX(-50%);
  }
  .dock a { flex: none; flex-direction: row; gap: 8px; padding: 0 16px; border-radius: 14px; font-size: 14px; }
  .dock a .i { width: 19px; height: 19px; }
  .dock a.active .i { transform: none; }
  .dock a:hover:not(.active) { color: var(--ink); background: rgba(19, 198, 216, 0.08); }
  .wa-btn { right: 28px; bottom: 28px; }
  .toast { bottom: 28px; }

  /* admin: sidebar */
  .role-admin .app { padding-left: 268px; }
  .nav {
    top: 0;
    bottom: 0;
    left: 0;
    right: auto;
    width: 268px;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 20px 14px 18px;
    overflow-y: auto;
    border-radius: 0;
    border: 0;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 1px 0 0 rgba(19, 198, 216, 0.16), 18px 0 40px -34px rgba(7, 93, 104, 0.6);
    scrollbar-width: thin;
  }
  .nav-brand { display: flex; padding: 0 6px 14px; }
  .nav-main { display: grid; gap: 2px; height: auto; }
  .nav-main a { flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 44px; padding: 8px 12px; border-radius: 14px; font-size: 14.5px; font-weight: 700; color: var(--ink-2); }
  .nav-main a .i { width: 20px; height: 20px; }
  .nav-main a.active .i, .nav-main a.parent-active .i { transform: none; }
  .nav-main a.parent-active { background: rgba(19, 198, 216, 0.08); box-shadow: none; }
  .nav-main a:hover:not(.active) { color: var(--ink); background: rgba(19, 198, 216, 0.07); }
  .nav-sec { display: block; margin: 16px 12px 6px; font-size: 12.5px; font-weight: 800; color: var(--muted); }
  .nav-extra { display: grid; gap: 1px; }
  .nav-extra a { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 6px 12px; border-radius: 12px; color: var(--ink-2); font-size: 14px; font-weight: 600; }
  .nav-extra a::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: #bfe3e8; transition: transform 0.3s var(--spring), background 0.2s; }
  .nav-extra a:hover { color: var(--ink); background: rgba(19, 198, 216, 0.07); }
  .nav-extra a:hover::before { transform: scale(1.4); }
  .nav-extra a.active { color: var(--tosca-ink); font-weight: 800; background: linear-gradient(180deg, #ebfbfd, #d9f6f9); box-shadow: inset 0 -2px 0 rgba(19, 198, 216, 0.22); }
  .nav-extra a.active::before { background: var(--tosca); }
  .nav-card {
    display: grid;
    gap: 8px;
    margin-top: auto;
    padding: 16px;
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(150deg, #1fd3e3, #0a8e9e);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 4px 0 #0a7c8a, 0 18px 30px -18px rgba(10, 142, 158, 0.9);
  }
  .nav-card b { font-size: 15px; }
  .nav-card > span:not(.nc-cube) { font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, 0.9); line-height: 1.45; padding-right: 30px; }
  .nav-card .btn { justify-self: start; }
  .nc-cube { --s: 26px; position: absolute; top: 14px; right: 16px; animation: w-tumble 14s linear infinite; }
  .nc-cube > i { border-radius: 5px; background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.3)); border-color: rgba(255, 255, 255, 0.85); box-shadow: none; }
  .page-head { padding: 26px 32px 8px; max-width: 1180px; margin: 0 auto; }
  .role-admin .content { max-width: 1180px; padding: 10px 32px 56px; }
  .role-admin.layout-narrow .content, .role-admin.layout-narrow .page-head { max-width: 820px; }
  .settings-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1024px) and (max-height: 940px) {
  .nav { padding-top: 14px; padding-bottom: 12px; }
  .nav-brand { padding-bottom: 8px; }
  .nav-main a { min-height: 40px; }
  .nav-sec { margin-top: 10px; }
  .nav-extra a { min-height: 32px; padding-top: 4px; padding-bottom: 4px; }
  .nav-card { padding: 12px 14px; gap: 6px; }
  .nav-card > span:not(.nc-cube) { display: none; }
}
@media (min-width: 1024px) and (max-height: 780px) {
  .nav-card { display: none; }
}

@media (min-width: 1180px) {
  .admin-home { display: grid; grid-template-columns: minmax(0, 1fr) 360px; align-items: start; gap: 18px; }
  .ah-side { display: grid; gap: 14px; position: sticky; top: 18px; }
  .ah-maint { order: 0; }
  .arsip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* --------------------------------------------------------------------------
   Gerak dikurangi
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.001ms !important;
  }
  .rv { opacity: 1; }
}
