/* ===== Pusat Notifikasi (bel di rail + panel) — logika di notify.js, spesifikasi docs/frontend/notification-center.md =====
   Hanya memakai variabel tema yang sudah ada: --bg --surface --ink --mut --line --ok --rec. */

/* ---------- Bel di rail (desktop: sidebar, mobile: bar bawah) ---------- */
#nbell svg{fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#nbell[aria-expanded="true"]{background:var(--surface);color:var(--ink)}
#nbell .nb-badge{position:absolute;top:5px;left:27px;box-sizing:border-box;min-width:18px;height:18px;padding:0 4px;border-radius:99px;
  background:var(--rec);color:#fff;border:2px solid var(--bg);font-size:10.5px;font-weight:700;line-height:14px;text-align:center;
  font-variant-numeric:tabular-nums;pointer-events:none}
#nbell .nb-badge.shrink{animation:nb-shrink .35s cubic-bezier(.2,.9,.3,1.2)}
@keyframes nb-shrink{0%{transform:scale(1.4)}100%{transform:scale(1)}}
#nbell.ring svg{transform-origin:50% 4px;animation:nb-ring .7s ease-in-out}
@keyframes nb-ring{0%,100%{transform:rotate(0)}15%{transform:rotate(-14deg)}35%{transform:rotate(12deg)}55%{transform:rotate(-8deg)}75%{transform:rotate(4deg)}}
@media(max-width:799px){#rail #nbell .nb-badge{left:calc(50% + 3px);top:4px}}

/* ---------- Panel ---------- */
.nt-scrim{position:fixed;inset:0;z-index:58;background:transparent;visibility:hidden;pointer-events:none}
.nt-scrim.show{visibility:visible;pointer-events:auto}
.nt-panel{position:fixed;z-index:59;display:flex;flex-direction:column;width:min(360px,calc(100vw - 24px));max-height:min(70vh,620px);
  background:var(--bg);color:var(--ink);border:1px solid var(--line);border-radius:20px;box-shadow:0 18px 48px rgba(0,0,0,.22);overflow:hidden;outline:0;
  opacity:0;transform:translateY(6px) scale(.98);visibility:hidden;pointer-events:none;
  transition:opacity .16s,transform .2s cubic-bezier(.2,.9,.2,1),visibility 0s .2s}
.nt-panel.show{opacity:1;transform:none;visibility:visible;pointer-events:auto;transition-delay:0s}

.nt-head{position:relative;flex:none;display:flex;align-items:center;gap:8px;padding:14px 12px 10px 16px;border-bottom:1px solid var(--line)}
.nt-head h2{display:flex;align-items:center;gap:8px;margin-right:auto;font-size:16px;font-weight:600;letter-spacing:-.02em}
.nt-count{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 6px;border-radius:99px;background:var(--rec);color:#fff;
  font-size:11px;font-weight:700;font-variant-numeric:tabular-nums}
.nt-all{padding:7px 12px;border-radius:99px;background:var(--surface);color:var(--ink);font-size:12.5px;font-weight:500;white-space:nowrap;transition:opacity .15s}
.nt-all:disabled{opacity:.4;cursor:default}
@media(hover:hover){.nt-all:not(:disabled):hover{background:var(--line)}}
.nt-x,.nt-grab{display:none}

.nt-list{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:6px}
.nt-item+.nt-item{margin-top:2px}
.nt-row{display:flex;align-items:center;gap:12px;width:100%;min-height:64px;padding:10px;border-radius:16px;text-align:left;color:var(--ink);transition:background .15s}
@media(hover:hover){.nt-row:hover{background:var(--surface)}}
.nt-row:active{background:var(--surface)}
.nt-ic{flex:none;display:grid;place-items:center;width:40px;height:40px;border-radius:50%;background:var(--surface);color:var(--mut)}
.nt-ic svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.nt-row.un .nt-ic{color:var(--ink)}
.nt-row.un .nt-ic.t-ach{color:#d4a017}
.nt-row.un .nt-ic.t-rob{color:var(--rec)}
.nt-row.un .nt-ic.t-transfer-in,.nt-row.un .nt-ic.t-market,.nt-row.un .nt-ic.t-bank{color:var(--ok)}
.nt-tx{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.nt-t{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font-size:13.5px;line-height:1.35;color:var(--mut);overflow-wrap:anywhere}
.nt-row.un .nt-t{color:var(--ink);font-weight:550}
.nt-time{font-size:11.5px;color:var(--mut)}
.nt-dot{flex:none;width:9px;height:9px;border-radius:50%;background:var(--rec);opacity:0;transform:scale(.3);transition:opacity .2s,transform .2s}
.nt-row.un .nt-dot{opacity:1;transform:none}
.nt-row:focus-visible,.nt-all:focus-visible,.nt-x:focus-visible,.nt-retry:focus-visible,.nt-morebtn:focus-visible{outline:2px solid var(--ink);outline-offset:2px}

/* kosong / error */
.nt-empty{display:flex;flex-direction:column;align-items:center;gap:10px;padding:36px 24px;text-align:center}
.nt-empty p{font-size:13.5px;line-height:1.5;color:var(--mut)}
.nt-empty.err p{color:var(--ink);font-weight:500}
.nt-empty small{font-size:12px;color:var(--mut)}
.nt-eic{display:grid;place-items:center;width:48px;height:48px;border-radius:50%;background:var(--surface);color:var(--mut)}
.nt-eic svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.nt-retry,.nt-morebtn{padding:9px 18px;border-radius:99px;background:var(--ink);color:var(--bg);font-size:13px;font-weight:600}
.nt-more{display:flex;justify-content:center;padding:10px 0 6px}
.nt-morebtn{background:var(--surface);color:var(--ink);font-weight:500}
.nt-morebtn:disabled{opacity:.55}

/* skeleton 5 baris */
.nt-sk{display:flex;align-items:center;gap:12px;height:64px;padding:10px}
.nt-sk span{flex:none;width:40px;height:40px;border-radius:50%;background:var(--surface)}
.nt-sk div{flex:1;display:flex;flex-direction:column;gap:8px}
.nt-sk i{display:block;height:10px;border-radius:6px;background:var(--surface)}
.nt-sk i+i{width:40%}
.nt-sk span,.nt-sk i{animation:nt-pulse 1.2s ease-in-out infinite}
@keyframes nt-pulse{50%{opacity:.5}}

.nt-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* ---------- Mobile: bottom-sheet 80vh dengan handle geser ---------- */
@media(max-width:799px){
  .nt-scrim{background:rgba(0,0,0,.35);opacity:0;transition:opacity .25s,visibility 0s .25s}
  .nt-scrim.show{opacity:1;transition-delay:0s}
  .nt-panel{left:0!important;right:0!important;top:auto!important;bottom:0!important;width:auto;height:80vh;height:80dvh;max-height:80vh;max-height:80dvh;
    border-width:1px 0 0;border-radius:22px 22px 0 0;box-shadow:0 -10px 40px rgba(0,0,0,.2);
    padding-bottom:env(safe-area-inset-bottom,0px);transform:translateY(100%);opacity:1;
    transition:transform .3s cubic-bezier(.2,.9,.2,1),visibility 0s .3s}
  .nt-panel.show{transform:none;transition-delay:0s}
  .nt-head{padding-top:22px;touch-action:none}
  .nt-grab{display:block;position:absolute;top:8px;left:50%;width:38px;height:4px;margin-left:-19px;border-radius:4px;background:var(--line)}
  .nt-x{display:grid;place-items:center;width:36px;height:36px;border-radius:50%;color:var(--mut)}
  .nt-x svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
  .nt-row{min-height:68px}
}

@media(prefers-reduced-motion:reduce){
  .nt-panel,.nt-scrim,.nt-row,.nt-dot{transition:none}
  #nbell.ring svg,#nbell .nb-badge.shrink,.nt-sk span,.nt-sk i{animation:none}
}
